fluid-idl (empty) → 0.0.0
raw patch · 23 files changed
+7277/−0 lines, 23 filesdep +aesondep +basedep +bytestring
Dependencies added: aeson, base, bytestring, containers, errors, exceptions, fluid, hspec, lifted-async, monad-control, monad-logger, mtl, random, safe-exceptions, scientific, text, text-conversions, tuple, unordered-containers, vector
Files
- LICENSE +29/−0
- README.md +4/−0
- fluid-idl.cabal +82/−0
- library/Fluid/Ast.hs +554/−0
- library/Fluid/Client.hs +11/−0
- library/Fluid/Client/Exchange.hs +74/−0
- library/Fluid/Client/Expr.hs +2717/−0
- library/Fluid/Endpoint.hs +83/−0
- library/Fluid/Imports.hs +17/−0
- library/Fluid/Prim.hs +38/−0
- library/Fluid/RuntimeThrower.hs +17/−0
- library/Fluid/Server.hs +17/−0
- library/Fluid/Server/Exchange.hs +43/−0
- library/Fluid/Server/Expr.hs +1218/−0
- library/Fluid/ServiceThrower.hs +23/−0
- library/Fluid/Types.hs +1533/−0
- library/Fluid/Val.hs +559/−0
- package.yaml +67/−0
- tests/AstSpec.hs +128/−0
- tests/ClientSpec.hs +18/−0
- tests/ExprSpec.hs +13/−0
- tests/Spec.hs +1/−0
- tests/ValSpec.hs +31/−0
+ LICENSE view
@@ -0,0 +1,29 @@+BSD 3-Clause License++Copyright (c) 2017, Joe Vargas+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++* Redistributions of source code must retain the above copyright notice, this+ list of conditions and the following disclaimer.++* Redistributions in binary form must reproduce the above copyright notice,+ this list of conditions and the following disclaimer in the documentation+ and/or other materials provided with the distribution.++* Neither the name of the copyright holder nor the names of its+ contributors may be used to endorse or promote products derived from+ this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,4 @@+# fluid-idl++This is the Haskell fluid library which includes the server-side runtime and client-side query language.+It's meant to be used in conjunction with the command line [code generator](https://github.com/jxv/fluid).
+ fluid-idl.cabal view
@@ -0,0 +1,82 @@+-- This file has been generated from package.yaml by hpack version 0.17.0.+--+-- see: https://github.com/sol/hpack++name: fluid-idl+version: 0.0.0+synopsis: Fluid | The Programmatic IDL+description: Fluid | The Programmatic IDL+category: Web+maintainer: Joe Vargas+license: BSD3+license-file: LICENSE+build-type: Simple+cabal-version: >= 1.10++extra-source-files:+ package.yaml+ README.md++library+ hs-source-dirs:+ library+ default-extensions: ConstraintKinds DeriveGeneric DuplicateRecordFields FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving KindSignatures LambdaCase MultiParamTypeClasses NamedFieldPuns OverloadedStrings RankNTypes ScopedTypeVariables TupleSections TypeApplications TypeOperators+ ghc-options: -Wall+ build-depends:+ aeson+ , base >= 4.7 && < 5+ , bytestring+ , containers+ , errors+ , exceptions+ , lifted-async+ , monad-control+ , monad-logger+ , mtl+ , random+ , scientific+ , safe-exceptions+ , text+ , text-conversions+ , unordered-containers+ , vector+ exposed-modules:+ Fluid.Ast+ Fluid.Client+ Fluid.Client.Exchange+ Fluid.Client.Expr+ Fluid.Endpoint+ Fluid.Imports+ Fluid.Prim+ Fluid.RuntimeThrower+ Fluid.Server+ Fluid.Server.Exchange+ Fluid.Server.Expr+ Fluid.ServiceThrower+ Fluid.Types+ Fluid.Val+ default-language: Haskell2010++test-suite fluid-suite+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs:+ tests+ default-extensions: ConstraintKinds DeriveGeneric DuplicateRecordFields FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving KindSignatures LambdaCase MultiParamTypeClasses NamedFieldPuns OverloadedStrings RankNTypes ScopedTypeVariables TupleSections TypeApplications TypeOperators+ ghc-options: -Wall -rtsopts -threaded -with-rtsopts=-N+ build-depends:+ aeson+ , base >= 4.7 && < 5+ , fluid+ , containers+ , hspec+ , scientific+ , text+ , tuple+ , vector+ other-modules:+ AstSpec+ ClientSpec+ ExprSpec+ ValSpec+ default-language: Haskell2010
+ library/Fluid/Ast.hs view
@@ -0,0 +1,554 @@+{-# LANGUAGE DeriveGeneric #-}+module Fluid.Ast+ ( Ast(..)+ , ToAst(..)+ , Ref(..)+ , If(..)+ , Iflet(..)+ , Get(..)+ , Set(..)+ , Define(..)+ , Match(..)+ , MatchCase(..)+ , Lambda(..)+ , List(..)+ , Tuple(..)+ , Do(..)+ , FnCall(..)+ , Enumeral(..)+ , Struct(..)+ , Wrap(..)+ , StructCall(..)+ , WrapCall(..)+ , EnumerationCall(..)+ , HollowCall(..)+ , Const(..)+ ) where++import qualified Data.HashMap.Lazy as HML+import qualified Data.Vector as V+import qualified Data.Map as Map+import Control.Monad (mzero)+import Control.Applicative ((<|>))+import Data.Text (Text)+import Data.Aeson+import Data.Map (Map)+import Data.Int+import Data.Word+import GHC.Generics (Generic)++import Fluid.Types++data Ast+ = Ast'Ref Ref+ | Ast'If If+ | Ast'Iflet Iflet+ | Ast'Get Get+ | Ast'Set Set+ | Ast'Define Define+ | Ast'Match Match+ | Ast'Lambda Lambda+ | Ast'List List+ | Ast'Tuple Tuple+ | Ast'Do Do+ | Ast'FnCall FnCall+ | Ast'WrapCall WrapCall+ | Ast'StructCall StructCall+ | Ast'EnumerationCall EnumerationCall+ | Ast'HollowCall HollowCall+ | Ast'Enumeral Enumeral+ | Ast'Struct Struct+ | Ast'Wrap Wrap+ | Ast'Const Const+ deriving (Show, Eq)++class ToAst a where+ toAst :: a -> Ast++instance ToAst () where+ toAst () = Ast'Const Const'Null++instance ToAst Bool where+ toAst b = Ast'Const (Const'Bool b)++instance ToAst Text where+ toAst s = Ast'Const (Const'String s)++instance ToAst Int8 where+ toAst = num++instance ToAst Int16 where+ toAst = num++instance ToAst Int32 where+ toAst = num++instance ToAst Int64 where+ toAst = num++instance ToAst Word8 where+ toAst = num++instance ToAst Word16 where+ toAst = num++instance ToAst Word32 where+ toAst = num++instance ToAst Word64 where+ toAst = num++instance ToAst Float where+ toAst = num++instance ToAst Double where+ toAst = num++num :: (Num a, ToJSON a) => a -> Ast+num n = case toJSON n of+ Number a -> Ast'Const (Const'Number a)+ _ -> error "should never reach here"++instance ToAst a => ToAst [a] where+ toAst xs = Ast'List $ List $ map toAst xs++instance ToAst a => ToAst (Maybe a) where+ toAst Nothing = Ast'Const Const'Null+ toAst (Just x) = toAst x++instance (ToAst a, ToAst b) => ToAst (Either a b) where+ toAst (Left a) = Ast'Enumeral $ Enumeral "Left" $ Just $ Map.fromList [("left", toAst a)]+ toAst (Right a) = Ast'Enumeral $ Enumeral "Right" $ Just $ Map.fromList [("right", toAst a)]++--++instance (ToAst t1, ToAst t2) => ToAst (t1, t2) where+ toAst (t1, t2) = Ast'Tuple $ Tuple [toAst t1, toAst t2]++instance (ToAst t1, ToAst t2, ToAst t3) => ToAst (t1, t2, t3) where+ toAst (t1, t2, t3) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4) => ToAst (t1, t2, t3, t4) where+ toAst (t1, t2, t3, t4) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5) => ToAst (t1, t2, t3, t4, t5) where+ toAst (t1, t2, t3, t4, t5) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6) => ToAst (t1, t2, t3, t4, t5, t6) where+ toAst (t1, t2, t3, t4, t5, t6) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7) => ToAst (t1, t2, t3, t4, t5, t6, t7) where+ toAst (t1, t2, t3, t4, t5, t6, t7) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27, ToAst t28) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27, ToAst t28, ToAst t29) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27, ToAst t28, ToAst t29, ToAst t30) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27, ToAst t28, ToAst t29, ToAst t30, ToAst t31) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31]++instance (ToAst t1, ToAst t2, ToAst t3, ToAst t4, ToAst t5, ToAst t6, ToAst t7, ToAst t8, ToAst t9, ToAst t10, ToAst t11, ToAst t12, ToAst t13, ToAst t14, ToAst t15, ToAst t16, ToAst t17, ToAst t18, ToAst t19, ToAst t20, ToAst t21, ToAst t22, ToAst t23, ToAst t24, ToAst t25, ToAst t26, ToAst t27, ToAst t28, ToAst t29, ToAst t30, ToAst t31, ToAst t32) => ToAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where+ toAst (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) = Ast'Tuple $ Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31, toAst t32]++{-+var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var toAstTuple = n => {+ if (n < 2) {+ return '';+ }++ var l = ['instance (ToAst t1'];+ for (var i = 1; i < n; i++) {+ l = l.concat([', ToAst t', i + 1]);+ }+ l = l.concat([') => ToAst (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') where\n']);++ l = l.concat([' toAst (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') = Ast\'Tuple $ Tuple [toAst t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', toAst t', i + 1]);+ }+ l = l.concat([']\n\n']);++ return l.join('');+};+-}++--++instance FromJSON Ast where+ parseJSON v+ = (Ast'Ref <$> parseJSON v)+ <|> (Ast'If <$> parseJSON v)+ <|> (Ast'Iflet <$> parseJSON v)+ <|> (Ast'Get <$> parseJSON v)+ <|> (Ast'Set <$> parseJSON v)+ <|> (Ast'Define <$> parseJSON v)+ <|> (Ast'Match <$> parseJSON v)+ <|> (Ast'Lambda <$> parseJSON v)+ <|> (Ast'List <$> parseJSON v)+ <|> (Ast'Tuple <$> parseJSON v)+ <|> (Ast'Do <$> parseJSON v)+ <|> (Ast'FnCall <$> parseJSON v)+ <|> (Ast'EnumerationCall <$> parseJSON v)+ <|> (Ast'WrapCall <$> parseJSON v)+ <|> (Ast'StructCall <$> parseJSON v)+ <|> (Ast'HollowCall <$> parseJSON v)+ <|> (Ast'Enumeral <$> parseJSON v)+ <|> (Ast'Struct <$> parseJSON v)+ <|> (Ast'Const <$> parseJSON v)++instance ToJSON Ast where+ toJSON = \case+ Ast'Ref a -> toJSON a+ Ast'If a -> toJSON a+ Ast'Iflet a -> toJSON a+ Ast'Get a -> toJSON a+ Ast'Set a -> toJSON a+ Ast'Define a -> toJSON a+ Ast'Match a -> toJSON a+ Ast'Lambda a -> toJSON a+ Ast'List a -> toJSON a+ Ast'Tuple a -> toJSON a+ Ast'Do a -> toJSON a+ Ast'FnCall a -> toJSON a+ Ast'EnumerationCall a -> toJSON a+ Ast'WrapCall a -> toJSON a+ Ast'StructCall a -> toJSON a+ Ast'HollowCall a -> toJSON a+ Ast'Enumeral a -> toJSON a+ Ast'Struct a -> toJSON a+ Ast'Wrap a -> toJSON a+ Ast'Const a -> toJSON a++data Ref = Ref+ { symbol :: Symbol+ } deriving (Show, Eq)++instance FromJSON Ref where+ parseJSON (Object o) = Ref <$> o .: "@"+ parseJSON _ = mzero++instance ToJSON Ref where+ toJSON Ref{symbol} = object [ "@" .= symbol ]++data If = If+ { cond :: Ast+ , true :: Ast+ , false :: Ast+ } deriving (Show, Eq)++instance FromJSON If where+ parseJSON (Array arr) = case V.toList arr of+ ["if", cond, true, false] -> If <$> parseJSON cond <*> parseJSON true <*> parseJSON false+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON If where+ toJSON If{cond,true,false} = toJSON ["if", toJSON cond, toJSON true, toJSON false]++data Iflet = Iflet+ { symbol :: Symbol+ , option :: Ast+ , some :: Ast+ , none :: Ast+ } deriving (Show, Eq)++instance FromJSON Iflet where+ parseJSON (Array arr) = case V.toList arr of+ ["iflet", symbol, option, some, none] -> Iflet <$> parseJSON symbol <*> parseJSON option <*> parseJSON some <*> parseJSON none+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Iflet where+ toJSON Iflet{symbol,option,some,none} = toJSON ["iflet", toJSON symbol, toJSON option, toJSON some, toJSON none]++data Get = Get+ { path :: [Text]+ , val :: Ast+ } deriving (Show, Eq)++instance FromJSON Get where+ parseJSON (Array arr) = case V.toList arr of+ ["get", path, val] -> Get <$> parseJSON path <*> parseJSON val+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Get where+ toJSON Get{path,val} = toJSON ["get", toJSON path, toJSON val]++data Set = Set+ { path :: [Text]+ , src :: Ast+ , dest :: Ast+ } deriving (Show, Eq)++instance FromJSON Set where+ parseJSON (Array arr) = case V.toList arr of+ ["set", path, src, dest] -> Set <$> parseJSON path <*> parseJSON src <*> parseJSON dest+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Set where+ toJSON Set{path,src,dest} = toJSON ["set", toJSON path, toJSON src, toJSON dest]++data Define = Define+ { var :: Symbol+ , expr :: Ast+ } deriving (Show, Eq)++instance FromJSON Define where+ parseJSON (Array arr) = case V.toList arr of+ ["def", var, expr] -> Define <$> parseJSON var <*> parseJSON expr+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Define where+ toJSON Define{var,expr} = toJSON ["def", toJSON var, toJSON expr]++data MatchCase+ = MatchCase'Tag EnumeralName Ast+ | MatchCase'Members EnumeralName Symbol Ast+ deriving (Show, Eq)++instance ToJSON MatchCase where+ toJSON (MatchCase'Tag name ast) = toJSON [toJSON name, toJSON ast]+ toJSON (MatchCase'Members name sym ast) = toJSON [toJSON name, toJSON sym, toJSON ast]++instance FromJSON MatchCase where+ parseJSON (Array arr) = case V.toList arr of+ [name, ast] -> MatchCase'Tag <$> parseJSON name <*> parseJSON ast+ [name, sym, ast] -> MatchCase'Members <$> parseJSON name <*> parseJSON sym <*> parseJSON ast+ _ -> mzero+ parseJSON _ = mzero++data Match = Match+ { enumeral :: Ast+ , cases :: [MatchCase]+ } deriving (Show, Eq)++instance FromJSON Match where+ parseJSON (Array arr) = case V.toList arr of+ ("match":enumeral:cases) -> Match <$> parseJSON enumeral <*> mapM parseJSON cases+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Match where+ toJSON Match{enumeral, cases} = toJSON $ ["match", toJSON enumeral] ++ map toJSON cases++data Lambda = Lambda+ { args :: [(Symbol, Type)]+ , expr :: Ast+ } deriving (Show, Eq)++instance FromJSON Lambda where+ parseJSON (Array arr) = case V.toList arr of+ ["fn", Array params, expr] -> Lambda <$> mapM parseParam (V.toList params) <*> parseJSON expr+ _ -> mzero+ where+ parseParam = \case+ Object o -> case HML.toList o of+ [(key,val)] -> (Symbol key,) <$> parseJSON val+ _ -> mzero+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Lambda where+ toJSON Lambda{args,expr} = toJSON ["fn", toJSON $ map (Map.fromList . (:[])) args, toJSON expr]++data List = List+ { list :: [Ast]+ } deriving (Show, Eq)++instance FromJSON List where+ parseJSON (Array arr) = case V.toList arr of+ ("list":(Array xs):[]) -> List <$> mapM parseJSON (V.toList xs)+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON List where+ toJSON List{list} = toJSON $ "list" : [toJSON list]++data Tuple = Tuple+ { tuple :: [Ast]+ } deriving (Show, Eq)++instance FromJSON Tuple where+ parseJSON (Array arr) = case V.toList arr of+ ("tuple":xs) -> Tuple <$> mapM parseJSON xs+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Tuple where+ toJSON Tuple{tuple} = toJSON $ "tuple" : map toJSON tuple++data Do = Do+ { vals :: [Ast]+ } deriving (Show, Eq)++instance FromJSON Do where+ parseJSON (Array arr) = case V.toList arr of+ "do":xs -> Do <$> mapM parseJSON xs+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON Do where+ toJSON Do{vals} = toJSON $ "do" : map toJSON vals++data FnCall = FnCall+ { fn :: Ast+ , args :: [Ast]+ } deriving (Show, Eq)++instance FromJSON FnCall where+ parseJSON (Array arr) = case V.toList arr of+ ((String x):xs) -> FnCall <$> pure (Ast'Ref $ Ref $ Symbol x) <*> mapM parseJSON xs+ (x:xs) -> FnCall <$> parseJSON x <*> mapM parseJSON xs+ _ -> mzero+ parseJSON _ = mzero++instance ToJSON FnCall where+ toJSON (FnCall (Ast'Ref (Ref sym)) args) = toJSON $ toJSON sym : map toJSON args+ toJSON (FnCall fn args) = toJSON $ fn : args++data EnumerationCall = EnumerationCall+ { n :: TypeName+ , e :: Ast+ } deriving (Show, Eq, Generic)++instance FromJSON EnumerationCall+instance ToJSON EnumerationCall++data WrapCall = WrapCall+ { n :: TypeName+ , w :: Ast+ } deriving (Show, Eq, Generic)++instance FromJSON WrapCall+instance ToJSON WrapCall++data StructCall = StructCall+ { n :: TypeName+ , m :: Ast+ } deriving (Show, Eq, Generic)++instance FromJSON StructCall+instance ToJSON StructCall++data HollowCall = HollowCall+ { n :: TypeName+ } deriving (Show, Eq, Generic)++instance FromJSON HollowCall+instance ToJSON HollowCall++data Enumeral = Enumeral+ { tag :: EnumeralName+ , m :: Maybe (Map MemberName Ast)+ } deriving (Show, Eq, Generic)++instance FromJSON Enumeral where+ parseJSON (Object o) = do+ tag <- o .: "tag"+ let tagless = HML.delete "tag" o+ if HML.size o == 1+ then pure $ Enumeral tag Nothing+ else Enumeral tag <$> (Just <$> parseJSON (Object tagless))+ parseJSON _ = mzero++instance ToJSON Enumeral where+ toJSON Enumeral{tag, m} = case m of+ Nothing -> object [ "tag" .= tag ]+ Just m' -> toJSON $ Map.fromList $ ("tag", toJSON tag) : Map.toList (toJSON <$> m')++data Struct = Struct+ { m :: Map MemberName Ast+ } deriving (Show, Eq, Generic)++instance FromJSON Struct where+ parseJSON v = Struct <$> parseJSON v++instance ToJSON Struct where+ toJSON (Struct m) = toJSON m++data Wrap = Wrap+ { w :: Ast+ } deriving (Show, Eq, Generic)++-- Wrap does not have a FromJSON instance+-- 'Wrapped' values will be coerced as needed++instance ToJSON Wrap where+ toJSON (Wrap w) = toJSON w
+ library/Fluid/Client.hs view
@@ -0,0 +1,11 @@+module Fluid.Client+ ( module Fluid.Types+ , module Fluid.Val+ , module Fluid.Client.Expr+ , module Fluid.Client.Exchange+ ) where++import Fluid.Val+import Fluid.Types+import Fluid.Client.Expr hiding (unsafeExpr, unsafeWrapExpr, unsafeStructExpr, unsafeEnumeralExpr, unsafeRef, unsafeStmt, unsafePath, exprJSON)+import Fluid.Client.Exchange
+ library/Fluid/Client/Exchange.hs view
@@ -0,0 +1,74 @@+module Fluid.Client.Exchange+ ( Request(..)+ , Response(..)+ , ResponseError(..)+ ) where++import Control.Monad (mzero)+import Data.Aeson (Value(..), FromJSON(..), ToJSON(..), object, (.=), (.:))+import Data.Text (Text)++import Fluid.Types (RuntimeError, HasType(..), Version(..), Limits)+import Fluid.Ast (ToAst(..))+import Fluid.Val (ToVal(..), FromVal(..))+import Fluid.Client.Expr (Expr, exprJSON)++data Request meta a = Request+ { fluid :: Version+ , version :: Version+ , meta :: meta+ , query :: Expr a+ }++instance (ToVal meta, HasType meta, ToAst a, HasType a) => ToJSON (Request meta a) where+ toJSON Request{fluid, version, meta, query} = object+ [ "fluid" .= fluid+ , "version" .= version+ , "meta" .= toVal meta+ , "query" .= exprJSON query+ ]++data ResponseError err+ = ResponseError'Service err+ | ResponseError'Runtime RuntimeError+ deriving (Eq, Show)++instance (FromVal err, HasType err) => FromJSON (ResponseError err) where+ parseJSON (Object o) = do+ tag <- o .: "tag"+ case tag :: Text of+ "Service" -> do+ m <- o .: "service"+ case fromVal m of+ Nothing -> mzero+ Just v -> return $ ResponseError'Service v+ "Runtime" -> ResponseError'Runtime <$> o .: "runtime"+ _ -> mzero+ parseJSON _ = mzero++instance ToVal err => ToJSON (ResponseError err) where+ toJSON = \case+ ResponseError'Service m -> object [ "tag" .= String "Service", "service" .= toVal m ]+ ResponseError'Runtime m -> object [ "tag" .= String "Runtime", "runtime" .= m ]++data Response err a+ = Response'Error (ResponseError err)+ | Response'Success a Limits+ deriving (Show, Eq)++instance (FromVal err, HasType err, FromVal a, HasType a) => FromJSON (Response err a) where+ parseJSON (Object o) = do+ tag <- o .: "tag"+ case tag :: Text of+ "Success" -> do+ m <- o .: "success"+ case fromVal m of+ Nothing -> mzero+ Just v -> Response'Success v <$> o .: "limits"+ "Error" -> Response'Error <$> o .: "error"+ _ -> mzero+ parseJSON _ = mzero++instance (ToVal err, HasType err, ToVal a, HasType a) => ToJSON (Response err a) where+ toJSON (Response'Error m) = object [ "tag" .= String "Error", "error" .= m ]+ toJSON (Response'Success m limits) = object [ "tag" .= String "Success", "success" .= toVal m, "limits" .= limits]
+ library/Fluid/Client/Expr.hs view
@@ -0,0 +1,2717 @@+module Fluid.Client.Expr+ ( Expr+ , Stmt+ , Path+ , Fn+ , ToArgs+ , ToExpr(..)+ , exprJSON+ , stmt+ --+ , appendExpr+ , (<:>)+ , (<:)+ --+ , dO+ , def+ , defn+ , defnRec+ , iF+ , iflet+ , get+ , set+ , dot+ , (<.>)+ --+ , noT+ , eq+ , neq+ , addI8+ , addI16+ , addI32+ , addI64+ , addU8+ , addU16+ , addU32+ , addU64+ , subI8+ , subI16+ , subI32+ , subI64+ , subU8+ , subU16+ , subU32+ , subU64+ , mulI8+ , mulI16+ , mulI32+ , mulI64+ , mulU8+ , mulU16+ , mulU32+ , mulU64+ , divI8+ , divI16+ , divI32+ , divI64+ , divU8+ , divU16+ , divU32+ , divU64+ , concaT+ --+ , unit+ , bool+ , string+ , i8+ , i16+ , i32+ , i64+ , u8+ , u16+ , u32+ , u64+ , f32+ , f64+ --+ , option+ , list+ , eitheR+ --+ , mapLeft+ , mapRight+ , mapOption+ , mapList+ , filterList+ , reduceList+ --+ , tuple2+ , tuple3+ , tuple4+ , tuple5+ , tuple6+ , tuple7+ , tuple8+ , tuple9+ , tuple10+ , tuple11+ , tuple12+ , tuple13+ , tuple14+ , tuple15+ , tuple16+ , tuple17+ , tuple18+ , tuple19+ , tuple20+ , tuple21+ , tuple22+ , tuple23+ , tuple24+ , tuple25+ , tuple26+ , tuple27+ , tuple28+ , tuple29+ , tuple30+ , tuple31+ , tuple32+ , tuple2'+ , tuple3'+ , tuple4'+ , tuple5'+ , tuple6'+ , tuple7'+ , tuple8'+ , tuple9'+ , tuple10'+ , tuple11'+ , tuple12'+ , tuple13'+ , tuple14'+ , tuple15'+ , tuple16'+ , tuple17'+ , tuple18'+ , tuple19'+ , tuple20'+ , tuple21'+ , tuple22'+ , tuple23'+ , tuple24'+ , tuple25'+ , tuple26'+ , tuple27'+ , tuple28'+ , tuple29'+ , tuple30'+ , tuple31'+ , tuple32'+ --+ , call+ , (-<)+ --+ , fn0+ , fn1+ , fn2+ , fn3+ , fn4+ , fn5+ , fn6+ , fn7+ , fn8+ , fn9+ , fn10+ , fn11+ , fn12+ , fn13+ , fn14+ , fn15+ , fn16+ , fn17+ , fn18+ , fn19+ , fn20+ , fn21+ , fn22+ , fn23+ , fn24+ , fn25+ , fn26+ , fn27+ , fn28+ , fn29+ , fn30+ , fn31+ , fn32+ --+ , unsafeExpr+ , unsafeRef+ , unsafeWrapExpr+ , unsafeStructExpr+ , unsafeEnumeralExpr+ , unsafeStmt+ , unsafePath+ ) where++import qualified Data.Text as T+import qualified Data.Map as Map+import Data.Aeson (toJSON, Value)+import Data.Proxy+import Data.Word+import Data.Int+import Data.Map (Map)++import qualified Fluid.Ast as Ast++import Fluid.Ast (Ast(..), ToAst(..))+import Fluid.Types++exprJSON :: (HasType a, ToAst a) => Expr a -> Value+exprJSON = toJSON . toAst++-- Don't export constructors+data Expr a+ = Expr Ast+ | Expr'WrapCtor+ | Expr'MembersCtor MembersCtor (Map MemberName Ast)++newtype MembersCtor = MembersCtor (Ast -> Map MemberName Ast -> Either (Map MemberName Ast, MembersCtor) Ast)++unsafeWrapExpr :: Expr a+unsafeWrapExpr = Expr'WrapCtor++structCtor :: [MemberName] -> MembersCtor+structCtor [] = error "need members"+structCtor (n:[]) = MembersCtor $ \ast m -> Right (Ast.Ast'Struct $ Ast.Struct $ Map.insert n ast m)+structCtor (n:ns) = MembersCtor $ \ast m -> Left (Map.insert n ast m, structCtor ns)++unsafeStructExpr :: [MemberName] -> Expr a+unsafeStructExpr ns = Expr'MembersCtor (structCtor ns) Map.empty++enumeralCtor :: EnumeralName -> [MemberName] -> MembersCtor+enumeralCtor _ [] = error "need members"+enumeralCtor tag (n:[]) = MembersCtor $ \ast m -> Right (Ast.Ast'Enumeral $ Ast.Enumeral tag $ Just $ Map.insert n ast m)+enumeralCtor tag (n:ns) = MembersCtor $ \ast m -> Left (Map.insert n ast m, enumeralCtor tag ns)++unsafeEnumeralExpr :: EnumeralName -> [MemberName] -> Expr a+unsafeEnumeralExpr tag ns = Expr'MembersCtor (enumeralCtor tag ns) Map.empty++appendExpr :: Expr (a -> b) -> Expr a -> Expr b+appendExpr (Expr'MembersCtor (MembersCtor c) m) (Expr a) = case c a m of+ Left (m', ctor) -> Expr'MembersCtor ctor m'+ Right ast -> Expr ast+appendExpr Expr'WrapCtor (Expr a) = Expr a+appendExpr _ _ = error "cannot not append member"++(<:>) :: Expr (a -> b) -> Expr a -> Expr b+(<:>) = appendExpr++(<:) :: ToExpr a => Expr (a -> b) -> a -> Expr b+(<:) f a = appendExpr f (ex a)++instance HasType a => HasType (Expr a) where+ getType p = getType (cvt p)+ where+ cvt :: Proxy (Expr a) -> Proxy a+ cvt _ = Proxy++unsafeExpr :: Ast -> Expr a+unsafeExpr = Expr++unsafeRef :: Symbol -> Expr a+unsafeRef s = Expr (Ast'Ref $ Ast.Ref s)++instance ToAst (Expr a) where+ toAst (Expr v) = v+ toAst Expr'WrapCtor = error "Unevaluated wrap constructor expression cannot into an AST"+ toAst (Expr'MembersCtor _ _) = error "Unevaluated member constructor expression cannot convert into an AST"++-- Don't export constructor+data Stmt a = Stmt+ { stmts :: [Ast]+ , ret :: a+ } deriving (Show, Eq)++unsafeStmt :: [Ast] -> a -> Stmt a+unsafeStmt = Stmt++instance Functor Stmt where+ fmap f x = x { ret = f (ret x) }++instance Applicative Stmt where+ pure a = Stmt [] a+ (Stmt s0 f) <*> (Stmt s1 x) = Stmt (s0 ++ s1) (f x)++instance Monad Stmt where+ return a = Stmt [] a+ x >>= f = let+ y = f (ret x)+ in Stmt (stmts x ++ stmts y) (ret y)++def :: (HasType a) => Symbol -> Expr a -> Stmt (Expr a)+def symbol expr = Stmt+ { stmts = [Ast'Define $ Ast.Define symbol (toAst expr)]+ , ret = unsafeRef symbol+ }++defn :: Symbol -> Expr (Fn a) -> Stmt (Expr (Fn a))+defn symbol expr = Stmt+ { stmts = [Ast'Define $ Ast.Define symbol (toAst expr)]+ , ret = unsafeRef symbol+ }++defnRec :: Symbol -> (Expr (Fn a) -> Expr (Fn a)) -> Stmt (Expr (Fn a))+defnRec symbol f = Stmt+ { stmts = [Ast'Define $ Ast.Define symbol ast]+ , ret = fn+ }+ where+ fn = unsafeRef symbol+ ast = toAst $ f fn++-- HasType constraint is to prevent unevaluated functions+stmt :: HasType a => Expr a -> Stmt (Expr a)+stmt expr = Stmt [toAst expr] expr++dO :: HasType a => Stmt (Expr a) -> Expr a+dO (Stmt s _) = Expr (Ast'Do $ Ast.Do s)++--++iF :: HasType a => Expr Bool -> Expr a -> Expr a -> Expr a+iF cond t f = Expr (Ast'If $ Ast.If (toAst cond) (toAst t) (toAst f))++iflet :: HasType a => Symbol -> Expr (Maybe a) -> (Expr a -> Expr b) -> Expr b -> Expr b+iflet sym opt s n = Expr $ Ast'Iflet $ Ast.Iflet sym (toAst opt) (toAst $ s (Expr $ Ast'Ref $ Ast.Ref sym)) (toAst n)++--++newtype Path f = Path [T.Text]+ deriving (Show, Eq)++dot :: (HasType a, HasType b, HasType c) => Path (a -> b) -> Path (b -> c) -> Path (a -> c)+dot (Path p1) (Path p2) = Path (p1 ++ p2)++(<.>) :: (HasType a, HasType b, HasType c) => Path (a -> b) -> Path (b -> c) -> Path (a -> c)+(<.>) = dot++unsafePath :: (HasType a, HasType b) => [T.Text] -> Path (a -> b)+unsafePath = Path++get :: (HasType a, HasType b) => Path (a -> b) -> Expr a -> Expr b+get (Path path) expr = Expr $ Ast'Get $ Ast.Get path (toAst expr)++set :: (HasType a, HasType b) => Path (a -> b) -> Expr b -> Expr a -> Expr a+set (Path path) src dest = Expr $ Ast'Set $ Ast.Set path (toAst src) (toAst dest)++--++noT :: Expr Bool -> Expr Bool+noT x = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "not") [toAst x])++eq :: (HasType a) => Expr a -> Expr a -> Expr Bool+eq x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "eq") [toAst x, toAst y])++neq :: (HasType a) => Expr a -> Expr a -> Expr Bool+neq x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "neq") [toAst x, toAst y])++addI8 :: Expr Int8 -> Expr Int8 -> Expr Int8+addI8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addI8") [toAst x, toAst y])++addI16 :: Expr Int16 -> Expr Int16 -> Expr Int16+addI16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addI16") [toAst x, toAst y])++addI32 :: Expr Int32 -> Expr Int32 -> Expr Int32+addI32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addI32") [toAst x, toAst y])++addI64 :: Expr Int64 -> Expr Int64 -> Expr Int64+addI64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addI64") [toAst x, toAst y])++addU8 :: Expr Word8 -> Expr Word8 -> Expr Word8+addU8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addU8") [toAst x, toAst y])++addU16 :: Expr Word16 -> Expr Word16 -> Expr Word16+addU16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addU16") [toAst x, toAst y])++addU32 :: Expr Word32 -> Expr Word32 -> Expr Word32+addU32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addU32") [toAst x, toAst y])++addU64 :: Expr Word64 -> Expr Word64 -> Expr Word64+addU64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "addU64") [toAst x, toAst y])++subI8 :: Expr Int8 -> Expr Int8 -> Expr Int8+subI8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subI8") [toAst x, toAst y])++subI16 :: Expr Int16 -> Expr Int16 -> Expr Int16+subI16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subI16") [toAst x, toAst y])++subI32 :: Expr Int32 -> Expr Int32 -> Expr Int32+subI32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subI32") [toAst x, toAst y])++subI64 :: Expr Int64 -> Expr Int64 -> Expr Int64+subI64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subI64") [toAst x, toAst y])++subU8 :: Expr Word8 -> Expr Word8 -> Expr Word8+subU8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subU8") [toAst x, toAst y])++subU16 :: Expr Word16 -> Expr Word16 -> Expr Word16+subU16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subU16") [toAst x, toAst y])++subU32 :: Expr Word32 -> Expr Word32 -> Expr Word32+subU32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subU32") [toAst x, toAst y])++subU64 :: Expr Word64 -> Expr Word64 -> Expr Word64+subU64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "subU64") [toAst x, toAst y])++mulI8 :: Expr Int8 -> Expr Int8 -> Expr Int8+mulI8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulI8") [toAst x, toAst y])++mulI16 :: Expr Int16 -> Expr Int16 -> Expr Int16+mulI16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulI16") [toAst x, toAst y])++mulI32 :: Expr Int32 -> Expr Int32 -> Expr Int32+mulI32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulI32") [toAst x, toAst y])++mulI64 :: Expr Int64 -> Expr Int64 -> Expr Int64+mulI64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulI64") [toAst x, toAst y])++mulU8 :: Expr Word8 -> Expr Word8 -> Expr Word8+mulU8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulU8") [toAst x, toAst y])++mulU16 :: Expr Word16 -> Expr Word16 -> Expr Word16+mulU16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulU16") [toAst x, toAst y])++mulU32 :: Expr Word32 -> Expr Word32 -> Expr Word32+mulU32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulU32") [toAst x, toAst y])++mulU64 :: Expr Word64 -> Expr Word64 -> Expr Word64+mulU64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "mulU64") [toAst x, toAst y])++divI8 :: Expr Int8 -> Expr Int8 -> Expr Int8+divI8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divI8") [toAst x, toAst y])++divI16 :: Expr Int16 -> Expr Int16 -> Expr Int16+divI16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divI16") [toAst x, toAst y])++divI32 :: Expr Int32 -> Expr Int32 -> Expr Int32+divI32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divI32") [toAst x, toAst y])++divI64 :: Expr Int64 -> Expr Int64 -> Expr Int64+divI64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divI64") [toAst x, toAst y])++divU8 :: Expr Word8 -> Expr Word8 -> Expr Word8+divU8 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divU8") [toAst x, toAst y])++divU16 :: Expr Word16 -> Expr Word16 -> Expr Word16+divU16 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divU16") [toAst x, toAst y])++divU32 :: Expr Word32 -> Expr Word32 -> Expr Word32+divU32 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divU32") [toAst x, toAst y])++divU64 :: Expr Word64 -> Expr Word64 -> Expr Word64+divU64 x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "divU64") [toAst x, toAst y])++concaT :: Expr T.Text -> Expr T.Text -> Expr T.Text+concaT x y = Expr (Ast'FnCall $ Ast.FnCall (Ast'Ref $ Ast.Ref "concat") [toAst x, toAst y])++--++class (HasType a, ToAst a) => ToExpr a where+ ex :: a -> Expr a+ ex = Expr . toAst++--++instance ToExpr ()++instance ToExpr Bool++instance ToExpr T.Text++instance ToExpr Int8++instance ToExpr Int16++instance ToExpr Int32++instance ToExpr Int64++instance ToExpr Word8++instance ToExpr Word16++instance ToExpr Word32++instance ToExpr Word64++instance ToExpr Float++instance ToExpr Double++--++unit :: Expr ()+unit = Expr (toAst ())++bool :: Bool -> Expr Bool+bool = ex++string :: T.Text -> Expr T.Text+string = ex++i8 :: Int8 -> Expr Int8+i8 = ex++i16 :: Int16 -> Expr Int16+i16 = ex++i32 :: Int32 -> Expr Int32+i32 = ex++i64 :: Int64 -> Expr Int64+i64 = ex++u8 :: Word8 -> Expr Word8+u8 = ex++u16 :: Word16 -> Expr Word16+u16 = ex++u32 :: Word32 -> Expr Word32+u32 = ex++u64 :: Word64 -> Expr Word64+u64 = ex++f32 :: Float -> Expr Float+f32 = ex++f64 :: Double -> Expr Double+f64 = ex++--++instance ToExpr a => ToExpr [a]++instance ToExpr a => ToExpr (Maybe a)++instance (ToExpr a, ToExpr b) => ToExpr (Either a b)++--++list :: (HasType a) => [Expr a] -> Expr [a]+list = Expr . Ast'List . Ast.List . map toAst++option :: (HasType a) => Maybe (Expr a) -> Expr (Maybe a)+option = \case+ Nothing -> Expr (Ast'Const Const'Null)+ Just expr -> Expr (toAst expr)++eitheR :: (HasType a, HasType b) => Either (Expr a) (Expr b) -> Expr (Either a b)+eitheR = \case+ Left expr -> Expr $ Ast'Enumeral $ Ast.Enumeral "Left" $ Just $ Map.fromList [("left", toAst expr)]+ Right expr -> Expr $ Ast'Enumeral $ Ast.Enumeral "Right" $ Just $ Map.fromList [("right", toAst expr)]++tuple2+ :: (HasType t1, HasType t2)+ => Expr t1 -> Expr t2+ -> Expr (t1, t2)+tuple2 t1 t2 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2]++tuple2'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2)+ => (t1, t2)+ -> Expr (t1, t2)+tuple2' t = Expr (toAst t)++tuple3+ :: (HasType t1, HasType t2, HasType t3)+ => Expr t1 -> Expr t2 -> Expr t3+ -> Expr (t1, t2, t3)+tuple3 t1 t2 t3 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3]++tuple3'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3)+ => (t1, t2, t3)+ -> Expr (t1, t2, t3)+tuple3' t = Expr (toAst t)++tuple4+ :: (HasType t1, HasType t2, HasType t3, HasType t4)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4+ -> Expr (t1, t2, t3, t4)+tuple4 t1 t2 t3 t4 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4]++tuple4'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4)+ => (t1, t2, t3, t4)+ -> Expr (t1, t2, t3, t4)+tuple4' t = Expr (toAst t)++tuple5+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5+ -> Expr (t1, t2, t3, t4, t5)+tuple5 t1 t2 t3 t4 t5 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5]++tuple5'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5)+ => (t1, t2, t3, t4, t5)+ -> Expr (t1, t2, t3, t4, t5)+tuple5' t = Expr (toAst t)++tuple6+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6+ -> Expr (t1, t2, t3, t4, t5, t6)+tuple6 t1 t2 t3 t4 t5 t6 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6]++tuple6'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6)+ => (t1, t2, t3, t4, t5, t6)+ -> Expr (t1, t2, t3, t4, t5, t6)+tuple6' t = Expr (toAst t)++tuple7+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7+ -> Expr (t1, t2, t3, t4, t5, t6, t7)+tuple7 t1 t2 t3 t4 t5 t6 t7 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7]++tuple7'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7)+ => (t1, t2, t3, t4, t5, t6, t7)+ -> Expr (t1, t2, t3, t4, t5, t6, t7)+tuple7' t = Expr (toAst t)++tuple8+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8)+tuple8 t1 t2 t3 t4 t5 t6 t7 t8 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8]++tuple8'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8)+ => (t1, t2, t3, t4, t5, t6, t7, t8)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8)+tuple8' t = Expr (toAst t)++tuple9+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9)+tuple9 t1 t2 t3 t4 t5 t6 t7 t8 t9 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9]++tuple9'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9)+tuple9' t = Expr (toAst t)++tuple10+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)+tuple10 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10]++tuple10'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)+tuple10' t = Expr (toAst t)++tuple11+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)+tuple11 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11]++tuple11'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)+tuple11' t = Expr (toAst t)++tuple12+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)+tuple12 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12]++tuple12'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)+tuple12' t = Expr (toAst t)++tuple13+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)+tuple13 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13]++tuple13'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)+tuple13' t = Expr (toAst t)++tuple14+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)+tuple14 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14]++tuple14'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)+tuple14' t = Expr (toAst t)++tuple15+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)+tuple15 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15]++tuple15'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)+tuple15' t = Expr (toAst t)++tuple16+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)+tuple16 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16]++tuple16'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)+tuple16' t = Expr (toAst t)++tuple17+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)+tuple17 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17]++tuple17'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)+tuple17' t = Expr (toAst t)++tuple18+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18)+tuple18 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18]++tuple18'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18)+tuple18' t = Expr (toAst t)++tuple19+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)+tuple19 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19]++tuple19'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)+tuple19' t = Expr (toAst t)++tuple20+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20)+tuple20 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20]++tuple20'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20)+tuple20' t = Expr (toAst t)++tuple21+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21)+tuple21 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21]++tuple21'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21)+tuple21' t = Expr (toAst t)++tuple22+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22)+tuple22 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22]++tuple22'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22)+tuple22' t = Expr (toAst t)++tuple23+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23)+tuple23 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23]++tuple23'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23)+tuple23' t = Expr (toAst t)++tuple24+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24)+tuple24 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24]++tuple24'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24)+tuple24' t = Expr (toAst t)++tuple25+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25)+tuple25 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25]++tuple25'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25)+tuple25' t = Expr (toAst t)++tuple26+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26)+tuple26 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26]++tuple26'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26)+tuple26' t = Expr (toAst t)++tuple27+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27)+tuple27 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27]++tuple27'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27)+tuple27' t = Expr (toAst t)++tuple28+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28)+tuple28 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28]++tuple28'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28)+tuple28' t = Expr (toAst t)++tuple29+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29)+tuple29 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29]++tuple29'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29)+tuple29' t = Expr (toAst t)++tuple30+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30)+tuple30 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30]++tuple30'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30)+tuple30' t = Expr (toAst t)++tuple31+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30 -> Expr t31+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31)+tuple31 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31]++tuple31'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30, HasType t31, ToAst t31)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31)+tuple31' t = Expr (toAst t)++tuple32+ :: (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31, HasType t32)+ => Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30 -> Expr t31 -> Expr t32+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32)+tuple32 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 = Expr $ Ast'Tuple $ Ast.Tuple [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31, toAst t32]++tuple32'+ :: (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30, HasType t31, ToAst t31, HasType t32, ToAst t32)+ => (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32)+ -> Expr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32)+tuple32' t = Expr (toAst t)++instance (ToExpr t1, ToExpr t2) => ToExpr (t1, t2)++instance (ToExpr t1, ToExpr t2, ToExpr t3) => ToExpr (t1, t2, t3)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4) => ToExpr (t1, t2, t3, t4)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5) => ToExpr (t1, t2, t3, t4, t5)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6) => ToExpr (t1, t2, t3, t4, t5, t6)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7) => ToExpr (t1, t2, t3, t4, t5, t6, t7)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27, ToExpr t28) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27, ToExpr t28, ToExpr t29) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27, ToExpr t28, ToExpr t29, ToExpr t30) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27, ToExpr t28, ToExpr t29, ToExpr t30, ToExpr t31) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31)++instance (ToExpr t1, ToExpr t2, ToExpr t3, ToExpr t4, ToExpr t5, ToExpr t6, ToExpr t7, ToExpr t8, ToExpr t9, ToExpr t10, ToExpr t11, ToExpr t12, ToExpr t13, ToExpr t14, ToExpr t15, ToExpr t16, ToExpr t17, ToExpr t18, ToExpr t19, ToExpr t20, ToExpr t21, ToExpr t22, ToExpr t23, ToExpr t24, ToExpr t25, ToExpr t26, ToExpr t27, ToExpr t28, ToExpr t29, ToExpr t30, ToExpr t31, ToExpr t32) => ToExpr (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32)++{-++var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var tuple = n => {+ if (n < 2) {+ return '';+ }++ var l = [+ 'tuple', n, '\n',+ ' :: (HasType t1',+ ];+ for (var i = 1; i < n; i++) {+ l = l.concat([', HasType t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat([' => Expr t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([' -> Expr t', i + 1]);+ }+ l = l.concat(['\n']);++ l = l.concat([' -> Expr (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat(['tuple', n]);+ for (var i = 0; i < n; i++) {+ l = l.concat([' t', i + 1]);+ }+ l = l.concat([' = Expr $ Ast\'Tuple $ Ast.Tuple [toAst t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', toAst t', i + 1]);+ }+ l = l.concat([']\n\n']);++ return l.join('');+};++var tuplePure = n => {+ if (n < 2) {+ return '';+ }++ var l = [+ 'tuple', n, '\'\n',+ ' :: (HasType t1, ToAst t1',+ ];+ for (var i = 1; i < n; i++) {+ l = l.concat([', HasType t', i + 1, ', ToAst t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat([' => (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat([' -> Expr (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat(['tuple', n, '\' t = Expr (toAst t)\n\n']);++ return l.join('');+};++var tupleToExpr = n => {+ if (n < 2) {+ return '';+ }++ var l = [+ 'instance (ToExpr t1',+ ];+ for (var i = 1; i < n; i++) {+ l = l.concat([', ToExpr t', i + 1]);+ }+ l = l.concat([') =>']);++ l = l.concat([' ToExpr (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([')\n\n']);+ return l.join('');+};++-}++--++class ToArgs a where+ toArgs :: a -> [Ast]++instance ToArgs () where+ toArgs _ = []++instance (ToAst a, HasType a) => ToArgs (Expr a) where+ toArgs x = [toAst x]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2) => ToArgs (t1, t2) where+ toArgs (t1, t2) = [toAst t1, toAst t2]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3) => ToArgs (t1, t2, t3) where+ toArgs (t1, t2, t3) = [toAst t1, toAst t2, toAst t3]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4) => ToArgs (t1, t2, t3, t4) where+ toArgs (t1, t2, t3, t4) = [toAst t1, toAst t2, toAst t3, toAst t4]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5) => ToArgs (t1, t2, t3, t4, t5) where+ toArgs (t1, t2, t3, t4, t5) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6) => ToArgs (t1, t2, t3, t4, t5, t6) where+ toArgs (t1, t2, t3, t4, t5, t6) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7) => ToArgs (t1, t2, t3, t4, t5, t6, t7) where+ toArgs (t1, t2, t3, t4, t5, t6, t7) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30, HasType t31, ToAst t31) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31]++instance (HasType t1, ToAst t1, HasType t2, ToAst t2, HasType t3, ToAst t3, HasType t4, ToAst t4, HasType t5, ToAst t5, HasType t6, ToAst t6, HasType t7, ToAst t7, HasType t8, ToAst t8, HasType t9, ToAst t9, HasType t10, ToAst t10, HasType t11, ToAst t11, HasType t12, ToAst t12, HasType t13, ToAst t13, HasType t14, ToAst t14, HasType t15, ToAst t15, HasType t16, ToAst t16, HasType t17, ToAst t17, HasType t18, ToAst t18, HasType t19, ToAst t19, HasType t20, ToAst t20, HasType t21, ToAst t21, HasType t22, ToAst t22, HasType t23, ToAst t23, HasType t24, ToAst t24, HasType t25, ToAst t25, HasType t26, ToAst t26, HasType t27, ToAst t27, HasType t28, ToAst t28, HasType t29, ToAst t29, HasType t30, ToAst t30, HasType t31, ToAst t31, HasType t32, ToAst t32) => ToArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where+ toArgs (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) = [toAst t1, toAst t2, toAst t3, toAst t4, toAst t5, toAst t6, toAst t7, toAst t8, toAst t9, toAst t10, toAst t11, toAst t12, toAst t13, toAst t14, toAst t15, toAst t16, toAst t17, toAst t18, toAst t19, toAst t20, toAst t21, toAst t22, toAst t23, toAst t24, toAst t25, toAst t26, toAst t27, toAst t28, toAst t29, toAst t30, toAst t31, toAst t32]++{-+var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var toArgs = n => {+ if (n < 2) {+ return '';+ }++ var l = ['instance (HasType t1, ToAst t1'];+ for (var i = 1; i < n; i++) {+ l = l.concat([', HasType t', i + 1, ', ToAst t', i + 1])+ }+ l = l.concat([') => ToArgs (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1])+ }+ l = l.concat([') where\n']);++ l = l.concat([' toArgs (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') = [toAst t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', toAst t', i + 1]);+ }+ l = l.concat([']\n\n']);++ return l.join('');+};+-}++data Fn a++call :: ToArgs args => Expr (Fn (args -> a)) -> args -> Expr a+call (Expr f) args = Expr $ Ast'FnCall $ Ast.FnCall f (toArgs args)+call Expr'WrapCtor _ = error "Unevalated wrap contructor expression cannot be called"+call (Expr'MembersCtor _ _) _ = error "Unevalated member contructor expression cannot be called"++(-<) :: ToArgs args => Expr (Fn (args -> a)) -> args -> Expr a+f -< x = call f x++mapLeft :: Expr (Fn ((Expr (Fn (Expr a -> b)), Expr (Either a c)) -> Either b c))+mapLeft = Expr (Ast'Ref $ Ast.Ref "mapLeft")++mapRight :: Expr (Fn ((Expr (Fn (Expr a -> b)), Expr (Either c a)) -> Either c b))+mapRight = Expr (Ast'Ref $ Ast.Ref "mapLeft")++mapOption :: Expr (Fn ((Expr (Fn (Expr a -> b)), Expr (Maybe a)) -> Maybe b))+mapOption = Expr (Ast'Ref $ Ast.Ref "mapOption")++mapList :: Expr (Fn ((Expr (Fn (Expr a -> b)), Expr [a]) -> [b]))+mapList = Expr (Ast'Ref $ Ast.Ref "mapList")++filterList :: Expr (Fn ((Expr (Fn (Expr a -> Bool)), Expr [a]) -> [a]))+filterList = Expr (Ast'Ref $ Ast.Ref "filterList")++reduceList :: Expr (Fn ((Expr (Fn ((Expr b, Expr a) -> b)), Expr b, Expr [a]) -> b))+reduceList = Expr (Ast'Ref $ Ast.Ref "reduceList")++instance (HasType t1, HasType t2) => HasType (Fn (Expr t1 -> t2)) where+ getType f = (getType (p1 f)) { o = Just $ (getType (p2 f)) }+ where+ p1 :: Proxy (Fn (Expr t1 -> t2)) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (Fn (Expr t1 -> t2)) -> Proxy t2+ p2 _ = Proxy++instance (HasType t1, HasType t2, HasType t3) => HasType (Fn ((Expr t1, Expr t2) -> t3)) where+ getType f = (getType (p1 f)) { o = Just $ (getType (p2 f)) { o = Just $ (getType (p3 f)) } }+ where+ p1 :: Proxy (Fn ((Expr t1, Expr t2) -> t3)) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (Fn ((Expr t1, Expr t2) -> t3)) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (Fn ((Expr t1, Expr t2) -> t3)) -> Proxy t3+ p3 _ = Proxy++fn0+ :: (HasType a, ToAst a)+ => Expr a+ -> Expr (Fn (() -> a))+fn0 f = Expr $ Ast'Lambda $ Ast.Lambda+ []+ (toAst f)++fn1+ :: (HasType a, HasType t1)+ => Symbol+ -> (Expr t1 -> Expr a)+ -> Expr (Fn ((Expr t1) -> a))+fn1 s1 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f))]+ (toAst $ f (unsafeRef s1))+ where+ p1 :: (t1 -> a) -> Proxy t1+ p1 _ = Proxy++fn2+ :: (HasType a, HasType t1, HasType t2)+ => Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2) -> a))+fn2 s1 s2 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2))+ where+ p1 :: (t1 -> t2 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> a) -> Proxy t2+ p2 _ = Proxy++fn3+ :: (HasType a, HasType t1, HasType t2, HasType t3)+ => Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3) -> a))+fn3 s1 s2 s3 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3))+ where+ p1 :: (t1 -> t2 -> t3 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> a) -> Proxy t3+ p3 _ = Proxy++fn4+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4)+ => Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4) -> a))+fn4 s1 s2 s3 s4 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> a) -> Proxy t4+ p4 _ = Proxy++fn5+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5) -> a))+fn5 s1 s2 s3 s4 s5 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> a) -> Proxy t5+ p5 _ = Proxy++fn6+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6) -> a))+fn6 s1 s2 s3 s4 s5 s6 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> a) -> Proxy t6+ p6 _ = Proxy++fn7+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7) -> a))+fn7 s1 s2 s3 s4 s5 s6 s7 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> a) -> Proxy t7+ p7 _ = Proxy++fn8+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8) -> a))+fn8 s1 s2 s3 s4 s5 s6 s7 s8 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> a) -> Proxy t8+ p8 _ = Proxy++fn9+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9) -> a))+fn9 s1 s2 s3 s4 s5 s6 s7 s8 s9 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> a) -> Proxy t9+ p9 _ = Proxy++fn10+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10) -> a))+fn10 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> a) -> Proxy t10+ p10 _ = Proxy++fn11+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11) -> a))+fn11 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> a) -> Proxy t11+ p11 _ = Proxy++fn12+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12) -> a))+fn12 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> a) -> Proxy t12+ p12 _ = Proxy++fn13+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13) -> a))+fn13 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> a) -> Proxy t13+ p13 _ = Proxy++fn14+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14) -> a))+fn14 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> a) -> Proxy t14+ p14 _ = Proxy++fn15+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15) -> a))+fn15 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> a) -> Proxy t15+ p15 _ = Proxy++fn16+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16) -> a))+fn16 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> a) -> Proxy t16+ p16 _ = Proxy++fn17+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17) -> a))+fn17 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> a) -> Proxy t17+ p17 _ = Proxy++fn18+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18) -> a))+fn18 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> a) -> Proxy t18+ p18 _ = Proxy++fn19+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19) -> a))+fn19 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> a) -> Proxy t19+ p19 _ = Proxy++fn20+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20) -> a))+fn20 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> a) -> Proxy t20+ p20 _ = Proxy++fn21+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21) -> a))+fn21 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> a) -> Proxy t21+ p21 _ = Proxy++fn22+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22) -> a))+fn22 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> a) -> Proxy t22+ p22 _ = Proxy++fn23+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23) -> a))+fn23 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> a) -> Proxy t23+ p23 _ = Proxy++fn24+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24) -> a))+fn24 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> a) -> Proxy t24+ p24 _ = Proxy++fn25+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25) -> a))+fn25 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> a) -> Proxy t25+ p25 _ = Proxy++fn26+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26) -> a))+fn26 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> a) -> Proxy t26+ p26 _ = Proxy++fn27+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27) -> a))+fn27 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> a) -> Proxy t27+ p27 _ = Proxy++fn28+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27, Expr t28) -> a))+fn28 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f)), (s28, getType (p28 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27) (unsafeRef s28))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t27+ p27 _ = Proxy+ p28 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> a) -> Proxy t28+ p28 _ = Proxy++fn29+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27, Expr t28, Expr t29) -> a))+fn29 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f)), (s28, getType (p28 f)), (s29, getType (p29 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27) (unsafeRef s28) (unsafeRef s29))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t27+ p27 _ = Proxy+ p28 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t28+ p28 _ = Proxy+ p29 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> a) -> Proxy t29+ p29 _ = Proxy++fn30+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27, Expr t28, Expr t29, Expr t30) -> a))+fn30 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f)), (s28, getType (p28 f)), (s29, getType (p29 f)), (s30, getType (p30 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27) (unsafeRef s28) (unsafeRef s29) (unsafeRef s30))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t27+ p27 _ = Proxy+ p28 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t28+ p28 _ = Proxy+ p29 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t29+ p29 _ = Proxy+ p30 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> a) -> Proxy t30+ p30 _ = Proxy++fn31+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30 -> Expr t31 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27, Expr t28, Expr t29, Expr t30, Expr t31) -> a))+fn31 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f)), (s28, getType (p28 f)), (s29, getType (p29 f)), (s30, getType (p30 f)), (s31, getType (p31 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27) (unsafeRef s28) (unsafeRef s29) (unsafeRef s30) (unsafeRef s31))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t27+ p27 _ = Proxy+ p28 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t28+ p28 _ = Proxy+ p29 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t29+ p29 _ = Proxy+ p30 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t30+ p30 _ = Proxy+ p31 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> a) -> Proxy t31+ p31 _ = Proxy++fn32+ :: (HasType a, HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31, HasType t32)+ => Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Symbol+ -> (Expr t1 -> Expr t2 -> Expr t3 -> Expr t4 -> Expr t5 -> Expr t6 -> Expr t7 -> Expr t8 -> Expr t9 -> Expr t10 -> Expr t11 -> Expr t12 -> Expr t13 -> Expr t14 -> Expr t15 -> Expr t16 -> Expr t17 -> Expr t18 -> Expr t19 -> Expr t20 -> Expr t21 -> Expr t22 -> Expr t23 -> Expr t24 -> Expr t25 -> Expr t26 -> Expr t27 -> Expr t28 -> Expr t29 -> Expr t30 -> Expr t31 -> Expr t32 -> Expr a)+ -> Expr (Fn ((Expr t1, Expr t2, Expr t3, Expr t4, Expr t5, Expr t6, Expr t7, Expr t8, Expr t9, Expr t10, Expr t11, Expr t12, Expr t13, Expr t14, Expr t15, Expr t16, Expr t17, Expr t18, Expr t19, Expr t20, Expr t21, Expr t22, Expr t23, Expr t24, Expr t25, Expr t26, Expr t27, Expr t28, Expr t29, Expr t30, Expr t31, Expr t32) -> a))+fn32 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 s32 f = Expr $ Ast'Lambda $ Ast.Lambda+ [(s1, getType (p1 f)), (s2, getType (p2 f)), (s3, getType (p3 f)), (s4, getType (p4 f)), (s5, getType (p5 f)), (s6, getType (p6 f)), (s7, getType (p7 f)), (s8, getType (p8 f)), (s9, getType (p9 f)), (s10, getType (p10 f)), (s11, getType (p11 f)), (s12, getType (p12 f)), (s13, getType (p13 f)), (s14, getType (p14 f)), (s15, getType (p15 f)), (s16, getType (p16 f)), (s17, getType (p17 f)), (s18, getType (p18 f)), (s19, getType (p19 f)), (s20, getType (p20 f)), (s21, getType (p21 f)), (s22, getType (p22 f)), (s23, getType (p23 f)), (s24, getType (p24 f)), (s25, getType (p25 f)), (s26, getType (p26 f)), (s27, getType (p27 f)), (s28, getType (p28 f)), (s29, getType (p29 f)), (s30, getType (p30 f)), (s31, getType (p31 f)), (s32, getType (p32 f))]+ (toAst $ f (unsafeRef s1) (unsafeRef s2) (unsafeRef s3) (unsafeRef s4) (unsafeRef s5) (unsafeRef s6) (unsafeRef s7) (unsafeRef s8) (unsafeRef s9) (unsafeRef s10) (unsafeRef s11) (unsafeRef s12) (unsafeRef s13) (unsafeRef s14) (unsafeRef s15) (unsafeRef s16) (unsafeRef s17) (unsafeRef s18) (unsafeRef s19) (unsafeRef s20) (unsafeRef s21) (unsafeRef s22) (unsafeRef s23) (unsafeRef s24) (unsafeRef s25) (unsafeRef s26) (unsafeRef s27) (unsafeRef s28) (unsafeRef s29) (unsafeRef s30) (unsafeRef s31) (unsafeRef s32))+ where+ p1 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t1+ p1 _ = Proxy+ p2 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t2+ p2 _ = Proxy+ p3 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t3+ p3 _ = Proxy+ p4 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t4+ p4 _ = Proxy+ p5 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t5+ p5 _ = Proxy+ p6 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t6+ p6 _ = Proxy+ p7 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t7+ p7 _ = Proxy+ p8 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t8+ p8 _ = Proxy+ p9 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t9+ p9 _ = Proxy+ p10 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t10+ p10 _ = Proxy+ p11 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t11+ p11 _ = Proxy+ p12 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t12+ p12 _ = Proxy+ p13 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t13+ p13 _ = Proxy+ p14 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t14+ p14 _ = Proxy+ p15 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t15+ p15 _ = Proxy+ p16 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t16+ p16 _ = Proxy+ p17 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t17+ p17 _ = Proxy+ p18 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t18+ p18 _ = Proxy+ p19 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t19+ p19 _ = Proxy+ p20 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t20+ p20 _ = Proxy+ p21 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t21+ p21 _ = Proxy+ p22 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t22+ p22 _ = Proxy+ p23 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t23+ p23 _ = Proxy+ p24 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t24+ p24 _ = Proxy+ p25 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t25+ p25 _ = Proxy+ p26 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t26+ p26 _ = Proxy+ p27 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t27+ p27 _ = Proxy+ p28 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t28+ p28 _ = Proxy+ p29 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t29+ p29 _ = Proxy+ p30 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t30+ p30 _ = Proxy+ p31 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t31+ p31 _ = Proxy+ p32 :: (t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> t19 -> t20 -> t21 -> t22 -> t23 -> t24 -> t25 -> t26 -> t27 -> t28 -> t29 -> t30 -> t31 -> t32 -> a) -> Proxy t32+ p32 _ = Proxy++{-+var tuples = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var fn = n => {+ if (n < 1) {+ return '';+ }+ var l = ['fn', n, '\n'];++ l = l.concat([' :: (HasType a, HasType t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', HasType t', i + 1]);+ }+ l = l.concat([')\n']);++ l = l.concat([' => Symbol']);+ for (var i = 1; i < n; i++) {+ l = l.concat([' -> Symbol']);+ }+ l = l.concat(['\n']);++ l = l.concat([' -> (Expr t1'])+ for (var i = 1; i < n; i++) {+ l = l.concat([' -> Expr t', i + 1]);+ }+ l = l.concat([' -> Expr a)\n']);++ l = l.concat([' -> Expr (Fn ((Expr t1'])+ for (var i = 1; i < n; i++) {+ l = l.concat([', Expr t', i + 1]);+ }+ l = l.concat([') -> a))\n']);++ l = l.concat(['fn', n]);+ for (var i = 0; i < n; i++) {+ l = l.concat([' s', i + 1]);+ }+ l = l.concat([' f = Expr $ Ast\'Lambda $ Ast.Lambda\n'])++ l = l.concat([' [(s1, getType (p1 f))']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', (s', i + 1, ', getType (p', i + 1,' f))']);+ }+ l = l.concat([']\n']);++ l = l.concat([' (toAst $ f']);+ for (var i = 0; i < n; i++) {+ l = l.concat([' (unsafeRef s', i + 1, ')']);+ }+ l = l.concat([')\n']);++ l = l.concat([' where\n']);+ var f = ['(t1'];+ for (var i = 1; i < n; i++) {+ f = f.concat([' -> t', i + 1]);+ }+ f = f.concat([' -> a)']).join('');+ for (var i = 0; i < n; i++) {+ l = l.concat([+ ' p', i + 1, ' :: ', f, ' -> Proxy t', i + 1, '\n',+ ' p', i + 1, ' _ = Proxy\n',+ ]);+ }+ l = l.concat(['\n']);++ return l.join('');+};+-}
+ library/Fluid/Endpoint.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DataKinds #-}+module Fluid.Endpoint+ ( runFluid+ , runFluidSingleton+ ) where++import qualified Data.Map as Map+import qualified Data.HashMap.Lazy as HML+import Control.Monad.IO.Class (MonadIO(..))+import Control.Monad.Except+import Control.Concurrent.Async.Lifted ()+import Data.Aeson+import Data.Aeson.Types (parseMaybe)+import Data.Text (Text)+import Data.Map (Map)++import Fluid.Types+import Fluid.Server.Exchange+import Fluid.RuntimeThrower++runFluidSingleton+ :: MonadIO m+ => Version+ -> (Request -> m (Either Response Response))+ -> Value+ -> m Value+runFluidSingleton Version{major,minor} handleRequest = runFluid (Map.singleton major (minor, handleRequest))++runFluid+ :: MonadIO m+ => Map Major (Minor, Request -> m (Either Response Response))+ -> Value+ -> m Value+runFluid handleRequestMap v = do+ e <- runExceptT $ do+ fluidVersion <- getFluidVersion v+ assertFluidVersionCompatiability fluidVersion+ apiVersion <- getApiVersion v+ let apiMajor = major apiVersion+ case Map.lookup apiMajor handleRequestMap of+ Nothing -> case leastAndGreatest (Map.keys handleRequestMap) of+ Nothing -> runtimeThrow RuntimeError'NoImplementation+ Just (minMajor, maxMajor) ->+ if minMajor > apiMajor+ then runtimeThrow RuntimeError'ApiMajorVersionTooLow+ else if maxMajor < apiMajor+ then runtimeThrow RuntimeError'ApiMajorVersionTooHigh+ else runtimeThrow RuntimeError'NoImplementation+ Just (maxMinor, handleRequest) -> if minor apiVersion > maxMinor+ then runtimeThrow RuntimeError'ApiMinorVersionTooHigh+ else case parseRequest v of+ Nothing -> runtimeThrow RuntimeError'UnparsableFormat+ Just req -> toJSON <$> ExceptT (handleRequest req)+ return $ either toJSON id e++leastAndGreatest :: Ord a => [a] -> Maybe (a,a)+leastAndGreatest [] = Nothing+leastAndGreatest xs = Just (minimum xs, maximum xs)++assertFluidVersionCompatiability :: RuntimeThrower m => Version -> m ()+assertFluidVersionCompatiability Version{major,minor}+ | major > mustMajor = runtimeThrow RuntimeError'FluidMajorVersionTooHigh+ | major < mustMajor = runtimeThrow RuntimeError'FluidMajorVersionTooLow+ | minor > maxMinor = runtimeThrow RuntimeError'FluidMinorVersionTooHigh+ | otherwise = return ()+ where+ mustMajor = 0+ maxMinor = 0++getApiVersion :: RuntimeThrower m => Value -> m Version+getApiVersion = getVersion "version" RuntimeError'NoApiVersion++getFluidVersion :: RuntimeThrower m => Value -> m Version+getFluidVersion = getVersion "fluid" RuntimeError'NoFluidVersion++getVersion :: RuntimeThrower m => Text -> RuntimeError -> Value -> m Version+getVersion name err (Object o) = case HML.lookup name o of+ Just x -> maybe (runtimeThrow err) return (parseMaybe parseJSON x)+ Nothing -> runtimeThrow err+getVersion _ err _ = runtimeThrow err++parseRequest :: Value -> Maybe Request+parseRequest = parseMaybe parseJSON
+ library/Fluid/Imports.hs view
@@ -0,0 +1,17 @@+module Fluid.Imports+ ( module Data.Map+ , module Control.Monad.IO.Class+ , module Data.Aeson+ , module Data.Text+ , module Data.Text.Conversions+ , module Data.ByteString.Lazy.Char8+ , module Control.Exception.Safe+ ) where++import Data.Map (Map, fromList, toList, empty, size)+import Control.Monad.IO.Class (MonadIO(..))+import Data.Aeson (ToJSON(..), FromJSON(..), object, (.=), (.:), Value(..), decode)+import Data.ByteString.Lazy.Char8 (ByteString)+import Data.Text (Text)+import Data.Text.Conversions (ToText(..), FromText(..))+import Control.Exception.Safe (MonadThrow, MonadCatch, catch)
+ library/Fluid/Prim.hs view
@@ -0,0 +1,38 @@+module Fluid.Prim+ ( Prim(..)+ ) where++import Data.Aeson+import Data.Word+import Data.Int+import Data.Text (Text)++data Prim+ = Prim'Bool Bool+ | Prim'I8 Int8+ | Prim'I16 Int16+ | Prim'I32 Int32+ | Prim'I64 Int64+ | Prim'U8 Word8+ | Prim'U16 Word16+ | Prim'U32 Word32+ | Prim'U64 Word64+ | Prim'F32 Float+ | Prim'F64 Double+ | Prim'String Text+ deriving (Show, Eq)++instance ToJSON Prim where+ toJSON = \case+ Prim'Bool b -> toJSON b+ Prim'I8 i -> toJSON i+ Prim'I16 i -> toJSON i+ Prim'I32 i -> toJSON i+ Prim'I64 i -> toJSON i+ Prim'U8 u -> toJSON u+ Prim'U16 u -> toJSON u+ Prim'U32 u -> toJSON u+ Prim'U64 u -> toJSON u+ Prim'F32 f -> toJSON f+ Prim'F64 f -> toJSON f+ Prim'String s -> toJSON s
+ library/Fluid/RuntimeThrower.hs view
@@ -0,0 +1,17 @@+module Fluid.RuntimeThrower+ ( RuntimeThrower(..)+ ) where++import Control.Monad.Except++import qualified Fluid.Server.Exchange as Server+import Fluid.Types++class Monad m => RuntimeThrower m where+ runtimeThrow :: RuntimeError -> m a++instance RuntimeThrower IO where+ runtimeThrow err = error $ "Runtime error - " ++ show err++instance Monad m => RuntimeThrower (ExceptT Server.Response m) where+ runtimeThrow = throwError . Server.Response'Error . Server.ResponseError'Runtime
+ library/Fluid/Server.hs view
@@ -0,0 +1,17 @@+module Fluid.Server+ ( module Fluid.Types+ , module Fluid.Val+ , module Fluid.Server.Expr+ , module Fluid.Server.Exchange+ , module Fluid.RuntimeThrower+ , module Fluid.ServiceThrower+ , module Control.Exception.Safe+ ) where++import Fluid.Val (ToVal(..), FromVal(..), getMember, fromValFromJson, combineObjects)+import Fluid.Types+import Fluid.Server.Expr+import Fluid.Server.Exchange+import Fluid.RuntimeThrower+import Fluid.ServiceThrower+import Control.Exception.Safe (MonadThrow, MonadCatch)
+ library/Fluid/Server/Exchange.hs view
@@ -0,0 +1,43 @@+module Fluid.Server.Exchange+ ( Request(..)+ , Response(..)+ , ResponseError(..)+ ) where++import Control.Monad (mzero)+import Data.Aeson (Value(..), FromJSON(..), ToJSON(..), object, (.=), (.:))++import Fluid.Types (RuntimeError, Limits)++data Request = Request+ { meta :: Value+ , query :: Value+ } deriving (Show, Eq)++instance FromJSON Request where+ parseJSON (Object o) = Request+ <$> o .: "meta"+ <*> o .: "query"+ parseJSON _ = mzero++instance ToJSON Request where+ toJSON Request{meta,query} = object [ "meta" .= meta, "query" .= query ]++data ResponseError+ = ResponseError'Service Value+ | ResponseError'Runtime RuntimeError+ deriving (Eq, Show)++instance ToJSON ResponseError where+ toJSON = \case+ ResponseError'Service m -> object [ "tag" .= String "Service", "service" .= m ]+ ResponseError'Runtime m -> object [ "tag" .= String "Runtime", "runtime" .= m ]++data Response+ = Response'Error ResponseError+ | Response'Success Value Limits+ deriving (Show, Eq)++instance ToJSON Response where+ toJSON (Response'Error m) = object [ "tag" .= String "Error", "error" .= m ]+ toJSON (Response'Success m limits) = object [ "tag" .= String "Success", "success" .= m, "limits" .= limits ]
+ library/Fluid/Server/Expr.hs view
@@ -0,0 +1,1218 @@+module Fluid.Server.Expr+ ( Expr(..)+ , EvalConfig(..)+ --+ , Ref(..)+ , UnVal(..)+ , UnEnumeral(..)+ , UnWrap(..)+ , UnStruct(..)+ , If(..)+ , Iflet(..)+ , Get(..)+ , Define(..)+ , Match(..)+ , MatchCase(..)+ , Lambda(..)+ , Fn(..)+ , List(..)+ , Do(..)+ , FnCall(..)+ , ApiUnCall(..)+ , HollowUnCall(..)+ , WrapUnCall(..)+ , StructUnCall(..)+ , EnumerationUnCall(..)+ , Val(..)+ , ApiVal(..)+ , Wrap(..)+ , Struct(..)+ , Enumeral(..)+ , ApiCall(..)+ --+ , jsonToExpr+ , apiCallName+ , fromAst+ --+ , ApiParser(..)+ , parseApiCall+ --+ , eval+ , forceVal+ , runEval+ , emptyEnv+ ) where++import qualified Data.Map as Map+import Control.Monad (when, join, filterM)+import Control.Monad.IO.Class (MonadIO(..))+import Control.Monad.Reader (MonadReader(..), ReaderT(..), asks, lift)+import Data.Map (Map)+import Data.Foldable (foldlM)+import Data.Int+import Data.Word+import Data.Aeson (parseJSON, Value)+import Data.Aeson.Types (parseMaybe)+import Data.IORef (IORef, readIORef, newIORef, writeIORef)+import Data.Scientific (toBoundedInteger, toBoundedRealFloat, Scientific)+import Data.Text (Text)++import qualified Fluid.Ast as Ast+import Fluid.Types+import Fluid.Ast (Ast(..))+import Fluid.Val+import Fluid.Prim+import Fluid.RuntimeThrower++data EvalConfig m = EvalConfig+ { limits :: Limits+ , langServiceCallCount :: IORef Int+ , langLambdaCount :: IORef Int+ , langExprCount :: IORef Int+ , apiCall :: ApiCall -> m Val+ }++jsonToExpr :: (Monad m) => Value -> Maybe (Expr m)+jsonToExpr = fmap fromAst . parseMaybe parseJSON++newtype Eval m a = Eval (ReaderT (EvalConfig m) m a)+ deriving (Functor, Applicative, Monad, MonadReader (EvalConfig m), MonadIO)++instance RuntimeThrower m => RuntimeThrower (Eval m) where+ runtimeThrow err = Eval (lift $ runtimeThrow err)++tick :: (MonadIO m, RuntimeThrower m) => (Limits -> Maybe Int) -> (EvalConfig m -> IORef Int) -> (Int -> RuntimeError) -> Eval m ()+tick getLimit langCount err = do+ limit' <- getLimit <$> asks limits+ case limit' of+ Nothing -> return ()+ Just limit -> do+ ref <- asks langCount+ count <- liftIO $ readIORef ref+ if count == limit+ then runtimeThrow (err count)+ else liftIO $ writeIORef ref (count + 1)++tickServiceCall :: (MonadIO m, RuntimeThrower m) => Eval m ()+tickServiceCall = tick serviceCalls langServiceCallCount RuntimeError'LangServiceCallLimit++tickLambda :: (MonadIO m, RuntimeThrower m) => Eval m ()+tickLambda = tick lambdas langLambdaCount RuntimeError'LangLambdaLimit++tickExpr :: (MonadIO m, RuntimeThrower m) => Eval m ()+tickExpr = tick expressions langExprCount RuntimeError'LangExprLimit++type Env m = Map Symbol (IORef (Expr m))++runEval :: MonadIO m => Eval m a -> EvalConfig m -> m a+runEval (Eval r) = runReaderT r++data Expr m+ = Expr'Ref Ref+ | Expr'UnVal (UnVal m)+ | Expr'Val Val+ | Expr'If (If m)+ | Expr'Iflet (Iflet m)+ | Expr'Get (Get m)+ | Expr'Set (Set m)+ | Expr'Match (Match m)+ | Expr'Define (Define m)+ | Expr'Lambda (Lambda m)+ | Expr'List (List m)+ | Expr'Tuple (Tuple m)+ | Expr'Fn (Fn m)+ | Expr'FnCall (FnCall m)+ | Expr'Do (Do m)+ | Expr'ApiUnCall (ApiUnCall m)+ deriving (Show, Eq)++data UnVal m+ = UnVal'Const Const+ | UnVal'UnWrap (UnWrap m)+ | UnVal'UnStruct (UnStruct m)+ | UnVal'UnEnumeral (UnEnumeral m)+ deriving (Show, Eq)++data UnWrap m = UnWrap+ { w :: Expr m+ } deriving (Show, Eq)++data UnStruct m = UnStruct+ { m :: Map MemberName (Expr m)+ } deriving (Show, Eq)++data UnEnumeral m = UnEnumeral+ { tag :: EnumeralName+ , m :: Maybe (Map MemberName (Expr m))+ } deriving (Show, Eq)++data Ref = Ref+ { symbol :: Symbol+ } deriving (Show, Eq)++data If m = If+ { cond :: Expr m+ , true :: Expr m+ , false :: Expr m+ } deriving (Show, Eq)++data Iflet m = Iflet+ { symbol :: Symbol+ , option :: Expr m+ , some :: Expr m+ , none :: Expr m+ } deriving (Show, Eq)++data Get m = Get+ { path :: [Text]+ , expr :: Expr m+ } deriving (Show, Eq)++data Set m = Set+ { path :: [Text]+ , src :: Expr m+ , dest :: Expr m+ } deriving (Show, Eq)++data MatchCase m+ = MatchCase'Tag (Expr m)+ | MatchCase'Members Symbol (Expr m)+ deriving (Show, Eq)++data Match m = Match+ { enumeral :: Expr m+ , cases :: Map EnumeralName (MatchCase m)+ } deriving (Show, Eq)++data Define m = Define+ { var :: Symbol+ , expr :: Expr m+ } deriving (Show, Eq)++data Lambda m = Lambda+ { params :: [(Symbol, Type)]+ , expr :: Expr m+ } deriving (Show, Eq)++newtype Fn m = Fn ([Expr m] -> Eval m (Expr m))++instance Show (Fn m) where+ show _ = "<Fn>"++instance Eq (Fn m) where+ (==) _ _ = False++data List m = List+ { list :: [Expr m]+ } deriving (Show, Eq)++data Tuple m = Tuple+ { tuple :: [Expr m]+ } deriving (Show, Eq)++data Do m = Do+ { exprs :: [Expr m]+ } deriving (Show, Eq)++data FnCall m = FnCall+ { fn :: Expr m+ , args :: [Expr m]+ } deriving (Show, Eq)++data ApiUnCall m+ = ApiUnCall'HollowUnCall HollowUnCall+ | ApiUnCall'WrapUnCall (WrapUnCall m)+ | ApiUnCall'StructUnCall (StructUnCall m)+ | ApiUnCall'EnumerationUnCall (EnumerationUnCall m)+ deriving (Show, Eq)++data HollowUnCall = HollowUnCall+ { n :: TypeName+ } deriving (Show, Eq)++data WrapUnCall m = WrapUnCall+ { n :: TypeName+ , w :: Expr m+ } deriving (Show, Eq)++data StructUnCall m = StructUnCall+ { n :: TypeName+ , m :: Expr m+ } deriving (Show, Eq)++data EnumerationUnCall m = EnumerationUnCall+ { n :: TypeName+ , e :: Expr m+ } deriving (Show, Eq)++data ApiCall+ = ApiCall'Hollow TypeName+ | ApiCall'Struct TypeName Struct+ | ApiCall'Enumeration TypeName Enumeral+ | ApiCall'Wrap TypeName Wrap+ deriving (Show, Eq)++apiCallName :: ApiCall -> TypeName+apiCallName = \case+ ApiCall'Hollow n -> n+ ApiCall'Struct n _ -> n+ ApiCall'Enumeration n _ -> n+ ApiCall'Wrap n _ -> n++--++fromAst :: Monad m => Ast -> Expr m+fromAst = \case+ Ast'Ref Ast.Ref{symbol} -> Expr'Ref $ Ref symbol+ Ast'If Ast.If{cond,true,false} -> Expr'If $ If (fromAst cond) (fromAst true) (fromAst false)+ Ast'Iflet Ast.Iflet{symbol, option, some, none} -> Expr'Iflet $ Iflet symbol (fromAst option) (fromAst some) (fromAst none)+ Ast'Get Ast.Get{path,val} -> Expr'Get $ Get path (fromAst val)+ Ast'Set Ast.Set{path,src,dest} -> Expr'Set $ Set path (fromAst src) (fromAst dest)+ Ast'Define Ast.Define{var,expr} -> Expr'Define $ Define var (fromAst expr)+ Ast'Match Ast.Match{enumeral,cases} -> Expr'Match $ Match (fromAst enumeral) (fromAstMatchCases cases)+ Ast'Lambda Ast.Lambda{args,expr} -> Expr'Lambda $ Lambda args (fromAst expr)+ Ast'List Ast.List{list} -> Expr'List $ List $ map fromAst list+ Ast'Tuple Ast.Tuple{tuple} -> Expr'Tuple $ Tuple $ map fromAst tuple+ Ast'Do Ast.Do{vals} -> Expr'Do $ Do $ map fromAst vals+ Ast'FnCall Ast.FnCall{fn,args} -> Expr'FnCall $ FnCall (fromAst fn) (map fromAst args)+ Ast'WrapCall Ast.WrapCall{n,w} -> Expr'ApiUnCall $ ApiUnCall'WrapUnCall $ WrapUnCall n (fromAst w)+ Ast'HollowCall Ast.HollowCall{n} -> Expr'ApiUnCall $ ApiUnCall'HollowUnCall $ HollowUnCall n+ Ast'StructCall Ast.StructCall{n,m} -> Expr'ApiUnCall $ ApiUnCall'StructUnCall $ StructUnCall n (fromAst m)+ Ast'EnumerationCall Ast.EnumerationCall{n,e} -> Expr'ApiUnCall $ ApiUnCall'EnumerationUnCall $ EnumerationUnCall n (fromAst e)+ Ast'Enumeral Ast.Enumeral{tag,m} -> Expr'UnVal $ UnVal'UnEnumeral $ UnEnumeral tag (fmap fromAst <$> m)+ Ast'Struct Ast.Struct{m} -> Expr'UnVal $ UnVal'UnStruct $ UnStruct (fromAst <$> m)+ Ast'Wrap Ast.Wrap{w} -> Expr'UnVal $ UnVal'UnWrap $ UnWrap (fromAst w)+ Ast'Const c -> Expr'UnVal $ UnVal'Const c++fromAstMatchCases :: Monad m => [Ast.MatchCase] -> Map EnumeralName (MatchCase m)+fromAstMatchCases = Map.fromList . map cvt+ where+ cvt (Ast.MatchCase'Tag name ast) = (name, MatchCase'Tag (fromAst ast))+ cvt (Ast.MatchCase'Members name sym ast) = (name, MatchCase'Members sym (fromAst ast))++--++addEnvToEnv :: (RuntimeThrower m, Ord k, MonadIO m) => Maybe Int -> Map k a -> IORef (Map k a) -> m (IORef (Map k a))+addEnvToEnv maybeVariableLimit vars envRef = do+ env <- liftIO $ readIORef envRef+ let env' = Map.union vars env+ case maybeVariableLimit of+ Nothing -> return ()+ Just limit -> when (Map.size env' > limit) $ runtimeThrow RuntimeError'VariableLimit+ liftIO $ newIORef env'++addVarToEnv :: (Ord k, MonadIO m, RuntimeThrower m) => Maybe Int -> IORef (Map k a) -> k -> a -> Map k a -> m ()+addVarToEnv maybeVariableLimit envRef var ref env = do+ let env' = Map.insert var ref env+ case maybeVariableLimit of+ Nothing -> return ()+ Just limit -> when (Map.size env' > limit) $ runtimeThrow RuntimeError'VariableLimit+ liftIO $ writeIORef envRef env'++addVarToScope :: (MonadIO m, RuntimeThrower m) => IORef (Env m) -> Symbol -> Expr m -> Eval m ()+addVarToScope envRef var expr = do+ env <- liftIO $ readIORef envRef+ ref <- liftIO $ newIORef expr+ limit <- variables <$> asks limits+ addVarToEnv limit envRef var ref env++varLookup :: (MonadIO m, RuntimeThrower m) => Map Symbol (IORef a) -> Symbol -> m a+varLookup env symbol@(Symbol s) = case Map.lookup symbol env of+ Nothing -> runtimeThrow $ RuntimeError'UnknownVariable s+ Just var -> liftIO $ readIORef $ var++--++eval :: (MonadIO m, RuntimeThrower m) => Expr m -> IORef (Env m) -> Eval m (Expr m)+eval expr envRef = case expr of+ Expr'Ref atom -> evalRef atom envRef+ Expr'If if' -> evalIf if' envRef+ Expr'Iflet iflet -> evalIflet iflet envRef+ Expr'UnVal unVal -> evalUnVal unVal envRef+ Expr'Val val -> return $ Expr'Val val+ Expr'Get get -> evalGet get envRef+ Expr'Set set -> evalSet set envRef+ Expr'Define define -> evalDefine define envRef+ Expr'Match match -> evalMatch match envRef+ Expr'Lambda lambda -> evalLambda lambda envRef+ Expr'Fn _ -> return expr -- throw error?+ Expr'List list -> evalList list envRef+ Expr'Tuple tuple -> evalTuple tuple envRef+ Expr'FnCall call -> evalFnCall call envRef+ Expr'Do dO -> evalDo dO envRef+ Expr'ApiUnCall apiUnCall -> evalApiUnCall apiUnCall envRef++forceVal :: (RuntimeThrower m) => Expr m -> Eval m Val+forceVal (Expr'Val v) = return v+forceVal (Expr'List (List l)) = Val'List <$> mapM forceVal l+forceVal (Expr'Tuple (Tuple t)) = Val'List <$> mapM forceVal t+forceVal _ = runtimeThrow RuntimeError'IncompatibleType++evalRef :: (MonadIO m, RuntimeThrower m) => Ref -> IORef (Env m) -> Eval m (Expr m)+evalRef Ref{symbol} envRef = do+ tickExpr+ env <- liftIO $ readIORef envRef+ varLookup env symbol++evalUnVal :: (MonadIO m, RuntimeThrower m) => UnVal m -> IORef (Env m) -> Eval m (Expr m)+evalUnVal unVal envRef = case unVal of+ UnVal'Const c -> return $ Expr'Val $ Val'Const c++ UnVal'UnStruct UnStruct{m} -> do+ members <- mapM (\(name,expr) -> (name,) <$> (forceVal =<< eval expr envRef)) (Map.toList m)+ return $ Expr'Val $ Val'ApiVal $ ApiVal'Struct $ Struct (Map.fromList members)++ UnVal'UnWrap UnWrap{w} -> do+ w' <- eval w envRef+ case w' of+ Expr'Val (Val'Const c) -> return $ Expr'Val $ Val'Const c+ _ -> runtimeThrow RuntimeError'IncompatibleType++ UnVal'UnEnumeral UnEnumeral{tag,m} -> do+ case m of+ Nothing -> return $ Expr'Val $ Val'ApiVal $ ApiVal'Enumeral $ Enumeral tag Nothing+ Just members' -> do+ members <- mapM (\(name,expr) -> (name,) <$> (forceVal =<< eval expr envRef)) (Map.toList members')+ return $ Expr'Val $ Val'ApiVal $ ApiVal'Enumeral $ Enumeral tag (Just $ Map.fromList members)++evalIf :: (MonadIO m, RuntimeThrower m) => If m -> IORef (Env m) -> Eval m (Expr m)+evalIf If{cond, true, false} envRef = do+ tickExpr+ envRef' <- liftIO $ newIORef =<< readIORef envRef+ v <- eval cond envRef'+ case v of+ Expr'Val (Val'Const (Const'Bool cond')) -> do+ envRef'' <- liftIO $ newIORef =<< readIORef envRef+ eval (if cond' then true else false) envRef''+ _ -> runtimeThrow RuntimeError'IncompatibleType++evalIflet :: (MonadIO m, RuntimeThrower m) => Iflet m -> IORef (Env m) -> Eval m (Expr m)+evalIflet Iflet{symbol, option, some, none} envRef = do+ tickExpr+ envRef' <- liftIO $ newIORef =<< readIORef envRef+ option' <- eval option envRef'+ case option' of+ Expr'Val (Val'Const Const'Null) -> eval none envRef'+ some' -> do+ envRef'' <- liftIO $ newIORef =<< readIORef envRef+ addVarToScope envRef'' symbol some'+ eval some envRef''++evalGet :: (MonadIO m, RuntimeThrower m) => Get m -> IORef (Env m) -> Eval m (Expr m)+evalGet Get{path,expr} envRef = do+ tickExpr+ getter path =<< eval expr envRef++getter :: (MonadIO m, RuntimeThrower m) => [Text] -> Expr m -> Eval m (Expr m)+getter [] expr = return expr+getter path expr =+ case expr of+ Expr'Val val -> case val of+ Val'ApiVal apiVal -> getterApiVal path apiVal+ _ -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'IncompatibleType++getterApiVal :: (MonadIO m, RuntimeThrower m) => [Text] -> ApiVal -> Eval m (Expr m)+getterApiVal (mName:path) (ApiVal'Struct Struct{m}) =+ case Map.lookup (MemberName mName) m of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ Just member -> getter path (Expr'Val member)+getterApiVal (mName:path) (ApiVal'Enumeral Enumeral{m})+ | mName == "tag" = runtimeThrow RuntimeError'IncompatibleType+ | otherwise = case m >>= Map.lookup (MemberName mName) of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ Just member -> getter path (Expr'Val member)+getterApiVal _ _ = runtimeThrow RuntimeError'IncompatibleType++evalSet :: (MonadIO m, RuntimeThrower m) => Set m -> IORef (Env m) -> Eval m (Expr m)+evalSet Set{path,src,dest} envRef = do+ tickExpr+ dest' <- eval dest envRef+ src' <- eval src envRef+ setter path src' dest'++setter :: (MonadIO m, RuntimeThrower m) => [Text] -> Expr m -> Expr m -> Eval m (Expr m)+setter [] src _ = return src+setter path src dest =+ case dest of+ Expr'Val destVal -> case destVal of+ Val'ApiVal destApiVal -> setterApiVal path src destApiVal+ _ -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'IncompatibleType++setterApiVal :: (MonadIO m, RuntimeThrower m) => [Text] -> Expr m -> ApiVal -> Eval m (Expr m)+setterApiVal (mName:path) src (ApiVal'Struct Struct{m}) =+ case Map.lookup (MemberName mName) m of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ Just member -> do+ exprMember' <- setter path src (Expr'Val member)+ case exprMember' of+ Expr'Val member' -> return . Expr'Val . Val'ApiVal . ApiVal'Struct . Struct $+ Map.insert (MemberName mName) member' m+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Needs a Val+setterApiVal (mName:path) src (ApiVal'Enumeral Enumeral{tag, m})+ | mName == "tag" = runtimeThrow RuntimeError'IncompatibleType+ | otherwise = case m of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ Just members -> case Map.lookup (MemberName mName) members of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ Just member -> do+ exprMember' <- setter path src (Expr'Val member)+ case exprMember' of+ Expr'Val member' -> return . Expr'Val . Val'ApiVal . ApiVal'Enumeral $+ Enumeral { tag = tag, m = Just $ Map.insert (MemberName mName) member' members }+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Needs a Val+setterApiVal _ _ _ = runtimeThrow RuntimeError'IncompatibleType++evalDefine :: (MonadIO m, RuntimeThrower m) => Define m -> IORef (Env m) -> Eval m (Expr m)+evalDefine Define{var, expr} envRef = do+ tickExpr+ expr' <- eval expr envRef+ addVarToScope envRef var expr'+ return expr'++evalMatch :: (MonadIO m, RuntimeThrower m) => Match m -> IORef (Env m) -> Eval m (Expr m)+evalMatch Match{enumeral, cases} envRef = do+ tickExpr+ envRef' <- liftIO $ newIORef =<< readIORef envRef+ enumeral' <- eval enumeral envRef'+ case enumeral' of+ Expr'Val (Val'ApiVal (ApiVal'Enumeral e)) -> case e of+ Enumeral name members -> case Map.lookup name cases of+ Nothing -> runtimeThrow RuntimeError'MissingMatchCase+ Just matchCase -> case (matchCase, members) of+ (MatchCase'Tag expr, Nothing) -> eval expr envRef+ (MatchCase'Members var expr, Just _) -> do+ envRef'' <- liftIO $ newIORef =<< readIORef envRef+ addVarToScope envRef'' var enumeral'+ eval expr envRef''+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Should or should have members. Incompatible Val?+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Some enumeral, Incompatible Val?++evalLambda :: (MonadIO m, RuntimeThrower m) => Lambda m -> IORef (Env m) -> Eval m (Expr m)+evalLambda Lambda{params, expr} envRef = do+ tickLambda+ tickExpr+ return . Expr'Fn . Fn $ \vals -> do+ let keys = map fst params+ let args = zip keys vals+ let keysLen = length keys+ let argsLen = length args+ if keysLen /= argsLen+ then runtimeThrow $ if keysLen < argsLen+ then RuntimeError'TooManyArguments+ else RuntimeError'TooFewArguments+ else do+ args' <- liftIO $ mapM newIORef (Map.fromList args)+ limit <- variables <$> asks limits+ envRef' <- addEnvToEnv limit args' envRef+ eval expr envRef'++evalList :: (MonadIO m, RuntimeThrower m) => List m -> IORef (Env m)-> Eval m (Expr m)+evalList List{list} envRef = do+ tickExpr+ list' <- mapM (\item -> eval item envRef) list+ return . Expr'List $ List list'++evalTuple :: (MonadIO m, RuntimeThrower m) => Tuple m -> IORef (Env m)-> Eval m (Expr m)+evalTuple Tuple{tuple} envRef = do+ tickExpr+ tuple' <- mapM (\item -> eval item envRef) tuple+ return . Expr'Tuple $ Tuple tuple'++evalDo :: (MonadIO m, RuntimeThrower m) => Do m -> IORef (Env m) -> Eval m (Expr m)+evalDo Do{exprs} envRef = do+ tickExpr+ case exprs of+ [] -> return $ Expr'Val $ Val'Const $ Const'Null+ _ -> last <$> mapM (\expr -> eval expr envRef) exprs++evalFnCall :: (MonadIO m, RuntimeThrower m) => FnCall m -> IORef (Env m) -> Eval m (Expr m)+evalFnCall FnCall{fn, args} envRef = do+ tickExpr+ val <- eval fn envRef+ case val of+ Expr'Fn (Fn fn') -> do+ args' <- mapM (\arg -> eval arg envRef) args+ fn' args'+ Expr'Ref Ref{symbol} -> do+ env <- liftIO $ readIORef envRef+ v <- varLookup env symbol+ case v of+ Expr'Fn (Fn fn') -> do+ args' <- mapM (\arg -> eval arg envRef) args+ fn' args'+ _ -> runtimeThrow $ RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'IncompatibleType++evalApiUnCall :: (MonadIO m, RuntimeThrower m) => ApiUnCall m -> IORef (Env m) -> Eval m (Expr m)+evalApiUnCall apiUnCall envRef = do+ tickServiceCall+ tickExpr+ Expr'Val <$> case apiUnCall of+ ApiUnCall'HollowUnCall c -> evalHollowUnCall c+ ApiUnCall'WrapUnCall c -> evalWrapUnCall c envRef+ ApiUnCall'StructUnCall c -> evalStructUnCall c envRef+ ApiUnCall'EnumerationUnCall c -> evalEnumerationUnCall c envRef++evalHollowUnCall :: (MonadIO m, RuntimeThrower m) => HollowUnCall -> Eval m Val+evalHollowUnCall HollowUnCall{n} =+ Eval . ReaderT $ \cfg ->+ apiCall cfg $ ApiCall'Hollow n++evalWrapUnCall :: (MonadIO m, RuntimeThrower m) => WrapUnCall m -> IORef (Env m) -> Eval m Val+evalWrapUnCall WrapUnCall{n,w} envRef = do+ expr <- eval w envRef+ case expr of+ Expr'Val (Val'Const c) -> Eval . ReaderT $ \cfg ->+ apiCall cfg $ ApiCall'Wrap n (Wrap c)+ _ -> runtimeThrow RuntimeError'IncompatibleType++evalStructUnCall :: (MonadIO m, RuntimeThrower m) => StructUnCall m -> IORef (Env m) -> Eval m Val+evalStructUnCall StructUnCall{n,m} envRef = do+ expr <- eval m envRef+ case expr of+ Expr'Val (Val'ApiVal (ApiVal'Struct m')) -> Eval . ReaderT $ \cfg ->+ apiCall cfg $ ApiCall'Struct n m'+ _ -> runtimeThrow RuntimeError'IncompatibleType++evalEnumerationUnCall :: (MonadIO m, RuntimeThrower m) => EnumerationUnCall m -> IORef (Env m) -> Eval m Val+evalEnumerationUnCall EnumerationUnCall{n,e} envRef = do+ expr <- eval e envRef+ case expr of+ Expr'Val (Val'ApiVal (ApiVal'Enumeral e')) -> Eval . ReaderT $ \cfg ->+ apiCall cfg $ ApiCall'Enumeration n e'+ _ -> runtimeThrow RuntimeError'IncompatibleType++emptyEnv :: RuntimeThrower m => IO (IORef (Env m))+emptyEnv = do+ noT <- newIORef notExpr++ eq <- newIORef eqExpr+ neq <- newIORef neqExpr+ lt <- newIORef ltExpr+ lte <- newIORef lteExpr+ gt <- newIORef gtExpr+ gte <- newIORef gteExpr+ concat' <- newIORef concatExpr++ addI8 <- newIORef $ i8Expr (+)+ addI16 <- newIORef $ i16Expr (+)+ addI32 <- newIORef $ i32Expr (+)+ addI64 <- newIORef $ i64Expr (+)+ addU8 <- newIORef $ u8Expr (+)+ addU16 <- newIORef $ u16Expr (+)+ addU32 <- newIORef $ u32Expr (+)+ addU64 <- newIORef $ u64Expr (+)+ addF32 <- newIORef $ f32Expr (+)+ addF64 <- newIORef $ f64Expr (+)++ subI8 <- newIORef $ i8Expr (-)+ subI16 <- newIORef $ i16Expr (-)+ subI32 <- newIORef $ i32Expr (-)+ subI64 <- newIORef $ i64Expr (-)+ subU8 <- newIORef $ u8Expr (-)+ subU16 <- newIORef $ u16Expr (-)+ subU32 <- newIORef $ u32Expr (-)+ subU64 <- newIORef $ u64Expr (-)+ subF32 <- newIORef $ f32Expr (-)+ subF64 <- newIORef $ f64Expr (-)++ mulI8 <- newIORef $ i8Expr (*)+ mulI16 <- newIORef $ i16Expr (*)+ mulI32 <- newIORef $ i32Expr (*)+ mulI64 <- newIORef $ i64Expr (*)+ mulU8 <- newIORef $ u8Expr (*)+ mulU16 <- newIORef $ u16Expr (*)+ mulU32 <- newIORef $ u32Expr (*)+ mulU64 <- newIORef $ u64Expr (*)+ mulF32 <- newIORef $ f32Expr (*)+ mulF64 <- newIORef $ f64Expr (*)++ divI8 <- newIORef $ i8Expr (div)+ divI16 <- newIORef $ i16Expr (div)+ divI32 <- newIORef $ i32Expr (div)+ divI64 <- newIORef $ i64Expr (div)+ divU8 <- newIORef $ u8Expr (div)+ divU16 <- newIORef $ u16Expr (div)+ divU32 <- newIORef $ u32Expr (div)+ divU64 <- newIORef $ u64Expr (div)+ divF32 <- newIORef $ f32Expr (/)+ divF64 <- newIORef $ f64Expr (/)++ tuple <- newIORef tupleExpr++ mapList <- newIORef mapListExpr+ filterList <- newIORef filterListExpr+ reduceList <- newIORef reduceListExpr++ mapOption <- newIORef mapOptionExpr++ mapLeft <- newIORef mapLeftExpr+ mapRight <- newIORef mapRightExpr++ newIORef $ Map.fromList+ [ ("not",noT)++ , ("eq", eq)+ , ("neq", neq)+ , ("lt", lt)+ , ("lte", lte)+ , ("gt", gt)+ , ("gte", gte)++ , ("addI8", addI8)+ , ("addI16", addI16)+ , ("addI32", addI32)+ , ("addI64", addI64)+ , ("addU8", addU8)+ , ("addU16", addU16)+ , ("addU32", addU32)+ , ("addU64", addU64)+ , ("addF32", addF32)+ , ("addF64", addF64)++ , ("subI8", subI8)+ , ("subI16", subI16)+ , ("subI32", subI32)+ , ("subI64", subI64)+ , ("subU8", subU8)+ , ("subU16", subU16)+ , ("subU32", subU32)+ , ("subU64", subU64)+ , ("subF32", subF32)+ , ("subF64", subF64)++ , ("mulI8", mulI8)+ , ("mulI16", mulI16)+ , ("mulI32", mulI32)+ , ("mulI64", mulI64)+ , ("mulU8", mulU8)+ , ("mulU16", mulU16)+ , ("mulU32", mulU32)+ , ("mulU64", mulU64)+ , ("mulF32", mulF32)+ , ("mulF64", mulF64)++ , ("divI8", divI8)+ , ("divI16", divI16)+ , ("divI32", divI32)+ , ("divI64", divI64)+ , ("divU8", divU8)+ , ("divU16", divU16)+ , ("divU32", divU32)+ , ("divU64", divU64)+ , ("divF32", divF32)+ , ("divF64", divF64)++ , ("concat", concat')+ , ("tuple", tuple)++ , ("mapOption", mapOption)++ , ("mapList", mapList)+ , ("filterList", filterList)+ , ("reduceList", reduceList)++ , ("mapLeft", mapLeft)+ , ("mapRight", mapRight)+ ]++mapRightExpr :: RuntimeThrower m => Expr m+mapRightExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn (Fn f), expr@(Expr'Val (Val'ApiVal (ApiVal'Enumeral Enumeral{tag,m})))] -> case tag of+ "Right" -> case m >>= Map.lookup "right" of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType -- Not an Either'Left+ Just _ -> do+ left <- f [expr]+ case left of+ Expr'Val v -> return $ Expr'Val $ Val'ApiVal $ ApiVal'Enumeral $ Enumeral tag (Map.insert "right" v <$> m)+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Should be a Val+ "Left" -> return expr+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Not an Either+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++mapLeftExpr :: RuntimeThrower m => Expr m+mapLeftExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn (Fn f), expr@(Expr'Val (Val'ApiVal (ApiVal'Enumeral Enumeral{tag,m})))] -> case tag of+ "Left" -> case m >>= Map.lookup "left" of+ Nothing -> runtimeThrow RuntimeError'IncompatibleType -- Not an Either'Left+ Just _ -> do+ left <- f [expr]+ case left of+ Expr'Val v -> return $ Expr'Val $ Val'ApiVal $ ApiVal'Enumeral $ Enumeral tag (Map.insert "left" v <$> m)+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Should be a Val+ "Right" -> return expr+ _ -> runtimeThrow RuntimeError'IncompatibleType -- Not an Either+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++mapOptionExpr :: RuntimeThrower m => Expr m+mapOptionExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn _, Expr'Val (Val'Const Const'Null)] -> return $ Expr'Val (Val'Const Const'Null)+ [Expr'Fn (Fn f), expr] -> f [expr]+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++mapListExpr :: RuntimeThrower m => Expr m+mapListExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn (Fn f), Expr'List (List list)] -> Expr'List . List <$> mapM (f . (:[])) list+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++filterListExpr :: RuntimeThrower m => Expr m+filterListExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn (Fn f), Expr'List (List list)] -> Expr'List . List <$>+ filterM+ (\x -> do+ res <- f [x]+ case res of+ Expr'Val (Val'Prim (Prim'Bool b)) -> return b+ Expr'Val (Val'Const (Const'Bool b)) -> return b+ _ -> runtimeThrow RuntimeError'IncompatibleType) -- Bool+ list+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++reduceListExpr :: RuntimeThrower m => Expr m+reduceListExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Fn (Fn f), a, Expr'List (List list)] -> foldlM (\x y -> f [x, y]) a list+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments++i8Expr :: RuntimeThrower m => (Int8 -> Int8 -> Int8) -> Expr m+i8Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Prim (Prim'I8 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++i16Expr :: RuntimeThrower m => (Int16 -> Int16 -> Int16) -> Expr m+i16Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Prim (Prim'I16 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++i32Expr :: RuntimeThrower m => (Int32 -> Int32 -> Int32) -> Expr m+i32Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Prim (Prim'I32 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++i64Expr :: RuntimeThrower m => (Int64 -> Int64 -> Int64) -> Expr m+i64Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Prim (Prim'I64 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++u8Expr :: RuntimeThrower m => (Word8 -> Word8 -> Word8) -> Expr m+u8Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Prim (Prim'U8 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++u16Expr :: RuntimeThrower m => (Word16 -> Word16 -> Word16) -> Expr m+u16Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Prim (Prim'U16 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++u32Expr :: RuntimeThrower m => (Word32 -> Word32 -> Word32) -> Expr m+u32Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Prim (Prim'U32 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++u64Expr :: RuntimeThrower m => (Word64 -> Word64 -> Word64) -> Expr m+u64Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Prim (Prim'U64 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `op` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `op` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedInteger x, toBoundedInteger y) of+ (Just x', Just y') -> toExpr $ x' `op` y'+ _ -> runtimeThrow RuntimeError'IncompatibleType+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++f32Expr :: RuntimeThrower m => (Float -> Float -> Float) -> Expr m+f32Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'F32 x)), Expr'Val (Val'Prim (Prim'F32 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'F32 y))] -> case toBoundedRealFloat x of+ x' -> toExpr $ eitherCollapse x' `op` y+ [Expr'Val (Val'Prim (Prim'F32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedRealFloat y of+ y' -> toExpr $ x `op` eitherCollapse y'+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedRealFloat x, toBoundedRealFloat y) of+ (x', y') -> toExpr $ eitherCollapse x' `op` eitherCollapse y'+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++f64Expr :: RuntimeThrower m => (Double -> Double -> Double) -> Expr m+f64Expr op = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Prim (Prim'F64 x)), Expr'Val (Val'Prim (Prim'F64 y))] -> toExpr $ x `op` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'F64 y))] -> case toBoundedRealFloat x of+ x' -> toExpr $ eitherCollapse x' `op` y+ [Expr'Val (Val'Prim (Prim'F64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedRealFloat y of+ y' -> toExpr $ x `op` eitherCollapse y'+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> case (toBoundedRealFloat x, toBoundedRealFloat y) of+ (x', y') -> toExpr $ eitherCollapse x' `op` eitherCollapse y'+ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++boolExpr :: RuntimeThrower m+ => (Scientific -> Scientific -> Bool)+ -> (Int8 -> Int8 -> Bool)+ -> (Int16 -> Int16 -> Bool)+ -> (Int32 -> Int32 -> Bool)+ -> (Int64 -> Int64 -> Bool)+ -> (Word8 -> Word8 -> Bool)+ -> (Word16 -> Word16 -> Bool)+ -> (Word32 -> Word32 -> Bool)+ -> (Word64 -> Word64 -> Bool)+ -> (Val -> Val -> Bool)+ -> Expr m+boolExpr num i8 i16 i32 i64 u8 u16 u32 u64 val = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> toExpr $ x `num` y++ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Prim (Prim'I8 y))] -> toExpr $ x `i8` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i8` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i8` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Prim (Prim'I16 y))] -> toExpr $ x `i16` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i16` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i16` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Prim (Prim'I32 y))] -> toExpr $ x `i32` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i32` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i32` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Prim (Prim'I64 y))] -> toExpr $ x `i64` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i64` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i64` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Prim (Prim'U8 y))] -> toExpr $ x `u8` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u8` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u8` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Prim (Prim'U16 y))] -> toExpr $ x `u16` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u16` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u16` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Prim (Prim'U32 y))] -> toExpr $ x `u32` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u32` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u32` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Prim (Prim'U64 y))] -> toExpr $ x `u64` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u64` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u64` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val x, Expr'Val y] -> toExpr $ x `val` y++ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++numExpr :: (RuntimeThrower m, ToVal a)+ => (Scientific -> Scientific -> a)+ -> (Int8 -> Int8 -> a)+ -> (Int16 -> Int16 -> a)+ -> (Int32 -> Int32 -> a)+ -> (Int64 -> Int64 -> a)+ -> (Word8 -> Word8 -> a)+ -> (Word16 -> Word16 -> a)+ -> (Word32 -> Word32 -> a)+ -> (Word64 -> Word64 -> a)+ -> Expr m+numExpr num i8 i16 i32 i64 u8 u16 u32 u64 = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Const (Const'Number y))] -> toExpr $ x `num` y++ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Prim (Prim'I8 y))] -> toExpr $ x `i8` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i8` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i8` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Prim (Prim'I16 y))] -> toExpr $ x `i16` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i16` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i16` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Prim (Prim'I32 y))] -> toExpr $ x `i32` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i32` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i32` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Prim (Prim'I64 y))] -> toExpr $ x `i64` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'I64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `i64` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'I64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `i64` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Prim (Prim'U8 y))] -> toExpr $ x `u8` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U8 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u8` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U8 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u8` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Prim (Prim'U16 y))] -> toExpr $ x `u16` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U16 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u16` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U16 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u16` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Prim (Prim'U32 y))] -> toExpr $ x `u32` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U32 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u32` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U32 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u32` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Prim (Prim'U64 y))] -> toExpr $ x `u64` y+ [Expr'Val (Val'Const (Const'Number x)), Expr'Val (Val'Prim (Prim'U64 y))] -> case toBoundedInteger x of+ Just x' -> toExpr $ x' `u64` y+ Nothing -> runtimeThrow RuntimeError'IncompatibleType+ [Expr'Val (Val'Prim (Prim'U64 x)), Expr'Val (Val'Const (Const'Number y))] -> case toBoundedInteger y of+ Just y' -> toExpr $ x `u64` y'+ Nothing -> runtimeThrow RuntimeError'IncompatibleType++ (_:_:[]) -> runtimeThrow RuntimeError'IncompatibleType+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++notExpr :: RuntimeThrower m => Expr m+notExpr = Expr'Fn . Fn $ \args ->+ case args of+ [] -> runtimeThrow RuntimeError'TooFewArguments+ [Expr'Val (Val'Const (Const'Bool x))] -> toExpr $ not x+ [Expr'Val (Val'Prim (Prim'Bool x))] -> toExpr $ not x+ _ -> runtimeThrow RuntimeError'TooManyArguments+ where+ toExpr v = return $ Expr'Val (toVal v)++eqExpr :: RuntimeThrower m => Expr m+eqExpr = boolExpr (==) (==) (==) (==) (==) (==) (==) (==) (==) (==)++neqExpr :: RuntimeThrower m => Expr m+neqExpr = boolExpr (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=)++ltExpr :: RuntimeThrower m => Expr m+ltExpr = numExpr (<) (<) (<) (<) (<) (<) (<) (<) (<)++lteExpr :: RuntimeThrower m => Expr m+lteExpr = numExpr (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=)++gtExpr :: RuntimeThrower m => Expr m+gtExpr = numExpr (>) (>) (>) (>) (>) (>) (>) (>) (>)++gteExpr :: RuntimeThrower m => Expr m+gteExpr = numExpr (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=)++concatExpr :: RuntimeThrower m => Expr m+concatExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ [x, y] -> do+ (u,v) <- case (x,y) of+ (Expr'Val (Val'Const (Const'String x')), Expr'Val (Val'Const (Const'String y'))) -> return (x',y')+ (Expr'Val (Val'Prim (Prim'String x')), Expr'Val (Val'Prim (Prim'String y'))) -> return (x',y')+ (Expr'Val (Val'Const (Const'String x')), Expr'Val (Val'Prim (Prim'String y'))) -> return (x',y')+ (Expr'Val (Val'Prim (Prim'String x')), Expr'Val (Val'Const (Const'String y'))) -> return (x',y')+ _ -> runtimeThrow RuntimeError'IncompatibleType -- String+ return $ Expr'Val . Val'Const . Const'String $ u `mappend` v+ _ -> runtimeThrow RuntimeError'TooManyArguments++tupleExpr :: RuntimeThrower m => Expr m+tupleExpr = Expr'Fn . Fn $ \args ->+ case args of+ (_:[]) -> runtimeThrow RuntimeError'TooFewArguments+ xs -> return $ Expr'Tuple $ Tuple xs++eitherCollapse :: Either a a -> a+eitherCollapse = either id id++--++data ApiParser api = ApiParser+ { hollow :: Map TypeName api+ , struct :: Map TypeName (Val -> Maybe api)+ , enumeration :: Map TypeName (Val -> Maybe api)+ , wrap :: Map TypeName (Val -> Maybe api)+ }++parseApiCall :: ApiParser api -> ApiCall -> Maybe api+parseApiCall ApiParser{hollow, struct, enumeration, wrap} = \case+ ApiCall'Hollow n -> Map.lookup n hollow+ ApiCall'Struct n s -> join $ ($ Val'ApiVal (ApiVal'Struct s)) <$> Map.lookup n struct+ ApiCall'Enumeration n e -> join $ ($ Val'ApiVal (ApiVal'Enumeral e)) <$> Map.lookup n enumeration+ ApiCall'Wrap n (Wrap w) -> join $ ($ Val'Const w) <$> Map.lookup n wrap
+ library/Fluid/ServiceThrower.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+module Fluid.ServiceThrower+ ( ServiceThrower(..)+ , ThrownValue(..)+ ) where++import Control.Exception.Safe+import Control.Monad.Except+import Data.Aeson++import qualified Fluid.Server.Exchange as Server++newtype ThrownValue = ThrownValue { unThrownValue :: Value }+ deriving (Show, Eq, Typeable)++class MonadThrow m => ServiceThrower m where+ serviceThrow :: Value -> m a+ serviceThrow err = throw (ThrownValue err)++instance Exception ThrownValue++instance MonadThrow m => ServiceThrower (ExceptT Server.Response m) where+ serviceThrow = throwError . Server.Response'Error . Server.ResponseError'Service
+ library/Fluid/Types.hs view
@@ -0,0 +1,1533 @@+{-# OPTIONS_GHC -fno-warn-dodgy-imports #-}+{-# LANGUAGE DeriveGeneric #-}+module Fluid.Types+ ( Version(..)+ , Major(..)+ , Minor(..)+ , Pull(..)+ , pullAddress+ , RuntimeError(..)+ , Hooks(..)+ , Limits(..)+ , defLimits+ , defHooks+ --+ , Symbol(..)+ , Type(..)+ , TypeName(..)+ , EnumeralName(..)+ , MemberName(..)+ , Const(..)+ --+ , HasType(..)+ ) where++import qualified Data.HashMap.Lazy as HML+import Control.Monad (mzero)+import Data.Aeson+import Data.Text (Text)+import Data.Text.Conversions (toText)+import Data.String (IsString(..))+import Data.Scientific+import Data.Proxy+import Data.Int+import Data.Word+import GHC.Generics++newtype Major = Major Int+ deriving (Show, Eq, Generic, Num, Ord, Real, Integral, Enum)++instance FromJSON Major+instance ToJSON Major++newtype Minor = Minor Int+ deriving (Show, Eq, Generic, Num, Ord, Real, Integral, Enum)++instance FromJSON Minor+instance ToJSON Minor++data Pull = Pull+ { protocol :: Text+ , host :: Text+ , path :: Text+ , port :: Int+ } deriving (Show, Eq)++pullAddress :: Pull -> Text+pullAddress Pull{port,host,protocol,path} = mconcat [protocol, "://", host, ":", toText $ show port, path]++data Version = Version+ { major :: Major+ , minor :: Minor+ } deriving (Show, Eq, Generic)++instance ToJSON Version+instance FromJSON Version++data RuntimeError+ = RuntimeError'UnparsableFormat+ | RuntimeError'UnrecognizedCall+ | RuntimeError'VariableLimit+ | RuntimeError'LangServiceCallLimit Int+ | RuntimeError'LangLambdaLimit Int+ | RuntimeError'LangExprLimit Int+ | RuntimeError'UnknownVariable Text+ | RuntimeError'IncompatibleType+ | RuntimeError'MissingMatchCase+ | RuntimeError'TooFewArguments+ | RuntimeError'TooManyArguments+ | RuntimeError'NoApiVersion+ | RuntimeError'NoFluidVersion+ | RuntimeError'ApiMajorVersionTooLow+ | RuntimeError'ApiMajorVersionTooHigh+ | RuntimeError'ApiMinorVersionTooHigh+ | RuntimeError'FluidMajorVersionTooLow+ | RuntimeError'FluidMajorVersionTooHigh+ | RuntimeError'FluidMinorVersionTooHigh+ | RuntimeError'UnparsableMeta+ | RuntimeError'UnparsableQuery+ | RuntimeError'NoImplementation+ | RuntimeError'NotMember+ deriving (Show, Eq)++instance ToJSON RuntimeError where+ toJSON = \case+ RuntimeError'UnparsableFormat -> e "UnparsableFormat"+ RuntimeError'UnrecognizedCall -> object [ "tag" .= String "UnrecognizedCall" ]+ RuntimeError'VariableLimit -> e "VariableLimit"+ RuntimeError'LangExprLimit l -> object [ "tag" .= String "LangExprLimit", "limit" .= l ]+ RuntimeError'LangLambdaLimit l -> object [ "tag" .= String "LangLambdaLimit", "limit" .= l ]+ RuntimeError'LangServiceCallLimit l -> object [ "tag" .= String "LangServiceCallLimit", "limit" .= l ]+ RuntimeError'UnknownVariable m -> object [ "tag" .= String "UnknownVariable", "name" .= m ]+ RuntimeError'IncompatibleType -> e "IncompatibleType"+ RuntimeError'MissingMatchCase -> e "MissingMatchCase"+ RuntimeError'TooFewArguments -> e "TooFewArguments"+ RuntimeError'TooManyArguments -> e "TooManyArguments"+ RuntimeError'NoApiVersion -> e "NoApiVersion"+ RuntimeError'NoFluidVersion -> e "NoFluidVersion"+ RuntimeError'ApiMajorVersionTooHigh -> e "ApiMajorVersionTooHigh"+ RuntimeError'ApiMajorVersionTooLow -> e "ApiMajorVersionTooLow"+ RuntimeError'ApiMinorVersionTooHigh -> e "ApiMinorVersionTooHigh"+ RuntimeError'FluidMajorVersionTooHigh -> e "FluidMajorVersionTooHigh"+ RuntimeError'FluidMajorVersionTooLow -> e "FluidMajorVersionTooLow"+ RuntimeError'FluidMinorVersionTooHigh -> e "FluidMinorVersionTooHigh"+ RuntimeError'UnparsableMeta -> e "UnparsableMeta"+ RuntimeError'UnparsableQuery -> e "UnparsableQuery"+ RuntimeError'NoImplementation -> e "NoImplementation"+ RuntimeError'NotMember -> e "NotMember"+ where+ e s = object [ "tag" .= String s ]++instance FromJSON RuntimeError where+ parseJSON (Object o) = do+ tag <- o .: "tag"+ case tag :: Text of+ "UnparsableFormat" -> pure RuntimeError'UnparsableFormat+ "UnrecognizedCall" -> pure RuntimeError'UnrecognizedCall+ "VariableLimit" -> pure RuntimeError'VariableLimit+ "LangExprLimit" -> RuntimeError'LangExprLimit <$> o .: "limit"+ "LangLambdaLimit" -> RuntimeError'LangLambdaLimit <$> o .: "limit"+ "LangServiceCallLimit" -> RuntimeError'LangServiceCallLimit <$> o .: "limit"+ "UnknownVariable" -> RuntimeError'UnknownVariable <$> o .: "name"+ "IncompatibleType" -> pure RuntimeError'IncompatibleType+ "MissingMatchCase" -> pure RuntimeError'MissingMatchCase+ "TooFewArguments" -> pure RuntimeError'TooFewArguments+ "TooManyArguments" -> pure RuntimeError'TooManyArguments+ "NoApiVersion" -> pure RuntimeError'NoApiVersion+ "NoFluidVersion" -> pure RuntimeError'NoFluidVersion+ "ApiMajorVersionTooHigh" -> pure RuntimeError'ApiMajorVersionTooHigh+ "ApiMajorVersionTooLow" -> pure RuntimeError'ApiMajorVersionTooLow+ "ApiMinorVersionTooHigh" -> pure RuntimeError'ApiMinorVersionTooHigh+ "FluidMajorVersionTooHigh" -> pure RuntimeError'FluidMajorVersionTooHigh+ "FluidMajorVersionTooLow" -> pure RuntimeError'FluidMajorVersionTooLow+ "FluidMinorVersionTooHigh" -> pure RuntimeError'FluidMinorVersionTooHigh+ "UnparsableMeta" -> pure RuntimeError'UnparsableMeta+ "UnparsableQuery" -> pure RuntimeError'UnparsableQuery+ "NoImplementation" -> pure RuntimeError'NoImplementation+ "NotMember" -> pure RuntimeError'NotMember+ _ -> mzero+ parseJSON _ = mzero++data Limits = Limits+ { variables :: Maybe Int+ , serviceCalls :: Maybe Int+ , lambdas :: Maybe Int+ , expressions :: Maybe Int+ } deriving (Show, Eq, Generic)++instance ToJSON Limits+instance FromJSON Limits++defLimits :: Limits+defLimits = Limits+ { variables = Just 50+ , serviceCalls = Just 50+ , lambdas = Just 10+ , expressions = Just 100+ }++data Hooks m meta meta' = Hooks+ { metaMiddleware :: meta -> m meta'+ , sandboxLimits :: meta' -> m Limits+ }++defHooks :: Monad m => Hooks m meta meta+defHooks = Hooks+ { metaMiddleware = return+ , sandboxLimits = \_ -> return defLimits+ }++--++newtype Symbol = Symbol Text+ deriving (Show, Eq, Ord, FromJSON, ToJSON, ToJSONKey, FromJSONKey, IsString)++data Type = Type+ { n :: TypeName+ , p :: [Type]+ , o :: Maybe Type+ } deriving (Show, Eq)++instance IsString Type where+ fromString s = Type (fromString s) [] Nothing++instance FromJSON Type where+ parseJSON = \case+ String s -> pure $ Type (TypeName s) [] Nothing+ Object o -> do+ n <- o .: "n"+ case (HML.lookup "p" o, HML.lookup "o" o) of+ (Nothing, Nothing) -> pure $ Type n [] Nothing+ (Just (String p), Nothing) -> pure $ Type n [Type (TypeName p) [] Nothing] Nothing+ (Just p, Nothing) -> Type n <$> (parseJSON p) <*> pure Nothing+ (Just (String p), Just output) -> Type n [Type (TypeName p) [] Nothing] <$> (Just <$> parseJSON output)+ (Just p, Just output) -> Type n <$> (parseJSON p) <*> (Just <$> parseJSON output)+ _ -> mzero+ _ -> mzero++instance ToJSON Type where+ toJSON (Type n [] Nothing) = toJSON n+ toJSON (Type n [] (Just o)) = object [ "n" .= n, "o" .= toJSON o ]+ toJSON (Type n [p] Nothing) = object [ "n" .= n, "p" .= toJSON p ]+ toJSON (Type n [p] (Just o)) = object [ "n" .= n, "p" .= toJSON p, "o" .= toJSON o]+ toJSON (Type n ps Nothing) = object [ "n" .= n, "p" .= map toJSON ps ]+ toJSON (Type n ps (Just o)) = object [ "n" .= n, "p" .= map toJSON ps, "o" .= toJSON o ]++newtype TypeName = TypeName Text+ deriving (Show, Eq, Ord, FromJSON, ToJSON, IsString)++newtype EnumeralName = EnumeralName Text+ deriving (Show, Eq, Ord, FromJSON, ToJSON, ToJSONKey, FromJSONKey, IsString)++newtype MemberName = MemberName Text+ deriving (Show, Eq, Ord, FromJSON, ToJSON, ToJSONKey, FromJSONKey, IsString)++data Const+ = Const'Null+ | Const'Bool Bool+ | Const'String Text+ | Const'Number Scientific+ deriving (Show, Eq)++instance ToJSON Const where+ toJSON = \case+ Const'Null -> Null+ Const'Bool b -> Bool b+ Const'String s -> String s+ Const'Number n -> Number n++instance FromJSON Const where+ parseJSON = \case+ Null -> pure $ Const'Null+ Bool b -> pure $ Const'Bool b+ String s -> pure $ Const'String s+ Number n -> pure $ Const'Number n+ _ -> mzero++class HasType a where+ getType :: Proxy a -> Type++instance HasType () where+ getType _ = "Unit"++instance HasType Bool where+ getType _ = "Bool"++instance HasType Text where+ getType _ = "String"++instance HasType Int8 where+ getType _ = "I8"++instance HasType Int16 where+ getType _ = "I16"++instance HasType Int32 where+ getType _ = "I32"++instance HasType Int64 where+ getType _ = "I64"++instance HasType Word8 where+ getType _ = "U8"++instance HasType Word16 where+ getType _ = "U16"++instance HasType Word32 where+ getType _ = "U32"++instance HasType Word64 where+ getType _ = "U64"++instance HasType Float where+ getType _ = "F32"++instance HasType Double where+ getType _ = "F64"++instance HasType a => HasType (Maybe a) where+ getType x = Type "Option" [getType (p x)] Nothing+ where+ p :: Proxy (Maybe a) -> Proxy a+ p _ = Proxy++instance HasType a => HasType [a] where+ getType x = Type "List" [getType (p x)] Nothing+ where+ p :: Proxy [a] -> Proxy a+ p _ = Proxy++instance (HasType e, HasType a) => HasType (Either e a) where+ getType x = Type "Either" [getType (p1 x), getType (p2 x)] Nothing+ where+ p1 :: Proxy (Either e a) -> Proxy e+ p1 _ = Proxy+ p2 :: Proxy (Either e a) -> Proxy a+ p2 _ = Proxy++--++instance (HasType t1, HasType t2) => HasType (t1, t2) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x)] Nothing+ where+ p1 :: Proxy (t1, t2) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2) -> Proxy t2+ p2 _ = Proxy++instance (HasType t1, HasType t2, HasType t3) => HasType (t1, t2, t3) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3) -> Proxy t3+ p3 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4) => HasType (t1, t2, t3, t4) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4) -> Proxy t4+ p4 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5) => HasType (t1, t2, t3, t4, t5) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5) -> Proxy t5+ p5 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6) => HasType (t1, t2, t3, t4, t5, t6) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6) -> Proxy t6+ p6 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7) => HasType (t1, t2, t3, t4, t5, t6, t7) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7) -> Proxy t7+ p7 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8) => HasType (t1, t2, t3, t4, t5, t6, t7, t8) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8) -> Proxy t8+ p8 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> Proxy t9+ p9 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> Proxy t10+ p10 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> Proxy t11+ p11 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> Proxy t12+ p12 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> Proxy t13+ p13 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> Proxy t14+ p14 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> Proxy t15+ p15 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> Proxy t16+ p16 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) -> Proxy t17+ p17 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> Proxy t18+ p18 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) -> Proxy t19+ p19 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) -> Proxy t20+ p20 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) -> Proxy t21+ p21 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) -> Proxy t22+ p22 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) -> Proxy t23+ p23 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) -> Proxy t24+ p24 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) -> Proxy t25+ p25 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) -> Proxy t26+ p26 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) -> Proxy t27+ p27 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x), getType (p28 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t27+ p27 _ = Proxy+ p28 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) -> Proxy t28+ p28 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x), getType (p28 x), getType (p29 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t27+ p27 _ = Proxy+ p28 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t28+ p28 _ = Proxy+ p29 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) -> Proxy t29+ p29 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x), getType (p28 x), getType (p29 x), getType (p30 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t27+ p27 _ = Proxy+ p28 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t28+ p28 _ = Proxy+ p29 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t29+ p29 _ = Proxy+ p30 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) -> Proxy t30+ p30 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x), getType (p28 x), getType (p29 x), getType (p30 x), getType (p31 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t27+ p27 _ = Proxy+ p28 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t28+ p28 _ = Proxy+ p29 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t29+ p29 _ = Proxy+ p30 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t30+ p30 _ = Proxy+ p31 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) -> Proxy t31+ p31 _ = Proxy++instance (HasType t1, HasType t2, HasType t3, HasType t4, HasType t5, HasType t6, HasType t7, HasType t8, HasType t9, HasType t10, HasType t11, HasType t12, HasType t13, HasType t14, HasType t15, HasType t16, HasType t17, HasType t18, HasType t19, HasType t20, HasType t21, HasType t22, HasType t23, HasType t24, HasType t25, HasType t26, HasType t27, HasType t28, HasType t29, HasType t30, HasType t31, HasType t32) => HasType (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where+ getType x = Type "Tuple" [getType (p1 x), getType (p2 x), getType (p3 x), getType (p4 x), getType (p5 x), getType (p6 x), getType (p7 x), getType (p8 x), getType (p9 x), getType (p10 x), getType (p11 x), getType (p12 x), getType (p13 x), getType (p14 x), getType (p15 x), getType (p16 x), getType (p17 x), getType (p18 x), getType (p19 x), getType (p20 x), getType (p21 x), getType (p22 x), getType (p23 x), getType (p24 x), getType (p25 x), getType (p26 x), getType (p27 x), getType (p28 x), getType (p29 x), getType (p30 x), getType (p31 x), getType (p32 x)] Nothing+ where+ p1 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t1+ p1 _ = Proxy+ p2 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t2+ p2 _ = Proxy+ p3 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t3+ p3 _ = Proxy+ p4 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t4+ p4 _ = Proxy+ p5 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t5+ p5 _ = Proxy+ p6 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t6+ p6 _ = Proxy+ p7 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t7+ p7 _ = Proxy+ p8 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t8+ p8 _ = Proxy+ p9 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t9+ p9 _ = Proxy+ p10 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t10+ p10 _ = Proxy+ p11 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t11+ p11 _ = Proxy+ p12 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t12+ p12 _ = Proxy+ p13 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t13+ p13 _ = Proxy+ p14 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t14+ p14 _ = Proxy+ p15 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t15+ p15 _ = Proxy+ p16 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t16+ p16 _ = Proxy+ p17 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t17+ p17 _ = Proxy+ p18 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t18+ p18 _ = Proxy+ p19 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t19+ p19 _ = Proxy+ p20 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t20+ p20 _ = Proxy+ p21 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t21+ p21 _ = Proxy+ p22 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t22+ p22 _ = Proxy+ p23 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t23+ p23 _ = Proxy+ p24 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t24+ p24 _ = Proxy+ p25 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t25+ p25 _ = Proxy+ p26 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t26+ p26 _ = Proxy+ p27 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t27+ p27 _ = Proxy+ p28 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t28+ p28 _ = Proxy+ p29 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t29+ p29 _ = Proxy+ p30 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t30+ p30 _ = Proxy+ p31 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t31+ p31 _ = Proxy+ p32 :: Proxy (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) -> Proxy t32+ p32 _ = Proxy++{-++var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];++var hasTypeTuple = n => {+ if (n < 2) {+ return '';+ }++ var l = ['\n',+ 'instance (HasType t1'+ ];+ for (var i = 1; i < n; i++) {+ l = l.concat([', HasType t', i + 1]);+ }+ l = l.concat([') => HasType (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') where\n']);++ l = l.concat([' getType x = Type "Tuple" [getType (p1 x)']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', getType (p', i + 1, ' x)']);+ }+ l = l.concat(['] Nothing\n']);+++ l = l.concat([' where\n']);+ var f = ['(t1'];+ for (var i = 1; i < n; i++) {+ f = f.concat([', t', i + 1]);+ }+ f = f.concat([')']).join('');+ for (var i = 0; i < n; i++) {+ l = l.concat([+ ' p', i + 1, ' :: Proxy ', f, ' -> Proxy t', i + 1, '\n',+ ' p', i + 1, ' _ = Proxy\n',+ ]);+ }++ return l.join('');+};++-}
+ library/Fluid/Val.hs view
@@ -0,0 +1,559 @@+{-# LANGUAGE DeriveGeneric #-}+module Fluid.Val+ ( Val(..)+ , ApiVal(..)+ , Wrap(..)+ , Struct(..)+ , Enumeral(..)+ --+ , FromVal(..)+ , ToVal(..)+ , getMember+ , fromValFromJson+ , combineObjects+ ) where++import qualified Data.HashMap.Lazy as HML+import qualified Data.Map as Map+import qualified Data.Vector as V+import Control.Monad (mzero)+import Control.Applicative ((<|>))+import Data.Aeson+import Data.Aeson.Types (parseMaybe)+import Data.Map (Map)+import Data.Text (Text)+import Data.Int+import Data.Word+import Data.Scientific+import GHC.Generics (Generic)++import Fluid.Types+import Fluid.Prim++data Val+ = Val'Const Const+ | Val'Prim Prim+ | Val'ApiVal ApiVal+ | Val'List [Val]+ deriving (Show, Eq)++instance ToJSON Val where+ toJSON = \case+ Val'Const c -> toJSON c+ Val'ApiVal v -> toJSON v+ Val'List l -> toJSON l+ Val'Prim p -> toJSON p++instance FromJSON Val where+ parseJSON = \case+ Null -> return $ Val'Const Const'Null+ Number n -> return $ Val'Const $ Const'Number n+ String s -> return $ Val'Const $ Const'String s+ Bool b -> return $ Val'Const $ Const'Bool b+ Array arr -> Val'List <$> (mapM parseJSON $ V.toList arr)+ v@Object{} -> Val'ApiVal <$> parseJSON v++data ApiVal+ = ApiVal'Struct Struct+ | ApiVal'Enumeral Enumeral+ deriving (Show, Eq)++instance ToJSON ApiVal where+ toJSON = \case+ ApiVal'Struct s -> toJSON s+ ApiVal'Enumeral e -> toJSON e++instance FromJSON ApiVal where+ parseJSON v =+ (ApiVal'Enumeral <$> parseJSON v) <|>+ (ApiVal'Struct <$> parseJSON v)++data Wrap = Wrap+ { w :: Const+ } deriving (Show, Eq)++data Struct = Struct+ { m :: Map MemberName Val+ } deriving (Show, Eq, Generic)++instance ToJSON Struct where+ toJSON Struct{m} = toJSON m++instance FromJSON Struct where+ parseJSON v = Struct <$> parseJSON v++data Enumeral = Enumeral+ { tag :: EnumeralName+ , m :: Maybe (Map MemberName Val)+ } deriving (Show, Eq, Generic)++instance ToJSON Enumeral where+ toJSON Enumeral{tag,m} = object $ [ "tag" .= tag ] ++ case m of+ Nothing -> []+ Just m' -> concatMap (\(MemberName k,v) -> [ k .= v ]) (Map.toList m')++instance FromJSON Enumeral where+ parseJSON (Object o) = do+ tag <- o .: "tag"+ let tagless = HML.delete "tag" o+ if HML.size o == 1+ then pure $ Enumeral tag Nothing+ else Enumeral tag <$> (Just <$> parseJSON (Object tagless))+ parseJSON _ = mzero++--++class ToVal a where+ toVal :: a -> Val++instance ToVal () where+ toVal () = Val'Const Const'Null++instance ToVal Bool where+ toVal b = Val'Const $ Const'Bool b++instance ToVal Text where+ toVal s = Val'Const $ Const'String s++intToVal :: Integral a => a -> Val+intToVal n = Val'Const $ Const'Number (fromInteger $ toInteger n)++instance ToVal Int where+ toVal = intToVal++instance ToVal Int8 where+ toVal i = Val'Prim $ Prim'I8 i++instance ToVal Int16 where+ toVal i = Val'Prim $ Prim'I16 i++instance ToVal Int32 where+ toVal i = Val'Prim $ Prim'I32 i++instance ToVal Int64 where+ toVal i = Val'Prim $ Prim'I64 i++instance ToVal Word where+ toVal = intToVal++instance ToVal Word8 where+ toVal u = Val'Prim $ Prim'U8 u++instance ToVal Word16 where+ toVal u = Val'Prim $ Prim'U16 u++instance ToVal Word32 where+ toVal u = Val'Prim $ Prim'U32 u++instance ToVal Word64 where+ toVal u = Val'Prim $ Prim'U64 u++instance ToVal Float where+ toVal f = Val'Prim $ Prim'F32 f++instance ToVal Double where+ toVal d = Val'Prim $ Prim'F64 d++instance ToVal a => ToVal (Maybe a) where+ toVal Nothing = Val'Const Const'Null+ toVal (Just v) = toVal v++instance (ToVal a, ToVal b) => ToVal (Either a b) where+ toVal m = Val'ApiVal $ ApiVal'Enumeral $ case m of+ Left l -> Enumeral "Left" (Just $ Map.singleton "left" (toVal l))+ Right r -> Enumeral "Right" (Just $ Map.singleton "right" (toVal r))++instance ToVal a => ToVal [a] where+ toVal list = Val'List $ map toVal list++instance (ToVal t1, ToVal t2) => ToVal (t1, t2) where+ toVal (t1, t2) = Val'List [toVal t1, toVal t2]++instance (ToVal t1, ToVal t2, ToVal t3) => ToVal (t1, t2, t3) where+ toVal (t1, t2, t3) = Val'List [toVal t1, toVal t2, toVal t3]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4) => ToVal (t1, t2, t3, t4) where+ toVal (t1, t2, t3, t4) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5) => ToVal (t1, t2, t3, t4, t5) where+ toVal (t1, t2, t3, t4, t5) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6) => ToVal (t1, t2, t3, t4, t5, t6) where+ toVal (t1, t2, t3, t4, t5, t6) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7) => ToVal (t1, t2, t3, t4, t5, t6, t7) where+ toVal (t1, t2, t3, t4, t5, t6, t7) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27, ToVal t28) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27, toVal t28]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27, ToVal t28, ToVal t29) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27, toVal t28, toVal t29]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27, ToVal t28, ToVal t29, ToVal t30) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27, toVal t28, toVal t29, toVal t30]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27, ToVal t28, ToVal t29, ToVal t30, ToVal t31) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27, toVal t28, toVal t29, toVal t30, toVal t31]++instance (ToVal t1, ToVal t2, ToVal t3, ToVal t4, ToVal t5, ToVal t6, ToVal t7, ToVal t8, ToVal t9, ToVal t10, ToVal t11, ToVal t12, ToVal t13, ToVal t14, ToVal t15, ToVal t16, ToVal t17, ToVal t18, ToVal t19, ToVal t20, ToVal t21, ToVal t22, ToVal t23, ToVal t24, ToVal t25, ToVal t26, ToVal t27, ToVal t28, ToVal t29, ToVal t30, ToVal t31, ToVal t32) => ToVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where+ toVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) = Val'List [toVal t1, toVal t2, toVal t3, toVal t4, toVal t5, toVal t6, toVal t7, toVal t8, toVal t9, toVal t10, toVal t11, toVal t12, toVal t13, toVal t14, toVal t15, toVal t16, toVal t17, toVal t18, toVal t19, toVal t20, toVal t21, toVal t22, toVal t23, toVal t24, toVal t25, toVal t26, toVal t27, toVal t28, toVal t29, toVal t30, toVal t31, toVal t32]++{-+var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var toValTuple = n => {+ if (n < 2) {+ return '';+ }++ var l = ['instance (ToVal t1'];+ for (var i = 1; i < n; i++) {+ l = l.concat([', ToVal t', i + 1]);+ }+ l = l.concat([') => ToVal (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') where\n']);++ l = l.concat([' toVal (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') = Val\'List [toVal t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', toVal t', i + 1]);+ }+ l = l.concat([']\n\n']);+ return l.join('');+};+-}+--++class FromVal a where+ fromVal :: Val -> Maybe a++instance FromVal () where+ fromVal (Val'Const Const'Null) = Just ()+ fromVal _ = Nothing++instance FromVal Bool where+ fromVal (Val'Const (Const'Bool b)) = Just b+ fromVal _ = Nothing++instance FromVal Text where+ fromVal (Val'Const (Const'String s)) = Just s+ fromVal _ = Nothing++intFromVal :: (Bounded i, Integral i) => Val -> Maybe i+intFromVal (Val'Const (Const'Number n)) = toBoundedInteger n+intFromVal _ = Nothing++instance FromVal Int where+ fromVal = intFromVal++instance FromVal Int8 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'I8 i) -> Just i+ _ -> Nothing++instance FromVal Int16 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'I16 i) -> Just i+ _ -> Nothing++instance FromVal Int32 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'I32 i) -> Just i+ _ -> Nothing++instance FromVal Int64 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'I64 i) -> Just i+ _ -> Nothing++instance FromVal Word where+ fromVal = intFromVal++instance FromVal Word8 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'U8 u) -> Just u+ _ -> Nothing++instance FromVal Word16 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'U16 u) -> Just u+ _ -> Nothing++instance FromVal Word32 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'U32 u) -> Just u+ _ -> Nothing++instance FromVal Word64 where+ fromVal = \case+ Val'Const (Const'Number n) -> toBoundedInteger n+ Val'Prim (Prim'U64 u) -> Just u+ _ -> Nothing++instance FromVal Float where+ fromVal (Val'Const (Const'Number n)) = Just $ toRealFloat n+ fromVal (Val'Prim (Prim'F32 f)) = Just f+ fromVal _ = Nothing++instance FromVal Double where+ fromVal (Val'Const (Const'Number n)) = Just $ toRealFloat n+ fromVal (Val'Prim (Prim'F64 f)) = Just f+ fromVal _ = Nothing++instance FromVal a => FromVal (Maybe a) where+ fromVal (Val'Const Const'Null) = Just Nothing+ fromVal v = Just <$> fromVal v++instance (FromVal a, FromVal b) => FromVal (Either a b) where+ fromVal (Val'ApiVal (ApiVal'Enumeral (Enumeral tag m))) = case (tag,m) of+ ("Left",Just m') -> Map.lookup "left" m' >>= \l -> Left <$> fromVal l+ ("Right",Just m') -> Map.lookup "right" m' >>= \r -> Right <$> fromVal r+ _ -> Nothing+ fromVal _ = Nothing++instance FromVal a => FromVal [a] where+ fromVal (Val'List list) = mapM fromVal list+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2) => FromVal (t1, t2) where+ fromVal (Val'List [t1, t2]) = (,) <$> fromVal t1 <*> fromVal t2+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3) => FromVal (t1, t2, t3) where+ fromVal (Val'List [t1, t2, t3]) = (,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4) => FromVal (t1, t2, t3, t4) where+ fromVal (Val'List [t1, t2, t3, t4]) = (,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5) => FromVal (t1, t2, t3, t4, t5) where+ fromVal (Val'List [t1, t2, t3, t4, t5]) = (,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6) => FromVal (t1, t2, t3, t4, t5, t6) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6]) = (,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7) => FromVal (t1, t2, t3, t4, t5, t6, t7) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7]) = (,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8]) = (,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9]) = (,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10]) = (,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11]) = (,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12]) = (,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13]) = (,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14]) = (,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15]) = (,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16]) = (,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17]) = (,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18]) = (,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19]) = (,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20]) = (,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21]) = (,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22]) = (,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23]) = (,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24]) = (,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25]) = (,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26]) = (,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27, FromVal t28) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27 <*> fromVal t28+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27, FromVal t28, FromVal t29) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27 <*> fromVal t28 <*> fromVal t29+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27, FromVal t28, FromVal t29, FromVal t30) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27 <*> fromVal t28 <*> fromVal t29 <*> fromVal t30+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27, FromVal t28, FromVal t29, FromVal t30, FromVal t31) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27 <*> fromVal t28 <*> fromVal t29 <*> fromVal t30 <*> fromVal t31+ fromVal _ = Nothing++instance (FromVal t1, FromVal t2, FromVal t3, FromVal t4, FromVal t5, FromVal t6, FromVal t7, FromVal t8, FromVal t9, FromVal t10, FromVal t11, FromVal t12, FromVal t13, FromVal t14, FromVal t15, FromVal t16, FromVal t17, FromVal t18, FromVal t19, FromVal t20, FromVal t21, FromVal t22, FromVal t23, FromVal t24, FromVal t25, FromVal t26, FromVal t27, FromVal t28, FromVal t29, FromVal t30, FromVal t31, FromVal t32) => FromVal (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where+ fromVal (Val'List [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32]) = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) <$> fromVal t1 <*> fromVal t2 <*> fromVal t3 <*> fromVal t4 <*> fromVal t5 <*> fromVal t6 <*> fromVal t7 <*> fromVal t8 <*> fromVal t9 <*> fromVal t10 <*> fromVal t11 <*> fromVal t12 <*> fromVal t13 <*> fromVal t14 <*> fromVal t15 <*> fromVal t16 <*> fromVal t17 <*> fromVal t18 <*> fromVal t19 <*> fromVal t20 <*> fromVal t21 <*> fromVal t22 <*> fromVal t23 <*> fromVal t24 <*> fromVal t25 <*> fromVal t26 <*> fromVal t27 <*> fromVal t28 <*> fromVal t29 <*> fromVal t30 <*> fromVal t31 <*> fromVal t32+ fromVal _ = Nothing++{-+var tuples = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32];+var fromValTuple = n => {+ if (n < 2) {+ return '';+ }++ var l = ['instance (FromVal t1'];+ for (var i = 1; i < n; i++) {+ l = l.concat([', FromVal t', i + 1]);+ }+ l = l.concat([') => FromVal (t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([') where\n']);++ l = l.concat([' fromVal (Val\'List [t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([', t', i + 1]);+ }+ l = l.concat([']) = (']);+ for (var i = 1; i < n; i++) {+ l = l.concat([',']);+ }+ l = l.concat([') <$> fromVal t1']);+ for (var i = 1; i < n; i++) {+ l = l.concat([' <*> fromVal t', i + 1]);+ }+ l = l.concat([+ '\n',+ ' fromVal _ = Nothing\n\n']);+ return l.join('');+};+-}++getMember :: FromVal a => Map MemberName Val -> MemberName -> Maybe a+getMember m n = fromVal =<< Map.lookup n m++fromValFromJson :: (FromVal b) => Value -> Maybe b+fromValFromJson x = fromVal =<< parseMaybe parseJSON x++combineObjects :: Value -> Value -> Value+combineObjects (Object x) (Object y) = Object $ HML.union x y+combineObjects _ _ = error "not objects"
+ package.yaml view
@@ -0,0 +1,67 @@+name: fluid-idl+version: '0.0.0'+category: Web+synopsis: Fluid | The Programmatic IDL+description: Fluid | The Programmatic IDL+maintainer: Joe Vargas+license: BSD3+extra-source-files:+- package.yaml+- README.md+ghc-options: -Wall+default-extensions:+- ConstraintKinds+- DeriveGeneric+- DuplicateRecordFields+- FlexibleContexts+- FlexibleInstances+- GADTs+- GeneralizedNewtypeDeriving+- KindSignatures+- LambdaCase+- MultiParamTypeClasses+- NamedFieldPuns+- OverloadedStrings+- RankNTypes+- ScopedTypeVariables+- TupleSections+- TypeApplications+- TypeOperators+library:+ dependencies:+ - aeson+ - base >= 4.7 && < 5+ - bytestring+ - containers+ - errors+ - exceptions+ - lifted-async+ - monad-control+ - monad-logger+ - mtl+ - random+ - scientific+ - safe-exceptions+ - text+ - text-conversions+ - unordered-containers+ - vector+ source-dirs: library+tests:+ fluid-suite:+ dependencies:+ - aeson+ - base >= 4.7 && < 5+ - fluid+ - containers+ - hspec+ - scientific+ - text+ - tuple+ - vector+ ghc-options:+ - -rtsopts+ - -threaded+ - -with-rtsopts=-N+ main: Spec.hs+ source-dirs: tests
+ tests/AstSpec.hs view
@@ -0,0 +1,128 @@+module AstSpec (spec) where++import qualified Data.Vector as V+import qualified Data.Map as Map+import Test.Hspec+import Data.Aeson+import Data.Aeson.Types++import Fluid.Types+import Fluid.Ast++parseAst :: Value -> Maybe Ast+parseAst = parseMaybe parseJSON++spec :: Spec+spec = do+ describe "parse basic types" $ do+ it "TypeName" $ shouldBe+ (parseMaybe parseJSON (String "MyName"))+ (Just $ TypeName "MyName")++ it "MemberName" $ shouldBe+ (parseMaybe parseJSON (String "MyName"))+ (Just $ MemberName "MyName")++ context "Type" $ do+ it "string only" $ shouldBe+ (parseMaybe parseJSON (String "MyType"))+ (Just $ Type "MyType" [])++ it "object with no param" $ shouldBe+ (parseMaybe parseJSON $ object ["n" .= String "MyType"])+ (Just $ Type "MyType" [])++ it "object with param" $ shouldBe+ (parseMaybe parseJSON $ object ["n" .= String "MyType", "p" .= String "MyParam"])+ (Just $ Type "MyType" ["MyParam"])++ describe "parse Ast" $ do+ it "Ref" $ shouldBe+ (parseAst $ object ["@" .= String "myRef"])+ (Just $ Ast'Ref $ Ref "myRef")++ context "If" $ do+ it "simple" $ shouldBe+ (parseAst $ Array $ V.fromList ["if", Bool True, "true", "false"])+ (Just $ Ast'If $ If+ (Ast'Const $ Const'Bool True)+ (Ast'Const $ Const'String "true")+ (Ast'Const $ Const'String "false"))++ context "Get" $ do+ it "simple yet not semantically correct" $ shouldBe+ (parseAst $ Array $ V.fromList ["get", Array $ V.fromList ["a","b","c"], Bool False])+ (Just $ Ast'Get $ Get ["a","b","c"] (Ast'Const $ Const'Bool False))++ context "Define" $ do+ it "simple" $ shouldBe+ (parseAst $ Array $ V.fromList ["def", "myVar", Bool True])+ (Just $ Ast'Define $ Define "myVar" (Ast'Const $ Const'Bool True))++ context "Lambda" $ do+ it "simple" $ shouldBe+ (parseAst $ Array $ V.fromList ["fn", Array $ V.fromList [ object [ "myVar" .= String "Int64" ] ], Bool True])+ (Just $ Ast'Lambda $ Lambda [("myVar", Type "Int64" [])] (Ast'Const $ Const'Bool True))++ context "List" $ do+ it "simple" $ shouldBe+ (parseAst $ toJSON [ "list", toJSON [String "hello"] ])+ (Just $ Ast'List $ List [Ast'Const $ Const'String "hello"])++ context "Tuple" $ do+ it "one element (sematically too small)" $ shouldBe+ (parseAst $ toJSON [ "tuple",String "hello" ])+ (Just $ Ast'Tuple $ Tuple [Ast'Const $ Const'String "hello"])++ it "more than one elements" $ shouldBe+ (parseAst $ toJSON [ "tuple", String "hello", String "world" ])+ (Just $ Ast'Tuple $ Tuple [Ast'Const $ Const'String "hello", Ast'Const $ Const'String "world"])++ context "Do" $ do+ it "simple" $ shouldBe+ (parseAst $ Array $ V.fromList ["do", Bool True])+ (Just $ Ast'Do $ Do [Ast'Const $ Const'Bool True])++ context "FnCall" $ do+ it "simple" $ shouldBe+ (parseAst $ Array $ V.fromList ["someFn", "one", Bool False])+ (Just $ Ast'FnCall $ FnCall (Ast'Ref $ Ref "someFn") [Ast'Const $ Const'String "one", Ast'Const $ Const'Bool False])++ context "EnumerationCall" $ do+ it "simple" $ shouldBe+ (parseAst $ object [ "n" .= String "MyEnum", "e" .= object [ "tag" .= String "MyTag" ] ])+ (Just $ Ast'EnumerationCall $ EnumerationCall "MyEnum" (Ast'Enumeral $ Enumeral "MyTag" Nothing))++ context "StructCall" $ do+ it "simple" $ shouldBe+ (parseAst $ object [ "n" .= String "MyStruct", "m" .= object [ "x" .= Bool True ] ])+ (Just $ Ast'StructCall $ StructCall "MyStruct" (Ast'Struct $ Struct $ Map.fromList [("x", Ast'Const $ Const'Bool True)]))++ context "HollowCall" $ do+ it "simple" $ shouldBe+ (parseAst $ object [ "n" .= String "MyCall" ])+ (Just $ Ast'HollowCall $ HollowCall "MyCall")++ context "Enumeral" $ do+ it "simple without members" $ shouldBe+ (parseAst $ object [ "tag" .= String "MyTag" ])+ (Just $ Ast'Enumeral $ Enumeral "MyTag" Nothing)+ it "simple with members" $ shouldBe+ (parseAst $ object [ "tag" .= String "MyTag", "x" .= Bool True ])+ (Just $ Ast'Enumeral $ Enumeral "MyTag" (Just $ Map.fromList [("x", Ast'Const $ Const'Bool True)]))++ context "Struct" $ do+ it "simple" $ shouldBe+ (parseAst $ object [ "key0" .= Bool True ])+ (Just $ Ast'Struct $ Struct $ Map.fromList [("key0", Ast'Const $ Const'Bool True)])++ context "Const" $ do+ it "Bool" $ shouldBe+ (parseAst $ Bool True)+ (Just $ Ast'Const $ Const'Bool True)+ it "String" $ shouldBe+ (parseAst $ String "Hello")+ (Just $ Ast'Const $ Const'String "Hello")+ it "Number" $ shouldBe+ (parseAst $ Number 12345)+ (Just $ Ast'Const $ Const'Number 12345)
+ tests/ClientSpec.hs view
@@ -0,0 +1,18 @@+module ClientSpec (spec) where++import Test.Hspec+import Data.Int++import Fluid.Client++_helloWorld :: Expr (Int32, Int32)+_helloWorld = dO $ do+ x <- def "x" (i32 0)+ f <- defn "f" (fn2 "a" "b" add)+ stmt $ tuple2 x (f -< (x, i32 10))++spec :: Spec+spec = do+ describe "compile" $ do+ it "should compile" $ do+ True `shouldBe` True
+ tests/ExprSpec.hs view
@@ -0,0 +1,13 @@+module ExprSpec where++import Test.Hspec++-- import Fluid.Types+-- import Fluid.Server.Types+-- import Fluid.Server.Expr++spec :: Spec+spec = do+ describe "expr" $ do+ it "" $ do+ True `shouldBe` True
+ tests/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
+ tests/ValSpec.hs view
@@ -0,0 +1,31 @@+module ValSpec (spec) where++import qualified Data.Map as Map+import Test.Hspec+import Data.Aeson+import Data.Aeson.Types+import Data.Text (Text)++import Fluid.Types+import Fluid.Val++spec :: Spec+spec = do+ describe "parse basic types from json" $ do+ it "Enumeral" $ shouldBe+ (parseMaybe parseJSON $ object [ "tag" .= ("None" :: Text) ])+ (Just $ Val'ApiVal $ ApiVal'Enumeral $ Enumeral "None" Nothing)+ it "Struct" $ shouldBe+ (parseMaybe parseJSON $ object [ "x" .= True ])+ (Just $ Val'ApiVal $ ApiVal'Struct $ Struct $ Map.fromList [("x", Val'Const $ Const'Bool True)] )+ it "Struct" $ shouldBe+ (parseMaybe parseJSON $ object [ "x" .= object [ "tag" .= ("None" :: Text) ] ])+ (Just $ Val'ApiVal $ ApiVal'Struct $ Struct $ Map.fromList [("x", Val'ApiVal $ ApiVal'Enumeral $ Enumeral "None" Nothing)] )+ describe "parse types from val" $ do+ context "Option" $ do+ it "None" $ shouldBe+ (fromVal $ Val'Const Const'Null)+ (Just Nothing :: Maybe (Maybe Bool))+ it "Some" $ shouldBe+ (fromVal $ Val'Const $ Const'Bool $ True)+ (Just (Just True) :: Maybe (Maybe Bool))