Agda-2.6.0.1/0000755000000000000000000000000013466402171010704 5ustar0000000000000000Agda-2.6.0.1/stack-8.0.2.yaml0000644000000000000000000000027513466402171013344 0ustar0000000000000000resolver: lts-9.21 extra-deps: - async-2.2.1 - text-1.2.3.1 # Local packages, usually specified by relative directory name packages: - '.' - 'src/fix-agda-whitespace' - 'src/size-solver' Agda-2.6.0.1/Setup.hs0000644000000000000000000000733413466402171012347 0ustar0000000000000000{-# LANGUAGE CPP #-} import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup import Distribution.Simple.BuildPaths (exeExtension) import Distribution.PackageDescription -- ASR (2019-01-10): The Cabal macro @MIN_VERSION_Cabal@ is avaliable -- from Cabal_>_1.24 so this macro is not supported with the -- "standard" GHC 7.10.3 which is shipped with Cabal 1.22.5.0. #if __GLASGOW_HASKELL__ >= 800 #if MIN_VERSION_Cabal(2,3,0) import Distribution.System ( buildPlatform ) #endif #endif import System.FilePath import System.Directory (makeAbsolute, removeFile) import System.Environment (getEnvironment) import System.Process import System.Exit import System.IO.Error (isDoesNotExistError) import Control.Monad (when, forM_) import Control.Exception (catch, throwIO) main :: IO () main = defaultMainWithHooks userhooks userhooks :: UserHooks userhooks = simpleUserHooks { buildHook = buildHook' , copyHook = copyHook' , instHook = instHook' } -- Install and copy hooks are default, but amended with .agdai files in data-files. instHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO () instHook' pd lbi hooks flags = instHook simpleUserHooks pd' lbi hooks flags where pd' = pd { dataFiles = concatMap expandAgdaExt $ dataFiles pd } copyHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> CopyFlags -> IO () copyHook' pd lbi hooks flags = copyHook simpleUserHooks pd' lbi hooks flags where pd' = pd { dataFiles = concatMap expandAgdaExt $ dataFiles pd } -- Used to add .agdai files to data-files expandAgdaExt :: FilePath -> [FilePath] expandAgdaExt fp | takeExtension fp == ".agda" = [ fp, toIFile fp ] | otherwise = [ fp ] toIFile :: FilePath -> FilePath toIFile file = replaceExtension file ".agdai" buildHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO () buildHook' pd lbi hooks flags = do -- build first buildHook simpleUserHooks pd lbi hooks flags -- then... let bdir = buildDir lbi agda = bdir "agda" "agda" <.> agdaExeExtension ddir <- makeAbsolute $ "src" "data" -- assuming we want to type check all .agda files in data-files -- current directory root of the package. putStrLn "Generating Agda library interface files..." forM_ (dataFiles pd) $ \fp -> when (takeExtension fp == ".agda") $ do let fullpath = ddir fp let fullpathi = toIFile fullpath -- remove existing interface file let handleExists e | isDoesNotExistError e = return () | otherwise = throwIO e removeFile fullpathi `catch` handleExists putStrLn $ "... " ++ fullpath ok <- rawSystem' ddir agda [ "--no-libraries", fullpath, "-v0" ] case ok of ExitSuccess -> return () ExitFailure _ -> die $ "Error: Failed to typecheck " ++ fullpath ++ "!" agdaExeExtension :: String -- ASR (2019-01-10): The Cabal macro @MIN_VERSION_Cabal@ is avaliable -- from Cabal_>_1.24 so this macro is not supported with the -- "standard" GHC 7.10.3 which is shipped with Cabal 1.22.5.0. #if __GLASGOW_HASKELL__ >= 800 #if MIN_VERSION_Cabal(2,3,0) agdaExeExtension = exeExtension buildPlatform #else agdaExeExtension = exeExtension #endif #else agdaExeExtension = exeExtension #endif rawSystem' :: FilePath -> String -> [String] -> IO ExitCode rawSystem' agda_datadir cmd args = do -- modify environment with Agda_datadir, so agda-executable will look -- for data-files in the right place e <- getEnvironment let e' = ("Agda_datadir", agda_datadir) : e (_,_,_,p) <- createProcess_ "rawSystem" (proc cmd args) { delegate_ctlc = True, env = Just e' } waitForProcess p Agda-2.6.0.1/stack-8.6.5.yaml0000644000000000000000000000023613466402171013352 0ustar0000000000000000resolver: lts-13.21 extra-deps: - EdisonCore-1.3.2.1 - data-hash-0.2.0.1 - equivalence-0.3.4 - geniplate-mirror-0.7.6 - EdisonAPI-1.3.1 - STMonadTrans-0.4.3 Agda-2.6.0.1/LICENSE0000644000000000000000000001247613466402171011723 0ustar0000000000000000Copyright (c) 2005-2019 remains with the authors. Agda 2 was originally written by Ulf Norell, partially based on code from Agda 1 by Catarina Coquand and Makoto Takeyama, and from Agdalight by Ulf Norell and Andreas Abel. Agda 2 is currently actively developed mainly by Andreas Abel, Guillaume Allais, Jesper Cockx, Nils Anders Danielsson, Philipp Hausmann, Fredrik Nordvall Forsberg, Ulf Norell, Víctor López Juan, Andrés Sicard-Ramírez, and Andrea Vezzosi. Further, Agda 2 has received contributions by, amongst others, Stevan Andjelkovic, Marcin Benke, Jean-Philippe Bernardy, Guillaume Brunerie, James Chapman, Dominique Devriese, Péter Diviánszky, Olle Fredriksson, Adam Gundry, Daniel Gustafsson, Kuen-Bang Hou (favonia), Patrik Jansson, Alan Jeffrey, Wolfram Kahl, Wen Kokke, Fredrik Lindblad, Francesco Mazzoli, Stefan Monnier, Darin Morrison, Guilhem Moulin, Nicolas Pouillard, Nobuo Yamashita, Christian Sattler, Makoto Takeyama and Tesla Ice Zhang. The full list of contributors is available at https://github.com/agda/agda/graphs/contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- The file src/full/Agda/Utils/Parser/ReadP.hs is Copyright (c) The University of Glasgow 2002 and is licensed under a BSD-like license as follows: 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 name of the University 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 UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW AND THE 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 UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE 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. -------------------------------------------------------------------------------- The file src/full/Agda/Utils/Maybe/Strict.hs (and the following license text?) uses the following license: Copyright (c) Roman Leshchinskiy 2006-2007 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. Neither the name of the author nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE 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 AUTHORS 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. Agda-2.6.0.1/Agda.cabal0000644000000000000000000007253413466402171012537 0ustar0000000000000000name: Agda version: 2.6.0.1 cabal-version: >= 1.10 build-type: Custom license: OtherLicense license-file: LICENSE author: Agda 2 was originally written by Ulf Norell, partially based on code from Agda 1 by Catarina Coquand and Makoto Takeyama, and from Agdalight by Ulf Norell and Andreas Abel. Agda 2 is currently actively developed mainly by Andreas Abel, Guillaume Allais, Jesper Cockx, Nils Anders Danielsson, Philipp Hausmann, Fredrik Nordvall Forsberg, Ulf Norell, Víctor López Juan, Andrés Sicard-Ramírez, and Andrea Vezzosi. Further, Agda 2 has received contributions by, amongst others, Stevan Andjelkovic, Marcin Benke, Jean-Philippe Bernardy, Guillaume Brunerie, James Chapman, Dominique Devriese, Péter Diviánszky, Olle Fredriksson, Adam Gundry, Daniel Gustafsson, Kuen-Bang Hou (favonia), Patrik Jansson, Alan Jeffrey, Wolfram Kahl, Wen Kokke, Fredrik Lindblad, Francesco Mazzoli, Stefan Monnier, Darin Morrison, Guilhem Moulin, Nicolas Pouillard, Nobuo Yamashita, Christian Sattler, and Makoto Takeyama and many more. maintainer: Ulf Norell homepage: http://wiki.portal.chalmers.se/agda/ bug-reports: https://github.com/agda/agda/issues category: Dependent types synopsis: A dependently typed functional programming language and proof assistant description: Agda is a dependently typed functional programming language: It has inductive families, which are similar to Haskell's GADTs, but they can be indexed by values and not just types. It also has parameterised modules, mixfix operators, Unicode characters, and an interactive Emacs interface (the type checker can assist in the development of your code). . Agda is also a proof assistant: It is an interactive system for writing and checking proofs. Agda is based on intuitionistic type theory, a foundational system for constructive mathematics developed by the Swedish logician Per Martin-Löf. It has many similarities with other proof assistants based on dependent types, such as Coq, Epigram and NuPRL. . This package includes both a command-line program (agda) and an Emacs mode. If you want to use the Emacs mode you can set it up by running @agda-mode setup@ (see the README). . Note that the Agda package does not follow the package versioning policy, because it is not intended to be used by third-party packages. tested-with: GHC == 7.10.3 GHC == 8.0.2 GHC == 8.2.2 GHC == 8.4.4 GHC == 8.6.5 extra-source-files: CHANGELOG.md README.md doc/user-manual.pdf src/full/undefined.h stack-7.10.3.yaml stack-8.0.2.yaml stack-8.2.2.yaml stack-8.4.4.yaml stack-8.6.5.yaml data-dir: src/data data-files: Agda.css agda.sty emacs-mode/*.el JS/agda-rts.js JS/biginteger.js lib/prim/Agda/Builtin/Bool.agda lib/prim/Agda/Builtin/Char.agda lib/prim/Agda/Builtin/Char/Properties.agda lib/prim/Agda/Builtin/Coinduction.agda lib/prim/Agda/Builtin/Cubical/Path.agda lib/prim/Agda/Builtin/Cubical/Id.agda lib/prim/Agda/Builtin/Cubical/Sub.agda lib/prim/Agda/Builtin/Cubical/Glue.agda lib/prim/Agda/Builtin/Equality.agda lib/prim/Agda/Builtin/Equality/Erase.agda lib/prim/Agda/Builtin/Equality/Rewrite.agda lib/prim/Agda/Builtin/Float.agda lib/prim/Agda/Builtin/FromNat.agda lib/prim/Agda/Builtin/FromNeg.agda lib/prim/Agda/Builtin/FromString.agda lib/prim/Agda/Builtin/IO.agda lib/prim/Agda/Builtin/Int.agda lib/prim/Agda/Builtin/List.agda lib/prim/Agda/Builtin/Nat.agda lib/prim/Agda/Builtin/Reflection.agda lib/prim/Agda/Builtin/Sigma.agda lib/prim/Agda/Builtin/Size.agda lib/prim/Agda/Builtin/Strict.agda lib/prim/Agda/Builtin/String.agda lib/prim/Agda/Builtin/String/Properties.agda lib/prim/Agda/Builtin/TrustMe.agda lib/prim/Agda/Builtin/Unit.agda lib/prim/Agda/Builtin/Word.agda lib/prim/Agda/Builtin/Word/Properties.agda lib/prim/Agda/Primitive.agda lib/prim/Agda/Primitive/Cubical.agda MAlonzo/src/MAlonzo/*.hs postprocess-latex.pl source-repository head type: git location: https://github.com/agda/agda.git source-repository this type: git location: https://github.com/agda/agda.git tag: v2.6.0.1 flag cpphs default: False manual: True description: Use cpphs instead of cpp. flag debug default: False manual: True description: Enable debugging features that may slow Agda down. flag enable-cluster-counting default: False description: Enable the --count-clusters flag. (If enable-cluster-counting is False, then the --count-clusters flag triggers an error message.) -- ASR (2018-09-14). Every new setup dependency should also be added -- as a library dependency. See Issue #3225. custom-setup setup-depends: base >= 4.8.0.0 && < 4.13 , Cabal >= 1.22.5.0 && < 2.5 , filepath >= 1.4.0.0 && < 1.5 , process >= 1.2.3.0 && < 1.7 , directory >= 1.2.2.0 && < 1.4 library hs-source-dirs: src/full include-dirs: src/full if flag(cpphs) -- We don't write an upper bound for cpphs because the -- `build-tools` field can not be modified in Hackage. -- If your change the lower bound of cpphs also change it in the -- `.travis.yml` file [Issue #2315]. build-tools: cpphs >= 1.20.8 ghc-options: -pgmP cpphs -optP --cpp if flag(debug) cpp-options: -DDEBUG if flag(enable-cluster-counting) cpp-options: -DCOUNT_CLUSTERS build-depends: text-icu == 0.7.* if os(windows) build-depends: Win32 >= 2.3.1.0 && < 2.7 -- Agda cannot be built with GHC 8.6.1 due to a compiler bug, see -- Agda Issue #3344. if impl(ghc == 8.6.1) buildable: False -- Agda cannot be built with Windows and GHC 8.6.3 due to a compiler -- bug, see Agda Issue #3657. if os(windows) && impl(ghc == 8.6.3) buildable: False build-depends: aeson >= 0.11.3.0 && < 1.5 , array >= 0.5.1.0 && < 0.6 , async >= 2.2 && < 2.3 , base >= 4.8.0.0 && < 4.13 , binary >= 0.7.3.0 && < 0.9 , blaze-html >= 0.8 && < 0.10 , boxes >= 0.1.3 && < 0.2 , bytestring >= 0.10.6.0 && < 0.11 , containers >= 0.5.6.2 && < 0.7 , data-hash >= 0.2.0.0 && < 0.3 , deepseq >= 1.4.1.1 && < 1.5 , directory >= 1.2.2.0 && < 1.4 -- EdisonCore 1.3.2 doesn't compile with GHC 7.10.*. , EdisonCore == 1.3.1.1 || >= 1.3.2.1 && < 1.4 , edit-distance >= 0.2.1.2 && < 0.3 , equivalence >= 0.3.2 && < 0.4 -- exceptions-0.8 instead of 0.10 because of stack , exceptions >= 0.8 && < 0.11 , filepath >= 1.4.0.0 && < 1.5 , geniplate-mirror >= 0.6.0.6 && < 0.8 , gitrev >= 1.3.1 && < 2.0 -- hashable 1.2.0.10 makes library-test 10x -- slower. The issue was fixed in hashable 1.2.1.0. -- https://github.com/tibbe/hashable/issues/57. , hashable >= 1.2.1.0 && < 1.3 -- There is a "serious bug" -- (https://hackage.haskell.org/package/hashtables-1.2.0.2/changelog) -- in hashtables 1.2.0.0/1.2.0.1. This bug seems to -- have made Agda much slower (infinitely slower?) in -- some cases. , hashtables >= 1.2.0.2 && < 1.3 , haskeline >= 0.7.2.1 && < 0.8 , ieee754 >= 0.7.8 && < 0.9 -- mtl-2.1 contains a severe bug. -- -- mtl >= 2.2 && < 2.2.1 doesn't export Control.Monad.Except. , mtl >= 2.2.1 && < 2.3 , murmur-hash >= 0.1 && < 0.2 , pretty >= 1.1.2.0 && < 1.2 , process >= 1.2.3.0 && < 1.7 , regex-tdfa >= 1.2.2 && < 1.3 , split >= 0.2.0.0 && < 0.2.3.4 , stm >= 2.4.4 && < 2.6 , strict >= 0.3.2 && < 0.4 , template-haskell >= 2.10.0.0 && < 2.15 , time >= 1.5.0.1 && < 1.9 , unordered-containers >= 0.2.5.0 && < 0.3 , uri-encode >= 1.5.0.4 && < 1.6 -- In hTags the mtl library must be compiled with the version of -- transformers shipped with GHC, so we use that version in Agda (see, -- for example, Issue #2983). if impl(ghc >= 8.6.4) && impl(ghc < 8.6.6) build-depends: transformers == 0.5.6.2 if impl(ghc >= 8.4) && impl(ghc < 8.6.4) build-depends: transformers == 0.5.5.0 -- ASR (2018-10-16). Required for supporting GHC 8.4.1, 8.4.2 and -- 8.4.3. See Issue #3277. if impl(ghc >= 8.4.1) && impl(ghc <= 8.4.3) build-depends: text >= 1.2.3.0 && < 1.3 else build-depends: text >= 1.2.3.1 && < 1.3 if impl(ghc >= 8.0) && impl(ghc < 8.4) build-depends: transformers == 0.5.2.0 -- ASR (2018-09-14). We add the dependency on the filemanip library -- due to Issue #3225. if impl(ghc < 8.0) build-depends: transformers == 0.4.2.0 , filemanip >= 0.3.6.2 && < 0.4 -- zlib >= 0.6.1 is broken with GHC < 7.10.3. See Issue 1518. if impl(ghc < 7.10.3) build-depends: zlib >= 0.4.0.1 && < 0.6.1 else build-depends: zlib >= 0.4.0.1 && < 0.7 if impl(ghc < 8.0) -- provide/emulate `Data.Semigroups` API for pre-GHC8 build-depends: semigroups == 0.18.* -- We don't write upper bounds for Alex nor Happy because the -- `build-tools` field can not be modified in Hackage. Agda doesn't -- build with Alex 3.2.0 and segfaults with 3.2.2. build-tools: alex >= 3.1.0 && < 3.2.0 || == 3.2.1 || >= 3.2.3 , happy >= 1.19.4 exposed-modules: Agda.Auto.Auto Agda.Auto.Options Agda.Auto.CaseSplit Agda.Auto.Convert Agda.Auto.NarrowingSearch Agda.Auto.SearchControl Agda.Auto.Syntax Agda.Auto.Typecheck Agda.Benchmarking Agda.Compiler.Backend Agda.Compiler.CallCompiler Agda.Compiler.Common Agda.Compiler.JS.Compiler Agda.Compiler.JS.Syntax Agda.Compiler.JS.Substitution Agda.Compiler.JS.Pretty Agda.Compiler.MAlonzo.Coerce Agda.Compiler.MAlonzo.Compiler Agda.Compiler.MAlonzo.Encode Agda.Compiler.MAlonzo.HaskellTypes Agda.Compiler.MAlonzo.Misc Agda.Compiler.MAlonzo.Pragmas Agda.Compiler.MAlonzo.Pretty Agda.Compiler.MAlonzo.Primitives Agda.Compiler.ToTreeless Agda.Compiler.Treeless.AsPatterns Agda.Compiler.Treeless.Builtin Agda.Compiler.Treeless.Compare Agda.Compiler.Treeless.EliminateDefaults Agda.Compiler.Treeless.EliminateLiteralPatterns Agda.Compiler.Treeless.Erase Agda.Compiler.Treeless.GuardsToPrims Agda.Compiler.Treeless.Identity Agda.Compiler.Treeless.NormalizeNames Agda.Compiler.Treeless.Pretty Agda.Compiler.Treeless.Simplify Agda.Compiler.Treeless.Subst Agda.Compiler.Treeless.Uncase Agda.Compiler.Treeless.Unused Agda.ImpossibleTest Agda.Interaction.AgdaTop Agda.Interaction.BasicOps Agda.Interaction.SearchAbout Agda.Interaction.CommandLine Agda.Interaction.EmacsCommand Agda.Interaction.EmacsTop Agda.Interaction.JSONTop Agda.Interaction.FindFile Agda.Interaction.Highlighting.Common Agda.Interaction.Highlighting.Dot Agda.Interaction.Highlighting.Emacs Agda.Interaction.Highlighting.Generate Agda.Interaction.Highlighting.HTML Agda.Interaction.Highlighting.JSON Agda.Interaction.Highlighting.Precise Agda.Interaction.Highlighting.Range Agda.Interaction.Highlighting.Vim Agda.Interaction.Highlighting.LaTeX Agda.Interaction.Imports Agda.Interaction.InteractionTop Agda.Interaction.Response Agda.Interaction.MakeCase Agda.Interaction.Monad Agda.Interaction.Library Agda.Interaction.Library.Base Agda.Interaction.Library.Parse Agda.Interaction.Options Agda.Interaction.Options.Help Agda.Interaction.Options.IORefs Agda.Interaction.Options.Lenses Agda.Interaction.Options.Warnings Agda.Main Agda.Syntax.Abstract.Copatterns Agda.Syntax.Abstract.Name Agda.Syntax.Abstract.Pattern Agda.Syntax.Abstract.PatternSynonyms Agda.Syntax.Abstract.Pretty Agda.Syntax.Abstract.Views Agda.Syntax.Abstract Agda.Syntax.Builtin Agda.Syntax.Common Agda.Syntax.Concrete.Attribute Agda.Syntax.Concrete.Definitions Agda.Syntax.Concrete.Fixity Agda.Syntax.Concrete.Generic Agda.Syntax.Concrete.Name Agda.Syntax.Concrete.Operators.Parser Agda.Syntax.Concrete.Operators.Parser.Monad Agda.Syntax.Concrete.Operators Agda.Syntax.Concrete.Pattern Agda.Syntax.Concrete.Pretty Agda.Syntax.Concrete Agda.Syntax.DoNotation Agda.Syntax.Fixity Agda.Syntax.IdiomBrackets Agda.Syntax.Info Agda.Syntax.Internal Agda.Syntax.Internal.Defs Agda.Syntax.Internal.Generic Agda.Syntax.Internal.Names Agda.Syntax.Internal.Pattern Agda.Syntax.Internal.SanityCheck Agda.Syntax.Literal Agda.Syntax.Notation Agda.Syntax.Parser.Alex Agda.Syntax.Parser.Comments Agda.Syntax.Parser.Layout Agda.Syntax.Parser.LexActions Agda.Syntax.Parser.Lexer Agda.Syntax.Parser.Literate Agda.Syntax.Parser.LookAhead Agda.Syntax.Parser.Monad Agda.Syntax.Parser.Parser Agda.Syntax.Parser.StringLiterals Agda.Syntax.Parser.Tokens Agda.Syntax.Parser Agda.Syntax.Position Agda.Syntax.Reflected Agda.Syntax.Scope.Base Agda.Syntax.Scope.Monad Agda.Syntax.Translation.AbstractToConcrete Agda.Syntax.Translation.ConcreteToAbstract Agda.Syntax.Translation.InternalToAbstract Agda.Syntax.Translation.ReflectedToAbstract Agda.Syntax.Treeless Agda.Termination.CallGraph Agda.Termination.CallMatrix Agda.Termination.CutOff Agda.Termination.Inlining Agda.Termination.Monad Agda.Termination.Order Agda.Termination.RecCheck Agda.Termination.SparseMatrix Agda.Termination.Semiring Agda.Termination.TermCheck Agda.Termination.Termination Agda.TheTypeChecker Agda.TypeChecking.Abstract Agda.TypeChecking.CheckInternal Agda.TypeChecking.CompiledClause Agda.TypeChecking.CompiledClause.Compile Agda.TypeChecking.CompiledClause.Match Agda.TypeChecking.Constraints Agda.TypeChecking.Conversion Agda.TypeChecking.Coverage Agda.TypeChecking.Coverage.Match Agda.TypeChecking.Coverage.SplitTree Agda.TypeChecking.Datatypes Agda.TypeChecking.DeadCode Agda.TypeChecking.DisplayForm Agda.TypeChecking.DropArgs Agda.TypeChecking.Empty Agda.TypeChecking.EtaContract Agda.TypeChecking.EtaExpand Agda.TypeChecking.Errors Agda.TypeChecking.Free Agda.TypeChecking.Free.Lazy Agda.TypeChecking.Free.Old Agda.TypeChecking.Free.Precompute Agda.TypeChecking.Free.Reduce Agda.TypeChecking.Forcing Agda.TypeChecking.Functions Agda.TypeChecking.Generalize Agda.TypeChecking.IApplyConfluence Agda.TypeChecking.Implicit Agda.TypeChecking.Injectivity Agda.TypeChecking.Inlining Agda.TypeChecking.InstanceArguments Agda.TypeChecking.Irrelevance Agda.TypeChecking.Level Agda.TypeChecking.LevelConstraints Agda.TypeChecking.MetaVars Agda.TypeChecking.MetaVars.Mention Agda.TypeChecking.MetaVars.Occurs Agda.TypeChecking.Monad.Base Agda.TypeChecking.Monad.Benchmark Agda.TypeChecking.Monad.Builtin Agda.TypeChecking.Monad.Caching Agda.TypeChecking.Monad.Closure Agda.TypeChecking.Monad.Constraints Agda.TypeChecking.Monad.Context Agda.TypeChecking.Monad.Debug Agda.TypeChecking.Monad.Env Agda.TypeChecking.Monad.Imports Agda.TypeChecking.Monad.MetaVars Agda.TypeChecking.Monad.Mutual Agda.TypeChecking.Monad.Open Agda.TypeChecking.Monad.Options Agda.TypeChecking.Monad.Signature Agda.TypeChecking.Monad.SizedTypes Agda.TypeChecking.Monad.State Agda.TypeChecking.Monad.Statistics Agda.TypeChecking.Monad.Trace Agda.TypeChecking.Monad Agda.TypeChecking.Names Agda.TypeChecking.Patterns.Abstract Agda.TypeChecking.Patterns.Internal Agda.TypeChecking.Patterns.Match Agda.TypeChecking.Polarity Agda.TypeChecking.Positivity Agda.TypeChecking.Positivity.Occurrence Agda.TypeChecking.Pretty Agda.TypeChecking.Primitive Agda.TypeChecking.Primitive.Cubical Agda.TypeChecking.ProjectionLike Agda.TypeChecking.Quote Agda.TypeChecking.ReconstructParameters Agda.TypeChecking.RecordPatterns Agda.TypeChecking.Records Agda.TypeChecking.Reduce Agda.TypeChecking.Reduce.Fast Agda.TypeChecking.Reduce.Monad Agda.TypeChecking.Rewriting Agda.TypeChecking.Rewriting.NonLinMatch Agda.TypeChecking.Rules.Application Agda.TypeChecking.Rules.Builtin Agda.TypeChecking.Rules.Builtin.Coinduction Agda.TypeChecking.Rules.Data Agda.TypeChecking.Rules.Decl Agda.TypeChecking.Rules.Def Agda.TypeChecking.Rules.Display Agda.TypeChecking.Rules.LHS Agda.TypeChecking.Rules.LHS.Implicit Agda.TypeChecking.Rules.LHS.Problem Agda.TypeChecking.Rules.LHS.ProblemRest Agda.TypeChecking.Rules.LHS.Unify Agda.TypeChecking.Rules.Record Agda.TypeChecking.Rules.Term Agda.TypeChecking.Serialise Agda.TypeChecking.Serialise.Base Agda.TypeChecking.Serialise.Instances Agda.TypeChecking.Serialise.Instances.Abstract Agda.TypeChecking.Serialise.Instances.Common Agda.TypeChecking.Serialise.Instances.Compilers Agda.TypeChecking.Serialise.Instances.Highlighting Agda.TypeChecking.Serialise.Instances.Internal Agda.TypeChecking.Serialise.Instances.Errors Agda.TypeChecking.SizedTypes Agda.TypeChecking.SizedTypes.Solve Agda.TypeChecking.SizedTypes.Syntax Agda.TypeChecking.SizedTypes.Utils Agda.TypeChecking.SizedTypes.WarshallSolver Agda.TypeChecking.Sort Agda.TypeChecking.Substitute Agda.TypeChecking.Substitute.Class Agda.TypeChecking.Substitute.DeBruijn Agda.TypeChecking.SyntacticEquality Agda.TypeChecking.Telescope Agda.TypeChecking.Telescope.Path Agda.TypeChecking.Unquote Agda.TypeChecking.Warnings Agda.TypeChecking.With Agda.Utils.AffineHole Agda.Utils.AssocList Agda.Utils.Bag Agda.Utils.Benchmark Agda.Utils.BiMap Agda.Utils.Char Agda.Utils.Cluster Agda.Utils.Empty Agda.Utils.Environment Agda.Utils.Except Agda.Utils.Either Agda.Utils.Favorites Agda.Utils.FileName Agda.Utils.Float Agda.Utils.Functor Agda.Utils.Function Agda.Utils.Geniplate Agda.Utils.Graph.AdjacencyMap.Unidirectional Agda.Utils.Graph.TopSort Agda.Utils.Hash Agda.Utils.HashMap Agda.Utils.Haskell.Syntax Agda.Utils.Impossible Agda.Utils.IndexedList Agda.Utils.IntSet.Infinite Agda.Utils.IO Agda.Utils.IO.Binary Agda.Utils.IO.Directory Agda.Utils.IO.TempFile Agda.Utils.IO.UTF8 Agda.Utils.IORef Agda.Utils.Lens Agda.Utils.Lens.Examples Agda.Utils.List Agda.Utils.ListT Agda.Utils.Map Agda.Utils.Maybe Agda.Utils.Maybe.Strict Agda.Utils.Memo Agda.Utils.Monad Agda.Utils.Monoid Agda.Utils.NonemptyList Agda.Utils.Null Agda.Utils.Parser.MemoisedCPS Agda.Utils.Parser.ReadP Agda.Utils.PartialOrd Agda.Utils.Permutation Agda.Utils.Pointer Agda.Utils.POMonoid Agda.Utils.Pretty Agda.Utils.SemiRing Agda.Utils.Singleton Agda.Utils.Size Agda.Utils.String Agda.Utils.Suffix Agda.Utils.Three Agda.Utils.Time Agda.Utils.Trie Agda.Utils.Tuple Agda.Utils.TypeLevel Agda.Utils.TypeLits Agda.Utils.Update Agda.Utils.VarSet Agda.Utils.Warshall Agda.Utils.WithDefault Agda.Utils.Zipper Agda.Version Agda.VersionCommit other-modules: Paths_Agda -- Initially, we disable all the warnings. ghc-options: -w -- This option must be the first one after disabling the warnings. See -- Issue #2094. if impl(ghc >= 8.0) ghc-options: -Wunrecognised-warning-flags ghc-options: -fwarn-deprecated-flags -fwarn-deriving-typeable -fwarn-dodgy-exports -fwarn-dodgy-foreign-imports -fwarn-dodgy-imports -fwarn-duplicate-exports -fwarn-empty-enumerations -fwarn-hi-shadowing -fwarn-identities -fwarn-incomplete-patterns -fwarn-inline-rule-shadowing -fwarn-missing-fields -fwarn-missing-methods -fwarn-missing-signatures -fwarn-tabs -fwarn-typed-holes -fwarn-overflowed-literals -fwarn-overlapping-patterns -fwarn-unrecognised-pragmas -fwarn-unticked-promoted-constructors -fwarn-unused-do-bind -fwarn-warnings-deprecations -fwarn-wrong-do-bind -- These options will be removed in GHC 8.0.1. if impl(ghc < 8.0) ghc-options: -fwarn-context-quantification -fwarn-duplicate-constraints -fwarn-pointless-pragmas if impl(ghc >= 8.0) ghc-options: -Wmissing-pattern-synonym-signatures -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -Wsemigroup -Wunused-foralls if impl(ghc >= 8.2) ghc-options: -Wcpp-undef -- ASR TODO (2017-07-23): `make haddock` fails when -- this flag is on. -- -Wmissing-home-modules -Wsimplifiable-class-constraints -Wunbanged-strict-patterns if impl(ghc >= 8.6) ghc-options: -Winaccessible-code default-language: Haskell2010 default-extensions: ConstraintKinds , DataKinds , DefaultSignatures , DeriveFoldable , DeriveFunctor , DeriveTraversable , ExistentialQuantification , FlexibleContexts , FlexibleInstances , FunctionalDependencies , LambdaCase , MultiParamTypeClasses , MultiWayIf , NamedFieldPuns , OverloadedStrings , RankNTypes , RecordWildCards , ScopedTypeVariables , StandaloneDeriving , TypeSynonymInstances , TupleSections executable agda hs-source-dirs: src/main main-is: Main.hs build-depends: Agda -- A version range on Agda generates a warning with -- some versions of Cabal and GHC -- (e.g. cabal-install version 1.24.0.2 compiled -- using version 1.24.2.0 of the Cabal library and -- GHC 8.2.1 RC1). -- Nothing is used from the following package, -- except for the prelude. , base >= 4.8.0.0 && < 6 default-language: Haskell2010 -- If someone installs Agda with the setuid bit set, then the -- presence of +RTS may be a security problem (see GHC bug #3910). -- However, we sometimes recommend people to use +RTS to control -- Agda's memory usage, so we want this functionality enabled by -- default. ghc-options: -rtsopts executable agda-mode hs-source-dirs: src/agda-mode main-is: Main.hs other-modules: Paths_Agda build-depends: base >= 4.8.0.0 && < 4.13 , directory >= 1.2.2.0 && < 1.4 , filepath >= 1.4.0.0 && < 1.5 , process >= 1.2.3.0 && < 1.7 default-language: Haskell2010 Agda-2.6.0.1/CHANGELOG.md0000644000000000000000000134146413466402171012532 0ustar0000000000000000Release notes for Agda version 2.6.0.1 ====================================== Installation and infrastructure ------------------------------- * Added support for GHC 8.6.5. List of all closed issues ------------------------- For 2.6.0.1, the following issues have been closed (see [bug tracker](https://github.com/agda/agda/issues)): - [#3685](https://github.com/agda/agda/issues/3685): Support GHC 8.6.5 - [#3692](https://github.com/agda/agda/issues/3692): Omission of absurd patterns in automatically added absurd clauses causes too optimistic polarity. - [#3694](https://github.com/agda/agda/issues/3694): Importing Agda.Builtin.Size in one module affects another module - [#3696](https://github.com/agda/agda/issues/3696): Make `AgdaAny` polykinded? - [#3697](https://github.com/agda/agda/issues/3697): Panic when checking non-Setω data definitions with --type-in-type - [#3701](https://github.com/agda/agda/issues/3701): [ re agda/agda-stdlib#710 ] toNat for machine words is injective - [#3731](https://github.com/agda/agda/issues/3731): GHC backend thinks that a constructor called 'main' is the main program - [#3742](https://github.com/agda/agda/issues/3742): Strange error message for code that combines mutual and abstract Release notes for Agda version 2.6.0 ==================================== Highlights ---------- * Added support for [Cubical Agda](https://agda.readthedocs.io/en/v2.6.0/language/cubical.html) which adds new features such as univalence and higher inductive types to Agda. * Added support for ML-style [automatic generalization of variables](https://agda.readthedocs.io/en/v2.6.0/language/generalization-of-declared-variables.html). * Added a new sort ``Prop`` of [definitionally proof-irrelevant propositions](https://agda.readthedocs.io/en/v2.6.0/language/prop.html). * The implementation of [instance search](https://agda.readthedocs.io/en/v2.6.0/language/instance-arguments.html) got a major overhaul and no longer supports overlapping instances (unless enabled by a flag). Installation and infrastructure ------------------------------- * Added support for GHC 8.6.4. * Interface files for all builtin and primitive files are now re-generated each time Agda is installed. Syntax ------ * Agda now supports implicit generalization of declared variables. Variables to be generalized can declared with the new keyword `variable`. For example: ```agda postulate Con : Set variable Γ Δ θ : Con ``` Declared variables are automatically generalized in type signatures, module telescopes and data type and record parameters and indices: ```agda postulate Sub : Con → Con → Set id : Sub Γ Γ -- -- equivalent to -- id : {Γ : Con} → Sub Γ Γ _∘_ : Sub Θ Δ → Sub Γ Θ → Sub Γ Δ -- -- equivalent to -- _∘_ : {Γ Δ Θ : Con} → Sub Θ Δ → Sub Γ Θ → Sub Γ Δ ``` See the [user manual](https://agda.readthedocs.io/en/v2.6.0/language/generalization-of-declared-variables.html) for more details. * Data type and record definitions separated from their type signatures can no longer repeat the types of the parameters, but can bind implicit parameters by name [Issue [#1886](https://github.com/agda/agda/issues/1886)]. This is now allowed ```agda data D {a b} (A : Set a) (B : Set b) : Set (a ⊔ lsuc b) data D {b = b} A B where mkD : (A → Set b) → D A B ``` but this is not ```agda data I (A : Set) : Set data I (A : Set) where ``` * The label used for named implicit arguments can now be different from the name of the bound variable [Issue [#952](https://github.com/agda/agda/issues/952)]. Example, ```agda id₁ : {A = X : Set} → X → X id₁ x = x id₂ : ∀ {B = X} → X → X id₂ {B = X} x = id₁ {A = X} x test : Nat test = id₁ {A = Nat} 5 + id₂ {B = Nat} 6 ``` Only implicit and instance arguments can have a label and either or both of the label and bound variable can be `_`. Labeled bindings with a type signature can only bind a single variable. For instance, the type `Set` has to be repeated here: ```agda const : {A = X : Set} {B = Y : Set} → X → Y → X const x _ = x ``` * The rules for parsing of patterns have changed slightly [Issue [#3400](https://github.com/agda/agda/issues/3400)]. Now projections are treated similarly to constructors: In a pattern name parts coming from projections can only be used as part of projections, constructors or pattern synonyms. They cannot be used as variables, or as part of the name of the defined value. Examples: * The following code used to be syntactically ambiguous, but is now parsed, because A can no longer be used as a variable: ```agda record R : Set₂ where field _A : Set₁ open R r : R r A = Set ``` * On the other hand the following code is no longer parsed: ```agda record R : Set₁ where field ⟨_+_⟩ : Set open R + : Set → Set + A = A ``` Type checking ------------- * Agda now supports a cubical mode which adds new features from [Cubical Type Theory](https://arxiv.org/abs/1611.02108), including univalence and higher inductive types. Option `--cubical` enables the cubical mode, and cubical primitives are defined in the module `Agda.Primitive.Cubical`. See the [user manual](https://agda.readthedocs.io/en/v2.6.0/language/cubical.html) for more info. * Agda now supports the new sort ``Prop`` of [definitionally proof-irrelevant propositions](https://hal.inria.fr/hal-01859964). Option `--prop` enables the `Prop` universe but is off by default. Option `--no-prop` disables the `Prop` universe. See the [user manual](https://agda.readthedocs.io/en/v2.6.0/language/prop.html) for more details. In the absense of `Prop`, the sort `Set` is the lowest sort, thus, the sort annotation `: Set` can be ommitted if the sort is constrained to be weakly below `Set`. For instance: ```agda {-# OPTIONS --no-prop #-} data Wrap A : Set where wrap : A → Wrap A ``` In contrast, when `--prop` is enabled the sort of `A` could be either `Set` or `Prop` so this code no longer typechecks. * Agda now allows omitting absurd clauses in case one of the pattern variable inhabits an obviously empty type [Issue [#1086](https://github.com/agda/agda/issues/1086)]. For example: ```agda f : Fin 1 → Nat f zero = 0 -- f (suc ()) -- this clause is no longer required ``` Absurd clauses are still required in case deep pattern matching is needed to expose the absurd variable, or if there are no non-absurd clauses. Due to the changes to the coverage checker required for this new feature, Agda will now sometimes construct a different case when there are multiple valid splitting orders. In some cases this may impact the constraints that Agda is able to solve (for example, see [#673](https://github.com/agda/agda-stdlib/pull/673) on the standard library). * Since Agda 2.5.3, the hiding is considered part of the name in the insertion of implicit arguments. Until Agda 2.5.2, the following code was rejected: ```agda test : {{X : Set}} {X : Set} → Set test {X = X} = X ``` The rationale was that named argument `X` is given with the wrong hiding. The new rationale is that the hiding is considered part of the name, distinguishing `{{X}}` from `{X}`. This language change was accidential and has not been documented in the 2.5.3 release notes. * Agda no longer allows case splitting on irrelevant arguments of record types (see Issue [#3056](https://github.com/agda/agda/issues/3056)). * Metavariables in module telescopes are now sometimes frozen later [Issue [#1063](https://github.com/agda/agda/issues/1063)]. Metavariables created in the types of module parameters used to be frozen right after the module's first mutual block had been type-checked (unless, perhaps, if the module itself was contained in a mutual block). Now they are instead frozen at the end of the module (with a similar caveat regarding an outer mutual block). * When `--without-K` is enabled, Agda no longer allows datatypes with large indices. For example, the following definition of equality is now forbidden when `--without-K` is enabled: ```agda data _≡₀_ {ℓ} {A : Set ℓ} (x : A) : A → Set where refl : x ≡₀ x ``` * The termination checker now also looks for recursive calls in the type of definitions. This fixes an issue where Agda allowed very dependent types [Issue [#1556](https://github.com/agda/agda/issues/1556)]. This change affects induction-induction, e.g. ```agda mutual data Cxt : Set where ε : Cxt _,_ : (Γ : Cxt) (A : Ty Γ) → Cxt data Ty : (Γ : Cxt) → Set where u : ∀ Γ → Ty Γ Π : ∀ Γ (A : Ty Γ) (B : Ty (Γ , A)) → Ty Γ mutual f : Cxt → Cxt f ε = ε f (Γ , T) = (f Γ , g Γ T) g : ∀ Γ → Ty Γ → Ty (f Γ) g Γ (u .Γ) = u (f Γ) g Γ (Π .Γ A B) = Π (f Γ) (g Γ A) (g (Γ , A) B) ``` The type of `g` contains a call `g Γ _ --> f Γ` which is now taken into account during termination checking. Instance search --------------- * Instance argument resolution now also applies when there are unconstrained metavariables in the type of the argument. For example, if there is a single instance `eqBool : Eq Bool` in scope, then an instance argument `{{eq : Eq _}}` will be solved to `eqBool`, setting the value of the metavariable `_` to `Bool` in the process. * By default, Agda no longer allows overlapping instances. Two instances are defined to overlap if they could both solve the instance goal when given appropriate solutions for their recursive (instance) arguments. Agda used to choose between undecidable instances based on the result of recursive instance search, but this lead to an exponential slowdown in instance resolution. Overlapping instances can be enabled with the flag `--overlapping-instances`. * Explicit arguments are no longer automatically turned into instance arguments for the purpose of recursive instance search. Instead, explicit arguments are left unresolved and will thus never be used. If an instance is declared which has explicit arguments, Agda will raise a warning that this instance will never be considered by instance search. * Instance arguments that are already solved by conversion checking are no longer ignored by instance search. Thus the constructor of the unit type must now be explicitly be declared as an instance in order to be considered by instance search: ```agda record ⊤ : Set where instance constructor tt ``` * Instances are now (correctly) required to be in scope to be eligible (see Issue [#1913](https://github.com/agda/agda/issues/1913) and Issue [#2489](https://github.com/agda/agda/issues/2489) ). This means that you can no longer import instances from parameterised modules by ```agda import Some.Module Arg₁ Arg2 ``` without opening or naming the module. Reflection ---------- * New TC primitive `noConstraints` [Issue [#2351](https://github.com/agda/agda/issues/2351)]: ```agda noConstraints : ∀ {a} {A : Set a} → TC A → TC A ``` The computation `noConstraints m` fails if `m` gives rise to new, unsolved ["blocking"](https://github.com/agda/agda/blob/4900ef5fc61776381f3a5e9c94ef776375e9e1f1/src/full/Agda/TypeChecking/Monad/Constraints.hs#L160-L174) constraints. * New TC primitive `runSpeculative` [Issue [#3346](https://github.com/agda/agda/issues/3346)]: ``` runSpeculative : ∀ {a} {A : Set a} → TC (Σ A λ _ → Bool) → TC A ``` The computation `runSpeculative m` runs `m` and either keeps the new TC state (if the second component is `true`) or resets to the old TC state (if it is `false`). Interaction and error reporting ------------------------------- * A new command `agda2-elaborate-give` (C-c C-m) normalizes a goal input (it repects the C-u prefixes), type checks, and inserts the normalized term into the goal. * 'Solve constraints' (C-c C-s) now turns unsolved metavariables into new interaction holes (see Issue [#2273](https://github.com/agda/agda/issues/2273)). * Out-of-scope identifiers are no longer prefixed by a '.' dot [Issue [#3127](https://github.com/agda/agda/issues/3127)]. This notation could be confused with dot patterns, postfix projections, and irrelevance. Now Agda will do its best to make up fresh names for out-of-scope identifiers that do not conflict with any existing names. In addition, these names are marked as "(out of scope)" when printing the context. The change affects the printing of terms, e.g. in error messages and interaction, and the parsing of out-of-scope variables for case splitting (`C-c C-c` in emacs). * Shadowed local variables are now assigned fresh names in error messages and interactive goals [Issue [#572](https://github.com/agda/agda/issues/572)]. For example, consider the following piece of code: ```agda postulate P : Set -> Set test : (B : Set) -> P B -> P B test = λ p p -> {!!} ``` When asking for the goal type, Agda will now print the following: ``` Goal: P p₁ ———————————————————————————————————————————————————————————— p : P p₁ p = p₁ : Set (not in scope) ``` Shadowed top-level identifiers are printed using the qualified name, for example in ```agda module M where postulate A : Set test : Set → A test A = {!!} ``` Agda will now show the goal type as ``` Goal: M.A ———————————————————————————————————————————————————————————— A : Set ``` * When case splitting (`C-c C-c` in emacs), Agda will now filter out impossible cases (i.e. ones where at least one of the variables could be replaced by an absurd pattern `()`). If all the clauses produced by a case split are impossible, Agda will not filter out any of them. Pragmas and options ------------------- * Consistency checking of options used. Agda now checks that options used in imported modules are consistent with each other, e.g. a module using `--safe`, `--without-K`, `--no-universe-polymorphism` or `--no-sized-types` may only import modules with the same option, and modules using `--cubical` or `--prop` must in turn use the same option. If an interface file has been generated using different options compared to the current ones, Agda will now re-typecheck the file. [Issue [#2487](https://github.com/agda/agda/issues/2487)]. * New option `--cubical` to enable Cubical Agda. * New option `--prop` to enable the ``Prop`` sort, and `--no-prop` to disable it (default). * New options `--guardedness` and `--no-guardedness` [Issue [#1209](https://github.com/agda/agda/issues/1209)]. Constructor-based guarded corecursion is now only (meant to be) allowed if the `--guardedness` option is active. This option is active by default. The combination of constructor-based guarded corecursion and sized types is not allowed if `--safe` is used, and activating `--safe` turns off both `--guardedness` and `--sized-types` (because this combination is known to be inconsistent in the current implementation). If you want to use either constructor-based guarded corecursion or sized types in safe mode, then you can use `--safe --guardedness` or `--safe --sized-types` respectively (in this order). The option `--no-guardedness` turns off constructor-based guarded corecursion. * Option `--irrelevant-projections` is now off by default and not considered `--safe` any longer. Reason: There are consistency issues that may be systemic [Issue [#2170](https://github.com/agda/agda/issues/2170)]. * New option `--no-syntactic-equality` disables the syntactic equality shortcut used by the conversion checker. This will slow down typechecking in most cases, but makes the performance more predictable and stable under minor changes. * New option `--overlapping-instances` enables overlapping instances by performing recursive instance search during pruning of instance candidates (this used to be the default behaviour). Overlapping instances can be disabled with `--no-overlapping-instances` (default). * Option (and experimental feature) `--guardedness-preserving-type-constructors` has been removed. [Issue [#3180](https://github.com/agda/agda/issues/3180)]. * Deprecated options `--sharing` and `--no-sharing` now raise an error. * New primitive `primErase`. It takes a proof of equality and returns a proof of the same equality. `primErase eq` reduces to `refl` on the diagonal. `trustMe` is not a primitive anymore, it is implemented using `primErase`. The primitive is declared in `Agda.Builtin.Equality.Erase`. * The `REWRITE` builtin is now bound to the builtin equality type from `Agda.Builtin.Equality` in `Agda.Builtin.Equality.Rewrite` [Issue [#3318](https://github.com/agda/agda/issues/3318)]. * New primitives `primCharToNatInjective` and `primStringToListInjective` internalising the fact that `primCharToNat` and `primStringtoList` are injective functions. They are respectively bound in `Agda.Builtin.Char.Properties` and `Agda.Builtin.String.Properties`. * The option `--only-scope-checking` is now allowed together with `--safe`. * The option `--ignore-interfaces` no longer ignores the interfaces of builtin and primitive modules. For experts, there is the option `--ignore-all-interfaces` which also rechecks builtin and primitive files. * The following deprecated compiler pragmas have been removed: ``` {-# COMPILED f e #-} {-# COMPILED_TYPE A T #-} {-# COMPILED_DATA A D C1 .. CN #-} {-# COMPILED_DECLARE_DATA #-} {-# COMPILED_EXPORT f g #-} {-# IMPORT M #-} {-# HASKELL code #-} {-# COMPILED_UHC f e #-} {-# COMPILED_DATA_UHC A D C1 .. CN #-} {-# IMPORT_UHC M #-} {-# COMPILED_JS f e #-} ``` See the [user manual](https://agda.readthedocs.io/en/v2.6.0/language/foreign-function-interface.html) for how to use the `COMPILE` and `FOREIGN` pragmas that replaced these in Agda 2.5. ### New warnings * A declaration of the form `f : A` without an accompanying definition is no longer an error, but instead raises a warning. * A clause that has both an absurd pattern and a right-hand side is no longer an error, but instead raises a warning. * An import statement for `M` that mentions names not exported by `M` (in either `using`, `hiding`, or `renaming`) is no longer an error. Instead, Agda will raise a warning and ignore the names. * Pragma, primitive, module or import statements in a mutual block are no longer errors. Instead, Agda will raise a warning and ignore these statements. ### Pragmas and options concerning universes * New pragma `{-# NO_UNIVERSE_CHECK #-}`. The pragma `{-# NO_UNIVERSE_CHECK #-}` can be put in front of a data or record type to disable universe consistency checking locally. Example: ```agda {-# NO_UNIVERSE_CHECK #-} data U : Set where el : Set → U ``` Like the similar pragmas for disabling termination and positivity checking, `{-# NO_UNIVERSE_CHECK #-}` cannot be used with `--safe`. * New builtin `SETOMEGA`. Agda's top sort `Setω` is now defined as a builtin in `Agda.Primitive` and can be renamed when importing that module. * New option `--omega-in-omega`. The option `--omega-in-omega` enables the typing rule `Setω : Setω`. Example: ```agda {-# OPTIONS --omega-in-omega #-} open import Agda.Primitive data Type : Setω where el : ∀ {ℓ} → Set ℓ → Type ``` Like `--type-in-type`, this makes Agda inconsistent. However, code written using `--omega-in-omega` is still compatible with normal universe-polymorphic code and can be used in such files. Emacs mode ---------- * Jump-to-definition now works for record field names in record expressions and patterns. [Issue [#3120](https://github.com/agda/agda/issues/3120)] ```agda record R : Set₂ where field f : Set₁ exp : R exp = record { f = Set } pat : R → R pat r@record { f = X } = record r { f = X } ``` Jump-to-definition (`M-.` or middle-click) on any of these `f`s now jumps to the field declaration. * Commas "ʻ،⸲⸴⹁⹉、︐︑﹐﹑,、" and semi-colons "؛⁏፤꛶;︔﹔⍮⸵;" added to the input mode. * It is now possible to customise the highlighting of more text in pragmas [Issue [#2452](https://github.com/agda/agda/issues/2452)]. Some text was already highlighted. Now there is a specific face for the remaining text (`agda2-highlight-pragma-face`). LaTeX backend ------------- * The code environment has two new options, `inline` and `inline*`. These options are for typesetting inline code. The implementation of these options is a bit of a hack. Only use these options for typesetting a single line of code without multiple consecutive whitespace characters (except at the beginning of the line). When the option `inline*` is used space (`\AgdaSpace{}`) is added at the end of the code, and when `inline` is used space is not added. * Now highlighting commands for things like "this is an unsolved meta-variable" are applied on the outside of highlighting commands for things like "this is a postulate" [Issue [#2474](https://github.com/agda/agda/issues/2474)]. Example: Instead of generating `\AgdaPostulate{\AgdaUnsolvedMeta{F}}` Agda now generates `\AgdaUnsolvedMeta{\AgdaPostulate{F}}`. * The package `agda.sty` no longer selects any fonts, and no longer changes the input or font encodings [Issue [#3224](https://github.com/agda/agda/issues/3224)]. The new behaviour is the same as the old behaviour with the options `nofontsetup` and `noinputencodingsetup`. These options have been removed. One reason for this change is that several persons have received complaints from reviewers because they have unwittingly used non-standard fonts in submitted papers. Another is that the `utf8x` option to `inputenc` is now deprecated. Note that Agda code is now less likely to typeset properly out of the box. See the documentation for some hints about what to do if this affects you. * Some text was by default typeset in math mode when LuaLaTeX or XeLaTeX were used, and in text mode when pdfLaTeX was used. Now text mode is the default for all of these engines. * Typesetting of pragmas should now work better [Issue [#2452](https://github.com/agda/agda/issues/2452)]. The `\AgdaOption` command and `AgdaOption` colour have been replaced by `\AgdaPragma` and `AgdaPragma`. The `\AgdaPragma` command is used where `\AgdaOption` used to be used (for certain options), but also in other cases (for other options and certain other text in pragmas). * There is no longer any special treatment of the character `-` [Issue [#2452](https://github.com/agda/agda/issues/2452)]. This might, depending on things like what font your are using, mean that the token `--` is typeset like an en dash (–). However, this is not the case for at least one common monospace font (in at least one setting). * The default value of `\AgdaEmptySkip` has been changed from `\baselineskip` to `\abovedisplayskip`. This could mean that less vertical space is used to render empty lines in code blocks. HTML backend ------------ * New option `--html-highlight=[code,all,auto]`. The option `--html-highlight=code` makes the HTML-backend generate files with: 0. No HTML footer/header 1. Agda codes highlighted 2. Non-Agda code parts as-is 3. Output file extension as-is (i.e. `.lagda.md` becomes `.md`) 4. For ReStructuredText, a `.. raw:: html\n` will be inserted before every code blocks This makes it possible to use an ordinary Markdown/ReStructuredText processor to render the generated HTML. This will affect all the files involved in one compilation, making pure Agda code files rendered without HTML footer/header as well. To use `code` with literate Agda files and `all` with pure Agda files, use `--html-highlight=auto`, which means auto-detection. The old and default behaviour is still `--html-highlight=all`. List of all closed issues ------------------------- For 2.6.0, the following issues have been closed (see [bug tracker](https://github.com/agda/agda/issues)): - [#572](https://github.com/agda/agda/issues/572): Shadowed identifiers should be preceded by a dot when printed - [#723](https://github.com/agda/agda/issues/723): Instance search needs to know whether a meta must be a function type - [#758](https://github.com/agda/agda/issues/758): No highlighting for syntax declarations - [#887](https://github.com/agda/agda/issues/887): Case-split causes problems for coverage checker - [#952](https://github.com/agda/agda/issues/952): Parse named implicit pi {x = y : A} -> B - [#1003](https://github.com/agda/agda/issues/1003): No highlighting for ambiguous instance argument - [#1063](https://github.com/agda/agda/issues/1063): Freeze metas in module telescope after checking the module? - [#1086](https://github.com/agda/agda/issues/1086): Make absurd patterns not needed at toplevel - [#1209](https://github.com/agda/agda/issues/1209): Guardedness checker inconsistency with copatterns - [#1581](https://github.com/agda/agda/issues/1581): Fields of opened records sometimes highlighted, sometimes not - [#1602](https://github.com/agda/agda/issues/1602): NonStrict arguments should be allowed to occur relevantly in the type - [#1706](https://github.com/agda/agda/issues/1706): Feature request: ML-style forall-generalization - [#1764](https://github.com/agda/agda/issues/1764): Type in type and universe polymorphism - [#1886](https://github.com/agda/agda/issues/1886): Second copies of telescopes not checked? - [#1909](https://github.com/agda/agda/issues/1909): parameters are not dropped from reflected pattern lambda - [#1913](https://github.com/agda/agda/issues/1913): Names that are not in scope can sometimes be candidates for instance resolution - [#1995](https://github.com/agda/agda/issues/1995): Correct names in goal types after multiple renaming imports. - [#2044](https://github.com/agda/agda/issues/2044): Better diagnosis for failed instance search - [#2089](https://github.com/agda/agda/issues/2089): ''No such module'' is a rude error message for private modules - [#2153](https://github.com/agda/agda/issues/2153): PDF version of Language Documentation on readthedocs lacks most Unicode characters - [#2273](https://github.com/agda/agda/issues/2273): C-c C-s should put new goals instead of underscores for unknown subterms - [#2351](https://github.com/agda/agda/issues/2351): expose noConstraints to reflection framework - [#2452](https://github.com/agda/agda/issues/2452): The LaTeX backend does not handle options very well - [#2473](https://github.com/agda/agda/issues/2473): Don't reread the source code without checking that it is unchanged - [#2487](https://github.com/agda/agda/issues/2487): Options used for different modules must be consistent with each other, and options used when loading an interface must be consistent with those used when the interface was created - [#2489](https://github.com/agda/agda/issues/2489): Where clauses in functions leak instances to global instance search - [#2490](https://github.com/agda/agda/issues/2490): possible non-terminating inference of instance arguments? - [#2513](https://github.com/agda/agda/issues/2513): Extensible syntax for function space annotations - [#2548](https://github.com/agda/agda/issues/2548): Move the "Old Reference Manual" to the current documentation - [#2563](https://github.com/agda/agda/issues/2563): Improve documentation and error reporting related to instance resolution (especially unconstrained metavariables) - [#2579](https://github.com/agda/agda/issues/2579): Import statements with module instantiation should not trigger an error message - [#2618](https://github.com/agda/agda/issues/2618): Reflection and pattern-matching lambdas - [#2670](https://github.com/agda/agda/issues/2670): Instance arguments and multi-sorted algebras - [#2757](https://github.com/agda/agda/issues/2757): Proposal: split non-strict relevance into shape-irrelevance, parametricity, and runtime-irrelevance - [#2760](https://github.com/agda/agda/issues/2760): Relax instance search restriction on unconstrained metas - [#2774](https://github.com/agda/agda/issues/2774): Internal error with sized types - [#2783](https://github.com/agda/agda/issues/2783): Make more primitive/builtin modules safe? - [#2789](https://github.com/agda/agda/issues/2789): Narrow and broad options - [#2791](https://github.com/agda/agda/issues/2791): More illtyped meta solutions - [#2797](https://github.com/agda/agda/issues/2797): Relevance check missed for overloaded projection - [#2833](https://github.com/agda/agda/issues/2833): Coverage checker splits on result too eagerly - [#2837](https://github.com/agda/agda/issues/2837): The Emacs mode only handles LaTeX-based literate Agda - [#2872](https://github.com/agda/agda/issues/2872): Case splitting adds a dot in front of pattern matches on Chars - [#2880](https://github.com/agda/agda/issues/2880): Disallow FFI binding for defined functions when --safe is used - [#2892](https://github.com/agda/agda/issues/2892): 'With' should also abstract over the type of stripped dot patterns - [#2893](https://github.com/agda/agda/issues/2893): Display warnings also when an error is encountered - [#2899](https://github.com/agda/agda/issues/2899): Add a warning for infix notations without corresponding fixity declaration - [#2929](https://github.com/agda/agda/issues/2929): Turn "missing definition" into a warning - [#2936](https://github.com/agda/agda/issues/2936): Sort warning flags alphabetically in user manual - [#2939](https://github.com/agda/agda/issues/2939): make install-bin on a Mac can fail to install text-icu - [#2964](https://github.com/agda/agda/issues/2964): Mismatch between order of matching in clauses and case tree; subject reduction broken - [#2969](https://github.com/agda/agda/issues/2969): Module parameter is erased from dot pattern - [#2979](https://github.com/agda/agda/issues/2979): Rewriting matching does not respect eta rules - [#2993](https://github.com/agda/agda/issues/2993): Quadratic (failing) instance search - [#3010](https://github.com/agda/agda/issues/3010): Field of opened record does not get highlighted - [#3032](https://github.com/agda/agda/issues/3032): spurious meta in dot pattern - [#3056](https://github.com/agda/agda/issues/3056): Matching on irrelevant variable of dependent record type should not be allowed - [#3057](https://github.com/agda/agda/issues/3057): A module can export two definitions with the same name - [#3068](https://github.com/agda/agda/issues/3068): Add option to turn off syntactic equality check - [#3095](https://github.com/agda/agda/issues/3095): Would like to make hidden variable visible but it is created ambiguous - [#3102](https://github.com/agda/agda/issues/3102): Performance regression: very slow reduction in the presence of many module parameters - [#3114](https://github.com/agda/agda/issues/3114): Missing alpha-renaming when printing constraints - [#3120](https://github.com/agda/agda/issues/3120): No tooltips for record field names in record expressions - [#3122](https://github.com/agda/agda/issues/3122): Hidden record fields are not picked up from module in record expression - [#3124](https://github.com/agda/agda/issues/3124): De Bruijn index in lhs checking error message - [#3125](https://github.com/agda/agda/issues/3125): Internal error in InstanceArguments.hs:292 - [#3127](https://github.com/agda/agda/issues/3127): Notation for out-of-scope variables conflicts with notation for irrelevance - [#3128](https://github.com/agda/agda/issues/3128): Sigma builtin not added to setup, agdai file missing. - [#3130](https://github.com/agda/agda/issues/3130): Conflict between dot pattern and postfix projection - [#3137](https://github.com/agda/agda/issues/3137): Preserve Markdown as-is when outputting HTML - [#3138](https://github.com/agda/agda/issues/3138): Result splitter introduces pattern variable that conflicts with constructor - [#3139](https://github.com/agda/agda/issues/3139): Internal error in parser - [#3147](https://github.com/agda/agda/issues/3147): Non-linear as-patterns - [#3152](https://github.com/agda/agda/issues/3152): `give` in a do-block inserts spurious parentheses - [#3153](https://github.com/agda/agda/issues/3153): Type checker fails to infer missing signature of module parameter. - [#3161](https://github.com/agda/agda/issues/3161): Case splitter produces end-of-comment - [#3169](https://github.com/agda/agda/issues/3169): Doc for rewriting - [#3170](https://github.com/agda/agda/issues/3170): UnicodeDeclare fails with pdflatex from TeX Live 2018 - [#3175](https://github.com/agda/agda/issues/3175): Instance resolution fails with defined method - [#3176](https://github.com/agda/agda/issues/3176): Empty lambdas are sometimes considered definitionally equal, other times not - [#3180](https://github.com/agda/agda/issues/3180): Remove feature `--guardedness-preserving-type-constructors` - [#3188](https://github.com/agda/agda/issues/3188): Warnings disappear when fatal error is encountered - [#3195](https://github.com/agda/agda/issues/3195): Internal error at Auto/Typecheck.hs:373 - [#3196](https://github.com/agda/agda/issues/3196): Turning MissingDefinition into a warning - [#3200](https://github.com/agda/agda/issues/3200): Function marked as irrelevant when it isn't - [#3201](https://github.com/agda/agda/issues/3201): [ warning ] AbsurdPatternRequiresNoRHS - [#3205](https://github.com/agda/agda/issues/3205): [ cleanup + warning ] ModuleDoesntExport can be recovered from - [#3224](https://github.com/agda/agda/issues/3224): Switch from utf8x to utf8? Make agda.sty easier to maintain? - [#3235](https://github.com/agda/agda/issues/3235): Cannot pass backend flags via emacs variable `agda2-program-args` - [#3247](https://github.com/agda/agda/issues/3247): Support cabal-install >= 2.4.1.0 in the Makefile - [#3248](https://github.com/agda/agda/issues/3248): Max of two sizes less than i - [#3253](https://github.com/agda/agda/issues/3253): [ fix ] ignore duplicate declarations of libraries - [#3254](https://github.com/agda/agda/issues/3254): `cpphs` doesn't build with GHC 8.6.* - [#3256](https://github.com/agda/agda/issues/3256): Internal error at src/full/Agda/TypeChecking/Reduce.hs:148 - [#3257](https://github.com/agda/agda/issues/3257): Anonymous top-level modules can have names with multiple components - [#3258](https://github.com/agda/agda/issues/3258): Ordering the constructor names at Definition. - [#3262](https://github.com/agda/agda/issues/3262): Suboptimal placement of "missing with-clauses" error - [#3264](https://github.com/agda/agda/issues/3264): When refine leads to a termination error it should say so rather than "cannot refine" - [#3268](https://github.com/agda/agda/issues/3268): [ haddock ] Fix haddock formatting - [#3285](https://github.com/agda/agda/issues/3285): Internal error for syntax declaration - [#3302](https://github.com/agda/agda/issues/3302): Multiple definitions called _ are sometimes allowed, sometimes not - [#3307](https://github.com/agda/agda/issues/3307): `--no-unicode` bug: case splitting inside a pattern matching lambda still produces unicode arrows - [#3309](https://github.com/agda/agda/issues/3309): Use of irrelevant arguments with copatterns and irrelevant fields - [#3313](https://github.com/agda/agda/issues/3313): Add --html-highlight support for the HTML backend - [#3315](https://github.com/agda/agda/issues/3315): The primErase primitive is not safe - [#3318](https://github.com/agda/agda/issues/3318): Lots of primitives and builtins are not declared in the primitive/builtin modules - [#3320](https://github.com/agda/agda/issues/3320): Extra indentation when code is hidden - [#3323](https://github.com/agda/agda/issues/3323): Internal error with inconsistent irrelevance info between declaration and definition of data type - [#3338](https://github.com/agda/agda/issues/3338): Missing Definitions not recognised in instance search - [#3342](https://github.com/agda/agda/issues/3342): GHC panic on stack and GHC 7.10.3 - [#3344](https://github.com/agda/agda/issues/3344): Disable compilation with GHC 8.6.1 - [#3356](https://github.com/agda/agda/issues/3356): C-c C-s prints postfix projections by default - [#3363](https://github.com/agda/agda/issues/3363): The wiki should support HTTPS - [#3364](https://github.com/agda/agda/issues/3364): Funny scope error when trying to import as qualified - [#3366](https://github.com/agda/agda/issues/3366): Add a command line flag to change the extension of the files generated by the HTML backend - [#3368](https://github.com/agda/agda/issues/3368): Support GHC 8.6.2 - [#3370](https://github.com/agda/agda/issues/3370): [ fix ] < and > need to be in math mode in latex - [#3371](https://github.com/agda/agda/issues/3371): Document common LaTeX backend pitfalls - [#3372](https://github.com/agda/agda/issues/3372): Provide some simple LaTeX backend templates - [#3373](https://github.com/agda/agda/issues/3373): Wrap HTML in `raw` directive when working with ReStructuredText - [#3379](https://github.com/agda/agda/issues/3379): Adding a tutorial set in the readthedocs frontpage - [#3380](https://github.com/agda/agda/issues/3380): Too much erasure in strict backends - [#3394](https://github.com/agda/agda/issues/3394): Internal error in mutual block with unsolved implicit argument in termination checker - [#3400](https://github.com/agda/agda/issues/3400): Obscure parse error with copattern and infix field - [#3403](https://github.com/agda/agda/issues/3403): Internal error in Agda.TypeChecking.Rules.Term - [#3404](https://github.com/agda/agda/issues/3404): Positivity checker marks postulates as constant in mutual block - [#3407](https://github.com/agda/agda/issues/3407): Internal error at "src/full/Agda/TypeChecking/Reduce/Fast.hs:1338" - [#3409](https://github.com/agda/agda/issues/3409): No error if mapping the empty type to non-empty Haskell type - [#3410](https://github.com/agda/agda/issues/3410): ghc backend generates program that segfaults - [#3419](https://github.com/agda/agda/issues/3419): Allow unconstrained instances & disallow overlapping instances - [#3420](https://github.com/agda/agda/issues/3420): Inductive definitions live in a larger set --without-K - [#3425](https://github.com/agda/agda/issues/3425): Internal error at src/full/Agda/Termination/Monad.hs:177 - [#3426](https://github.com/agda/agda/issues/3426): Termination checking false positive when using "where" - [#3428](https://github.com/agda/agda/issues/3428): Another interal error in Substitute:72 when filling a hole - [#3431](https://github.com/agda/agda/issues/3431): Rewrite rule doesn't fire during conversion checking - [#3434](https://github.com/agda/agda/issues/3434): Regression related to instance resolution - [#3435](https://github.com/agda/agda/issues/3435): Performance regression - [#3439](https://github.com/agda/agda/issues/3439): Setω doesn’t respect --type-in-type - [#3441](https://github.com/agda/agda/issues/3441): Generate Level expressions with fewer parentheses - [#3442](https://github.com/agda/agda/issues/3442): Support GHC 8.6.3 - [#3443](https://github.com/agda/agda/issues/3443): "internal error" in Agda of December 7, 2018 - [#3444](https://github.com/agda/agda/issues/3444): `Setup.hs` is not generating the interface files - [#3445](https://github.com/agda/agda/issues/3445): case splitting attempts to shadow constructor - [#3451](https://github.com/agda/agda/issues/3451): The --no-sized-types option is broken - [#3452](https://github.com/agda/agda/issues/3452): Case split on irrelevant argument goes through but is later rejected - [#3454](https://github.com/agda/agda/issues/3454): Highlighting for incomplete pattern matching should be above highliting for non-exact split - [#3456](https://github.com/agda/agda/issues/3456): [ new ] Injectivity of prim(NatToChar/StringToList) - [#3461](https://github.com/agda/agda/issues/3461): Macro loop - [#3463](https://github.com/agda/agda/issues/3463): Impossible to give certain instance arguments by name? - [#3466](https://github.com/agda/agda/issues/3466): two definitionally equal terms are not equal - [#3471](https://github.com/agda/agda/issues/3471): Can't install via cabal-install on current Haskell Platform - [#3480](https://github.com/agda/agda/issues/3480): Parse error at EOF should be reported before EOF (especially if there is a long comment before EOF) - [#3483](https://github.com/agda/agda/issues/3483): Internal error at TypeChecking/Monad/Signature.hs:732 - [#3485](https://github.com/agda/agda/issues/3485): [ warnings ] for empty primitive blocks - [#3491](https://github.com/agda/agda/issues/3491): Internal error src/full/Agda/TypeChecking/Rules/LHS.hs:294 after pattern matching - [#3498](https://github.com/agda/agda/issues/3498): Internal error in activateLoadedFileCache - [#3501](https://github.com/agda/agda/issues/3501): Case split in let clause causes internal error - [#3503](https://github.com/agda/agda/issues/3503): Internal error in BasicOps - [#3514](https://github.com/agda/agda/issues/3514): Accidential language change in 2.5.3: hiding is now part of name when resolving hidden argument insertion - [#3517](https://github.com/agda/agda/issues/3517): Option consistency checking bug - [#3518](https://github.com/agda/agda/issues/3518): Performance regression - [#3521](https://github.com/agda/agda/issues/3521): Documentation: fixes a plural issue in copatterns - [#3526](https://github.com/agda/agda/issues/3526): Do not generate trivially impossible clause when case-splitting - [#3533](https://github.com/agda/agda/issues/3533): [ fix #3526 ] Remove trivially impossible clauses from case-split - [#3534](https://github.com/agda/agda/issues/3534): Problem finding higher-order instances - [#3536](https://github.com/agda/agda/issues/3536): Patternmatching on coinductive record fields breaks - [#3544](https://github.com/agda/agda/issues/3544): internal error @ TypeChecking/Forcing.hs:227 - [#3548](https://github.com/agda/agda/issues/3548): [ new ] Add support for compiling literate Org documents - [#3554](https://github.com/agda/agda/issues/3554): Type checker explosion - [#3561](https://github.com/agda/agda/issues/3561): fix typo: "FreBSD" => "FreeBSD" - [#3566](https://github.com/agda/agda/issues/3566): Missing name when printing type of definition of a record - [#3578](https://github.com/agda/agda/issues/3578): Pattern matching unifier normalizes too much - [#3586](https://github.com/agda/agda/issues/3586): Internal error in ConcreteToAbstract.hs:2217 - [#3590](https://github.com/agda/agda/issues/3590): Superlinear time required for simple code - [#3597](https://github.com/agda/agda/issues/3597): Agda loops on simple code with a record and a hole - [#3600](https://github.com/agda/agda/issues/3600): Size solver complains, explicit sizes work - [#3610](https://github.com/agda/agda/issues/3610): Support GHC 8.6.4 - [#3621](https://github.com/agda/agda/issues/3621): performance problem - [#3631](https://github.com/agda/agda/issues/3631): Performance with --no-universe-polymorphism - [#3638](https://github.com/agda/agda/issues/3638): Rewrite rules do not fire in goal normalization in parametrized module - [#3639](https://github.com/agda/agda/issues/3639): Argument to function created by tactic is lost - [#3640](https://github.com/agda/agda/issues/3640): Polarity: Size index check crashes due to wrong parameter number calculation - [#3641](https://github.com/agda/agda/issues/3641): Remove old compiler pragmas - [#3648](https://github.com/agda/agda/issues/3648): Agda could fail to build if a .agda-lib file exists in a parent directory - [#3651](https://github.com/agda/agda/issues/3651): internal error ghc backend - [#3657](https://github.com/agda/agda/issues/3657): Disable compilation with Windows and GHC 8.6.3 - [#3678](https://github.com/agda/agda/issues/3678): Two out-of-scope variables are given the same name - [#3687](https://github.com/agda/agda/issues/3687): Show module contents (C-c C-o) prints garbled names in clause Release notes for Agda version 2.5.4.2 ====================================== Installation and infrastructure ------------------------------- * Fixed installation with some old versions of `cabal-install` [Issue [#3225](https://github.com/agda/agda/issues/3225)]. * Using `cpp` instead of `cpphs` as the default preprocessor [Issue [#3223](https://github.com/agda/agda/issues/3223)]. * Added support for GHC 8.4.4. Other closed issues -------------------- For 2.5.4.2 the following issues have also been closed (see [bug tracker](https://github.com/agda/agda/issues)): - [#3177](https://github.com/agda/agda/issues/3177): Slow typechecking with unsolved instance constraint - [#3199](https://github.com/agda/agda/issues/3199): Panics when serialising absolute paths - [#3312](https://github.com/agda/agda/issues/3312): Crash in Substitute.hs Release notes for Agda version 2.5.4.1 ====================================== Installation and infrastructure ------------------------------- * Generated the interface file for the `Sigma.agda` built-in when installing Agda [Issue [#3128](https://github.com/agda/agda/issues/3128)]. Emacs mode ---------- * Light highlighting is no longer applied continuously, but only when the file is saved [Issue [#3119](https://github.com/agda/agda/issues/3119)]. Release notes for Agda version 2.5.4 ==================================== Installation and infrastructure ------------------------------- * Added support for GHC 8.2.2 and GHC 8.4.3. Note that GHC 8.4.* requires `cabal-install` ≥ 2.2.0.0. * Removed support for GHC 7.8.4. * Included user manual in PDF format in `doc/user-manual.pdf`. Language -------- * Call-by-need reduction. Compile-time weak-head evaluation is now call-by-need, but each weak-head reduction has a local heap, so sharing is not maintained between different reductions. The reduction machine has been rewritten from scratch and should be faster than the old one in all cases, even those not exploiting laziness. * Compile-time inlining. Simple definitions (that don't do any pattern matching) marked as INLINE are now also inlined at compile time, whereas before they were only inlined by the compiler backends. Inlining only triggers in function bodies and not in type signatures, to preserve goal types as far as possible. * Automatic inlining. Definitions satisfying the following criteria are now automatically inlined (can be disabled using the new NOINLINE pragma): - No pattern matching. - Uses each argument at most once. - Does not use all its arguments. Automatic inlining can be turned off using the flag `--no-auto-inline`. This can be useful when debugging tactics that may be affected by whether or not a particular definition is being inlined. ### Syntax * Do-notation. There is now builtin do-notation syntax. This means that `do` is a reserved keyword and cannot be used as an identifier. Do-blocks support lets and pattern matching binds. If the pattern in a bind is non-exhaustive the other patterns need to be handled in a `where`-clause (see example below). Example: ```agda filter : {A : Set} → (A → Bool) → List A → List A filter p xs = do x ← xs true ← return (p x) where false → [] return x ``` Do-blocks desugar to `_>>=_` and `_>>_` before scope checking, so whatever definitions of these two functions are in scope of the do-block will be used. More precisely: - Simple bind ```agda do x ← m m' ``` desugars to `m >>= λ x → m'`. - Pattern bind ```agda do p ← m where pᵢ → mᵢ m' ``` desugars to `m >>= λ { p → m'; pᵢ → mᵢ }`, where `pᵢ → mᵢ` is an arbitrary sequence of clauses and follows the usual layout rules for `where`. If `p` is exhaustive the `where` clause can be omitted. - Non-binding operation ```agda do m m' ``` desugars to `m >> m'`. - Let ```agda do let ds m ``` desugars to `let ds in m`, where `ds` is an arbitrary sequence of valid let-declarations. - The last statement in the do block must be a plain expression (no let or bind). Bind statements can use either `←` or `<-`. Neither of these are reserved, so code outside do-blocks can use identifiers with these names, but inside a do-block they would need to be used qualified or under different names. * Infix let declarations. [Issue [#917](https://github.com/agda/agda/issues/917)] Let declarations can now be defined in infix (or mixfix) style. For instance: ```agda f : Nat → Nat f n = let _!_ : Nat → Nat → Nat x ! y = 2 * x + y in n ! n ``` * Overloaded pattern synonyms. [Issue [#2787](https://github.com/agda/agda/issues/2787)] Pattern synonyms can now be overloaded if all candidates have the same *shape*. Two pattern synonym definitions have the same shape if they are equal up to variable and constructor names. Shapes are checked at resolution time. For instance, the following is accepted: ```agda open import Agda.Builtin.Nat data List (A : Set) : Set where lnil : List A lcons : A → List A → List A data Vec (A : Set) : Nat → Set where vnil : Vec A 0 vcons : ∀ {n} → A → Vec A n → Vec A (suc n) pattern [] = lnil pattern [] = vnil pattern _∷_ x xs = lcons x xs pattern _∷_ y ys = vcons y ys lmap : ∀ {A B} → (A → B) → List A → List B lmap f [] = [] lmap f (x ∷ xs) = f x ∷ lmap f xs vmap : ∀ {A B n} → (A → B) → Vec A n → Vec B n vmap f [] = [] vmap f (x ∷ xs) = f x ∷ vmap f xs ``` * If the file has no top-level module header, the first module cannot have the same name as the file. [Issues [#2808](https://github.com/agda/agda/issues/2808) and [#1077](https://github.com/agda/agda/issues/1077)] This means that the following file `File.agda` is rejected: ```agda -- no module header postulate A : Set module File where -- inner module with the same name as the file ``` Agda reports `Illegal declarations(s) before top-level module` at the `postulate`. This is to avoid confusing scope errors in similar situations. If a top-level module header is inserted manually, the file is accepted: ```agda module _ where -- user written module header postulate A : Set module File where -- inner module with the same name as the file, ok ``` ### Pattern matching * Forced constructor patterns. Constructor patterns can now be dotted to indicate that Agda should not case split on them but rather their value is forced by the type of the other patterns. The difference between this and a regular dot pattern is that forced constructor patterns can still bind variables in their arguments. For example, ```agda open import Agda.Builtin.Nat data Vec (A : Set) : Nat → Set where nil : Vec A zero cons : (n : Nat) → A → Vec A n → Vec A (suc n) append : {A : Set} (m n : Nat) → Vec A m → Vec A n → Vec A (m + n) append .zero n nil ys = ys append (.suc m) n (cons .m x xs) ys = cons (m + n) x (append m n xs ys) ``` * Inferring the type of a function based on its patterns Agda no longer infers the type of a function based on the patterns used in its definition. [Issue [#2834](https://github.com/agda/agda/issues/2834)] This means that the following Agda program is no longer accepted: ```agda open import Agda.Builtin.Nat f : _ → _ f zero = zero f (suc n) = n ``` Agda now requires the type of the argument of `f` to be given explicitly. * Improved constraint solving for pattern matching functions Constraint solving for functions where each right-hand side has a distinct rigid head has been extended to also cover the case where some clauses return an argument of the function. A typical example is append on lists: ```agda _++_ : {A : Set} → List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ (xs ++ ys) ``` Agda can now solve constraints like `?X ++ ys == 1 ∷ ys` when `ys` is a neutral term. * Record expressions translated to copatterns Definitions of the form ```agda f ps = record { f₁ = e₁; ..; fₙ = eₙ } ``` are translated internally to use copatterns: ```agda f ps .f₁ = e₁ ... f ps .fₙ = eₙ ``` This means that `f ps` does not reduce, but thanks to η-equality the two definitions are equivalent. The change should lead to fewer big record expressions showing up in goal types, and potentially significant performance improvement in some cases. This may have a minor impact on with-abstraction and code using `--rewriting` since η-equality is not used in these cases. * When using `with`, it is now allowed to replace any pattern from the parent clause by a variable in the with clause. For example: ```agda f : List ℕ → List ℕ f [] = [] f (x ∷ xs) with x ≤? 10 f xs | p = {!!} ``` In the with clause, `xs` is treated as a let-bound variable with value `.x ∷ .xs` (where `.x : ℕ` and `.xs : List ℕ` are out of scope) and `p : Dec (.x ≤ 10)`. Since with-abstraction may change the type of variables, instantiations of variables in the with clause are type checked again after with-abstraction. ### Builtins * Added support for built-in 64-bit machine words. These are defined in `Agda.Builtin.Word` and come with two primitive operations to convert to and from natural numbers. ```agda Word64 : Set primWord64ToNat : Word64 → Nat primWord64FromNat : Nat → Word64 ``` Converting to a natural number is the trivial embedding, and converting from a natural number gives you the remainder modulo 2^64. The proofs of these theorems are not primitive, but can be defined in a library using `primTrustMe`. Basic arithmetic operations can be defined on `Word64` by converting to natural numbers, peforming the corresponding operation, and then converting back. The compiler will optimise these to use 64-bit arithmetic. For instance, ```agda addWord : Word64 → Word64 → Word64 addWord a b = primWord64FromNat (primWord64ToNat a + primWord64ToNat b) subWord : Word64 → Word64 → Word64 subWord a b = primWord64FromNat (primWord64ToNat a + 18446744073709551616 - primWord64ToNat b) ``` These compiles (in the GHC backend) to addition and subtraction on `Data.Word.Word64`. * New primitive primFloatLess and changed semantics of primFloatNumericalLess. `primFloatNumericalLess` now uses standard IEEE `<`, so for instance `NaN < x = x < NaN = false`. On the other hand `primFloatLess` provides a total order on `Float`, with `-Inf < NaN < -1.0 < -0.0 < 0.0 < 1.0 < Inf`. * The `SIZEINF` builtin is now given the name `∞` in `Agda.Builtin.Size` [Issue [#2931](https://github.com/agda/agda/issues/2931)]. Previously it was given the name `ω`. ### Reflection * New TC primitive: `declarePostulate`. [Issue [#2782](https://github.com/agda/agda/issues/2782)] ```agda declarePostulate : Arg Name → Type → TC ⊤ ``` This can be used to declare new postulates. The Visibility of the Arg must not be hidden. This feature fails when executed with `--safe` flag from command-line. Pragmas and options ------------------- * The `--caching` option is ON by default and is also a valid pragma. Caching can (sometimes) speed up re-typechecking in `--interaction` mode by reusing the result of the previous typechecking for the prefix of the file that has not changed (with a granularity at the level of declarations/mutual blocks). It can be turned off by passing ```--no-caching``` to ```agda``` or with the following at the top of your file. ```agda {-# OPTIONS --no-caching #-} ``` * The `--sharing` and `--no-sharing` options have been deprecated and do nothing. Compile-time evaluation is now always call-by-need. * BUILTIN pragmas can now appear before the top-level module header and in parametrized modules. [Issue [#2824](https://github.com/agda/agda/issues/2824)] ```agda {-# OPTIONS --rewriting #-} open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} -- here module TopLevel (A : Set) where {-# BUILTIN REWRITE _≡_ #-} -- or here ``` Note that it is still the case that built-ins cannot be bound if they depend on module parameters from an enclosing module. For instance, the following is illegal: ```agda module _ {a} {A : Set a} where data _≡_ (x : A) : A → Set a where refl : x ≡ x {-# BUILTIN EQUALITY _≡_ #-} ``` * Builtin `NIL` and `CONS` have been merged with `LIST`. When binding the `LIST` builtin, `NIL` and `CONS` are bound to the appropriate constructors automatically. This means that instead of writing ```agda {-# BUILTIN LIST List #-} {-# BUILTIN NIL [] #-} {-# BUILTIN CONS _∷_ #-} ``` you just write ```agda {-# BUILTIN LIST List #-} ``` Attempting to bind `NIL` or `CONS` results in a warning and has otherwise no effect. * The `--no-unicode` pragma prevents Agda from introducing unicode characters when pretty printing a term. Lambda, Arrows and Forall quantifiers are all replaced by their ascii only version. Instead of resorting to subscript suffixes, Agda uses ascii digit characters. * New option `--inversion-max-depth=N`. The depth is used to avoid looping due to inverting pattern matching for unsatisfiable constraints [Issue [#431](https://github.com/agda/agda/issues/431)]. This option is only expected to be necessary in pathological cases. * New option `--no-print-pattern-synonyms`. This disables the use of pattern synonyms in output from Agda. See [Issue [#2902](https://github.com/agda/agda/issues/2902)] for situations where this might be desirable. * New fine-grained control over the warning machinery: ability to (en/dis)able warnings on a one-by-one basis. * The command line option `--help` now takes an optional argument which allows the user to request more specific usage information about particular topics. The only one added so far is `warning`. * New pragma NOINLINE. ```agda {-# NOINLINE f #-} ``` Disables automatic inlining of `f`. * New pragma WARNING_ON_USAGE ``` {-# WARNING_ON_USAGE QName Message #} ``` Prints Message whenever QName is used. Emacs mode ---------- * Banana brackets have been added to the Agda input method. ``` \(( #x2985 LEFT WHITE PARENTHESIS \)) #x2986 RIGHT WHITE PARENTHESIS ``` * Result splitting will introduce the trailing hidden arguments, if there is nothing else todo [Issue [#2871](https://github.com/agda/agda/issues/2871)]. Example: ```agda data Fun (A : Set) : Set where mkFun : (A → A) → Fun A test : {A : Set} → Fun A test = ? ``` Splitting on the result here (`C-c C-c RET`) will append `{A}` to the left hand side. ```agda test {A} = ? ``` * Light highlighting is performed dynamically, even if the file is not loaded [Issue [#2794](https://github.com/agda/agda/issues/2794)]. This light highlighting is based on the token stream generated by Agda's lexer: the code is only highlighted if the file is lexically correct. If the Agda backend is not busy with something else, then the code is highlighted automatically in certain situations: * When the file is saved. * When Emacs has been idle, continuously, for a certain period of time (by default 0.2 s) after the last modification of the file, and the file has not been saved (or marked as being unmodified). This functionality can be turned off, and the time period can be customised. * Highlighting of comments is no longer handled by Font Lock mode [Issue [#2794](https://github.com/agda/agda/issues/2794)]. * The Emacs mode's syntax table has been changed. Previously `_` was treated as punctuation. Now it is treated in the same way as most other characters: if the standard syntax table assigns it the syntax class "whitespace", "open parenthesis" or "close parenthesis", then it gets that syntax class, and otherwise it gets the syntax class "word constituent". Compiler backends ----------------- * The GHC backend now automatically compiles BUILTIN LIST to Haskell lists. This means that it's no longer necessary to give a COMPILE GHC pragma for the builtin list type. Indeed, doing so has no effect on the compilation and results in a warning. * The GHC backend performance improvements. Generated Haskell code now contains approximate type signatures, which lets GHC get rid of many of the `unsafeCoerce`s. This leads to performance improvements of up to 50% of compiled code. * The GHC backend now compiles the `INFINITY`, `SHARP` and `FLAT` builtins in a different way [Issue [#2909](https://github.com/agda/agda/issues/2909)]. Previously these were compiled to (basically) nothing. Now the `INFINITY` builtin is compiled to `Infinity`, available from `MAlonzo.RTE`: ```haskell data Inf a = Sharp { flat :: a } type Infinity level a = Inf a ``` The `SHARP` builtin is compiled to `Sharp`, and the `FLAT` builtin is (by default) compiled to a corresponding destructor. Note that code that interacts with Haskell libraries may have to be updated. As an example, here is one way to print colists of characters using the Haskell function `putStr`: ```agda open import Agda.Builtin.Char open import Agda.Builtin.Coinduction open import Agda.Builtin.IO open import Agda.Builtin.Unit data Colist {a} (A : Set a) : Set a where [] : Colist A _∷_ : A → ∞ (Colist A) → Colist A {-# FOREIGN GHC data Colist a = Nil | Cons a (MAlonzo.RTE.Inf (Colist a)) type Colist' l a = Colist a fromColist :: Colist a -> [a] fromColist Nil = [] fromColist (Cons x xs) = x : fromColist (MAlonzo.RTE.flat xs) #-} {-# COMPILE GHC Colist = data Colist' (Nil | Cons) #-} postulate putStr : Colist Char → IO ⊤ {-# COMPILE GHC putStr = putStr . fromColist #-} ``` * `COMPILE GHC` pragmas have been included for the size primitives [Issue [#2879](https://github.com/agda/agda/issues/2879)]. LaTeX backend ------------- * The `code` environment can now take arguments [Issues [#2744](https://github.com/agda/agda/issues/2744) and [#2453](https://github.com/agda/agda/issues/2453)]. Everything from \begin{code} to the end of the line is preserved in the generated LaTeX code, and not treated as Agda code. The default implementation of the `code` environment recognises one optional argument, `hide`, which can be used for code that should be type-checked, but not typeset: ```latex \begin{code}[hide] open import Module \end{code} ``` The `AgdaHide` macro has not been removed, but has been deprecated in favour of `[hide]`. * The `AgdaSuppressSpace` and `AgdaMultiCode` environments no longer take an argument. Instead some documents need to be compiled multiple times. * The `--count-clusters` flag can now be given in `OPTIONS` pragmas. * The `nofontsetup` option to the LaTeX package `agda` was broken, and has (hopefully) been fixed [Issue [#2773](https://github.com/agda/agda/issues/2773)]. Fewer packages than before are loaded when `nofontsetup` is used, see `agda.sty` for details. Furthermore, if LuaLaTeX or XeLaTeX are not used, then the font encoding is no longer changed. * The new option `noinputencodingsetup` instructs the LaTeX package `agda` to not change the input encoding, and to not load the `ucs` package. * Underscores are now typeset using `\AgdaUnderscore{}`. The default implementation is `\_` (the command that was previously generated for underscores). Note that it is possible to override this implementation. * OtherAspects (unsolved meta variables, catchall clauses, etc.) are now correctly highlighted in the LaTeX backend (and the HTML one). [Issue [#2474](https://github.com/agda/agda/issues/2474)] * `postprocess-latex.pl` does not add extra spaces around tagged `\Agda*{}` commands anymore. HTML backend ------------ * An identifier (excluding bound variables), gets the identifier itself as an anchor, _in addition_ to the file position [Issue [#2756](https://github.com/agda/agda/issues/2756)]. In Agda 2.5.3, the identifier anchor would _replace_ the file position anchor [Issue [#2604](https://github.com/agda/agda/issues/2604)]. Symbolic anchors look like ```html ``` while file position anchors just give the character position in the file: ```html ``` Top-level module names do not get a symbolic anchor, since the position of a top-level module is defined to be the beginning of the file. Example: ```agda module Issue2604 where -- Character position anchor test1 : Set₁ -- Issue2604.html#test1 test1 = bla where bla = Set -- Only character position anchor test2 : Set₁ -- Issue2604.html#test2 test2 = bla where bla = Set -- Only character position anchor test3 : Set₁ -- Issue2604.html#test3 test3 = bla module M where -- Issue2604.html#M bla = Set -- Issue2604.html#M.bla module NamedModule where -- Issue2604.html#NamedModule test4 : Set₁ -- Issue2604.html#NamedModule.test4 test4 = M.bla module _ where -- Only character position anchor test5 : Set₁ -- Only character position anchor test5 = M.bla ``` List of closed issues --------------------- For 2.5.4, the following issues have been closed (see [bug tracker](https://github.com/agda/agda/issues)): - [#351](https://github.com/agda/agda/issues/351): Constraint solving for irrelevant metas - [#421](https://github.com/agda/agda/issues/421): Higher order positivity - [#431](https://github.com/agda/agda/issues/431): Constructor-headed function makes type-checker diverge - [#437](https://github.com/agda/agda/issues/437): Detect when something cannot be a function type - [#488](https://github.com/agda/agda/issues/488): Refining on user defined syntax mixes up the order of the subgoals - [#681](https://github.com/agda/agda/issues/681): Lack of visual state indicators in new Emacs mode - [#689](https://github.com/agda/agda/issues/689): Contradictory constraints should yield error - [#708](https://github.com/agda/agda/issues/708): Coverage checker not taking literal patterns into account properly - [#875](https://github.com/agda/agda/issues/875): Nonstrict irrelevance violated by implicit inference - [#964](https://github.com/agda/agda/issues/964): Allow unsolved metas in imported files - [#987](https://github.com/agda/agda/issues/987): --html anchors could be more informative - [#1054](https://github.com/agda/agda/issues/1054): Inlined Agda code in LaTeX backend - [#1131](https://github.com/agda/agda/issues/1131): Infix definitions not allowed in let definitions - [#1169](https://github.com/agda/agda/issues/1169): Auto fails with non-terminating function - [#1268](https://github.com/agda/agda/issues/1268): Hard to print type of variable if the type starts with an instance argument - [#1384](https://github.com/agda/agda/issues/1384): Order of constructor arguments matters for coverage checker - [#1425](https://github.com/agda/agda/issues/1425): Instances with relevant recursive instance arguments are not considered in irrelevant positions - [#1548](https://github.com/agda/agda/issues/1548): Confusing error about ambiguous definition with parametrized modules - [#1884](https://github.com/agda/agda/issues/1884): what is the format of the libraries and defaults files - [#1906](https://github.com/agda/agda/issues/1906): Possible performance problem - [#2056](https://github.com/agda/agda/issues/2056): Cannot instantiate meta to solution...: Pattern checking done too early in where block - [#2067](https://github.com/agda/agda/issues/2067): Display forms in parameterised module too general - [#2183](https://github.com/agda/agda/issues/2183): Allow splitting on dotted variables - [#2226](https://github.com/agda/agda/issues/2226): open {{...}} gets hiding wrong - [#2255](https://github.com/agda/agda/issues/2255): Performance issue with deeply-nested lambdas - [#2306](https://github.com/agda/agda/issues/2306): Commands in the emacs-mode get confused if we add question marks to the file - [#2384](https://github.com/agda/agda/issues/2384): More fine-grained blocking in constraint solver - [#2401](https://github.com/agda/agda/issues/2401): LaTeX backend error - [#2404](https://github.com/agda/agda/issues/2404): checkType doesn't accept a type-checking definition checked with the same type - [#2420](https://github.com/agda/agda/issues/2420): Failed to solve level constraints in record type with hole - [#2421](https://github.com/agda/agda/issues/2421): After emacs starts up, Agda does not process file without restart of Agda - [#2436](https://github.com/agda/agda/issues/2436): Agda allows coinductive records with eta-equality - [#2450](https://github.com/agda/agda/issues/2450): Irrelevant variables are pruned too eagerly - [#2474](https://github.com/agda/agda/issues/2474): The LaTeX and HTML backends do not highlight (all) unsolved metas - [#2484](https://github.com/agda/agda/issues/2484): Regression related to sized types - [#2526](https://github.com/agda/agda/issues/2526): Better documentation of record modules - [#2536](https://github.com/agda/agda/issues/2536): UTF8 parsed incorrectly for literate agda files - [#2565](https://github.com/agda/agda/issues/2565): Options for the interaction action give to keep the overloaded literals and sections? - [#2576](https://github.com/agda/agda/issues/2576): Shadowing data decl by data sig produces Missing type signature error - [#2594](https://github.com/agda/agda/issues/2594): Valid partial cover rejected: "Cannot split on argument of non-datatype" - [#2600](https://github.com/agda/agda/issues/2600): Stack complains about Agda.cabal - [#2607](https://github.com/agda/agda/issues/2607): Instance search confused when an instance argument is sourced from a record - [#2617](https://github.com/agda/agda/issues/2617): Installation instructions - [#2623](https://github.com/agda/agda/issues/2623): Incorrect indentation when \AgdaHide is used - [#2634](https://github.com/agda/agda/issues/2634): Fixity declaration ignored in definitions in record - [#2636](https://github.com/agda/agda/issues/2636): The positivity checker complains when a new definition is added in the same where clause - [#2640](https://github.com/agda/agda/issues/2640): Unifier dots the relevant pattern variables when it should dot the irrelevant ones - [#2668](https://github.com/agda/agda/issues/2668): Changing the visibility of a module parameter breaks `with` - [#2728](https://github.com/agda/agda/issues/2728): Bad interaction between caching and the warning machinery - [#2738](https://github.com/agda/agda/issues/2738): Update Stackage LTS from 9.1 to version supporting Alex 3.2.3 - [#2744](https://github.com/agda/agda/issues/2744): It should be possible to give arguments to the code environment - [#2745](https://github.com/agda/agda/issues/2745): Broken build with GHC 7.8.4 due to (new) version 1.2.2.0 of hashtables - [#2749](https://github.com/agda/agda/issues/2749): Add --no-unicode cli option to Agda - [#2751](https://github.com/agda/agda/issues/2751): Unsolved constraints, but no highlighting - [#2752](https://github.com/agda/agda/issues/2752): Mutual blocks inside instance blocks - [#2753](https://github.com/agda/agda/issues/2753): Unsolved constraint, related to instance arguments and sized types - [#2756](https://github.com/agda/agda/issues/2756): HTML backend generates broken links - [#2758](https://github.com/agda/agda/issues/2758): Relevant meta is instantiated with irrelevant solution - [#2759](https://github.com/agda/agda/issues/2759): Empty mutual blocks should be warning rather than error - [#2762](https://github.com/agda/agda/issues/2762): Automatically generate DISPLAY pragmas to fold pattern synonyms - [#2763](https://github.com/agda/agda/issues/2763): Internal Error at "src/full/Agda/TypeChecking/Abstract.hs:138" - [#2765](https://github.com/agda/agda/issues/2765): Inferred level expressions are often "reversed" - [#2769](https://github.com/agda/agda/issues/2769): Agda prints ill-formed expression, record argument dropped - [#2771](https://github.com/agda/agda/issues/2771): Erroneous 'with' error message - [#2773](https://github.com/agda/agda/issues/2773): The nofontsetup option does not work as advertised - [#2775](https://github.com/agda/agda/issues/2775): Irrelevance to be taken into account in 'with' abstraction. - [#2776](https://github.com/agda/agda/issues/2776): Dotted variable in inferred type - [#2780](https://github.com/agda/agda/issues/2780): Improve level constraint solving for groups of inequality constraints - [#2782](https://github.com/agda/agda/issues/2782): Extending Agda reflection to introduce postulates - [#2785](https://github.com/agda/agda/issues/2785): internal error @ ConcreteToAbstract.hs:721 - [#2787](https://github.com/agda/agda/issues/2787): Overloaded pattern synonyms - [#2792](https://github.com/agda/agda/issues/2792): Safe modules can sometimes not be imported from unsafe modules - [#2794](https://github.com/agda/agda/issues/2794): Using \texttt{-} destroys code coloring in literate file - [#2796](https://github.com/agda/agda/issues/2796): Overloaded (inherited) projection resolution fails with parametrized record - [#2798](https://github.com/agda/agda/issues/2798): The LaTeX backend ignores the "operator" aspect - [#2802](https://github.com/agda/agda/issues/2802): Printing of overloaded functions broken due to eager normalization of projections - [#2803](https://github.com/agda/agda/issues/2803): Case splitting loses names of hidden arguments - [#2808](https://github.com/agda/agda/issues/2808): Confusing error when inserting declaration before top-level module - [#2810](https://github.com/agda/agda/issues/2810): Make `--caching` a pragma option - [#2811](https://github.com/agda/agda/issues/2811): OPTION --caching allowed in file (Issue #2810) - [#2819](https://github.com/agda/agda/issues/2819): Forcing analysis doesn't consider relevance - [#2821](https://github.com/agda/agda/issues/2821): BUILTIN BOOL gremlin - [#2824](https://github.com/agda/agda/issues/2824): Allow {-# BUILTIN #-} in preamble and in parametrized modules - [#2826](https://github.com/agda/agda/issues/2826): Case splitting on earlier variable uses duplicate variable name - [#2827](https://github.com/agda/agda/issues/2827): Variables off in with-clauses. Parameter refinement? - [#2831](https://github.com/agda/agda/issues/2831): NO_POSITIVITY_CHECK pragma can be written before a mutual block without data or record types - [#2832](https://github.com/agda/agda/issues/2832): BUILTIN NIL and CONS are not needed - [#2834](https://github.com/agda/agda/issues/2834): Disambiguation of type based on pattern leads to non-unique meta solution - [#2836](https://github.com/agda/agda/issues/2836): The Emacs mode does not handle .lagda.tex files - [#2840](https://github.com/agda/agda/issues/2840): Internal error in positivity with modules/datatype definitions - [#2841](https://github.com/agda/agda/issues/2841): Opting out of idiom brackets - [#2844](https://github.com/agda/agda/issues/2844): Root documentation URL redirects to version 2.5.2 - [#2849](https://github.com/agda/agda/issues/2849): Internal error at absurd pattern followed by `rewrite` - [#2854](https://github.com/agda/agda/issues/2854): Agda worries about possibly empty type of sizes even when no builtins for size are active - [#2855](https://github.com/agda/agda/issues/2855): Single-clause definition is both unreachable and incomplete - [#2856](https://github.com/agda/agda/issues/2856): Panic: unbound variable - [#2859](https://github.com/agda/agda/issues/2859): Error "pattern variable shadows constructor" caused by parameter refinement - [#2862](https://github.com/agda/agda/issues/2862): inconsistency from a mutual datatype declaration and module definition - [#2867](https://github.com/agda/agda/issues/2867): Give does not insert parenthesis for module parameters - [#2868](https://github.com/agda/agda/issues/2868): With --postfix-projections, record fields are printed preceded by a dot when working within the record - [#2870](https://github.com/agda/agda/issues/2870): Lexical error for \- (hyphen) - [#2871](https://github.com/agda/agda/issues/2871): Introduce just trailing hidden arguments by result splitting - [#2873](https://github.com/agda/agda/issues/2873): Refinement problem in presence of overloaded constructors - [#2874](https://github.com/agda/agda/issues/2874): Internal error in src/full/Agda/TypeChecking/Coverage/Match.hs:312 - [#2878](https://github.com/agda/agda/issues/2878): Support for GHC 8.4.1 - [#2879](https://github.com/agda/agda/issues/2879): Include COMPILE GHC pragmas for size primitives - [#2881](https://github.com/agda/agda/issues/2881): Internal error in BasicOps - [#2883](https://github.com/agda/agda/issues/2883): "internal error in TypeChecking/Substitute.hs:379" - [#2884](https://github.com/agda/agda/issues/2884): Missing PDF user manual in the tarball - [#2888](https://github.com/agda/agda/issues/2888): Internal error caused by new forcing translation - [#2894](https://github.com/agda/agda/issues/2894): Unifier tries to eta expand non-eta record - [#2896](https://github.com/agda/agda/issues/2896): Unifier throws away pattern - [#2897](https://github.com/agda/agda/issues/2897): Internal error for local modules with refined parameters - [#2904](https://github.com/agda/agda/issues/2904): No tab completion for GHCNoMain - [#2906](https://github.com/agda/agda/issues/2906): Confusing "cannot be translated to a Haskell type" error message - [#2908](https://github.com/agda/agda/issues/2908): primForce is compiled away - [#2909](https://github.com/agda/agda/issues/2909): Agda uses newtypes incorrectly, causing wellformed programs to loop - [#2911](https://github.com/agda/agda/issues/2911): Inferring missing instance clause panics in refined context - [#2912](https://github.com/agda/agda/issues/2912): Add fine-grained control over the displayed warnings - [#2914](https://github.com/agda/agda/issues/2914): Slicing ignores as pragma? - [#2916](https://github.com/agda/agda/issues/2916): The GHC backend generates code with an incorrect number of constructor arguments - [#2917](https://github.com/agda/agda/issues/2917): Very slow due to unsolved size? - [#2919](https://github.com/agda/agda/issues/2919): Internal error in Agda.TypeChecking.Forcing - [#2921](https://github.com/agda/agda/issues/2921): COMPILE data for data types with erased constructor arguments - [#2923](https://github.com/agda/agda/issues/2923): Word.agda not included as builtin - [#2925](https://github.com/agda/agda/issues/2925): Allow adding the same rewrite rules multiple times - [#2927](https://github.com/agda/agda/issues/2927): Panic related to sized types - [#2928](https://github.com/agda/agda/issues/2928): Internal error in Agda.TypeChecking.Rules.LHS - [#2931](https://github.com/agda/agda/issues/2931): Rename Agda.Builtin.Size.ω to ∞? - [#2941](https://github.com/agda/agda/issues/2941): "coinductive" record inconsistent - [#2944](https://github.com/agda/agda/issues/2944): Regression, seemingly related to record expressions - [#2945](https://github.com/agda/agda/issues/2945): Inversion warning in code that used to be accepted - [#2947](https://github.com/agda/agda/issues/2947): Internal error in Agda.TypeChecking.Forcing - [#2952](https://github.com/agda/agda/issues/2952): Wrong compilation of pattern matching to Haskell - [#2953](https://github.com/agda/agda/issues/2953): Generated Haskell code does not typecheck - [#2954](https://github.com/agda/agda/issues/2954): Pattern matching on string gives unexpected unreachable clause - [#2957](https://github.com/agda/agda/issues/2957): Support for async 2.2.1 - [#2958](https://github.com/agda/agda/issues/2958): `as` names being duplicated in buffer after `with` - [#2959](https://github.com/agda/agda/issues/2959): Repeating a successful command after revert + reload fails with caching enabled - [#2960](https://github.com/agda/agda/issues/2960): Uncommenting indented lines doesn't work - [#2963](https://github.com/agda/agda/issues/2963): Extended lambdas bypass positivity checking in records - [#2966](https://github.com/agda/agda/issues/2966): Internal error in Auto - [#2968](https://github.com/agda/agda/issues/2968): Bad Interaction with copatterns and eta?, leads to ill-typed terms in error messages. - [#2971](https://github.com/agda/agda/issues/2971): Copattern split with `--no-irrelevant-projections` panics - [#2974](https://github.com/agda/agda/issues/2974): Copatterns break canonicity - [#2975](https://github.com/agda/agda/issues/2975): Termination checker runs too early for definitions inside record (or: positivity checker runs too late) - [#2976](https://github.com/agda/agda/issues/2976): Emacs mode reports errors in connection with highlighting comments - [#2978](https://github.com/agda/agda/issues/2978): Double solving of meta - [#2985](https://github.com/agda/agda/issues/2985): The termination checker accepts non-terminating code - [#2989](https://github.com/agda/agda/issues/2989): Internal error when checking record match in let expr - [#2990](https://github.com/agda/agda/issues/2990): Performance regression related to the abstract machine - [#2994](https://github.com/agda/agda/issues/2994): Solution accepted in hole is subsequently rejected on reload - [#2996](https://github.com/agda/agda/issues/2996): Internal error with -v tc.cover:20 - [#2997](https://github.com/agda/agda/issues/2997): Internal error in Agda.TypeChecking.Rules.LHS - [#2998](https://github.com/agda/agda/issues/2998): Regression: With clause pattern x is not an instance of its parent pattern "eta expansion of x" - [#3002](https://github.com/agda/agda/issues/3002): Spurious 1 after simplification - [#3004](https://github.com/agda/agda/issues/3004): Agda hangs on extended lambda - [#3007](https://github.com/agda/agda/issues/3007): Internal error in Parser - [#3012](https://github.com/agda/agda/issues/3012): Internal Error at : "src/full/Agda/TypeChecking/Reduce/Fast.hs:1030" - [#3014](https://github.com/agda/agda/issues/3014): Internal error in Rules.LHS - [#3020](https://github.com/agda/agda/issues/3020): Missing highlighting in record modules - [#3023](https://github.com/agda/agda/issues/3023): Support for GHC 8.4.2 - [#3024](https://github.com/agda/agda/issues/3024): Postfix projection patterns not highlighted correctly with agda --latex - [#3030](https://github.com/agda/agda/issues/3030): [ warning ] user defined warnings - [#3031](https://github.com/agda/agda/issues/3031): Eta failure for record meta with irrelevant fields - [#3033](https://github.com/agda/agda/issues/3033): Giving and solving don't insert parenthesis for applications in dot pattern - [#3044](https://github.com/agda/agda/issues/3044): Internal error in src/full/Agda/TypeChecking/Substitute/Class.hs:209 - [#3045](https://github.com/agda/agda/issues/3045): GHC backend generates type without enough arguments - [#3046](https://github.com/agda/agda/issues/3046): do-notation causes parse errors in subsequent where clauses - [#3049](https://github.com/agda/agda/issues/3049): Positivity unsoundness - [#3050](https://github.com/agda/agda/issues/3050): We revert back to call-by-name during positivity checking - [#3051](https://github.com/agda/agda/issues/3051): Pattern synonyms should be allowed in mutual blocks - [#3052](https://github.com/agda/agda/issues/3052): Another recent inference change - [#3062](https://github.com/agda/agda/issues/3062): Literal match does not respect first-match semantics - [#3063](https://github.com/agda/agda/issues/3063): Internal error in Agda.TypeChecking.Forcing - [#3064](https://github.com/agda/agda/issues/3064): Coverage checker bogus on literals combined with copatterns - [#3065](https://github.com/agda/agda/issues/3065): Internal error in coverage checker triggered by literal dot pattern - [#3067](https://github.com/agda/agda/issues/3067): checking hangs on invalid program - [#3072](https://github.com/agda/agda/issues/3072): invalid section printing - [#3074](https://github.com/agda/agda/issues/3074): Wrong hiding causes internal error in LHS checker - [#3075](https://github.com/agda/agda/issues/3075): Automatic inlining and tactics - [#3078](https://github.com/agda/agda/issues/3078): Error building with GHC 7.10.2: Missing transformers library - [#3079](https://github.com/agda/agda/issues/3079): Wrong parameter hiding for instance open - [#3080](https://github.com/agda/agda/issues/3080): Case splitting prints out-of-scope pattern synonyms - [#3082](https://github.com/agda/agda/issues/3082): Emacs mode regression: a ? inserted before existing hole hijacks its interaction point - [#3083](https://github.com/agda/agda/issues/3083): Wrong hiding in module application - [#3084](https://github.com/agda/agda/issues/3084): Changes to mode line do not take effect immediately - [#3085](https://github.com/agda/agda/issues/3085): Postpone checking a pattern let binding when type is blocked - [#3090](https://github.com/agda/agda/issues/3090): Internal error in parser when using parentheses in BUILTIN pragma - [#3096](https://github.com/agda/agda/issues/3096): Support GHC 8.4.3 Release notes for Agda version 2.5.3 ==================================== Installation and infrastructure ------------------------------- * Added support for GHC 8.0.2 and 8.2.1. * Removed support for GHC 7.6.3. * Markdown support for literate Agda \[PR [#2357](https://github.com/agda/agda/pull/2357)]. Files ending in `.lagda.md` will be parsed as literate Markdown files. + Code blocks start with ```` ``` ```` or ```` ```agda ```` in its own line, and end with ```` ``` ````, also in its own line. + Code blocks which should be type-checked by Agda but should not be visible when the Markdown is rendered may be enclosed in HTML comment delimiters (``). + Code blocks which should be ignored by Agda, but rendered in the final document may be indented by four spaces. + Note that inline code fragments are not supported due to the difficulty of interpreting their indentation level with respect to the rest of the file. Language -------- ### Pattern matching * Dot patterns. The dot in front of an inaccessible pattern can now be skipped if the pattern consists entirely of constructors or literals. For example: ```agda open import Agda.Builtin.Bool data D : Bool → Set where c : D true f : (x : Bool) → D x → Bool f true c = true ``` Before this change, you had to write `f .true c = true`. * With-clause patterns can be replaced by _ [Issue [#2363](https://github.com/agda/agda/issues/2363)]. Example: ```agda test : Nat → Set test zero with zero test _ | _ = Nat test (suc x) with zero test _ | _ = Nat ``` We do not have to spell out the pattern of the parent clause (`zero` / `suc x`) in the with-clause if we do not need the pattern variables. Note that `x` is not in scope in the with-clause! A more elaborate example, which cannot be reduced to an ellipsis `...`: ```agda record R : Set where coinductive -- disallow matching field f : Bool n : Nat data P (r : R) : Nat → Set where fTrue : R.f r ≡ true → P r zero nSuc : P r (suc (R.n r)) data Q : (b : Bool) (n : Nat) → Set where true! : Q true zero suc! : ∀{b n} → Q b (suc n) test : (r : R) {n : Nat} (p : P r n) → Q (R.f r) n test r nSuc = suc! test r (fTrue p) with R.f r test _ (fTrue ()) | false test _ _ | true = true! -- underscore instead of (isTrue _) ``` * Pattern matching lambdas (also known as extended lambdas) can now be nullary, mirroring the behaviour for ordinary function definitions. [Issue [#2671](https://github.com/agda/agda/issues/2671)] This is useful for case splitting on the result inside an expression: given ```agda record _×_ (A B : Set) : Set where field π₁ : A π₂ : B open _×_ ``` one may case split on the result (C-c C-c RET) in a hole ```agda λ { → {!!}} ``` of type A × B to produce ```agda λ { .π₁ → {!!} ; .π₂ → {!!}} ``` * Records with a field of an empty type are now recognized as empty by Agda. In particular, they can be matched against with an absurd pattern (). For example: ```agda data ⊥ : Set where record Empty : Set where field absurdity : ⊥ magic : Empty → ⊥ magic () ``` * Injective pragmas. Injective pragmas can be used to mark a definition as injective for the pattern matching unifier. This can be used as a version of `--injective-type-constructors` that only applies to specific datatypes. For example: ```agda open import Agda.Builtin.Equality data Fin : Nat → Set where zero : {n : Nat} → Fin (suc n) suc : {n : Nat} → Fin n → Fin (suc n) {-# INJECTIVE Fin #-} Fin-injective : {m n : Nat} → Fin m ≡ Fin n → m ≡ n Fin-injective refl = refl ``` Aside from datatypes, this pragma can also be used to mark other definitions as being injective (for example postulates). * Metavariables can no longer be instantiated during case splitting. This means Agda will refuse to split instead of taking the first constructor it finds. For example: ```agda open import Agda.Builtin.Nat data Vec (A : Set) : Nat → Set where nil : Vec A 0 cons : {n : Nat} → A → Vec A n → Vec A (suc n) foo : Vec Nat _ → Nat foo x = {!x!} ``` In Agda 2.5.2, case splitting on `x` produced the single clause `foo nil = {!!}`, but now Agda refuses to split. ### Reflection * New TC primitive: `debugPrint`. ```agda debugPrint : String → Nat → List ErrorPart → TC ⊤ ``` This maps to the internal function `reportSDoc`. Debug output is enabled with the `-v` flag at the command line, or in an `OPTIONS` pragma. For instance, giving `-v a.b.c:10` enables printing from `debugPrint "a.b.c.d" 10 msg`. In the Emacs mode, debug output ends up in the `*Agda debug*` buffer. ### Built-ins * BUILTIN REFL is now superfluous, subsumed by BUILTIN EQUALITY [Issue [#2389](https://github.com/agda/agda/issues/2389)]. * BUILTIN EQUALITY is now more liberal [Issue [#2386](https://github.com/agda/agda/issues/2386)]. It accepts, among others, the following new definitions of equality: ```agda -- Non-universe polymorphic: data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x -- ... with explicit argument to refl; data _≡_ {A : Set} : (x y : A) → Set where refl : {x : A} → x ≡ x -- ... even visible data _≡_ {A : Set} : (x y : A) → Set where refl : (x : A) → x ≡ x -- Equality in a different universe than domain: -- (also with explicit argument to refl) data _≡_ {a} {A : Set a} (x : A) : A → Set where refl : x ≡ x ``` The standard definition is still: ```agda -- Equality in same universe as domain: data _≡_ {a} {A : Set a} (x : A) : A → Set a where refl : x ≡ x ``` ### Miscellaneous * Rule change for omitted top-level module headers. [Issue [#1077](https://github.com/agda/agda/issues/1077)] If your file is named `Bla.agda`, then the following content is rejected. ```agda foo = Set module Bla where bar = Set ``` Before the fix of this issue, Agda would add the missing module header `module Bla where` at the top of the file. However, in this particular case it is more likely the user put the declaration `foo = Set` before the module start in error. Now you get the error ``` Illegal declaration(s) before top-level module ``` if the following conditions are met: 1. There is at least one non-import declaration or non-toplevel pragma before the start of the first module. 2. The module has the same name as the file. 3. The module is the only module at this level (may have submodules, of course). If you should see this error, insert a top-level module before the illegal declarations, or move them inside the existing module. Emacs mode ---------- * New warnings: - Unreachable clauses give rise to a simple warning. They are highlighted in gray. - Incomplete patterns are non-fatal warnings: it is possible to keep interacting with the file (the reduction will simply be stuck on arguments not matching any pattern). The definition with incomplete patterns are highlighted in wheat. * Clauses which do not hold definitionally are now highlighted in white smoke. * Fewer commands have the side effect that the buffer is saved. * Aborting commands. Now one can (try to) abort an Agda command by using `C-c C-x C-a` or a menu entry. The effect is similar to that of restarting Agda (`C-c C-x C-r`), but some state is preserved, which could mean that it takes less time to reload the module. Warning: If a command is aborted while it is writing data to disk (for instance .agdai files or Haskell files generated by the GHC backend), then the resulting files may be corrupted. Note also that external commands (like GHC) are not aborted, and their output may continue to be sent to the Emacs mode. * New bindings for the Agda input method: - All the bold digits are now available. The naming scheme is `\Bx` for digit `x`. - Typing `\:` you can now get a whole slew of colons. (The Agda input method originally only bound the standard unicode colon, which looks deceptively like the normal colon.) * Case splitting now preserves underscores. [Issue [#819](https://github.com/agda/agda/issues/819)] ```agda data ⊥ : Set where test : {A B : Set} → A → ⊥ → B test _ x = {! x !} ``` Splitting on `x` yields ```agda test _ () ``` * Interactively expanding ellipsis. [Issue [#2589](https://github.com/agda/agda/issues/2589)] An ellipsis in a with-clause can be expanded by splitting on "variable" "." (dot). ```agda test0 : Nat → Nat test0 x with zero ... | q = {! . !} -- C-c C-c ``` Splitting on dot here yields: ```agda test0 x | q = ? ``` * New command to check an expression against the type of the hole it is in and see what it elaborates to. [Issue [#2700](https://github.com/agda/agda/issues/2700)] This is useful to determine e.g. what solution typeclass resolution yields. The command is bound to `C-c C-;` and respects the `C-u` modifier. ```agda record Pointed (A : Set) : Set where field point : A it : ∀ {A : Set} {{x : A}} → A it {{x}} = x instance _ = record { point = 3 - 4 } _ : Pointed Nat _ = {! it !} -- C-u C-u C-c C-; ``` yields ```agda Goal: Pointed Nat Elaborates to: record { point = 0 } ``` * If `agda2-give` is called with a prefix, then giving is forced, i.e., the safety checks are skipped, including positivity, termination, and double type-checking. [Issue [#2730](https://github.com/agda/agda/issues/2730)] Invoke forced giving with key sequence `C-u C-c C-SPC`. Library management ------------------ * The `name` field in an `.agda-lib` file is now optional. [Issue [#2708](https://github.com/agda/agda/issues/2708)] This feature is convenient if you just want to specify the dependencies and include pathes for your local project in an `.agda-lib` file. Naturally, libraries without names cannot be depended on. Compiler backends ----------------- * Unified compiler pragmas The compiler pragmas (`COMPILED`, `COMPILED_DATA`, etc.) have been unified across backends into two new pragmas: ``` {-# COMPILE #-} {-# FOREIGN #-} ``` The old pragmas still work, but will emit a warning if used. They will be removed completely in Agda 2.6. The translation of old pragmas into new ones is as follows: Old | New --- | --- `{-# COMPILED f e #-}` | `{-# COMPILE GHC f = e #-}` `{-# COMPILED_TYPE A T #-}` | `{-# COMPILE GHC A = type T #-}` `{-# COMPILED_DATA A D C1 .. CN #-}` | `{-# COMPILE GHC A = data D (C1 \| .. \| CN) #-}` `{-# COMPILED_DECLARE_DATA #-}` | obsolete, removed `{-# COMPILED_EXPORT f g #-}` | `{-# COMPILE GHC f as g #-}` `{-# IMPORT M #-}` | `{-# FOREIGN GHC import qualified M #-}` `{-# HASKELL code #-}` | `{-# FOREIGN GHC code #-}` `{-# COMPILED_UHC f e #-}` | `{-# COMPILE UHC f = e #-}` `{-# COMPILED_DATA_UHC A D C1 .. CN #-}` | `{-# COMPILE UHC A = data D (C1 \| .. \| CN) #-}` `{-# IMPORT_UHC M #-}` | `{-# FOREIGN UHC __IMPORT__ M #-}` `{-# COMPILED_JS f e #-}` | `{-# COMPILE JS f = e #-}` * GHC Haskell backend The COMPILED pragma (and the corresponding COMPILE GHC pragma) is now also allowed for functions. This makes it possible to have both an Agda implementation and a native Haskell runtime implementation. The GHC file header pragmas `LANGUAGE`, `OPTIONS_GHC`, and `INCLUDE` inside a `FOREIGN GHC` pragma are recognized and printed correctly at the top of the generated Haskell file. [Issue [#2712](https://github.com/agda/agda/issues/2712)] * UHC compiler backend The UHC backend has been moved to its own repository [https://github.com/agda/agda-uhc] and is no longer part of the Agda distribution. * Haskell imports are no longer transitively inherited from imported modules. The (now deprecated) IMPORT and IMPORT_UHC pragmas no longer cause import statements in modules importing the module containing the pragma. The same is true for the corresponding FOREIGN pragmas. * Support for stand-alone backends. There is a new API in `Agda.Compiler.Backend` for creating stand-alone backends using Agda as a library. This allows prospective backend writers to experiment with new backends without having to change the Agda code base. HTML backend ------------ * Anchors for identifiers (excluding bound variables) are now the identifiers themselves rather than just the file position [Issue [#2604](https://github.com/agda/agda/issues/2604)]. Symbolic anchors look like ```html ``` while other anchors just give the character position in the file: ```html ``` Top-level module names do not get a symbolic anchor, since the position of a top-level module is defined to be the beginning of the file. Example: ```agda module Issue2604 where -- Character position anchor test1 : Set₁ -- Issue2604.html#test1 test1 = bla where bla = Set -- Character position anchor test2 : Set₁ -- Issue2604.html#test2 test2 = bla where bla = Set -- Character position anchor test3 : Set₁ -- Issue2604.html#test3 test3 = bla module M where -- Issue2604.html#M bla = Set -- Issue2604.html#M.bla module NamedModule where -- Issue2604.html#NamedModule test4 : Set₁ -- Issue2604.html#NamedModule.test4 test4 = M.bla module _ where -- Character position anchor test5 : Set₁ -- Character position anchor test5 = M.bla ``` * Some generated HTML files now have different file names [Issue [#2725](https://github.com/agda/agda/issues/2725)]. Agda now uses an encoding that amounts to first converting the module names to UTF-8, and then percent-encoding the resulting bytes. For instance, HTML for the module `Σ` is placed in `%CE%A3.html`. LaTeX backend ------------- * The LaTeX backend now handles indentation in a different way [Issue [#1832](https://github.com/agda/agda/issues/1832)]. A constraint on the indentation of the first token *t* on a line is determined as follows: * Let *T* be the set containing every previous token (in any code block) that is either the initial token on its line or preceded by at least one whitespace character. * Let *S* be the set containing all tokens in *T* that are not *shadowed* by other tokens in *T*. A token *t₁* is shadowed by *t₂* if *t₂* is further down than *t₁* and does not start to the right of *t₁*. * Let *L* be the set containing all tokens in *S* that start to the left of *t*, and *E* be the set containing all tokens in *S* that start in the same column as *t*. * The constraint is that *t* must be indented further than every token in *L*, and aligned with every token in *E*. Note that if any token in *L* or *E* belongs to a previous code block, then the constraint may not be satisfied unless (say) the `AgdaAlign` environment is used in an appropriate way. If custom settings are used, for instance if `\AgdaIndent` is redefined, then the constraint discussed above may not be satisfied. (Note that the meaning of the `\AgdaIndent` command's argument has changed, and that the command is now used in a different way in the generated LaTeX files.) Examples: * Here `C` is indented further than `B`: ```agda postulate A B C : Set ``` * Here `C` is not (necessarily) indented further than `B`, because `X` shadows `B`: ```agda postulate A B : Set X C : Set ``` The new rule is inspired by, but not identical to, the one used by lhs2TeX's poly mode (see Section 8.4 of the [manual for lhs2TeX version 1.17](https://www.andres-loeh.de/lhs2tex/Guide2-1.17.pdf)). * Some spacing issues [[#2353](https://github.com/agda/agda/issues/2353), [#2441](https://github.com/agda/agda/issues/2441), [#2733](https://github.com/agda/agda/issues/2733), [#2740](https://github.com/agda/agda/issues/2740)] have been fixed. * The user can now control the typesetting of (certain) individual tokens by redefining the `\AgdaFormat` command. Example: ```latex \usepackage{ifthen} % Insert extra space before some tokens. \DeclareRobustCommand{\AgdaFormat}[2]{% \ifthenelse{ \equal{#1}{≡⟨} \OR \equal{#1}{≡⟨⟩} \OR \equal{#1}{∎} }{\ }{}#2} ``` Note the use of `\DeclareRobustCommand`. The first argument to `\AgdaFormat` is the token, and the second argument the thing to be typeset. * One can now instruct the agda package not to select any fonts. If the `nofontsetup` option is used, then some font packages are loaded, but specific fonts are not selected: ```latex \usepackage[nofontsetup]{agda} ``` * The height of empty lines is now configurable [[#2734](https://github.com/agda/agda/issues/2734)]. The height is controlled by the length `\AgdaEmptySkip`, which by default is `\baselineskip`. * The alignment feature regards the string `+̲`, containing `+` and a combining character, as having length two. However, it seems more reasonable to treat it as having length one, as it occupies a single column, if displayed "properly" using a monospace font. The new flag `--count-clusters` is an attempt at fixing this. When this flag is enabled the backend counts ["extended grapheme clusters"](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) rather than code points. Note that this fix is not perfect: a single extended grapheme cluster might be displayed in different ways by different programs, and might, in some cases, occupy more than one column. Here are some examples of extended grapheme clusters, all of which are treated as a single character by the alignment algorithm: ``` │ │ │+̲│ │Ö̂│ │நி│ │ᄀힰᇹ│ │ᄀᄀᄀᄀᄀᄀힰᇹᇹᇹᇹᇹᇹ│ │ │ ``` Note also that the layout machinery does not count extended grapheme clusters, but code points. The following code is syntactically correct, but if `--count-clusters` is used, then the LaTeX backend does not align the two `field` keywords: ```agda record +̲ : Set₁ where field A : Set field B : Set ``` The `--count-clusters` flag is not enabled in all builds of Agda, because the implementation depends on the [ICU](http://site.icu-project.org) library, the installation of which could cause extra trouble for some users. The presence of this flag is controlled by the Cabal flag `enable-cluster-counting`. * A faster variant of the LaTeX backend: QuickLaTeX. When this variant of the backend is used the top-level module is not type-checked, only scope-checked. This implies that some highlighting information is not available. For instance, overloaded constructors are not resolved. QuickLaTeX can be invoked from the Emacs mode, or using `agda --latex --only-scope-checking`. If the module has already been type-checked successfully, then this information is reused; in this case QuickLaTeX behaves like the regular LaTeX backend. The `--only-scope-checking` flag can also be used independently, but it is perhaps unclear what purpose that would serve. (The flag can currently not be combined with `--html`, `--dependency-graph` or `--vim`.) The flag is not allowed in safe mode. Pragmas and options ------------------- * The `--safe` option is now a valid pragma. This makes it possible to declare a module as being part of the safe subset of the language by stating `{-# OPTIONS --safe #-}` at the top of the corresponding file. Incompatibilities between the `--safe` option and other options or language constructs are non-fatal errors. * The `--no-main` option is now a valid pragma. One can now suppress the compiler warning about a missing main function by putting ```agda {-# OPTIONS --no-main #-} ``` on top of the file. * New command-line option and pragma `--warning=MODE` (or `-W MODE`) for setting the warning mode. Current options are - `warn` for displaying warnings (default) - `error` for turning warnings into errors - `ignore` for not displaying warnings List of fixed issues -------------------- For 2.5.3, the following issues have been fixed (see [bug tracker](https://github.com/agda/agda/issues)): - [#142](https://github.com/agda/agda/issues/142): Inherited dot patterns in with functions are not checked - [#623](https://github.com/agda/agda/issues/623): Error message points to importing module rather than imported module - [#657](https://github.com/agda/agda/issues/657): Yet another display form problem - [#668](https://github.com/agda/agda/issues/668): Ability to stop, or restart, typechecking somehow - [#705](https://github.com/agda/agda/issues/705): confusing error message for ambiguous datatype module name - [#719](https://github.com/agda/agda/issues/719): Error message for duplicate module definition points to external module instead of internal module - [#776](https://github.com/agda/agda/issues/776): Unsolvable constraints should give error - [#819](https://github.com/agda/agda/issues/819): Case-splitting doesn't preserve underscores - [#883](https://github.com/agda/agda/issues/883): Rewrite loses type information - [#899](https://github.com/agda/agda/issues/899): Instance search fails if there are several definitionally equal values in scope - [#1077](https://github.com/agda/agda/issues/1077): problem with module syntax, with parametric module import - [#1126](https://github.com/agda/agda/issues/1126): Port optimizations from the Epic backend - [#1175](https://github.com/agda/agda/issues/1175): Internal Error in Auto - [#1544](https://github.com/agda/agda/issues/1544): Positivity polymorphism needed for compositional positivity analysis - [#1611](https://github.com/agda/agda/issues/1611): Interactive splitting instantiates meta - [#1664](https://github.com/agda/agda/issues/1664): Add Reflection primitives to expose precedence and fixity - [#1817](https://github.com/agda/agda/issues/1817): Solvable size constraints reported as unsolvable - [#1832](https://github.com/agda/agda/issues/1832): Insufficient indentation in LaTeX-rendered Agda code - [#1834](https://github.com/agda/agda/issues/1834): Copattern matching: order of clauses should not matter here - [#1886](https://github.com/agda/agda/issues/1886): Second copies of telescopes not checked? - [#1899](https://github.com/agda/agda/issues/1899): Positivity checker does not treat datatypes and record types in the same way - [#1975](https://github.com/agda/agda/issues/1975): Type-incorrect instantiated overloaded constructor accepted in pattern - [#1976](https://github.com/agda/agda/issues/1976): Type-incorrect instantiated projection accepted in pattern - [#2035](https://github.com/agda/agda/issues/2035): Matching on string causes solver to fail with internal error - [#2146](https://github.com/agda/agda/issues/2146): Unicode syntax for instance arguments - [#2217](https://github.com/agda/agda/issues/2217): Abort Agda without losing state - [#2229](https://github.com/agda/agda/issues/2229): Absence or presence of top-level module header affects scope - [#2253](https://github.com/agda/agda/issues/2253): Wrong scope error for abstract constructors - [#2261](https://github.com/agda/agda/issues/2261): Internal error in Auto/CaseSplit.hs:284 - [#2270](https://github.com/agda/agda/issues/2270): Printer does not use sections. - [#2329](https://github.com/agda/agda/issues/2329): Size solver does not use type `Size< i` to gain the necessary information - [#2354](https://github.com/agda/agda/issues/2354): Interaction between instance search, size solver, and ordinary constraint solver. - [#2355](https://github.com/agda/agda/issues/2355): Literate Agda parser does not recognize TeX comments - [#2360](https://github.com/agda/agda/issues/2360): With clause stripping chokes on ambiguous projection - [#2362](https://github.com/agda/agda/issues/2362): Printing of parent patterns when with-clause does not match - [#2363](https://github.com/agda/agda/issues/2363): Allow underscore in with-clause patterns - [#2366](https://github.com/agda/agda/issues/2366): With-clause patterns renamed in error message - [#2368](https://github.com/agda/agda/issues/2368): Internal error after refining a tactic @ MetaVars.hs:267 - [#2371](https://github.com/agda/agda/issues/2371): Shadowed module parameter crashes interaction - [#2372](https://github.com/agda/agda/issues/2372): problems when instances are declared with inferred types - [#2374](https://github.com/agda/agda/issues/2374): Ambiguous projection pattern could be disambiguated by visibility - [#2376](https://github.com/agda/agda/issues/2376): Termination checking interacts badly with eta-contraction - [#2377](https://github.com/agda/agda/issues/2377): open public is useless before module header - [#2381](https://github.com/agda/agda/issues/2381): Search (`C-c C-z`) panics on pattern synonyms - [#2386](https://github.com/agda/agda/issues/2386): Relax requirements of BUILTIN EQUALITY - [#2389](https://github.com/agda/agda/issues/2389): BUILTIN REFL not needed - [#2400](https://github.com/agda/agda/issues/2400): LaTeX backend error on LaTeX comments - [#2402](https://github.com/agda/agda/issues/2402): Parameters not dropped when reporting incomplete patterns - [#2403](https://github.com/agda/agda/issues/2403): Termination checker should reduce arguments in structural order check - [#2405](https://github.com/agda/agda/issues/2405): instance search failing in parameterized module - [#2408](https://github.com/agda/agda/issues/2408): DLub sorts are not serialized - [#2412](https://github.com/agda/agda/issues/2412): Problem with checking with sized types - [#2413](https://github.com/agda/agda/issues/2413): Agda crashes on x@y pattern - [#2415](https://github.com/agda/agda/issues/2415): Size solver reports "inconsistent upper bound" even though there is a solution - [#2416](https://github.com/agda/agda/issues/2416): Cannot give size as computed by solver - [#2422](https://github.com/agda/agda/issues/2422): Overloaded inherited projections don't resolve - [#2423](https://github.com/agda/agda/issues/2423): Inherited projection on lhs - [#2426](https://github.com/agda/agda/issues/2426): On just warning about missing cases - [#2429](https://github.com/agda/agda/issues/2429): Irrelevant lambda should be accepted when relevant lambda is expected - [#2430](https://github.com/agda/agda/issues/2430): Another regression related to parameter refinement? - [#2433](https://github.com/agda/agda/issues/2433): rebindLocalRewriteRules re-adds global rewrite rules - [#2434](https://github.com/agda/agda/issues/2434): Exact split analysis is too strict when matching on eta record constructor - [#2441](https://github.com/agda/agda/issues/2441): Incorrect alignement in latex using the new ACM format - [#2444](https://github.com/agda/agda/issues/2444): Generalising compiler pragmas - [#2445](https://github.com/agda/agda/issues/2445): The LaTeX backend is slow - [#2447](https://github.com/agda/agda/issues/2447): Cache loaded interfaces even if a type error is encountered - [#2449](https://github.com/agda/agda/issues/2449): Agda depends on additional C library icu - [#2451](https://github.com/agda/agda/issues/2451): Agda panics when attempting to rewrite a typeclass Eq - [#2456](https://github.com/agda/agda/issues/2456): Internal error when postulating instance - [#2458](https://github.com/agda/agda/issues/2458): Regression: Agda-2.5.3 loops where Agda-2.5.2 passes - [#2462](https://github.com/agda/agda/issues/2462): Overloaded postfix projection does not resolve - [#2464](https://github.com/agda/agda/issues/2464): Eta contraction for irrelevant functions breaks subject reduction - [#2466](https://github.com/agda/agda/issues/2466): Case split to make hidden variable visible does not work - [#2467](https://github.com/agda/agda/issues/2467): REWRITE without BUILTIN REWRITE crashes - [#2469](https://github.com/agda/agda/issues/2469): "Partial" pattern match causes segfault at runtime - [#2472](https://github.com/agda/agda/issues/2472): Regression related to the auto command - [#2477](https://github.com/agda/agda/issues/2477): Sized data type analysis brittle, does not reduce size - [#2478](https://github.com/agda/agda/issues/2478): Multiply defined labels on the user manual (pdf) - [#2479](https://github.com/agda/agda/issues/2479): "Occurs check" error in generated Haskell code - [#2480](https://github.com/agda/agda/issues/2480): Agda accepts incorrect (?) code, subject reduction broken - [#2482](https://github.com/agda/agda/issues/2482): Wrong counting of data parameters with new-style mutual blocks - [#2483](https://github.com/agda/agda/issues/2483): Files are sometimes truncated to a size of 201 bytes - [#2486](https://github.com/agda/agda/issues/2486): Imports via FOREIGN are not transitively inherited anymore - [#2488](https://github.com/agda/agda/issues/2488): Instance search inhibits holes for instance fields - [#2493](https://github.com/agda/agda/issues/2493): Regression: Agda seems to loop when expression is given - [#2494](https://github.com/agda/agda/issues/2494): Instance fields sometimes have incorrect goal types - [#2495](https://github.com/agda/agda/issues/2495): Regression: termination checker of Agda-2.5.3 seemingly loops where Agda-2.5.2 passes - [#2500](https://github.com/agda/agda/issues/2500): Adding fields to a record can cause Agda to reject previous definitions - [#2510](https://github.com/agda/agda/issues/2510): Wrong error with --no-pattern-matching - [#2517](https://github.com/agda/agda/issues/2517): "Not a variable error" - [#2518](https://github.com/agda/agda/issues/2518): CopatternReductions in TreeLess - [#2523](https://github.com/agda/agda/issues/2523): The documentation of `--without-K` is outdated - [#2529](https://github.com/agda/agda/issues/2529): Unable to install Agda on Windows. - [#2537](https://github.com/agda/agda/issues/2537): case splitting with 'with' creates {_} instead of replicating the arguments it found. - [#2538](https://github.com/agda/agda/issues/2538): Internal error when parsing as-pattern - [#2543](https://github.com/agda/agda/issues/2543): Case splitting with ellipsis produces spurious parentheses - [#2545](https://github.com/agda/agda/issues/2545): Race condition in api tests - [#2549](https://github.com/agda/agda/issues/2549): Rewrite rule for higher path constructor does not fire - [#2550](https://github.com/agda/agda/issues/2550): Internal error in Agda.TypeChecking.Substitute - [#2552](https://github.com/agda/agda/issues/2552): Let bindings in module telescopes crash Agda.Interaction.BasicOps - [#2553](https://github.com/agda/agda/issues/2553): Internal error in Agda.TypeChecking.CheckInternal - [#2554](https://github.com/agda/agda/issues/2554): More flexible size-assignment in successor style - [#2555](https://github.com/agda/agda/issues/2555): Why does the positivity checker care about non-recursive occurrences? - [#2558](https://github.com/agda/agda/issues/2558): Internal error in Warshall Solver - [#2560](https://github.com/agda/agda/issues/2560): Internal Error in Reduce.Fast - [#2564](https://github.com/agda/agda/issues/2564): Non-exact-split highlighting makes other highlighting disappear - [#2568](https://github.com/agda/agda/issues/2568): agda2-infer-type-maybe-toplevel (in hole) does not respect "single-solution" requirement of instance resolution - [#2571](https://github.com/agda/agda/issues/2571): Record pattern translation does not eta contract - [#2573](https://github.com/agda/agda/issues/2573): Rewrite rules fail depending on unrelated changes - [#2574](https://github.com/agda/agda/issues/2574): No link attached to module without toplevel name - [#2575](https://github.com/agda/agda/issues/2575): Internal error, related to caching - [#2577](https://github.com/agda/agda/issues/2577): deBruijn fail for higher order instance problem - [#2578](https://github.com/agda/agda/issues/2578): Catch-all clause face used incorrectly for parent with pattern - [#2579](https://github.com/agda/agda/issues/2579): Import statements with module instantiation should not trigger an error message - [#2580](https://github.com/agda/agda/issues/2580): Implicit absurd match is NonVariant, explicit not - [#2583](https://github.com/agda/agda/issues/2583): Wrong de Bruijn index introduced by absurd pattern - [#2584](https://github.com/agda/agda/issues/2584): Duplicate warning printing - [#2585](https://github.com/agda/agda/issues/2585): Definition by copatterns not modulo eta - [#2586](https://github.com/agda/agda/issues/2586): "λ where" with single absurd clause not parsed - [#2588](https://github.com/agda/agda/issues/2588): `agda --latex` produces invalid LaTeX when there are block comments - [#2592](https://github.com/agda/agda/issues/2592): Internal Error in Agda/TypeChecking/Serialise/Instances/Common.hs - [#2597](https://github.com/agda/agda/issues/2597): Inline record definitions confuse the reflection API - [#2602](https://github.com/agda/agda/issues/2602): Debug output messes up AgdaInfo buffer - [#2603](https://github.com/agda/agda/issues/2603): Internal error in MetaVars.hs - [#2604](https://github.com/agda/agda/issues/2604): Use QNames as anchors in generated HTML - [#2605](https://github.com/agda/agda/issues/2605): HTML backend generates anchors for whitespace - [#2606](https://github.com/agda/agda/issues/2606): Check that LHS of a rewrite rule doesn't reduce is too strict - [#2612](https://github.com/agda/agda/issues/2612): `exact-split` documentation is outdated and incomplete - [#2613](https://github.com/agda/agda/issues/2613): Parametrised modules, with-abstraction and termination - [#2620](https://github.com/agda/agda/issues/2620): Internal error in auto. - [#2621](https://github.com/agda/agda/issues/2621): Case splitting instantiates meta - [#2626](https://github.com/agda/agda/issues/2626): triggered internal error with sized types in MetaVars module - [#2629](https://github.com/agda/agda/issues/2629): Exact splitting should not complain about absurd clauses - [#2631](https://github.com/agda/agda/issues/2631): docs for auto aren't clear on how to use flags/options - [#2632](https://github.com/agda/agda/issues/2632): some flags to auto dont seem to work in current agda 2.5.2 - [#2637](https://github.com/agda/agda/issues/2637): Internal error in Agda.TypeChecking.Pretty, possibly related to sized types - [#2639](https://github.com/agda/agda/issues/2639): Performance regression, possibly related to the size solver - [#2641](https://github.com/agda/agda/issues/2641): Required instance of FromNat when compiling imported files - [#2642](https://github.com/agda/agda/issues/2642): Records with duplicate fields - [#2644](https://github.com/agda/agda/issues/2644): Wrong substitution in expandRecordVar - [#2645](https://github.com/agda/agda/issues/2645): Agda accepts postulated fields in a record - [#2646](https://github.com/agda/agda/issues/2646): Only warn if fixities for undefined symbols are given - [#2649](https://github.com/agda/agda/issues/2649): Empty list of "previous definition" in duplicate definition error - [#2652](https://github.com/agda/agda/issues/2652): Added a new variant of the colon to the Agda input method - [#2653](https://github.com/agda/agda/issues/2653): agda-mode: "cannot refine" inside instance argument even though term to be refined typechecks there - [#2654](https://github.com/agda/agda/issues/2654): Internal error on result splitting without --postfix-projections - [#2664](https://github.com/agda/agda/issues/2664): Segmentation fault with compiled programs using mutual record - [#2665](https://github.com/agda/agda/issues/2665): Documentation: Record update syntax in wrong location - [#2666](https://github.com/agda/agda/issues/2666): Internal error at Agda/Syntax/Abstract/Name.hs:113 - [#2667](https://github.com/agda/agda/issues/2667): Panic error on unbound variable. - [#2669](https://github.com/agda/agda/issues/2669): Interaction: incorrect field variable name generation - [#2671](https://github.com/agda/agda/issues/2671): Feature request: nullary pattern matching lambdas - [#2679](https://github.com/agda/agda/issues/2679): Internal error at "Typechecking/Abstract.hs:133" and "TypeChecking/Telescope.hs:68" - [#2682](https://github.com/agda/agda/issues/2682): What are the rules for projections of abstract records? - [#2684](https://github.com/agda/agda/issues/2684): Bad error message for abstract constructor - [#2686](https://github.com/agda/agda/issues/2686): Abstract constructors should be ignored when resolving overloading - [#2690](https://github.com/agda/agda/issues/2690): [regression?] Agda engages in deep search instead of immediately failing - [#2700](https://github.com/agda/agda/issues/2700): Add a command to check against goal type (and normalise) - [#2703](https://github.com/agda/agda/issues/2703): Regression: Internal error for underapplied indexed constructor - [#2705](https://github.com/agda/agda/issues/2705): The GHC backend might diverge in infinite file creation - [#2708](https://github.com/agda/agda/issues/2708): Why is the `name` field in .agda-lib files mandatory? - [#2710](https://github.com/agda/agda/issues/2710): Type checker hangs - [#2712](https://github.com/agda/agda/issues/2712): Compiler Pragma for headers - [#2714](https://github.com/agda/agda/issues/2714): Option --no-main should be allowed as file-local option - [#2717](https://github.com/agda/agda/issues/2717): internal error at DisplayForm.hs:197 - [#2718](https://github.com/agda/agda/issues/2718): Interactive 'give' doesn't insert enough parenthesis - [#2721](https://github.com/agda/agda/issues/2721): Without-K doesn't prevent heterogeneous conflict between literals - [#2723](https://github.com/agda/agda/issues/2723): Unreachable clauses in definition by copattern matching trip clause compiler - [#2725](https://github.com/agda/agda/issues/2725): File names for generated HTML files - [#2726](https://github.com/agda/agda/issues/2726): Old regression related to with - [#2727](https://github.com/agda/agda/issues/2727): Internal errors related to rewrite - [#2729](https://github.com/agda/agda/issues/2729): Regression: case splitting uses variable name variants instead of the unused original names - [#2730](https://github.com/agda/agda/issues/2730): Command to give in spite of termination errors - [#2731](https://github.com/agda/agda/issues/2731): Agda fails to build with happy 1.19.6 - [#2733](https://github.com/agda/agda/issues/2733): Avoid some uses of \AgdaIndent? - [#2734](https://github.com/agda/agda/issues/2734): Make height of empty lines configurable - [#2736](https://github.com/agda/agda/issues/2736): Segfault using Alex 3.2.2 and cpphs - [#2740](https://github.com/agda/agda/issues/2740): Indenting every line of code should be a no-op Release notes for Agda version 2.5.2 ==================================== Installation and infrastructure ------------------------------- * Modular support for literate programming Literate programming support has been moved out of the lexer and into the `Agda.Syntax.Parser.Literate` module. Files ending in `.lagda` are still interpreted as literate TeX. The extension `.lagda.tex` may now also be used for literate TeX files. Support for more literate code formats and extensions can be added modularly. By default, `.lagda.*` files are opened in the Emacs mode corresponding to their last extension. One may switch to and from Agda mode manually. * reStructuredText Literate Agda code can now be written in reStructuredText format, using the `.lagda.rst` extension. As a general rule, Agda will parse code following a line ending in `::`, as long as that line does not start with `..`. The module name must match the path of the file in the documentation, and must be given explicitly. Several files have been converted already, for instance: - `language/mixfix-operators.lagda.rst` - `tools/compilers.lagda.rst` Note that: - Code blocks inside an rST comment block will be type-checked by Agda, but not rendered in the documentation. - Code blocks delimited by `.. code-block:: agda` will be rendered in the final documenation, but not type-checked by Agda. - All lines inside a codeblock must be further indented than the first line of the code block. - Indentation must be consistent between code blocks. In other words, the file as a whole must be a valid Agda file if all the literate text is replaced by white space. * Documentation testing All documentation files in the `doc/user-manual` directory that end in `.lagda.rst` can be typechecked by running `make user-manual-test`, and also as part of the general test suite. * Support installation through Stack The Agda sources now also include a configuration for the stack install tool (tested through continuous integration). It should hence be possible to repeatably build any future Agda version (including unreleased commits) from source by checking out that version and running `stack install` from the checkout directory. By using repeatable builds, this should keep selecting the same dependencies in the face of new releases on Hackage. For further motivation, see Issue [#2005](https://github.com/agda/agda/issues/2005). * Removed the `--test` command-line option This option ran the internal test-suite. This test-suite was implemented using Cabal supports for test-suites. [Issue [#2083](https://github.com/agda/agda/issues/2083)]. * The `--no-default-libraries` flag has been split into two flags [Issue [#1937](https://github.com/agda/agda/issues/1937)] - `--no-default-libraries`: Ignore the defaults file but still look for local `.agda-lib` files - `--no-libraries`: Don't use any `.agda-lib` files (the previous behaviour of `--no-default-libraries`). * If `agda` was built inside `git` repository, then the `--version` flag will display the hash of the commit used, and whether the tree was `-dirty` (i.e. there were uncommited changes in the working directory). Otherwise, only the version number is shown. Language -------- * Dot patterns are now optional Consider the following program ```agda data Vec (A : Set) : Nat → Set where [] : Vec A zero cons : ∀ n → A → Vec A n → Vec A (suc n) vmap : ∀ {A B} n → (A → B) → Vec A n → Vec B n vmap .zero f [] = [] vmap .(suc m) f (cons m x xs) = cons m (f x) (vmap m f xs) ``` If we don't care about the dot patterns they can (and could previously) be replaced by wildcards: ```agda vmap : ∀ {A B} n → (A → B) → Vec A n → Vec B n vmap _ f [] = [] vmap _ f (cons m x xs) = cons m (f x) (vmap m f xs) ``` Now it is also allowed to give a variable pattern in place of the dot pattern. In this case the variable will be bound to the value of the dot pattern. For our example: ```agda vmap : ∀ {A B} n → (A → B) → Vec A n → Vec B n vmap n f [] = [] vmap n f (cons m x xs) = cons m (f x) (vmap m f xs) ``` In the first clause `n` reduces to `zero` and in the second clause `n` reduces to `suc m`. * Module parameters can now be refined by pattern matching Previously, pattern matches that would refine a variable outside the current left-hand side was disallowed. For instance, the following would give an error, since matching on the vector would instantiate `n`. ```agda module _ {A : Set} {n : Nat} where f : Vec A n → Vec A n f [] = [] f (x ∷ xs) = x ∷ xs ``` Now this is no longer disallowed. Instead `n` is bound to the appropriate value in each clause. * With-abstraction now abstracts also in module parameters The change that allows pattern matching to refine module parameters also allows with-abstraction to abstract in them. For instance, ```agda module _ (n : Nat) (xs : Vec Nat (n + n)) where f : Nat f with n + n f | nn = ? -- xs : Vec Nat nn ``` Note: Any function argument or lambda-bound variable bound outside a given function counts as a module parameter. To prevent abstraction in a parameter you can hide it inside a definition. In the above example, ```agda module _ (n : Nat) (xs : Vec Nat (n + n)) where ys : Vec Nat (n + n) ys = xs f : Nat f with n + n f | nn = ? -- xs : Vec Nat nn, ys : Vec Nat (n + n) ``` * As-patterns [Issue [#78](https://github.com/agda/agda/issues/78)]. As-patterns (`@`-patterns) are finally working and can be used to name a pattern. The name has the same scope as normal pattern variables (i.e. the right-hand side, where clause, and dot patterns). The name reduces to the value of the named pattern. For example:: ```agda module _ {A : Set} (_<_ : A → A → Bool) where merge : List A → List A → List A merge xs [] = xs merge [] ys = ys merge xs@(x ∷ xs₁) ys@(y ∷ ys₁) = if x < y then x ∷ merge xs₁ ys else y ∷ merge xs ys₁ ``` * Idiom brackets. There is new syntactic sugar for idiom brackets: `(| e a1 .. an |)` expands to `pure e <*> a1 <*> .. <*> an` The desugaring takes place before scope checking and only requires names `pure` and `_<*>_` in scope. Idiom brackets work well with operators, for instance `(| if a then b else c |)` desugars to `pure if_then_else_ <*> a <*> b <*> c` Limitations: - The top-level application inside idiom brackets cannot include implicit applications, so `(| foo {x = e} a b |)` is illegal. In the case `e` is pure you can write `(| (foo {x = e}) a b |)` which desugars to `pure (foo {x = e}) <*> a <*> b` - Binding syntax and operator sections cannot appear immediately inside idiom brackets. * Layout for pattern matching lambdas. You can now write pattern matching lambdas using the syntax ```agda λ where false → true true → false ``` avoiding the need for explicit curly braces and semicolons. * Overloaded projections [Issue [#1944](https://github.com/agda/agda/issues/1944)]. Ambiguous projections are no longer a scope error. Instead they get resolved based on the type of the record value they are eliminating. This corresponds to constructors, which can be overloaded and get disambiguated based on the type they are introducing. Example: ```agda module _ (A : Set) (a : A) where record R B : Set where field f : B open R public record S B : Set where field f : B open S public ``` Exporting `f` twice from both `R` and `S` is now allowed. Then, ```agda r : R A f r = a s : S A f s = f r ``` disambiguates to: ```agda r : R A R.f r = a s : S A S.f s = R.f r ``` If the type of the projection is known, it can also be disambiguated unapplied. ```agda unapplied : R A -> A unapplied = f ``` * Postfix projections [Issue [#1963](https://github.com/agda/agda/issues/1963)]. Agda now supports a postfix syntax for projection application. This style is more in harmony with copatterns. For example: ```agda record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream repeat : ∀{A} (a : A) → Stream A repeat a .head = a repeat a .tail = repeat a zipWith : ∀{A B C} (f : A → B → C) (s : Stream A) (t : Stream B) → Stream C zipWith f s t .head = f (s .head) (t .head) zipWith f s t .tail = zipWith f (s .tail) (t .tail) module Fib (Nat : Set) (zero one : Nat) (plus : Nat → Nat → Nat) where {-# TERMINATING #-} fib : Stream Nat fib .head = zero fib .tail .head = one fib .tail .tail = zipWith plus fib (fib .tail) ``` The thing we eliminate with projection now is visibly the head, i.e., the left-most expression of the sequence (e.g. `repeat` in `repeat a .tail`). The syntax overlaps with dot patterns, but for type correct left hand sides there is no confusion: Dot patterns eliminate function types, while (postfix) projection patterns eliminate record types. By default, Agda prints system-generated projections (such as by eta-expansion or case splitting) prefix. This can be changed with the new option: ```agda {-# OPTIONS --postfix-projections #-} ``` Result splitting in extended lambdas (aka pattern lambdas) always produces postfix projections, as prefix projection pattern do not work here: a prefix projection needs to go left of the head, but the head is omitted in extended lambdas. ```agda dup : ∀{A : Set}(a : A) → A × A dup = λ{ a → ? } ``` Result splitting (`C-c C-c RET`) here will yield: ```agda dup = λ{ a .proj₁ → ? ; a .proj₂ → ? } ``` * Projection parameters [Issue [#1954](https://github.com/agda/agda/issues/1954)]. When copying a module, projection parameters will now stay hidden arguments, even if the module parameters are visible. This matches the situation we had for constructors since long. Example: ```agda module P (A : Set) where record R : Set where field f : A open module Q A = P A ``` Parameter `A` is now hidden in `R.f`: ```agda test : ∀{A} → R A → A test r = R.f r ``` Note that a module parameter that corresponds to the record value argument of a projection will not be hidden. ```agda module M (A : Set) (r : R A) where open R A r public test' : ∀{A} → R A → A test' r = M.f r ``` * Eager insertion of implicit arguments [Issue [#2001](https://github.com/agda/agda/issues/2001)] Implicit arguments are now (again) eagerly inserted in left-hand sides. The previous behaviour of inserting implicits for where blocks, but not right-hand sides was not type safe. * Module applications can now be eta expanded/contracted without changing their behaviour [Issue #[1985](https://github.com/agda/agda/issues/1985)] Previously definitions exported using `open public` got the incorrect type for underapplied module applications. Example: ```agda module A where postulate A : Set module B (X : Set) where open A public module C₁ = B module C₂ (X : Set) = B X ``` Here both `C₁.A` and `C₂.A` have type `(X : Set) → Set`. * Polarity pragmas. Polarity pragmas can be attached to postulates. The polarities express how the postulate's arguments are used. The following polarities are available: `_`: Unused. `++`: Strictly positive. `+`: Positive. `-`: Negative. `*`: Unknown/mixed. Polarity pragmas have the form ``` {-# POLARITY name #-} ``` and can be given wherever fixity declarations can be given. The listed polarities apply to the given postulate's arguments (explicit/implicit/instance), from left to right. Polarities currently cannot be given for module parameters. If the postulate takes n arguments (excluding module parameters), then the number of polarities given must be between 0 and n (inclusive). Polarity pragmas make it possible to use postulated type formers in recursive types in the following way: ```agda postulate ∥_∥ : Set → Set {-# POLARITY ∥_∥ ++ #-} data D : Set where c : ∥ D ∥ → D ``` Note that one can use postulates that may seem benign, together with polarity pragmas, to prove that the empty type is inhabited: ```agda postulate _⇒_ : Set → Set → Set lambda : {A B : Set} → (A → B) → A ⇒ B apply : {A B : Set} → A ⇒ B → A → B {-# POLARITY _⇒_ ++ #-} data ⊥ : Set where data D : Set where c : D ⇒ ⊥ → D not-inhabited : D → ⊥ not-inhabited (c f) = apply f (c f) inhabited : D inhabited = c (lambda not-inhabited) bad : ⊥ bad = not-inhabited inhabited ``` Polarity pragmas are not allowed in safe mode. * Declarations in a `where`-block are now private. [Issue [#2101](https://github.com/agda/agda/issues/2101)] This means that ```agda f ps = body where decls ``` is now equivalent to ```agda f ps = body where private decls ``` This changes little, since the `decls` were anyway not in scope outside `body`. However, it makes a difference for abstract definitions, because private type signatures can see through abstract definitions. Consider: ```agda record Wrap (A : Set) : Set where field unwrap : A postulate P : ∀{A : Set} → A → Set abstract unnamedWhere : (A : Set) → Set unnamedWhere A = A where -- the following definitions are private! B : Set B = Wrap A postulate b : B test : P (Wrap.unwrap b) -- succeeds ``` The `abstract` is inherited in `where`-blocks from the parent (here: function `unnamedWhere`). Thus, the definition of `B` is opaque and the type equation `B = Wrap A` cannot be used to check type signatures, not even of abstract definitions. Thus, checking the type `P (Wrap.unwrap b)` would fail. However, if `test` is private, abstract definitions are translucent in its type, and checking succeeds. With the implemented change, all `where`-definitions are private, in this case `B`, `b`, and `test`, and the example succeeds. Nothing changes for the named forms of `where`, ```agda module M where module _ where ``` For instance, this still fails: ```agda abstract unnamedWhere : (A : Set) → Set unnamedWhere A = A module M where B : Set B = Wrap A postulate b : B test : P (Wrap.unwrap b) -- fails ``` * Private anonymous modules now work as expected [Issue [#2199](https://github.com/agda/agda/issues/2199)] Previously the `private` was ignored for anonymous modules causing its definitions to be visible outside the module containing the anonymous module. This is no longer the case. For instance, ```agda module M where private module _ (A : Set) where Id : Set Id = A foo : Set → Set foo = Id open M bar : Set → Set bar = Id -- Id is no longer in scope here ``` * Pattern synonyms are now expanded on left hand sides of DISPLAY pragmas [Issue [#2132](https://github.com/agda/agda/issues/2132)]. Example: ```agda data D : Set where C c : D g : D → D pattern C′ = C {-# DISPLAY C′ = C′ #-} {-# DISPLAY g C′ = c #-} ``` This now behaves as: ```agda {-# DISPLAY C = C′ #-} {-# DISPLAY g C = c #-} ``` Expected error for ```agda test : C ≡ g C test = refl ``` is thus: ``` C′ != c of type D ``` * The built-in floats have new semantics to fix inconsistencies and to improve cross-platform portability. - Float equality has been split into two primitives. ``primFloatEquality`` is designed to establish decidable propositional equality while ``primFloatNumericalEquality`` is intended for numerical computations. They behave as follows: ``` primFloatEquality NaN NaN = True primFloatEquality 0.0 -0.0 = False primFloatNumericalEquality NaN NaN = False primFloatNumericalEquality 0.0 -0.0 = True ``` This change fixes an inconsistency, see [Issue [#2169](https://github.com/agda/agda/issues/2169)]. For further detail see the [user manual](http://agda.readthedocs.io/en/v2.5.2/language/built-ins.html#floats). - Floats now have only one `NaN` value. This is necessary for proper Float support in the JavaScript backend, as JavaScript (and some other platforms) only support one `NaN` value. - The primitive function `primFloatLess` was renamed `primFloatNumericalLess`. * Added new primitives to built-in floats: - `primFloatNegate : Float → Float` [Issue [#2194](https://github.com/agda/agda/issues/2194)] - Trigonometric primitives [Issue [#2200](https://github.com/agda/agda/issues/2200)]: ```agda primCos : Float → Float primTan : Float → Float primASin : Float → Float primACos : Float → Float primATan : Float → Float primATan2 : Float → Float → Float ``` * Anonymous declarations [Issue [#1465](https://github.com/agda/agda/issues/1465)]. A module can contain an arbitrary number of declarations named `_` which will scoped-checked and type-checked but won't be made available in the scope (nor exported). They cannot introduce arguments on the LHS (but one can use lambda-abstractions on the RHS) and they cannot be defined by recursion. ```agda _ : Set → Set _ = λ x → x ``` ### Rewriting * The REWRITE pragma can now handle several names. E.g.: ```agda {-# REWRITE eq1 eq2 #-} ``` ### Reflection * You can now use macros in reflected terms [Issue [#2130](https://github.com/agda/agda/issues/2130)]. For instance, given a macro ```agda macro some-tactic : Term → TC ⊤ some-tactic = ... ``` the term `def (quote some-tactic) []` represents a call to the macro. This makes it a lot easier to compose tactics. * The reflection machinery now uses normalisation less often: * Macros no longer normalise the (automatically quoted) term arguments. * The TC primitives `inferType`, `checkType` and `quoteTC` no longer normalise their arguments. * The following deprecated constructions may also have been changed: `quoteGoal`, `quoteTerm`, `quoteContext` and `tactic`. * New TC primitive: `withNormalisation`. To recover the old normalising behaviour of `inferType`, `checkType`, `quoteTC` and `getContext`, you can wrap them inside a call to `withNormalisation true`: ```agda withNormalisation : ∀ {a} {A : Set a} → Bool → TC A → TC A ``` * New TC primitive: `reduce`. ```agda reduce : Term → TC Term ``` Reduces its argument to weak head normal form. * Added new TC primitive: `isMacro` [Issue [#2182](https://github.com/agda/agda/issues/2182)] ```agda isMacro : Name → TC Bool ``` Returns `true` if the name refers to a macro, otherwise `false`. * The `record-type` constructor now has an extra argument containing information about the record type's fields: ```agda data Definition : Set where … record-type : (c : Name) (fs : List (Arg Name)) → Definition … ``` Type checking ------------- * Files with open metas can be imported now [Issue [#964](https://github.com/agda/agda/issues/964)]. This should make simultaneous interactive development on several modules more pleasant. Requires option: `--allow-unsolved-metas` Internally, before serialization, open metas are turned into postulates named ``` unsolved#meta. ``` where `` is the internal meta variable number. * The performance of the compile-time evaluator has been greatly improved. - Fixed a memory leak in evaluator (Issue [#2147](https://github.com/agda/agda/issues/2147)). - Reduction speed improved by an order of magnitude and is now comparable to the performance of GHCi. Still call-by-name though. * The detection of types that satisfy K added in Agda 2.5.1 has been rolled back (see Issue [#2003](https://github.com/agda/agda/issues/2003)). * Eta-equality for record types is now only on after the positivity checker has confirmed it is safe to have it. Eta-equality for unguarded inductive records previously lead to looping of the type checker. [See Issue [#2197](https://github.com/agda/agda/issues/2197)] ```agda record R : Set where inductive field r : R loops : R loops = ? ``` As a consequence of this change, the following example does not type-check any more: ```agda mutual record ⊤ : Set where test : ∀ {x y : ⊤} → x ≡ y test = refl ``` It fails because the positivity checker is only run after the mutual block, thus, eta-equality for `⊤` is not available when checking test. One can declare eta-equality explicitly, though, to make this example work. ```agda mutual record ⊤ : Set where eta-equality test : ∀ {x y : ⊤} → x ≡ y test = refl ``` * Records with instance fields are now eta expanded before instance search. For instance, assuming `Eq` and `Ord` with boolean functions `_==_` and `_<_` respectively, ```agda record EqAndOrd (A : Set) : Set where field {{eq}} : Eq A {{ord}} : Ord A leq : {A : Set} {{_ : EqAndOrd A}} → A → A → Bool leq x y = x == y || x < y ``` Here the `EqAndOrd` record is automatically unpacked before instance search, revealing the component `Eq` and `Ord` instances. This can be used to simulate superclass dependencies. * Overlappable record instance fields. Instance fields in records can be marked as overlappable using the new `overlap` keyword: ```agda record Ord (A : Set) : Set where field _<_ : A → A → Bool overlap {{eqA}} : Eq A ``` When instance search finds multiple candidates for a given instance goal and they are **all** overlappable it will pick the left-most candidate instead of refusing to solve the instance goal. This can be use to solve the problem arising from shared "superclass" dependencies. For instance, if you have, in addition to `Ord` above, a `Num` record that also has an `Eq` field and want to write a function requiring both `Ord` and `Num`, any `Eq` constraint will be solved by the `Eq` instance from whichever argument that comes first. ```agda record Num (A : Set) : Set where field fromNat : Nat → A overlap {{eqA}} : Eq A lessOrEqualFive : {A : Set} {{NumA : Num A}} {{OrdA : Ord A}} → A → Bool lessOrEqualFive x = x == fromNat 5 || x < fromNat 5 ``` In this example the call to `_==_` will use the `eqA` field from `NumA` rather than the one from `OrdA`. Note that these may well be different. * Instance fields can be left out of copattern matches [Issue [#2288](https://github.com/agda/agda/issues/2288)] Missing cases for instance fields (marked `{{` `}}`) in copattern matches will be solved using instance search. This makes defining instances with superclass fields much nicer. For instance, we can define `Nat` instances of `Eq`, `Ord` and `Num` from above as follows: ```agda instance EqNat : Eq Nat _==_ {{EqNat}} n m = eqNat n m OrdNat : Ord Nat _<_ {{OrdNat}} n m = lessNat n m NumNat : Num Nat fromNat {{NumNat}} n = n ``` The `eqA` fields of `Ord` and `Num` are filled in using instance search (with `EqNat` in this case). * Limited instance search depth [Issue [#2269](https://github.com/agda/agda/issues/2269)] To prevent instance search from looping on bad instances (see [Issue #1743](https://github.com/agda/agda/issues/1743)) the search depth of instance search is now limited. The maximum depth can be set with the `--instance-search-depth` flag and the default value is `500`. Emacs mode ---------- * New command `C-u C-u C-c C-n`: Use `show` to display the result of normalisation. Calling `C-u C-u C-c C-n` on an expression `e` (in a hole or at top level) normalises `show e` and prints the resulting string, or an error message if the expression does not normalise to a literal string. This is useful when working with complex data structures for which you have defined a nice `Show` instance. Note that the name `show` is hardwired into the command. * Changed feature: Interactively split result. Make-case (`C-c C-c`) with no variables will now *either* introduce function arguments *or* do a copattern split (or fail). This is as before: ```agda test : {A B : Set} (a : A) (b : B) → A × B test a b = ? -- expected: -- proj₁ (test a b) = {!!} -- proj₂ (test a b) = {!!} testFun : {A B : Set} (a : A) (b : B) → A × B testFun = ? -- expected: -- testFun a b = {!!} ``` This is has changed: ```agda record FunRec A : Set where field funField : A → A open FunRec testFunRec : ∀{A} → FunRec A testFunRec = ? -- expected (since 2016-05-03): -- funField testFunRec = {!!} -- used to be: -- funField testFunRec x = {!!} ``` * Changed feature: Split on hidden variables. Make-case (`C-c C-c`) will no longer split on the given hidden variables, but only make them visible. (Splitting can then be performed in a second go.) ```agda test : ∀{N M : Nat} → Nat → Nat → Nat test N M = {!.N N .M!} ``` Invoking splitting will result in: ```agda test {N} {M} zero M₁ = ? test {N} {M} (suc N₁) M₁ = ? ``` The hidden `.N` and `.M` have been brought into scope, the visible `N` has been split upon. * Non-fatal errors/warnings. Non-fatal errors and warnings are now displayed in the info buffer and do not interrupt the typechecking of the file. Currently termination errors, unsolved metavariables, unsolved constraints, positivity errors, deprecated BUILTINs, and empty REWRITING pragmas are non-fatal errors. * Highlighting for positivity check failures Negative occurences of a datatype in its definition are now highlighted in a way similar to termination errors. * The abbrev for codata was replaced by an abbrev for code environments. If you type `c C-x '` (on a suitably standard setup), then Emacs will insert the following text: ```agda \begin{code} \end{code}. ``` * The LaTeX backend can now be invoked from the Emacs mode. Using the compilation command (`C-c C-x C-c`). The flag `--latex-dir` can be used to set the output directory (by default: `latex`). Note that if this directory is a relative path, then it is interpreted relative to the "project root". (When the LaTeX backend is invoked from the command line the path is interpreted relative to the current working directory.) Example: If the module `A.B.C` is located in the file `/foo/A/B/C.agda`, then the project root is `/foo/`, and the default output directory is `/foo/latex/`. * The compilation command (`C-c C-x C-c`) now by default asks for a backend. To avoid this question, set the customisation variable `agda2-backend` to an appropriate value. * The command `agda2-measure-load-time` no longer "touches" the file, and the optional argument `DONT-TOUCH` has been removed. * New command `C-u (C-u) C-c C-s`: Simplify or normalise the solution `C-c C-s` produces When writing examples, it is nice to have the hole filled in with a normalised version of the solution. Calling `C-c C-s` on ```agda _ : reverse (0 ∷ 1 ∷ []) ≡ ? _ = refl ``` used to yield the non informative `reverse (0 ∷ 1 ∷ [])` when we would have hopped to get `1 ∷ 0 ∷ []` instead. We can now control finely the degree to which the solution is simplified. * Changed feature: Solving the hole at point Calling `C-c C-s` inside a specific goal does not solve *all* the goals already instantiated internally anymore: it only solves the one at hand (if possible). * New bindings: All the blackboard bold letters are now available [Pull Request [#2305](https://github.com/agda/agda/pull/2305)] The Agda input method only bound a handful of the blackboard bold letters but programmers were actually using more than these. They are now all available: lowercase and uppercase. Some previous bindings had to be modified for consistency. The naming scheme is as follows: * `\bx` for lowercase blackboard bold * `\bX` for uppercase blackboard bold * `\bGx` for lowercase greek blackboard bold (similar to `\Gx` for greeks) * `\bGX` for uppercase greek blackboard bold (similar to `\GX` for uppercase greeks) * Replaced binding for go back Use `M-,` (instead of `M-*`) for go back in Emacs ≥ 25.1 (and continue using `M-*` with previous versions of Emacs). Compiler backends ----------------- * JS compiler backend The JavaScript backend has been (partially) rewritten. The JavaScript backend now supports most Agda features, notably copatterns can now be compiled to JavaScript. Furthermore, the existing optimizations from the other backends now apply to the JavaScript backend as well. * GHC, JS and UHC compiler backends Added new primitives to built-in floats [Issues [#2194](https://github.com/agda/agda/issues/2194) and [#2200](https://github.com/agda/agda/issues/2200)]: ```agda primFloatNegate : Float → Float primCos : Float → Float primTan : Float → Float primASin : Float → Float primACos : Float → Float primATan : Float → Float primATan2 : Float → Float → Float ``` LaTeX backend ------------- * Code blocks are now (by default) surrounded by vertical space. [Issue [#2198](https://github.com/agda/agda/issues/2198)] Use `\AgdaNoSpaceAroundCode{}` to avoid this vertical space, and `\AgdaSpaceAroundCode{}` to reenable it. Note that, if `\AgdaNoSpaceAroundCode{}` is used, then empty lines before or after a code block will not necessarily lead to empty lines in the generated document. However, empty lines *inside* the code block do (by default) lead to empty lines in the output. If you prefer the previous behaviour, then you can use the `agda.sty` file that came with the previous version of Agda. * `\AgdaHide{...}` now eats trailing spaces (using `\ignorespaces`). * New environments: `AgdaAlign`, `AgdaSuppressSpace` and `AgdaMultiCode`. Sometimes one might want to break up a code block into multiple pieces, but keep code in different blocks aligned with respect to each other. Then one can use the `AgdaAlign` environment. Example usage: ```latex \begin{AgdaAlign} \begin{code} code code (more code) \end{code} Explanation... \begin{code} aligned with "code" code (aligned with (more code)) \end{code} \end{AgdaAlign} ``` Note that `AgdaAlign` environments should not be nested. Sometimes one might also want to hide code in the middle of a code block. This can be accomplished in the following way: ```latex \begin{AgdaAlign} \begin{code} visible \end{code} \AgdaHide{ \begin{code} hidden \end{code}} \begin{code} visible \end{code} \end{AgdaAlign} ``` However, the result may be ugly: extra space is perhaps inserted around the code blocks. The `AgdaSuppressSpace` environment ensures that extra space is only inserted before the first code block, and after the last one (but not if `\AgdaNoSpaceAroundCode{}` is used). The environment takes one argument, the number of wrapped code blocks (excluding hidden ones). Example usage: ```latex \begin{AgdaAlign} \begin{code} code more code \end{code} Explanation... \begin{AgdaSuppressSpace}{2} \begin{code} aligned with "code" aligned with "more code" \end{code} \AgdaHide{ \begin{code} hidden code \end{code}} \begin{code} also aligned with "more code" \end{code} \end{AgdaSuppressSpace} \end{AgdaAlign} ``` Note that `AgdaSuppressSpace` environments should not be nested. There is also a combined environment, `AgdaMultiCode`, that combines the effects of `AgdaAlign` and `AgdaSuppressSpace`. Tools ----- ### agda-ghc-names The `agda-ghc-names` now has its own repository at https://github.com/agda/agda-ghc-names and is no longer distributed with Agda. Release notes for Agda version 2.5.1.2 ====================================== * Fixed broken type signatures that were incorrectly accepted due to [GHC #12784](https://ghc.haskell.org/trac/ghc/ticket/12784). Release notes for Agda version 2.5.1.1 ====================================== Installation and infrastructure ------------------------------- * Added support for GHC 8.0.1. * Documentation is now built with Python >=3.3, as done by [readthedocs.org](https://readthedocs.org/). Bug fixes --------- * Fixed a serious performance problem with instance search Issues [#1952](https://github.com/agda/agda/issues/1952) and [#1998](https://github.com/agda/agda/issues/1998). Also related: [#1955](https://github.com/agda/agda/issues/1955) and [#2025](https://github.com/agda/agda/issues/2025) * Interactively splitting variable with `C-c C-c` no longer introduces new trailing patterns. This fixes Issue [#1950](https://github.com/agda/agda/issues/1950). ```agda data Ty : Set where _⇒_ : Ty → Ty → Ty ⟦_⟧ : Ty → Set ⟦ A ⇒ B ⟧ = ⟦ A ⟧ → ⟦ B ⟧ data Term : Ty → Set where K : (A B : Ty) → Term (A ⇒ (B ⇒ A)) test : (A : Ty) (a : Term A) → ⟦ A ⟧ test A a = {!a!} ``` Before change, case splitting on `a` would give ```agda test .(A ⇒ (B ⇒ A)) (K A B) x x₁ = ? ``` Now, it yields ```agda test .(A ⇒ (B ⇒ A)) (K A B) = ? ``` * In literate TeX files, `\begin{code}` and `\end{code}` can be preceded (resp. followed) by TeX code on the same line. This fixes Issue [#2077](https://github.com/agda/agda/issues/2077). * Other issues fixed (see [bug tracker](https://github.com/agda/agda/issues)): [#1951](https://github.com/agda/agda/issues/1951) (mixfix binders not working in 'syntax') [#1967](https://github.com/agda/agda/issues/1967) (too eager insteance search error) [#1974](https://github.com/agda/agda/issues/1974) (lost constraint dependencies) [#1982](https://github.com/agda/agda/issues/1982) (internal error in unifier) [#2034](https://github.com/agda/agda/issues/2034) (function type instance goals) Compiler backends ----------------- * UHC compiler backend Added support for UHC 1.1.9.4. Release notes for Agda version 2.5.1 ==================================== Documentation ------------- * There is now an official Agda User Manual: https://agda.readthedocs.io/ Installation and infrastructure ------------------------------- * Builtins and primitives are now defined in a new set of modules available to all users, independent of any particular library. The modules are ```agda Agda.Builtin.Bool Agda.Builtin.Char Agda.Builtin.Coinduction Agda.Builtin.Equality Agda.Builtin.Float Agda.Builtin.FromNat Agda.Builtin.FromNeg Agda.Builtin.FromString Agda.Builtin.IO Agda.Builtin.Int Agda.Builtin.List Agda.Builtin.Nat Agda.Builtin.Reflection Agda.Builtin.Size Agda.Builtin.Strict Agda.Builtin.String Agda.Builtin.TrustMe Agda.Builtin.Unit ``` The standard library reexports the primitives from the new modules. The `Agda.Builtin` modules are installed in the same way as `Agda.Primitive`, but unlike `Agda.Primitive` they are not loaded automatically. Pragmas and options ------------------- * Library management There is a new 'library' concept for managing include paths. A library consists of - a name, - a set of libraries it depends on, and - a set of include paths. A library is defined in a `.agda-lib` file using the following format: ``` name: LIBRARY-NAME -- Comment depend: LIB1 LIB2 LIB3 LIB4 include: PATH1 PATH2 PATH3 ``` Dependencies are library names, not paths to `.agda-lib` files, and include paths are relative to the location of the library-file. To be useable, a library file has to be listed (with its full path) in `AGDA_DIR/libraries` (or `AGDA_DIR/libraries-VERSION`, for a given Agda version). `AGDA_DIR` defaults to `~/.agda` on Unix-like systems and `C:/Users/USERNAME/AppData/Roaming/agda` or similar on Windows, and can be overridden by setting the `AGDA_DIR` environment variable. Environment variables in the paths (of the form `$VAR` or `${VAR}`) are expanded. The location of the libraries file used can be overridden using the `--library-file=FILE` flag, although this is not expected to be very useful. You can find out the precise location of the 'libraries' file by calling `agda -l fjdsk Dummy.agda` and looking at the error message (assuming you don't have a library called fjdsk installed). There are three ways a library gets used: - You supply the `--library=LIB` (or `-l LIB`) option to Agda. This is equivalent to adding a `-iPATH` for each of the include paths of `LIB` and its (transitive) dependencies. - No explicit `--library` flag is given, and the current project root (of the Agda file that is being loaded) or one of its parent directories contains a `.agda-lib` file defining a library `LIB`. This library is used as if a `--librarary=LIB` option had been given, except that it is not necessary for the library to be listed in the `AGDA_DIR/libraries` file. - No explicit `--library` flag, and no `.agda-lib` file in the project root. In this case the file `AGDA_DIR/defaults` is read and all libraries listed are added to the path. The defaults file should contain a list of library names, each on a separate line. In this case the current directory is also added to the path. To disable default libraries, you can give the flag `--no-default-libraries`. Library names can end with a version number (for instance, `mylib-1.2.3`). When resolving a library name (given in a `--library` flag, or listed as a default library or library dependency) the following rules are followed: - If you don't give a version number, any version will do. - If you give a version number an exact match is required. - When there are multiple matches an exact match is preferred, and otherwise the latest matching version is chosen. For example, suppose you have the following libraries installed: `mylib`, `mylib-1.0`, `otherlib-2.1`, and `otherlib-2.3`. In this case, aside from the exact matches you can also say `--library=otherlib` to get `otherlib-2.3`. * New Pragma `COMPILED_DECLARE_DATA` for binding recursively defined Haskell data types to recursively defined Agda data types. If you have a Haskell type like ```haskell {-# LANGUAGE GADTs #-} module Issue223 where data A where BA :: B -> A data B where AB :: A -> B BB :: B ``` You can now bind it to corresponding mutual Agda inductive data types as follows: ```agda {-# IMPORT Issue223 #-} data A : Set {-# COMPILED_DECLARE_DATA A Issue223.A #-} data B : Set {-# COMPILED_DECLARE_DATA B Issue223.B #-} data A where BA : B → A {-# COMPILED_DATA A Issue223.A Issue223.BA #-} data B where AB : A → B BB : B {-# COMPILED_DATA B Issue223.B Issue223.AB Issue223.BB #-} ``` This fixes Issue [#223](https://github.com/agda/agda/issues/223). * New pragma `HASKELL` for adding inline Haskell code (GHC backend only) Arbitrary Haskell code can be added to a module using the `HASKELL` pragma. For instance, ```agda {-# HASKELL echo :: IO () echo = getLine >>= putStrLn #-} postulate echo : IO ⊤ {-# COMPILED echo echo #-} ``` * New option `--exact-split`. The `--exact-split` flag causes Agda to raise an error whenever a clause in a definition by pattern matching cannot be made to hold definitionally (i.e. as a reduction rule). Specific clauses can be excluded from this check by means of the `{-# CATCHALL #-}` pragma. For instance, the following definition will be rejected as the second clause cannot be made to hold definitionally: ```agda min : Nat → Nat → Nat min zero y = zero min x zero = zero min (suc x) (suc y) = suc (min x y ``` Catchall clauses have to be marked as such, for instance: ```agda eq : Nat → Nat → Bool eq zero zero = true eq (suc m) (suc n) = eq m n {-# CATCHALL #-} eq _ _ = false ``` * New option: `--no-exact-split`. This option can be used to override a global `--exact-split` in a file, by adding a pragma `{-# OPTIONS --no-exact-split #-}`. * New options: `--sharing` and `--no-sharing`. These options are used to enable/disable sharing and call-by-need evaluation. The default is `--no-sharing`. Note that they cannot appear in an OPTIONS pragma, but have to be given as command line arguments or added to the Agda Program Args from Emacs with `M-x customize-group agda2`. * New pragma `DISPLAY`. ```agda {-# DISPLAY f e1 .. en = e #-} ``` This causes `f e1 .. en` to be printed in the same way as `e`, where `ei` can bind variables used in `e`. The expressions `ei` and `e` are scope checked, but not type checked. For example this can be used to print overloaded (instance) functions with the overloaded name: ```agda instance NumNat : Num Nat NumNat = record { ..; _+_ = natPlus } {-# DISPLAY natPlus a b = a + b #-} ``` Limitations - Left-hand sides are restricted to variables, constructors, defined functions or types, and literals. In particular, lambdas are not allowed in left-hand sides. - Since `DISPLAY` pragmas are not type checked implicit argument insertion may not work properly if the type of `f` computes to an implicit function space after pattern matching. * Removed pragma `{-# ETA R #-}` The pragma `{-# ETA R #-}` is replaced by the `eta-equality` directive inside record declarations. * New option `--no-eta-equality`. The `--no-eta-equality` flag disables eta rules for declared record types. It has the same effect as `no-eta-equality` inside each declaration of a record type `R`. If used with the OPTIONS pragma it will not affect records defined in other modules. * The semantics of `{-# REWRITE r #-}` pragmas in parametrized modules has changed (see Issue [#1652](https://github.com/agda/agda/issues/1652)). Rewrite rules are no longer lifted to the top context. Instead, they now only apply to terms in (extensions of) the module context. If you want the old behaviour, you should put the `{-# REWRITE r #-}` pragma outside of the module (i.e. unindent it). * New pragma `{-# INLINE f #-}` causes `f` to be inlined during compilation. * The `STATIC` pragma is now taken into account during compilation. Calls to a function marked `STATIC` are normalised before compilation. The typical use case for this is to mark the interpreter of an embedded language as `STATIC`. * Option `--type-in-type` no longer implies `--no-universe-polymorphism`, thus, it can be used with explicit universe levels. [Issue [#1764](https://github.com/agda/agda/issues/1764)] It simply turns off error reporting for any level mismatch now. Examples: ```agda {-# OPTIONS --type-in-type #-} Type : Set Type = Set data D {α} (A : Set α) : Set where d : A → D A data E α β : Set β where e : Set α → E α β ``` * New `NO_POSITIVITY_CHECK` pragma to switch off the positivity checker for data/record definitions and mutual blocks. The pragma must precede a data/record definition or a mutual block. The pragma cannot be used in `--safe` mode. Examples (see `Issue1614*.agda` and `Issue1760*.agda` in `test/Succeed/`): 1. Skipping a single data definition. ```agda {-# NO_POSITIVITY_CHECK #-} data D : Set where lam : (D → D) → D ``` 2. Skipping a single record definition. ```agda {-# NO_POSITIVITY_CHECK #-} record U : Set where field ap : U → U ``` 3. Skipping an old-style mutual block: Somewhere within a `mutual` block before a data/record definition. ```agda mutual data D : Set where lam : (D → D) → D {-# NO_POSITIVITY_CHECK #-} record U : Set where field ap : U → U ``` 4. Skipping an old-style mutual block: Before the `mutual` keyword. ```agda {-# NO_POSITIVITY_CHECK #-} mutual data D : Set where lam : (D → D) → D record U : Set where field ap : U → U ``` 5. Skipping a new-style mutual block: Anywhere before the declaration or the definition of data/record in the block. ```agda record U : Set data D : Set record U where field ap : U → U {-# NO_POSITIVITY_CHECK #-} data D where lam : (D → D) → D ``` * Removed `--no-coverage-check` option. [Issue [#1918](https://github.com/agda/agda/issues/1918)] Language -------- ### Operator syntax * The default fixity for syntax declarations has changed from -666 to 20. * Sections. Operators can be sectioned by replacing arguments with underscores. There must not be any whitespace between these underscores and the adjacent nameparts. Examples: ```agda pred : ℕ → ℕ pred = _∸ 1 T : Bool → Set T = if_then ⊤ else ⊥ if : {A : Set} (b : Bool) → A → A → A if b = if b then_else_ ``` Sections are translated into lambda expressions. Examples: ```agda _∸ 1 ↦ λ section → section ∸ 1 if_then ⊤ else ⊥ ↦ λ section → if section then ⊤ else ⊥ if b then_else_ ↦ λ section section₁ → if b then section else section₁ ``` Operator sections have the same fixity as the underlying operator (except in cases like `if b then_else_`, in which the section is "closed", but the operator is not). Operator sections are not supported in patterns (with the exception of dot patterns), and notations coming from syntax declarations cannot be sectioned. * A long-standing operator fixity bug has been fixed. As a consequence some programs that used to parse no longer do. Previously each precedence level was (incorrectly) split up into five separate ones, ordered as follows, with the earlier ones binding less tightly than the later ones: - Non-associative operators. - Left associative operators. - Right associative operators. - Prefix operators. - Postfix operators. Now this problem has been addressed. It is no longer possible to mix operators of a given precedence level but different associativity. However, prefix and right associative operators are seen as having the same associativity, and similarly for postfix and left associative operators. Examples -------- The following code is no longer accepted: ```agda infixl 6 _+_ infix 6 _∸_ rejected : ℕ rejected = 1 + 0 ∸ 1 ``` However, the following previously rejected code is accepted: ```agda infixr 4 _,_ infix 4 ,_ ,_ : {A : Set} {B : A → Set} {x : A} → B x → Σ A B , y = _ , y accepted : Σ ℕ λ i → Σ ℕ λ j → Σ (i ≡ j) λ _ → Σ ℕ λ k → j ≡ k accepted = 5 , , refl , , refl ``` * The classification of notations with binders into the categories infix, prefix, postfix or closed has changed. [Issue [#1450](https://github.com/agda/agda/issues/1450)] The difference is that, when classifying the notation, only *regular* holes are taken into account, not *binding* ones. Example: The notation ```agda syntax m >>= (λ x → f) = x <- m , f ``` was previously treated as infix, but is now treated as prefix. * Notation can now include wildcard binders. Example: `syntax Σ A (λ _ → B) = A × B` * If an overloaded operator is in scope with several distinct precedence levels, then several instances of this operator will be included in the operator grammar, possibly leading to ambiguity. Previously the operator was given the default fixity [Issue [#1436](https://github.com/agda/agda/issues/1436)]. There is an exception to this rule: If there are multiple precedences, but at most one is explicitly declared, then only one instance will be included in the grammar. If there are no explicitly declared precedences, then this instance will get the default precedence, and otherwise it will get the declared precedence. If multiple occurrences of an operator are "merged" in the grammar, and they have distinct associativities, then they are treated as being non-associative. The three paragraphs above also apply to identical notations (coming from syntax declarations) for a given overloaded name. Examples: ```agda module A where infixr 5 _∷_ infixr 5 _∙_ infixl 3 _+_ infix 1 bind syntax bind c (λ x → d) = x ← c , d module B where infix 5 _∷_ infixr 4 _∙_ -- No fixity declaration for _+_. infixl 2 bind syntax bind c d = c ∙ d module C where infixr 2 bind syntax bind c d = c ∙ d open A open B open C -- _∷_ is infix 5. -- _∙_ has two fixities: infixr 4 and infixr 5. -- _+_ is infixl 3. -- A.bind's notation is infix 1. -- B.bind and C.bind's notations are infix 2. -- There is one instance of "_ ∷ _" in the grammar, and one -- instance of "_ + _". -- There are three instances of "_ ∙ _" in the grammar, one -- corresponding to A._∙_, one corresponding to B._∙_, and one -- corresponding to both B.bind and C.bind. ``` ### Reflection * The reflection framework has received a massive overhaul. A new type of reflected type checking computations supplants most of the old reflection primitives. The `quoteGoal`, `quoteContext` and tactic primitives are deprecated and will be removed in the future, and the `unquoteDecl` and `unquote` primitives have changed behaviour. Furthermore the following primitive functions have been replaced by builtin type checking computations: ```agda - primQNameType --> AGDATCMGETTYPE - primQNameDefinition --> AGDATCMGETDEFINITION - primDataConstructors --> subsumed by AGDATCMGETDEFINITION - primDataNumberOfParameters --> subsumed by AGDATCMGETDEFINITION ``` See below for details. * Types are no longer packaged with a sort. The `AGDATYPE` and `AGDATYPEEL` built-ins have been removed. Reflected types are now simply terms. * Reflected definitions have more information. The type for reflected definitions has changed to ```agda data Definition : Set where fun-def : List Clause → Definition data-type : Nat → List Name → Definition -- parameters and constructors record-type : Name → Definition -- name of the data/record type data-con : Name → Definition -- name of the constructor axiom : Definition prim-fun : Definition ``` Correspondingly the built-ins for function, data and record definitions (`AGDAFUNDEF`, `AGDAFUNDEFCON`, `AGDADATADEF`, `AGDARECORDDEF`) have been removed. * Reflected type checking computations. There is a primitive `TC` monad representing type checking computations. The `unquote`, `unquoteDecl`, and the new `unquoteDef` all expect computations in this monad (see below). The interface to the monad is the following ```agda -- Error messages can contain embedded names and terms. data ErrorPart : Set where strErr : String → ErrorPart termErr : Term → ErrorPart nameErr : Name → ErrorPart {-# BUILTIN AGDAERRORPART ErrorPart #-} {-# BUILTIN AGDAERRORPARTSTRING strErr #-} {-# BUILTIN AGDAERRORPARTTERM termErr #-} {-# BUILTIN AGDAERRORPARTNAME nameErr #-} postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B -- Unify two terms, potentially solving metavariables in the process. unify : Term → Term → TC ⊤ -- Throw a type error. Can be caught by catchTC. typeError : ∀ {a} {A : Set a} → List ErrorPart → TC A -- Block a type checking computation on a metavariable. This will abort -- the computation and restart it (from the beginning) when the -- metavariable is solved. blockOnMeta : ∀ {a} {A : Set a} → Meta → TC A -- Backtrack and try the second argument if the first argument throws a -- type error. catchTC : ∀ {a} {A : Set a} → TC A → TC A → TC A -- Infer the type of a given term inferType : Term → TC Type -- Check a term against a given type. This may resolve implicit arguments -- in the term, so a new refined term is returned. Can be used to create -- new metavariables: newMeta t = checkType unknown t checkType : Term → Type → TC Term -- Compute the normal form of a term. normalise : Term → TC Term -- Get the current context. getContext : TC (List (Arg Type)) -- Extend the current context with a variable of the given type. extendContext : ∀ {a} {A : Set a} → Arg Type → TC A → TC A -- Set the current context. inContext : ∀ {a} {A : Set a} → List (Arg Type) → TC A → TC A -- Quote a value, returning the corresponding Term. quoteTC : ∀ {a} {A : Set a} → A → TC Term -- Unquote a Term, returning the corresponding value. unquoteTC : ∀ {a} {A : Set a} → Term → TC A -- Create a fresh name. freshName : String → TC QName -- Declare a new function of the given type. The function must be defined -- later using 'defineFun'. Takes an Arg Name to allow declaring instances -- and irrelevant functions. The Visibility of the Arg must not be hidden. declareDef : Arg QName → Type → TC ⊤ -- Define a declared function. The function may have been declared using -- 'declareDef' or with an explicit type signature in the program. defineFun : QName → List Clause → TC ⊤ -- Get the type of a defined name. Replaces 'primQNameType'. getType : QName → TC Type -- Get the definition of a defined name. Replaces 'primQNameDefinition'. getDefinition : QName → TC Definition {-# BUILTIN AGDATCM TC #-} {-# BUILTIN AGDATCMRETURN returnTC #-} {-# BUILTIN AGDATCMBIND bindTC #-} {-# BUILTIN AGDATCMUNIFY unify #-} {-# BUILTIN AGDATCMNEWMETA newMeta #-} {-# BUILTIN AGDATCMTYPEERROR typeError #-} {-# BUILTIN AGDATCMBLOCKONMETA blockOnMeta #-} {-# BUILTIN AGDATCMCATCHERROR catchTC #-} {-# BUILTIN AGDATCMINFERTYPE inferType #-} {-# BUILTIN AGDATCMCHECKTYPE checkType #-} {-# BUILTIN AGDATCMNORMALISE normalise #-} {-# BUILTIN AGDATCMGETCONTEXT getContext #-} {-# BUILTIN AGDATCMEXTENDCONTEXT extendContext #-} {-# BUILTIN AGDATCMINCONTEXT inContext #-} {-# BUILTIN AGDATCMQUOTETERM quoteTC #-} {-# BUILTIN AGDATCMUNQUOTETERM unquoteTC #-} {-# BUILTIN AGDATCMFRESHNAME freshName #-} {-# BUILTIN AGDATCMDECLAREDEF declareDef #-} {-# BUILTIN AGDATCMDEFINEFUN defineFun #-} {-# BUILTIN AGDATCMGETTYPE getType #-} {-# BUILTIN AGDATCMGETDEFINITION getDefinition #-} ``` * Builtin type for metavariables There is a new builtin type for metavariables used by the new reflection framework. It is declared as follows and comes with primitive equality, ordering and show. ```agda postulate Meta : Set {-# BUILTIN AGDAMETA Meta #-} primitive primMetaEquality : Meta → Meta → Bool primitive primMetaLess : Meta → Meta → Bool primitive primShowMeta : Meta → String ``` There are corresponding new constructors in the `Term` and `Literal` data types: ```agda data Term : Set where ... meta : Meta → List (Arg Term) → Term {-# BUILTIN AGDATERMMETA meta #-} data Literal : Set where ... meta : Meta → Literal {-# BUILTIN AGDALITMETA meta #-} ``` * Builtin unit type The type checker needs to know about the unit type, which you can allow by ```agda record ⊤ : Set where {-# BUILTIN UNIT ⊤ #-} ``` * Changed behaviour of `unquote` The `unquote` primitive now expects a type checking computation instead of a pure term. In particular `unquote e` requires ```agda e : Term → TC ⊤ ``` where the argument is the representation of the hole in which the result should go. The old `unquote` behaviour (where `unquote` expected a `Term` argument) can be recovered by ```agda OLD: unquote v NEW: unquote λ hole → unify hole v ``` * Changed behaviour of `unquoteDecl` The `unquoteDecl` primitive now expects a type checking computation instead of a pure function definition. It is possible to define multiple (mutually recursive) functions at the same time. More specifically ```agda unquoteDecl x₁ .. xₙ = m ``` requires `m : TC ⊤` and that `x₁ .. xₙ` are defined (using `declareDef` and `defineFun`) after executing `m`. As before `x₁ .. xₙ : QName` in `m`, but have their declared types outside the `unquoteDecl`. * New primitive `unquoteDef` There is a new declaration ```agda unquoteDef x₁ .. xₙ = m ``` This works exactly as `unquoteDecl` (see above) with the exception that `x₁ .. xₙ` are required to already be declared. The main advantage of `unquoteDef` over `unquoteDecl` is that `unquoteDef` is allowed in mutual blocks, allowing mutually recursion between generated definitions and hand-written definitions. * The reflection interface now exposes the name hint (as a string) for variables. As before, the actual binding structure is with de Bruijn indices. The String value is just a hint used as a prefix to help display the variable. The type `Abs` is a new builtin type used for the constructors `Term.lam`, `Term.pi`, `Pattern.var` (bultins `AGDATERMLAM`, `AGDATERMPI` and `AGDAPATVAR`). ```agda data Abs (A : Set) : Set where abs : (s : String) (x : A) → Abs A {-# BUILTIN ABS Abs #-} {-# BUILTIN ABSABS abs #-} ``` Updated constructor types: ```agda Term.lam : Hiding → Abs Term → Term Term.pi : Arg Type → Abs Type → Term Pattern.var : String → Pattern ``` * Reflection-based macros Macros are functions of type `t1 → t2 → .. → Term → TC ⊤` that are defined in a `macro` block. Macro application is guided by the type of the macro, where `Term` arguments desugar into the `quoteTerm` syntax and `Name` arguments into the `quote` syntax. Arguments of any other type are preserved as-is. The last `Term` argument is the hole term given to `unquote` computation (see above). For example, the macro application `f u v w` where the macro `f` has the type `Term → Name → Bool → Term → TC ⊤` desugars into `unquote (f (quoteTerm u) (quote v) w)` Limitations: - Macros cannot be recursive. This can be worked around by defining the recursive function outside the macro block and have the macro call the recursive function. Silly example: ```agda macro plus-to-times : Term → Term → TC ⊤ plus-to-times (def (quote _+_) (a ∷ b ∷ [])) hole = unify hole (def (quote _*_) (a ∷ b ∷ [])) plus-to-times v hole = unify hole v thm : (a b : Nat) → plus-to-times (a + b) ≡ a * b thm a b = refl ``` Macros are most useful when writing tactics, since they let you hide the reflection machinery. For instance, suppose you have a solver ```agda magic : Type → Term ``` that takes a reflected goal and outputs a proof (when successful). You can then define the following macro ```agda macro by-magic : Term → TC ⊤ by-magic hole = bindTC (inferType hole) λ goal → unify hole (magic goal) ``` This lets you apply the magic tactic without any syntactic noise at all: ```agda thm : ¬ P ≡ NP thm = by-magic ``` ### Literals and built-ins * Overloaded number literals. You can now overload natural number literals using the new builtin `FROMNAT`: ```agda {-# BUILTIN FROMNAT fromNat #-} ``` The target of the builtin should be a defined name. Typically you would do something like ```agda record Number (A : Set) : Set where field fromNat : Nat → A open Number {{...}} public {-# BUILTIN FROMNAT fromNat #-} ``` This will cause number literals `n` to be desugared to `fromNat n` before type checking. * Negative number literals. Number literals can now be negative. For floating point literals it works as expected. For integer literals there is a new builtin `FROMNEG` that enables negative integer literals: ```agda {-# BUILTIN FROMNEG fromNeg #-} ``` This causes negative literals `-n` to be desugared to `fromNeg n`. * Overloaded string literals. String literals can be overladed using the `FROMSTRING` builtin: ```agda {-# BUILTIN FROMSTRING fromString #-} ``` The will cause string literals `s` to be desugared to `fromString s` before type checking. * Change to builtin integers. The `INTEGER` builtin now needs to be bound to a datatype with two constructors that should be bound to the new builtins `INTEGERPOS` and `INTEGERNEGSUC` as follows: ```agda data Int : Set where pos : Nat -> Int negsuc : Nat -> Int {-# BUILTIN INTEGER Int #-} {-# BUILTIN INTEGERPOS pos #-} {-# BUILTIN INTEGERNEGSUC negsuc #-} ``` where `negsuc n` represents the integer `-n - 1`. For instance, `-5` is represented as `negsuc 4`. All primitive functions on integers except `primShowInteger` have been removed, since these can be defined without too much trouble on the above representation using the corresponding functions on natural numbers. The primitives that have been removed are ```agda primIntegerPlus primIntegerMinus primIntegerTimes primIntegerDiv primIntegerMod primIntegerEquality primIntegerLess primIntegerAbs primNatToInteger ``` * New primitives for strict evaluation ```agda primitive primForce : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) → (∀ x → B x) → B x primForceLemma : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) (f : ∀ x → B x) → primForce x f ≡ f x ``` `primForce x f` evaluates to `f x` if x is in weak head normal form, and `primForceLemma x f` evaluates to `refl` in the same situation. The following values are considered to be in weak head normal form: - constructor applications - literals - lambda abstractions - type constructor (data/record types) applications - function types - Set a ### Modules * Modules in import directives When you use `using`/`hiding`/`renaming` on a name it now automatically applies to any module of the same name, unless you explicitly mention the module. For instance, ```agda open M using (D) ``` is equivalent to ```agda open M using (D; module D) ``` if `M` defines a module `D`. This is most useful for record and data types where you always get a module of the same name as the type. With this feature there is no longer useful to be able to qualify a constructor (or field) by the name of the data type even when it differs from the name of the corresponding module. The follow (weird) code used to work, but doesn't work anymore: ```agda module M where data D where c : D open M using (D) renaming (module D to MD) foo : D foo = D.c ``` If you want to import only the type name and not the module you have to hide it explicitly: ```agda open M using (D) hiding (module D) ``` See discussion on Issue [#836](https://github.com/agda/agda/issues/836). * Private definitions of a module are no longer in scope at the Emacs mode top-level. The reason for this change is that `.agdai-files` are stripped of unused private definitions (which can yield significant performance improvements for module-heavy code). To test private definitions you can create a hole at the bottom of the module, in which private definitions will be visible. ### Records * New record directives `eta-equality`/`no-eta-equality` The keywords `eta-equality`/`no-eta-equality` enable/disable eta rules for the (inductive) record type being declared. ```agda record Σ (A : Set) (B : A -> Set) : Set where no-eta-equality constructor _,_ field fst : A snd : B fst open Σ -- fail : ∀ {A : Set}{B : A -> Set} → (x : Σ A B) → x ≡ (fst x , snd x) -- fail x = refl -- -- x != fst x , snd x of type Σ .A .B -- when checking that the expression refl has type x ≡ (fst x , snd x) ``` * Building records from modules. The `record { }` syntax is now extended to accept module names as well. Fields are thus defined using the corresponding definitions from the given module. For instance assuming this record type `R` and module `M`: ```agda record R : Set where field x : X y : Y z : Z module M where x = {! ... !} y = {! ... !} r : R r = record { M; z = {! ... !} } ``` Previously one had to write `record { x = M.x; y = M.y; z = {! ... !} }`. More precisely this construction now supports any combination of explicit field definitions and applied modules. If a field is both given explicitly and available in one of the modules, then the explicit one takes precedence. If a field is available in more than one module then this is ambiguous and therefore rejected. As a consequence the order of assignments does not matter. The modules can be both applied to arguments and have import directives such as `hiding`, `using`, and `renaming`. In particular this construct subsumes the record update construction. Here is an example of record update: ```agda -- Record update. Same as: record r { y = {! ... !} } r2 : R r2 = record { R r; y = {! ... !} } ``` A contrived example showing the use of `hiding`/`renaming`: ```agda module M2 (a : A) where w = {! ... !} z = {! ... !} r3 : A → R r3 a = record { M hiding (y); M2 a renaming (w to y) } ``` * Record patterns are now accepted. Examples: ```agda swap : {A B : Set} (p : A × B) → B × A swap record{ proj₁ = a; proj₂ = b } = record{ proj₁ = b; proj₂ = a } thd3 : ... thd3 record{ proj₂ = record { proj₂ = c }} = c ``` * Record modules now properly hide all their parameters [Issue [#1759](https://github.com/agda/agda/issues/1759)] Previously parameters to parent modules were not hidden in the record module, resulting in different behaviour between ```agda module M (A : Set) where record R (B : Set) : Set where ``` and ```agda module M where record R (A B : Set) : Set where ``` where in the former case, `A` would be an explicit argument to the module `M.R`, but implicit in the latter case. Now `A` is implicit in both cases. ### Instance search * Performance has been improved, recursive instance search which was previously exponential in the depth is now only quadratic. * Constructors of records and datatypes are not anymore automatically considered as instances, you have to do so explicitely, for instance: ```agda -- only [b] is an instance of D data D : Set where a : D instance b : D c : D -- the constructor is now an instance record tt : Set where instance constructor tt ``` * Lambda-bound variables are no longer automatically considered instances. Lambda-bound variables need to be bound as instance arguments to be considered for instance search. For example, ```agda _==_ : {A : Set} {{_ : Eq A}} → A → A → Bool fails : {A : Set} → Eq A → A → Bool fails eqA x = x == x works : {A : Set} {{_ : Eq A}} → A → Bool works x = x == x ``` * Let-bound variables are no longer automatically considered instances. To make a let-bound variable available as an instance it needs to be declared with the `instance` keyword, just like top-level instances. For example, ```agda mkEq : {A : Set} → (A → A → Bool) → Eq A fails : {A : Set} → (A → A → Bool) → A → Bool fails eq x = let eqA = mkEq eq in x == x works : {A : Set} → (A → A → Bool) → A → Bool works eq x = let instance eqA = mkEq eq in x == x ``` * Record fields can be declared instances. For example, ```agda record EqSet : Set₁ where field set : Set instance eq : Eq set ``` This causes the projection function `eq : (E : EqSet) → Eq (set E)` to be considered for instance search. * Instance search can now find arguments in variable types (but such candidates can only be lambda-bound variables, they can’t be declared as instances) ```agda module _ {A : Set} (P : A → Set) where postulate bla : {x : A} {{_ : P x}} → Set → Set -- Works, the instance argument is found in the context test : {x : A} {{_ : P x}} → Set → Set test B = bla B -- Still forbidden, because [P] could be instantiated later to anything instance postulate forbidden : {x : A} → P x ``` * Instance search now refuses to solve constraints with unconstrained metavariables, since this can lead to non-termination. See [Issue [#1532](https://github.com/agda/agda/issues/1523)] for an example. * Top-level instances are now only considered if they are in scope. [Issue [#1913](https://github.com/agda/agda/issues/1913)] Note that lambda-bound instances need not be in scope. ### Other changes * Unicode ellipsis character is allowed for the ellipsis token `...` in `with` expressions. * `Prop` is no longer a reserved word. Type checking ------------- * Large indices. Force constructor arguments no longer count towards the size of a datatype. For instance, the definition of equality below is accepted. ```agda data _≡_ {a} {A : Set a} : A → A → Set where refl : ∀ x → x ≡ x ``` This gets rid of the asymmetry that the version of equality which indexes only on the second argument could be small, but not the version above which indexes on both arguments. * Detection of datatypes that satisfy K (i.e. sets) Agda will now try to detect datatypes that satisfy K when `--without-K` is enabled. A datatype satisfies K when it follows these three rules: - The types of all non-recursive constructor arguments should satisfy K. - All recursive constructor arguments should be first-order. - The types of all indices should satisfy K. For example, the types `Nat`, `List Nat`, and `x ≡ x` (where `x : Nat`) are all recognized by Agda as satisfying K. * New unifier for case splitting The unifier used by Agda for case splitting has been completely rewritten. The new unifier takes a much more type-directed approach in order to avoid the problems in issues [#1406](https://github.com/agda/agda/issues/1406), [#1408](https://github.com/agda/agda/issues/1408), [#1427](https://github.com/agda/agda/issues/1427), and [#1435](https://github.com/agda/agda/issues/1435). The new unifier also has eta-equality for record types built-in. This should avoid unnecessary case splitting on record constructors and improve the performance of Agda on code that contains deeply nested record patterns (see issues [#473](https://github.com/agda/agda/issues/473), [#635](https://github.com/agda/agda/issues/635), [#1575](https://github.com/agda/agda/issues/1575), [#1603](https://github.com/agda/agda/issues/1603), [#1613](https://github.com/agda/agda/issues/1613), and [#1645](https://github.com/agda/agda/issues/1645)). In some cases, the locations of the dot patterns computed by the unifier did not correspond to the locations given by the user (see Issue [#1608](https://github.com/agda/agda/issues/1608)). This has now been fixed by adding an extra step after case splitting that checks whether the user-written patterns are compatible with the computed ones. In some rare cases, the new unifier is still too restrictive when `--without-K` is enabled because it cannot generalize over the datatype indices (yet). For example, the following code is rejected: ```agda data Bar : Set₁ where bar : Bar baz : (A : Set) → Bar data Foo : Bar → Set where foo : Foo bar test : foo ≡ foo → Set₁ test refl = Set ``` * The aggressive behaviour of `with` introduced in 2.4.2.5 has been rolled back [Issue [#1692](https://github.com/agda/agda/issues/1692)]. With no longer abstracts in the types of variables appearing in the with-expressions. [Issue [#745](https://github.com/agda/agda/issues/745)] This means that the following example no longer works: ```agda fails : (f : (x : A) → a ≡ x) (b : A) → b ≡ a fails f b with a | f b fails f b | .b | refl = f b ``` The `with` no longer abstracts the type of `f` over `a`, since `f` appears in the second with-expression `f b`. You can use a nested `with` to make this example work. This example does work again: ```agda test : ∀{A : Set}{a : A}{f : A → A} (p : f a ≡ a) → f (f a) ≡ a test p rewrite p = p ``` After `rewrite p` the goal has changed to `f a ≡ a`, but the type of `p` has not been rewritten, thus, the final `p` solves the goal. The following, which worked in 2.4.2.5, no longer works: ```agda fails : (f : (x : A) → a ≡ x) (b : A) → b ≡ a fails f b rewrite f b = f b ``` The rewrite with `f b : a ≡ b` is not applied to `f` as the latter is part of the rewrite expression `f b`. Thus, the type of `f` remains untouched, and the changed goal `b ≡ b` is not solved by `f b`. * When using `rewrite` on a term `eq` of type `lhs ≡ rhs`, the `lhs` is no longer abstracted in `rhs` [Issue [#520](https://github.com/agda/agda/issues/520)]. This means that ```agda f pats rewrite eq = body ``` is more than syntactic sugar for ```agda f pats with lhs | eq f pats | _ | refl = body ``` In particular, the following application of `rewrite` is now possible ```agda id : Bool → Bool id true = true id false = false is-id : ∀ x → x ≡ id x is-id true = refl is-id false = refl postulate P : Bool → Set b : Bool p : P (id b) proof : P b proof rewrite is-id b = p ``` Previously, this was desugared to ```agda proof with b | is-id b proof | _ | refl = p ``` which did not type check as `refl` does not have type `b ≡ id b`. Now, Agda gets the task of checking `refl : _ ≡ id b` leading to instantiation of `_` to `id b`. Compiler backends ----------------- * Major Bug Fixes: - Function clauses with different arities are now always compiled correctly by the GHC/UHC backends. (Issue [#727](https://github.com/agda/agda/issues/727)) * Co-patterns - The GHC/UHC backends now support co-patterns. (Issues [#1567](https://github.com/agda/agda/issues/1567), [#1632](https://github.com/agda/agda/issues/1632)) * Optimizations - Builtin naturals are now represented as arbitrary-precision Integers. See the user manual, section "Agda Compilers -> Optimizations" for details. * GHC Haskell backend (MAlonzo) - Pragmas Since builtin naturals are compiled to `Integer` you can no longer give a `{-# COMPILED_DATA #-}` pragma for `Nat`. The same goes for builtin booleans, integers, floats, characters and strings which are now hard-wired to appropriate Haskell types. * UHC compiler backend A new backend targeting the Utrecht Haskell Compiler (UHC) is available. It targets the UHC Core language, and it's design is inspired by the Epic backend. See the user manual, section "Agda Compilers -> UHC Backend" for installation instructions. - FFI The UHC backend has a FFI to Haskell similar to MAlonzo's. The target Haskell code also needs to be compilable using UHC, which does not support the Haskell base library version 4.*. FFI pragmas for the UHC backend are not checked in any way. If the pragmas are wrong, bad things will happen. - Imports Additional Haskell modules can be brought into scope with the `IMPORT_UHC` pragma: ```agda {-# IMPORT_UHC Data.Char #-} ``` The Haskell modules `UHC.Base` and `UHC.Agda.Builtins` are always in scope and don't need to be imported explicitly. - Datatypes Agda datatypes can be bound to Haskell datatypes as follows: Haskell: ```haskell data HsData a = HsCon1 | HsCon2 (HsData a) ``` Agda: ```agda data AgdaData (A : Set) : Set where AgdaCon1 : AgdaData A AgdaCon2 : AgdaData A -> AgdaData A {-# COMPILED_DATA_UHC AgdaData HsData HsCon1 HsCon2 #-} ``` The mapping has to cover all constructors of the used Haskell datatype, else runtime behavior is undefined! There are special reserved names to bind Agda datatypes to certain Haskell datatypes. For example, this binds an Agda datatype to Haskell's list datatype: Agda: ```agda data AgdaList (A : Set) : Set where Nil : AgdaList A Cons : A -> AgdaList A -> AgdaList A {-# COMPILED_DATA_UHC AgdaList __LIST__ __NIL__ __CONS__ #-} ``` The following "magic" datatypes are available: ``` HS Datatype | Datatype Pragma | HS Constructor | Constructor Pragma () __UNIT__ () __UNIT__ List __LIST__ (:) __CONS__ [] __NIL__ Bool __BOOL__ True __TRUE__ False __FALSE__ ``` - Functions Agda postulates can be bound to Haskell functions. Similar as in MAlonzo, all arguments of type `Set` need to be dropped before calling Haskell functions. An example calling the return function: Agda: ```agda postulate hs-return : {A : Set} -> A -> IO A {-# COMPILED_UHC hs-return (\_ -> UHC.Agda.Builtins.primReturn) #-} ``` Emacs mode and interaction -------------------------- * Module contents (`C-c C-o`) now also works for records. [See Issue [#1926](https://github.com/agda/agda/issues/1926) ] If you have an inferable expression of record type in an interaction point, you can invoke `C-c C-o` to see its fields and types. Example ```agda record R : Set where field f : A test : R → R test r = {!r!} -- C-c C-o here ``` * Less aggressive error notification. Previously Emacs could jump to the position of an error even if the type-checking process was not initiated in the current buffer. Now this no longer happens: If the type-checking process was initiated in another buffer, then the cursor is moved to the position of the error in the buffer visiting the file (if any) and in every window displaying the file, but focus should not change from one file to another. In the cases where focus does change from one file to another, one can now use the go-back functionality to return to the previous position. * Removed the `agda-include-dirs` customization parameter. Use `agda-program-args` with `-iDIR` or `-lLIB` instead, or add libraries to `~/.agda/defaults` (`C:/Users/USERNAME/AppData/Roaming/agda/defaults` or similar on Windows). See Library management, above, for more information. Tools ----- ### LaTeX-backend * The default font has been changed to XITS (which is part of TeX Live): http://www.ctan.org/tex-archive/fonts/xits/ This font is more complete with respect to Unicode. ### agda-ghc-names * New tool: The command ``` agda-ghc-names fixprof .prof ``` converts `*.prof` files obtained from profiling runs of MAlonzo-compiled code to `*.agdaIdents.prof`, with the original Agda identifiers replacing the MAlonzo-generated Haskell identifiers. For usage and more details, see `src/agda-ghc-names/README.txt`. Highlighting and textual backends --------------------------------- * Names in import directives are now highlighted and are clickable. [Issue [#1714](https://github.com/agda/agda/issues/1714)] This leads also to nicer printing in the LaTeX and html backends. Fixed issues ------------ See [bug tracker (milestone 2.5.1)](https://github.com/agda/agda/issues?q=milestone%3A2.5.1+is%3Aclosed) Release notes for Agda version 2.4.2.5 ====================================== Installation and infrastructure ------------------------------- * Added support for GHC 7.10.3. * Added `cpphs` Cabal flag Turn on/off this flag to choose cpphs/cpp as the C preprocessor. This flag is turn on by default. (This flag was added in Agda 2.4.2.1 but it was not documented) Pragmas and options ------------------- * Termination pragmas are no longer allowed inside `where` clauses [Issue [#1137](https://github.com/agda/agda/issues/1137)]. Type checking ------------- * `with`-abstraction is more aggressive, abstracts also in types of variables that are used in the `with`-expressions, unless they are also used in the types of the `with`-expressions. [Issue [#1692](https://github.com/agda/agda/issues/1692)] Example: ```agda test : (f : (x : A) → a ≡ x) (b : A) → b ≡ a test f b with a | f b test f b | .b | refl = f b ``` Previously, `with` would not abstract in types of variables that appear in the `with`-expressions, in this case, both `f` and `b`, leaving their types unchanged. Now, it tries to abstract in `f`, as only `b` appears in the types of the `with`-expressions which are `A` (of `a`) and `a ≡ b` (of `f b`). As a result, the type of `f` changes to `(x : A) → b ≡ x` and the type of the goal to `b ≡ b` (as previously). This also affects `rewrite`, which is implemented in terms of `with`. ```agda test : (f : (x : A) → a ≡ x) (b : A) → b ≡ a test f b rewrite f b = f b ``` As the new `with` is not fully backwards-compatible, some parts of your Agda developments using `with` or `rewrite` might need maintenance. Fixed issues ------------ See [bug tracker](https://github.com/agda/agda/issues) [#1407](https://github.com/agda/agda/issues/1497) [#1518](https://github.com/agda/agda/issues/1518) [#1670](https://github.com/agda/agda/issues/1670) [#1677](https://github.com/agda/agda/issues/1677) [#1698](https://github.com/agda/agda/issues/1698) [#1701](https://github.com/agda/agda/issues/1701) [#1710](https://github.com/agda/agda/issues/1710) [#1718](https://github.com/agda/agda/issues/1718) Release notes for Agda version 2.4.2.4 ====================================== Installation and infrastructure ------------------------------- * Removed support for GHC 7.4.2. Pragmas and options ------------------- * Option `--copatterns` is now on by default. To switch off parsing of copatterns, use: ```agda {-# OPTIONS --no-copatterns #-} ``` * Option `--rewriting` is now needed to use `REWRITE` pragmas and rewriting during reduction. Rewriting is not `--safe`. To use rewriting, first specify a relation symbol `R` that will later be used to add rewrite rules. A canonical candidate would be propositional equality ```agda {-# BUILTIN REWRITE _≡_ #-} ``` but any symbol `R` of type `Δ → A → A → Set i` for some `A` and `i` is accepted. Then symbols `q` can be added to rewriting provided their type is of the form `Γ → R ds l r`. This will add a rewrite rule ``` Γ ⊢ l ↦ r : A[ds/Δ] ``` to the signature, which fires whenever a term is an instance of `l`. For example, if ```agda plus0 : ∀ x → x + 0 ≡ x ``` (ideally, there is a proof for `plus0`, but it could be a postulate), then ```agda {-# REWRITE plus0 #-} ``` will prompt Agda to rewrite any well-typed term of the form `t + 0` to `t`. Some caveats: Agda accepts and applies rewrite rules naively, it is very easy to break consistency and termination of type checking. Some examples of rewrite rules that should *not* be added: ```agda refl : ∀ x → x ≡ x -- Agda loops plus-sym : ∀ x y → x + y ≡ y + x -- Agda loops absurd : true ≡ false -- Breaks consistency ``` Adding only proven equations should at least preserve consistency, but this is only a conjecture, so know what you are doing! Using rewriting, you are entering into the wilderness, where you are on your own! Language -------- * `forall` / `∀` now parses like `λ`, i.e., the following parses now [Issue [#1583](https://github.com/agda/agda/issues/1538)]: ```agda ⊤ × ∀ (B : Set) → B → B ``` * The underscore pattern `_` can now also stand for an inaccessible pattern (dot pattern). This alleviates the need for writing `._`. [Issue #[1605](https://github.com/agda/agda/issues/1605)] Instead of ```agda transVOld : ∀{A : Set} (a b c : A) → a ≡ b → b ≡ c → a ≡ c transVOld _ ._ ._ refl refl = refl ``` one can now write ```agda transVNew : ∀{A : Set} (a b c : A) → a ≡ b → b ≡ c → a ≡ c transVNew _ _ _ refl refl = refl ``` and let Agda decide where to put the dots. This was always possible by using hidden arguments ```agda transH : ∀{A : Set}{a b c : A} → a ≡ b → b ≡ c → a ≡ c transH refl refl = refl ``` which is now equivalent to ```agda transHNew : ∀{A : Set}{a b c : A} → a ≡ b → b ≡ c → a ≡ c transHNew {a = _}{b = _}{c = _} refl refl = refl ``` Before, underscore `_` stood for an unnamed variable that could not be instantiated by an inaccessible pattern. If one no wants to prevent Agda from instantiating, one needs to use a variable name other than underscore (however, in practice this situation seems unlikely). Type checking ------------- * Polarity of phantom arguments to data and record types has changed. [Issue [#1596](https://github.com/agda/agda/issues/1596)] Polarity of size arguments is Nonvariant (both monotone and antitone). Polarity of other arguments is Covariant (monotone). Both were Invariant before (neither monotone nor antitone). The following example type-checks now: ```agda open import Common.Size -- List should be monotone in both arguments -- (even when `cons' is missing). data List (i : Size) (A : Set) : Set where [] : List i A castLL : ∀{i A} → List i (List i A) → List ∞ (List ∞ A) castLL x = x -- Stream should be antitone in the first and monotone in the second argument -- (even with field `tail' missing). record Stream (i : Size) (A : Set) : Set where coinductive field head : A castSS : ∀{i A} → Stream ∞ (Stream ∞ A) → Stream i (Stream i A) castSS x = x ``` * `SIZELT` lambdas must be consistent [Issue [#1523](https://github.com/agda/agda/issues/1523), see Abel and Pientka, ICFP 2013]. When lambda-abstracting over type (`Size< size`) then `size` must be non-zero, for any valid instantiation of size variables. - The good: ```agda data Nat (i : Size) : Set where zero : ∀ (j : Size< i) → Nat i suc : ∀ (j : Size< i) → Nat j → Nat i {-# TERMINATING #-} -- This definition is fine, the termination checker is too strict at the moment. fix : ∀ {C : Size → Set} → (∀ i → (∀ (j : Size< i) → Nat j -> C j) → Nat i → C i) → ∀ i → Nat i → C i fix t i (zero j) = t i (λ (k : Size< i) → fix t k) (zero j) fix t i (suc j n) = t i (λ (k : Size< i) → fix t k) (suc j n) ``` The `λ (k : Size< i)` is fine in both cases, as context ```agda i : Size, j : Size< i ``` guarantees that `i` is non-zero. - The bad: ```agda record Stream {i : Size} (A : Set) : Set where coinductive constructor _∷ˢ_ field head : A tail : ∀ {j : Size< i} → Stream {j} A open Stream public _++ˢ_ : ∀ {i A} → List A → Stream {i} A → Stream {i} A [] ++ˢ s = s (a ∷ as) ++ˢ s = a ∷ˢ (as ++ˢ s) ``` This fails, maybe unjustified, at ```agda i : Size, s : Stream {i} A ⊢ a ∷ˢ (λ {j : Size< i} → as ++ˢ s) ``` Fixed by defining the constructor by copattern matching: ```agda record Stream {i : Size} (A : Set) : Set where coinductive field head : A tail : ∀ {j : Size< i} → Stream {j} A open Stream public _∷ˢ_ : ∀ {i A} → A → Stream {i} A → Stream {↑ i} A head (a ∷ˢ as) = a tail (a ∷ˢ as) = as _++ˢ_ : ∀ {i A} → List A → Stream {i} A → Stream {i} A [] ++ˢ s = s (a ∷ as) ++ˢ s = a ∷ˢ (as ++ˢ s) ``` - The ugly: ```agda fix : ∀ {C : Size → Set} → (∀ i → (∀ (j : Size< i) → C j) → C i) → ∀ i → C i fix t i = t i λ (j : Size< i) → fix t j ``` For `i=0`, there is no such `j` at runtime, leading to looping behavior. Interaction ----------- * Issue [#635](https://github.com/agda/agda/issues/635) has been fixed. Case splitting does not spit out implicit record patterns any more. ```agda record Cont : Set₁ where constructor _◃_ field Sh : Set Pos : Sh → Set open Cont data W (C : Cont) : Set where sup : (s : Sh C) (k : Pos C s → W C) → W C bogus : {C : Cont} → W C → Set bogus w = {!w!} ``` Case splitting on `w` yielded, since the fix of Issue [#473](https://github.com/agda/agda/issues/473), ```agda bogus {Sh ◃ Pos} (sup s k) = ? ``` Now it gives, as expected, ```agda bogus (sup s k) = ? ``` Performance ----------- * As one result of the 21st Agda Implementor's Meeting (AIM XXI), serialization of the standard library is 50% faster (time reduced by a third), without using additional disk space for the interface files. Bug fixes --------- Issues fixed (see [bug tracker](https://github.com/agda/agda/issues)): [#1546](https://github.com/agda/agda/issues/1546) (copattern matching and with-clauses) [#1560](https://github.com/agda/agda/issues/1560) (positivity checker inefficiency) [#1584](https://github.com/agda/agda/issues/1548) (let pattern with trailing implicit) Release notes for Agda version 2.4.2.3 ====================================== Installation and infrastructure ------------------------------- * Added support for GHC 7.10.1. * Removed support for GHC 7.0.4. Language -------- * `_ `is no longer a valid name for a definition. The following fails now: [Issue [#1465](https://github.com/agda/agda/issues/1465)] ```agda postulate _ : Set ``` * Typed bindings can now contain hiding information [Issue [#1391](https://github.com/agda/agda/issues/1391)]. This means you can now write ```agda assoc : (xs {ys zs} : List A) → ((xs ++ ys) ++ zs) ≡ (xs ++ (ys ++ zs)) ``` instead of the longer ```agda assoc : (xs : List A) {ys zs : List A} → ... ``` It also works with irrelevance ```agda .(xs {ys zs} : List A) → ... ``` but of course does not make sense if there is hiding information already. Thus, this is (still) a parse error: ```agda {xs {ys zs} : List A} → ... ``` * The builtins for sized types no longer need accompanying postulates. The BUILTIN pragmas for size stuff now also declare the identifiers they bind to. ```agda {-# BUILTIN SIZEUNIV SizeUniv #-} -- SizeUniv : SizeUniv {-# BUILTIN SIZE Size #-} -- Size : SizeUniv {-# BUILTIN SIZELT Size<_ #-} -- Size<_ : ..Size → SizeUniv {-# BUILTIN SIZESUC ↑_ #-} -- ↑_ : Size → Size {-# BUILTIN SIZEINF ∞ #-} -- ∞ : Size ``` `Size` and `Size<` now live in the new universe `SizeUniv`. It is forbidden to build function spaces in this universe, in order to prevent the malicious assumption of a size predecessor ```agda pred : (i : Size) → Size< i ``` [Issue [#1428](https://github.com/agda/agda/issues/1428)]. * Unambiguous notations (coming from syntax declarations) that resolve to ambiguous names are now parsed unambiguously [Issue [#1194](https://github.com/agda/agda/issues/1194)]. * If only some instances of an overloaded name have a given associated notation (coming from syntax declarations), then this name can only be resolved to the given instances of the name, not to other instances [Issue [#1194](https://github.com/agda/agda/issues/1194)]. Previously, if different instances of an overloaded name had *different* associated notations, then none of the notations could be used. Now all of them can be used. Note that notation identity does not only involve the right-hand side of the syntax declaration. For instance, the following notations are not seen as identical, because the implicit argument names are different: ```agda module A where data D : Set where c : {x y : D} → D syntax c {x = a} {y = b} = a ∙ b module B where data D : Set where c : {y x : D} → D syntax c {y = a} {x = b} = a ∙ b ``` * If an overloaded operator is in scope with at least two distinct fixities, then it gets the default fixity [Issue [#1436](https://github.com/agda/agda/issues/1436)]. Similarly, if two or more identical notations for a given overloaded name are in scope, and these notations do not all have the same fixity, then they get the default fixity. Type checking ------------- * Functions of varying arity can now have with-clauses and use rewrite. Example: ```agda NPred : Nat → Set NPred 0 = Bool NPred (suc n) = Nat → NPred n const : Bool → ∀{n} → NPred n const b {0} = b const b {suc n} m = const b {n} allOdd : ∀ n → NPred n allOdd 0 = true allOdd (suc n) m with even m ... | true = const false ... | false = allOdd n ``` * Function defined by copattern matching can now have `with`-clauses and use `rewrite`. Example: ```agda {-# OPTIONS --copatterns #-} record Stream (A : Set) : Set where coinductive constructor delay field force : A × Stream A open Stream map : ∀{A B} → (A → B) → Stream A → Stream B force (map f s) with force s ... | a , as = f a , map f as record Bisim {A B} (R : A → B → Set) (s : Stream A) (t : Stream B) : Set where coinductive constructor ~delay field ~force : let a , as = force s b , bs = force t in R a b × Bisim R as bs open Bisim SEq : ∀{A} (s t : Stream A) → Set SEq = Bisim (_≡_) -- Slightly weird definition of symmetry to demonstrate rewrite. ~sym' : ∀{A} {s t : Stream A} → SEq s t → SEq t s ~force (~sym' {s = s} {t} p) with force s | force t | ~force p ... | a , as | b , bs | r , q rewrite r = refl , ~sym' q ``` * Instances can now be defined by copattern matching. [Issue [#1413](https://github.com/agda/agda/issues/1413)] The following example extends the one in [Abel, Pientka, Thibodeau, Setzer, POPL 2013, Section 2.2]: ```agda {-# OPTIONS --copatterns #-} -- The Monad type class record Monad (M : Set → Set) : Set1 where field return : {A : Set} → A → M A _>>=_ : {A B : Set} → M A → (A → M B) → M B open Monad {{...}} -- The State newtype record State (S A : Set) : Set where field runState : S → A × S open State -- State is an instance of Monad instance stateMonad : {S : Set} → Monad (State S) runState (return {{stateMonad}} a ) s = a , s -- NEW runState (_>>=_ {{stateMonad}} m k) s₀ = -- NEW let a , s₁ = runState m s₀ in runState (k a) s₁ -- stateMonad fulfills the monad laws leftId : {A B S : Set}(a : A)(k : A → State S B) → (return a >>= k) ≡ k a leftId a k = refl rightId : {A B S : Set}(m : State S A) → (m >>= return) ≡ m rightId m = refl assoc : {A B C S : Set}(m : State S A)(k : A → State S B)(l : B → State S C) → ((m >>= k) >>= l) ≡ (m >>= λ a → k a >>= l) assoc m k l = refl ``` Emacs mode ---------- * The new menu option `Switch to another version of Agda` tries to do what it says. * Changed feature: Interactively split result. [ This is as before: ] Make-case (`C-c C-c`) with no variables given tries to split on the result to introduce projection patterns. The hole needs to be of record type, of course. ```agda test : {A B : Set} (a : A) (b : B) → A × B test a b = ? ``` Result-splitting `?` will produce the new clauses: ```agda proj₁ (test a b) = ? proj₂ (test a b) = ? ``` [ This has changed: ] If hole is of function type, `make-case` will introduce only pattern variables (as much as it can). ```agda testFun : {A B : Set} (a : A) (b : B) → A × B testFun = ? ``` Result-splitting `?` will produce the new clause: ```agda testFun a b = ? ``` A second invocation of `make-case` will then introduce projection patterns. Error messages -------------- * Agda now suggests corrections of misspelled options, e.g. ```agda {-# OPTIONS --dont-termination-check --without-k --senf-gurke #-} ``` Unrecognized options: ``` --dont-termination-check (did you mean --no-termination-check ?) --without-k (did you mean --without-K ?) --senf-gurke ``` Nothing close to `--senf-gurke`, I am afraid. Compiler backends ----------------- * The Epic backend has been removed [Issue [#1481](https://github.com/agda/agda/issues/1481)]. Bug fixes --------- * Fixed bug with `unquoteDecl` not working in instance blocks [Issue [#1491](https://github.com/agda/agda/issues/1491)]. * Other issues fixed (see [bug tracker](https://github.com/agda/agda/issues) [#1497](https://github.com/agda/agda/issues/1497) [#1500](https://github.com/agda/agda/issues/1500) Release notes for Agda version 2.4.2.2 ====================================== Bug fixes --------- * Compilation on Windows fixed. * Other issues fixed (see [bug tracker](https://github.com/agda/agda/issues)) [#1332](https://github.com/agda/agda/issues/1322) [#1353](https://github.com/agda/agda/issues/1353) [#1360](https://github.com/agda/agda/issues/1360) [#1366](https://github.com/agda/agda/issues/1366) [#1369](https://github.com/agda/agda/issues/1369) Release notes for Agda version 2.4.2.1 ====================================== Pragmas and options ------------------- * New pragma `{-# TERMINATING #-}` replacing `{-# NO_TERMINATION_CHECK #-}` Complements the existing pragma `{-# NON_TERMINATING #-}`. Skips termination check for the associated definitions and marks them as terminating. Thus, it is a replacement for `{-# NO_TERMINATION_CHECK #-}` with the same semantics. You can no longer use pragma `{-# NO_TERMINATION_CHECK #-}` to skip the termination check, but must label your definitions as either `{-# TERMINATING #-}` or `{-# NON_TERMINATING #-}` instead. Note: `{-# OPTION --no-termination-check #-}` labels all your definitions as `{-# TERMINATING #-}`, putting you in the danger zone of a loop in the type checker. Language -------- * Referring to a local variable shadowed by module opening is now an error. Previous behavior was preferring the local over the imported definitions. [Issue [#1266](https://github.com/agda/agda/issues/1266)] Note that module parameters are locals as well as variables bound by λ, dependent function type, patterns, and let. Example: ```agda module M where A = Set1 test : (A : Set) → let open M in A ``` The last `A` produces an error, since it could refer to the local variable `A` or to the definition imported from module `M`. * `with` on a variable bound by a module telescope or a pattern of a parent function is now forbidden. [Issue [#1342](https://github.com/agda/agda/issues/1342)] ```agda data Unit : Set where unit : Unit id : (A : Set) → A → A id A a = a module M (x : Unit) where dx : Unit → Unit dx unit = x g : ∀ u → x ≡ dx u g with x g | unit = id (∀ u → unit ≡ dx u) ? ``` Even though this code looks right, Agda complains about the type expression `∀ u → unit ≡ dx u`. If you ask Agda what should go there instead, it happily tells you that it wants `∀ u → unit ≡ dx u`. In fact what you do not see and Agda will never show you is that the two expressions actually differ in the invisible first argument to `dx`, which is visible only outside module `M`. What Agda wants is an invisible `unit` after `dx`, but all you can write is an invisible `x` (which is inserted behind the scenes). To avoid those kinds of paradoxes, `with` is now outlawed on module parameters. This should ensure that the invisible arguments are always exactly the module parameters. Since a `where` block is desugared as module with pattern variables of the parent clause as module parameters, the same strikes you for uses of `with` on pattern variables of the parent function. ```agda f : Unit → Unit f x = unit where dx : Unit → Unit dx unit = x g : ∀ u → x ≡ dx u g with x g | unit = id ((u : Unit) → unit ≡ dx u) ? ``` The `with` on pattern variable `x` of the parent clause `f x = unit` is outlawed now. Type checking ------------- * Termination check failure is now a proper error. We no longer continue type checking after termination check failures. Use pragmas `{-# NON_TERMINATING #-}` and `{-# NO_TERMINATION_CHECK #-}` near the offending definitions if you want to do so. Or switch off the termination checker altogether with `{-# OPTIONS --no-termination-check #-}` (at your own risk!). * (Since Agda 2.4.2): Termination checking `--without-K` restricts structural descent to arguments ending in data types or `Size`. Likewise, guardedness is only tracked when result type is data or record type. ```agda mutual data WOne : Set where wrap : FOne → WOne FOne = ⊥ → WOne noo : (X : Set) → (WOne ≡ X) → X → ⊥ noo .WOne refl (wrap f) = noo FOne iso f ``` `noo` is rejected since at type `X` the structural descent `f < wrap f` is discounted `--without-K`. ```agda data Pandora : Set where C : ∞ ⊥ → Pandora loop : (A : Set) → A ≡ Pandora → A loop .Pandora refl = C (♯ (loop ⊥ foo)) ``` `loop` is rejected since guardedness is not tracked at type `A` `--without-K`. See issues [#1023](https://github.com/agda/agda/issues/1023), [#1264](https://github.com/agda/agda/issues/1264), [#1292](https://github.com/agda/agda/issues/1292). Termination checking -------------------- * The termination checker can now recognize simple subterms in dot patterns. ```agda data Subst : (d : Nat) → Set where c₁ : ∀ {d} → Subst d → Subst d c₂ : ∀ {d₁ d₂} → Subst d₁ → Subst d₂ → Subst (suc d₁ + d₂) postulate comp : ∀ {d₁ d₂} → Subst d₁ → Subst d₂ → Subst (d₁ + d₂) lookup : ∀ d → Nat → Subst d → Set₁ lookup d zero (c₁ ρ) = Set lookup d (suc v) (c₁ ρ) = lookup d v ρ lookup .(suc d₁ + d₂) v (c₂ {d₁} {d₂} ρ σ) = lookup (d₁ + d₂) v (comp ρ σ) ``` The dot pattern here is actually normalized, so it is ```agda suc (d₁ + d₂) ``` and the corresponding recursive call argument is `(d₁ + d₂)`. In such simple cases, Agda can now recognize that the pattern is constructor applied to call argument, which is valid descent. Note however, that Agda only looks for syntactic equality when identifying subterms, since it is not allowed to normalize terms on the rhs during termination checking. Actually writing the dot pattern has no effect, this works as well, and looks pretty magical... ;-) ```agda hidden : ∀{d} → Nat → Subst d → Set₁ hidden zero (c₁ ρ) = Set hidden (suc v) (c₁ ρ) = hidden v ρ hidden v (c₂ ρ σ) = hidden v (comp ρ σ) ``` Tools ----- ### LaTeX-backend * Fixed the issue of identifiers containing operators being typeset with excessive math spacing. Bug fixes --------- * Issue [#1194](https://github.com/agda/agda/issues/1194) * Issue [#836](https://github.com/agda/agda/issues/836): Fields and constructors can be qualified by the record/data *type* as well as by their record/data module. This now works also for record/data type imported from parametrized modules: ```agda module M (_ : Set₁) where record R : Set₁ where field X : Set open M Set using (R) -- rather than using (module R) X : R → Set X = R.X ``` Release notes for Agda version 2.4.2 ==================================== Pragmas and options ------------------- * New option: `--with-K` This can be used to override a global `--without-K` in a file, by adding a pragma `{-# OPTIONS --with-K #-}`. * New pragma `{-# NON_TERMINATING #-}` This is a safer version of `NO_TERMINATION_CHECK` which doesn't treat the affected functions as terminating. This means that `NON_TERMINATING` functions do not reduce during type checking. They do reduce at run-time and when invoking `C-c C-n` at top-level (but not in a hole). Language -------- * Instance search is now more efficient and recursive (see Issue [#938](https://github.com/agda/agda/issues/938)) (but without termination check yet). A new keyword `instance` has been introduced (in the style of `abstract` and `private`) which must now be used for every definition/postulate that has to be taken into account during instance resolution. For example: ```agda record RawMonoid (A : Set) : Set where field nil : A _++_ : A -> A -> A open RawMonoid {{...}} instance rawMonoidList : {A : Set} -> RawMonoid (List A) rawMonoidList = record { nil = []; _++_ = List._++_ } rawMonoidMaybe : {A : Set} {{m : RawMonoid A}} -> RawMonoid (Maybe A) rawMonoidMaybe {A} = record { nil = nothing ; _++_ = catMaybe } where catMaybe : Maybe A -> Maybe A -> Maybe A catMaybe nothing mb = mb catMaybe ma nothing = ma catMaybe (just a) (just b) = just (a ++ b) ``` Moreover, each type of an instance must end in (something that reduces to) a named type (e.g. a record, a datatype or a postulate). This allows us to build a simple index structure ``` data/record name --> possible instances ``` that speeds up instance search. Instance search takes into account all local bindings and all global `instance` bindings and the search is recursive. For instance, searching for ```agda ? : RawMonoid (Maybe (List A)) ``` will consider the candidates {`rawMonoidList`, `rawMonoidMaybe`}, fail to unify the first one, succeeding with the second one ```agda ? = rawMonoidMaybe {A = List A} {{m = ?m}} : RawMonoid (Maybe (List A)) ``` and continue with goal ```agda ?m : RawMonoid (List A) ``` This will then find ```agda ?m = rawMonoidList {A = A} ``` and putting together we have the solution. Be careful that there is no termination check for now, you can easily make Agda loop by declaring the identity function as an instance. But it shouldn’t be possible to make Agda loop by only declaring structurally recursive instances (whatever that means). Additionally: - Uniqueness of instances is up to definitional equality (see Issue [#899](https://github.com/agda/agda/issues/899)). - Instances of the following form are allowed: ```agda EqSigma : {A : Set} {B : A → Set} {{EqA : Eq A}} {{EqB : {a : A} → Eq (B a)}} → Eq (Σ A B) ``` When searching recursively for an instance of type `{a : A} → Eq (B a)`, a lambda will automatically be introduced and instance search will search for something of type `Eq (B a)` in the context extended by `a : A`. When searching for an instance, the `a` argument does not have to be implicit, but in the definition of `EqSigma`, instance search will only be able to use `EqB` if `a` is implicit. - There is no longer any attempt to solve irrelevant metas by instance search. - Constructors of records and datatypes are automatically added to the instance table. * You can now use `quote` in patterns. For instance, here is a function that unquotes a (closed) natural number term. ```agda unquoteNat : Term → Maybe Nat unquoteNat (con (quote Nat.zero) []) = just zero unquoteNat (con (quote Nat.suc) (arg _ n ∷ [])) = fmap suc (unquoteNat n) unquoteNat _ = nothing ``` * The builtin constructors `AGDATERMUNSUPPORTED` and `AGDASORTUNSUPPORTED` are now translated to meta variables when unquoting. * New syntactic sugar `tactic e` and `tactic e | e1 | .. | en`. It desugars as follows and makes it less unwieldy to call reflection-based tactics. ```agda tactic e --> quoteGoal g in unquote (e g) tactic e | e1 | .. | en --> quoteGoal g in unquote (e g) e1 .. en ``` Note that in the second form the tactic function should generate a function from a number of new subgoals to the original goal. The type of `e` should be `Term -> Term` in both cases. * New reflection builtins for literals. The term data type `AGDATERM` now needs an additional constructor `AGDATERMLIT` taking a reflected literal defined as follows (with appropriate builtin bindings for the types `Nat`, `Float`, etc). ```agda data Literal : Set where nat : Nat → Literal float : Float → Literal char : Char → Literal string : String → Literal qname : QName → Literal {-# BUILTIN AGDALITERAL Literal #-} {-# BUILTIN AGDALITNAT nat #-} {-# BUILTIN AGDALITFLOAT float #-} {-# BUILTIN AGDALITCHAR char #-} {-# BUILTIN AGDALITSTRING string #-} {-# BUILTIN AGDALITQNAME qname #-} ``` When quoting (`quoteGoal` or `quoteTerm`) literals will be mapped to the `AGDATERMLIT` constructor. Previously natural number literals were quoted to `suc`/`zero` application and other literals were quoted to `AGDATERMUNSUPPORTED`. * New reflection builtins for function definitions. `AGDAFUNDEF` should now map to a data type defined as follows (with ```agda {-# BUILTIN QNAME QName #-} {-# BUILTIN ARG Arg #-} {-# BUILTIN AGDATERM Term #-} {-# BUILTIN AGDATYPE Type #-} {-# BUILTIN AGDALITERAL Literal #-} ``` ). ```agda data Pattern : Set where con : QName → List (Arg Pattern) → Pattern dot : Pattern var : Pattern lit : Literal → Pattern proj : QName → Pattern absurd : Pattern {-# BUILTIN AGDAPATTERN Pattern #-} {-# BUILTIN AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} data Clause : Set where clause : List (Arg Pattern) → Term → Clause absurd-clause : List (Arg Pattern) → Clause {-# BUILTIN AGDACLAUSE Clause #-} {-# BUILTIN AGDACLAUSECLAUSE clause #-} {-# BUILTIN AGDACLAUSEABSURD absurd-clause #-} data FunDef : Set where fun-def : Type → List Clause → FunDef {-# BUILTIN AGDAFUNDEF FunDef #-} {-# BUILTIN AGDAFUNDEFCON fun-def #-} ``` * New reflection builtins for extended (pattern-matching) lambda. The `AGDATERM` data type has been augmented with a constructor ```agda AGDATERMEXTLAM : List AGDACLAUSE → List (ARG AGDATERM) → AGDATERM ``` Absurd lambdas (`λ ()`) are quoted to extended lambdas with an absurd clause. * Unquoting declarations. You can now define (recursive) functions by reflection using the new `unquoteDecl` declaration ```agda unquoteDecl x = e ``` Here e should have type `AGDAFUNDEF` and evaluate to a closed value. This value is then spliced in as the definition of `x`. In the body `e`, `x` has type `QNAME` which lets you splice in recursive definitions. Standard modifiers, such as fixity declarations, can be applied to `x` as expected. * Quoted levels Universe levels are now quoted properly instead of being quoted to `AGDASORTUNSUPPORTED`. `Setω` still gets an unsupported sort, however. * Module applicants can now be operator applications. Example: ```agda postulate [_] : A -> B module M (b : B) where module N (a : A) = M [ a ] ``` [See Issue [#1245](https://github.com/agda/agda/issues/1245)] * Minor change in module application semantics. [Issue [#892](https://github.com/agda/agda/issues/892)] Previously re-exported functions were not redefined when instantiating a module. For instance ```agda module A where f = ... module B (X : Set) where open A public module C = B Nat ``` In this example `C.f` would be an alias for `A.f`, so if both `A` and `C` were opened `f` would not be ambiguous. However, this behaviour is not correct when `A` and `B` share some module parameters (Issue [#892](https://github.com/agda/agda/issues/892)). To fix this `C` now defines its own copy of `f` (which evaluates to `A.f`), which means that opening `A` and `C` results in an ambiguous `f`. Type checking ------------- * Recursive records need to be declared as either `inductive` or `coinductive`. `inductive` is no longer default for recursive records. Examples: ```agda record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B record Tree (A : Set) : Set where inductive constructor tree field elem : A subtrees : List (Tree A) record Stream (A : Set) : Set where coinductive constructor _::_ field head : A tail : Stream A ``` If you are using old-style (musical) coinduction, a record may have to be declared as inductive, paradoxically. ```agda record Stream (A : Set) : Set where inductive -- YES, THIS IS INTENDED ! constructor _∷_ field head : A tail : ∞ (Stream A) ``` This is because the "coinduction" happens in the use of `∞` and not in the use of `record`. Tools ----- ### Emacs mode * A new menu option `Display` can be used to display the version of the running Agda process. ### LaTeX-backend * New experimental option `references` has been added. When specified, i.e.: ```latex \usepackage[references]{agda} ``` a new command called `\AgdaRef` is provided, which lets you reference previously typeset commands, e.g.: Let us postulate `\AgdaRef{apa}`. ```agda \begin{code} postulate apa : Set \end{code} ``` Above `apa` will be typeset (highlighted) the same in the text as in the code, provided that the LaTeX output is post-processed using `src/data/postprocess-latex.pl`, e.g.: ``` cp $(dirname $(dirname $(agda-mode locate)))/postprocess-latex.pl . agda -i. --latex Example.lagda cd latex/ perl ../postprocess-latex.pl Example.tex > Example.processed mv Example.processed Example.tex xelatex Example.tex ``` Mix-fix and Unicode should work as expected (Unicode requires XeLaTeX/LuaLaTeX), but there are limitations: - Overloading identifiers should be avoided, if multiples exist `\AgdaRef` will typeset according to the first it finds. - Only the current module is used, should you need to reference identifiers in other modules then you need to specify which other module manually, i.e. `\AgdaRef[module]{identifier}`. Release notes for Agda 2 version 2.4.0.2 ======================================== * The Agda input mode now supports alphabetical super and subscripts, in addition to the numerical ones that were already present. [Issue [#1240](https://github.com/agda/agda/issues/1240)] * New feature: Interactively split result. Make case (`C-c C-c`) with no variables given tries to split on the result to introduce projection patterns. The hole needs to be of record type, of course. ```agda test : {A B : Set} (a : A) (b : B) → A × B test a b = ? ``` Result-splitting `?` will produce the new clauses: ```agda proj₁ (test a b) = ? proj₂ (test a b) = ? ``` If hole is of function type ending in a record type, the necessary pattern variables will be introduced before the split. Thus, the same result can be obtained by starting from: ```agda test : {A B : Set} (a : A) (b : B) → A × B test = ? ``` * The so far undocumented `ETA` pragma now throws an error if applied to definitions that are not records. `ETA` can be used to force eta-equality at recursive record types, for which eta is not enabled automatically by Agda. Here is such an example: ```agda mutual data Colist (A : Set) : Set where [] : Colist A _∷_ : A → ∞Colist A → Colist A record ∞Colist (A : Set) : Set where coinductive constructor delay field force : Colist A open ∞Colist {-# ETA ∞Colist #-} test : {A : Set} (x : ∞Colist A) → x ≡ delay (force x) test x = refl ``` Note: Unsafe use of `ETA` can make Agda loop, e.g. by triggering infinite eta expansion! * Bugs fixed (see [bug tracker](https://github.com/agda/agda/issues)): [#1203](https://github.com/agda/agda/issues/1203) [#1205](https://github.com/agda/agda/issues/1205) [#1209](https://github.com/agda/agda/issues/1209) [#1213](https://github.com/agda/agda/issues/1213) [#1214](https://github.com/agda/agda/issues/1214) [#1216](https://github.com/agda/agda/issues/1216) [#1225](https://github.com/agda/agda/issues/1225) [#1226](https://github.com/agda/agda/issues/1226) [#1231](https://github.com/agda/agda/issues/1231) [#1233](https://github.com/agda/agda/issues/1233) [#1239](https://github.com/agda/agda/issues/1239) [#1241](https://github.com/agda/agda/issues/1241) [#1243](https://github.com/agda/agda/issues/1243) Release notes for Agda 2 version 2.4.0.1 ======================================== * The option `--compile-no-main` has been renamed to `--no-main`. * `COMPILED_DATA` pragmas can now be given for records. * Various bug fixes. Release notes for Agda 2 version 2.4.0 ====================================== Installation and infrastructure ------------------------------- * A new module called `Agda.Primitive` has been introduced. This module is available to all users, even if the standard library is not used. Currently the module contains level primitives and their representation in Haskell when compiling with MAlonzo: ```agda infixl 6 _⊔_ postulate Level : Set lzero : Level lsuc : (ℓ : Level) → Level _⊔_ : (ℓ₁ ℓ₂ : Level) → Level {-# COMPILED_TYPE Level () #-} {-# COMPILED lzero () #-} {-# COMPILED lsuc (\_ -> ()) #-} {-# COMPILED _⊔_ (\_ _ -> ()) #-} {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO lzero #-} {-# BUILTIN LEVELSUC lsuc #-} {-# BUILTIN LEVELMAX _⊔_ #-} ``` To bring these declarations into scope you can use a declaration like the following one: ```agda open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) ``` The standard library reexports these primitives (using the names `zero` and `suc` instead of `lzero` and `lsuc`) from the `Level` module. Existing developments using universe polymorphism might now trigger the following error message: ``` Duplicate binding for built-in thing LEVEL, previous binding to .Agda.Primitive.Level ``` To fix this problem, please remove the duplicate bindings. Technical details (perhaps relevant to those who build Agda packages): The include path now always contains a directory `/lib/prim`, and this directory is supposed to contain a subdirectory Agda containing a file `Primitive.agda`. The standard location of `` is system- and installation-specific. E.g., in a Cabal `--user` installation of Agda-2.3.4 on a standard single-ghc Linux system it would be `$HOME/.cabal/share/Agda-2.3.4` or something similar. The location of the `` directory can be configured at compile-time using Cabal flags (`--datadir` and `--datasubdir`). The location can also be set at run-time, using the `Agda_datadir` environment variable. Pragmas and options ------------------- * Pragma `NO_TERMINATION_CHECK` placed within a mutual block is now applied to the whole mutual block (rather than being discarded silently). Adding to the uses 1.-4. outlined in the release notes for 2.3.2 we allow: 3a. Skipping an old-style mutual block: Somewhere within `mutual` block before a type signature or first function clause. ```agda mutual {-# NO_TERMINATION_CHECK #-} c : A c = d d : A d = c ``` * New option `--no-pattern-matching` Disables all forms of pattern matching (for the current file). You can still import files that use pattern matching. * New option `-v profile:7` Prints some stats on which phases Agda spends how much time. (Number might not be very reliable, due to garbage collection interruptions, and maybe due to laziness of Haskell.) * New option `--no-sized-types` Option `--sized-types` is now default. `--no-sized-types` will turn off an extra (inexpensive) analysis on data types used for subtyping of sized types. Language -------- * Experimental feature: `quoteContext` There is a new keyword `quoteContext` that gives users access to the list of names in the current local context. For instance: ```agda open import Data.Nat open import Data.List open import Reflection foo : ℕ → ℕ → ℕ foo 0 m = 0 foo (suc n) m = quoteContext xs in ? ``` In the remaining goal, the list `xs` will consist of two names, `n` and `m`, corresponding to the two local variables. At the moment it is not possible to access let bound variables (this feature may be added in the future). * Experimental feature: Varying arity. Function clauses may now have different arity, e.g., ```agda Sum : ℕ → Set Sum 0 = ℕ Sum (suc n) = ℕ → Sum n sum : (n : ℕ) → ℕ → Sum n sum 0 acc = acc sum (suc n) acc m = sum n (m + acc) ``` or, ```agda T : Bool → Set T true = Bool T false = Bool → Bool f : (b : Bool) → T b f false true = false f false false = true f true = true ``` This feature is experimental. Yet unsupported: - Varying arity and `with`. - Compilation of functions with varying arity to Haskell, JS, or Epic. * Experimental feature: copatterns. (Activated with option `--copatterns`) We can now define a record by explaining what happens if you project the record. For instance: ```agda {-# OPTIONS --copatterns #-} record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ pair : {A B : Set} → A → B → A × B fst (pair a b) = a snd (pair a b) = b swap : {A B : Set} → A × B → B × A fst (swap p) = snd p snd (swap p) = fst p swap3 : {A B C : Set} → A × (B × C) → C × (B × A) fst (swap3 t) = snd (snd t) fst (snd (swap3 t)) = fst (snd t) snd (snd (swap3 t)) = fst t ``` Taking a projection on the left hand side (lhs) is called a projection pattern, applying to a pattern is called an application pattern. (Alternative terms: projection/application copattern.) In the first example, the symbol `pair`, if applied to variable patterns `a` and `b` and then projected via `fst`, reduces to `a`. `pair` by itself does not reduce. A typical application are coinductive records such as streams: ```agda record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream repeat : {A : Set} (a : A) -> Stream A head (repeat a) = a tail (repeat a) = repeat a ``` Again, `repeat a` by itself will not reduce, but you can take a projection (head or tail) and then it will reduce to the respective rhs. This way, we get the lazy reduction behavior necessary to avoid looping corecursive programs. Application patterns do not need to be trivial (i.e., variable patterns), if we mix with projection patterns. E.g., we can have ```agda nats : Nat -> Stream Nat head (nats zero) = zero tail (nats zero) = nats zero head (nats (suc x)) = x tail (nats (suc x)) = nats x ``` Here is an example (not involving coinduction) which demostrates records with fields of function type: ```agda -- The State monad record State (S A : Set) : Set where constructor state field runState : S → A × S open State -- The Monad type class record Monad (M : Set → Set) : Set1 where constructor monad field return : {A : Set} → A → M A _>>=_ : {A B : Set} → M A → (A → M B) → M B -- State is an instance of Monad -- Demonstrates the interleaving of projection and application patterns stateMonad : {S : Set} → Monad (State S) runState (Monad.return stateMonad a ) s = a , s runState (Monad._>>=_ stateMonad m k) s₀ = let a , s₁ = runState m s₀ in runState (k a) s₁ module MonadLawsForState {S : Set} where open Monad (stateMonad {S}) leftId : {A B : Set}(a : A)(k : A → State S B) → (return a >>= k) ≡ k a leftId a k = refl rightId : {A B : Set}(m : State S A) → (m >>= return) ≡ m rightId m = refl assoc : {A B C : Set}(m : State S A)(k : A → State S B)(l : B → State S C) → ((m >>= k) >>= l) ≡ (m >>= λ a → (k a >>= l)) assoc m k l = refl ``` Copatterns are yet experimental and the following does not work: - Copatterns and `with` clauses. - Compilation of copatterns to Haskell, JS, or Epic. - Projections generated by ```agda open R {{...}} ``` are not handled properly on lhss yet. - Conversion checking is slower in the presence of copatterns, since stuck definitions of record type do no longer count as neutral, since they can become unstuck by applying a projection. Thus, comparing two neutrals currently requires comparing all they projections, which repeats a lot of work. * Top-level module no longer required. The top-level module can be omitted from an Agda file. The module name is then inferred from the file name by dropping the path and the `.agda` extension. So, a module defined in `/A/B/C.agda` would get the name `C`. You can also suppress only the module name of the top-level module by writing ```agda module _ where ``` This works also for parameterised modules. * Module parameters are now always hidden arguments in projections. For instance: ```agda module M (A : Set) where record Prod (B : Set) : Set where constructor _,_ field fst : A snd : B open Prod public open M ``` Now, the types of `fst` and `snd` are ```agda fst : {A : Set}{B : Set} → Prod A B → A snd : {A : Set}{B : Set} → Prod A B → B ``` Until 2.3.2, they were ```agda fst : (A : Set){B : Set} → Prod A B → A snd : (A : Set){B : Set} → Prod A B → B ``` This change is a step towards symmetry of constructors and projections. (Constructors always took the module parameters as hidden arguments). * Telescoping lets: Local bindings are now accepted in telescopes of modules, function types, and lambda-abstractions. The syntax of telescopes as been extended to support `let`: ```agda id : (let ★ = Set) (A : ★) → A → A id A x = x ``` In particular one can now `open` modules inside telescopes: ```agda module Star where ★ : Set₁ ★ = Set module MEndo (let open Star) (A : ★) where Endo : ★ Endo = A → A ``` Finally a shortcut is provided for opening modules: ```agda module N (open Star) (A : ★) (open MEndo A) (f : Endo) where ... ``` The semantics of the latter is ```agda module _ where open Star module _ (A : ★) where open MEndo A module N (f : Endo) where ... ``` The semantics of telescoping lets in function types and lambda abstractions is just expanding them into ordinary lets. * More liberal left-hand sides in lets [Issue [#1028](https://github.com/agda/agda/issues/1028)]: You can now write left-hand sides with arguments also for let bindings without a type signature. For instance, ```agda let f x = suc x in f zero ``` Let bound functions still can't do pattern matching though. * Ambiguous names in patterns are now optimistically resolved in favor of constructors. [Issue [#822](https://github.com/agda/agda/issues/822)] In particular, the following succeeds now: ```agda module M where data D : Set₁ where [_] : Set → D postulate [_] : Set → Set open M Foo : _ → Set Foo [ A ] = A ``` * Anonymous `where`-modules are opened public. [Issue [#848](https://github.com/agda/agda/issues/848)] ``` f args = rhs module _ telescope where body ``` means the following (not proper Agda code, since you cannot put a module in-between clauses) ``` module _ {arg-telescope} telescope where body f args = rhs ``` Example: ```agda A : Set1 A = B module _ where B : Set1 B = Set C : Set1 C = B ``` * Builtin `ZERO` and `SUC` have been merged with `NATURAL`. When binding the `NATURAL` builtin, `ZERO` and `SUC` are bound to the appropriate constructors automatically. This means that instead of writing ```agda {-# BUILTIN NATURAL Nat #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} ``` you just write ```agda {-# BUILTIN NATURAL Nat #-} ``` * Pattern synonym can now have implicit arguments. [Issue [#860](https://github.com/agda/agda/issues/860)] For example, ```agda pattern tail=_ {x} xs = x ∷ xs len : ∀ {A} → List A → Nat len [] = 0 len (tail= xs) = 1 + len xs ``` * Syntax declarations can now have implicit arguments. [Issue [#400](https://github.com/agda/agda/issues/400)] For example ```agda id : ∀ {a}{A : Set a} -> A -> A id x = x syntax id {A} x = x ∈ A ``` * Minor syntax changes - `-}` is now parsed as end-comment even if no comment was begun. As a consequence, the following definition gives a parse error ```agda f : {A- : Set} -> Set f {A-} = A- ``` because Agda now sees `ID(f) LBRACE ID(A) END-COMMENT`, and no longer `ID(f) LBRACE ID(A-) RBRACE`. The rational is that the previous lexing was to context-sensitive, attempting to comment-out `f` using `{-` and `-}` lead to a parse error. - Fixities (binding strengths) can now be negative numbers as well. [Issue [#1109](https://github.com/agda/agda/issues/1109)] ```agda infix -1 _myop_ ``` - Postulates are now allowed in mutual blocks. [Issue [#977](https://github.com/agda/agda/issues/977)] - Empty where blocks are now allowed. [Issue [#947](https://github.com/agda/agda/issues/947)] - Pattern synonyms are now allowed in parameterised modules. [Issue [#941](https://github.com/agda/agda/issues/941)] - Empty hiding and renaming lists in module directives are now allowed. - Module directives `using`, `hiding`, `renaming` and `public` can now appear in arbitrary order. Multiple `using`/`hiding`/`renaming` directives are allowed, but you still cannot have both using and `hiding` (because that doesn't make sense). [Issue [#493](https://github.com/agda/agda/issues/493)] Goal and error display ---------------------- * The error message `Refuse to construct infinite term` has been removed, instead one gets unsolved meta variables. Reason: the error was thrown over-eagerly. [Issue [#795](https://github.com/agda/agda/issues/795)] * If an interactive case split fails with message ``` Since goal is solved, further case distinction is not supported; try `Solve constraints' instead ``` then the associated interaction meta is assigned to a solution. Press `C-c C-=` (Show constraints) to view the solution and `C-c C-s` (Solve constraints) to apply it. [Issue [#289](https://github.com/agda/agda/issues/289)] Type checking ------------- * [ Issue [#376](https://github.com/agda/agda/issues/376) ] Implemented expansion of bound record variables during meta assignment. Now Agda can solve for metas X that are applied to projected variables, e.g.: ```agda X (fst z) (snd z) = z X (fst z) = fst z ``` Technically, this is realized by substituting `(x , y)` for `z` with fresh bound variables `x` and `y`. Here the full code for the examples: ```agda record Sigma (A : Set)(B : A -> Set) : Set where constructor _,_ field fst : A snd : B fst open Sigma test : (A : Set) (B : A -> Set) -> let X : (x : A) (y : B x) -> Sigma A B X = _ in (z : Sigma A B) -> X (fst z) (snd z) ≡ z test A B z = refl test' : (A : Set) (B : A -> Set) -> let X : A -> A X = _ in (z : Sigma A B) -> X (fst z) ≡ fst z test' A B z = refl ``` The fresh bound variables are named `fst(z)` and `snd(z)` and can appear in error messages, e.g.: ```agda fail : (A : Set) (B : A -> Set) -> let X : A -> Sigma A B X = _ in (z : Sigma A B) -> X (fst z) ≡ z fail A B z = refl ``` results in error: ``` Cannot instantiate the metavariable _7 to solution fst(z) , snd(z) since it contains the variable snd(z) which is not in scope of the metavariable or irrelevant in the metavariable but relevant in the solution when checking that the expression refl has type _7 A B (fst z) ≡ z ``` * Dependent record types and definitions by copatterns require reduction with previous function clauses while checking the current clause. [Issue [#907](https://github.com/agda/agda/issues/907)] For a simple example, consider ```agda test : ∀ {A} → Σ Nat λ n → Vec A n proj₁ test = zero proj₂ test = [] ``` For the second clause, the lhs and rhs are typed as ```agda proj₂ test : Vec A (proj₁ test) [] : Vec A zero ``` In order for these types to match, we have to reduce the lhs type with the first function clause. Note that termination checking comes after type checking, so be careful to avoid non-termination! Otherwise, the type checker might get into an infinite loop. * The implementation of the primitive `primTrustMe` has changed. It now only reduces to `REFL` if the two arguments `x` and `y` have the same computational normal form. Before, it reduced when `x` and `y` were definitionally equal, which included type-directed equality laws such as eta-equality. Yet because reduction is untyped, calling conversion from reduction lead to Agda crashes [Issue [#882](https://github.com/agda/agda/issues/882)]. The amended description of `primTrustMe` is (cf. release notes for 2.2.6): ```agda primTrustMe : {A : Set} {x y : A} → x ≡ y ``` Here `_≡_` is the builtin equality (see BUILTIN hooks for equality, above). If `x` and `y` have the same computational normal form, then `primTrustMe {x = x} {y = y}` reduces to `refl`. A note on `primTrustMe`'s runtime behavior: The MAlonzo compiler replaces all uses of `primTrustMe` with the `REFL` builtin, without any check for definitional equality. Incorrect uses of `primTrustMe` can potentially lead to segfaults or similar problems of the compiled code. * Implicit patterns of record type are now only eta-expanded if there is a record constructor. [Issues [#473](https://github.com/agda/agda/issues/473), [#635](https://github.com/agda/agda/issues/635)] ```agda data D : Set where d : D data P : D → Set where p : P d record Rc : Set where constructor c field f : D works : {r : Rc} → P (Rc.f r) → Set works p = D ``` This works since the implicit pattern `r` is eta-expanded to `c x` which allows the type of `p` to reduce to `P x` and `x` to be unified with `d`. The corresponding explicit version is: ```agda works' : (r : Rc) → P (Rc.f r) → Set works' (c .d) p = D ``` However, if the record constructor is removed, the same example will fail: ```agda record R : Set where field f : D fails : {r : R} → P (R.f r) → Set fails p = D -- d != R.f r of type D -- when checking that the pattern p has type P (R.f r) ``` The error is justified since there is no pattern we could write down for `r`. It would have to look like ```agda record { f = .d } ``` but anonymous record patterns are not part of the language. * Absurd lambdas at different source locations are no longer different. [Issue [#857](https://github.com/agda/agda/issues/857)] In particular, the following code type-checks now: ```agda absurd-equality : _≡_ {A = ⊥ → ⊥} (λ()) λ() absurd-equality = refl ``` Which is a good thing! * Printing of named implicit function types. When printing terms in a context with bound variables Agda renames new bindings to avoid clashes with the previously bound names. For instance, if `A` is in scope, the type `(A : Set) → A` is printed as `(A₁ : Set) → A₁`. However, for implicit function types the name of the binding matters, since it can be used when giving implicit arguments. For this situation, the following new syntax has been introduced: `{x = y : A} → B` is an implicit function type whose bound variable (in scope in `B`) is `y`, but where the name of the argument is `x` for the purposes of giving it explicitly. For instance, with `A` in scope, the type `{A : Set} → A` is now printed as `{A = A₁ : Set} → A₁`. This syntax is only used when printing and is currently not being parsed. * Changed the semantics of `--without-K`. [Issue [#712](https://github.com/agda/agda/issues/712), Issue [#865](https://github.com/agda/agda/issues/865), Issue [#1025](https://github.com/agda/agda/issues/1025)] New specification of `--without-K`: When `--without-K` is enabled, the unification of indices for pattern matching is restricted in two ways: 1. Reflexive equations of the form `x == x` are no longer solved, instead Agda gives an error when such an equation is encountered. 2. When unifying two same-headed constructor forms `c us` and `c vs` of type `D pars ixs`, the datatype indices `ixs` (but not the parameters) have to be *self-unifiable*, i.e. unification of `ixs` with itself should succeed positively. This is a nontrivial requirement because of point 1. Examples: - The J rule is accepted. ```agda J : {A : Set} (P : {x y : A} → x ≡ y → Set) → (∀ x → P (refl x)) → ∀ {x y} (x≡y : x ≡ y) → P x≡y J P p (refl x) = p x ```agda This definition is accepted since unification of `x` with `y` doesn't require deletion or injectivity. - The K rule is rejected. ```agda K : {A : Set} (P : {x : A} → x ≡ x → Set) → (∀ x → P (refl {x = x})) → ∀ {x} (x≡x : x ≡ x) → P x≡x K P p refl = p _ ``` Definition is rejected with the following error: ``` Cannot eliminate reflexive equation x = x of type A because K has been disabled. when checking that the pattern refl has type x ≡ x ``` - Symmetry of the new criterion. ```agda test₁ : {k l m : ℕ} → k + l ≡ m → ℕ test₁ refl = zero test₂ : {k l m : ℕ} → k ≡ l + m → ℕ test₂ refl = zero ``` Both versions are now accepted (previously only the first one was). - Handling of parameters. ```agda cons-injective : {A : Set} (x y : A) → (x ∷ []) ≡ (y ∷ []) → x ≡ y cons-injective x .x refl = refl ``` Parameters are not unified, so they are ignored by the new criterion. - A larger example: antisymmetry of ≤. ```agda data _≤_ : ℕ → ℕ → Set where lz : (n : ℕ) → zero ≤ n ls : (m n : ℕ) → m ≤ n → suc m ≤ suc n ≤-antisym : (m n : ℕ) → m ≤ n → n ≤ m → m ≡ n ≤-antisym .zero .zero (lz .zero) (lz .zero) = refl ≤-antisym .(suc m) .(suc n) (ls m n p) (ls .n .m q) = cong suc (≤-antisym m n p q) ``` - [ Issue [#1025](https://github.com/agda/agda/issues/1025) ] ```agda postulate mySpace : Set postulate myPoint : mySpace data Foo : myPoint ≡ myPoint → Set where foo : Foo refl test : (i : foo ≡ foo) → i ≡ refl test refl = {!!} ``` When applying injectivity to the equation `foo ≡ foo` of type `Foo refl`, it is checked that the index `refl` of type `myPoint ≡ myPoint` is self-unifiable. The equation `refl ≡ refl` again requires injectivity, so now the index `myPoint` is checked for self-unifiability, hence the error: ``` Cannot eliminate reflexive equation myPoint = myPoint of type mySpace because K has been disabled. when checking that the pattern refl has type foo ≡ foo ``` Termination checking -------------------- * A buggy facility coined "matrix-shaped orders" that supported uncurried functions (which take tuples of arguments instead of one argument after another) has been removed from the termination checker. [Issue [#787](https://github.com/agda/agda/issues/787)] * Definitions which fail the termination checker are not unfolded any longer to avoid loops or stack overflows in Agda. However, the termination checker for a mutual block is only invoked after type-checking, so there can still be loops if you define a non-terminating function. But termination checking now happens before the other supplementary checks: positivity, polarity, injectivity and projection-likeness. Note that with the pragma `{-# NO_TERMINATION_CHECK #-}` you can make Agda treat any function as terminating. * Termination checking of functions defined by `with` has been improved. Cases which previously required `--termination-depth` to pass the termination checker (due to use of `with`) no longer need the flag. For example ```agda merge : List A → List A → List A merge [] ys = ys merge xs [] = xs merge (x ∷ xs) (y ∷ ys) with x ≤ y merge (x ∷ xs) (y ∷ ys) | false = y ∷ merge (x ∷ xs) ys merge (x ∷ xs) (y ∷ ys) | true = x ∷ merge xs (y ∷ ys) ``` This failed to termination check previously, since the `with` expands to an auxiliary function `merge-aux`: ```agda merge-aux x y xs ys false = y ∷ merge (x ∷ xs) ys merge-aux x y xs ys true = x ∷ merge xs (y ∷ ys) ``` This function makes a call to `merge` in which the size of one of the arguments is increasing. To make this pass the termination checker now inlines the definition of `merge-aux` before checking, thus effectively termination checking the original source program. As a result of this transformation doing `with` on a variable no longer preserves termination. For instance, this does not termination check: ```agda bad : Nat → Nat bad n with n ... | zero = zero ... | suc m = bad m ``` * The performance of the termination checker has been improved. For higher `--termination-depth` the improvement is significant. While the default `--termination-depth` is still 1, checking with higher `--termination-depth` should now be feasible. Compiler backends ----------------- * The MAlonzo compiler backend now has support for compiling modules that are not full programs (i.e. don't have a main function). The goal is that you can write part of a program in Agda and the rest in Haskell, and invoke the Agda functions from the Haskell code. The following features were added for this reason: - A new command-line option `--compile-no-main`: the command ``` agda --compile-no-main Test.agda ``` will compile `Test.agda` and all its dependencies to Haskell and compile the resulting Haskell files with `--make`, but (unlike `--compile`) not tell GHC to treat `Test.hs` as the main module. This type of compilation can be invoked from Emacs by customizing the `agda2-backend` variable to value `MAlonzoNoMain` and then calling `C-c C-x C-c` as before. - A new pragma `COMPILED_EXPORT` was added as part of the MAlonzo FFI. If we have an Agda file containing the following: ```agda module A.B where test : SomeType test = someImplementation {-# COMPILED_EXPORT test someHaskellId #-} ``` then test will be compiled to a Haskell function called `someHaskellId` in module `MAlonzo.Code.A.B` that can be invoked from other Haskell code. Its type will be translated according to the normal MAlonzo rules. Tools ----- ### Emacs mode * A new goal command `Helper Function Type` (`C-c C-h`) has been added. If you write an application of an undefined function in a goal, the `Helper Function Type` command will print the type that the function needs to have in order for it to fit the goal. The type is also added to the Emacs kill-ring and can be pasted into the buffer using `C-y`. The application must be of the form `f args` where `f` is the name of the helper function you want to create. The arguments can use all the normal features like named implicits or instance arguments. Example: Here's a start on a naive reverse on vectors: ```agda reverse : ∀ {A n} → Vec A n → Vec A n reverse [] = [] reverse (x ∷ xs) = {!snoc (reverse xs) x!} ``` Calling `C-c C-h` in the goal prints ```agda snoc : ∀ {A} {n} → Vec A n → A → Vec A (suc n) ``` * A new command `Explain why a particular name is in scope` (`C-c C-w`) has been added. [Issue [#207](https://github.com/agda/agda/issues/207)] This command can be called from a goal or from the top-level and will as the name suggests explain why a particular name is in scope. For each definition or module that the given name can refer to a trace is printed of all open statements and module applications leading back to the original definition of the name. For example, given ```agda module A (X : Set₁) where data Foo : Set where mkFoo : Foo module B (Y : Set₁) where open A Y public module C = B Set open C ``` Calling `C-c C-w` on `mkFoo` at the top-level prints ``` mkFoo is in scope as * a constructor Issue207.C._.Foo.mkFoo brought into scope by - the opening of C at Issue207.agda:13,6-7 - the application of B at Issue207.agda:11,12-13 - the application of A at Issue207.agda:9,8-9 - its definition at Issue207.agda:6,5-10 ``` This command is useful if Agda complains about an ambiguous name and you need to figure out how to hide the undesired interpretations. * Improvements to the `make case` command (`C-c C-c`) - One can now also split on hidden variables, using the name (starting with `.`) with which they are printed. Use `C-c C-`, to see all variables in context. - Concerning the printing of generated clauses: * Uses named implicit arguments to improve readability. * Picks explicit occurrences over implicit ones when there is a choice of binding site for a variable. * Avoids binding variables in implicit positions by replacing dot patterns that uses them by wildcards (`._`). * Key bindings for lots of "mathematical" characters (examples: 𝐴𝑨𝒜𝓐𝔄) have been added to the Agda input method. Example: type `\MiA\MIA\McA\MCA\MfA` to get 𝐴𝑨𝒜𝓐𝔄. Note: `\McB` does not exist in Unicode (as well as others in that style), but the `\MC` (bold) alphabet is complete. * Key bindings for "blackboard bold" B (𝔹) and 0-9 (𝟘-𝟡) have been added to the Agda input method (`\bb` and `\b[0-9]`). * Key bindings for controlling simplification/normalisation: Commands like `Goal type and context` (`C-c C-,`) could previously be invoked in two ways. By default the output was normalised, but if a prefix argument was used (for instance via `C-u C-c C-,`), then no explicit normalisation was performed. Now there are three options: - By default (`C-c C-,`) the output is simplified. - If `C-u` is used exactly once (`C-u C-c C-,`), then the result is neither (explicitly) normalised nor simplified. - If `C-u` is used twice (`C-u C-u C-c C-,`), then the result is normalised. ### LaTeX-backend * Two new color scheme options were added to `agda.sty`: `\usepackage[bw]{agda}`, which highlights in black and white; `\usepackage[conor]{agda}`, which highlights using Conor's colors. The default (no options passed) is to use the standard colors. * If `agda.sty` cannot be found by the LateX environment, it is now copied into the LateX output directory (`latex` by default) instead of the working directory. This means that the commands needed to produce a PDF now is ``` agda --latex -i . .lagda cd latex pdflatex .tex ``` * The LaTeX-backend has been made more tool agnostic, in particular XeLaTeX and LuaLaTeX should now work. Here is a small example (`test/LaTeXAndHTML/succeed/UnicodeInput.lagda`): ```latex \documentclass{article} \usepackage{agda} \begin{document} \begin{code} data αβγδεζθικλμνξρστυφχψω : Set₁ where postulate →⇒⇛⇉⇄↦⇨↠⇀⇁ : Set \end{code} \[ ∀X [ ∅ ∉ X ⇒ ∃f:X ⟶ ⋃ X\ ∀A ∈ X (f(A) ∈ A) ] \] \end{document} ``` Compiled as follows, it should produce a nice looking PDF (tested with TeX Live 2012): ``` agda --latex .lagda cd latex xelatex .tex (or lualatex .tex) ``` If symbols are missing or XeLaTeX/LuaLaTeX complains about the font missing, try setting a different font using: ```latex \setmathfont{} ``` Use the `fc-list` tool to list available fonts. * Add experimental support for hyperlinks to identifiers If the `hyperref` LateX package is loaded before the Agda package and the links option is passed to the Agda package, then the Agda package provides a function called `\AgdaTarget`. Identifiers which have been declared targets, by the user, will become clickable hyperlinks in the rest of the document. Here is a small example (`test/LaTeXAndHTML/succeed/Links.lagda`): ```latex \documentclass{article} \usepackage{hyperref} \usepackage[links]{agda} \begin{document} \AgdaTarget{ℕ} \AgdaTarget{zero} \begin{code} data ℕ : Set where zero : ℕ suc : ℕ → ℕ \end{code} See next page for how to define \AgdaFunction{two} (doesn't turn into a link because the target hasn't been defined yet). We could do it manually though; \hyperlink{two}{\AgdaDatatype{two}}. \newpage \AgdaTarget{two} \hypertarget{two}{} \begin{code} two : ℕ two = suc (suc zero) \end{code} \AgdaInductiveConstructor{zero} is of type \AgdaDatatype{ℕ}. \AgdaInductiveConstructor{suc} has not been defined to be a target so it doesn't turn into a link. \newpage Now that the target for \AgdaFunction{two} has been defined the link works automatically. \begin{code} data Bool : Set where true false : Bool \end{code} The AgdaTarget command takes a list as input, enabling several targets to be specified as follows: \AgdaTarget{if, then, else, if\_then\_else\_} \begin{code} if_then_else_ : {A : Set} → Bool → A → A → A if true then t else f = t if false then t else f = f \end{code} \newpage Mixfix identifier need their underscores escaped: \AgdaFunction{if\_then\_else\_}. \end{document} ``` The boarders around the links can be suppressed using hyperref's hidelinks option: ```latex \usepackage[hidelinks]{hyperref} ``` Note that the current approach to links does not keep track of scoping or types, and hence overloaded names might create links which point to the wrong place. Therefore it is recommended to not overload names when using the links option at the moment, this might get fixed in the future. Release notes for Agda 2 version 2.3.2.2 ======================================== * Fixed a bug that sometimes made it tricky to use the Emacs mode on Windows [Issue [#757](https://github.com/agda/agda/issues/757)]. * Made Agda build with newer versions of some libraries. * Fixed a bug that caused ambiguous parse error messages [Issue [#147](https://github.com/agda/agda/issues/147)]. Release notes for Agda 2 version 2.3.2.1 ======================================== Installation ------------ * Made it possible to compile Agda with more recent versions of hashable, QuickCheck and Win32. * Excluded mtl-2.1. Type checking ------------- * Fixed bug in the termination checker (Issue [#754](https://github.com/agda/agda/issues/754)). Release notes for Agda 2 version 2.3.2 ====================================== Installation ------------ * The Agda-executable package has been removed. The executable is now provided as part of the Agda package. * The Emacs mode no longer depends on haskell-mode or GHCi. * Compilation of Emacs mode Lisp files. You can now compile the Emacs mode Lisp files by running `agda-mode compile`. This command is run by `make install`. Compilation can, in some cases, give a noticeable speedup. WARNING: If you reinstall the Agda mode without recompiling the Emacs Lisp files, then Emacs may continue using the old, compiled files. Pragmas and options ------------------- * The `--without-K` check now reconstructs constructor parameters. New specification of `--without-K`: If the flag is activated, then Agda only accepts certain case-splits. If the type of the variable to be split is `D pars ixs`, where `D` is a data (or record) type, `pars` stands for the parameters, and `ixs` the indices, then the following requirements must be satisfied: - The indices `ixs` must be applications of constructors (or literals) to distinct variables. Constructors are usually not applied to parameters, but for the purposes of this check constructor parameters are treated as other arguments. - These distinct variables must not be free in pars. * Irrelevant arguments are printed as `_` by default now. To turn on printing of irrelevant arguments, use option ``` --show-irrelevant ``` * New: Pragma `NO_TERMINATION_CHECK` to switch off termination checker for individual function definitions and mutual blocks. The pragma must precede a function definition or a mutual block. Examples (see `test/Succeed/NoTerminationCheck.agda`): 1. Skipping a single definition: before type signature. ```agda {-# NO_TERMINATION_CHECK #-} a : A a = a ``` 2. Skipping a single definition: before first clause. ```agda b : A {-# NO_TERMINATION_CHECK #-} b = b ``` 3. Skipping an old-style mutual block: Before `mutual` keyword. ```agda {-# NO_TERMINATION_CHECK #-} mutual c : A c = d d : A d = c ``` 4. Skipping a new-style mutual block: Anywhere before a type signature or first function clause in the block ```agda i : A j : A i = j {-# NO_TERMINATION_CHECK #-} j = i ``` The pragma cannot be used in `--safe` mode. Language -------- * Let binding record patterns ```agda record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ let (x , (y , z)) = t in u ``` will now be interpreted as ```agda let x = fst t y = fst (snd t) z = snd (snd t) in u ``` Note that the type of `t` needs to be inferable. If you need to provide a type signature, you can write the following: ```agda let a : ... a = t (x , (y , z)) = a in u ``` * Pattern synonyms A pattern synonym is a declaration that can be used on the left hand side (when pattern matching) as well as the right hand side (in expressions). For example: ```agda pattern z = zero pattern ss x = suc (suc x) f : ℕ -> ℕ f z = z f (suc z) = ss z f (ss n) = n ``` Pattern synonyms are implemented by substitution on the abstract syntax, so definitions are scope-checked but not type-checked. They are particularly useful for universe constructions. * Qualified mixfix operators It is now possible to use a qualified mixfix operator by qualifying the first part of the name. For instance ```agda import Data.Nat as Nat import Data.Bool as Bool two = Bool.if true then 1 Nat.+ 1 else 0 ``` * Sections [Issue [#735](https://github.com/agda/agda/issues/735)]. Agda now parses anonymous modules as sections: ```agda module _ {a} (A : Set a) where data List : Set a where [] : List _∷_ : (x : A) (xs : List) → List module _ {a} {A : Set a} where _++_ : List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ (xs ++ ys) test : List Nat test = (5 ∷ []) ++ (3 ∷ []) ``` In general, now the syntax ```agda module _ parameters where declarations ``` is accepted and has the same effect as ```agda private module M parameters where declarations open M public ``` for a fresh name `M`. * Instantiating a module in an open import statement [Issue [#481](https://github.com/agda/agda/issues/481)]. Now accepted: ```agda open import Path.Module args [using/hiding/renaming (...)] ``` This only brings the imported identifiers from `Path.Module` into scope, not the module itself! Consequently, the following is pointless, and raises an error: ```agda import Path.Module args [using/hiding/renaming (...)] ``` You can give a private name `M` to the instantiated module via ```agda import Path.Module args as M [using/hiding/renaming (...)] open import Path.Module args as M [using/hiding/renaming (...)] ``` Try to avoid `as` as part of the arguments. `as` is not a keyword; the following can be legal, although slightly obfuscated Agda code: ```agda open import as as as as as as ``` * Implicit module parameters can be given by name. E.g. ```agda open M {namedArg = bla} ``` This feature has been introduced in Agda 2.3.0 already. * Multiple type signatures sharing a same type can now be written as a single type signature. ```agda one two : ℕ one = suc zero two = suc one ``` Goal and error display ---------------------- * Meta-variables that were introduced by hidden argument `arg` are now printed as `_arg_number` instead of just `_number`. [Issue [#526](https://github.com/agda/agda/issues/526)] * Agda expands identifiers in anonymous modules when printing. Should make some goals nicer to read. [Issue [#721](https://github.com/agda/agda/issues/721)] * When a module identifier is ambiguous, Agda tells you if one of them is a data type module. [Issues [#318](https://github.com/agda/agda/issues/318), [#705](https://github.com/agda/agda/issues/705)] Type checking ------------- * Improved coverage checker. The coverage checker splits on arguments that have constructor or literal pattern, committing to the left-most split that makes progress. Consider the lookup function for vectors: ```agda data Fin : Nat → Set where zero : {n : Nat} → Fin (suc n) suc : {n : Nat} → Fin n → Fin (suc n) data Vec (A : Set) : Nat → Set where [] : Vec A zero _∷_ : {n : Nat} → A → Vec A n → Vec A (suc n) _!!_ : {A : Set}{n : Nat} → Vec A n → Fin n → A (x ∷ xs) !! zero = x (x ∷ xs) !! suc i = xs !! i ``` In Agda up to 2.3.0, this definition is rejected unless we add an absurd clause ```agda [] !! () ``` This is because the coverage checker committed on splitting on the vector argument, even though this inevitably lead to failed coverage, because a case for the empty vector `[]` is missing. The improvement to the coverage checker consists on committing only on splits that have a chance of covering, since all possible constructor patterns are present. Thus, Agda will now split first on the `Fin` argument, since cases for both `zero` and `suc` are present. Then, it can split on the `Vec` argument, since the empty vector is already ruled out by instantiating `n` to a `suc _`. * Instance arguments resolution will now consider candidates which still expect hidden arguments. For example: ```agda record Eq (A : Set) : Set where field eq : A → A → Bool open Eq {{...}} eqFin : {n : ℕ} → Eq (Fin n) eqFin = record { eq = primEqFin } testFin : Bool testFin = eq fin1 fin2 ``` The type-checker will now resolve the instance argument of the `eq` function to `eqFin {_}`. This is only done for hidden arguments, not instance arguments, so that the instance search stays non-recursive. * Constraint solving: Upgraded Miller patterns to record patterns. [Issue [#456](https://github.com/agda/agda/issues/456)] Agda now solves meta-variables that are applied to record patterns. A typical (but here, artificial) case is: ```agda record Sigma (A : Set)(B : A -> Set) : Set where constructor _,_ field fst : A snd : B fst test : (A : Set)(B : A -> Set) -> let X : Sigma A B -> Sigma A B X = _ in (x : A)(y : B x) -> X (x , y) ≡ (x , y) test A B x y = refl ``` This yields a constraint of the form ``` _X A B (x , y) := t[x,y] ``` (with `t[x,y] = (x, y)`) which is not a Miller pattern. However, Agda now solves this as ``` _X A B z := t[fst z,snd z]. ``` * Changed: solving recursive constraints. [Issue [#585](https://github.com/agda/agda/issues/585)] Until 2.3.0, Agda sometimes inferred values that did not pass the termination checker later, or would even make Agda loop. To prevent this, the occurs check now also looks into the definitions of the current mutual block, to avoid constructing recursive solutions. As a consequence, also terminating recursive solutions are no longer found automatically. This effects a programming pattern where the recursively computed type of a recursive function is left to Agda to solve. ```agda mutual T : D -> Set T pattern1 = _ T pattern2 = _ f : (d : D) -> T d f pattern1 = rhs1 f pattern2 = rhs2 ``` This might no longer work from now on. See examples `test/Fail/Issue585*.agda`. * Less eager introduction of implicit parameters. [Issue [#679](https://github.com/agda/agda/issues/679)] Until Agda 2.3.0, trailing hidden parameters were introduced eagerly on the left hand side of a definition. For instance, one could not write ```agda test : {A : Set} -> Set test = \ {A} -> A ``` because internally, the hidden argument `{A : Set}` was added to the left-hand side, yielding ```agda test {_} = \ {A} -> A ``` which raised a type error. Now, Agda only introduces the trailing implicit parameters it has to, in order to maintain uniform function arity. For instance, in ```agda test : Bool -> {A B C : Set} -> Set test true {A} = A test false {B = B} = B ``` Agda will introduce parameters `A` and `B` in all clauses, but not `C`, resulting in ```agda test : Bool -> {A B C : Set} -> Set test true {A} {_} = A test false {_} {B = B} = B ``` Note that for checking `where`-clauses, still all hidden trailing parameters are in scope. For instance: ```agda id : {i : Level}{A : Set i} -> A -> A id = myId where myId : forall {A} -> A -> A myId x = x ``` To be able to fill in the meta variable `_1` in ```agda myId : {A : Set _1} -> A -> A ``` the hidden parameter `{i : Level}` needs to be in scope. As a result of this more lazy introduction of implicit parameters, the following code now passes. ```agda data Unit : Set where unit : Unit T : Unit → Set T unit = {u : Unit} → Unit test : (u : Unit) → T u test unit with unit ... | _ = λ {v} → v ``` Before, Agda would eagerly introduce the hidden parameter `{v}` as unnamed left-hand side parameter, leaving no way to refer to it. The related Issue [#655](https://github.com/agda/agda/issues/655) has also been addressed. It is now possible to make `synonym' definitions ``` name = expression ``` even when the type of expression begins with a hidden quantifier. Simple example: ``` id2 = id ``` That resulted in unsolved metas until 2.3.0. * Agda detects unused arguments and ignores them during equality checking. [Issue [#691](https://github.com/agda/agda/issues/691), solves also Issue [#44](https://github.com/agda/agda/issues/44)] Agda's polarity checker now assigns 'Nonvariant' to arguments that are not actually used (except for absurd matches). If `f`'s first argument is Nonvariant, then `f x` is definitionally equal to `f y` regardless of `x` and `y`. It is similar to irrelevance, but does not require user annotation. For instance, unused module parameters do no longer get in the way: ```agda module M (x : Bool) where not : Bool → Bool not true = false not false = true open M true open M false renaming (not to not′) test : (y : Bool) → not y ≡ not′ y test y = refl ``` Matching against record or absurd patterns does not count as `use', so we get some form of proof irrelevance: ```agda data ⊥ : Set where record ⊤ : Set where constructor trivial data Bool : Set where true false : Bool True : Bool → Set True true = ⊤ True false = ⊥ fun : (b : Bool) → True b → Bool fun true trivial = true fun false () test : (b : Bool) → (x y : True b) → fun b x ≡ fun b y test b x y = refl ``` More examples in `test/Succeed/NonvariantPolarity.agda`. Phantom arguments: Parameters of record and data types are considered `used' even if they are not actually used. Consider: ```agda False : Nat → Set False zero = ⊥ False (suc n) = False n module Invariant where record Bla (n : Nat)(p : False n) : Set where module Nonvariant where Bla : (n : Nat) → False n → Set Bla n p = ⊤ ``` Even though record `Bla` does not use its parameters `n` and `p`, they are considered as used, allowing "phantom type" techniques. In contrast, the arguments of function `Bla` are recognized as unused. The following code type-checks if we open `Invariant` but leaves unsolved metas if we open `Nonvariant`. ```agda drop-suc : {n : Nat}{p : False n} → Bla (suc n) p → Bla n p drop-suc _ = _ bla : (n : Nat) → {p : False n} → Bla n p → ⊥ bla zero {()} b bla (suc n) b = bla n (drop-suc b) ``` If `Bla` is considered invariant, the hidden argument in the recursive call can be inferred to be `p`. If it is considered non-variant, then `Bla n X = Bla n p` does not entail `X = p` and the hidden argument remains unsolved. Since `bla` does not actually use its hidden argument, its value is not important and it could be searched for. Unfortunately, polarity analysis of `bla` happens only after type checking, thus, the information that `bla` is non-variant in `p` is not available yet when meta-variables are solved. (See `test/Fail/BrokenInferenceDueToNonvariantPolarity.agda`) * Agda now expands simple definitions (one clause, terminating) to check whether a function is constructor headed. [Issue [#747](https://github.com/agda/agda/issues/747)] For instance, the following now also works: ```agda MyPair : Set -> Set -> Set MyPair A B = Pair A B Vec : Set -> Nat -> Set Vec A zero = Unit Vec A (suc n) = MyPair A (Vec A n) ``` Here, `Unit` and `Pair` are data or record types. Compiler backends ----------------- * `-Werror` is now overridable. To enable compilation of Haskell modules containing warnings, the `-Werror` flag for the MAlonzo backend has been made overridable. If, for example, `--ghc-flag=-Wwarn` is passed when compiling, one can get away with things like: ```agda data PartialBool : Set where true : PartialBool {-# COMPILED_DATA PartialBool Bool True #-} ``` The default behavior remains as it used to be and rejects the above program. Tools ----- ### Emacs mode * Asynchronous Emacs mode. One can now use Emacs while a buffer is type-checked. If the buffer is edited while the type-checker runs, then syntax highlighting will not be updated when type-checking is complete. * Interactive syntax highlighting. The syntax highlighting is updated while a buffer is type-checked: - At first the buffer is highlighted in a somewhat crude way (without go-to-definition information for overloaded constructors). - If the highlighting level is "interactive", then the piece of code that is currently being type-checked is highlighted as such. (The default is "non-interactive".) - When a mutual block has been type-checked it is highlighted properly (this highlighting includes warnings for potential non-termination). The highlighting level can be controlled via the new configuration variable `agda2-highlight-level`. * Multiple case-splits can now be performed in one go. Consider the following example: ```agda _==_ : Bool → Bool → Bool b₁ == b₂ = {!!} ``` If you split on `b₁ b₂`, then you get the following code: ```agda _==_ : Bool → Bool → Bool true == true = {!!} true == false = {!!} false == true = {!!} false == false = {!!} ``` The order of the variables matters. Consider the following code: ```agda lookup : ∀ {a n} {A : Set a} → Vec A n → Fin n → A lookup xs i = {!!} ``` If you split on `xs i`, then you get the following code: ```agda lookup : ∀ {a n} {A : Set a} → Vec A n → Fin n → A lookup [] () lookup (x ∷ xs) zero = {!!} lookup (x ∷ xs) (suc i) = {!!} ``` However, if you split on `i xs`, then you get the following code instead: ```agda lookup : ∀ {a n} {A : Set a} → Vec A n → Fin n → A lookup (x ∷ xs) zero = ? lookup (x ∷ xs) (suc i) = ? ``` This code is rejected by Agda 2.3.0, but accepted by 2.3.2 thanks to improved coverage checking (see above). * The Emacs mode now presents information about which module is currently being type-checked. * New global menu entry: `Information about the character at point`. If this entry is selected, then information about the character at point is displayed, including (in many cases) information about how to type the character. * Commenting/uncommenting the rest of the buffer. One can now comment or uncomment the rest of the buffer by typing `C-c C-x M-;` or by selecting the menu entry `Comment/uncomment` the rest of the buffer". * The Emacs mode now uses the Agda executable instead of GHCi. The `*ghci*` buffer has been renamed to `*agda2*`. A new configuration variable has been introduced: `agda2-program-name`, the name of the Agda executable (by default `agda`). The variable `agda2-ghci-options` has been replaced by `agda2-program-args`: extra arguments given to the Agda executable (by default `none`). If you want to limit Agda's memory consumption you can add some arguments to `agda2-program-args`, for instance `+RTS -M1.5G -RTS`. * The Emacs mode no longer depends on haskell-mode. Users who have customised certain haskell-mode variables (such as `haskell-ghci-program-args`) may want to update their configuration. ### LaTeX-backend An experimental LaTeX-backend which does precise highlighting a la the HTML-backend and code alignment a la lhs2TeX has been added. Here is a sample input literate Agda file: ```latex \documentclass{article} \usepackage{agda} \begin{document} The following module declaration will be hidden in the output. \AgdaHide{ \begin{code} module M where \end{code} } Two or more spaces can be used to make the backend align stuff. \begin{code} data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + n = n suc m + n = suc (m + n) \end{code} \end{document} ``` To produce an output PDF issue the following commands: ``` agda --latex -i . .lagda pdflatex latex/.tex ``` Only the top-most module is processed, like with lhs2tex and unlike with the HTML-backend. If you want to process imported modules you have to call `agda --latex` manually on each of those modules. There are still issues related to formatting, see the bug tracker for more information: https://code.google.com/p/agda/issues/detail?id=697 The default `agda.sty` might therefore change in backwards-incompatible ways, as work proceeds in trying to resolve those problems. Implemented features: * Two or more spaces can be used to force alignment of things, like with lhs2tex. See example above. * The highlighting information produced by the type checker is used to generate the output. For example, the data declaration in the example above, produces: ```agda \AgdaKeyword{data} \AgdaDatatype{ℕ} \AgdaSymbol{:} \AgdaPrimitiveType{Set} \AgdaKeyword{where} ``` These LaTeX commands are defined in `agda.sty` (which is imported by `\usepackage{agda}`) and cause the highlighting. * The LaTeX-backend checks if `agda.sty` is found by the LaTeX environment, if it isn't a default `agda.sty` is copied from Agda's `data-dir` into the working directory (and thus made available to the LaTeX environment). If the default `agda.sty` isn't satisfactory (colors, fonts, spacing, etc) then the user can modify it and make put it somewhere where the LaTeX environment can find it. Hopefully most aspects should be modifiable via `agda.sty` rather than having to tweak the implementation. * `--latex-dir` can be used to change the default output directory. Release notes for Agda 2 version 2.3.0 ====================================== Language -------- * New more liberal syntax for mutually recursive definitions. It is no longer necessary to use the `mutual` keyword to define mutually recursive functions or datatypes. Instead, it is enough to declare things before they are used. Instead of ```agda mutual f : A f = a[f, g] g : B[f] g = b[f, g] ``` you can now write ```agda f : A g : B[f] f = a[f, g] g = b[f, g]. ``` With the new style you have more freedom in choosing the order in which things are type checked (previously type signatures were always checked before definitions). Furthermore you can mix arbitrary declarations, such as modules and postulates, with mutually recursive definitions. For data types and records the following new syntax is used to separate the declaration from the definition: ```agda -- Declaration. data Vec (A : Set) : Nat → Set -- Note the absence of 'where'. -- Definition. data Vec A where [] : Vec A zero _::_ : {n : Nat} → A → Vec A n → Vec A (suc n) -- Declaration. record Sigma (A : Set) (B : A → Set) : Set -- Definition. record Sigma A B where constructor _,_ field fst : A snd : B fst ``` When making separated declarations/definitions private or abstract you should attach the `private` keyword to the declaration and the `abstract` keyword to the definition. For instance, a private, abstract function can be defined as ```agda private f : A abstract f = e ``` Finally it may be worth noting that the old style of mutually recursive definitions is still supported (it basically desugars into the new style). * Pattern matching lambdas. Anonymous pattern matching functions can be defined using the syntax ``` \ { p11 .. p1n -> e1 ; ... ; pm1 .. pmn -> em } ``` (where, as usual, `\` and `->` can be replaced by `λ` and `→`). Internally this is translated into a function definition of the following form: ``` .extlam p11 .. p1n = e1 ... .extlam pm1 .. pmn = em ``` This means that anonymous pattern matching functions are generative. For instance, `refl` will not be accepted as an inhabitant of the type ```agda (λ { true → true ; false → false }) ≡ (λ { true → true ; false → false }), ``` because this is equivalent to `extlam1 ≡ extlam2` for some distinct fresh names `extlam1` and `extlam2`. Currently the `where` and `with` constructions are not allowed in (the top-level clauses of) anonymous pattern matching functions. Examples: ```agda and : Bool → Bool → Bool and = λ { true x → x ; false _ → false } xor : Bool → Bool → Bool xor = λ { true true → false ; false false → false ; _ _ → true } fst : {A : Set} {B : A → Set} → Σ A B → A fst = λ { (a , b) → a } snd : {A : Set} {B : A → Set} (p : Σ A B) → B (fst p) snd = λ { (a , b) → b } ``` * Record update syntax. Assume that we have a record type and a corresponding value: ```agda record MyRecord : Set where field a b c : ℕ old : MyRecord old = record { a = 1; b = 2; c = 3 } ``` Then we can update (some of) the record value's fields in the following way: ```agda new : MyRecord new = record old { a = 0; c = 5 } ``` Here new normalises to `record { a = 0; b = 2; c = 5 }`. Any expression yielding a value of type `MyRecord` can be used instead of old. Record updating is not allowed to change types: the resulting value must have the same type as the original one, including the record parameters. Thus, the type of a record update can be inferred if the type of the original record can be inferred. The record update syntax is expanded before type checking. When the expression ```agda record old { upd-fields } ``` is checked against a record type `R`, it is expanded to ```agda let r = old in record { new-fields }, ``` where old is required to have type `R` and new-fields is defined as follows: for each field `x` in `R`, - if `x = e` is contained in `upd-fields` then `x = e` is included in `new-fields`, and otherwise - if `x` is an explicit field then `x = R.x r` is included in `new-fields`, and - if `x` is an implicit or instance field, then it is omitted from `new-fields`. (Instance arguments are explained below.) The reason for treating implicit and instance fields specially is to allow code like the following: ```agda record R : Set where field {length} : ℕ vec : Vec ℕ length -- More fields… xs : R xs = record { vec = 0 ∷ 1 ∷ 2 ∷ [] } ys = record xs { vec = 0 ∷ [] } ``` Without the special treatment the last expression would need to include a new binding for length (for instance `length = _`). * Record patterns which do not contain data type patterns, but which do contain dot patterns, are no longer rejected. * When the `--without-K` flag is used literals are now treated as constructors. * Under-applied functions can now reduce. Consider the following definition: ```agda id : {A : Set} → A → A id x = x ``` Previously the expression `id` would not reduce. This has been changed so that it now reduces to `λ x → x`. Usually this makes little difference, but it can be important in conjunction with `with`. See Issue [#365](https://github.com/agda/agda/issues/365) for an example. * Unused AgdaLight legacy syntax `(x y : A; z v : B)` for telescopes has been removed. ### Universe polymorphism * Universe polymorphism is now enabled by default. Use `--no-universe-polymorphism` to disable it. * Universe levels are no longer defined as a data type. The basic level combinators can be introduced in the following way: ```agda postulate Level : Set zero : Level suc : Level → Level max : Level → Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX max #-} ``` * The BUILTIN equality is now required to be universe-polymorphic. * `trustMe` is now universe-polymorphic. ### Meta-variables and unification * Unsolved meta-variables are now frozen after every mutual block. This means that they cannot be instantiated by subsequent code. For instance, ```agda one : Nat one = _ bla : one ≡ suc zero bla = refl ``` leads to an error now, whereas previously it lead to the instantiation of `_` with `suc zero`. If you want to make use of the old behaviour, put the two definitions in a mutual block. All meta-variables are unfrozen during interactive editing, so that the user can fill holes interactively. Note that type-checking of interactively given terms is not perfect: Agda sometimes refuses to load a file, even though no complaints were raised during the interactive construction of the file. This is because certain checks (for instance, positivity) are only invoked when a file is loaded. * Record types can now be inferred. If there is a unique known record type with fields matching the fields in a record expression, then the type of the expression will be inferred to be the record type applied to unknown parameters. If there is no known record type with the given fields the type checker will give an error instead of producing lots of unsolved meta-variables. Note that "known record type" refers to any record type in any imported module, not just types which are in scope. * The occurrence checker distinguishes rigid and strongly rigid occurrences [Reed, LFMTP 2009; Abel & Pientka, TLCA 2011]. The completeness checker now accepts the following code: ```agda h : (n : Nat) → n ≡ suc n → Nat h n () ``` Internally this generates a constraint `_n = suc _n` where the meta-variable `_n` occurs strongly rigidly, i.e. on a constructor path from the root, in its own defining term tree. This is never solvable. Weakly rigid recursive occurrences may have a solution [Jason Reed's PhD thesis, page 106]: ```agda test : (k : Nat) → let X : (Nat → Nat) → Nat X = _ in (f : Nat → Nat) → X f ≡ suc (f (X (λ x → k))) test k f = refl ``` The constraint `_X k f = suc (f (_X k (λ x → k)))` has the solution `_X k f = suc (f (suc k))`, despite the recursive occurrence of `_X`. Here `_X` is not strongly rigid, because it occurs under the bound variable `f`. Previously Agda rejected this code; now it instead complains about an unsolved meta-variable. * Equation constraints involving the same meta-variable in the head now trigger pruning [Pientka, PhD, Sec. 3.1.2; Abel & Pientka, TLCA 2011]. Example: ```agda same : let X : A → A → A → A × A X = _ in {x y z : A} → X x y y ≡ (x , y) × X x x y ≡ X x y y same = refl , refl ``` The second equation implies that `X` cannot depend on its second argument. After pruning the first equation is linear and can be solved. * Instance arguments. A new type of hidden function arguments has been added: instance arguments. This new feature is based on influences from Scala's implicits and Agda's existing implicit arguments. Plain implicit arguments are marked by single braces: `{…}`. Instance arguments are instead marked by double braces: `{{…}}`. Example: ```agda postulate A : Set B : A → Set a : A f : {{a : A}} → B a ``` Instead of the double braces you can use the symbols `⦃` and `⦄`, but these symbols must in many cases be surrounded by whitespace. (If you are using Emacs and the Agda input method, then you can conjure up the symbols by typing `\{{` and `\}}`, respectively.) Instance arguments behave as ordinary implicit arguments, except for one important aspect: resolution of arguments which are not provided explicitly. For instance, consider the following code: ```agda test = f ``` Here Agda will notice that `f`'s instance argument was not provided explicitly, and try to infer it. All definitions in scope at `f`'s call site, as well as all variables in the context, are considered. If exactly one of these names has the required type `A`, then the instance argument will be instantiated to this name. This feature can be used as an alternative to Haskell type classes. If we define ```agda record Eq (A : Set) : Set where field equal : A → A → Bool, ``` then we can define the following projection: ```agda equal : {A : Set} {{eq : Eq A}} → A → A → Bool equal {{eq}} = Eq.equal eq ``` Now consider the following expression: ```agda equal false false ∨ equal 3 4 ``` If the following `Eq` "instances" for `Bool` and `ℕ` are in scope, and no others, then the expression is accepted: ```agda eq-Bool : Eq Bool eq-Bool = record { equal = … } eq-ℕ : Eq ℕ eq-ℕ = record { equal = … } ``` A shorthand notation is provided to avoid the need to define projection functions manually: ```agda module Eq-with-implicits = Eq {{...}} ``` This notation creates a variant of `Eq`'s record module, where the main `Eq` argument is an instance argument instead of an explicit one. It is equivalent to the following definition: ```agda module Eq-with-implicits {A : Set} {{eq : Eq A}} = Eq eq ``` Note that the short-hand notation allows you to avoid naming the "-with-implicits" module: ```agda open Eq {{...}} ``` Instance argument resolution is not recursive. As an example, consider the following "parametrised instance": ```agda eq-List : {A : Set} → Eq A → Eq (List A) eq-List {A} eq = record { equal = eq-List-A } where eq-List-A : List A → List A → Bool eq-List-A [] [] = true eq-List-A (a ∷ as) (b ∷ bs) = equal a b ∧ eq-List-A as bs eq-List-A _ _ = false ``` Assume that the only `Eq` instances in scope are `eq-List` and `eq-ℕ`. Then the following code does not type-check: ```agda test = equal (1 ∷ 2 ∷ []) (3 ∷ 4 ∷ []) ``` However, we can make the code work by constructing a suitable instance manually: ```agda test′ = equal (1 ∷ 2 ∷ []) (3 ∷ 4 ∷ []) where eq-List-ℕ = eq-List eq-ℕ ``` By restricting the "instance search" to be non-recursive we avoid introducing a new, compile-time-only evaluation model to Agda. For more information about instance arguments, see Devriese & Piessens [ICFP 2011]. Some examples are also available in the examples/instance-arguments subdirectory of the Agda distribution. ### Irrelevance * Dependent irrelevant function types. Some examples illustrating the syntax of dependent irrelevant function types: ``` .(x y : A) → B .{x y z : A} → B ∀ x .y → B ∀ x .{y} {z} .v → B ``` The declaration ``` f : .(x : A) → B[x] f x = t[x] ``` requires that `x` is irrelevant both in `t[x]` and in `B[x]`. This is possible if, for instance, `B[x] = B′ x`, with `B′ : .A → Set`. Dependent irrelevance allows us to define the eliminator for the `Squash` type: ```agda record Squash (A : Set) : Set where constructor squash field .proof : A elim-Squash : {A : Set} (P : Squash A → Set) (ih : .(a : A) → P (squash a)) → (a⁻ : Squash A) → P a⁻ elim-Squash P ih (squash a) = ih a ``` Note that this would not type-check with ```agda (ih : (a : A) -> P (squash a)). ``` * Records with only irrelevant fields. The following now works: ```agda record IsEquivalence {A : Set} (_≈_ : A → A → Set) : Set where field .refl : Reflexive _≈_ .sym : Symmetric _≈_ .trans : Transitive _≈_ record Setoid : Set₁ where infix 4 _≈_ field Carrier : Set _≈_ : Carrier → Carrier → Set .isEquivalence : IsEquivalence _≈_ open IsEquivalence isEquivalence public ``` Previously Agda complained about the application `IsEquivalence isEquivalence`, because `isEquivalence` is irrelevant and the `IsEquivalence` module expected a relevant argument. Now, when record modules are generated for records consisting solely of irrelevant arguments, the record parameter is made irrelevant: ```agda module IsEquivalence {A : Set} {_≈_ : A → A → Set} .(r : IsEquivalence {A = A} _≈_) where … ``` * Irrelevant things are no longer erased internally. This means that they are printed as ordinary terms, not as `_` as before. * The new flag `--experimental-irrelevance` enables irrelevant universe levels and matching on irrelevant data when only one constructor is available. These features are very experimental and likely to change or disappear. ### Reflection * The reflection API has been extended to mirror features like irrelevance, instance arguments and universe polymorphism, and to give (limited) access to definitions. For completeness all the builtins and primitives are listed below: ```agda -- Names. postulate Name : Set {-# BUILTIN QNAME Name #-} primitive -- Equality of names. primQNameEquality : Name → Name → Bool -- Is the argument visible (explicit), hidden (implicit), or an -- instance argument? data Visibility : Set where visible hidden instance : Visibility {-# BUILTIN HIDING Visibility #-} {-# BUILTIN VISIBLE visible #-} {-# BUILTIN HIDDEN hidden #-} {-# BUILTIN INSTANCE instance #-} -- Arguments can be relevant or irrelevant. data Relevance : Set where relevant irrelevant : Relevance {-# BUILTIN RELEVANCE Relevance #-} {-# BUILTIN RELEVANT relevant #-} {-# BUILTIN IRRELEVANT irrelevant #-} -- Arguments. data Arg A : Set where arg : (v : Visibility) (r : Relevance) (x : A) → Arg A {-# BUILTIN ARG Arg #-} {-# BUILTIN ARGARG arg #-} -- Terms. mutual data Term : Set where -- Variable applied to arguments. var : (x : ℕ) (args : List (Arg Term)) → Term -- Constructor applied to arguments. con : (c : Name) (args : List (Arg Term)) → Term -- Identifier applied to arguments. def : (f : Name) (args : List (Arg Term)) → Term -- Different kinds of λ-abstraction. lam : (v : Visibility) (t : Term) → Term -- Pi-type. pi : (t₁ : Arg Type) (t₂ : Type) → Term -- A sort. sort : Sort → Term -- Anything else. unknown : Term data Type : Set where el : (s : Sort) (t : Term) → Type data Sort : Set where -- A Set of a given (possibly neutral) level. set : (t : Term) → Sort -- A Set of a given concrete level. lit : (n : ℕ) → Sort -- Anything else. unknown : Sort {-# BUILTIN AGDASORT Sort #-} {-# BUILTIN AGDATYPE Type #-} {-# BUILTIN AGDATERM Term #-} {-# BUILTIN AGDATERMVAR var #-} {-# BUILTIN AGDATERMCON con #-} {-# BUILTIN AGDATERMDEF def #-} {-# BUILTIN AGDATERMLAM lam #-} {-# BUILTIN AGDATERMPI pi #-} {-# BUILTIN AGDATERMSORT sort #-} {-# BUILTIN AGDATERMUNSUPPORTED unknown #-} {-# BUILTIN AGDATYPEEL el #-} {-# BUILTIN AGDASORTSET set #-} {-# BUILTIN AGDASORTLIT lit #-} {-# BUILTIN AGDASORTUNSUPPORTED unknown #-} postulate -- Function definition. Function : Set -- Data type definition. Data-type : Set -- Record type definition. Record : Set {-# BUILTIN AGDAFUNDEF Function #-} {-# BUILTIN AGDADATADEF Data-type #-} {-# BUILTIN AGDARECORDDEF Record #-} -- Definitions. data Definition : Set where function : Function → Definition data-type : Data-type → Definition record′ : Record → Definition constructor′ : Definition axiom : Definition primitive′ : Definition {-# BUILTIN AGDADEFINITION Definition #-} {-# BUILTIN AGDADEFINITIONFUNDEF function #-} {-# BUILTIN AGDADEFINITIONDATADEF data-type #-} {-# BUILTIN AGDADEFINITIONRECORDDEF record′ #-} {-# BUILTIN AGDADEFINITIONDATACONSTRUCTOR constructor′ #-} {-# BUILTIN AGDADEFINITIONPOSTULATE axiom #-} {-# BUILTIN AGDADEFINITIONPRIMITIVE primitive′ #-} primitive -- The type of the thing with the given name. primQNameType : Name → Type -- The definition of the thing with the given name. primQNameDefinition : Name → Definition -- The constructors of the given data type. primDataConstructors : Data-type → List Name ``` As an example the expression ```agda primQNameType (quote zero) ``` is definitionally equal to ```agda el (lit 0) (def (quote ℕ) []) ``` (if `zero` is a constructor of the data type `ℕ`). * New keyword: `unquote`. The construction `unquote t` converts a representation of an Agda term to actual Agda code in the following way: 1. The argument `t` must have type `Term` (see the reflection API above). 2. The argument is normalised. 3. The entire construction is replaced by the normal form, which is treated as syntax written by the user and type-checked in the usual way. Examples: ```agda test : unquote (def (quote ℕ) []) ≡ ℕ test = refl id : (A : Set) → A → A id = unquote (lam visible (lam visible (var 0 []))) id-ok : id ≡ (λ A (x : A) → x) id-ok = refl ``` * New keyword: `quoteTerm`. The construction `quoteTerm t` is similar to `quote n`, but whereas `quote` is restricted to names `n`, `quoteTerm` accepts terms `t`. The construction is handled in the following way: 1. The type of `t` is inferred. The term `t` must be type-correct. 2. The term `t` is normalised. 3. The construction is replaced by the Term representation (see the reflection API above) of the normal form. Any unsolved metavariables in the term are represented by the `unknown` term constructor. Examples: ```agda test₁ : quoteTerm (λ {A : Set} (x : A) → x) ≡ lam hidden (lam visible (var 0 [])) test₁ = refl -- Local variables are represented as de Bruijn indices. test₂ : (λ {A : Set} (x : A) → quoteTerm x) ≡ (λ x → var 0 []) test₂ = refl -- Terms are normalised before being quoted. test₃ : quoteTerm (0 + 0) ≡ con (quote zero) [] test₃ = refl ``` Compiler backends ----------------- ### MAlonzo * The MAlonzo backend's FFI now handles universe polymorphism in a better way. The translation of Agda types and kinds into Haskell now supports universe-polymorphic postulates. The core changes are that the translation of function types has been changed from ``` T[[ Pi (x : A) B ]] = if A has a Haskell kind then forall x. () -> T[[ B ]] else if x in fv B then undef else T[[ A ]] -> T[[ B ]] ``` into ``` T[[ Pi (x : A) B ]] = if x in fv B then forall x. T[[ A ]] -> T[[ B ]] -- Note: T[[A]] not Unit. else T[[ A ]] -> T[[ B ]], ``` and that the translation of constants (postulates, constructors and literals) has been changed from ``` T[[ k As ]] = if COMPILED_TYPE k T then T T[[ As ]] else undef ``` into ``` T[[ k As ]] = if COMPILED_TYPE k T then T T[[ As ]] else if COMPILED k E then () else undef. ``` For instance, assuming a Haskell definition ```haskell type AgdaIO a b = IO b, ``` we can set up universe-polymorphic `IO` in the following way: ```agda postulate IO : ∀ {ℓ} → Set ℓ → Set ℓ return : ∀ {a} {A : Set a} → A → IO A _>>=_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → (A → IO B) → IO B {-# COMPILED_TYPE IO AgdaIO #-} {-# COMPILED return (\_ _ -> return) #-} {-# COMPILED _>>=_ (\_ _ _ _ -> (>>=)) #-} ``` This is accepted because (assuming that the universe level type is translated to the Haskell unit type `()`) ```haskell (\_ _ -> return) : forall a. () -> forall b. () -> b -> AgdaIO a b = T [[ ∀ {a} {A : Set a} → A → IO A ]] ``` and ```haskell (\_ _ _ _ -> (>>=)) : forall a. () -> forall b. () -> forall c. () -> forall d. () -> AgdaIO a c -> (c -> AgdaIO b d) -> AgdaIO b d = T [[ ∀ {a b} {A : Set a} {B : Set b} → IO A → (A → IO B) → IO B ]]. ``` ### Epic * New Epic backend pragma: `STATIC`. In the Epic backend, functions marked with the `STATIC` pragma will be normalised before compilation. Example usage: ``` {-# STATIC power #-} power : ℕ → ℕ → ℕ power 0 x = 1 power 1 x = x power (suc n) x = power n x * x ``` Occurrences of `power 4 x` will be replaced by `((x * x) * x) * x`. * Some new optimisations have been implemented in the Epic backend: - Removal of unused arguments. A worker/wrapper transformation is performed so that unused arguments can be removed by Epic's inliner. For instance, the map function is transformed in the following way: ```agda map_wrap : (A B : Set) → (A → B) → List A → List B map_wrap A B f xs = map_work f xs map_work f [] = [] map_work f (x ∷ xs) = f x ∷ map_work f xs ``` If `map_wrap` is inlined (which it will be in any saturated call), then `A` and `B` disappear in the generated code. Unused arguments are found using abstract interpretation. The bodies of all functions in a module are inspected to decide which variables are used. The behaviour of postulates is approximated based on their types. Consider `return`, for instance: ```agda postulate return : {A : Set} → A → IO A ``` The first argument of `return` can be removed, because it is of type Set and thus cannot affect the outcome of a program at runtime. - Injection detection. At runtime many functions may turn out to be inefficient variants of the identity function. This is especially true after forcing. Injection detection replaces some of these functions with more efficient versions. Example: ```agda inject : {n : ℕ} → Fin n → Fin (1 + n) inject {suc n} zero = zero inject {suc n} (suc i) = suc (inject {n} i) ``` Forcing removes the `Fin` constructors' `ℕ` arguments, so this function is an inefficient identity function that can be replaced by the following one: ```agda inject {_} x = x ``` To actually find this function, we make the induction hypothesis that inject is an identity function in its second argument and look at the branches of the function to decide if this holds. Injection detection also works over data type barriers. Example: ```agda forget : {A : Set} {n : ℕ} → Vec A n → List A forget [] = [] forget (x ∷ xs) = x ∷ forget xs ``` Given that the constructor tags (in the compiled Epic code) for `Vec.[]` and `List.[]` are the same, and that the tags for `Vec._∷_` and `List._∷_` are also the same, this is also an identity function. We can hence replace the definition with the following one: ```agda forget {_} xs = xs ``` To get this to apply as often as possible, constructor tags are chosen *after* injection detection has been run, in a way to make as many functions as possible injections. Constructor tags are chosen once per source file, so it may be advantageous to define conversion functions like forget in the same module as one of the data types. For instance, if `Vec.agda` imports `List.agda`, then the forget function should be put in `Vec.agda` to ensure that vectors and lists get the same tags (unless some other injection function, which puts different constraints on the tags, is prioritised). - Smashing. This optimisation finds types whose values are inferable at runtime: * A data type with only one constructor where all fields are inferable is itself inferable. * `Set ℓ` is inferable (as it has no runtime representation). A function returning an inferable data type can be smashed, which means that it is replaced by a function which simply returns the inferred value. An important example of an inferable type is the usual propositional equality type (`_≡_`). Any function returning a propositional equality can simply return the reflexivity constructor directly without computing anything. This optimisation makes more arguments unused. It also makes the Epic code size smaller, which in turn speeds up compilation. ### JavaScript * ECMAScript compiler backend. A new compiler backend is being implemented, targetting ECMAScript (also known as JavaScript), with the goal of allowing Agda programs to be run in browsers or other ECMAScript environments. The backend is still at an experimental stage: the core language is implemented, but many features are still missing. The ECMAScript compiler can be invoked from the command line using the flag `--js`: ``` agda --js --compile-dir= .agda ``` Each source `.agda` is compiled into an ECMAScript target `/jAgda..js`. The compiler can also be invoked using the Emacs mode (the variable `agda2-backend` controls which backend is used). Note that ECMAScript is a strict rather than lazy language. Since Agda programs are total, this should not impact program semantics, but it may impact their space or time usage. ECMAScript does not support algebraic datatypes or pattern-matching. These features are translated to a use of the visitor pattern. For instance, the standard library's `List` data type and `null` function are translated into the following code: ```javascript exports["List"] = {}; exports["List"]["[]"] = function (x0) { return x0["[]"](); }; exports["List"]["_∷_"] = function (x0) { return function (x1) { return function (x2) { return x2["_∷_"](x0, x1); }; }; }; exports["null"] = function (x0) { return function (x1) { return function (x2) { return x2({ "[]": function () { return jAgda_Data_Bool["Bool"]["true"]; }, "_∷_": function (x3, x4) { return jAgda_Data_Bool["Bool"]["false"]; } }); }; }; }; ``` Agda records are translated to ECMAScript objects, preserving field names. Top-level Agda modules are translated to ECMAScript modules, following the `common.js` module specification. A top-level Agda module `Foo.Bar` is translated to an ECMAScript module `jAgda.Foo.Bar`. The ECMAScript compiler does not compile to Haskell, so the pragmas related to the Haskell FFI (`IMPORT`, `COMPILED_DATA` and `COMPILED`) are not used by the ECMAScript backend. Instead, there is a `COMPILED_JS` pragma which may be applied to any declaration. For postulates, primitives, functions and values, it gives the ECMAScript code to be emitted by the compiler. For data types, it gives a function which is applied to a value of that type, and a visitor object. For instance, a binding of natural numbers to ECMAScript integers (ignoring overflow errors) is: ```agda data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# COMPILED_JS ℕ function (x,v) { if (x < 1) { return v.zero(); } else { return v.suc(x-1); } } #-} {-# COMPILED_JS zero 0 #-} {-# COMPILED_JS suc function (x) { return x+1; } #-} _+_ : ℕ → ℕ → ℕ zero + n = n suc m + n = suc (m + n) {-# COMPILED_JS _+_ function (x) { return function (y) { return x+y; }; } #-} ``` To allow FFI code to be optimised, the ECMAScript in a `COMPILED_JS` declaration is parsed, using a simple parser that recognises a pure functional subset of ECMAScript, consisting of functions, function applications, return, if-statements, if-expressions, side-effect-free binary operators (no precedence, left associative), side-effect-free prefix operators, objects (where all member names are quoted), field accesses, and string and integer literals. Modules may be imported using the require (``) syntax: any impure code, or code outside the supported fragment, can be placed in a module and imported. Tools ----- * New flag `--safe`, which can be used to type-check untrusted code. This flag disables postulates, `primTrustMe`, and "unsafe" OPTION pragmas, some of which are known to make Agda inconsistent. Rejected pragmas: ``` --allow-unsolved-metas --experimental-irrelevance --guardedness-preserving-type-construtors --injective-type-constructors --no-coverage-check --no-positivity-check --no-termination-check --sized-types --type-in-type ``` Note that, at the moment, it is not possible to define the universe level or coinduction primitives when `--safe` is used (because they must be introduced as postulates). This can be worked around by type-checking trusted files in a first pass, without using `--safe`, and then using `--saf`e in a second pass. Modules which have already been type-checked are not re-type-checked just because `--safe` is used. * Dependency graphs. The new flag `--dependency-graph=FILE` can be used to generate a DOT file containing a module dependency graph. The generated file (FILE) can be rendered using a tool like dot. * The `--no-unreachable-check` flag has been removed. * Projection functions are highlighted as functions instead of as fields. Field names (in record definitions and record values) are still highlighted as fields. * Support for jumping to positions mentioned in the information buffer has been added. * The `make install` command no longer installs Agda globally (by default). Release notes for Agda 2 version 2.2.10 ======================================= Language -------- * New flag: `--without-K`. This flag makes pattern matching more restricted. If the flag is activated, then Agda only accepts certain case-splits. If the type of the variable to be split is `D pars ixs`, where `D` is a data (or record) type, pars stands for the parameters, and `ixs` the indices, then the following requirements must be satisfied: - The indices `ixs` must be applications of constructors to distinct variables. - These variables must not be free in pars. The intended purpose of `--without-K` is to enable experiments with a propositional equality without the K rule. Let us define propositional equality as follows: ```agda data _≡_ {A : Set} : A → A → Set where refl : ∀ x → x ≡ x ``` Then the obvious implementation of the J rule is accepted: ```agda J : {A : Set} (P : {x y : A} → x ≡ y → Set) → (∀ x → P (refl x)) → ∀ {x y} (x≡y : x ≡ y) → P x≡y J P p (refl x) = p x ``` The same applies to Christine Paulin-Mohring's version of the J rule: ```agda J′ : {A : Set} {x : A} (P : {y : A} → x ≡ y → Set) → P (refl x) → ∀ {y} (x≡y : x ≡ y) → P x≡y J′ P p (refl x) = p ``` On the other hand, the obvious implementation of the K rule is not accepted: ```agda K : {A : Set} (P : {x : A} → x ≡ x → Set) → (∀ x → P (refl x)) → ∀ {x} (x≡x : x ≡ x) → P x≡x K P p (refl x) = p x ``` However, we have *not* proved that activation of `--without-K` ensures that the K rule cannot be proved in some other way. * Irrelevant declarations. Postulates and functions can be marked as irrelevant by prefixing the name with a dot when the name is declared. Example: ```agda postulate .irrelevant : {A : Set} → .A → A ``` Irrelevant names may only be used in irrelevant positions or in definitions of things which have been declared irrelevant. The axiom irrelevant above can be used to define a projection from an irrelevant record field: ```agda data Subset (A : Set) (P : A → Set) : Set where _#_ : (a : A) → .(P a) → Subset A P elem : ∀ {A P} → Subset A P → A elem (a # p) = a .certificate : ∀ {A P} (x : Subset A P) → P (elem x) certificate (a # p) = irrelevant p ``` The right-hand side of certificate is relevant, so we cannot define ```agda certificate (a # p) = p ``` (because `p` is irrelevant). However, certificate is declared to be irrelevant, so it can use the axiom irrelevant. Furthermore the first argument of the axiom is irrelevant, which means that irrelevant `p` is well-formed. As shown above the axiom irrelevant justifies irrelevant projections. Previously no projections were generated for irrelevant record fields, such as the field certificate in the following record type: ```agda record Subset (A : Set) (P : A → Set) : Set where constructor _#_ field elem : A .certificate : P elem ``` Now projections are generated automatically for irrelevant fields (unless the flag `--no-irrelevant-projections` is used). Note that irrelevant projections are highly experimental. * Termination checker recognises projections. Projections now preserve sizes, both in patterns and expressions. Example: ```agda record Wrap (A : Set) : Set where constructor wrap field unwrap : A open Wrap public data WNat : Set where zero : WNat suc : Wrap WNat → WNat id : WNat → WNat id zero = zero id (suc w) = suc (wrap (id (unwrap w))) ``` In the structural ordering `unwrap w` ≤ `w`. This means that ```agda unwrap w ≤ w < suc w, ``` and hence the recursive call to id is accepted. Projections also preserve guardedness. Tools ----- * Hyperlinks for top-level module names now point to the start of the module rather than to the declaration of the module name. This applies both to the Emacs mode and to the output of `agda --html`. * Most occurrences of record field names are now highlighted as "fields". Previously many occurrences were highlighted as "functions". * Emacs mode: It is no longer possible to change the behaviour of the `TAB` key by customising `agda2-indentation`. * Epic compiler backend. A new compiler backend is being implemented. This backend makes use of Edwin Brady's language Epic (http://www.cs.st-andrews.ac.uk/~eb/epic.php) and its compiler. The backend should handle most Agda code, but is still at an experimental stage: more testing is needed, and some things written below may not be entirely true. The Epic compiler can be invoked from the command line using the flag `--epic`: ``` agda --epic --epic-flag= --compile-dir= .agda ``` The `--epic-flag` flag can be given multiple times; each flag is given verbatim to the Epic compiler (in the given order). The resulting executable is named after the main module and placed in the directory specified by the `--compile-dir` flag (default: the project root). Intermediate files are placed in a subdirectory called `Epic`. The backend requires that there is a definition named main. This definition should be a value of type `IO Unit`, but at the moment this is not checked (so it is easy to produce a program which segfaults). Currently the backend represents actions of type `IO A` as functions from `Unit` to `A`, and main is applied to the unit value. The Epic compiler compiles via C, not Haskell, so the pragmas related to the Haskell FFI (`IMPORT`, `COMPILED_DATA` and `COMPILED`) are not used by the Epic backend. Instead there is a new pragma `COMPILED_EPIC`. This pragma is used to give Epic code for postulated definitions (Epic code can in turn call C code). The form of the pragma is `{-# COMPILED_EPIC def code #-}`, where `def` is the name of an Agda postulate and `code` is some Epic code which should include the function arguments, return type and function body. As an example the `IO` monad can be defined as follows: ```agda postulate IO : Set → Set return : ∀ {A} → A → IO A _>>=_ : ∀ {A B} → IO A → (A → IO B) → IO B {-# COMPILED_EPIC return (u : Unit, a : Any) -> Any = ioreturn(a) #-} {-# COMPILED_EPIC _>>=_ (u1 : Unit, u2 : Unit, x : Any, f : Any) -> Any = iobind(x,f) #-} ``` Here `ioreturn` and `iobind` are Epic functions which are defined in the file `AgdaPrelude.e` which is always included. By default the backend will remove so-called forced constructor arguments (and case-splitting on forced variables will be rewritten). This optimisation can be disabled by using the flag `--no-forcing`. All data types which look like unary natural numbers after forced constructor arguments have been removed (i.e. types with two constructors, one nullary and one with a single recursive argument) will be represented as "BigInts". This applies to the standard `Fin` type, for instance. The backend supports Agda's primitive functions and the BUILTIN pragmas. If the BUILTIN pragmas for unary natural numbers are used, then some operations, like addition and multiplication, will use more efficient "BigInt" operations. If you want to make use of the Epic backend you need to install some dependencies, see the README. * The Emacs mode can compile using either the MAlonzo or the Epic backend. The variable `agda2-backend` controls which backend is used. Release notes for Agda 2 version 2.2.8 ====================================== Language -------- * Record pattern matching. It is now possible to pattern match on named record constructors. Example: ```agda record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ map : {A B : Set} {P : A → Set} {Q : B → Set} (f : A → B) → (∀ {x} → P x → Q (f x)) → Σ A P → Σ B Q map f g (x , y) = (f x , g y) ``` The clause above is internally translated into the following one: ```agda map f g p = (f (Σ.proj₁ p) , g (Σ.proj₂ p)) ``` Record patterns containing data type patterns are not translated. Example: ```agda add : ℕ × ℕ → ℕ add (zero , n) = n add (suc m , n) = suc (add (m , n)) ``` Record patterns which do not contain data type patterns, but which do contain dot patterns, are currently rejected. Example: ```agda Foo : {A : Set} (p₁ p₂ : A × A) → proj₁ p₁ ≡ proj₁ p₂ → Set₁ Foo (x , y) (.x , y′) refl = Set ``` * Proof irrelevant function types. Agda now supports irrelevant non-dependent function types: ```agda f : .A → B ``` This type implies that `f` does not depend computationally on its argument. One intended use case is data structures with embedded proofs, like sorted lists: ```agda postulate _≤_ : ℕ → ℕ → Set p₁ : 0 ≤ 1 p₂ : 0 ≤ 1 data SList (bound : ℕ) : Set where [] : SList bound scons : (head : ℕ) → .(head ≤ bound) → (tail : SList head) → SList bound ``` The effect of the irrelevant type in the signature of `scons` is that `scons`'s second argument is never inspected after Agda has ensured that it has the right type. It is even thrown away, leading to smaller term sizes and hopefully some gain in efficiency. The type-checker ignores irrelevant arguments when checking equality, so two lists can be equal even if they contain different proofs: ```agda l₁ : SList 1 l₁ = scons 0 p₁ [] l₂ : SList 1 l₂ = scons 0 p₂ [] l₁≡l₂ : l₁ ≡ l₂ l₁≡l₂ = refl ``` Irrelevant arguments can only be used in irrelevant contexts. Consider the following subset type: ```agda data Subset (A : Set) (P : A → Set) : Set where _#_ : (elem : A) → .(P elem) → Subset A P ``` The following two uses are fine: ```agda elimSubset : ∀ {A C : Set} {P} → Subset A P → ((a : A) → .(P a) → C) → C elimSubset (a # p) k = k a p elem : {A : Set} {P : A → Set} → Subset A P → A elem (x # p) = x ``` However, if we try to project out the proof component, then Agda complains that `variable p is declared irrelevant, so it cannot be used here`: ```agda prjProof : ∀ {A P} (x : Subset A P) → P (elem x) prjProof (a # p) = p ``` Matching against irrelevant arguments is also forbidden, except in the case of irrefutable matches (record constructor patterns which have been translated away). For instance, the match against the pattern `(p , q)` here is accepted: ```agda elim₂ : ∀ {A C : Set} {P Q : A → Set} → Subset A (λ x → Σ (P x) (λ _ → Q x)) → ((a : A) → .(P a) → .(Q a) → C) → C elim₂ (a # (p , q)) k = k a p q ``` Absurd matches `()` are also allowed. Note that record fields can also be irrelevant. Example: ```agda record Subset (A : Set) (P : A → Set) : Set where constructor _#_ field elem : A .proof : P elem ``` Irrelevant fields are never in scope, neither inside nor outside the record. This means that no record field can depend on an irrelevant field, and furthermore projections are not defined for such fields. Irrelevant fields can only be accessed using pattern matching, as in `elimSubset` above. Irrelevant function types were added very recently, and have not been subjected to much experimentation yet, so do not be surprised if something is changed before the next release. For instance, dependent irrelevant function spaces (`.(x : A) → B`) might be added in the future. * Mixfix binders. It is now possible to declare user-defined syntax that binds identifiers. Example: ```agda postulate State : Set → Set → Set put : ∀ {S} → S → State S ⊤ get : ∀ {S} → State S S return : ∀ {A S} → A → State S A bind : ∀ {A B S} → State S B → (B → State S A) → State S A syntax bind e₁ (λ x → e₂) = x ← e₁ , e₂ increment : State ℕ ⊤ increment = x ← get , put (1 + x) ``` The syntax declaration for `bind` implies that `x` is in scope in `e₂`, but not in `e₁`. You can give fixity declarations along with syntax declarations: ```agda infixr 40 bind syntax bind e₁ (λ x → e₂) = x ← e₁ , e₂ ``` The fixity applies to the syntax, not the name; syntax declarations are also restricted to ordinary, non-operator names. The following declaration is disallowed: ```agda syntax _==_ x y = x === y ```agda Syntax declarations must also be linear; the following declaration is disallowed: ```agda syntax wrong x = x + x ``` Syntax declarations were added very recently, and have not been subjected to much experimentation yet, so do not be surprised if something is changed before the next release. * `Prop` has been removed from the language. The experimental sort `Prop` has been disabled. Any program using `Prop` should typecheck if `Prop` is replaced by `Set₀`. Note that `Prop` is still a keyword. * Injective type constructors off by default. Automatic injectivity of type constructors has been disabled (by default). To enable it, use the flag `--injective-type-constructors`, either on the command line or in an OPTIONS pragma. Note that this flag makes Agda anti-classical and possibly inconsistent: Agda with excluded middle is inconsistent http://thread.gmane.org/gmane.comp.lang.agda/1367 See `test/Succeed/InjectiveTypeConstructors.agda` for an example. * Termination checker can count. There is a new flag `--termination-depth=N` accepting values `N >= 1` (with `N = 1` being the default) which influences the behavior of the termination checker. So far, the termination checker has only distinguished three cases when comparing the argument of a recursive call with the formal parameter of the callee. `<`: the argument is structurally smaller than the parameter `=`: they are equal `?`: the argument is bigger or unrelated to the parameter This behavior, which is still the default (`N = 1`), will not recognise the following functions as terminating. ```agda mutual f : ℕ → ℕ f zero = zero f (suc zero) = zero f (suc (suc n)) = aux n aux : ℕ → ℕ aux m = f (suc m) ``` The call graph ``` f --(<)--> aux --(?)--> f ``` yields a recursive call from `f` to `f` via `aux` where the relation of call argument to callee parameter is computed as "unrelated" (composition of `<` and `?`). Setting `N >= 2` allows a finer analysis: `n` has two constructors less than `suc (suc n)`, and `suc m` has one more than `m`, so we get the call graph: ``` f --(-2)--> aux --(+1)--> f ``` The indirect call `f --> f` is now labeled with `(-1)`, and the termination checker can recognise that the call argument is decreasing on this path. Setting the termination depth to `N` means that the termination checker counts decrease up to `N` and increase up to `N-1`. The default, `N=1`, means that no increase is counted, every increase turns to "unrelated". In practice, examples like the one above sometimes arise when `with` is used. As an example, the program ```agda f : ℕ → ℕ f zero = zero f (suc zero) = zero f (suc (suc n)) with zero ... | _ = f (suc n) ``` is internally represented as ```agda mutual f : ℕ → ℕ f zero = zero f (suc zero) = zero f (suc (suc n)) = aux n zero aux : ℕ → ℕ → ℕ aux m k = f (suc m) ``` Thus, by default, the definition of `f` using `with` is not accepted by the termination checker, even though it looks structural (`suc n` is a subterm of `suc suc n`). Now, the termination checker is satisfied if the option `--termination-depth=2` is used. Caveats: - This is an experimental feature, hopefully being replaced by something smarter in the near future. - Increasing the termination depth will quickly lead to very long termination checking times. So, use with care. Setting termination depth to `100` by habit, just to be on the safe side, is not a good idea! - Increasing termination depth only makes sense for linear data types such as `ℕ` and `Size`. For other types, increase cannot be recognised. For instance, consider a similar example with lists. ```agda data List : Set where nil : List cons : ℕ → List → List mutual f : List → List f nil = nil f (cons x nil) = nil f (cons x (cons y ys)) = aux y ys aux : ℕ → List → List aux z zs = f (cons z zs) ``` Here the termination checker compares `cons z zs` to `z` and also to `zs`. In both cases, the result will be "unrelated", no matter how high we set the termination depth. This is because when comparing `cons z zs` to `zs`, for instance, `z` is unrelated to `zs`, thus, `cons z zs` is also unrelated to `zs`. We cannot say it is just "one larger" since `z` could be a very large term. Note that this points to a weakness of untyped termination checking. To regain the benefit of increased termination depth, we need to index our lists by a linear type such as `ℕ` or `Size`. With termination depth `2`, the above example is accepted for vectors instead of lists. * The `codata` keyword has been removed. To use coinduction, use the following new builtins: `INFINITY`, `SHARP` and `FLAT`. Example: ```agda {-# OPTIONS --universe-polymorphism #-} module Coinduction where open import Level infix 1000 ♯_ postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} ``` Note that (non-dependent) pattern matching on `SHARP` is no longer allowed. Note also that strange things might happen if you try to combine the pragmas above with `COMPILED_TYPE`, `COMPILED_DATA` or `COMPILED` pragmas, or if the pragmas do not occur right after the postulates. The compiler compiles the `INFINITY` builtin to nothing (more or less), so that the use of coinduction does not get in the way of FFI declarations: ```agda data Colist (A : Set) : Set where [] : Colist A _∷_ : (x : A) (xs : ∞ (Colist A)) → Colist A {-# COMPILED_DATA Colist [] [] (:) #-} ``` * Infinite types. If the new flag `--guardedness-preserving-type-constructors` is used, then type constructors are treated as inductive constructors when we check productivity (but only in parameters, and only if they are used strictly positively or not at all). This makes examples such as the following possible: ```agda data Rec (A : ∞ Set) : Set where fold : ♭ A → Rec A -- Σ cannot be a record type below. data Σ (A : Set) (B : A → Set) : Set where _,_ : (x : A) → B x → Σ A B syntax Σ A (λ x → B) = Σ[ x ∶ A ] B -- Corecursive definition of the W-type. W : (A : Set) → (A → Set) → Set W A B = Rec (♯ (Σ[ x ∶ A ] (B x → W A B))) syntax W A (λ x → B) = W[ x ∶ A ] B sup : {A : Set} {B : A → Set} (x : A) (f : B x → W A B) → W A B sup x f = fold (x , f) W-rec : {A : Set} {B : A → Set} (P : W A B → Set) → (∀ {x} {f : B x → W A B} → (∀ y → P (f y)) → P (sup x f)) → ∀ x → P x W-rec P h (fold (x , f)) = h (λ y → W-rec P h (f y)) -- Induction-recursion encoded as corecursion-recursion. data Label : Set where ′0 ′1 ′2 ′σ ′π ′w : Label mutual U : Set U = Σ Label U′ U′ : Label → Set U′ ′0 = ⊤ U′ ′1 = ⊤ U′ ′2 = ⊤ U′ ′σ = Rec (♯ (Σ[ a ∶ U ] (El a → U))) U′ ′π = Rec (♯ (Σ[ a ∶ U ] (El a → U))) U′ ′w = Rec (♯ (Σ[ a ∶ U ] (El a → U))) El : U → Set El (′0 , _) = ⊥ El (′1 , _) = ⊤ El (′2 , _) = Bool El (′σ , fold (a , b)) = Σ[ x ∶ El a ] El (b x) El (′π , fold (a , b)) = (x : El a) → El (b x) El (′w , fold (a , b)) = W[ x ∶ El a ] El (b x) U-rec : (P : ∀ u → El u → Set) → P (′1 , _) tt → P (′2 , _) true → P (′2 , _) false → (∀ {a b x y} → P a x → P (b x) y → P (′σ , fold (a , b)) (x , y)) → (∀ {a b f} → (∀ x → P (b x) (f x)) → P (′π , fold (a , b)) f) → (∀ {a b x f} → (∀ y → P (′w , fold (a , b)) (f y)) → P (′w , fold (a , b)) (sup x f)) → ∀ u (x : El u) → P u x U-rec P P1 P2t P2f Pσ Pπ Pw = rec where rec : ∀ u (x : El u) → P u x rec (′0 , _) () rec (′1 , _) _ = P1 rec (′2 , _) true = P2t rec (′2 , _) false = P2f rec (′σ , fold (a , b)) (x , y) = Pσ (rec _ x) (rec _ y) rec (′π , fold (a , b)) f = Pπ (λ x → rec _ (f x)) rec (′w , fold (a , b)) (fold (x , f)) = Pw (λ y → rec _ (f y)) ``` The `--guardedness-preserving-type-constructors` extension is based on a rather operational understanding of `∞`/`♯_`; it's not yet clear if this extension is consistent. * Qualified constructors. Constructors can now be referred to qualified by their data type. For instance, given ```agda data Nat : Set where zero : Nat suc : Nat → Nat data Fin : Nat → Set where zero : ∀ {n} → Fin (suc n) suc : ∀ {n} → Fin n → Fin (suc n) ``` you can refer to the constructors unambiguously as `Nat.zero`, `Nat.suc`, `Fin.zero`, and `Fin.suc` (`Nat` and `Fin` are modules containing the respective constructors). Example: ```agda inj : (n m : Nat) → Nat.suc n ≡ suc m → n ≡ m inj .m m refl = refl ``` Previously you had to write something like ```agda inj : (n m : Nat) → _≡_ {Nat} (suc n) (suc m) → n ≡ m ``` to make the type checker able to figure out that you wanted the natural number suc in this case. * Reflection. There are two new constructs for reflection: - `quoteGoal x in e` In `e` the value of `x` will be a representation of the goal type (the type expected of the whole expression) as an element in a datatype of Agda terms (see below). For instance, ```agda example : ℕ example = quoteGoal x in {! at this point x = def (quote ℕ) [] !} ``` - `quote x : Name` If `x` is the name of a definition (function, datatype, record, or a constructor), `quote x` gives you the representation of `x` as a value in the primitive type `Name` (see below). Quoted terms use the following BUILTINs and primitives (available from the standard library module `Reflection`): ```agda -- The type of Agda names. postulate Name : Set {-# BUILTIN QNAME Name #-} primitive primQNameEquality : Name → Name → Bool -- Arguments. Explicit? = Bool data Arg A : Set where arg : Explicit? → A → Arg A {-# BUILTIN ARG Arg #-} {-# BUILTIN ARGARG arg #-} -- The type of Agda terms. data Term : Set where var : ℕ → List (Arg Term) → Term con : Name → List (Arg Term) → Term def : Name → List (Arg Term) → Term lam : Explicit? → Term → Term pi : Arg Term → Term → Term sort : Term unknown : Term {-# BUILTIN AGDATERM Term #-} {-# BUILTIN AGDATERMVAR var #-} {-# BUILTIN AGDATERMCON con #-} {-# BUILTIN AGDATERMDEF def #-} {-# BUILTIN AGDATERMLAM lam #-} {-# BUILTIN AGDATERMPI pi #-} {-# BUILTIN AGDATERMSORT sort #-} {-# BUILTIN AGDATERMUNSUPPORTED unknown #-} ``` Reflection may be useful when working with internal decision procedures, such as the standard library's ring solver. * Minor record definition improvement. The definition of a record type is now available when type checking record module definitions. This means that you can define things like the following: ```agda record Cat : Set₁ where field Obj : Set _=>_ : Obj → Obj → Set -- ... -- not possible before: op : Cat op = record { Obj = Obj; _=>_ = λ A B → B => A } ``` Tools ----- * The `Goal type and context` command now shows the goal type before the context, and the context is shown in reverse order. The `Goal type, context and inferred type` command has been modified in a similar way. * Show module contents command. Given a module name `M` the Emacs mode can now display all the top-level modules and names inside `M`, along with types for the names. The command is activated using `C-c C-o` or the menus. * Auto command. A command which searches for type inhabitants has been added. The command is invoked by pressing `C-C C-a` (or using the goal menu). There are several flags and parameters, e.g. `-c` which enables case-splitting in the search. For further information, see the Agda wiki: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Auto * HTML generation is now possible for a module with unsolved meta-variables, provided that the `--allow-unsolved-metas` flag is used. Release notes for Agda 2 version 2.2.6 ====================================== Language -------- * Universe polymorphism (experimental extension). To enable universe polymorphism give the flag `--universe-polymorphism` on the command line or (recommended) as an OPTIONS pragma. When universe polymorphism is enabled `Set` takes an argument which is the universe level. For instance, the type of universe polymorphic identity is ```agda id : {a : Level} {A : Set a} → A → A. ``` The type Level is isomorphic to the unary natural numbers and should be specified using the BUILTINs `LEVEL`, `LEVELZERO`, and `LEVELSUC`: ```agda data Level : Set where zero : Level suc : Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} ``` There is an additional BUILTIN `LEVELMAX` for taking the maximum of two levels: ```agda max : Level → Level → Level max zero m = m max (suc n) zero = suc n max (suc n) (suc m) = suc (max n m) {-# BUILTIN LEVELMAX max #-} ``` The non-polymorphic universe levels `Set`, `Set₁` and so on are sugar for `Set zero`, `Set (suc zero)`, etc. At present there is no automatic lifting of types from one level to another. It can still be done (rather clumsily) by defining types like the following one: ```agda data Lifted {a} (A : Set a) : Set (suc a) where lift : A → Lifted A ``` However, it is likely that automatic lifting is introduced at some point in the future. * Multiple constructors, record fields, postulates or primitives can be declared using a single type signature: ```agda data Bool : Set where false true : Bool postulate A B : Set ``` * Record fields can be implicit: ```agda record R : Set₁ where field {A} : Set f : A → A {B C} D {E} : Set g : B → C → E ``` By default implicit fields are not printed. * Record constructors can be defined: ```agda record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ ``` In this example `_,_` gets the type ```agda (proj₁ : A) → B proj₁ → Σ A B. ``` For implicit fields the corresponding constructor arguments become implicit. Note that the constructor is defined in the *outer* scope, so any fixity declaration has to be given outside the record definition. The constructor is not in scope inside the record module. Note also that pattern matching for records has not been implemented yet. * BUILTIN hooks for equality. The data type ```agda data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x ``` can be specified as the builtin equality type using the following pragmas: ```agda {-# BUILTIN EQUALITY _≡_ #-} {-# BUILTIN REFL refl #-} ``` The builtin equality is used for the new rewrite construct and the `primTrustMe` primitive described below. * New `rewrite` construct. If `eqn : a ≡ b`, where `_≡_` is the builtin equality (see above) you can now write ```agda f ps rewrite eqn = rhs ``` instead of ```agda f ps with a | eqn ... | ._ | refl = rhs ``` The `rewrite` construct has the effect of rewriting the goal and the context by the given equation (left to right). You can rewrite using several equations (in sequence) by separating them with vertical bars (|): ```agda f ps rewrite eqn₁ | eqn₂ | … = rhs ``` It is also possible to add `with`-clauses after rewriting: ```agda f ps rewrite eqns with e ... | p = rhs ``` Note that pattern matching happens before rewriting—if you want to rewrite and then do pattern matching you can use a with after the rewrite. See `test/Succeed/Rewrite.agda` for some examples. * A new primitive, `primTrustMe`, has been added: ```agda primTrustMe : {A : Set} {x y : A} → x ≡ y ``` Here `_≡_` is the builtin equality (see BUILTIN hooks for equality, above). If `x` and `y` are definitionally equal, then `primTrustMe {x = x} {y = y}` reduces to `refl`. Note that the compiler replaces all uses of `primTrustMe` with the `REFL` builtin, without any check for definitional equality. Incorrect uses of `primTrustMe` can potentially lead to segfaults or similar problems. For an example of the use of `primTrustMe`, see `Data.String` in version 0.3 of the standard library, where it is used to implement decidable equality on strings using the primitive boolean equality. * Changes to the syntax and semantics of IMPORT pragmas, which are used by the Haskell FFI. Such pragmas must now have the following form: ```agda {-# IMPORT #-} ``` These pragmas are interpreted as *qualified* imports, so Haskell names need to be given qualified (unless they come from the Haskell prelude). * The horizontal tab character (U+0009) is no longer treated as white space. * Line pragmas are no longer supported. * The `--include-path` flag can no longer be used as a pragma. * The experimental and incomplete support for proof irrelevance has been disabled. Tools ----- * New `intro` command in the Emacs mode. When there is a canonical way of building something of the goal type (for instance, if the goal type is a pair), the goal can be refined in this way. The command works for the following goal types: - A data type where only one of its constructors can be used to construct an element of the goal type. (For instance, if the goal is a non-empty vector, a `cons` will be introduced.) - A record type. A record value will be introduced. Implicit fields will not be included unless showing of implicit arguments is switched on. - A function type. A lambda binding as many variables as possible will be introduced. The variable names will be chosen from the goal type if its normal form is a dependent function type, otherwise they will be variations on `x`. Implicit lambdas will only be inserted if showing of implicit arguments is switched on. This command can be invoked by using the `refine` command (`C-c C-r`) when the goal is empty. (The old behaviour of the refine command in this situation was to ask for an expression using the minibuffer.) * The Emacs mode displays `Checked` in the mode line if the current file type checked successfully without any warnings. * If a file `F` is loaded, and this file defines the module `M`, it is an error if `F` is not the file which defines `M` according to the include path. Note that the command-line tool and the Emacs mode define the meaning of relative include paths differently: the command-line tool interprets them relative to the current working directory, whereas the Emacs mode interprets them relative to the root directory of the current project. (As an example, if the module `A.B.C` is loaded from the file `/A/B/C.agda`, then the root directory is ``.) * It is an error if there are several files on the include path which match a given module name. * Interface files are relocatable. You can move around source trees as long as the include path is updated in a corresponding way. Note that a module `M` may be re-typechecked if its time stamp is strictly newer than that of the corresponding interface file (`M.agdai`). * Type-checking is no longer done when an up-to-date interface exists. (Previously the initial module was always type-checked.) * Syntax highlighting files for Emacs (`.agda.el`) are no longer used. The `--emacs` flag has been removed. (Syntax highlighting information is cached in the interface files.) * The Agate and Alonzo compilers have been retired. The options `--agate`, `--alonzo` and `--malonzo` have been removed. * The default directory for MAlonzo output is the project's root directory. The `--malonzo-dir` flag has been renamed to `--compile-dir`. * Emacs mode: `C-c C-x C-d` no longer resets the type checking state. `C-c C-x C-r` can be used for a more complete reset. `C-c C-x C-s` (which used to reload the syntax highlighting information) has been removed. `C-c C-l` can be used instead. * The Emacs mode used to define some "abbrevs", unless the user explicitly turned this feature off. The new default is *not* to add any abbrevs. The old default can be obtained by customising `agda2-mode-abbrevs-use-defaults` (a customisation buffer can be obtained by typing `M-x customize-group agda2 RET` after an Agda file has been loaded). Release notes for Agda 2 version 2.2.4 ====================================== Important changes since 2.2.2: * Change to the semantics of `open import` and `open module`. The declaration ```agda open import M ``` now translates to ```agda import A open A ``` instead of ```agda import A open A ``` The same translation is used for `open module M = E …`. Declarations involving the keywords as or public are changed in a corresponding way (`as` always goes with import, and `public` always with open). This change means that import directives do not affect the qualified names when open import/module is used. To get the old behaviour you can use the expanded version above. * Names opened publicly in parameterised modules no longer inherit the module parameters. Example: ```agda module A where postulate X : Set module B (Y : Set) where open A public ``` In Agda 2.2.2 `B.X` has type `(Y : Set) → Set`, whereas in Agda 2.2.4 `B.X` has type Set. * Previously it was not possible to export a given constructor name through two different `open public` statements in the same module. This is now possible. * Unicode subscript digits are now allowed for the hierarchy of universes (`Set₀`, `Set₁`, …): `Set₁` is equivalent to `Set1`. Release notes for Agda 2 version 2.2.2 ====================================== Tools ----- * The `--malonzodir` option has been renamed to `--malonzo-dir`. * The output of `agda --html` is by default placed in a directory called `html`. Infrastructure -------------- * The Emacs mode is included in the Agda Cabal package, and installed by `cabal install`. The recommended way to enable the Emacs mode is to include the following code in `.emacs`: ```elisp (load-file (let ((coding-system-for-read 'utf-8)) (shell-command-to-string "agda-mode locate"))) ``` Release notes for Agda 2 version 2.2.0 ====================================== Important changes since 2.1.2 (which was released 2007-08-16): Language -------- * Exhaustive pattern checking. Agda complains if there are missing clauses in a function definition. * Coinductive types are supported. This feature is under development/evaluation, and may change. http://wiki.portal.chalmers.se/agda/agda.php?n=ReferenceManual.Codatatypes * Another experimental feature: Sized types, which can make it easier to explain why your code is terminating. * Improved constraint solving for functions with constructor headed right hand sides. http://wiki.portal.chalmers.se/agda/agda.php?n=ReferenceManual.FindingTheValuesOfImplicitArguments * A simple, well-typed foreign function interface, which allows use of Haskell functions in Agda code. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.FFI * The tokens `forall`, `->` and `\` can be written as `∀`, `→` and `λ`. * Absurd lambdas: `λ ()` and `λ {}`. http://thread.gmane.org/gmane.comp.lang.agda/440 * Record fields whose values can be inferred can be omitted. * Agda complains if it spots an unreachable clause, or if a pattern variable "shadows" a hidden constructor of matching type. http://thread.gmane.org/gmane.comp.lang.agda/720 Tools ----- * Case-split: The user interface can replace a pattern variable with the corresponding constructor patterns. You get one new left-hand side for every possible constructor. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.QuickGuideToEditingTypeCheckingAndCompilingAgdaCode * The MAlonzo compiler. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.MAlonzo * A new Emacs input method, which contains bindings for many Unicode symbols, is by default activated in the Emacs mode. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.UnicodeInput * Highlighted, hyperlinked HTML can be generated from Agda source code. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.HowToGenerateWebPagesFromSourceCode * The command-line interactive mode (`agda -I`) is no longer supported, but should still work. http://thread.gmane.org/gmane.comp.lang.agda/245 * Reload times when working on large projects are now considerably better. http://thread.gmane.org/gmane.comp.lang.agda/551 Libraries --------- * A standard library is under development. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Documentation ------------- * The Agda wiki is better organised. It should be easier for a newcomer to find relevant information now. http://wiki.portal.chalmers.se/agda/ Infrastructure -------------- * Easy-to-install packages for Windows and Debian/Ubuntu have been prepared. http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Download * Agda 2.2.0 is available from Hackage. http://hackage.haskell.org/ Agda-2.6.0.1/README.md0000644000000000000000000000265313466402171012171 0ustar0000000000000000Agda 2 ====== [![Hackage version](https://img.shields.io/hackage/v/Agda.svg?label=Hackage)](http://hackage.haskell.org/package/Agda) [![Stackage version](https://www.stackage.org/package/Agda/badge/lts?label=Stackage)](https://www.stackage.org/package/Agda) [![Travis Status](https://travis-ci.org/agda/agda.svg?branch=master)](https://travis-ci.org/agda/agda) [![Appveyor Status](https://ci.appveyor.com/api/projects/status/x6liln2dol0bg4qw/branch/master?svg=true)](https://ci.appveyor.com/project/gallais/agda) [![Documentation Status](https://readthedocs.org/projects/agda/badge/?version=latest)](http://agda.readthedocs.io/en/latest/?badge=latest) Note that this README is only about Agda, not its standard library. See the [Agda Wiki][agdawiki] for information about the library. Documentation ------------- * [User manual](http://agda.readthedocs.io) * [CHANGELOG](https://github.com/agda/agda/blob/master/CHANGELOG.md) Getting Started ---------------- * [Prerequisites](http://agda.readthedocs.io/en/latest/getting-started/prerequisites.html) * [Installation](http://agda.readthedocs.io/en/latest/getting-started/installation.html) * [Quick guide to editing, type checking and compiling Agda code](http://agda.readthedocs.io/en/latest/getting-started/quick-guide.html) Hacking on Agda --------------- Head to [`HACKING`](https://github.com/agda/agda/blob/master/HACKING.md) [agdawiki]: http://wiki.portal.chalmers.se/agda/pmwiki.php Agda-2.6.0.1/stack-8.2.2.yaml0000644000000000000000000000027613466402171013347 0ustar0000000000000000resolver: lts-11.22 extra-deps: - async-2.2.1 - text-1.2.3.1 # Local packages, usually specified by relative directory name packages: - '.' - 'src/fix-agda-whitespace' - 'src/size-solver' Agda-2.6.0.1/stack-7.10.3.yaml0000644000000000000000000000055713466402171013430 0ustar0000000000000000# The version installed of `cpphs` should match the lower version # required in Agda.cabal [Issue #2315]. resolver: lts-6.35 extra-deps: - STMonadTrans-0.4.3 - cpphs-1.20.8 - equivalence-0.3.2 - async-2.2.1 - gitrev-1.3.1 - text-1.2.3.1 # Local packages, usually specified by relative directory name packages: - '.' - 'src/fix-agda-whitespace' - 'src/size-solver' Agda-2.6.0.1/stack-8.4.4.yaml0000644000000000000000000000022413466402171013344 0ustar0000000000000000resolver: lts-12.26 # Local packages, usually specified by relative directory name packages: - '.' - 'src/fix-agda-whitespace' - 'src/size-solver' Agda-2.6.0.1/src/0000755000000000000000000000000013466402171011473 5ustar0000000000000000Agda-2.6.0.1/src/data/0000755000000000000000000000000013466402171012404 5ustar0000000000000000Agda-2.6.0.1/src/data/agda.sty0000644000000000000000000005401113466402171014042 0ustar0000000000000000% ---------------------------------------------------------------------- % Some useful commands when doing highlighting of Agda code in LaTeX. % ---------------------------------------------------------------------- \ProvidesPackage{agda} \RequirePackage{ifxetex, ifluatex, xifthen, xcolor, polytable, etoolbox, calc, environ, xparse} % https://tex.stackexchange.com/questions/47576/combining-ifxetex-and-ifluatex-with-the-logical-or-operation \newif\ifxetexorluatex \ifxetex \xetexorluatextrue \else \ifluatex \xetexorluatextrue \else \xetexorluatexfalse \fi \fi % ---------------------------------------------------------------------- % Options \DeclareOption{bw} {\newcommand{\AgdaColourScheme}{bw}} \DeclareOption{conor}{\newcommand{\AgdaColourScheme}{conor}} \newif\if@AgdaEnableReferences\@AgdaEnableReferencesfalse \DeclareOption{references}{ \@AgdaEnableReferencestrue } \newif\if@AgdaEnableLinks\@AgdaEnableLinksfalse \DeclareOption{links}{ \@AgdaEnableLinkstrue } \ProcessOptions\relax % ---------------------------------------------------------------------- % Font setup \tracinglostchars=2 % If the font is missing some symbol, then say % so in the compilation output. % ---------------------------------------------------------------------- % Colour schemes. \providecommand{\AgdaColourScheme}{standard} % ---------------------------------------------------------------------- % References to code (needs additional post-processing of tex files to % work, see wiki for details). \if@AgdaEnableReferences \RequirePackage{catchfilebetweentags, xstring} \newcommand{\AgdaRef}[2][]{% \StrSubstitute{#2}{\_}{AgdaUnderscore}[\tmp]% \ifthenelse{\isempty{#1}}% {\ExecuteMetaData{AgdaTag-\tmp}}% {\ExecuteMetaData{#1}{AgdaTag-\tmp}} } \fi \providecommand{\AgdaRef}[2][]{#2} % ---------------------------------------------------------------------- % Links (only done if the option is passed and the user has loaded the % hyperref package). \if@AgdaEnableLinks \@ifpackageloaded{hyperref}{ % List that holds added targets. \newcommand{\AgdaList}[0]{} \newtoggle{AgdaIsElem} \newcounter{AgdaIndex} \newcommand{\AgdaLookup}[3]{% \togglefalse{AgdaIsElem}% \setcounter{AgdaIndex}{0}% \renewcommand*{\do}[1]{% \ifstrequal{#1}{##1}% {\toggletrue{AgdaIsElem}\listbreak}% {\stepcounter{AgdaIndex}}}% \dolistloop{\AgdaList}% \iftoggle{AgdaIsElem}{#2}{#3}% } \newcommand*{\AgdaTargetHelper}[1]{% \AgdaLookup{#1}% {\PackageError{agda}{``#1'' used as target more than once}% {Overloaded identifiers and links do not% work well, consider using unique% \MessageBreak identifiers instead.}% }% {\listadd{\AgdaList}{#1}% \hypertarget{Agda\theAgdaIndex}{}% }% } \newcommand{\AgdaTarget}[1]{\forcsvlist{\AgdaTargetHelper}{#1}} \newcommand{\AgdaLink}[1]{% \AgdaLookup{#1}% {\hyperlink{Agda\theAgdaIndex}{#1}}% {#1}% } }{\PackageError{agda}{Load the hyperref package before the agda package}{}} \fi \providecommand{\AgdaTarget}[1]{} \providecommand{\AgdaLink}[1]{#1} % ---------------------------------------------------------------------- % Font styles. \newcommand{\AgdaFontStyle}[1]{\textsf{#1}} \ifthenelse{\equal{\AgdaColourScheme}{bw}}{ \newcommand{\AgdaKeywordFontStyle}[1]{\underline{#1}} }{ \newcommand{\AgdaKeywordFontStyle}[1]{\textsf{#1}} } \newcommand{\AgdaStringFontStyle}[1]{\texttt{#1}} \newcommand{\AgdaCommentFontStyle}[1]{\texttt{#1}} \newcommand{\AgdaBoundFontStyle}[1]{\textit{#1}} % ---------------------------------------------------------------------- % Colours. % ---------------------------------- % The black and white colour scheme. \ifthenelse{\equal{\AgdaColourScheme}{bw}}{ % Aspect colours. \definecolor{AgdaComment} {HTML}{000000} \definecolor{AgdaPragma} {HTML}{000000} \definecolor{AgdaKeyword} {HTML}{000000} \definecolor{AgdaString} {HTML}{000000} \definecolor{AgdaNumber} {HTML}{000000} \definecolor{AgdaSymbol} {HTML}{000000} \definecolor{AgdaPrimitiveType}{HTML}{000000} % NameKind colours. \definecolor{AgdaBound} {HTML}{000000} \definecolor{AgdaGeneralizable} {HTML}{000000} \definecolor{AgdaInductiveConstructor} {HTML}{000000} \definecolor{AgdaCoinductiveConstructor}{HTML}{000000} \definecolor{AgdaDatatype} {HTML}{000000} \definecolor{AgdaField} {HTML}{000000} \definecolor{AgdaFunction} {HTML}{000000} \definecolor{AgdaMacro} {HTML}{000000} \definecolor{AgdaModule} {HTML}{000000} \definecolor{AgdaPostulate} {HTML}{000000} \definecolor{AgdaPrimitive} {HTML}{000000} \definecolor{AgdaRecord} {HTML}{000000} \definecolor{AgdaArgument} {HTML}{000000} % Other aspect colours. \definecolor{AgdaDottedPattern} {HTML}{000000} \definecolor{AgdaUnsolvedMeta} {HTML}{D3D3D3} \definecolor{AgdaTerminationProblem}{HTML}{BEBEBE} \definecolor{AgdaIncompletePattern} {HTML}{D3D3D3} \definecolor{AgdaError} {HTML}{696969} % Misc. \definecolor{AgdaHole} {HTML}{BEBEBE} % ---------------------------------- % Conor McBride's colour scheme. }{ \ifthenelse{\equal{\AgdaColourScheme}{conor}}{ % Aspect colours. \definecolor{AgdaComment} {HTML}{B22222} \definecolor{AgdaPragma} {HTML}{000000} \definecolor{AgdaKeyword} {HTML}{000000} \definecolor{AgdaString} {HTML}{000000} \definecolor{AgdaNumber} {HTML}{000000} \definecolor{AgdaSymbol} {HTML}{000000} \definecolor{AgdaPrimitiveType}{HTML}{0000CD} % NameKind colours. \definecolor{AgdaBound} {HTML}{A020F0} \definecolor{AgdaGeneralizable} {HTML}{A020F0} \definecolor{AgdaInductiveConstructor} {HTML}{8B0000} \definecolor{AgdaCoinductiveConstructor}{HTML}{8B0000} \definecolor{AgdaDatatype} {HTML}{0000CD} \definecolor{AgdaField} {HTML}{8B0000} \definecolor{AgdaFunction} {HTML}{006400} \definecolor{AgdaMacro} {HTML}{006400} \definecolor{AgdaModule} {HTML}{006400} \definecolor{AgdaPostulate} {HTML}{006400} \definecolor{AgdaPrimitive} {HTML}{006400} \definecolor{AgdaRecord} {HTML}{0000CD} \definecolor{AgdaArgument} {HTML}{404040} % Other aspect colours. \definecolor{AgdaDottedPattern} {HTML}{000000} \definecolor{AgdaUnsolvedMeta} {HTML}{FFD700} \definecolor{AgdaTerminationProblem}{HTML}{FF0000} \definecolor{AgdaIncompletePattern} {HTML}{A020F0} \definecolor{AgdaError} {HTML}{F4A460} % Misc. \definecolor{AgdaHole} {HTML}{9DFF9D} % ---------------------------------- % The standard colour scheme. }{ % Aspect colours. \definecolor{AgdaComment} {HTML}{B22222} \definecolor{AgdaPragma} {HTML}{000000} \definecolor{AgdaKeyword} {HTML}{CD6600} \definecolor{AgdaString} {HTML}{B22222} \definecolor{AgdaNumber} {HTML}{A020F0} \definecolor{AgdaSymbol} {HTML}{404040} \definecolor{AgdaPrimitiveType}{HTML}{0000CD} % NameKind colours. \definecolor{AgdaBound} {HTML}{000000} \definecolor{AgdaGeneralizable} {HTML}{000000} \definecolor{AgdaInductiveConstructor} {HTML}{008B00} \definecolor{AgdaCoinductiveConstructor}{HTML}{8B7500} \definecolor{AgdaDatatype} {HTML}{0000CD} \definecolor{AgdaField} {HTML}{EE1289} \definecolor{AgdaFunction} {HTML}{0000CD} \definecolor{AgdaMacro} {HTML}{458B74} \definecolor{AgdaModule} {HTML}{A020F0} \definecolor{AgdaPostulate} {HTML}{0000CD} \definecolor{AgdaPrimitive} {HTML}{0000CD} \definecolor{AgdaRecord} {HTML}{0000CD} \definecolor{AgdaArgument} {HTML}{404040} % Other aspect colours. \definecolor{AgdaDottedPattern} {HTML}{000000} \definecolor{AgdaUnsolvedMeta} {HTML}{FFFF00} \definecolor{AgdaTerminationProblem}{HTML}{FFA07A} \definecolor{AgdaIncompletePattern} {HTML}{F5DEB3} \definecolor{AgdaError} {HTML}{FF0000} % Misc. \definecolor{AgdaHole} {HTML}{9DFF9D} }} % ---------------------------------------------------------------------- % Commands. \newcommand{\AgdaNoSpaceMath}[1] {\begingroup\thickmuskip=0mu\medmuskip=0mu#1\endgroup} % Aspect commands. \newcommand{\AgdaComment} [1] {\AgdaNoSpaceMath{\AgdaCommentFontStyle{\textcolor{AgdaComment}{#1}}}} \newcommand{\AgdaPragma} [1] {\AgdaNoSpaceMath{\AgdaCommentFontStyle{\textcolor{AgdaPragma}{#1}}}} \newcommand{\AgdaKeyword} [1] {\AgdaNoSpaceMath{\AgdaKeywordFontStyle{\textcolor{AgdaKeyword}{#1}}}} \newcommand{\AgdaString} [1] {\AgdaNoSpaceMath{\AgdaStringFontStyle{\textcolor{AgdaString}{#1}}}} \newcommand{\AgdaNumber} [1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaNumber}{#1}}}} \newcommand{\AgdaSymbol} [1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaSymbol}{#1}}}} \newcommand{\AgdaPrimitiveType}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaPrimitiveType}{#1}}}} % Note that, in code generated by the LaTeX backend, \AgdaOperator is % always applied to a NameKind command. \newcommand{\AgdaOperator} [1]{#1} % NameKind commands. % The user can control the typesetting of (certain) individual tokens % by redefining the following command. The first argument is the token % and the second argument the thing to be typeset (sometimes just the % token, sometimes \AgdaLink{}). Example: % % \usepackage{ifthen} % % % Insert extra space before some tokens. % \DeclareRobustCommand{\AgdaFormat}[2]{% % \ifthenelse{ % \equal{#1}{≡⟨} \OR % \equal{#1}{≡⟨⟩} \OR % \equal{#1}{∎} % }{\ }{}#2} % % Note the use of \DeclareRobustCommand. \newcommand{\AgdaFormat}[2]{#2} \newcommand{\AgdaBound}[1] {\AgdaNoSpaceMath{\AgdaBoundFontStyle{\textcolor{AgdaBound}{\AgdaFormat{#1}{#1}}}}} \newcommand{\AgdaGeneralizable}[1] {\AgdaNoSpaceMath{\AgdaBoundFontStyle{\textcolor{AgdaGeneralizable}{\AgdaFormat{#1}{#1}}}}} \newcommand{\AgdaInductiveConstructor}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaInductiveConstructor}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaCoinductiveConstructor}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaCoinductiveConstructor}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaDatatype}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaDatatype}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaField}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaField}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaFunction}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaFunction}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaMacro}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaMacro}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaModule}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaModule}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaPostulate}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaPostulate}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaPrimitive}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaPrimitive}{\AgdaFormat{#1}{#1}}}}} \newcommand{\AgdaRecord}[1] {\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaRecord}{\AgdaFormat{#1}{\AgdaLink{#1}}}}}} \newcommand{\AgdaArgument}[1] {\AgdaNoSpaceMath{\AgdaBoundFontStyle{\textcolor{AgdaArgument}{\AgdaFormat{#1}{#1}}}}} % Other aspect commands. \newcommand{\AgdaFixityOp} [1]{\AgdaNoSpaceMath{$#1$}} \newcommand{\AgdaDottedPattern} [1]{\textcolor{AgdaDottedPattern}{#1}} \newcommand{\AgdaUnsolvedMeta} [1] {\AgdaFontStyle{\colorbox{AgdaUnsolvedMeta}{#1}}} \newcommand{\AgdaTerminationProblem}[1] {\AgdaFontStyle{\colorbox{AgdaTerminationProblem}{#1}}} \newcommand{\AgdaIncompletePattern} [1]{\colorbox{AgdaIncompletePattern}{#1}} \newcommand{\AgdaError} [1] {\AgdaFontStyle{\textcolor{AgdaError}{\underline{#1}}}} \newcommand{\AgdaCatchallClause} [1]{#1} % feel free to change this % Used to hide code from LaTeX. % % Note that this macro has been deprecated in favour of giving the % hide argument to the code environment. \long\def\AgdaHide#1{\ignorespaces} % Misc. \newcommand{\AgdaHole}[1]{\colorbox{AgdaHole}{#1}} % ---------------------------------------------------------------------- % The code environment. \newcommand{\AgdaCodeStyle}{} % \newcommand{\AgdaCodeStyle}{\tiny} \ifdefined\mathindent {} \else \newdimen\mathindent\mathindent\leftmargini \fi % Adds the given amount of vertical space and starts a new line. % % The implementation comes from lhs2TeX's polycode.fmt, written by % Andres Löh. \newcommand{\Agda@NewlineWithVerticalSpace}[1]{% {\parskip=0pt\parindent=0pt\par\vskip #1\noindent}} % Should there be space around code? \newboolean{Agda@SpaceAroundCode} % Use this command to avoid extra space around code blocks. \newcommand{\AgdaNoSpaceAroundCode}{% \setboolean{Agda@SpaceAroundCode}{false}} % Use this command to include extra space around code blocks. \newcommand{\AgdaSpaceAroundCode}{% \setboolean{Agda@SpaceAroundCode}{true}} % By default space is inserted around code blocks. \AgdaSpaceAroundCode{} % Sometimes one might want to break up a code block into multiple % pieces, but keep code in different blocks aligned with respect to % each other. Then one can use the AgdaAlign environment. Example % usage: % % \begin{AgdaAlign} % \begin{code} % code % code (more code) % \end{code} % Explanation... % \begin{code} % aligned with "code" % code (aligned with (more code)) % \end{code} % \end{AgdaAlign} % % Note that AgdaAlign environments should not be nested. % % Sometimes one might also want to hide code in the middle of a code % block. This can be accomplished in the following way: % % \begin{AgdaAlign} % \begin{code} % visible % \end{code} % \begin{code}[hide] % hidden % \end{code} % \begin{code} % visible % \end{code} % \end{AgdaAlign} % % However, the result may be ugly: extra space is perhaps inserted % around the code blocks. % % The AgdaSuppressSpace environment ensures that extra space is only % inserted before the first code block, and after the last one (but % not if \AgdaNoSpaceAroundCode{} is used). Example usage: % % \begin{AgdaAlign} % \begin{code} % code % more code % \end{code} % Explanation... % \begin{AgdaSuppressSpace} % \begin{code} % aligned with "code" % aligned with "more code" % \end{code} % \begin{code}[hide] % hidden code % \end{code} % \begin{code} % also aligned with "more code" % \end{code} % \end{AgdaSuppressSpace} % \end{AgdaAlign} % % Note that AgdaSuppressSpace environments should not be nested. % % There is also a combined environment, AgdaMultiCode, that combines % the effects of AgdaAlign and AgdaSuppressSpace. % The number of the current/next code block (excluding hidden ones). \newcounter{Agda@Current} \setcounter{Agda@Current}{0} % The number of the previous code block (excluding hidden ones), used % locally in \Agda@SuppressEnd. \newcounter{Agda@Previous} % Is AgdaAlign active? \newboolean{Agda@Align} \setboolean{Agda@Align}{false} % The number of the first code block (if any) in a given AgdaAlign % environment. \newcounter{Agda@AlignStart} \newcommand{\Agda@AlignStart}{% \ifthenelse{\boolean{Agda@Align}}{% \PackageError{agda}{Nested AgdaAlign environments}{% AgdaAlign and AgdaMultiCode environments must not be nested.}}{% \setboolean{Agda@Align}{true}% \setcounter{Agda@AlignStart}{\value{Agda@Current}}}} \newcommand{\Agda@AlignEnd}{\setboolean{Agda@Align}{false}} \newenvironment{AgdaAlign}{% \Agda@AlignStart{}}{% \Agda@AlignEnd{}% \ignorespacesafterend} % Is AgdaSuppressSpace active? \newboolean{Agda@Suppress} \setboolean{Agda@Suppress}{false} % The number of the first code block (if any) in a given % AgdaSuppressSpace environment. \newcounter{Agda@SuppressStart} % Does a "do not suppress space after" label exist for the current % code block? (This boolean is used locally in the code environment's % implementation.) \newboolean{Agda@DoNotSuppressSpaceAfter} \newcommand{\Agda@SuppressStart}{% \ifthenelse{\boolean{Agda@Suppress}}{% \PackageError{agda}{Nested AgdaSuppressSpace environments}{% AgdaSuppressSpace and AgdaMultiCode environments must not be nested.}}{% \setboolean{Agda@Suppress}{true}% \setcounter{Agda@SuppressStart}{\value{Agda@Current}}}} % Marks the given code block as one that space should not be % suppressed after (if AgdaSpaceAroundCode and AgdaSuppressSpace are % both active). \newcommand{\Agda@DoNotSuppressSpaceAfter}[1]{% % The use of labels is intended to ensure that LaTeX will provide a % warning if the document needs to be recompiled. \label{Agda@DoNotSuppressSpaceAfter@#1}} \newcommand{\Agda@SuppressEnd}{% \ifthenelse{\value{Agda@SuppressStart} = \value{Agda@Current}}{}{% % Mark the previous code block in the .aux file. \setcounter{Agda@Previous}{\theAgda@Current-1}% \immediate\write\@auxout{% \noexpand\Agda@DoNotSuppressSpaceAfter{\theAgda@Previous}}}% \setboolean{Agda@Suppress}{false}} \newenvironment{AgdaSuppressSpace}{% \Agda@SuppressStart{}}{% \Agda@SuppressEnd{}% \ignorespacesafterend} \newenvironment{AgdaMultiCode}{% \Agda@AlignStart{}% \Agda@SuppressStart{}}{% \Agda@SuppressEnd{}% \Agda@AlignEnd{}% \ignorespacesafterend} % Vertical space used for empty lines. By default \abovedisplayskip. \newlength{\AgdaEmptySkip} \setlength{\AgdaEmptySkip}{\abovedisplayskip} % Extra space to be inserted for empty lines (the difference between % \AgdaEmptySkip and \baselineskip). Used internally. \newlength{\AgdaEmptyExtraSkip} % The code environment. % % Code can be hidden by writing \begin{code}[hide]. % % Inline code can be emitted by writing \begin{code}[inline]. In this % case most of the discussion above does not apply, alignment is not % respected, and so on. It is recommended to only use this option for % a single line of code, and to not use two consecutive spaces in this % piece of code. % % Note that this environment ignores spaces after its end. If a space % (\AgdaSpace{}) should be inserted after the inline code, use inline* % instead of inline. % % The implementation is based on plainhscode in lhs2TeX's % polycode.fmt, written by Andres Löh. \NewEnviron{code}[1][]{% % Conditionally hide the code. \ifthenelse{\equal{#1}{hide}}{}{% \ifthenelse{\equal{#1}{inline}}{% % Inline code. % % Make the polytable primitives emitted by the LaTeX backend % do nothing. \DeclareDocumentCommand{\>}{O{}O{}}{}% \DeclareDocumentCommand{\<}{O{}}{}% \AgdaCodeStyle\BODY}{% \ifthenelse{\equal{#1}{inline*}}{% % Inline code with space at the end. % \DeclareDocumentCommand{\>}{O{}O{}}{}% \DeclareDocumentCommand{\<}{O{}}{}% \AgdaCodeStyle\BODY\AgdaSpace{}}{% % % Displayed code. % % Conditionally emit space before the code block. Unconditionally % switch to a new line. \ifthenelse{\boolean{Agda@SpaceAroundCode} \and% \(\not \boolean{Agda@Suppress} \or% \value{Agda@SuppressStart} = \value{Agda@Current}\)}{% \Agda@NewlineWithVerticalSpace{\abovedisplayskip}}{% \Agda@NewlineWithVerticalSpace{0pt}}% % % Indent the entire code block. \advance\leftskip\mathindent% % % The code's style can be customised. \AgdaCodeStyle% % % Used to control the height of empty lines. \setlength{\AgdaEmptyExtraSkip}{\AgdaEmptySkip - \baselineskip}% % % The environment used to handle indentation (of individual lines) % and alignment. \begin{pboxed}% % % Conditionally preserve alignment between code blocks. \ifthenelse{\boolean{Agda@Align}}{% \ifthenelse{\value{Agda@AlignStart} = \value{Agda@Current}}{% \savecolumns}{% \restorecolumns}}{}% % % The code. \BODY% \end{pboxed}% % % Does the label Agda@DoNotSuppressAfter@ exist? \ifcsdef{r@Agda@DoNotSuppressSpaceAfter@\theAgda@Current}{% \setboolean{Agda@DoNotSuppressSpaceAfter}{true}}{% \setboolean{Agda@DoNotSuppressSpaceAfter}{false}}% % % Conditionally emit space after the code block. Unconditionally % switch to a new line. \ifthenelse{\boolean{Agda@SpaceAroundCode} \and% \(\not \boolean{Agda@Suppress} \or% \boolean{Agda@DoNotSuppressSpaceAfter}\)}{% \Agda@NewlineWithVerticalSpace{\belowdisplayskip}}{% \Agda@NewlineWithVerticalSpace{0pt}}% % % Step the code block counter, but only for non-hidden code. \stepcounter{Agda@Current}}}}} % Space inserted after tokens. \newcommand{\AgdaSpace}{ } % Space inserted to indent something. \newcommand{\AgdaIndentSpace}{\AgdaSpace{}$\;\;$} % Default column for polytable. \defaultcolumn{@{}l@{\AgdaSpace{}}} % \AgdaIndent expects a non-negative integer as its only argument. % This integer should be the distance, in code blocks, to the thing % relative to which the text is indented. % % The default implementation only indents if the thing that the text % is indented relative to exists in the same code block or is wrapped % in the same AgdaAlign or AgdaMultiCode environment. \newcommand{\AgdaIndent}[1]{% \ifthenelse{#1 = 0 \or \( \boolean{Agda@Align} \and \cnttest{\value{Agda@Current} - #1}{>=}{ \value{Agda@AlignStart}} \)}{\AgdaIndentSpace{}}{}} % Underscores are typeset using \AgdaUnderscore{}. \newcommand{\AgdaUnderscore}{\_} \endinput Agda-2.6.0.1/src/data/postprocess-latex.pl0000644000000000000000000000072013466402171016437 0ustar0000000000000000#!/usr/bin/env perl use strict; use warnings; my $tag_prefix = "AgdaTag"; my $underscore = "AgdaUnderscore"; my $commands = qr"(InductiveConstructor|CoinductiveConstructor\ |Datatype|Field|Function|Module|Postulate|Record)"; while (<>) { s|(\\Agda$commands){(.*?)} | my $cmd = $1; my $arg = $3; my $tag = "$tag_prefix-$3" =~ s/\\_/$underscore/gr; $_ = "%\n%<*$tag>\n$cmd\{$arg\}%\n%\n"; |gxe; print; } Agda-2.6.0.1/src/data/Agda.css0000644000000000000000000000277013466402171013760 0ustar0000000000000000/* Aspects. */ .Agda .Comment { color: #B22222 } .Agda .Background {} .Agda .Markup { color: #000000 } .Agda .Keyword { color: #CD6600 } .Agda .String { color: #B22222 } .Agda .Number { color: #A020F0 } .Agda .Symbol { color: #404040 } .Agda .PrimitiveType { color: #0000CD } .Agda .Pragma { color: black } .Agda .Operator {} /* NameKinds. */ .Agda .Bound { color: black } .Agda .Generalizable { color: black } .Agda .InductiveConstructor { color: #008B00 } .Agda .CoinductiveConstructor { color: #8B7500 } .Agda .Datatype { color: #0000CD } .Agda .Field { color: #EE1289 } .Agda .Function { color: #0000CD } .Agda .Module { color: #A020F0 } .Agda .Postulate { color: #0000CD } .Agda .Primitive { color: #0000CD } .Agda .Record { color: #0000CD } /* OtherAspects. */ .Agda .DottedPattern {} .Agda .UnsolvedMeta { color: black; background: yellow } .Agda .UnsolvedConstraint { color: black; background: yellow } .Agda .TerminationProblem { color: black; background: #FFA07A } .Agda .IncompletePattern { color: black; background: #F5DEB3 } .Agda .Error { color: red; text-decoration: underline } .Agda .TypeChecks { color: black; background: #ADD8E6 } /* Standard attributes. */ .Agda a { text-decoration: none } .Agda a[href]:hover { background-color: #B4EEB4 } Agda-2.6.0.1/src/data/emacs-mode/0000755000000000000000000000000013466402171014416 5ustar0000000000000000Agda-2.6.0.1/src/data/emacs-mode/agda2-queue.el0000644000000000000000000000264713466402171017051 0ustar0000000000000000;;; agda2-queue.el --- Simple FIFO character queues. (defun agda2-queue-empty () "Creates a new empty FIFO character queue. Queues are represented as pairs. The car contains the queue. If the queue is empty, then the cdr contains the symbol nil, and otherwise it points to the queue's last cons-cell." (cons nil nil)) (defun agda2-queue-is-prefix-of (prefix queue) "Returns a non-nil result iff the string PREFIX is a prefix of QUEUE. Linear in the length of PREFIX." (let ((queue (car queue)) (prefix (append prefix nil))) (while (and (consp queue) (consp prefix) (equal (car queue) (car prefix))) (pop queue) (pop prefix)) (null prefix))) (defun agda2-queue-enqueue (queue string) "Adds the characters in STRING to the end of QUEUE. This function updates QUEUE destructively, and is linear in the length of STRING." (let ((chars (append string nil))) (when (consp chars) (if (null (cdr queue)) (setcar queue chars) (setcdr (cdr queue) chars)) (setcdr queue (last chars)))) queue) (defun agda2-queue-from-string (string) "Creates a new FIFO containing the characters in STRING. Linear in the length of STRING." (agda2-queue-enqueue (agda2-queue-empty) string)) (defun agda2-queue-to-string (queue) "Constructs a string containing all the characters in QUEUE. Linear in the length of QUEUE." (concat "" (car queue))) (provide 'agda2-queue) Agda-2.6.0.1/src/data/emacs-mode/agda2.el0000644000000000000000000000105613466402171015720 0ustar0000000000000000;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Agda mode code which should run before the first Agda file is ;; loaded (defvar agda2-directory (file-name-directory load-file-name) "Path to the directory that contains agda2.el(c).") (add-to-list 'load-path (or agda2-directory (car load-path))) (autoload 'agda2-mode "agda2-mode" "Major mode for editing Agda files (version ≥ 2)." t) (add-to-list 'auto-mode-alist '("\\.l?agda\\'" . agda2-mode)) (modify-coding-system-alist 'file "\\.l?agda\\'" 'utf-8) (provide 'agda2) Agda-2.6.0.1/src/data/emacs-mode/agda2-abbrevs.el0000644000000000000000000000507713466402171017351 0ustar0000000000000000;; agda2-abbrevs.el --- Default Agda abbrevs ;;; Commentary: ;;; Code: ;; Skeletons (require 'skeleton) (define-skeleton agda2-abbrevs-module "Inserts a module header template." nil "module " _ " where\n") (define-skeleton agda2-abbrevs-data "Inserts a data template." nil "data " _ " : Set where\n") (define-skeleton agda2-abbrevs-record "Inserts a record type template." nil "record " _ " : Set where\n" " field\n") (define-skeleton agda2-abbrevs-record-value "Inserts a record value template." nil "record {" _ "}") (define-skeleton agda2-abbrevs-using "Inserts a using template." nil "using (" _ ")") (define-skeleton agda2-abbrevs-hiding "Inserts a hiding template." nil "hiding (" _ ")") (define-skeleton agda2-abbrevs-renaming "Inserts a renaming template." nil "renaming (" _ " to " _ ")") (define-skeleton agda2-abbrevs-forall "Inserts a forall template." nil "∀ {" _ "} ") (define-skeleton agda2-abbrevs-code-block "Inserts a code block." nil "\\begin{code}\n " _ "\n\\end{code}\n") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Abbrevs (defvar agda2-abbrevs-defaults '( ("m" "" agda2-abbrevs-module) ("d" "" agda2-abbrevs-data) ("c" "" agda2-abbrevs-code-block) ("re" "" agda2-abbrevs-record) ("rec" "" agda2-abbrevs-record-value) ("u" "" agda2-abbrevs-using) ("h" "" agda2-abbrevs-hiding) ("r" "" agda2-abbrevs-renaming) ("w" "where\n") ("po" "postulate") ("a" "abstract\n") ("pr" "private\n") ("pu" "public") ("mu" "mutual\n") ("f" "" agda2-abbrevs-forall) ("oi" "open import ")) "Abbreviations defined by default in the Agda mode.") (defcustom agda2-mode-abbrevs-use-defaults nil "If non-nil include the default Agda mode abbrevs in `agda2-mode-abbrev-table'. The abbrevs are designed to be expanded explicitly, so users of `abbrev-mode' probably do not want to include them. Restart Emacs in order for this change to take effect." :group 'agda2 :type '(choice (const :tag "Yes" t) (const :tag "No" nil))) (defvar agda2-mode-abbrev-table nil "Agda mode abbrev table.") (define-abbrev-table 'agda2-mode-abbrev-table (if agda2-mode-abbrevs-use-defaults (mapcar (lambda (abbrev) (append abbrev (make-list (- 4 (length abbrev)) nil) '((:system t)))) agda2-abbrevs-defaults))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Administrative details (provide 'agda2-abbrevs) ;;; agda2-abbrevs.el ends here Agda-2.6.0.1/src/data/emacs-mode/agda2-mode.el0000644000000000000000000023453513466402171016654 0ustar0000000000000000;;; agda2-mode.el --- Major mode for Agda ;;; Commentary: ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Dependency ;;; Code: (defvar agda2-version "2.6.0.1" "The version of the Agda mode. Note that the same version of the Agda executable must be used.") (require 'cl) (require 'compile) (require 'pp) (require 'time-date) (require 'eri) (require 'annotation) (require 'fontset) (require 'agda-input) (require 'agda2) (require 'agda2-highlight) (require 'agda2-abbrevs) (require 'agda2-queue) (eval-and-compile ;; Load filladapt, if it is installed. (condition-case nil (require 'filladapt) (error nil)) (unless (fboundp 'overlays-in) (load "overlay")) ; for Xemacs (unless (fboundp 'propertize) ; for Xemacs 21.4 ;; FIXME: XEmacs-21.4 (patch 22) does have `propertize' and so does Emacs-22 ;; (and agda2-mode doesn't work in Emacs-21, AFAICT). (defun propertize (string &rest properties) "Return a copy of STRING with text properties added. First argument is the string to copy. Remaining arguments form a sequence of PROPERTY VALUE pairs for text properties to add to the result." (let ((str (copy-sequence string))) (add-text-properties 0 (length str) properties str) str))) (unless (fboundp 'prog-mode) ;For Emacs<24. (defalias 'prog-mode 'fundamental-mode))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Utilities (defmacro agda2-let (varbind funcbind &rest body) "Expands to (let* VARBIND (cl-labels FUNCBIND BODY...)). Or possibly (let* VARBIND (labels FUNCBIND BODY...))." (declare (debug ((&rest [&or symbolp (symbolp form)]) (&rest (cl-defun)) body)) (indent 2)) ;; Use cl-labels if available to avoid obsolescence warnings. `(let* ,varbind (,(if (fboundp 'cl-labels) 'cl-labels 'labels) ,funcbind ,@body))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; User options (defgroup agda2 nil "Major mode for interactively developing Agda programs." :group 'languages) (defcustom agda2-program-name "agda" "The name of the Agda executable." :type 'string :group 'agda2) (defcustom agda2-program-args nil "Command-line arguments given to the Agda executable (one per string). Note: Do not give several arguments in the same string. The flag \"--interaction\" is always included as the first argument, and does not need to be listed here." :type '(repeat string) :group 'agda2) (defvar agda2-backends '("GHC" "GHCNoMain" "JS" "LaTeX" "QuickLaTeX") "Compilation backends.") (defcustom agda2-backend "" "The backend used to compile Agda programs (leave blank to ask every time)." :type 'string :group 'agda2) (defcustom agda2-toplevel-module "Agda.Interaction.GhciTop" "The name of the Agda toplevel module." :type 'string :group 'agda2) (defcustom agda2-information-window-max-height 0.35 "The maximum height of the information window. A multiple of the frame height." :type 'number :group 'agda2) (defcustom agda2-fontset-name (unless (or (eq window-system 'mac) ;; Emacs-23 uses a revamped font engine which should ;; make agda2-fontset-name unnecessary in most cases. ;; And if it turns out to be necessary, we should ;; probably use face-remapping-alist rather than ;; set-frame-font so the special font only applies to ;; Agda buffers, and so it applies in all frames where ;; Agda buffers are displayed. (boundp 'face-remapping-alist)) "fontset-agda2") "Default font to use in the selected frame when activating the Agda mode. This is only used if it's non-nil and Emacs is not running in a terminal. Note that this setting (if non-nil) affects non-Agda buffers as well, and that you have to restart Emacs if you want settings to this variable to take effect." :type '(choice (string :tag "Fontset name") (const :tag "Do not change the font" nil)) :group 'agda2) (defcustom agda2-fontset-spec-of-fontset-agda2 "-*-fixed-Medium-r-Normal-*-18-*-*-*-c-*-fontset-agda2, ascii:-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO8859-1, latin-iso8859-2:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-2, latin-iso8859-3:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-3, latin-iso8859-4:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-4, cyrillic-iso8859-5:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-5, greek-iso8859-7:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-7, latin-iso8859-9:-*-Fixed-*-r-*-*-18-*-*-*-c-*-iso8859-9, mule-unicode-0100-24ff:-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1, mule-unicode-2500-33ff:-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1, mule-unicode-e000-ffff:-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1, japanese-jisx0208:-Misc-Fixed-Medium-R-Normal-ja-18-*-*-*-C-*-JISX0208.1990-0, japanese-jisx0212:-Misc-Fixed-Medium-R-Normal-ja-18-*-*-*-C-*-JISX0212.1990-0, thai-tis620:-Misc-Fixed-Medium-R-Normal--24-240-72-72-C-120-TIS620.2529-1, lao:-Misc-Fixed-Medium-R-Normal--24-240-72-72-C-120-MuleLao-1, tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0, tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1, korean-ksc5601:-Daewoo-Mincho-Medium-R-Normal--16-120-100-100-C-160-KSC5601.1987-0, chinese-gb2312:-ISAS-Fangsong ti-Medium-R-Normal--16-160-72-72-c-160-GB2312.1980-0, chinese-cns11643-1:-HKU-Fixed-Medium-R-Normal--16-160-72-72-C-160-CNS11643.1992.1-0, chinese-big5-1:-ETen-Fixed-Medium-R-Normal--16-150-75-75-C-160-Big5.ETen-0, chinese-big5-2:-ETen-Fixed-Medium-R-Normal--16-150-75-75-C-160-Big5.ETen-0" "Specification of the \"fontset-agda2\" fontset. This fontset is only created if `agda2-fontset-name' is \"fontset-agda2\" and Emacs is not run in a terminal. Note that the text \"fontset-agda2\" has to be part of the string (in a certain way; see the default setting) in order for the agda2 fontset to be created properly. Note also that the default setting may not work unless suitable fonts are installed on your system. Refer to the README file accompanying the Agda distribution for more details. Note finally that you have to restart Emacs if you want settings to this variable to take effect." :group 'agda2 :type 'string) (if (and (equal agda2-fontset-name "fontset-agda2") window-system) (create-fontset-from-fontset-spec agda2-fontset-spec-of-fontset-agda2 t t)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Global and buffer-local vars, initialization (defvar agda2-mode-syntax-table (let ((tbl (make-syntax-table))) ;; Set the syntax of every char to "w" except for those whose default ;; syntax in `standard-syntax-table' is `paren' or `whitespace'. (map-char-table (lambda (keys val) ;; `keys' here can be a normal char, a generic char ;; (Emacs<23), or a char range (Emacs>=23). (unless (memq (car val) (eval-when-compile (mapcar 'car (list (string-to-syntax "(") (string-to-syntax ")") (string-to-syntax " "))))) (modify-syntax-entry keys "w" tbl))) (standard-syntax-table)) ;; Then override the remaining special cases. (dolist (cs '((?{ . "(}1n") (?} . "){4n") (?- . "w 123b") (?\n . "> b") (?. . ".") (?\; . ".") (?! . "."))) (modify-syntax-entry (car cs) (cdr cs) tbl)) tbl) "Syntax table used by the Agda mode: {} | Comment characters, matching parentheses. - | Comment character, word constituent. \n | Comment ender. .;! | Punctuation. Remaining characters inherit their syntax classes from the standard syntax table if that table treats them as matching parentheses or whitespace. Otherwise they are treated as word constituents.") (defconst agda2-command-table `( (agda2-load "\C-c\C-l" (global) "Load") (agda2-load "\C-c\C-x\C-l") (agda2-compile "\C-c\C-x\C-c" (global) "Compile") (agda2-quit "\C-c\C-x\C-q" (global) "Quit") (agda2-restart "\C-c\C-x\C-r" (global) "Kill and restart Agda") (agda2-abort "\C-c\C-x\C-a" (global) "Abort a command") (agda2-remove-annotations "\C-c\C-x\C-d" (global) "Remove goals and highlighting (\"deactivate\")") (agda2-display-implicit-arguments "\C-c\C-x\C-h" (global) "Toggle display of hidden arguments") (agda2-show-constraints ,(kbd "C-c C-=") (global) "Show constraints") (agda2-solve-maybe-all ,(kbd "C-c C-s") (local global) "Solve constraints") (agda2-show-goals ,(kbd "C-c C-?") (global) "Show goals") (agda2-next-goal "\C-c\C-f" (global) "Next goal") ; Forward. (agda2-previous-goal "\C-c\C-b" (global) "Previous goal") ; Back. (agda2-give ,(kbd "C-c C-SPC") (local) "Give") (agda2-elaborate-give ,(kbd "C-c C-m") (local) "Elaborate and Give") (agda2-refine "\C-c\C-r" (local) "Refine") (agda2-auto-maybe-all "\C-c\C-a" (local global) "Auto") (agda2-make-case "\C-c\C-c" (local) "Case") (agda2-goal-type "\C-c\C-t" (local) "Goal type") (agda2-show-context "\C-c\C-e" (local) "Context (environment)") (agda2-helper-function-type "\C-c\C-h" (local) "Helper function type") (agda2-infer-type-maybe-toplevel "\C-c\C-d" (local global) "Infer (deduce) type") (agda2-why-in-scope-maybe-toplevel "\C-c\C-w" (local global) "Explain why a particular name is in scope") (agda2-goal-and-context ,(kbd "C-c C-,") (local) "Goal type and context") (agda2-goal-and-context-and-inferred ,(kbd "C-c C-.") (local) "Goal type, context and inferred type") (agda2-goal-and-context-and-checked ,(kbd "C-c C-;") (local) "Goal type, context and checked type") (agda2-search-about-toplevel ,(kbd "C-c C-z") (local global) "Search About") (agda2-module-contents-maybe-toplevel ,(kbd "C-c C-o") (local global) "Module contents") (agda2-compute-normalised-maybe-toplevel "\C-c\C-n" (local global) "Evaluate term to normal form") (describe-char nil (global) "Information about the character at point") (agda2-comment-dwim-rest-of-buffer ,(kbd "C-c C-x M-;") (global) "Comment/uncomment the rest of the buffer") (agda2-display-program-version nil (global) "Version") (agda2-set-program-version "\C-c\C-x\C-s" (global) "Switch to another version of Agda") (eri-indent ,(kbd "TAB")) (eri-indent-reverse [S-iso-lefttab]) (eri-indent-reverse [S-lefttab]) (eri-indent-reverse [S-tab]) (agda2-goto-definition-mouse [mouse-2]) (agda2-goto-definition-keyboard "\M-.") (agda2-go-back ,(if (version< emacs-version "25.1") "\M-*" "\M-,")) ) "Table of commands, used to build keymaps and menus. Each element has the form (CMD &optional KEYS WHERE DESC) where CMD is a command; KEYS is its key binding (if any); WHERE is a list which should contain 'local if the command should exist in the goal menu and 'global if the command should exist in the main menu; and DESC is the description of the command used in the menus.") (defvar agda2-mode-map (let ((map (make-sparse-keymap "Agda mode"))) (define-key map [menu-bar Agda] (cons "Agda" (make-sparse-keymap "Agda"))) (define-key map [down-mouse-3] 'agda2-popup-menu-3) (dolist (d (reverse agda2-command-table)) (destructuring-bind (f &optional keys kinds desc) d (if keys (define-key map keys f)) (if (member 'global kinds) (define-key map (vector 'menu-bar 'Agda (intern desc)) (cons desc f))))) map) "Keymap for `agda2-mode'.") (defvar agda2-goal-map (let ((map (make-sparse-keymap "Agda goal"))) (dolist (d (reverse agda2-command-table)) (destructuring-bind (f &optional keys kinds desc) d (if (member 'local kinds) (define-key map (vector (intern desc)) (cons desc f))))) map) "Keymap for agda2 goal menu.") (defvar agda2-info-buffer nil "Agda information buffer.") (defvar agda2-process-buffer nil "Agda subprocess buffer. Set in `agda2-restart'.") (defvar agda2-process nil "Agda subprocess. Set in `agda2-restart'.") (defvar agda2-in-progress nil "Is the Agda process currently busy? Valid values: `nil' (not busy), `busy' (busy), `not-so-busy' (busy with something that should typically terminate fairly quickly).") ;; Some buffer locals (defvar agda2-buffer-external-status "" "External status of an `agda2-mode' buffer (dictated by the Haskell side).") (make-variable-buffer-local 'agda2-buffer-external-status) (defvar agda2-output-prompt "Agda2> " "The Agda2 buffer's prompt.") (defconst agda2-help-address "" "Address accepting submissions of bug reports and questions.") ;; Annotation for a goal ;; {! .... !} ;; ---------- overlay: agda2-gn num, face highlight, after-string num, ;; modification-hooks (agda2-protect-goal-markers) ;; - text-props: category agda2-delim1 ;; - text-props: category agda2-delim2 ;; - text-props: category agda2-delim3 ;; - text-props: category agda2-delim4 ;; ;; Char categories for {! ... !} (defvar agda2-open-brace "{") (defvar agda2-close-brace " }") (setplist 'agda2-delim1 `(display ,agda2-open-brace)) (setplist 'agda2-delim2 `(display ,agda2-open-brace rear-nonsticky t agda2-delim2 t)) (setplist 'agda2-delim3 `(display ,agda2-close-brace agda2-delim3 t)) (setplist 'agda2-delim4 `(display ,agda2-close-brace rear-nonsticky t)) ;; Note that strings used with the display property are compared by ;; reference. If the agda2-*-brace definitions were inlined, then ;; goals would be displayed as "{{ }}n" instead of "{ }n". (defvar agda2-measure-data nil "Used by `agda2-measure-load-time'. This value is either nil or a pair containing a continuation (or nil) and the time at which the measurement was started.") (make-variable-buffer-local 'agda2-measure-data) ;; The following variables are used by the filter process, ;; `agda2-output-filter'. Their values are only modified by the filter ;; process, `agda2-go', `agda2-restart', `agda2-abort-highlighting', ;; and `agda2-abort-done'. (defvar agda2-output-chunk-incomplete (agda2-queue-empty) "Buffer for incomplete lines. \(See `agda2-output-filter'.)") (make-variable-buffer-local 'agda2-output-chunk-incomplete) (defvar agda2-last-responses nil "Response commands which should be run after other commands. The command which arrived last is stored first in the list.") (make-variable-buffer-local 'agda2-last-responses) (defvar agda2-file-buffer nil "The Agda buffer. Note that this variable is not buffer-local.") (defvar agda2-in-agda2-file-buffer nil "Was `agda2-file-buffer' active when `agda2-output-filter' started? Note that this variable is not buffer-local.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; agda2-mode ;;;###autoload (add-to-list 'auto-mode-alist '("\\.l?agda\\'" . agda2-mode)) ;;;###autoload (modify-coding-system-alist 'file "\\.l?agda\\'" 'utf-8) ;;;###autoload (define-derived-mode agda2-mode prog-mode "Agda" "Major mode for Agda files. The following paragraph does not apply to Emacs 23 or newer. Note that when this mode is activated the default font of the current frame is changed to the fontset `agda2-fontset-name'. The reason is that Agda programs often use mathematical symbols and other Unicode characters, so we try to provide a suitable default font setting, which can display many of the characters encountered. If you prefer to use your own settings, set `agda2-fontset-name' to nil. Special commands: \\{agda2-mode-map}" (if (boundp 'agda2-include-dirs) (display-warning 'agda2 "Note that the variable agda2-include-dirs is no longer used. You may want to update your configuration. You have at least two choices: * Use the library management system. * Set the include path using agda2-program-args. One way to avoid seeing this warning is to make sure that agda2-include-dirs is not bound." :warning)) (setq local-abbrev-table agda2-mode-abbrev-table indent-tabs-mode nil mode-line-process '((:eval (unless (eq 0 (length agda2-buffer-external-status)) (concat ":" agda2-buffer-external-status))))) (let ((l '(max-specpdl-size 2600 max-lisp-eval-depth 2800))) (while l (set (make-local-variable (pop l)) (pop l)))) (if (and window-system agda2-fontset-name) (condition-case nil (set-frame-font agda2-fontset-name) (error (error "Unable to change the font; change agda2-fontset-name or tweak agda2-fontset-spec-of-fontset-agda2")))) ;; Deactivate highlighting if the buffer is edited before ;; typechecking is complete. (add-hook 'first-change-hook 'agda2-abort-highlighting nil 'local) ;; If Agda is not running syntax highlighting does not work properly. (unless (eq 'run (agda2-process-status)) (agda2-restart)) ;; Make sure that Font Lock mode is not used. (font-lock-mode 0) (agda2-highlight-setup) (condition-case err (agda2-highlight-reload) (error (message "Highlighting not loaded: %s" (error-message-string err)))) (agda2-comments-and-paragraphs-setup) (force-mode-line-update) ;; Protect global value of default-input-method from set-input-method. (make-local-variable 'default-input-method) ;; Don't take script into account when determining word boundaries (set (make-local-variable 'word-combining-categories) (cons '(nil . nil) word-combining-categories)) (set-input-method "Agda") ;; Highlighting etc. is removed when we switch from the Agda mode. ;; Use case: When a file M.lagda with a local variables list ;; including "mode: latex" is loaded chances are that the Agda mode ;; is activated before the LaTeX mode, and the LaTeX mode does not ;; seem to remove the text properties set by the Agda mode. (add-hook 'change-major-mode-hook 'agda2-quit nil 'local)) (defun agda2-restart () "Tries to start or restart the Agda process." (interactive) ;; Kill any running instance of the Agda process. (condition-case nil (agda2-term) (error nil)) ;; Check that the right version of Agda is used. (let* ((coding-system-for-read 'utf-8) (output (with-output-to-string (call-process agda2-program-name nil standard-output nil "--version"))) (version (and (string-match "^Agda version \\([0-9.]+\\)" output) (match-string 1 output)))) (unless (equal version agda2-version) (error "The Agda mode's version (%s) does not match that of %s (%s)." agda2-version agda2-program-name (or version "unknown")))) (let ((all-program-args (cons "--interaction" agda2-program-args))) ;; Check that the arguments are not malformed. (let* ((coding-system-for-read 'utf-8) (status) (output (with-output-to-string (setq status (apply 'call-process agda2-program-name nil standard-output nil all-program-args))))) (unless (equal status 0) (error "Failed to start the Agda process:\n%s" output))) ;; Start the Agda process. (let ((agda2-bufname "*agda2*")) (let ((process-connection-type nil)) ; Pipes are faster than PTYs. (setq agda2-process (apply 'start-process "Agda2" agda2-bufname agda2-program-name all-program-args))) (set-process-coding-system agda2-process 'utf-8 'utf-8) (set-process-query-on-exit-flag agda2-process nil) (set-process-filter agda2-process 'agda2-output-filter) (setq agda2-in-progress nil agda2-file-buffer (current-buffer)) (with-current-buffer agda2-bufname (setq agda2-process-buffer (current-buffer) mode-name "Agda executable" agda2-last-responses nil) (set-buffer-file-coding-system 'utf-8)) (agda2-remove-annotations)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Communicating with Agda (defun agda2-raise-error () "Raises an error. The error message directs the user to the *agda2* buffer." (error "Problem encountered. The *agda2* buffer can perhaps explain why.")) (defun agda2-running-p nil "Does the *agda2* buffer exist, and is the Agda2 process running?" (and (buffer-live-p agda2-process-buffer) (eq (agda2-process-status) 'run))) (defun agda2-send-command (restart &rest args) "Send a command to the Agda process. Sends the list of strings ARGS to the process. If RESTART is non-nil and the process is not running, or the *agda2* buffer does not exist, then an attempt is made to restart the process." (when (and restart (not (agda2-running-p))) ;; Try restarting automatically, but only once, in case there is ;; some major problem. (agda2-restart) (unless (agda2-running-p) (agda2-raise-error))) (let ((command (apply 'concat (agda2-intersperse " " args)))) (with-current-buffer agda2-process-buffer (goto-char (point-max)) (insert command) (insert "\n") (process-send-string agda2-process (concat command "\n"))))) (defun agda2-go (save highlight how-busy do-abort &rest args) "Executes commands in the Agda2 interpreter. Sends the list of strings ARGS to the Agda2 interpreter, waits for output and executes the responses, if any. If SAVE is 'save, then the buffer is saved first. If HIGHLIGHT is non-nil, then the buffer's syntax highlighting may be updated. This is also the case if the Agda process is busy (or `not-so-busy') and `agda2-highlight-in-process' is non-nil. The value HOW-BUSY should be `busy' if it should not be possible to invoke other commands while this command is running (with the exception of commands for which DO-ABORT is nil). Otherwise it should be `not-so-busy' (which should only be used for commands that typically terminate fairly quickly). If the Agda process is busy (or `not-so-busy'), and the current buffer does not match `agda2-file-buffer', then the command is not executed and an error is raised. The same applies if DO-ABORT is non-nil and the Agda process is `busy'." ; Check that how-busy is well-formed. (assert (or (equal how-busy 'busy) (equal how-busy 'not-so-busy))) (when (and agda2-in-progress (not (equal agda2-file-buffer (current-buffer)))) (error "Agda is busy with something in the buffer %s" agda2-file-buffer)) (when (and do-abort (equal agda2-in-progress 'busy)) (error "Agda is busy with something \(you have the option to abort or restart Agda)")) (setq agda2-file-buffer (current-buffer)) (setq agda2-highlight-in-progress (or highlight (and agda2-in-progress agda2-highlight-in-progress))) (unless agda2-in-progress (setq agda2-output-chunk-incomplete (agda2-queue-empty))) (setq agda2-in-progress (if (or (equal how-busy 'busy) (equal agda2-in-progress 'busy)) 'busy 'not-so-busy)) (when (equal save 'save) (save-buffer)) (apply 'agda2-send-command 'restart "IOTCM" (agda2-string-quote (buffer-file-name)) (if highlight (agda2-highlight-level) "None") "Indirect" "(" (append args '(")")))) (defun agda2-abort () "Tries to abort the current computation, if any. May be more efficient than restarting Agda." (interactive) (agda2-send-command nil "IOTCM" (agda2-string-quote (buffer-file-name)) "None" "Indirect" "Cmd_abort")) (defun agda2-abort-done () "Removes annotations, resets certain variables. Intended to be used by the backend if an abort command was successful." (agda2-remove-annotations) (setq agda2-highlight-in-progress nil agda2-last-responses nil)) (defun agda2-output-filter (proc chunk) "Evaluate the Agda process's commands. This filter function assumes that every line contains either some kind of error message (which cannot be parsed as a list), or exactly one command. Incomplete lines are stored in a buffer (`agda2-output-chunk-incomplete'). Every command is run by this function, unless it has the form \"(('last . priority) . cmd)\", in which case it is run by `agda2-run-last-commands' at the end, after the Agda2 prompt has reappeared, after all non-last commands, and after all interactive highlighting is complete. The last commands can have different integer priorities; those with the lowest priority are executed first. Non-last commands should not call the Agda process. All commands are echoed to the *agda2* buffer, with the exception of commands of the form \"(agda2-highlight-... ...)\". The non-last commands are run in the order in which they appear. When the prompt has been reached highlighting annotations are reloaded from `agda2-highlighting-file', unless `agda2-highlighting-in-progress' is nil." ;; Beware: the buffer may have been killed in the mean time. E.g. when ;; viewing an attachment containing Agda code in Gnus, Gnus will ;; create a temp buffer, set it in agda2-mode, call font-lock-ensure on it ;; (which won't know that it needs to wait for some process to reply), then ;; extract the fontified text and kill the temp buffer; so when Agda ;; finally answers, the temp buffer is long gone. (when (buffer-live-p agda2-file-buffer) (setq agda2-in-agda2-file-buffer (and agda2-file-buffer (equal (current-buffer) agda2-file-buffer))) (let (;; The input lines in the current chunk. (lines (split-string chunk "\n")) ;; Non-last commands found in the current chunk (reversed). (non-last-commands ()) ;; Last incomplete line, if any. (output-chunk-incomplete "")) (with-current-buffer agda2-file-buffer (when (consp lines) (agda2-queue-enqueue agda2-output-chunk-incomplete (pop lines)) (when (consp lines) ;; The previous uncomplete chunk is now complete. (push (agda2-queue-to-string agda2-output-chunk-incomplete) lines) ;; Stash away the last incomplete line, if any. (Note that ;; (split-string "...\n" "\n") evaluates to (... "").) (setq output-chunk-incomplete (car (last lines)) agda2-output-chunk-incomplete (agda2-queue-from-string output-chunk-incomplete)) ;; Handle every complete line. (dolist (line (butlast lines)) (let* (;; The command. Lines which cannot be parsed as a single ;; list, without any junk, are ignored. (cmd (condition-case nil (let ((result (read-from-string line))) (if (and (listp (car result)) (= (cdr result) (length line))) (car result))) (error nil))) (is-highlighting-command (and cmd (symbolp (car cmd)) (let ((case-fold-search nil)) (string-match "^agda2-highlight-" (symbol-name (car cmd))))))) ;; Do not echo highlighting commands. (unless is-highlighting-command (with-current-buffer agda2-process-buffer (save-excursion (goto-char (point-max)) (insert line) (insert "\n")))) (when cmd (if (equal 'last (car-safe (car cmd))) (push (cons (cdr (car cmd)) (cdr cmd)) agda2-last-responses) (push cmd non-last-commands))))) ;; Run non-last commands. (mapc 'agda2-exec-response (nreverse non-last-commands))) ;; Check if the prompt has been reached. This function assumes ;; that the prompt does not include any newline characters. (when (agda2-queue-is-prefix-of agda2-output-prompt agda2-output-chunk-incomplete) (with-current-buffer agda2-process-buffer (insert output-chunk-incomplete)) (setq agda2-output-chunk-incomplete (agda2-queue-empty) agda2-in-progress nil agda2-last-responses (nreverse agda2-last-responses)) (agda2-run-last-commands) (when agda2-measure-data (let ((elapsed (format "%.2fs" (float-time (time-since (cdr agda2-measure-data))))) (continuation (car agda2-measure-data))) (setq agda2-measure-data nil) (message "Load time: %s." elapsed) (when continuation (funcall continuation elapsed)))))))))) (defun agda2-run-last-commands nil "Execute the last commands in the right order. \(After the prompt has reappeared.) See `agda2-output-filter'." ;; with-current-buffer is used repeatedly below, because some last ;; commands may switch the focus to another buffer. (while (with-current-buffer agda2-file-buffer (and (not agda2-in-progress) (consp agda2-last-responses))) (with-current-buffer agda2-file-buffer ;; The list is sorted repeatedly because this function may be ;; called recursively (via `agda2-exec-response'). (setq agda2-last-responses (sort agda2-last-responses (lambda (x y) (<= (car x) (car y))))) (let ((r (pop agda2-last-responses))) (agda2-exec-response (cdr r))))) ;; Unset agda2-highlight-in-progress when all the asynchronous ;; commands have terminated. (unless agda2-in-progress (setq agda2-highlight-in-progress nil))) (defun agda2-abort-highlighting nil "Abort any interactive highlighting. This function should be used in `first-change-hook'." (when agda2-highlight-in-progress (setq agda2-highlight-in-progress nil) (message "\"%s\" has been modified. Interrupting highlighting." (buffer-name (current-buffer))))) (defun agda2-goal-cmd (cmd save &optional want ask &rest args) "Reads input from goal or minibuffer and sends command to Agda. An error is raised if point is not in a goal. The command sent to Agda is CMD ARGS. The user input is computed as follows: * If WANT is nil, then the user input is the empty string. * If WANT is a string, and either ASK is non-nil or the goal only contains whitespace, then the input is taken from the minibuffer. In this case WANT is used as the prompt string. * Otherwise (including if WANT is 'goal) the goal contents are used. If the user input is not taken from the goal, then an empty goal range is given. If SAVE is 'save, then the buffer is saved just before the command is sent to Agda (if it is sent)." (multiple-value-bind (o g) (agda2-goal-at (point)) (unless g (error "For this command, please place the cursor in a goal")) (let ((txt (buffer-substring-no-properties (+ (overlay-start o) 2) (- (overlay-end o) 2))) (input-from-goal nil)) (cond ((null want) (setq txt "")) ((and (stringp want) (or ask (string-match "\\`\\s *\\'" txt))) (setq txt (read-string (concat want ": ") nil nil txt t))) (t (setq input-from-goal t))) (apply 'agda2-go save input-from-goal 'busy t cmd (format "%d" g) (if input-from-goal (agda2-goal-Range o) (agda2-mkRange nil)) (agda2-string-quote txt) args)))) ;; Note that the following function is a security risk, since it ;; evaluates code without first inspecting it. The code (supposedly) ;; comes from the Agda backend, but there could be bugs in the backend ;; which can be exploited by an attacker which manages to trick ;; someone into type-checking compromised Agda code. (defun agda2-exec-response (response) "Interprets response." (let ((inhibit-read-only t)) (eval response))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; User commands and response processing (defun agda2-load () "Load current buffer." (interactive) (agda2-go 'save t 'busy t "Cmd_load" (agda2-string-quote (buffer-file-name)) (agda2-list-quote agda2-program-args) )) (defun agda2-measure-load-time (&optional highlighting-level continuation) "Load the current buffer and print how much time it takes. \(Wall-clock time.) The given HIGHLIGHTING-LEVEL is used (if non-nil). If CONTINUATION is non-nil, then CONTINUATION is applied to the resulting time (represented as a string)." (interactive) (when agda2-in-progress (error "Agda is busy with something")) (let* ((agda2-highlight-level (or highlighting-level agda2-highlight-level))) (setq agda2-measure-data (cons continuation (current-time))) (agda2-load))) (defun agda2-compile () "Compile the current module. The variable `agda2-backend' determines which backend is used." (interactive) (let ((backend (cond ((equal agda2-backend "MAlonzo") "GHC") ((equal agda2-backend "MAlonzoNoMain") "GHCNoMain") ((equal agda2-backend "") (completing-read "Backend: " agda2-backends nil nil nil nil nil 'inherit-input-method)) (t agda2-backend)))) (when (equal backend "") (error "No backend chosen")) (agda2-go 'save t 'busy t "Cmd_compile" backend (agda2-string-quote (buffer-file-name)) (agda2-list-quote agda2-program-args) ))) (defmacro agda2-maybe-forced (name comment cmd save want) "This macro constructs a function NAME which runs CMD. COMMENT is used to build the function's comment. The function NAME takes a prefix argument which tells whether it should apply force or not when running CMD (through `agda2-goal-cmd'; SAVE is used as `agda2-goal-cmd's SAVE argument and WANT is used as `agda2-goal-cmd's WANT argument)." (let ((eval (make-symbol "eval"))) `(defun ,name (&optional prefix) ,(concat comment ". The action depends on the prefix argument: * If the prefix argument is `nil' (i.e., if no prefix argument is given), then no force is applied. * If any other prefix argument is used (for instance, if C-u is typed once or twice right before the command is invoked), then force is applied.") (interactive "P") (let ((,eval (cond ((equal prefix nil) "WithoutForce") ("WithForce")))) (agda2-goal-cmd (concat ,cmd " " ,eval) ,save ,want))))) (agda2-maybe-forced agda2-give "Give to the goal at point the expression in it" "Cmd_give" 'save "expression to give") ;; (defun agda2-give() ;; "Give to the goal at point the expression in it" (interactive) ;; (agda2-goal-cmd "Cmd_give" 'save "expression to give")) (defun agda2-give-action (old-g paren) "Update the goal OLD-G with the expression in it." (let ;; Don't run modification hooks: we don't want this to ;; trigger agda2-abort-highlighting. ((inhibit-modification-hooks t)) (agda2-update old-g paren))) (defun agda2-refine (pmlambda) "Refine the goal at point. If the goal contains an expression e, and some \"suffix\" of the type of e unifies with the goal type, then the goal is replaced by e applied to a suitable number of new goals. PMLAMBDA is only used if the goal has a functional type. When the prefix argument is given a pattern maching lambda will be inserted, otherwise a standard lambda will be used. If the goal is empty, the goal type is a data type, and there is exactly one constructor which unifies with this type, then the goal is replaced by the constructor applied to a suitable number of new goals." (interactive "P") (if pmlambda (agda2-goal-cmd "Cmd_refine_or_intro True" 'save 'goal) (agda2-goal-cmd "Cmd_refine_or_intro False" 'save 'goal))) (defun agda2-autoOne () "Simple proof search" (interactive) (agda2-goal-cmd "Cmd_autoOne" 'save 'goal)) (defun agda2-autoAll () (interactive) "Solves all goals by simple proof search." (agda2-go nil nil 'busy t "Cmd_autoAll") ) (defun agda2-make-case () "Refine the pattern variables given in the goal. Assumes that = {!!} is on one line." (interactive) (agda2-goal-cmd "Cmd_make_case" 'save "pattern variables to case (empty for split on result)")) (defun agda2-make-case-action (newcls) "Replace the line at point with new clauses NEWCLS and reload." (agda2-forget-all-goals);; we reload later anyway. (let* ((p0 (point)) ;; (p1 (goto-char (agda2-decl-beginning))) (p1 (goto-char (+ (current-indentation) (line-beginning-position)))) (indent (current-column)) cl) (goto-char p0) (re-search-forward "!}" (line-end-position) 'noerr) (delete-region p1 (point)) (while (setq cl (pop newcls)) (insert cl) (if newcls (insert "\n" (make-string indent ? )))) (goto-char p1)) (agda2-load)) (defun agda2-make-case-action-extendlam (newcls) "Replace definition of extended lambda with new clauses NEWCLS and reload." (agda2-forget-all-goals);; we reload later anyway. (let* ((p0 (point)) (pmax (re-search-forward "!}")) (bracketCount 0) (p1 (goto-char (+ (current-indentation) (line-beginning-position)))) (indent (current-column)) cl) (goto-char p0) (re-search-backward "{!") (while (and (not (equal (preceding-char) ?\;)) (>= bracketCount 0) (> (point) p1)) (backward-char) (if (equal (preceding-char) ?}) (incf bracketCount)) (if (equal (preceding-char) ?{) (decf bracketCount))) (let* ((is-lambda-where (= (point) p1)) (p (point))) (delete-region (point) pmax) (if (not is-lambda-where) (insert " ")) (while (setq cl (pop newcls)) (insert cl) (if newcls (if is-lambda-where (insert "\n" (make-string indent ? )) (insert " ; ")))) (goto-char p))) (agda2-load)) (defun agda2-status-action (status) "Display the string STATUS in the current buffer's mode line. \(precondition: the current buffer has to use the Agda mode as the major mode)." (setq agda2-buffer-external-status status) (force-mode-line-update)) (defmacro agda2-information-buffer (buffer kind title) "Used to define functions like `agda2-info-buffer'." `(defun ,buffer nil ,(concat "Creates the Agda " kind " buffer, if it does not already exist. The buffer is returned.") (unless (buffer-live-p ,buffer) (setq ,buffer (generate-new-buffer ,title)) (with-current-buffer ,buffer (compilation-mode "AgdaInfo") ;; Support for jumping to positions mentioned in the text. (set (make-local-variable 'compilation-error-regexp-alist) '(("\\([\\\\/][^[:space:]]*\\):\\([0-9]+\\),\\([0-9]+\\)-\\(\\([0-9]+\\),\\)?\\([0-9]+\\)" 1 (2 . 5) (3 . 6)))) ;; Do not skip errors that start in the same position as the ;; current one. (set (make-local-variable 'compilation-skip-to-next-location) nil) ;; No support for recompilation. The key binding is removed, and ;; attempts to run `recompile' will (hopefully) result in an ;; error. (let ((map (copy-keymap (current-local-map)))) (define-key map (kbd "g") 'undefined) (use-local-map map)) (set (make-local-variable 'compile-command) 'agda2-does-not-support-compilation-via-the-compilation-mode) (set-syntax-table agda2-mode-syntax-table) (set (make-local-variable 'word-combining-categories) (cons '(nil . nil) word-combining-categories)) (set-input-method "Agda"))) ,buffer)) (agda2-information-buffer agda2-info-buffer "info" "*Agda information*") (defun agda2-info-action (name text &optional append) "Insert TEXT into the Agda info buffer and display it. NAME is displayed in the buffer's mode line. If APPEND is non-nil, then TEXT is appended at the end of the buffer, and point placed after this text. If APPEND is nil, then any previous text is removed before TEXT is inserted, and point is placed before this text." (interactive) (let ((buf (agda2-info-buffer))) (with-current-buffer buf ;; In some cases the jump-to-position-mentioned-in-text ;; functionality (see compilation-error-regexp-alist above) ;; didn't work: Emacs jumped to the wrong position. However, it ;; seems to work if compilation-forget-errors is used. This ;; problem may be related to Emacs bug #9679 ;; (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9679). The idea ;; to use compilation-forget-errors comes from a comment due to ;; Oleksandr Manzyuk ;; (https://github.com/haskell/haskell-mode/issues/67). (compilation-forget-errors) (unless append (erase-buffer)) (save-excursion (goto-char (point-max)) (insert text)) (put-text-property 0 (length name) 'face '(:weight bold) name) (setq mode-line-buffer-identification name) (force-mode-line-update)) ;; If the current window displays the information buffer, then the ;; window configuration is left untouched. (unless (equal (window-buffer) buf) (let ((agda-window (and agda2-file-buffer (car-safe ;; All windows, including minibuffers, on any ;; frame on the current terminal, displaying the ;; present Agda file buffer. (get-buffer-window-list agda2-file-buffer t 0))))) (save-selected-window ;; Select a window displaying the Agda file buffer (if such ;; a window exists). With certain configurations of ;; display-buffer this should increase the likelihood that ;; the info buffer will be displayed on the same frame. (when agda-window (select-window agda-window 'no-record)) (let* (;; If there is only one window, then the info window ;; should be created above or below the code window, ;; not to the left or right. (split-width-threshold nil) (window (display-buffer buf ;; Under Emacs 23 the effect of the following ;; argument is only that the current window ;; should not be used. '(nil . (;; Do not use the same window. (inhibit-same-window . t) ;; Do not raise or select another frame. (inhibit-switch-frame . t)))))) (if window (fit-window-to-buffer window (truncate (* (frame-height) agda2-information-window-max-height)))))))) ;; Move point in every window displaying the information buffer. ;; Exception: If we are appending, don't move point in selected ;; windows. (dolist (window (get-buffer-window-list buf 'no-minibuffer t)) (unless (and append (equal window (selected-window))) (with-selected-window window (if append (goto-char (point-max)) (goto-char (point-min)))))))) (defun agda2-info-action-and-copy (name text &optional append) "Same as agda2-info-action but also puts TEXT in the kill ring." (kill-new text) (agda2-info-action name text append)) (defun agda2-show-goals() "Show all goals." (interactive) (agda2-go nil t 'busy t "Cmd_metas")) (defun agda2-show-constraints() "Show constraints." (interactive) (agda2-go nil t 'busy t "Cmd_constraints")) (defun agda2-remove-annotations () "Removes buffer annotations (overlays and text properties)." (interactive) (dolist (o (overlays-in (point-min) (point-max))) (delete-overlay o)) (let ((inhibit-read-only t)) (annotation-preserve-mod-p-and-undo (set-text-properties (point-min) (point-max) '())) (force-mode-line-update))) (defun agda2-next-goal () "Go to the next goal, if any." (interactive) (agda2-mv-goal 'next-single-property-change 'agda2-delim2 1 (point-min))) (defun agda2-previous-goal () "Go to the previous goal, if any." (interactive) (agda2-mv-goal 'previous-single-property-change 'agda2-delim3 0 (point-max))) (defun agda2-mv-goal (change delim adjust wrapped) (agda2-let () ((go (p) (while (and (setq p (funcall change p 'category)) (not (eq (get-text-property p 'category) delim)))) (if p (goto-char (+ adjust p))))) (or (go (point)) (go wrapped) (message "No goals in the buffer")))) (defun agda2-quit () "Quit and clean up after agda2." (interactive) (remove-hook 'first-change-hook 'agda2-abort-highlighting 'local) (remove-hook 'after-save-hook 'agda2-highlight-tokens 'local) (agda2-remove-annotations) (agda2-term)) (defun agda2-term () "Interrupt the Agda process and kill its buffer." (interactive) (when (and agda2-process (process-status agda2-process)) (interrupt-process agda2-process)) (when (buffer-live-p agda2-process-buffer) (kill-buffer agda2-process-buffer))) (defmacro agda2-maybe-normalised (name comment cmd want) "This macro constructs a function NAME which runs CMD. COMMENT is used to build the function's comment. The function NAME takes a prefix argument which tells whether it should normalise types or not when running CMD (through `agda2-goal-cmd'; WANT is used as `agda2-goal-cmd's WANT argument, and nil as its SAVE argument)." (let ((eval (make-symbol "eval"))) `(defun ,name (&optional prefix) ,(concat comment ". The form of the result depends on the prefix argument: * If the prefix argument is `nil' (i.e., if no prefix argument is given), then the result is simplified. * If the prefix argument is `(4)' (for instance if C-u is typed exactly once right before the command is invoked), then the result is neither explicitly normalised nor simplified. * If any other prefix argument is used (for instance if C-u is typed twice right before the command is invoked), then the result is normalised.") (interactive "P") (let ((,eval (cond ((equal prefix nil) "Simplified") ((equal prefix '(4)) "Instantiated") ("Normalised")))) (agda2-goal-cmd (concat ,cmd " " ,eval) nil ,want))))) (defmacro agda2-maybe-normalised-toplevel (name comment cmd prompt) "This macro constructs a function NAME which runs CMD. COMMENT is used to build the function's comments. The function NAME takes a prefix argument which tells whether it should normalise types or not when running CMD (through `agda2-go' nil nil 'busy t; the string PROMPT is used as the goal command prompt)." (let ((eval (make-symbol "eval"))) `(defun ,name (prefix expr) ,(concat comment ". The form of the result depends on the prefix argument: * If the prefix argument is `nil' (i.e., if no prefix argument is given), then the result is simplified. * If the prefix argument is `(4)' (for instance if C-u is typed exactly once right before the command is invoked), then the result is neither explicitly normalised nor simplified. * If any other prefix argument is used (for instance if C-u is typed twice right before the command is invoked), then the result is normalised.") (interactive ,(concat "P\nM" prompt ": ")) (let ((,eval (cond ((equal prefix nil) "Simplified") ((equal prefix '(4)) "Instantiated") ("Normalised")))) (agda2-go nil nil 'busy t (concat ,cmd " " ,eval " " (agda2-string-quote expr))))))) (defmacro agda2-maybe-normalised-global (name comment cmd) "This macro constructs a function NAME which runs CMD. COMMENT is used to build the function's comments. The function NAME takes a prefix argument which tells whether it should normalise types or not when running CMD (through `agda2-go' nil nil 'busy t;)." (let ((eval (make-symbol "eval"))) `(defun ,name (prefix) ,(concat comment ". The form of the result depends on the prefix argument: * If the prefix argument is `nil' (i.e., if no prefix argument is given), then the result is simplified. * If the prefix argument is `(4)' (for instance if C-u is typed exactly once right before the command is invoked), then the result is neither explicitly normalised nor simplified. * If any other prefix argument is used (for instance if C-u is typed twice right before the command is invoked), then the result is normalised.") (interactive "P") (let ((,eval (cond ((equal prefix nil) "AsIs") ((equal prefix '(4)) "Simplified") ("Normalised")))) (agda2-go nil nil 'busy t (concat ,cmd " " ,eval " " )))))) (agda2-maybe-normalised agda2-goal-type "Show the type of the goal at point" "Cmd_goal_type" nil) (agda2-maybe-normalised agda2-infer-type "Infer the type of the goal at point" "Cmd_infer" "expression to type") (agda2-maybe-normalised-toplevel agda2-infer-type-toplevel "Infers the type of the given expression. The scope used for the expression is that of the last point inside the current top-level module" "Cmd_infer_toplevel" "Expression") (defun agda2-infer-type-maybe-toplevel () "Infers the type of the given expression. Either uses the scope of the current goal or, if point is not in a goal, the top-level scope." (interactive) (call-interactively (if (agda2-goal-at (point)) 'agda2-infer-type 'agda2-infer-type-toplevel))) (defun agda2-why-in-scope () "Explain why something is in scope in a goal." (interactive) (agda2-goal-cmd "Cmd_why_in_scope" nil "Name")) (defun agda2-why-in-scope-toplevel (name) "Explain why something is in scope at the top level." (interactive "MName: ") (agda2-go nil nil 'busy t "Cmd_why_in_scope_toplevel" (agda2-string-quote name))) (defun agda2-why-in-scope-maybe-toplevel () "Explains why a given name is in scope." (interactive) (call-interactively (if (agda2-goal-at (point)) 'agda2-why-in-scope 'agda2-why-in-scope-toplevel))) (agda2-maybe-normalised agda2-elaborate-give "Elaborate check the given expression against the hole's type and fill in hole with the elaborated term" "Cmd_elaborate_give" "expression to elaborate and give") (agda2-maybe-normalised agda2-goal-and-context "Shows the type of the goal at point and the currect context" "Cmd_goal_type_context" nil) (agda2-maybe-normalised agda2-goal-and-context-and-inferred "Shows the context, the goal and the given expression's inferred type" "Cmd_goal_type_context_infer" "expression to type") (agda2-maybe-normalised agda2-goal-and-context-and-checked "Shows the context, the goal and check the given expression's against the hole's type" "Cmd_goal_type_context_check" "expression to type") (agda2-maybe-normalised agda2-show-context "Show the context of the goal at point" "Cmd_context" nil) (agda2-maybe-normalised agda2-helper-function-type "Compute the type of a hypothetical helper function." "Cmd_helper_function" "Expression") (agda2-maybe-normalised agda2-module-contents "Shows all the top-level names in the given module. Along with their types." "Cmd_show_module_contents" "Module name") (agda2-maybe-normalised-toplevel agda2-module-contents-toplevel "Shows all the top-level names in the given module. Along with their types." "Cmd_show_module_contents_toplevel" "Module name" ) (agda2-maybe-normalised-toplevel agda2-search-about-toplevel "Search About an identifier" "Cmd_search_about_toplevel" "Name" ) (defun agda2-module-contents-maybe-toplevel () "Shows all the top-level names in the given module. Along with their types. Uses either the scope of the current goal or, if point is not in a goal, the top-level scope." (interactive) (call-interactively (if (agda2-goal-at (point)) 'agda2-module-contents 'agda2-module-contents-toplevel))) (defun agda2-solve-maybe-all () "Solves goals that are already instantiated internally. Either only one if point is a goal, or all of them." (interactive) (call-interactively (if (agda2-goal-at (point)) 'agda2-solveOne 'agda2-solveAll)) ) (defun agda2-auto-maybe-all () "Run auto. Either only one if point is a goal, or all of them." (interactive) (call-interactively (if (agda2-goal-at (point)) 'agda2-autoOne 'agda2-autoAll)) ) (agda2-maybe-normalised-global agda2-solveAll "Solves all goals that are already instantiated internally." "Cmd_solveAll" ) (agda2-maybe-normalised agda2-solveOne "Solves the goal at point if it is already instantiated internally" "Cmd_solveOne" nil ) (defun agda2-solveAll-action (iss) (while iss (let* ((g (pop iss)) (txt (pop iss)) (cmd (cons 'agda2-solve-action (cons g (cons txt nil))))) (if (null agda2-last-responses) (push (cons 1 cmd) agda2-last-responses) (nconc agda2-last-responses (cons (cons 3 cmd) nil)))))) (defun agda2-solve-action (g txt) (save-excursion (agda2-replace-goal g txt) (agda2-goto-goal g) (agda2-give))) (defun agda2-compute-normalised (&optional arg) "Compute the normal form of the expression in the goal at point. With a prefix argument distinct from `(4)' the normal form of \"show \" is computed, and then the resulting string is printed. With the prefix argument `(4)' \"abstract\" is ignored during the computation." (interactive "P") (let ((cmd (concat "Cmd_compute" (cond ((equal arg nil) " DefaultCompute") ((equal arg '(4)) " IgnoreAbstract") (" UseShowInstance"))))) (agda2-goal-cmd cmd nil "expression to normalise"))) (defun agda2-compute-normalised-toplevel (expr &optional arg) "Compute the normal form of the given expression. The scope used for the expression is that of the last point inside the current top-level module. With a prefix argument distinct from `(4)' the normal form of \"show \" is computed, and then the resulting string is printed. With the prefix argument `(4)' \"abstract\" is ignored during the computation." (interactive "MExpression: \nP") (let ((cmd (concat "Cmd_compute_toplevel" (cond ((equal arg nil) " DefaultCompute") ((equal arg '(4)) " IgnoreAbstract") (" UseShowInstance")) " "))) (agda2-go nil nil 'busy t (concat cmd (agda2-string-quote expr))))) (defun agda2-compute-normalised-maybe-toplevel () "Compute the normal form of the given expression. The scope used for the expression is that of the last point inside the current top-level module. With a prefix argument distinct from `(4)' the normal form of \"show \" is computed, and then the resulting string is printed. With the prefix argument `(4)' \"abstract\" is ignored during the computation." (interactive) (if (agda2-goal-at (point)) (call-interactively 'agda2-compute-normalised) (call-interactively 'agda2-compute-normalised-toplevel))) (defun agda2-display-program-version () "Display version of Agda" (interactive) (agda2-go nil nil 'busy t "Cmd_show_version")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; (defun agda2-highlight-reload nil "Loads precomputed syntax highlighting info for the current buffer. Only if the buffer is unmodified, and only if there is anything to load." (unless (buffer-modified-p) (agda2-go nil t 'not-so-busy t "Cmd_load_highlighting_info" (agda2-string-quote (buffer-file-name))))) (defun agda2-literate-p () "Is the current buffer a literate Agda buffer?" (not (equal (file-name-extension (buffer-file-name)) "agda"))) (defmacro agda2--case (exp &rest branches) ;FIXME: Use `pcase' instead! (declare (debug t) (indent 1)) (let ((s (make-symbol "v"))) `(let ((,s ,exp)) (cond ,@(mapcar (lambda (branch) `((equal ,s ,(car branch)) ,@(cdr branch))) branches))))) (defun agda2-goals-action (goals) "Annotates the goals in the current buffer with text properties. GOALS is a list of the buffer's goal numbers, in the order in which they appear in the buffer. Note that this function should be run /after/ syntax highlighting information has been loaded, because the two highlighting mechanisms interact in unfortunate ways." (agda2-forget-all-goals) (agda2-let ((literate (agda2-literate-p)) stk top ;; Don't run modification hooks: we don't want this function to ;; trigger agda2-abort-highlighting. (inhibit-modification-hooks t)) ((delims() (re-search-forward "[?]\\|[{][-!]\\|[-!][}]\\|--\\|^%.*\\\\begin{code}\\|\\\\begin{code}\\|\\\\end{code}\\|```\\|\\#\\+begin_src agda2\\|\\#\\+end_src agda2" nil t)) ;; is-proper checks whether string s (e.g. "?" or "--") is proper ;; i.e., is not part of an identifier. ;; comment-starter is true if s starts a comment (e.g. "--") (is-proper (s comment-starter) (save-excursion (save-match-data (backward-char (length s)) (unless (bolp) (backward-char 1)) ;; bolp = pointer at beginning of line ;; Andreas, 2014-05-17 Issue 1132 ;; A questionmark can also follow immediately after a . ;; for instance to be a place holder for a dot pattern. (looking-at (concat "\\([.{}();]\\|^\\|\\s \\)" ;; \\s = whitespace (regexp-quote s) (unless comment-starter "\\([{}();]\\|$\\|\\s \\)")))))) (make(p) (agda2-make-goal p (point) (pop goals))) (inside-comment() (and stk (null (car stk)))) (inside-goal() (and stk (integerp (car stk)))) (outside-code() (and stk (eq (car stk) 'outside))) (inside-code() (not (outside-code))) ;; inside a multi-line comment ignore everything but the multi-line comment markers (safe-delims() (if (inside-comment) (re-search-forward "{-\\|-}" nil t) (delims)))) (save-excursion ;; In literate mode we should start out in the "outside of code" ;; state. (if literate (push 'outside stk)) (goto-char (point-min)) (while (and goals (safe-delims)) (agda2--case (match-string 0) ("\\begin{code}" (when (outside-code) (pop stk))) ("\\end{code}" (when (not stk) (push 'outside stk))) ("#+begin_src agda2" (when (outside-code) (pop stk))) ("#+end_src agda2" (when (not stk) (push 'outside stk))) ("```" (if (outside-code) (pop stk) (when (not stk) (push 'outside stk)))) ("--" (when (and (not stk) (is-proper "--" t)) (end-of-line))) ("{-" (when (and (inside-code) (not (inside-goal))) (push nil stk))) ("-}" (when (inside-comment) (pop stk))) ("{!" (when (and (inside-code) (not (inside-comment))) (push (- (point) 2) stk))) ("!}" (when (inside-goal) (setq top (pop stk)) (unless stk (make top)))) ("?" (progn (when (and (not stk) (is-proper "?" nil)) (delete-char -1) (insert "{!!}") (make (- (point) 4)))))))))) (defun agda2-make-goal (p q n) "Make a goal with number N at

{!...!}. Assume the region is clean." (annotation-preserve-mod-p-and-undo (let ((atp (lambda (x ps) (add-text-properties x (1+ x) ps)))) (funcall atp p '(category agda2-delim1)) (funcall atp (1+ p) '(category agda2-delim2)) (funcall atp (- q 2) '(category agda2-delim3)) (funcall atp (1- q) '(category agda2-delim4))) (let ((o (make-overlay p q nil t nil))) (overlay-put o 'modification-hooks '(agda2-protect-goal-markers)) (overlay-put o 'agda2-gn n) (overlay-put o 'face 'highlight) (overlay-put o 'after-string (propertize (format "%s" n) 'face 'highlight))))) (defun agda2-protect-goal-markers (ol action beg end &optional length) "Ensures that the goal markers cannot be tampered with. Except if `inhibit-read-only' is non-nil or /all/ of the goal is modified." (if action ;; This is the after-change hook. nil ;; This is the before-change hook. (cond ((and (<= beg (overlay-start ol)) (>= end (overlay-end ol))) ;; The user is trying to remove the whole goal: ;; manually evaporate the overlay and add an undo-log entry so ;; it gets re-added if needed. (when (listp buffer-undo-list) (push (list 'apply 0 (overlay-start ol) (overlay-end ol) 'move-overlay ol (overlay-start ol) (overlay-end ol)) buffer-undo-list)) (delete-overlay ol)) ((or (< beg (+ (overlay-start ol) 2)) (> end (- (overlay-end ol) 2))) (unless inhibit-read-only (signal 'text-read-only nil)))))) (defun agda2-update (old-g new-txt) "Update the goal OLD-G. If NEW-TXT is a string, then the goal is replaced by the string, and otherwise the text inside the goal is retained (parenthesised if NEW-TXT is `'paren'). Removes the goal braces, but does not remove the goal overlay or text properties." (multiple-value-bind (p q) (agda2-range-of-goal old-g) (save-excursion (cond ((stringp new-txt) (agda2-replace-goal old-g new-txt)) ((equal new-txt 'paren) (goto-char (- q 2)) (insert ")") (goto-char (+ p 2)) (insert "("))) (multiple-value-bind (p q) (agda2-range-of-goal old-g) (delete-region (- q 2) q) (delete-region p (+ p 2))) ;; Update highlighting (if (and (not (equal new-txt 'paren)) (not (equal new-txt 'no-paren))) (apply 'agda2-go 'save t 'busy nil "Cmd_highlight" (format "%d" old-g) (agda2-mkRange `(,p ,(- q 2))) (agda2-string-quote new-txt) nil)) ))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Misc (defun agda2-process-status () "Status of `agda2-process-buffer', or \"no process\"." (condition-case nil (process-status agda2-process) (error "no process"))) (defun agda2-intersperse (sep xs) (let(ys)(while xs (push (pop xs) ys)(push sep ys))(pop ys)(nreverse ys))) (defun agda2-goal-Range (o) "The Haskell Range of goal overlay O." (agda2-mkRange `(,(+ (overlay-start o) 2) ,(- (overlay-end o) 2)))) (defun agda2-mkRange (points) "A string representing a range corresponding to POINTS. POINTS must be a list of integers, and its length must be 0 or 2." (if points (format "(intervalsToRange (Just (mkAbsolute %s)) %s)" (agda2-string-quote (file-truename (buffer-file-name))) (format "[Interval %s %s]" (agda2-mkPos (car points)) (agda2-mkPos (cadr points)))) "noRange")) (defun agda2-mkPos (&optional p) "The Haskell PositionWithoutFile corresponding to P or `point'." (save-excursion (save-restriction (widen) (if p (goto-char p)) (format "(Pn () %d %d %d)" (point) (count-lines (point-min) (point)) (1+ (current-column)))))) (defun agda2-char-quote (c) "Convert character C to the notation used in Haskell strings. The non-ASCII characters are actually rendered as \"\\xNNNN\\&\", i.e. followed by a \"null character\", to avoid problems if they are followed by digits. ASCII characters (code points < 128) are converted to singleton strings." (if (< c 128) (list c) ;; FIXME: Why return a list rather than a string? --Stef (append (format "\\x%x\\&" (encode-char c 'ucs)) nil))) (defun agda2-string-quote (s) "Format S as a Haskell string literal. Removes any text properties, escapes newlines, double quotes, etc., adds surrounding double quotes, and converts non-ASCII characters to the \\xNNNN notation used in Haskell strings." (let ((pp-escape-newlines t) (s2 (copy-sequence s))) (set-text-properties 0 (length s2) nil s2) (mapconcat 'agda2-char-quote (pp-to-string s2) ""))) (defun agda2-list-quote (strings) "Convert a list of STRINGS into a string representing it in Haskell syntax." (concat "[" (mapconcat 'agda2-string-quote strings ", ") "]")) (defun agda2-goal-at(pos) "Return (goal overlay, goal number) at POS, or nil." (let ((os (and pos (overlays-at pos))) o g) (while (and os (not(setq g (overlay-get (setq o (pop os)) 'agda2-gn))))) (if g (list o g)))) (defun agda2-goal-overlay (g) "Returns the overlay of goal number G, if any." (car (remove nil (mapcar (lambda (o) (if (equal (overlay-get o 'agda2-gn) g) o)) (overlays-in (point-min) (point-max)))))) (defun agda2-range-of-goal (g) "The range of goal G." (let ((o (agda2-goal-overlay g))) (if o (list (overlay-start o) (overlay-end o))))) (defun agda2-goto-goal (g) (let ((p (+ 2 (car (agda2-range-of-goal g))))) (if p (goto-char p)))) (defun agda2-replace-goal (g newtxt) "Replace the content of goal G with NEWTXT." (interactive) (save-excursion (multiple-value-bind (p q) (agda2-range-of-goal g) (setq p (+ p 2) q (- q 2)) (let ((indent (and (goto-char p) (current-column)))) (delete-region p q) (insert newtxt) (while (re-search-backward "^" p t) (insert-char ? indent) (backward-char (1+ indent))))))) (defun agda2-forget-all-goals () "Remove all goal annotations. \(Including some text properties which might be used by other \(minor) modes.)" (annotation-preserve-mod-p-and-undo (remove-text-properties (point-min) (point-max) '(category nil agda2-delim2 nil agda2-delim3 nil display nil rear-nonsticky nil))) (let ((p (point-min))) (while (< (setq p (next-single-char-property-change p 'agda2-gn)) (point-max)) (delete-overlay (car (agda2-goal-at p)))))) (defun agda2-decl-beginning () "Find the beginning point of the declaration containing the point. To do: dealing with semicolon separated decls." (interactive) (save-excursion (let* ((pEnd (point)) (pDef (progn (goto-char (point-min)) (re-search-forward "\\s *" pEnd t))) (cDef (current-column))) (while (re-search-forward "where\\(\\s +\\)\\S \\|^\\(\\s *\\)\\S " pEnd t) (if (match-end 1) (setq pDef (goto-char (match-end 1)) cDef (current-column)) (goto-char (match-end 2)) (if (>= cDef (current-column)) (setq pDef (point) cDef (current-column)))) (forward-char)) (goto-char pDef) (if (equal (current-word) "mutual") (or (match-end 2) (match-end 1)) pDef)))) (defun agda2-beginning-of-decl () (interactive) (goto-char (agda2-decl-beginning))) (defvar agda2-debug-buffer-name "*Agda debug*" "The name of the buffer used for Agda debug messages.") (defun agda2-verbose (msg) "Appends the string MSG to the `agda2-debug-buffer-name' buffer. Note that this buffer's contents is not erased automatically when a file is loaded." (with-current-buffer (get-buffer-create agda2-debug-buffer-name) (save-excursion (goto-char (point-max)) (insert msg)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Comments and paragraphs (defun agda2-comments-and-paragraphs-setup nil "Set up comment and paragraph handling for the Agda mode." ;; Empty lines (all white space according to Emacs) delimit ;; paragraphs. (set (make-local-variable 'paragraph-start) "\\s-*$") (set (make-local-variable 'paragraph-separate) paragraph-start) ;; Support for adding/removing comments. (set (make-local-variable 'comment-start) "-- ") ;; Use the syntax table to locate comments (and possibly other ;; things). Syntax table setup for comments is done elsewhere. (set (make-local-variable 'comment-use-syntax) t) ;; Update token-based highlighting after the buffer has been saved. (add-hook 'after-save-hook 'agda2-highlight-tokens nil 'local) ;; Support for proper filling of text in comments (requires that ;; Filladapt is activated). (when (featurep 'filladapt) (add-to-list (make-local-variable 'filladapt-token-table) '("--" agda2-comment)) (add-to-list (make-local-variable 'filladapt-token-match-table) '(agda2-comment agda2-comment) t) (add-to-list (make-local-variable 'filladapt-token-conversion-table) '(agda2-comment . exact)))) (defun agda2-comment-dwim-rest-of-buffer () "Comment or uncomment the rest of the buffer. From the beginning of the current line to the end of the buffer." (interactive) (save-excursion (forward-line 0) (push-mark (point) 'no-message 'activate-mark) (unwind-protect (progn (goto-char (point-max)) (comment-dwim nil)) (pop-mark)))) (defun agda2-highlight-tokens nil "Compute token-based highlighting information. Unless `agda2-highlight-level' is `none' or the Agda process is busy (or `not-so-busy') with something. This command might save the buffer." (unless (or agda2-in-progress (equal agda2-highlight-level 'none)) (agda2-go 'save t 'not-so-busy t "Cmd_tokenHighlighting" (agda2-string-quote (buffer-file-name)) "Keep"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Go to definition site (defun agda2-goto-definition-keyboard (&optional other-window) "Go to the definition site of the name under point (if any). If this function is invoked with a prefix argument then another window is used to display the given position." (interactive "P") (annotation-goto-indirect (point) other-window)) (defun agda2-goto-definition-mouse (ev) "Go to the definition site of the name clicked on, if any. Otherwise, yank (see `mouse-yank-primary')." (interactive "e") (unless (annotation-goto-indirect ev) ;; FIXME: Shouldn't we use something like ;; (call-interactively (key-binding ev))? --Stef (mouse-yank-primary ev))) (defun agda2-go-back nil "Go back to the previous position in which `agda2-goto-definition-keyboard' or `agda2-goto-definition-mouse' was invoked." (interactive) (annotation-go-back)) (defun agda2-maybe-goto (filepos) "Might move point to the given error. FILEPOS should have the form (FILE . POSITION). If `agda2-highlight-in-progress' is nil, then nothing happens. Otherwise, if the current buffer is the one that is connected to the Agda process, then point is moved to POSITION in FILE (assuming that the FILE is readable). Otherwise point is moved to the given position in the buffer visiting the file, if any, and in every window displaying the buffer, but the window configuration and the selected window are not changed." (when (and agda2-highlight-in-progress (consp filepos) (stringp (car filepos)) (integerp (cdr filepos))) (if agda2-in-agda2-file-buffer (annotation-goto-and-push (current-buffer) (point) filepos) (save-excursion (let ((buffer (find-buffer-visiting (car filepos)))) (when buffer (let ((windows (get-buffer-window-list buffer 'no-minibuffer t))) (if windows (dolist (window windows) (with-selected-window window (goto-char (cdr filepos)))) (with-current-buffer buffer (goto-char (cdr filepos))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Implicit arguments (defun agda2-display-implicit-arguments (&optional arg) "Toggle display of implicit arguments. With prefix argument, turn on display of implicit arguments if the argument is a positive number, otherwise turn it off." (interactive "P") (cond ((eq arg nil) (agda2-go nil t 'not-so-busy t "ToggleImplicitArgs")) ((and (numberp arg) (> arg 0)) (agda2-go nil t 'not-so-busy t "ShowImplicitArgs" "True")) (t (agda2-go nil t 'not-so-busy t "ShowImplicitArgs" "False")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; (defun agda2-popup-menu-3 (ev) "If in a goal, popup the goal menu and call chosen command." (interactive "e") (let (choice) (save-excursion (and (agda2-goal-at (goto-char (posn-point (event-end ev)))) (setq choice (x-popup-menu ev agda2-goal-map)) (call-interactively (lookup-key agda2-goal-map (apply 'vector choice))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Switching to a different version of Agda (defun get-agda-program-versions () "Get \"version strings\" of executables starting with 'agda-mode' in current path." (delete-dups (mapcar (lambda (path) ;; strip 'agda-mode' prefix (replace-regexp-in-string "^agda-mode-?" "" (file-name-nondirectory path))) (remove-if-not 'file-executable-p ;; concatenate result (reduce 'append ;; for each directory in exec-path, get list of ;; files whose name starts with 'agda-mode' (mapcar (lambda (path) (when (file-accessible-directory-p path) (directory-files path 't "^agda-mode"))) exec-path)))))) ;; Note that other versions of Agda may use different protocols, so ;; this function unloads the Emacs mode. (defun agda2-set-program-version (version) "Tries to switch to Agda version VERSION. This command assumes that the agda and agda-mode executables for Agda version VERSION are called agda-VERSION and agda-mode-VERSION, and that they are located on the PATH. (If VERSION is empty, then agda and agda-mode are used instead.)" (interactive (list (completing-read "Version: " (get-agda-program-versions)))) (let* ((agda-buffers (mapcan (lambda (buf) (with-current-buffer buf (when (equal major-mode 'agda2-mode) (list buf)))) (buffer-list))) (version-suffix (if (or (equal version "") (equal version nil)) "" (concat "-" version))) ;; Run agda-mode and make sure that it returns ;; successfully. (coding-system-for-read 'utf-8) (agda-mode-prog (concat "agda-mode" version-suffix)) (agda-mode-path (condition-case nil (with-temp-buffer (unless (equal 0 (call-process agda-mode-prog nil (current-buffer) nil "locate")) (error "%s" (concat "Error when running " agda-mode-prog))) (buffer-string)) (file-error (error "%s" (concat "Could not find " agda-mode-prog)))))) ;; Make sure that agda-mode returns a valid file. (unless (file-readable-p agda-mode-path) (error "%s" (concat "Could not read " agda-mode-path))) ;; Turn off the Agda mode. (agda2-quit) ;; Kill some buffers related to Agda. (when (buffer-live-p agda2-info-buffer) (kill-buffer agda2-info-buffer)) (when (and agda2-debug-buffer-name (get-buffer agda2-debug-buffer-name)) (kill-buffer agda2-debug-buffer-name)) ;; Remove the Agda mode directory from the load path. (setq load-path (delete agda2-directory load-path)) ;; Unload the Agda mode and its dependencies. (unload-feature 'agda2-mode 'force) (unload-feature 'agda2 'force) (unload-feature 'eri 'force) (unload-feature 'annotation 'force) (unload-feature 'agda-input 'force) (unload-feature 'agda2-highlight 'force) (unload-feature 'agda2-abbrevs 'force) (unload-feature 'agda2-queue 'force) ;; Load the new version of Agda. (load-file agda-mode-path) (require 'agda2-mode) (setq agda2-program-name (concat "agda" version-suffix)) ;; Restart the Agda mode in all former Agda mode buffers. (mapc (lambda (buf) (with-current-buffer buf (agda2-mode))) agda-buffers))) (provide 'agda2-mode) ;;; agda2-mode.el ends here Agda-2.6.0.1/src/data/emacs-mode/agda-input.el0000644000000000000000000011111713466402171016773 0ustar0000000000000000;;; agda-input.el --- The Agda input method ;;; Commentary: ;; A highly customisable input method which can inherit from other ;; Quail input methods. By default the input method is geared towards ;; the input of mathematical and other symbols in Agda programs. ;; ;; Use M-x customize-group agda-input to customise this input method. ;; Note that the functions defined under "Functions used to tweak ;; translation pairs" below can be used to tweak both the key ;; translations inherited from other input methods as well as the ;; ones added specifically for this one. ;; ;; Use agda-input-show-translations to see all the characters which ;; can be typed using this input method (except for those ;; corresponding to ASCII characters). ;;; Code: (require 'quail) (require 'cl) ;; Quail is quite stateful, so be careful when editing this code. Note ;; that with-temp-buffer is used below whenever buffer-local state is ;; modified. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Utility functions (defun agda-input-concat-map (f xs) "Concat (map F XS)." (apply 'append (mapcar f xs))) (defun agda-input-to-string-list (s) "Convert a string S to a list of one-character strings, after removing all space and newline characters." (agda-input-concat-map (lambda (c) (if (member c (string-to-list " \n")) nil (list (string c)))) (string-to-list s))) (defun agda-input-character-range (from to) "A string consisting of the characters from FROM to TO." (let (seq) (dotimes (i (1+ (- to from))) (setq seq (cons (+ from i) seq))) (concat (nreverse seq)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions used to tweak translation pairs ;; lexical-let is used since Elisp lacks lexical scoping. (defun agda-input-compose (f g) "\x -> concatMap F (G x)" (lexical-let ((f1 f) (g1 g)) (lambda (x) (agda-input-concat-map f1 (funcall g1 x))))) (defun agda-input-or (f g) "\x -> F x ++ G x" (lexical-let ((f1 f) (g1 g)) (lambda (x) (append (funcall f1 x) (funcall g1 x))))) (defun agda-input-nonempty () "Only keep pairs with a non-empty first component." (lambda (x) (if (> (length (car x)) 0) (list x)))) (defun agda-input-prepend (prefix) "Prepend PREFIX to all key sequences." (lexical-let ((prefix1 prefix)) (lambda (x) `((,(concat prefix1 (car x)) . ,(cdr x)))))) (defun agda-input-prefix (prefix) "Only keep pairs whose key sequence starts with PREFIX." (lexical-let ((prefix1 prefix)) (lambda (x) (if (equal (substring (car x) 0 (length prefix1)) prefix1) (list x))))) (defun agda-input-suffix (suffix) "Only keep pairs whose key sequence ends with SUFFIX." (lexical-let ((suffix1 suffix)) (lambda (x) (if (equal (substring (car x) (- (length (car x)) (length suffix1))) suffix1) (list x))))) (defun agda-input-drop (ss) "Drop pairs matching one of the given key sequences. SS should be a list of strings." (lexical-let ((ss1 ss)) (lambda (x) (unless (member (car x) ss1) (list x))))) (defun agda-input-drop-beginning (n) "Drop N characters from the beginning of each key sequence." (lexical-let ((n1 n)) (lambda (x) `((,(substring (car x) n1) . ,(cdr x)))))) (defun agda-input-drop-end (n) "Drop N characters from the end of each key sequence." (lexical-let ((n1 n)) (lambda (x) `((,(substring (car x) 0 (- (length (car x)) n1)) . ,(cdr x)))))) (defun agda-input-drop-prefix (prefix) "Only keep pairs whose key sequence starts with PREFIX. This prefix is dropped." (agda-input-compose (agda-input-drop-beginning (length prefix)) (agda-input-prefix prefix))) (defun agda-input-drop-suffix (suffix) "Only keep pairs whose key sequence ends with SUFFIX. This suffix is dropped." (lexical-let ((suffix1 suffix)) (agda-input-compose (agda-input-drop-end (length suffix1)) (agda-input-suffix suffix1)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Customization ;; The :set keyword is set to 'agda-input-incorporate-changed-setting ;; so that the input method gets updated immediately when users ;; customize it. However, the setup functions cannot be run before all ;; variables have been defined. Hence the :initialize keyword is set to ;; 'custom-initialize-default to ensure that the setup is not performed ;; until agda-input-setup is called at the end of this file. (defgroup agda-input nil "The Agda input method. After tweaking these settings you may want to inspect the resulting translations using `agda-input-show-translations'." :group 'agda2 :group 'leim) (defcustom agda-input-tweak-all '(agda-input-compose (agda-input-prepend "\\") (agda-input-nonempty)) "An expression yielding a function which can be used to tweak all translations before they are included in the input method. The resulting function (if non-nil) is applied to every \(KEY-SEQUENCE . TRANSLATION) pair and should return a list of such pairs. (Note that the translations can be anything accepted by `quail-defrule'.) If you change this setting manually (without using the customization buffer) you need to call `agda-input-setup' in order for the change to take effect." :group 'agda-input :set 'agda-input-incorporate-changed-setting :initialize 'custom-initialize-default :type 'sexp) (defcustom agda-input-inherit `(("TeX" . (agda-input-compose (agda-input-drop '("geq" "leq" "bullet" "qed" "par")) (agda-input-or (agda-input-drop-prefix "\\") (agda-input-or (agda-input-compose (agda-input-drop '("^l" "^o" "^r" "^v")) (agda-input-prefix "^")) (agda-input-prefix "_"))))) ) "A list of Quail input methods whose translations should be inherited by the Agda input method (with the exception of translations corresponding to ASCII characters). The list consists of pairs (qp . tweak), where qp is the name of a Quail package, and tweak is an expression of the same kind as `agda-input-tweak-all' which is used to tweak the translation pairs of the input method. The inherited translation pairs are added last, after `agda-input-user-translations' and `agda-input-translations'. If you change this setting manually (without using the customization buffer) you need to call `agda-input-setup' in order for the change to take effect." :group 'agda-input :set 'agda-input-incorporate-changed-setting :initialize 'custom-initialize-default :type '(repeat (cons (string :tag "Quail package") (sexp :tag "Tweaking function")))) (defcustom agda-input-translations (let ((max-lisp-eval-depth 2800)) `( ;; Equality and similar symbols. ("eq" . ,(agda-input-to-string-list "=∼∽≈≋∻∾∿≀≃⋍≂≅ ≌≊≡≣≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≍≎≏≬⋕")) ("eqn" . ,(agda-input-to-string-list "≠≁ ≉ ≄ ≇≆ ≢ ≭ ")) ("=n" . ("≠")) ("~" . ("∼")) ("~n" . ("≁")) ("~~" . ("≈")) ("~~n" . ("≉")) ("~~~" . ("≋")) (":~" . ("∻")) ("~-" . ("≃")) ("~-n" . ("≄")) ("-~" . ("≂")) ("~=" . ("≅")) ("~=n" . ("≇")) ("~~-" . ("≊")) ("==" . ("≡")) ("==n" . ("≢")) ("===" . ("≣")) (".=" . ("≐")) (".=." . ("≑")) (":=" . ("≔")) ("=:" . ("≕")) ("=o" . ("≗")) ("(=" . ("≘")) ("and=" . ("≙")) ("or=" . ("≚")) ("*=" . ("≛")) ("t=" . ("≜")) ("def=" . ("≝")) ("m=" . ("≞")) ("?=" . ("≟")) ;; Inequality and similar symbols. ("leq" . ,(agda-input-to-string-list "<≪⋘≤≦≲ ≶≺≼≾⊂⊆ ⋐⊏⊑ ⊰⊲⊴⋖⋚⋜⋞")) ("leqn" . ,(agda-input-to-string-list "≮ ≰≨≴⋦≸⊀ ⋨⊄⊈⊊ ⋢⋤ ⋪⋬ ⋠")) ("geq" . ,(agda-input-to-string-list ">≫⋙≥≧≳ ≷≻≽≿⊃⊇ ⋑⊐⊒ ⊱⊳⊵⋗⋛⋝⋟")) ("geqn" . ,(agda-input-to-string-list "≯ ≱≩≵⋧≹⊁ ⋩⊅⊉⊋ ⋣⋥ ⋫⋭ ⋡")) ("<=" . ("≤")) (">=" . ("≥")) ("<=n" . ("≰")) (">=n" . ("≱")) ("len" . ("≰")) ("gen" . ("≱")) ("n" . ("≯")) ("<~" . ("≲")) (">~" . ("≳")) ("<~n" . ("⋦")) (">~n" . ("⋧")) ("<~nn" . ("≴")) (">~nn" . ("≵")) ("sub" . ("⊂")) ("sup" . ("⊃")) ("subn" . ("⊄")) ("supn" . ("⊅")) ("sub=" . ("⊆")) ("sup=" . ("⊇")) ("sub=n" . ("⊈")) ("sup=n" . ("⊉")) ("squb" . ("⊏")) ("squp" . ("⊐")) ("squb=" . ("⊑")) ("squp=" . ("⊒")) ("squb=n" . ("⋢")) ("squp=n" . ("⋣")) ;; Set membership etc. ("member" . ,(agda-input-to-string-list "∈∉∊∋∌∍⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿")) ("inn" . ("∉")) ("nin" . ("∌")) ;; Intersections, unions etc. ("intersection" . ,(agda-input-to-string-list "∩⋂∧⋀⋏⨇⊓⨅⋒∏ ⊼ ⨉")) ("union" . ,(agda-input-to-string-list "∪⋃∨⋁⋎⨈⊔⨆⋓∐⨿⊽⊻⊍⨃⊎⨄⊌∑⅀")) ("and" . ("∧")) ("or" . ("∨")) ("And" . ("⋀")) ("Or" . ("⋁")) ("i" . ("∩")) ("un" . ("∪")) ("u+" . ("⊎")) ("u." . ("⊍")) ("I" . ("⋂")) ("Un" . ("⋃")) ("U+" . ("⨄")) ("U." . ("⨃")) ("glb" . ("⊓")) ("lub" . ("⊔")) ("Glb" . ("⨅")) ("Lub" . ("⨆")) ;; Entailment etc. ("entails" . ,(agda-input-to-string-list "⊢⊣⊤⊥⊦⊧⊨⊩⊪⊫⊬⊭⊮⊯")) ("|-" . ("⊢")) ("|-n" . ("⊬")) ("-|" . ("⊣")) ("|=" . ("⊨")) ("|=n" . ("⊭")) ("||-" . ("⊩")) ("||-n" . ("⊮")) ("||=" . ("⊫")) ("||=n" . ("⊯")) ("|||-" . ("⊪")) ;; Divisibility, parallelity. ("|" . ("∣")) ("|n" . ("∤")) ("||" . ("∥")) ("||n" . ("∦")) ;; Some symbols from logic and set theory. ("all" . ("∀")) ("ex" . ("∃")) ("exn" . ("∄")) ("0" . ("∅")) ("C" . ("∁")) ;; Corners, ceilings and floors. ("c" . ,(agda-input-to-string-list "⌜⌝⌞⌟⌈⌉⌊⌋")) ("cu" . ,(agda-input-to-string-list "⌜⌝ ⌈⌉ ")) ("cl" . ,(agda-input-to-string-list " ⌞⌟ ⌊⌋")) ("cul" . ("⌜")) ("cuL" . ("⌈")) ("cur" . ("⌝")) ("cuR" . ("⌉")) ("cll" . ("⌞")) ("clL" . ("⌊")) ("clr" . ("⌟")) ("clR" . ("⌋")) ;; Various operators/symbols. ("qed" . ("∎")) ("x" . ("×")) ("o" . ("∘")) ("comp" . ("∘")) ("." . ("∙")) ("*" . ("⋆")) (".+" . ("∔")) (".-" . ("∸")) (":" . ,(agda-input-to-string-list "∶⦂ː꞉˸፥፦:﹕︓")) ("," . ,(agda-input-to-string-list "ʻ،⸲⸴⹁⹉、︐︑﹐﹑,、")) (";" . ,(agda-input-to-string-list "؛⁏፤꛶;︔﹔⍮⸵;")) ("::" . ("∷")) ("::-" . ("∺")) ("-:" . ("∹")) ("+ " . ("⊹")) ("surd3" . ("∛")) ("surd4" . ("∜")) ("increment" . ("∆")) ("inf" . ("∞")) ("&" . ("⅋")) ;; Circled operators. ("o+" . ("⊕")) ("o--" . ("⊖")) ("ox" . ("⊗")) ("o/" . ("⊘")) ("o." . ("⊙")) ("oo" . ("⊚")) ("o*" . ("⊛")) ("o=" . ("⊜")) ("o-" . ("⊝")) ("O+" . ("⨁")) ("Ox" . ("⨂")) ("O." . ("⨀")) ("O*" . ("⍟")) ;; Boxed operators. ("b+" . ("⊞")) ("b-" . ("⊟")) ("bx" . ("⊠")) ("b." . ("⊡")) ;; Various symbols. ("integral" . ,(agda-input-to-string-list "∫∬∭∮∯∰∱∲∳")) ("angle" . ,(agda-input-to-string-list "∟∡∢⊾⊿")) ("join" . ,(agda-input-to-string-list "⋈⋉⋊⋋⋌⨝⟕⟖⟗")) ;; Arrows. ("l" . ,(agda-input-to-string-list "←⇐⇚⇇⇆↤⇦↞↼↽⇠⇺↜⇽⟵⟸↚⇍⇷ ↹ ↢↩↫⇋⇜⇤⟻⟽⤆↶↺⟲ ")) ("r" . ,(agda-input-to-string-list "→⇒⇛⇉⇄↦⇨↠⇀⇁⇢⇻↝⇾⟶⟹↛⇏⇸⇶ ↴ ↣↪↬⇌⇝⇥⟼⟾⤇↷↻⟳⇰⇴⟴⟿ ➵➸➙➔➛➜➝➞➟➠➡➢➣➤➧➨➩➪➫➬➭➮➯➱➲➳➺➻➼➽➾⊸")) ("u" . ,(agda-input-to-string-list "↑⇑⟰⇈⇅↥⇧↟↿↾⇡⇞ ↰↱➦ ⇪⇫⇬⇭⇮⇯ ")) ("d" . ,(agda-input-to-string-list "↓⇓⟱⇊⇵↧⇩↡⇃⇂⇣⇟ ↵↲↳➥ ↯ ")) ("ud" . ,(agda-input-to-string-list "↕⇕ ↨⇳ ")) ("lr" . ,(agda-input-to-string-list "↔⇔ ⇼↭⇿⟷⟺↮⇎⇹ ")) ("ul" . ,(agda-input-to-string-list "↖⇖ ⇱↸ ")) ("ur" . ,(agda-input-to-string-list "↗⇗ ➶➹➚ ")) ("dr" . ,(agda-input-to-string-list "↘⇘ ⇲ ➴➷➘ ")) ("dl" . ,(agda-input-to-string-list "↙⇙ ")) ("l-" . ("←")) ("<-" . ("←")) ("l=" . ("⇐")) ("r-" . ("→")) ("->" . ("→")) ("r=" . ("⇒")) ("=>" . ("⇒")) ("u-" . ("↑")) ("u=" . ("⇑")) ("d-" . ("↓")) ("d=" . ("⇓")) ("ud-" . ("↕")) ("ud=" . ("⇕")) ("lr-" . ("↔")) ("<->" . ("↔")) ("lr=" . ("⇔")) ("<=>" . ("⇔")) ("ul-" . ("↖")) ("ul=" . ("⇖")) ("ur-" . ("↗")) ("ur=" . ("⇗")) ("dr-" . ("↘")) ("dr=" . ("⇘")) ("dl-" . ("↙")) ("dl=" . ("⇙")) ("l==" . ("⇚")) ("l-2" . ("⇇")) ("l-r-" . ("⇆")) ("r==" . ("⇛")) ("r-2" . ("⇉")) ("r-3" . ("⇶")) ("r-l-" . ("⇄")) ("u==" . ("⟰")) ("u-2" . ("⇈")) ("u-d-" . ("⇅")) ("d==" . ("⟱")) ("d-2" . ("⇊")) ("d-u-" . ("⇵")) ("l--" . ("⟵")) ("<--" . ("⟵")) ("l~" . ("↜" "⇜")) ("r--" . ("⟶")) ("-->" . ("⟶")) ("r~" . ("↝" "⇝" "⟿")) ("lr--" . ("⟷")) ("<-->" . ("⟷")) ("lr~" . ("↭")) ("l-n" . ("↚")) ("<-n" . ("↚")) ("l=n" . ("⇍")) ("r-n" . ("↛")) ("->n" . ("↛")) ("r=n" . ("⇏")) ("=>n" . ("⇏")) ("lr-n" . ("↮")) ("<->n" . ("↮")) ("lr=n" . ("⇎")) ("<=>n" . ("⇎")) ("l-|" . ("↤")) ("ll-" . ("↞")) ("r-|" . ("↦")) ("rr-" . ("↠")) ("u-|" . ("↥")) ("uu-" . ("↟")) ("d-|" . ("↧")) ("dd-" . ("↡")) ("ud-|" . ("↨")) ("l->" . ("↢")) ("r->" . ("↣")) ("r-o" . ("⊸")) ("-o" . ("⊸")) ("dz" . ("↯")) ;; Ellipsis. ("..." . ,(agda-input-to-string-list "⋯⋮⋰⋱")) ;; Box-drawing characters. ("---" . ,(agda-input-to-string-list "─│┌┐└┘├┤┬┼┴╴╵╶╷╭╮╯╰╱╲╳")) ("--=" . ,(agda-input-to-string-list "═║╔╗╚╝╠╣╦╬╩ ╒╕╘╛╞╡╤╪╧ ╓╖╙╜╟╢╥╫╨")) ("--_" . ,(agda-input-to-string-list "━┃┏┓┗┛┣┫┳╋┻╸╹╺╻ ┍┯┑┕┷┙┝┿┥┎┰┒┖┸┚┠╂┨┞╀┦┟╁┧┢╈┪┡╇┩ ┮┭┶┵┾┽┲┱┺┹╊╉╆╅╄╃ ╿╽╼╾")) ("--." . ,(agda-input-to-string-list "╌╎┄┆┈┊ ╍╏┅┇┉┋")) ;; Triangles. ;; Big/small, black/white. ("t" . ,(agda-input-to-string-list "◂◃◄◅▸▹►▻▴▵▾▿◢◿◣◺◤◸◥◹")) ("T" . ,(agda-input-to-string-list "◀◁▶▷▲△▼▽◬◭◮")) ("tb" . ,(agda-input-to-string-list "◂▸▴▾◄►◢◣◤◥")) ("tw" . ,(agda-input-to-string-list "◃▹▵▿◅▻◿◺◸◹")) ("Tb" . ,(agda-input-to-string-list "◀▶▲▼")) ("Tw" . ,(agda-input-to-string-list "◁▷△▽")) ;; Squares. ("sq" . ,(agda-input-to-string-list "■□◼◻◾◽▣▢▤▥▦▧▨▩◧◨◩◪◫◰◱◲◳")) ("sqb" . ,(agda-input-to-string-list "■◼◾")) ("sqw" . ,(agda-input-to-string-list "□◻◽")) ("sq." . ("▣")) ("sqo" . ("▢")) ;; Rectangles. ("re" . ,(agda-input-to-string-list "▬▭▮▯")) ("reb" . ,(agda-input-to-string-list "▬▮")) ("rew" . ,(agda-input-to-string-list "▭▯")) ;; Parallelograms. ("pa" . ,(agda-input-to-string-list "▰▱")) ("pab" . ("▰")) ("paw" . ("▱")) ;; Diamonds. ("di" . ,(agda-input-to-string-list "◆◇◈")) ("dib" . ("◆")) ("diw" . ("◇")) ("di." . ("◈")) ;; Circles. ("ci" . ,(agda-input-to-string-list "●○◎◌◯◍◐◑◒◓◔◕◖◗◠◡◴◵◶◷⚆⚇⚈⚉")) ("cib" . ("●")) ("ciw" . ("○")) ("ci." . ("◎")) ("ci.." . ("◌")) ("ciO" . ("◯")) ;; Stars. ("st" . ,(agda-input-to-string-list "⋆✦✧✶✴✹ ★☆✪✫✯✰✵✷✸")) ("st4" . ,(agda-input-to-string-list "✦✧")) ("st6" . ("✶")) ("st8" . ("✴")) ("st12" . ("✹")) ;; Blackboard bold letters. ("bA" . ("𝔸")) ("bB" . ("𝔹")) ("bC" . ("ℂ")) ("bD" . ("𝔻")) ("bE" . ("𝔼")) ("bF" . ("𝔽")) ("bG" . ("𝔾")) ("bH" . ("ℍ")) ("bI" . ("𝕀")) ("bJ" . ("𝕁")) ("bK" . ("𝕂")) ("bL" . ("𝕃")) ("bM" . ("𝕄")) ("bN" . ("ℕ")) ("bO" . ("𝕆")) ("bP" . ("ℙ")) ("bQ" . ("ℚ")) ("bR" . ("ℝ")) ("bS" . ("𝕊")) ("bT" . ("𝕋")) ("bU" . ("𝕌")) ("bV" . ("𝕍")) ("bW" . ("𝕎")) ("bX" . ("𝕏")) ("bY" . ("𝕐")) ("bZ" . ("ℤ")) ("bGG" . ("ℾ")) ("bGP" . ("ℿ")) ("bGS" . ("⅀")) ("ba" . ("𝕒")) ("bb" . ("𝕓")) ("bc" . ("𝕔")) ("bd" . ("𝕕")) ("be" . ("𝕖")) ("bf" . ("𝕗")) ("bg" . ("𝕘")) ("bh" . ("𝕙")) ("bi" . ("𝕚")) ("bj" . ("𝕛")) ("bk" . ("𝕜")) ("bl" . ("𝕝")) ("bm" . ("𝕞")) ("bn" . ("𝕟")) ("bo" . ("𝕠")) ("bp" . ("𝕡")) ("bq" . ("𝕢")) ("br" . ("𝕣")) ("bs" . ("𝕤")) ("bt" . ("𝕥")) ("bu" . ("𝕦")) ("bv" . ("𝕧")) ("bw" . ("𝕨")) ("bx" . ("𝕩")) ("by" . ("𝕪")) ("bz" . ("𝕫")) ("bGg" . ("ℽ")) ("bGp" . ("ℼ")) ;; Blackboard bold numbers. ("b0" . ("𝟘")) ("b1" . ("𝟙")) ("b2" . ("𝟚")) ("b3" . ("𝟛")) ("b4" . ("𝟜")) ("b5" . ("𝟝")) ("b6" . ("𝟞")) ("b7" . ("𝟟")) ("b8" . ("𝟠")) ("b9" . ("𝟡")) ;; Mathematical bold digits. ("B0" . ("𝟎")) ("B1" . ("𝟏")) ("B2" . ("𝟐")) ("B3" . ("𝟑")) ("B4" . ("𝟒")) ("B5" . ("𝟓")) ("B6" . ("𝟔")) ("B7" . ("𝟕")) ("B8" . ("𝟖")) ("B9" . ("𝟗")) ;; Parentheses. ("(" . ,(agda-input-to-string-list "([{⁅⁽₍〈⎴⟅⟦⟨⟪⦃〈《「『【〔〖〚︵︷︹︻︽︿﹁﹃﹙﹛﹝([{「")) (")" . ,(agda-input-to-string-list ")]}⁆⁾₎〉⎵⟆⟧⟩⟫⦄〉》」』】〕〗〛︶︸︺︼︾﹀﹂﹄﹚﹜﹞)]}」")) ("[[" . ("⟦")) ("]]" . ("⟧")) ("<" . ("⟨")) (">" . ("⟩")) ("<<" . ("⟪")) (">>" . ("⟫")) ("{{" . ("⦃")) ("}}" . ("⦄")) ("(b" . ("⟅")) (")b" . ("⟆")) ("lbag" . ("⟅")) ("rbag" . ("⟆")) ("(|" . ("⦇")) ;; Idiom brackets ("|)" . ("⦈")) ("((" . ("⦅")) ;; Banana brackets ("))" . ("⦆")) ;; Primes. ("'" . ,(agda-input-to-string-list "′″‴⁗")) ("`" . ,(agda-input-to-string-list "‵‶‷")) ;; Fractions. ("frac" . ,(agda-input-to-string-list "¼½¾⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟")) ;; Bullets. ("bu" . ,(agda-input-to-string-list "•◦‣⁌⁍")) ("bub" . ("•")) ("buw" . ("◦")) ("but" . ("‣")) ;; Musical symbols. ("note" . ,(agda-input-to-string-list "♩♪♫♬")) ("b" . ("♭")) ("#" . ("♯")) ;; Other punctuation and symbols. ("\\" . ("\\")) ("en" . ("–")) ("em" . ("—")) ("!!" . ("‼")) ("??" . ("⁇")) ("?!" . ("‽" "⁈")) ("!?" . ("⁉")) ("die" . ,(agda-input-to-string-list "⚀⚁⚂⚃⚄⚅")) ("asterisk" . ,(agda-input-to-string-list "⁎⁑⁂✢✣✤✥✱✲✳✺✻✼✽❃❉❊❋")) ("8<" . ("✂" "✄")) ("tie" . ("⁀")) ("undertie" . ("‿")) ("apl" . ,(agda-input-to-string-list "⌶⌷⌸⌹⌺⌻⌼⌽⌾⌿⍀⍁⍂⍃⍄⍅⍆⍇⍈ ⍉⍊⍋⍌⍍⍎⍏⍐⍑⍒⍓⍔⍕⍖⍗⍘⍙⍚⍛ ⍜⍝⍞⍟⍠⍡⍢⍣⍤⍥⍦⍧⍨⍩⍪⍫⍬⍭⍮ ⍯⍰⍱⍲⍳⍴⍵⍶⍷⍸⍹⍺⎕")) ;; Some combining characters. ;; ;; The following combining characters also have (other) ;; translations: ;; ̀ ́ ̂ ̃ ̄ ̆ ̇ ̈ ̋ ̌ ̣ ̧ ̱ ("^--" . ,(agda-input-to-string-list"̅̿")) ("_--" . ,(agda-input-to-string-list"̲̳")) ("^~" . ,(agda-input-to-string-list"̃͌")) ("_~" . ( "̰")) ("^." . ,(agda-input-to-string-list"̇̈⃛⃜")) ("_." . ,(agda-input-to-string-list"̣̤")) ("^l" . ,(agda-input-to-string-list"⃖⃐⃔")) ("^l-" . ( "⃖")) ("^r" . ,(agda-input-to-string-list"⃗⃑⃕")) ("^r-" . ( "⃗")) ("^lr" . ( "⃡")) ("_lr" . ( "͍")) ("^^" . ,(agda-input-to-string-list"̂̑͆")) ("_^" . ,(agda-input-to-string-list"̭̯̪")) ("^v" . ,(agda-input-to-string-list"̌̆")) ("_v" . ,(agda-input-to-string-list"̬̮̺")) ;; Shorter forms of many greek letters plus ƛ. ("Ga" . ("α")) ("GA" . ("Α")) ("Gb" . ("β")) ("GB" . ("Β")) ("Gg" . ("γ")) ("GG" . ("Γ")) ("Gd" . ("δ")) ("GD" . ("Δ")) ("Ge" . ("ε")) ("GE" . ("Ε")) ("Gz" . ("ζ")) ("GZ" . ("Ζ")) ;; \eta \Eta ("Gth" . ("θ")) ("GTH" . ("Θ")) ("Gi" . ("ι")) ("GI" . ("Ι")) ("Gk" . ("κ")) ("GK" . ("Κ")) ("Gl" . ("λ")) ("GL" . ("Λ")) ("Gl-" . ("ƛ")) ("Gm" . ("μ")) ("GM" . ("Μ")) ("Gn" . ("ν")) ("GN" . ("Ν")) ("Gx" . ("ξ")) ("GX" . ("Ξ")) ;; \omicron \Omicron ;; \pi \Pi ("Gr" . ("ρ")) ("GR" . ("Ρ")) ("Gs" . ("σ")) ("GS" . ("Σ")) ("Gt" . ("τ")) ("GT" . ("Τ")) ("Gu" . ("υ")) ("GU" . ("Υ")) ("Gf" . ("φ")) ("GF" . ("Φ")) ("Gc" . ("χ")) ("GC" . ("Χ")) ("Gp" . ("ψ")) ("GP" . ("Ψ")) ("Go" . ("ω")) ("GO" . ("Ω")) ;; Mathematical characters ("MiA" . ("𝐴")) ("MiB" . ("𝐵")) ("MiC" . ("𝐶")) ("MiD" . ("𝐷")) ("MiE" . ("𝐸")) ("MiF" . ("𝐹")) ("MiG" . ("𝐺")) ("MiH" . ("𝐻")) ("MiI" . ("𝐼")) ("MiJ" . ("𝐽")) ("MiK" . ("𝐾")) ("MiL" . ("𝐿")) ("MiM" . ("𝑀")) ("MiN" . ("𝑁")) ("MiO" . ("𝑂")) ("MiP" . ("𝑃")) ("MiQ" . ("𝑄")) ("MiR" . ("𝑅")) ("MiS" . ("𝑆")) ("MiT" . ("𝑇")) ("MiU" . ("𝑈")) ("MiV" . ("𝑉")) ("MiW" . ("𝑊")) ("MiX" . ("𝑋")) ("MiY" . ("𝑌")) ("MiZ" . ("𝑍")) ("Mia" . ("𝑎")) ("Mib" . ("𝑏")) ("Mic" . ("𝑐")) ("Mid" . ("𝑑")) ("Mie" . ("𝑒")) ("Mif" . ("𝑓")) ("Mig" . ("𝑔")) ("Mii" . ("𝑖")) ("Mij" . ("𝑗")) ("Mik" . ("𝑘")) ("Mil" . ("𝑙")) ("Mim" . ("𝑚")) ("Min" . ("𝑛")) ("Mio" . ("𝑜")) ("Mip" . ("𝑝")) ("Miq" . ("𝑞")) ("Mir" . ("𝑟")) ("Mis" . ("𝑠")) ("Mit" . ("𝑡")) ("Miu" . ("𝑢")) ("Miv" . ("𝑣")) ("Miw" . ("𝑤")) ("Mix" . ("𝑥")) ("Miy" . ("𝑦")) ("Miz" . ("𝑧")) ("MIA" . ("𝑨")) ("MIB" . ("𝑩")) ("MIC" . ("𝑪")) ("MID" . ("𝑫")) ("MIE" . ("𝑬")) ("MIF" . ("𝑭")) ("MIG" . ("𝑮")) ("MIH" . ("𝑯")) ("MII" . ("𝑰")) ("MIJ" . ("𝑱")) ("MIK" . ("𝑲")) ("MIL" . ("𝑳")) ("MIM" . ("𝑴")) ("MIN" . ("𝑵")) ("MIO" . ("𝑶")) ("MIP" . ("𝑷")) ("MIQ" . ("𝑸")) ("MIR" . ("𝑹")) ("MIS" . ("𝑺")) ("MIT" . ("𝑻")) ("MIU" . ("𝑼")) ("MIV" . ("𝑽")) ("MIW" . ("𝑾")) ("MIX" . ("𝑿")) ("MIY" . ("𝒀")) ("MIZ" . ("𝒁")) ("MIa" . ("𝒂")) ("MIb" . ("𝒃")) ("MIc" . ("𝒄")) ("MId" . ("𝒅")) ("MIe" . ("𝒆")) ("MIf" . ("𝒇")) ("MIg" . ("𝒈")) ("MIh" . ("𝒉")) ("MIi" . ("𝒊")) ("MIj" . ("𝒋")) ("MIk" . ("𝒌")) ("MIl" . ("𝒍")) ("MIm" . ("𝒎")) ("MIn" . ("𝒏")) ("MIo" . ("𝒐")) ("MIp" . ("𝒑")) ("MIq" . ("𝒒")) ("MIr" . ("𝒓")) ("MIs" . ("𝒔")) ("MIt" . ("𝒕")) ("MIu" . ("𝒖")) ("MIv" . ("𝒗")) ("MIw" . ("𝒘")) ("MIx" . ("𝒙")) ("MIy" . ("𝒚")) ("MIz" . ("𝒛")) ("McA" . ("𝒜")) ("McB" . ("ℬ")) ("McC" . ("𝒞")) ("McD" . ("𝒟")) ("McE" . ("ℰ")) ("McF" . ("ℱ")) ("McG" . ("𝒢")) ("McH" . ("ℋ")) ("McI" . ("ℐ")) ("McJ" . ("𝒥")) ("McK" . ("𝒦")) ("McL" . ("ℒ")) ("McM" . ("ℳ")) ("McN" . ("𝒩")) ("McO" . ("𝒪")) ("McP" . ("𝒫")) ("McQ" . ("𝒬")) ("McR" . ("ℛ")) ("McS" . ("𝒮")) ("McT" . ("𝒯")) ("McU" . ("𝒰")) ("McV" . ("𝒱")) ("McW" . ("𝒲")) ("McX" . ("𝒳")) ("McY" . ("𝒴")) ("McZ" . ("𝒵")) ("Mca" . ("𝒶")) ("Mcb" . ("𝒷")) ("Mcc" . ("𝒸")) ("Mcd" . ("𝒹")) ("Mce" . ("ℯ")) ("Mcf" . ("𝒻")) ("Mcg" . ("ℊ")) ("Mch" . ("𝒽")) ("Mci" . ("𝒾")) ("Mcj" . ("𝒿")) ("Mck" . ("𝓀")) ("Mcl" . ("𝓁")) ("Mcm" . ("𝓂")) ("Mcn" . ("𝓃")) ("Mco" . ("ℴ")) ("Mcp" . ("𝓅")) ("Mcq" . ("𝓆")) ("Mcr" . ("𝓇")) ("Mcs" . ("𝓈")) ("Mct" . ("𝓉")) ("Mcu" . ("𝓊")) ("Mcv" . ("𝓋")) ("Mcw" . ("𝓌")) ("Mcx" . ("𝓍")) ("Mcy" . ("𝓎")) ("Mcz" . ("𝓏")) ("MCA" . ("𝓐")) ("MCB" . ("𝓑")) ("MCC" . ("𝓒")) ("MCD" . ("𝓓")) ("MCE" . ("𝓔")) ("MCF" . ("𝓕")) ("MCG" . ("𝓖")) ("MCH" . ("𝓗")) ("MCI" . ("𝓘")) ("MCJ" . ("𝓙")) ("MCK" . ("𝓚")) ("MCL" . ("𝓛")) ("MCM" . ("𝓜")) ("MCN" . ("𝓝")) ("MCO" . ("𝓞")) ("MCP" . ("𝓟")) ("MCQ" . ("𝓠")) ("MCR" . ("𝓡")) ("MCS" . ("𝓢")) ("MCT" . ("𝓣")) ("MCU" . ("𝓤")) ("MCV" . ("𝓥")) ("MCW" . ("𝓦")) ("MCX" . ("𝓧")) ("MCY" . ("𝓨")) ("MCZ" . ("𝓩")) ("MCa" . ("𝓪")) ("MCb" . ("𝓫")) ("MCc" . ("𝓬")) ("MCd" . ("𝓭")) ("MCe" . ("𝓮")) ("MCf" . ("𝓯")) ("MCg" . ("𝓰")) ("MCh" . ("𝓱")) ("MCi" . ("𝓲")) ("MCj" . ("𝓳")) ("MCk" . ("𝓴")) ("MCl" . ("𝓵")) ("MCm" . ("𝓶")) ("MCn" . ("𝓷")) ("MCo" . ("𝓸")) ("MCp" . ("𝓹")) ("MCq" . ("𝓺")) ("MCr" . ("𝓻")) ("MCs" . ("𝓼")) ("MCt" . ("𝓽")) ("MCu" . ("𝓾")) ("MCv" . ("𝓿")) ("MCw" . ("𝔀")) ("MCx" . ("𝔁")) ("MCy" . ("𝔂")) ("MCz" . ("𝔃")) ("MfA" . ("𝔄")) ("MfB" . ("𝔅")) ("MfD" . ("𝔇")) ("MfE" . ("𝔈")) ("MfF" . ("𝔉")) ("MfG" . ("𝔊")) ("MfJ" . ("𝔍")) ("MfK" . ("𝔎")) ("MfL" . ("𝔏")) ("MfM" . ("𝔐")) ("MfN" . ("𝔑")) ("MfO" . ("𝔒")) ("MfP" . ("𝔓")) ("MfQ" . ("𝔔")) ("MfS" . ("𝔖")) ("MfT" . ("𝔗")) ("MfU" . ("𝔘")) ("MfV" . ("𝔙")) ("MfW" . ("𝔚")) ("MfX" . ("𝔛")) ("MfY" . ("𝔜")) ("Mfa" . ("𝔞")) ("Mfb" . ("𝔟")) ("Mfc" . ("𝔠")) ("Mfd" . ("𝔡")) ("Mfe" . ("𝔢")) ("Mff" . ("𝔣")) ("Mfg" . ("𝔤")) ("Mfh" . ("𝔥")) ("Mfi" . ("𝔦")) ("Mfj" . ("𝔧")) ("Mfk" . ("𝔨")) ("Mfl" . ("𝔩")) ("Mfm" . ("𝔪")) ("Mfn" . ("𝔫")) ("Mfo" . ("𝔬")) ("Mfp" . ("𝔭")) ("Mfq" . ("𝔮")) ("Mfr" . ("𝔯")) ("Mfs" . ("𝔰")) ("Mft" . ("𝔱")) ("Mfu" . ("𝔲")) ("Mfv" . ("𝔳")) ("Mfw" . ("𝔴")) ("Mfx" . ("𝔵")) ("Mfy" . ("𝔶")) ("Mfz" . ("𝔷")) ;; (Sub / Super) scripts ("_a" . ("ₐ")) ("_e" . ("ₑ")) ("_h" . ("ₕ")) ("_i" . ("ᵢ")) ("_j" . ("ⱼ")) ("_k" . ("ₖ")) ("_l" . ("ₗ")) ("_m" . ("ₘ")) ("_n" . ("ₙ")) ("_o" . ("ₒ")) ("_p" . ("ₚ")) ("_r" . ("ᵣ")) ("_s" . ("ₛ")) ("_t" . ("ₜ")) ("_u" . ("ᵤ")) ("_x" . ("ₓ")) ("^a" . ("ᵃ")) ("^b" . ("ᵇ")) ("^c" . ("ᶜ")) ("^d" . ("ᵈ")) ("^e" . ("ᵉ")) ("^f" . ("ᶠ")) ("^g" . ("ᵍ")) ("^h" . ("ʰ")) ("^i" . ("ⁱ")) ("^j" . ("ʲ")) ("^k" . ("ᵏ")) ("^l" . ("ˡ")) ("^m" . ("ᵐ")) ("^n" . ("ⁿ")) ("^o" . ("ᵒ")) ("^p" . ("ᵖ")) ("^r" . ("ʳ")) ("^s" . ("ˢ")) ("^t" . ("ᵗ")) ("^u" . ("ᵘ")) ("^v" . ("ᵛ")) ("^w" . ("ʷ")) ("^x" . ("ˣ")) ("^y" . ("ʸ")) ("^z" . ("ᶻ")) ("^A" . ("ᴬ")) ("^B" . ("ᴮ")) ("^D" . ("ᴰ")) ("^E" . ("ᴱ")) ("^G" . ("ᴳ")) ("^H" . ("ᴴ")) ("^I" . ("ᴵ")) ("^J" . ("ᴶ")) ("^K" . ("ᴷ")) ("^L" . ("ᴸ")) ("^M" . ("ᴹ")) ("^N" . ("ᴺ")) ("^O" . ("ᴼ")) ("^P" . ("ᴾ")) ("^R" . ("ᴿ")) ("^T" . ("ᵀ")) ("^U" . ("ᵁ")) ("^V" . ("ⱽ")) ("^W" . ("ᵂ")) ;; Some ISO8859-1 characters. (" " . (" ")) ("!" . ("¡")) ("cent" . ("¢")) ("brokenbar" . ("¦")) ("degree" . ("°")) ("?" . ("¿")) ("^a_" . ("ª")) ("^o_" . ("º")) ;; Circled, parenthesised etc. numbers and letters. ( "(0)" . ,(agda-input-to-string-list " ⓪")) ( "(1)" . ,(agda-input-to-string-list "⑴①⒈❶➀➊")) ( "(2)" . ,(agda-input-to-string-list "⑵②⒉❷➁➋")) ( "(3)" . ,(agda-input-to-string-list "⑶③⒊❸➂➌")) ( "(4)" . ,(agda-input-to-string-list "⑷④⒋❹➃➍")) ( "(5)" . ,(agda-input-to-string-list "⑸⑤⒌❺➄➎")) ( "(6)" . ,(agda-input-to-string-list "⑹⑥⒍❻➅➏")) ( "(7)" . ,(agda-input-to-string-list "⑺⑦⒎❼➆➐")) ( "(8)" . ,(agda-input-to-string-list "⑻⑧⒏❽➇➑")) ( "(9)" . ,(agda-input-to-string-list "⑼⑨⒐❾➈➒")) ("(10)" . ,(agda-input-to-string-list "⑽⑩⒑❿➉➓")) ("(11)" . ,(agda-input-to-string-list "⑾⑪⒒")) ("(12)" . ,(agda-input-to-string-list "⑿⑫⒓")) ("(13)" . ,(agda-input-to-string-list "⒀⑬⒔")) ("(14)" . ,(agda-input-to-string-list "⒁⑭⒕")) ("(15)" . ,(agda-input-to-string-list "⒂⑮⒖")) ("(16)" . ,(agda-input-to-string-list "⒃⑯⒗")) ("(17)" . ,(agda-input-to-string-list "⒄⑰⒘")) ("(18)" . ,(agda-input-to-string-list "⒅⑱⒙")) ("(19)" . ,(agda-input-to-string-list "⒆⑲⒚")) ("(20)" . ,(agda-input-to-string-list "⒇⑳⒛")) ("(a)" . ,(agda-input-to-string-list "⒜Ⓐⓐ")) ("(b)" . ,(agda-input-to-string-list "⒝Ⓑⓑ")) ("(c)" . ,(agda-input-to-string-list "⒞Ⓒⓒ")) ("(d)" . ,(agda-input-to-string-list "⒟Ⓓⓓ")) ("(e)" . ,(agda-input-to-string-list "⒠Ⓔⓔ")) ("(f)" . ,(agda-input-to-string-list "⒡Ⓕⓕ")) ("(g)" . ,(agda-input-to-string-list "⒢Ⓖⓖ")) ("(h)" . ,(agda-input-to-string-list "⒣Ⓗⓗ")) ("(i)" . ,(agda-input-to-string-list "⒤Ⓘⓘ")) ("(j)" . ,(agda-input-to-string-list "⒥Ⓙⓙ")) ("(k)" . ,(agda-input-to-string-list "⒦Ⓚⓚ")) ("(l)" . ,(agda-input-to-string-list "⒧Ⓛⓛ")) ("(m)" . ,(agda-input-to-string-list "⒨Ⓜⓜ")) ("(n)" . ,(agda-input-to-string-list "⒩Ⓝⓝ")) ("(o)" . ,(agda-input-to-string-list "⒪Ⓞⓞ")) ("(p)" . ,(agda-input-to-string-list "⒫Ⓟⓟ")) ("(q)" . ,(agda-input-to-string-list "⒬Ⓠⓠ")) ("(r)" . ,(agda-input-to-string-list "⒭Ⓡⓡ")) ("(s)" . ,(agda-input-to-string-list "⒮Ⓢⓢ")) ("(t)" . ,(agda-input-to-string-list "⒯Ⓣⓣ")) ("(u)" . ,(agda-input-to-string-list "⒰Ⓤⓤ")) ("(v)" . ,(agda-input-to-string-list "⒱Ⓥⓥ")) ("(w)" . ,(agda-input-to-string-list "⒲Ⓦⓦ")) ("(x)" . ,(agda-input-to-string-list "⒳Ⓧⓧ")) ("(y)" . ,(agda-input-to-string-list "⒴Ⓨⓨ")) ("(z)" . ,(agda-input-to-string-list "⒵Ⓩⓩ")) )) "A list of translations specific to the Agda input method. Each element is a pair (KEY-SEQUENCE-STRING . LIST-OF-TRANSLATION-STRINGS). All the translation strings are possible translations of the given key sequence; if there is more than one you can choose between them using the arrow keys. Note that if you customize this setting you will not automatically benefit (or suffer) from modifications to its default value when the library is updated. If you just want to add some bindings it is probably a better idea to customize `agda-input-user-translations'. These translation pairs are included after those in `agda-input-user-translations', but before the ones inherited from other input methods (see `agda-input-inherit'). If you change this setting manually (without using the customization buffer) you need to call `agda-input-setup' in order for the change to take effect." :group 'agda-input :set 'agda-input-incorporate-changed-setting :initialize 'custom-initialize-default :type '(repeat (cons (string :tag "Key sequence") (repeat :tag "Translations" string)))) (defcustom agda-input-user-translations nil "Like `agda-input-translations', but more suitable for user customizations since by default it is empty. These translation pairs are included first, before those in `agda-input-translations' and the ones inherited from other input methods." :group 'agda-input :set 'agda-input-incorporate-changed-setting :initialize 'custom-initialize-default :type '(repeat (cons (string :tag "Key sequence") (repeat :tag "Translations" string)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Inspecting and modifying translation maps (defun agda-input-get-translations (qp) "Return a list containing all translations from the Quail package QP (except for those corresponding to ASCII). Each pair in the list has the form (KEY-SEQUENCE . TRANSLATION)." (with-temp-buffer (activate-input-method qp) ; To make sure that the package is loaded. (unless (quail-package qp) (error "%s is not a Quail package." qp)) (let ((decode-map (list 'decode-map))) (quail-build-decode-map (list (quail-map)) "" decode-map 0) (cdr decode-map)))) (defun agda-input-show-translations (qp) "Display all translations used by the Quail package QP (a string). \(Except for those corresponding to ASCII)." (interactive (list (read-input-method-name "Quail input method (default %s): " "Agda"))) (let ((buf (concat "*" qp " input method translations*"))) (with-output-to-temp-buffer buf (with-current-buffer buf (quail-insert-decode-map (cons 'decode-map (agda-input-get-translations qp))))))) (defun agda-input-add-translations (trans) "Add the given translations TRANS to the Agda input method. TRANS is a list of pairs (KEY-SEQUENCE . TRANSLATION). The translations are appended to the current translations." (with-temp-buffer (dolist (tr (agda-input-concat-map (eval agda-input-tweak-all) trans)) (quail-defrule (car tr) (cdr tr) "Agda" t)))) (defun agda-input-inherit-package (qp &optional fun) "Let the Agda input method inherit the translations from the Quail package QP (except for those corresponding to ASCII). The optional function FUN can be used to modify the translations. It is given a pair (KEY-SEQUENCE . TRANSLATION) and should return a list of such pairs." (let ((trans (agda-input-get-translations qp))) (agda-input-add-translations (if fun (agda-input-concat-map fun trans) trans)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Setting up the input method (defun agda-input-setup () "Set up the Agda input method based on the customisable variables and underlying input methods." ;; Create (or reset) the input method. (with-temp-buffer (quail-define-package "Agda" "UTF-8" "∏" t ; guidance "Agda input method. The purpose of this input method is to edit Agda programs, but since it is highly customisable it can be made useful for other tasks as well." nil nil nil nil nil nil t ; maximum-shortest )) (agda-input-add-translations (mapcar (lambda (tr) (cons (car tr) (vconcat (cdr tr)))) (append agda-input-user-translations agda-input-translations))) (dolist (def agda-input-inherit) (agda-input-inherit-package (car def) (eval (cdr def))))) (defun agda-input-incorporate-changed-setting (sym val) "Update the Agda input method based on the customisable variables and underlying input methods. Suitable for use in the :set field of `defcustom'." (set-default sym val) (agda-input-setup)) ;; Set up the input method. (agda-input-setup) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Administrative details (provide 'agda-input) ;;; agda-input.el ends here Agda-2.6.0.1/src/data/emacs-mode/agda2-mode-pkg.el0000644000000000000000000000020213466402171017411 0ustar0000000000000000(define-package "agda2-mode" "2.6.0.1" "interactive development for Agda, a dependently typed functional programming language") Agda-2.6.0.1/src/data/emacs-mode/annotation.el0000644000000000000000000002712413466402171017120 0ustar0000000000000000;;; annotation.el --- Functions for annotating text with faces and help bubbles ;; Note that this library enumerates buffer positions starting from 1, ;; just like Emacs. (require 'cl) (defvar annotation-bindings nil "An association list mapping symbols to faces.") (make-variable-buffer-local 'annotation-bindings) (defvar annotation-goto-stack nil "Positions from which `annotation-goto' was invoked.") (defun annotation-goto-indirect (link &optional other-window) "Follow the `annotation-goto' hyperlink pointed to by LINK, if any. LINK should be a buffer position, or an event object (in which case the ending position is used). If the hyperlink exists and the jump is performed successfully, then `t' is returned, and otherwise `nil' (unless an error is raised). If OTHER-WINDOW is non-nil, then another window is used to display the target position." (let (source-pos source-window source-buffer source-file-name target) (cond ((eventp link) (let ((pn (event-end link))) (when (not (posn-area pn)) (setq source-pos (posn-point pn)) (setq source-window (posn-window pn)) (setq source-buffer (window-buffer source-window))))) ((integerp link) (setq source-pos link) (setq source-window (selected-window)) (setq source-buffer (current-buffer))) (t (error "Not an integer or event object: %S" link))) (when (and source-pos source-buffer) (with-current-buffer source-buffer (setq target (get-text-property source-pos 'annotation-goto))) (when target (unless (equal source-window (selected-window)) (select-window source-window)) (annotation-goto-and-push source-buffer source-pos target other-window))))) (defun annotation-go-back nil "Go back to the previous position. The previous position in which `annotation-goto-and-push' was successfully invoked." (when annotation-goto-stack (let ((pos (pop annotation-goto-stack))) (annotation-goto pos)))) (defun annotation-goto-and-push (source-buffer source-pos filepos &optional other-window) "Like `annotation-goto', but pushes a position when successful. The position consists of the file visited by SOURCE-BUFFER, and the position given by SOURCE-POS." (let (source-file-name) (with-current-buffer source-buffer (setq source-file-name buffer-file-name)) (when (annotation-goto filepos other-window) (unless (and (equal source-buffer (current-buffer)) (eq source-pos (point))) (push `(,source-file-name . ,source-pos) annotation-goto-stack)) t))) (defun annotation-goto (filepos &optional other-window) "Go to file position FILEPOS if the file is readable. FILEPOS should have the form (FILE . POS). Return t if successful. If OTHER-WINDOW is non-nil, use another window to display the given position." (when (consp filepos) (let ((file (car filepos))) (if (file-readable-p file) (progn (if other-window (find-file-other-window file) (find-file file)) (goto-char (cdr filepos)) t) (error "File does not exist or is unreadable: %s." file))))) (defun annotation-merge-faces (start end faces) "Helper procedure used by `annotation-annotate'. For each position in the range the FACES are merged with the current value of the annotation-faces text property, and both the face and the annotation-faces text properties are set to the resulting list of faces. Precondition: START and END must be numbers, and START must be less than END." (assert (condition-case nil (< start end) (error nil))) (let ((pos start) mid) (while (< pos end) (setq mid (next-single-property-change pos 'annotation-faces nil end)) (let* ((old-faces (get-text-property pos 'annotation-faces)) (all-faces (union old-faces faces))) (mapc (lambda (prop) (put-text-property pos mid prop all-faces)) '(annotation-faces face)) (setq pos mid))))) (defun annotation-annotate (start end anns &optional token-based info goto) "Annotate text between START and END in the current buffer. Nothing happens if either START or END are out of bounds for the current (possibly narrowed) buffer, or END <= START. If ANNS is nil, then those text properties between START and END that have been set by this function are deleted. Otherwise the following happens. All the symbols in ANNS are looked up in `annotation-bindings', and the resulting list of faces is used to set the face text property. For each position in the range the faces are merged with the current value of the annotation-faces text property, and both the face and the annotation-faces text properties are set to the resulting list of faces. If TOKEN-BASED is non-nil, then the annotation-token-based property is set to t. This means that all text properties set by `annotation-annotate' in this range are interpreted as being token-based, including those set by previous calls to this procedure. If the string INFO is non-nil, the mouse-face property is set to highlight, and INFO is used as the help-echo string. If GOTO has the form (FILENAME . POSITION), then the mouse-face property is set to highlight, and the given filename/position will be used by `annotation-goto-indirect' when it is invoked with a position in the given range. Note that if a given attribute is defined by several faces, then the first face's setting takes precedence. All characters whose text properties get set also have the annotation-annotated property set to t, and annotation-annotations is set to a list with all the properties that have been set; this ensures that the text properties can later be removed (if the annotation-* properties are not tampered with)." (when (and (<= (point-min) start) (< start end) (<= end (point-max))) (if (null anns) (annotation-remove-annotations nil start end) (let ((faces (delq nil (mapcar (lambda (ann) (cdr (assoc ann annotation-bindings))) anns))) (props nil)) (when faces (annotation-merge-faces start end faces) (add-to-list 'props 'face) (add-to-list 'props 'annotation-faces)) (when token-based (add-text-properties start end `(annotation-token-based t)) (add-to-list 'props 'annotation-token-based)) (when (consp goto) (add-text-properties start end `(annotation-goto ,goto mouse-face highlight)) (add-to-list 'props 'annotation-goto) (add-to-list 'props 'mouse-face)) (when info (add-text-properties start end `(mouse-face highlight help-echo ,info)) (add-to-list 'props 'mouse-face) (add-to-list 'props 'help-echo)) (when props (add-to-list 'props 'annotation-annotated) (let ((pos start) mid) (while (< pos end) (setq mid (next-single-property-change pos 'annotation-annotations nil end)) (let* ((old-props (get-text-property pos 'annotation-annotations)) (all-props (union old-props props))) (add-text-properties pos mid `(annotation-annotated t annotation-annotations ,all-props)) (setq pos mid))))))))) (defmacro annotation-preserve-mod-p-and-undo (&rest code) "Run CODE preserving both the undo data and the modification bit. Modification hooks are also disabled." (declare (debug (&rest form))) (let ((modp (make-symbol "modp"))) `(let ((,modp (buffer-modified-p)) ;; Don't check if the file is being modified by some other process. (buffer-file-name nil) ;; Don't record those changes on the undo-log. (buffer-undo-list t) ;; Don't run modification hooks. (inhibit-modification-hooks t)) (unwind-protect (progn ,@code) (restore-buffer-modified-p ,modp))))) (defun annotation-remove-annotations (&optional token-based start end) "Remove text properties set by `annotation-annotate'. In the current buffer. If START and END are given, then properties are only removed between these positions. If TOKEN-BASED is non-nil, then only token-based properties are removed. This function preserves the file modification stamp of the current buffer, does not modify the undo list, and temporarily disables all modification hooks. Note: This function may fail if there is read-only text in the buffer." ;; remove-text-properties fails for read-only text. (annotation-preserve-mod-p-and-undo (let ((tag (if token-based 'annotation-token-based 'annotation-annotated)) (pos (or start (point-min))) (end (or end (point-max))) pos2) (while pos (let ((props (get-text-property pos 'annotation-annotations))) (setq pos2 (next-single-property-change pos tag nil end)) (when (and props (or (not token-based) (member 'annotation-token-based props))) (remove-text-properties pos (or pos2 (point-max)) (mapcan (lambda (prop) (list prop nil)) (cons 'annotation-annotations props))))) (setq pos (unless (or (not pos2) (>= pos2 end)) pos2)))))) (defun annotation-load (goto-help remove &rest cmds) "Apply highlighting annotations in CMDS in the current buffer. The argument CMDS should be a list of lists (start end anns &optional info goto). Text between start and end will be annotated with the annotations in the list anns (using `annotation-annotate'). If info and/or goto are present they will be used as the corresponding arguments to `annotation-annotate'. If INFO is nil in a call to `annotation-annotate', and the GOTO argument is a cons-cell, then the INFO argument is set to GOTO-HELP. The intention is that the default help text should inform the user about the \"goto\" facility. If REMOVE is nil, then old syntax highlighting information is not removed. Otherwise all token-based syntax highlighting is removed. In order to reduce the risk of flicker this highlighting is removed step by step, in conjunction with the addition of new highlighting. (This process assumes that CMDS is ordered by the positions of the annotations. If it isn't, then the highlighting is still applied correctly, but perhaps with more flicker.) This function preserves the file modification stamp of the current buffer, does not modify the undo list, and temporarily disables all modification hooks. Note: This function may fail if there is read-only text in the buffer." (annotation-preserve-mod-p-and-undo (when (listp cmds) (let ((pos (point-min))) (dolist (cmd cmds) (destructuring-bind (start end anns &optional token-based info goto) cmd (let ((info (if (and (not info) (consp goto)) goto-help info))) (when remove (annotation-remove-annotations 'token-based pos end) (setq pos end)) (annotation-annotate start end anns token-based info goto)))) (when remove (annotation-remove-annotations 'token-based pos (point-max))))))) (provide 'annotation) ;;; annotation.el ends here Agda-2.6.0.1/src/data/emacs-mode/eri.el0000644000000000000000000001543513466402171015527 0ustar0000000000000000;;; eri.el --- Enhanced relative indentation (eri) ;;; Commentary: ;;; Code: (require 'cl) (defun eri-current-line-length nil "Calculate length of current line." (- (line-end-position) (line-beginning-position))) (defun eri-current-line-empty nil "Return non-nil if the current line is empty (not counting white space)." (equal (current-indentation) (eri-current-line-length))) (defun eri-maximum (xs) "Calculate maximum element in XS. Returns nil if the list is empty." (if xs (apply 'max xs))) (defun eri-take (n xs) "Return the first N elements of XS." (butlast xs (- (length xs) n))) (defun eri-split (x xs) "Return a pair of lists (XS1 . XS2). If XS is sorted, then XS = (append XS1 XS2), and all elements in XS1 are <= X, whereas all elements in XS2 are > X." (let* ((pos (or (position-if (lambda (y) (> y x)) xs) (length xs))) (xs1 (eri-take pos xs)) (xs2 (nthcdr pos xs))) (cons xs1 xs2))) (defun eri-calculate-indentation-points-on-line (max) "Calculate indentation points on current line. Only points left of column number MAX are included. If MAX is nil, then all points are included. Points are returned in ascending order. Example (positions marked with ^ are returned): f x y = g 3 (Just y) 5 4 ^ ^ ^ ^ ^ ^ ^ ^ | | MAX" (let ((result)) (save-excursion (save-restriction (beginning-of-line) ; To make \\` work in the regexp below: (narrow-to-region (line-beginning-position) (line-end-position)) (while (progn (let ((pos (and (search-forward-regexp "\\(?:\\s-\\|\\`\\)\\(\\S-\\)" nil t) (match-beginning 1)))) (when (not (null pos)) (let ((pos1 (- pos (line-beginning-position)))) (when (or (null max) (< pos1 max)) (add-to-list 'result pos1)))) (and pos (< (point) (line-end-position)) (or (null max) (< (current-column) max)))))) (nreverse result) ; Destructive operation. )))) (defun eri-new-indentation-points () "Calculate new indentation points. Returns a singleton list containing the column number two steps in from the indentation of the first non-empty line (white space excluded) above the current line. If there is no such line, then the empty list is returned." (let ((start (line-beginning-position))) (save-excursion ; Find a non-empty line above the current one, if any. (while (progn (forward-line -1) (not (or (bobp) (not (eri-current-line-empty)))))) (if (or (equal (point) start) (eri-current-line-empty)) nil (list (+ 2 (current-indentation))))))) (defun eri-calculate-indentation-points (reverse) "Calculate points used to indent the current line. The points are given in reverse order if REVERSE is non-nil. See `eri-indent' for a description of how the indentation points are calculated; note that the current indentation is not included in the returned list." ;; First find a bunch of indentations used above the current line. (let ((points) (max) (start (line-beginning-position))) (save-excursion (while (progn (forward-line -1) ; Skip the line we started from and lines with nothing but ; white space. (unless (or (equal (point) start) (eri-current-line-empty)) (setq points (append (eri-calculate-indentation-points-on-line max) points)) (setq max (car points))) ;; Stop after hitting the beginning of the buffer or a ;; non-empty, non-indented line. (not (or (bobp) (and (equal (current-indentation) 0) (> (eri-current-line-length) 0))))))) ;; Add new indentation points, but remove the current indentation. ;; Sort the indentations. Rearrange the points so that the next ;; point is the one after the current one. Reverse if necessary. ;; ;; Note: sort and nreverse are destructive. (let* ((ps0 (remove (current-indentation) (append (eri-new-indentation-points) points))) (ps1 (eri-split (current-indentation) (sort ps0 '<))) (ps2 (append (cdr ps1) (car ps1)))) (if reverse (nreverse ps2) ps2)))) (defun eri-indent (&optional reverse) "Cycle between some possible indentation points. With prefix argument REVERSE, cycle in reverse order. Assume that a file contains the following lines of code, with point on the line with three dots: frob = loooooooooooooooooooooooooong identifier foo = f a b where f (Foo x) y = let bar = x baz = 3 + 5 ... ^ ^ ^ ^ ^ ^ ^ ^ ^ * ^ ^ ^ ^ Then the ^'s and the * mark the indentation points that this function cycles through. The indentation points are selected as follows: * All lines before the current one, up to and including the first non-indented line (or the beginning of the buffer) are considered. foo = f a b where f (Foo x) y = let bar = x baz = 3 + 5 * On these lines, erase all characters that stand to the right of some non-white space character on a lower line. foo whe f (Foo x) y = let b baz = 3 + 5 * Also erase all characters not immediately preceded by white space. f w f ( x y = l b b = 3 + 5 * The columns of all remaining characters are indentation points. f w f ( x y = l b = 3 + 5 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ * A new indentation point is also added, two steps in from the indentation of the first non-empty line (white space excluded) above the current line (if there is such a line). f w f ( x y = l b = 3 + 5 ^ ^ ^ ^ ^ ^ ^ ^ ^ * ^ ^ ^ ^" (interactive "P") (let* ((points (eri-calculate-indentation-points reverse)) (remaining-points (cdr (member (current-indentation) points))) (indentation (if remaining-points (car remaining-points) (car points)))) (when indentation (save-excursion (indent-line-to indentation)) (if (< (current-column) indentation) (indent-line-to indentation))))) (defun eri-indent-reverse nil "Cycle between some possible indentation points (in reverse order). See `eri-indent' for a description of how the indentation points are calculated." (interactive) (eri-indent t)) (provide 'eri) ;;; eri.el ends here Agda-2.6.0.1/src/data/emacs-mode/agda2-highlight.el0000644000000000000000000005132513466402171017671 0ustar0000000000000000;;; agda2-highlight.el --- Syntax highlighting for Agda (version ≥ 2) ;;; Commentary: ;; Code to apply syntactic highlighting to Agda source code. This uses ;; Agda's own annotations to figure out what is what, so the parsing ;; is always done correctly, but highlighting is not done on the fly. ;;; Code: (require 'annotation) (require 'font-lock) (defgroup agda2-highlight nil "Syntax highlighting for Agda." :group 'agda2) (defcustom agda2-highlight-level 'non-interactive "How much syntax highlighting should be produced? Interactive highlighting includes highlighting of the expression that is currently being type-checked." :type '(choice (const :tag "None" none) (const :tag "Non-interactive" non-interactive) (const :tag "Interactive" interactive)) :group 'agda2-highlight) (defun agda2-highlight-level nil "Formats the highlighting level in a Haskelly way." (cond ((equal agda2-highlight-level 'none) "None") ((equal agda2-highlight-level 'non-interactive) "NonInteractive") ((equal agda2-highlight-level 'interactive) "Interactive") (t "None"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions for setting faces (defun agda2-highlight-set-face-attribute (face attrs) "Reset (globally) all attributes of the face FACE according to ATTRS. If the face does not exist, then it is created first." (make-face face) (set-face-attribute face nil :family 'unspecified :width 'unspecified :height 'unspecified :weight 'unspecified :slant 'unspecified :foreground 'unspecified :background 'unspecified :inverse-video 'unspecified :stipple 'unspecified :underline 'unspecified :overline 'unspecified :strike-through 'unspecified :inherit 'unspecified :box 'unspecified :font 'unspecified) (eval `(set-face-attribute face nil ,@attrs))) (defvar agda2-highlight-face-attributes-list '(:family :width :height :weight :slant :foreground :background :inverse-video :stipple :underline :overline :strike-through :inherit :box :font) "The attributes considered by `agda2-highlight-face-attributes'.") (defun agda2-highlight-face-attributes (face) "The names and values of all attributes in FACE. Only the attributes in `agda2-highlight-face-attributes-list' are considered. The attributes are returned in a flat list of the form (name1 value1 name2 value2...)." (apply 'append (mapcar (lambda (attr) (let ((val (face-attribute face attr))) (if (member val '(unspecified nil)) '() (list attr (if (symbolp val) `',val val))))) agda2-highlight-face-attributes-list))) (defun agda2-highlight-set-faces (variable group) "Set all Agda faces according to the value of GROUP. Also sets the default value of VARIABLE to GROUP." (set-default variable group) (mapc (lambda (face-and-attrs) (agda2-highlight-set-face-attribute (car face-and-attrs) (cdr face-and-attrs))) (cond ((equal group 'conor) '((agda2-highlight-keyword-face :bold t) (agda2-highlight-string-face :foreground "firebrick3") (agda2-highlight-number-face :foreground "firebrick3") (agda2-highlight-symbol-face :foreground "grey25") (agda2-highlight-primitive-type-face :foreground "medium blue") (agda2-highlight-bound-variable-face :foreground "purple") (agda2-highlight-generalizable-variable-face :foreground "purple") (agda2-highlight-inductive-constructor-face :foreground "firebrick3") (agda2-highlight-coinductive-constructor-face :foreground "firebrick3") (agda2-highlight-datatype-face :foreground "medium blue") (agda2-highlight-field-face :foreground "deeppink") (agda2-highlight-function-face :foreground "darkgreen") (agda2-highlight-module-face :foreground "medium blue") (agda2-highlight-postulate-face :foreground "darkgreen") (agda2-highlight-primitive-face :foreground "darkgreen") (agda2-highlight-macro-face :foreground "aquamarine4") (agda2-highlight-record-face :foreground "medium blue") (agda2-highlight-dotted-face) (agda2-highlight-error-face :foreground "red" :underline t) (agda2-highlight-unsolved-meta-face :foreground "black" :background "yellow") (agda2-highlight-unsolved-constraint-face :foreground "black" :background "yellow") (agda2-highlight-termination-problem-face :foreground "black" :background "light salmon") (agda2-highlight-positivity-problem-face :foreground "black" :background "peru") (agda2-highlight-incomplete-pattern-face :foreground "black" :background "purple") (agda2-highlight-typechecks-face :foreground "black" :background "light blue"))) ((equal group 'default-faces) (list (cons 'agda2-highlight-keyword-face (agda2-highlight-face-attributes font-lock-keyword-face)) (cons 'agda2-highlight-string-face (agda2-highlight-face-attributes font-lock-string-face)) (cons 'agda2-highlight-number-face (agda2-highlight-face-attributes font-lock-constant-face)) (cons 'agda2-highlight-symbol-face (agda2-highlight-face-attributes font-lock-keyword-face)) (cons 'agda2-highlight-primitive-type-face (agda2-highlight-face-attributes font-lock-keyword-face)) (cons 'agda2-highlight-bound-variable-face (agda2-highlight-face-attributes font-lock-variable-name-face)) (cons 'agda2-highlight-generalizable-variable-face (agda2-highlight-face-attributes font-lock-variable-name-face)) (cons 'agda2-highlight-inductive-constructor-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-coinductive-constructor-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-datatype-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-field-face (agda2-highlight-face-attributes font-lock-variable-name-face)) (cons 'agda2-highlight-function-face (agda2-highlight-face-attributes font-lock-function-name-face)) (cons 'agda2-highlight-module-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-postulate-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-primitive-face (agda2-highlight-face-attributes font-lock-constant-face)) (cons 'agda2-highlight-macro-face (agda2-highlight-face-attributes font-lock-function-name-face)) (cons 'agda2-highlight-record-face (agda2-highlight-face-attributes font-lock-variable-name-face)) (cons 'agda2-highlight-dotted-face (agda2-highlight-face-attributes font-lock-variable-name-face)) (cons 'agda2-highlight-operator-face (agda2-highlight-face-attributes font-lock-function-name-face)) (cons 'agda2-highlight-error-face (agda2-highlight-face-attributes font-lock-warning-face)) (cons 'agda2-highlight-typechecks-face (agda2-highlight-face-attributes font-lock-type-face)) (cons 'agda2-highlight-typechecking-face (agda2-highlight-face-attributes font-lock-preprocessor-face))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Faces (defcustom agda2-highlight-face-groups nil "Colour scheme used in Agda buffers. Changes to this variable may not take full effect until you have restarted Emacs. Note also that if you are using the default-faces option and change your colour theme, then the changes may not take effect in Agda buffers until you have restarted Emacs." :type '(choice (const :tag "Use the settings in the \"Agda2 Highlight Faces\" subgroup." nil) (const :tag "Use an approximation of Conor McBride's colour scheme." conor) (const :tag "Use simplified highlighting and default font-lock faces." default-faces)) :group 'agda2-highlight :set 'agda2-highlight-set-faces) (defgroup agda2-highlight-faces nil "Faces used to highlight Agda code. If `agda2-highlight-face-groups' is nil." :group 'agda2-highlight) (defface agda2-highlight-keyword-face '((t (:foreground "DarkOrange3"))) "The face used for keywords." :group 'agda2-highlight-faces) (defface agda2-highlight-string-face '((t (:foreground "firebrick"))) "The face used for strings." :group 'agda2-highlight-faces) (defface agda2-highlight-number-face '((t (:foreground "purple"))) "The face used for numbers." :group 'agda2-highlight-faces) (defface agda2-highlight-symbol-face '((((background light)) (:foreground "gray25")) (((background dark)) (:foreground "gray75"))) "The face used for symbols like forall, =, ->, etc." :group 'agda2-highlight-faces) (defface agda2-highlight-primitive-type-face '((t (:foreground "medium blue"))) "The face used for primitive types (like Set and Prop)." :group 'agda2-highlight-faces) (defface agda2-highlight-bound-variable-face '((t nil)) "The face used for bound variables." :group 'agda2-highlight-faces) (defface agda2-highlight-generalizable-variable-face '((t nil)) "The face used for generalizable variables." :group 'agda2-highlight-faces) (defface agda2-highlight-inductive-constructor-face '((t (:foreground "green4"))) "The face used for inductive constructors." :group 'agda2-highlight-faces) (defface agda2-highlight-coinductive-constructor-face '((t (:foreground "gold4"))) "The face used for coinductive constructors." :group 'agda2-highlight-faces) (defface agda2-highlight-datatype-face '((t (:foreground "medium blue"))) "The face used for datatypes." :group 'agda2-highlight-faces) (defface agda2-highlight-field-face '((t (:foreground "DeepPink2"))) "The face used for record fields." :group 'agda2-highlight-faces) (defface agda2-highlight-function-face '((t (:foreground "medium blue"))) "The face used for functions." :group 'agda2-highlight-faces) (defface agda2-highlight-module-face '((t (:foreground "purple"))) "The face used for module names." :group 'agda2-highlight-faces) (defface agda2-highlight-postulate-face '((t (:foreground "medium blue"))) "The face used for postulates." :group 'agda2-highlight-faces) (defface agda2-highlight-pragma-face '((t nil)) "The face used for (some text in) pragmas." :group 'agda2-highlight-faces) (defface agda2-highlight-primitive-face '((t (:foreground "medium blue"))) "The face used for primitive functions." :group 'agda2-highlight-faces) (defface agda2-highlight-macro-face '((t (:foreground "aquamarine4"))) "The face used for macros." :group 'agda2-highlight-faces) (defface agda2-highlight-record-face '((t (:foreground "medium blue"))) "The face used for record types." :group 'agda2-highlight-faces) (defface agda2-highlight-dotted-face '((t nil)) "The face used for dotted patterns." :group 'agda2-highlight-faces) (defface agda2-highlight-operator-face '((t nil)) "The face used for operators." :group 'agda2-highlight-faces) (defface agda2-highlight-error-face '((t (:foreground "red" :underline t))) "The face used for errors." :group 'agda2-highlight-faces) (defface agda2-highlight-unsolved-meta-face '((t (:background "yellow"))) "The face used for unsolved meta variables." :group 'agda2-highlight-faces) (defface agda2-highlight-unsolved-constraint-face '((t (:background "yellow"))) "The face used for unsolved constraints which are not connected to metas." :group 'agda2-highlight-faces) (defface agda2-highlight-termination-problem-face '((t (:background "light salmon"))) "The face used for termination problems." :group 'agda2-highlight-faces) (defface agda2-highlight-positivity-problem-face '((t (:background "peru"))) "The face used for positivity problems." :group 'agda2-highlight-faces) (defface agda2-highlight-deadcode-face '((t (:background "dark gray"))) "The face used for dead code (unreachable clauses, etc.)." :group 'agda2-highlight-faces) (defface agda2-highlight-coverage-problem-face '((t (:background "wheat"))) "The face used for coverage problems." :group 'agda2-highlight-faces) (defface agda2-highlight-catchall-clause-face '((t (:background "white smoke"))) "The face used for catchall clauses." :group 'agda2-highlight-faces) (defface agda2-highlight-typechecks-face '((t (:background "light blue" :foreground "black"))) "The face used for code which is being type-checked." :group 'agda2-highlight-faces) (defvar agda2-highlight-faces '((keyword . agda2-highlight-keyword-face) (comment . font-lock-comment-face) (background . font-lock-comment-face) (markup . font-lock-comment-face) (string . agda2-highlight-string-face) (number . agda2-highlight-number-face) (symbol . agda2-highlight-symbol-face) (primitivetype . agda2-highlight-primitive-type-face) (bound . agda2-highlight-bound-variable-face) (generalizable . agda2-highlight-generalizable-variable-face) (inductiveconstructor . agda2-highlight-inductive-constructor-face) (coinductiveconstructor . agda2-highlight-coinductive-constructor-face) (datatype . agda2-highlight-datatype-face) (field . agda2-highlight-field-face) (function . agda2-highlight-function-face) (module . agda2-highlight-module-face) (postulate . agda2-highlight-postulate-face) (pragma . agda2-highlight-pragma-face) (primitive . agda2-highlight-primitive-face) (macro . agda2-highlight-macro-face) (record . agda2-highlight-record-face) (dotted . agda2-highlight-dotted-face) (operator . agda2-highlight-operator-face) (error . agda2-highlight-error-face) (unsolvedmeta . agda2-highlight-unsolved-meta-face) (unsolvedconstraint . agda2-highlight-unsolved-constraint-face) (terminationproblem . agda2-highlight-termination-problem-face) (deadcode . agda2-highlight-deadcode-face) (coverageproblem . agda2-highlight-coverage-problem-face) (positivityproblem . agda2-highlight-positivity-problem-face) (incompletepattern . agda2-highlight-incomplete-pattern-face) (catchallclause . agda2-highlight-catchall-clause-face) (typechecks . agda2-highlight-typechecks-face)) "Alist mapping code aspects to the face used when displaying them. The aspects currently recognised are the following: `bound' Bound variables. `coinductiveconstructor' Coinductive constructors. `datatype' Data types. `dotted' Dotted patterns. `error' Errors. `field' Record fields. `function' Functions. `generalizable' Generalizable variables. `incompletepattern' Incomplete patterns. `inductiveconstructor' Inductive constructors. `keyword' Keywords. `module' Module names. `number' Numbers. `operator' Operators. `postulate' Postulates. `pragma' Text occurring in pragmas that does not have a more specific (syntactic) aspect. `primitive' Primitive functions. `primitivetype' Primitive types (like Set and Prop). `macro' Macros. `record' Record types. `string' Strings. `symbol' Symbols like forall, =, ->, etc. `terminationproblem' Termination problems. `positivityproblem' Positivity problems. `deadcode' Deadcode (like unreachable clauses or RHS) `coverageproblem' Coverage problems. `catchallclause' Clause not holding definitionally. `typechecks' Code which is being type-checked. `unsolvedconstraint' Unsolved constraints, not connected to meta variables. `unsolvedmeta' Unsolved meta variables. `background' Non-Agda code contents in literate mode. `markup' Delimiters to separate the Agda code blocks from other contents `comment' Comments.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables (defvar agda2-highlight-in-progress nil "If nil, then highlighting annotations are not applied.") (make-variable-buffer-local 'agda2-highlight-in-progress) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions (defun agda2-highlight-setup nil "Set up the `annotation' library for use with `agda2-mode'." (agda2-highlight-set-faces 'agda2-highlight-face-groups agda2-highlight-face-groups) (setq annotation-bindings agda2-highlight-faces)) (defun agda2-highlight-apply (remove &rest cmds) "Adds the syntax highlighting information in the annotation list CMDS. If REMOVE is nil, then old syntax highlighting information is not removed. Otherwise all token-based syntax highlighting is removed." (let (;; Ignore read-only status, otherwise this function may fail. (inhibit-read-only t)) (apply 'annotation-load "Click mouse-2 to jump to definition" remove cmds))) (defun agda2-highlight-add-annotations (remove &rest cmds) "Like `agda2-highlight-apply'. But only if `agda2-highlight-in-progress' is non-nil." (if agda2-highlight-in-progress (apply 'agda2-highlight-apply remove cmds))) (defun agda2-highlight-load (file) "Load syntax highlighting information from FILE. Old syntax highlighting information is not removed." (let* ((coding-system-for-read 'utf-8) (cmds (with-temp-buffer (insert-file-contents file) (goto-char (point-min)) (read (current-buffer))))) (apply 'agda2-highlight-apply cmds))) (defun agda2-highlight-load-and-delete-action (file) "Like `agda2-highlight-load', but deletes FILE when done. And highlighting is only updated if `agda2-highlight-in-progress' is non-nil." (unwind-protect (if agda2-highlight-in-progress (agda2-highlight-load file)) (delete-file file))) (defun agda2-highlight-clear (&optional token-based) "Remove all syntax highlighting. If TOKEN-BASED is non-nil, then only token-based highlighting is removed." (interactive) (let ((inhibit-read-only t)) ; Ignore read-only status, otherwise this function may fail. (annotation-remove-annotations token-based))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Administrative details (provide 'agda2-highlight) ;;; agda2-highlight.el ends here Agda-2.6.0.1/src/data/lib/0000755000000000000000000000000013466402171013152 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/0000755000000000000000000000000013466402171014121 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/0000755000000000000000000000000013466402171014755 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Primitive.agda0000644000000000000000000000150513466402171017544 0ustar0000000000000000-- The Agda primitives (preloaded). {-# OPTIONS --without-K #-} module Agda.Primitive where ------------------------------------------------------------------------ -- Universe levels ------------------------------------------------------------------------ infixl 6 _⊔_ -- Level is the first thing we need to define. -- The other postulates can only be checked if built-in Level is known. postulate Level : Set -- MAlonzo compiles Level to (). This should be safe, because it is -- not possible to pattern match on levels. {-# COMPILE GHC Level = type () #-} {-# BUILTIN LEVEL Level #-} postulate lzero : Level lsuc : (ℓ : Level) → Level _⊔_ : (ℓ₁ ℓ₂ : Level) → Level {-# BUILTIN LEVELZERO lzero #-} {-# BUILTIN LEVELSUC lsuc #-} {-# BUILTIN LEVELMAX _⊔_ #-} {-# BUILTIN SETOMEGA Setω #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Primitive/0000755000000000000000000000000013466402171016725 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Primitive/Cubical.agda0000644000000000000000000000277713466402171021122 0ustar0000000000000000{-# OPTIONS --cubical #-} module Agda.Primitive.Cubical where {-# BUILTIN INTERVAL I #-} -- I : Setω {-# BUILTIN IZERO i0 #-} {-# BUILTIN IONE i1 #-} infix 30 primINeg infixr 20 primIMin primIMax primitive primIMin : I → I → I primIMax : I → I → I primINeg : I → I {-# BUILTIN ISONE IsOne #-} -- IsOne : I → Setω postulate itIsOne : IsOne i1 IsOne1 : ∀ i j → IsOne i → IsOne (primIMax i j) IsOne2 : ∀ i j → IsOne j → IsOne (primIMax i j) {-# BUILTIN ITISONE itIsOne #-} {-# BUILTIN ISONE1 IsOne1 #-} {-# BUILTIN ISONE2 IsOne2 #-} -- Partial : ∀{ℓ} (i : I) (A : Set ℓ) → Set ℓ -- Partial i A = IsOne i → A {-# BUILTIN PARTIAL Partial #-} {-# BUILTIN PARTIALP PartialP #-} postulate isOneEmpty : ∀ {ℓ} {A : Partial i0 (Set ℓ)} → PartialP i0 A {-# BUILTIN ISONEEMPTY isOneEmpty #-} primitive primPOr : ∀ {ℓ} (i j : I) {A : Partial (primIMax i j) (Set ℓ)} → (u : PartialP i (λ z → A (IsOne1 i j z))) → (v : PartialP j (λ z → A (IsOne2 i j z))) → PartialP (primIMax i j) A -- Computes in terms of primHComp and primTransp primComp : ∀ {ℓ} (A : (i : I) → Set (ℓ i)) (φ : I) (u : ∀ i → Partial φ (A i)) (a : A i0) → A i1 syntax primPOr p q u t = [ p ↦ u , q ↦ t ] primitive primTransp : ∀ {ℓ} (A : (i : I) → Set (ℓ i)) (φ : I) (a : A i0) → A i1 primHComp : ∀ {ℓ} {A : Set ℓ} {φ : I} (u : ∀ i → Partial φ A) (a : A) → A Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/0000755000000000000000000000000013466402171016363 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Equality.agda0000644000000000000000000000035213466402171020776 0ustar0000000000000000 {-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Equality where infix 4 _≡_ data _≡_ {a} {A : Set a} (x : A) : A → Set a where instance refl : x ≡ x {-# BUILTIN EQUALITY _≡_ #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Word.agda0000644000000000000000000000045113466402171020114 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Word where open import Agda.Builtin.Nat postulate Word64 : Set {-# BUILTIN WORD64 Word64 #-} primitive primWord64ToNat : Word64 → Nat primWord64FromNat : Nat → Word64 Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Coinduction.agda0000644000000000000000000000057413466402171021465 0ustar0000000000000000{-# OPTIONS --without-K --safe --universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Coinduction where infix 1000 ♯_ postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/IO.agda0000644000000000000000000000036613466402171017515 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.IO where postulate IO : ∀ {a} → Set a → Set a {-# BUILTIN IO IO #-} {-# FOREIGN GHC type AgdaIO a b = IO b #-} {-# COMPILE GHC IO = type AgdaIO #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Char.agda0000644000000000000000000000100513466402171020052 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Char where open import Agda.Builtin.Nat open import Agda.Builtin.Bool postulate Char : Set {-# BUILTIN CHAR Char #-} primitive primIsLower primIsDigit primIsAlpha primIsSpace primIsAscii primIsLatin1 primIsPrint primIsHexDigit : Char → Bool primToUpper primToLower : Char → Char primCharToNat : Char → Nat primNatToChar : Nat → Char primCharEquality : Char → Char → Bool Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/String.agda0000644000000000000000000000177113466402171020455 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.String where open import Agda.Builtin.Bool open import Agda.Builtin.List open import Agda.Builtin.Char postulate String : Set {-# BUILTIN STRING String #-} primitive primStringToList : String → List Char primStringFromList : List Char → String primStringAppend : String → String → String primStringEquality : String → String → Bool primShowChar : Char → String primShowString : String → String {-# COMPILE JS primStringToList = function(x) { return x.split(""); } #-} {-# COMPILE JS primStringFromList = function(x) { return x.join(""); } #-} {-# COMPILE JS primStringAppend = function(x) { return function(y) { return x+y; }; } #-} {-# COMPILE JS primStringEquality = function(x) { return function(y) { return x===y; }; } #-} {-# COMPILE JS primShowChar = function(x) { return JSON.stringify(x); } #-} {-# COMPILE JS primShowString = function(x) { return JSON.stringify(x); } #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Nat.agda0000644000000000000000000000770613466402171017735 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Nat where open import Agda.Builtin.Bool data Nat : Set where zero : Nat suc : (n : Nat) → Nat {-# BUILTIN NATURAL Nat #-} infix 4 _==_ _<_ infixl 6 _+_ _-_ infixl 7 _*_ _+_ : Nat → Nat → Nat zero + m = m suc n + m = suc (n + m) {-# BUILTIN NATPLUS _+_ #-} _-_ : Nat → Nat → Nat n - zero = n zero - suc m = zero suc n - suc m = n - m {-# BUILTIN NATMINUS _-_ #-} _*_ : Nat → Nat → Nat zero * m = zero suc n * m = m + n * m {-# BUILTIN NATTIMES _*_ #-} _==_ : Nat → Nat → Bool zero == zero = true suc n == suc m = n == m _ == _ = false {-# BUILTIN NATEQUALS _==_ #-} _<_ : Nat → Nat → Bool _ < zero = false zero < suc _ = true suc n < suc m = n < m {-# BUILTIN NATLESS _<_ #-} -- Helper function div-helper for Euclidean division. --------------------------------------------------------------------------- -- -- div-helper computes n / 1+m via iteration on n. -- -- n div (suc m) = div-helper 0 m n m -- -- The state of the iterator has two accumulator variables: -- -- k: The quotient, returned once n=0. Initialized to 0. -- -- j: A counter, initialized to the divisor m, decreased on each iteration step. -- Once it reaches 0, the quotient k is increased and j reset to m, -- starting the next countdown. -- -- Under the precondition j ≤ m, the invariant is -- -- div-helper k m n j = k + (n + m - j) div (1 + m) div-helper : (k m n j : Nat) → Nat div-helper k m zero j = k div-helper k m (suc n) zero = div-helper (suc k) m n m div-helper k m (suc n) (suc j) = div-helper k m n j {-# BUILTIN NATDIVSUCAUX div-helper #-} -- Proof of the invariant by induction on n. -- -- clause 1: div-helper k m 0 j -- = k by definition -- = k + (0 + m - j) div (1 + m) since m - j < 1 + m -- -- clause 2: div-helper k m (1 + n) 0 -- = div-helper (1 + k) m n m by definition -- = 1 + k + (n + m - m) div (1 + m) by induction hypothesis -- = 1 + k + n div (1 + m) by simplification -- = k + (n + (1 + m)) div (1 + m) by expansion -- = k + (1 + n + m - 0) div (1 + m) by expansion -- -- clause 3: div-helper k m (1 + n) (1 + j) -- = div-helper k m n j by definition -- = k + (n + m - j) div (1 + m) by induction hypothesis -- = k + ((1 + n) + m - (1 + j)) div (1 + m) by expansion -- -- Q.e.d. -- Helper function mod-helper for the remainder computation. --------------------------------------------------------------------------- -- -- (Analogous to div-helper.) -- -- mod-helper computes n % 1+m via iteration on n. -- -- n mod (suc m) = mod-helper 0 m n m -- -- The invariant is: -- -- m = k + j ==> mod-helper k m n j = (n + k) mod (1 + m). mod-helper : (k m n j : Nat) → Nat mod-helper k m zero j = k mod-helper k m (suc n) zero = mod-helper 0 m n m mod-helper k m (suc n) (suc j) = mod-helper (suc k) m n j {-# BUILTIN NATMODSUCAUX mod-helper #-} -- Proof of the invariant by induction on n. -- -- clause 1: mod-helper k m 0 j -- = k by definition -- = (0 + k) mod (1 + m) since m = k + j, thus k < m -- -- clause 2: mod-helper k m (1 + n) 0 -- = mod-helper 0 m n m by definition -- = (n + 0) mod (1 + m) by induction hypothesis -- = (n + (1 + m)) mod (1 + m) by expansion -- = (1 + n) + k) mod (1 + m) since k = m (as l = 0) -- -- clause 3: mod-helper k m (1 + n) (1 + j) -- = mod-helper (1 + k) m n j by definition -- = (n + (1 + k)) mod (1 + m) by induction hypothesis -- = ((1 + n) + k) mod (1 + m) by commutativity -- -- Q.e.d. Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Size.agda0000644000000000000000000000110413466402171020107 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --sized-types --no-guardedness #-} module Agda.Builtin.Size where {-# BUILTIN SIZEUNIV SizeU #-} {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZELT Size<_ #-} {-# BUILTIN SIZESUC ↑_ #-} {-# BUILTIN SIZEINF ∞ #-} {-# BUILTIN SIZEMAX _⊔ˢ_ #-} {-# FOREIGN GHC type SizeLT i = () #-} {-# COMPILE GHC Size = type () #-} {-# COMPILE GHC Size<_ = type SizeLT #-} {-# COMPILE GHC ↑_ = \_ -> () #-} {-# COMPILE GHC ∞ = () #-} {-# COMPILE GHC _⊔ˢ_ = \_ _ -> () #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/TrustMe.agda0000644000000000000000000000064413466402171020610 0ustar0000000000000000{-# OPTIONS --no-sized-types --no-guardedness #-} module Agda.Builtin.TrustMe where open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Erase private postulate unsafePrimTrustMe : ∀ {a} {A : Set a} {x y : A} → x ≡ y primTrustMe : ∀ {a} {A : Set a} {x y : A} → x ≡ y primTrustMe = primEraseEquality unsafePrimTrustMe {-# DISPLAY primEraseEquality unsafePrimTrustMe = primTrustMe #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Strict.agda0000644000000000000000000000054513466402171020455 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Strict where open import Agda.Builtin.Equality primitive primForce : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) → (∀ x → B x) → B x primForceLemma : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) (f : ∀ x → B x) → primForce x f ≡ f x Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Sigma.agda0000644000000000000000000000046513466402171020246 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Sigma where open import Agda.Primitive record Σ {a b} (A : Set a) (B : A → Set b) : Set (a ⊔ b) where constructor _,_ field fst : A snd : B fst open Σ public infixr 4 _,_ {-# BUILTIN SIGMA Σ #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Bool.agda0000644000000000000000000000073413466402171020100 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Bool where data Bool : Set where false true : Bool {-# BUILTIN BOOL Bool #-} {-# BUILTIN FALSE false #-} {-# BUILTIN TRUE true #-} {-# COMPILE UHC Bool = data __BOOL__ (__FALSE__ | __TRUE__) #-} {-# COMPILE JS Bool = function (x,v) { return ((x)? v["true"]() : v["false"]()); } #-} {-# COMPILE JS false = false #-} {-# COMPILE JS true = true #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/FromNat.agda0000644000000000000000000000065313466402171020553 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.FromNat where open import Agda.Primitive open import Agda.Builtin.Nat record Number {a} (A : Set a) : Set (lsuc a) where field Constraint : Nat → Set a fromNat : ∀ n → {{_ : Constraint n}} → A open Number {{...}} public using (fromNat) {-# BUILTIN FROMNAT fromNat #-} {-# DISPLAY Number.fromNat _ n = fromNat n #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Reflection.agda0000644000000000000000000002477613466402171021313 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Reflection where open import Agda.Builtin.Unit open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Word open import Agda.Builtin.List open import Agda.Builtin.String open import Agda.Builtin.Char open import Agda.Builtin.Float open import Agda.Builtin.Int open import Agda.Builtin.Sigma -- Names -- postulate Name : Set {-# BUILTIN QNAME Name #-} primitive primQNameEquality : Name → Name → Bool primQNameLess : Name → Name → Bool primShowQName : Name → String -- Fixity -- data Associativity : Set where left-assoc : Associativity right-assoc : Associativity non-assoc : Associativity data Precedence : Set where related : Int → Precedence unrelated : Precedence data Fixity : Set where fixity : Associativity → Precedence → Fixity {-# BUILTIN ASSOC Associativity #-} {-# BUILTIN ASSOCLEFT left-assoc #-} {-# BUILTIN ASSOCRIGHT right-assoc #-} {-# BUILTIN ASSOCNON non-assoc #-} {-# BUILTIN PRECEDENCE Precedence #-} {-# BUILTIN PRECRELATED related #-} {-# BUILTIN PRECUNRELATED unrelated #-} {-# BUILTIN FIXITY Fixity #-} {-# BUILTIN FIXITYFIXITY fixity #-} {-# COMPILE GHC Associativity = data MAlonzo.RTE.Assoc (MAlonzo.RTE.LeftAssoc | MAlonzo.RTE.RightAssoc | MAlonzo.RTE.NonAssoc) #-} {-# COMPILE GHC Precedence = data MAlonzo.RTE.Precedence (MAlonzo.RTE.Related | MAlonzo.RTE.Unrelated) #-} {-# COMPILE GHC Fixity = data MAlonzo.RTE.Fixity (MAlonzo.RTE.Fixity) #-} {-# COMPILE JS Associativity = function (x,v) { return v[x](); } #-} {-# COMPILE JS left-assoc = "left-assoc" #-} {-# COMPILE JS right-assoc = "right-assoc" #-} {-# COMPILE JS non-assoc = "non-assoc" #-} {-# COMPILE JS Precedence = function (x,v) { if (x === "unrelated") { return v[x](); } else { return v["related"](x); }} #-} {-# COMPILE JS related = function(x) { return x; } #-} {-# COMPILE JS unrelated = "unrelated" #-} {-# COMPILE JS Fixity = function (x,v) { return v["fixity"](x["assoc"], x["prec"]); } #-} {-# COMPILE JS fixity = function (x) { return function (y) { return { "assoc": x, "prec": y}; }; } #-} primitive primQNameFixity : Name → Fixity -- Metavariables -- postulate Meta : Set {-# BUILTIN AGDAMETA Meta #-} primitive primMetaEquality : Meta → Meta → Bool primMetaLess : Meta → Meta → Bool primShowMeta : Meta → String -- Arguments -- -- Arguments can be (visible), {hidden}, or {{instance}}. data Visibility : Set where visible hidden instance′ : Visibility {-# BUILTIN HIDING Visibility #-} {-# BUILTIN VISIBLE visible #-} {-# BUILTIN HIDDEN hidden #-} {-# BUILTIN INSTANCE instance′ #-} -- Arguments can be relevant or irrelevant. data Relevance : Set where relevant irrelevant : Relevance {-# BUILTIN RELEVANCE Relevance #-} {-# BUILTIN RELEVANT relevant #-} {-# BUILTIN IRRELEVANT irrelevant #-} data ArgInfo : Set where arg-info : (v : Visibility) (r : Relevance) → ArgInfo data Arg (A : Set) : Set where arg : (i : ArgInfo) (x : A) → Arg A {-# BUILTIN ARGINFO ArgInfo #-} {-# BUILTIN ARGARGINFO arg-info #-} {-# BUILTIN ARG Arg #-} {-# BUILTIN ARGARG arg #-} -- Name abstraction -- data Abs (A : Set) : Set where abs : (s : String) (x : A) → Abs A {-# BUILTIN ABS Abs #-} {-# BUILTIN ABSABS abs #-} -- Literals -- data Literal : Set where nat : (n : Nat) → Literal word64 : (n : Word64) → Literal float : (x : Float) → Literal char : (c : Char) → Literal string : (s : String) → Literal name : (x : Name) → Literal meta : (x : Meta) → Literal {-# BUILTIN AGDALITERAL Literal #-} {-# BUILTIN AGDALITNAT nat #-} {-# BUILTIN AGDALITWORD64 word64 #-} {-# BUILTIN AGDALITFLOAT float #-} {-# BUILTIN AGDALITCHAR char #-} {-# BUILTIN AGDALITSTRING string #-} {-# BUILTIN AGDALITQNAME name #-} {-# BUILTIN AGDALITMETA meta #-} -- Patterns -- data Pattern : Set where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern proj : (f : Name) → Pattern absurd : Pattern {-# BUILTIN AGDAPATTERN Pattern #-} {-# BUILTIN AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} -- Terms -- data Sort : Set data Clause : Set data Term : Set Type = Term data Term where var : (x : Nat) (args : List (Arg Term)) → Term con : (c : Name) (args : List (Arg Term)) → Term def : (f : Name) (args : List (Arg Term)) → Term lam : (v : Visibility) (t : Abs Term) → Term pat-lam : (cs : List Clause) (args : List (Arg Term)) → Term pi : (a : Arg Type) (b : Abs Type) → Term agda-sort : (s : Sort) → Term lit : (l : Literal) → Term meta : (x : Meta) → List (Arg Term) → Term unknown : Term data Sort where set : (t : Term) → Sort lit : (n : Nat) → Sort unknown : Sort data Clause where clause : (ps : List (Arg Pattern)) (t : Term) → Clause absurd-clause : (ps : List (Arg Pattern)) → Clause {-# BUILTIN AGDASORT Sort #-} {-# BUILTIN AGDATERM Term #-} {-# BUILTIN AGDACLAUSE Clause #-} {-# BUILTIN AGDATERMVAR var #-} {-# BUILTIN AGDATERMCON con #-} {-# BUILTIN AGDATERMDEF def #-} {-# BUILTIN AGDATERMMETA meta #-} {-# BUILTIN AGDATERMLAM lam #-} {-# BUILTIN AGDATERMEXTLAM pat-lam #-} {-# BUILTIN AGDATERMPI pi #-} {-# BUILTIN AGDATERMSORT agda-sort #-} {-# BUILTIN AGDATERMLIT lit #-} {-# BUILTIN AGDATERMUNSUPPORTED unknown #-} {-# BUILTIN AGDASORTSET set #-} {-# BUILTIN AGDASORTLIT lit #-} {-# BUILTIN AGDASORTUNSUPPORTED unknown #-} {-# BUILTIN AGDACLAUSECLAUSE clause #-} {-# BUILTIN AGDACLAUSEABSURD absurd-clause #-} -- Definitions -- data Definition : Set where function : (cs : List Clause) → Definition data-type : (pars : Nat) (cs : List Name) → Definition record-type : (c : Name) (fs : List (Arg Name)) → Definition data-cons : (d : Name) → Definition axiom : Definition prim-fun : Definition {-# BUILTIN AGDADEFINITION Definition #-} {-# BUILTIN AGDADEFINITIONFUNDEF function #-} {-# BUILTIN AGDADEFINITIONDATADEF data-type #-} {-# BUILTIN AGDADEFINITIONRECORDDEF record-type #-} {-# BUILTIN AGDADEFINITIONDATACONSTRUCTOR data-cons #-} {-# BUILTIN AGDADEFINITIONPOSTULATE axiom #-} {-# BUILTIN AGDADEFINITIONPRIMITIVE prim-fun #-} -- Errors -- data ErrorPart : Set where strErr : String → ErrorPart termErr : Term → ErrorPart nameErr : Name → ErrorPart {-# BUILTIN AGDAERRORPART ErrorPart #-} {-# BUILTIN AGDAERRORPARTSTRING strErr #-} {-# BUILTIN AGDAERRORPARTTERM termErr #-} {-# BUILTIN AGDAERRORPARTNAME nameErr #-} -- TC monad -- postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B unify : Term → Term → TC ⊤ typeError : ∀ {a} {A : Set a} → List ErrorPart → TC A inferType : Term → TC Type checkType : Term → Type → TC Term normalise : Term → TC Term reduce : Term → TC Term catchTC : ∀ {a} {A : Set a} → TC A → TC A → TC A quoteTC : ∀ {a} {A : Set a} → A → TC Term unquoteTC : ∀ {a} {A : Set a} → Term → TC A getContext : TC (List (Arg Type)) extendContext : ∀ {a} {A : Set a} → Arg Type → TC A → TC A inContext : ∀ {a} {A : Set a} → List (Arg Type) → TC A → TC A freshName : String → TC Name declareDef : Arg Name → Type → TC ⊤ declarePostulate : Arg Name → Type → TC ⊤ defineFun : Name → List Clause → TC ⊤ getType : Name → TC Type getDefinition : Name → TC Definition blockOnMeta : ∀ {a} {A : Set a} → Meta → TC A commitTC : TC ⊤ isMacro : Name → TC Bool -- If the argument is 'true' makes the following primitives also normalise -- their results: inferType, checkType, quoteTC, getType, and getContext withNormalisation : ∀ {a} {A : Set a} → Bool → TC A → TC A -- Prints the third argument if the corresponding verbosity level is turned -- on (with the -v flag to Agda). debugPrint : String → Nat → List ErrorPart → TC ⊤ -- Fail if the given computation gives rise to new, unsolved -- "blocking" constraints. noConstraints : ∀ {a} {A : Set a} → TC A → TC A -- Run the given TC action and return the first component. Resets to -- the old TC state if the second component is 'false', or keep the -- new TC state if it is 'true'. runSpeculative : ∀ {a} {A : Set a} → TC (Σ A λ _ → Bool) → TC A {-# BUILTIN AGDATCM TC #-} {-# BUILTIN AGDATCMRETURN returnTC #-} {-# BUILTIN AGDATCMBIND bindTC #-} {-# BUILTIN AGDATCMUNIFY unify #-} {-# BUILTIN AGDATCMTYPEERROR typeError #-} {-# BUILTIN AGDATCMINFERTYPE inferType #-} {-# BUILTIN AGDATCMCHECKTYPE checkType #-} {-# BUILTIN AGDATCMNORMALISE normalise #-} {-# BUILTIN AGDATCMREDUCE reduce #-} {-# BUILTIN AGDATCMCATCHERROR catchTC #-} {-# BUILTIN AGDATCMQUOTETERM quoteTC #-} {-# BUILTIN AGDATCMUNQUOTETERM unquoteTC #-} {-# BUILTIN AGDATCMGETCONTEXT getContext #-} {-# BUILTIN AGDATCMEXTENDCONTEXT extendContext #-} {-# BUILTIN AGDATCMINCONTEXT inContext #-} {-# BUILTIN AGDATCMFRESHNAME freshName #-} {-# BUILTIN AGDATCMDECLAREDEF declareDef #-} {-# BUILTIN AGDATCMDECLAREPOSTULATE declarePostulate #-} {-# BUILTIN AGDATCMDEFINEFUN defineFun #-} {-# BUILTIN AGDATCMGETTYPE getType #-} {-# BUILTIN AGDATCMGETDEFINITION getDefinition #-} {-# BUILTIN AGDATCMBLOCKONMETA blockOnMeta #-} {-# BUILTIN AGDATCMCOMMIT commitTC #-} {-# BUILTIN AGDATCMISMACRO isMacro #-} {-# BUILTIN AGDATCMWITHNORMALISATION withNormalisation #-} {-# BUILTIN AGDATCMDEBUGPRINT debugPrint #-} {-# BUILTIN AGDATCMNOCONSTRAINTS noConstraints #-} {-# BUILTIN AGDATCMRUNSPECULATIVE runSpeculative #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/FromNeg.agda0000644000000000000000000000066113466402171020541 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.FromNeg where open import Agda.Primitive open import Agda.Builtin.Nat record Negative {a} (A : Set a) : Set (lsuc a) where field Constraint : Nat → Set a fromNeg : ∀ n → {{_ : Constraint n}} → A open Negative {{...}} public using (fromNeg) {-# BUILTIN FROMNEG fromNeg #-} {-# DISPLAY Negative.fromNeg _ n = fromNeg n #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Float.agda0000644000000000000000000000241613466402171020251 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Float where open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Int open import Agda.Builtin.String postulate Float : Set {-# BUILTIN FLOAT Float #-} primitive primFloatEquality : Float → Float → Bool primFloatLess : Float → Float → Bool primFloatNumericalEquality : Float → Float → Bool primFloatNumericalLess : Float → Float → Bool primNatToFloat : Nat → Float primFloatPlus : Float → Float → Float primFloatMinus : Float → Float → Float primFloatTimes : Float → Float → Float primFloatNegate : Float → Float primFloatDiv : Float → Float → Float primFloatSqrt : Float → Float primRound : Float → Int primFloor : Float → Int primCeiling : Float → Int primExp : Float → Float primLog : Float → Float primSin : Float → Float primCos : Float → Float primTan : Float → Float primASin : Float → Float primACos : Float → Float primATan : Float → Float primATan2 : Float → Float → Float primShowFloat : Float → String Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/FromString.agda0000644000000000000000000000071713466402171021300 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.FromString where open import Agda.Primitive open import Agda.Builtin.String record IsString {a} (A : Set a) : Set (lsuc a) where field Constraint : String → Set a fromString : (s : String) {{_ : Constraint s}} → A open IsString {{...}} public using (fromString) {-# BUILTIN FROMSTRING fromString #-} {-# DISPLAY IsString.fromString _ s = fromString s #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Unit.agda0000644000000000000000000000036313466402171020122 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Agda.Builtin.Unit where record ⊤ : Set where instance constructor tt {-# BUILTIN UNIT ⊤ #-} {-# COMPILE GHC ⊤ = data () (()) #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Int.agda0000644000000000000000000000070013466402171017730 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Int where open import Agda.Builtin.Nat open import Agda.Builtin.String infix 8 pos -- Standard library uses this as +_ data Int : Set where pos : (n : Nat) → Int negsuc : (n : Nat) → Int {-# BUILTIN INTEGER Int #-} {-# BUILTIN INTEGERPOS pos #-} {-# BUILTIN INTEGERNEGSUC negsuc #-} primitive primShowInteger : Int → String Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/List.agda0000644000000000000000000000106513466402171020116 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.List where infixr 5 _∷_ data List {a} (A : Set a) : Set a where [] : List A _∷_ : (x : A) (xs : List A) → List A {-# BUILTIN LIST List #-} {-# COMPILE UHC List = data __LIST__ (__NIL__ | __CONS__) #-} {-# COMPILE JS List = function(x,v) { if (x.length < 1) { return v["[]"](); } else { return v["_∷_"](x[0], x.slice(1)); } } #-} {-# COMPILE JS [] = Array() #-} {-# COMPILE JS _∷_ = function (x) { return function(y) { return Array(x).concat(y); }; } #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/String/0000755000000000000000000000000013466402171017631 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/String/Properties.agda0000644000000000000000000000044113466402171022602 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.String.Properties where open import Agda.Builtin.String open import Agda.Builtin.Equality primitive primStringToListInjective : ∀ a b → primStringToList a ≡ primStringToList b → a ≡ b Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Word/0000755000000000000000000000000013466402171017276 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Word/Properties.agda0000644000000000000000000000043213466402171022247 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Word.Properties where open import Agda.Builtin.Word open import Agda.Builtin.Equality primitive primWord64ToNatInjective : ∀ a b → primWord64ToNat a ≡ primWord64ToNat b → a ≡ b Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Equality/0000755000000000000000000000000013466402171020160 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Equality/Rewrite.agda0000644000000000000000000000027013466402171022416 0ustar0000000000000000{-# OPTIONS --without-K --rewriting --no-sized-types --no-guardedness #-} module Agda.Builtin.Equality.Rewrite where open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Equality/Erase.agda0000644000000000000000000000034413466402171022036 0ustar0000000000000000{-# OPTIONS --with-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Equality.Erase where open import Agda.Builtin.Equality primitive primEraseEquality : ∀ {a} {A : Set a} {x y : A} → x ≡ y → x ≡ y Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Char/0000755000000000000000000000000013466402171017240 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Char/Properties.agda0000644000000000000000000000042413466402171022212 0ustar0000000000000000{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Char.Properties where open import Agda.Builtin.Char open import Agda.Builtin.Equality primitive primCharToNatInjective : ∀ a b → primCharToNat a ≡ primCharToNat b → a ≡ b Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Cubical/0000755000000000000000000000000013466402171017725 5ustar0000000000000000Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Cubical/Glue.agda0000644000000000000000000001326713466402171021450 0ustar0000000000000000{-# OPTIONS --cubical --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Cubical.Glue where open import Agda.Primitive open import Agda.Builtin.Sigma open import Agda.Primitive.Cubical renaming (primINeg to ~_; primIMax to _∨_; primIMin to _∧_; primHComp to hcomp; primTransp to transp; primComp to comp; itIsOne to 1=1) open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Cubical.Sub renaming (Sub to _[_↦_]; primSubOut to ouc) module Helpers where -- Homogeneous filling hfill : ∀ {ℓ} {A : Set ℓ} {φ : I} (u : ∀ i → Partial φ A) (u0 : A [ φ ↦ u i0 ]) (i : I) → A hfill {φ = φ} u u0 i = hcomp (λ j → \ { (φ = i1) → u (i ∧ j) 1=1 ; (i = i0) → ouc u0 }) (ouc u0) -- Heterogeneous filling defined using comp fill : ∀ {ℓ : I → Level} (A : ∀ i → Set (ℓ i)) {φ : I} (u : ∀ i → Partial φ (A i)) (u0 : A i0 [ φ ↦ u i0 ]) → ∀ i → A i fill A {φ = φ} u u0 i = comp (λ j → A (i ∧ j)) _ (λ j → \ { (φ = i1) → u (i ∧ j) 1=1 ; (i = i0) → ouc u0 }) (ouc {φ = φ} u0) module _ {ℓ} {A : Set ℓ} where refl : {x : A} → x ≡ x refl {x = x} = λ _ → x sym : {x y : A} → x ≡ y → y ≡ x sym p = λ i → p (~ i) cong : ∀ {ℓ'} {B : A → Set ℓ'} {x y : A} (f : (a : A) → B a) (p : x ≡ y) → PathP (λ i → B (p i)) (f x) (f y) cong f p = λ i → f (p i) isContr : ∀ {ℓ} → Set ℓ → Set ℓ isContr A = Σ A \ x → (∀ y → x ≡ y) fiber : ∀ {ℓ ℓ'} {A : Set ℓ} {B : Set ℓ'} (f : A → B) (y : B) → Set (ℓ ⊔ ℓ') fiber {A = A} f y = Σ A \ x → f x ≡ y open Helpers -- We make this a record so that isEquiv can be proved using -- copatterns. This is good because copatterns don't get unfolded -- unless a projection is applied so it should be more efficient. record isEquiv {ℓ ℓ'} {A : Set ℓ} {B : Set ℓ'} (f : A → B) : Set (ℓ ⊔ ℓ') where no-eta-equality field equiv-proof : (y : B) → isContr (fiber f y) open isEquiv public infix 4 _≃_ _≃_ : ∀ {ℓ ℓ'} (A : Set ℓ) (B : Set ℓ') → Set (ℓ ⊔ ℓ') A ≃ B = Σ (A → B) \ f → (isEquiv f) equivFun : ∀ {ℓ ℓ'} {A : Set ℓ} {B : Set ℓ'} → A ≃ B → A → B equivFun e = fst e -- Improved version of equivProof compared to Lemma 5 in CCHM. We put -- the (φ = i0) face in contr' making it be definitionally c in this -- case. This makes the computational behavior better, in particular -- for transp in Glue. equivProof : ∀ {la lt} (T : Set la) (A : Set lt) → (w : T ≃ A) → (a : A) → ∀ ψ → (Partial ψ (fiber (w .fst) a)) → fiber (w .fst) a equivProof A B w a ψ fb = contr' {A = fiber (w .fst) a} (w .snd .equiv-proof a) ψ fb where contr' : ∀ {ℓ} {A : Set ℓ} → isContr A → (φ : I) → (u : Partial φ A) → A contr' {A = A} (c , p) φ u = hcomp (λ i → λ { (φ = i1) → p (u 1=1) i ; (φ = i0) → c }) c {-# BUILTIN EQUIV _≃_ #-} {-# BUILTIN EQUIVFUN equivFun #-} {-# BUILTIN EQUIVPROOF equivProof #-} primitive primGlue : ∀ {ℓ ℓ'} (A : Set ℓ) {φ : I} → (T : Partial φ (Set ℓ')) → (e : PartialP φ (λ o → T o ≃ A)) → Set ℓ' prim^glue : ∀ {ℓ ℓ'} {A : Set ℓ} {φ : I} → {T : Partial φ (Set ℓ')} → {e : PartialP φ (λ o → T o ≃ A)} → (t : PartialP φ T) → (a : A) → primGlue A T e prim^unglue : ∀ {ℓ ℓ'} {A : Set ℓ} {φ : I} → {T : Partial φ (Set ℓ')} → {e : PartialP φ (λ o → T o ≃ A)} → primGlue A T e → A -- Needed for transp in Glue. primFaceForall : (I → I) → I module _ {ℓ : I → Level} (P : (i : I) → Set (ℓ i)) where private E : (i : I) → Set (ℓ i) E = λ i → P i ~E : (i : I) → Set (ℓ (~ i)) ~E = λ i → P (~ i) A = P i0 B = P i1 f : A → B f x = transp E i0 x g : B → A g y = transp ~E i0 y u : ∀ i → A → E i u i x = transp (λ j → E (i ∧ j)) (~ i) x v : ∀ i → B → E i v i y = transp (λ j → ~E ( ~ i ∧ j)) i y fiberPath : (y : B) → (xβ0 xβ1 : fiber f y) → xβ0 ≡ xβ1 fiberPath y (x0 , β0) (x1 , β1) k = ω , λ j → δ (~ j) where module _ (j : I) where private sys : A → ∀ i → PartialP (~ j ∨ j) (λ _ → E (~ i)) sys x i (j = i0) = v (~ i) y sys x i (j = i1) = u (~ i) x ω0 = comp ~E _ (sys x0) ((β0 (~ j))) ω1 = comp ~E _ (sys x1) ((β1 (~ j))) θ0 = fill ~E (sys x0) (inc (β0 (~ j))) θ1 = fill ~E (sys x1) (inc (β1 (~ j))) sys = λ {j (k = i0) → ω0 j ; j (k = i1) → ω1 j} ω = hcomp sys (g y) θ = hfill sys (inc (g y)) δ = λ (j : I) → comp E _ (λ i → λ { (j = i0) → v i y ; (k = i0) → θ0 j (~ i) ; (j = i1) → u i ω ; (k = i1) → θ1 j (~ i) }) (θ j) γ : (y : B) → y ≡ f (g y) γ y j = comp E _ (λ i → λ { (j = i0) → v i y ; (j = i1) → u i (g y) }) (g y) pathToisEquiv : isEquiv f pathToisEquiv .equiv-proof y .fst .fst = g y pathToisEquiv .equiv-proof y .fst .snd = sym (γ y) pathToisEquiv .equiv-proof y .snd = fiberPath y _ pathToEquiv : A ≃ B pathToEquiv .fst = f pathToEquiv .snd = pathToisEquiv {-# BUILTIN PATHTOEQUIV pathToEquiv #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Cubical/Path.agda0000644000000000000000000000077413466402171021447 0ustar0000000000000000{-# OPTIONS --cubical --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Cubical.Path where open import Agda.Primitive.Cubical postulate PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ {-# BUILTIN PATHP PathP #-} infix 4 _≡_ -- We have a variable name in `(λ i → A)` as a hint for case -- splitting. _≡_ : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ _≡_ {A = A} = PathP (λ i → A) {-# BUILTIN PATH _≡_ #-} Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Cubical/Sub.agda0000644000000000000000000000060413466402171021274 0ustar0000000000000000{-# OPTIONS --cubical --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Cubical.Sub where open import Agda.Primitive.Cubical {-# BUILTIN SUB Sub #-} postulate inc : ∀ {ℓ} {A : Set ℓ} {φ} (x : A) → Sub A φ (λ _ → x) {-# BUILTIN SUBIN inc #-} primitive primSubOut : ∀ {ℓ} {A : Set ℓ} {φ : I} {u : Partial φ A} → Sub _ φ u → A Agda-2.6.0.1/src/data/lib/prim/Agda/Builtin/Cubical/Id.agda0000644000000000000000000000217313466402171021102 0ustar0000000000000000{-# OPTIONS --cubical --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Cubical.Id where open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Cubical.Sub renaming (primSubOut to ouc; Sub to _[_↦_]) postulate Id : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ {-# BUILTIN ID Id #-} {-# BUILTIN CONID conid #-} primitive primDepIMin : _ primIdFace : ∀ {ℓ} {A : Set ℓ} {x y : A} → Id x y → I primIdPath : ∀ {ℓ} {A : Set ℓ} {x y : A} → Id x y → x ≡ y primitive primIdJ : ∀ {ℓ ℓ'} {A : Set ℓ} {x : A} (P : ∀ y → Id x y → Set ℓ') → P x (conid i1 (λ i → x)) → ∀ {y} (p : Id x y) → P y p primitive primIdElim : ∀ {a c} {A : Set a} {x : A} (C : (y : A) → Id x y → Set c) → ((φ : I) (y : A [ φ ↦ (λ _ → x) ]) (w : (x ≡ ouc y) [ φ ↦ (λ { (φ = i1) → \ _ → x}) ]) → C (ouc y) (conid φ (ouc w))) → {y : A} (p : Id x y) → C y p Agda-2.6.0.1/src/data/MAlonzo/0000755000000000000000000000000013466402171013763 5ustar0000000000000000Agda-2.6.0.1/src/data/MAlonzo/src/0000755000000000000000000000000013466402171014552 5ustar0000000000000000Agda-2.6.0.1/src/data/MAlonzo/src/MAlonzo/0000755000000000000000000000000013466402171016131 5ustar0000000000000000Agda-2.6.0.1/src/data/MAlonzo/src/MAlonzo/RTE.hs0000644000000000000000000000661613466402171017130 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE PolyKinds #-} module MAlonzo.RTE where import Unsafe.Coerce #if __GLASGOW_HASKELL__ >= 800 import qualified GHC.Exts as GHC (Any) #else import qualified GHC.Prim as GHC (Any) #endif import qualified Data.Word import Numeric.IEEE ( IEEE(identicalIEEE) ) type AgdaAny = GHC.Any -- Special version of coerce that plays well with rules. {-# INLINE [1] coe #-} coe :: a -> b coe = unsafeCoerce {-# RULES "coerce-id" forall (x :: a) . coe x = x #-} -- Builtin QNames. data QName = QName { nameId, moduleId :: Integer, qnameString :: String, qnameFixity :: Fixity } data Assoc = NonAssoc | LeftAssoc | RightAssoc data Precedence = Unrelated | Related Integer data Fixity = Fixity Assoc Precedence instance Eq QName where QName a b _ _ == QName c d _ _ = (a, b) == (c, d) instance Ord QName where compare (QName a b _ _) (QName c d _ _) = compare (a, b) (c, d) erased :: a erased = coe (\ _ -> erased) mazIncompleteMatch :: String -> a mazIncompleteMatch s = error ("Agda: incomplete pattern matching: " ++ s) mazUnreachableError :: a mazUnreachableError = error ("Agda: unreachable code reached.") addInt :: Integer -> Integer -> Integer addInt = (+) subInt :: Integer -> Integer -> Integer subInt = (-) mulInt :: Integer -> Integer -> Integer mulInt = (*) geqInt :: Integer -> Integer -> Bool geqInt = (>=) ltInt :: Integer -> Integer -> Bool ltInt = (<) eqInt :: Integer -> Integer -> Bool eqInt = (==) quotInt :: Integer -> Integer -> Integer quotInt = quot remInt :: Integer -> Integer -> Integer remInt = rem eqFloat :: Double -> Double -> Bool eqFloat x y = identicalIEEE x y || (isNaN x && isNaN y) eqNumFloat :: Double -> Double -> Bool eqNumFloat = (==) ltNumFloat :: Double -> Double -> Bool ltNumFloat = (<) negativeZero :: Double negativeZero = -0.0 positiveInfinity :: Double positiveInfinity = 1.0 / 0.0 negativeInfinity :: Double negativeInfinity = -positiveInfinity positiveNaN :: Double positiveNaN = 0.0 / 0.0 negativeNaN :: Double negativeNaN = -positiveNaN -- Adapted from the same function on Agda.Syntax.Literal. compareFloat :: Double -> Double -> Ordering compareFloat x y | identicalIEEE x y = EQ | isNegInf x = LT | isNegInf y = GT | isNaN x && isNaN y = EQ | isNaN x = LT | isNaN y = GT | otherwise = compare (x, isNegZero y) (y, isNegZero x) where isNegInf z = z < 0 && isInfinite z isNegZero z = identicalIEEE z negativeZero ltFloat :: Double -> Double -> Bool ltFloat x y = case compareFloat x y of LT -> True _ -> False -- Words -- type Word64 = Data.Word.Word64 word64ToNat :: Word64 -> Integer word64ToNat = fromIntegral word64FromNat :: Integer -> Word64 word64FromNat = fromIntegral {-# INLINE add64 #-} add64 :: Word64 -> Word64 -> Word64 add64 = (+) {-# INLINE sub64 #-} sub64 :: Word64 -> Word64 -> Word64 sub64 = (-) {-# INLINE mul64 #-} mul64 :: Word64 -> Word64 -> Word64 mul64 = (*) {-# INLINE quot64 #-} quot64 :: Word64 -> Word64 -> Word64 quot64 = quot {-# INLINE rem64 #-} rem64 :: Word64 -> Word64 -> Word64 rem64 = rem {-# INLINE eq64 #-} eq64 :: Word64 -> Word64 -> Bool eq64 = (==) {-# INLINE lt64 #-} lt64 :: Word64 -> Word64 -> Bool lt64 = (<) -- Support for musical coinduction. data Inf a = Sharp { flat :: a } type Infinity (level :: *) a = Inf a Agda-2.6.0.1/src/data/JS/0000755000000000000000000000000013466402171012720 5ustar0000000000000000Agda-2.6.0.1/src/data/JS/agda-rts.js0000644000000000000000000001043513466402171014763 0ustar0000000000000000// NOTE: // Some of the primitives here are curried, some are not. All uncurried primitives are prefixed by 'u'. var biginteger = require("biginteger") // Integers exports.primIntegerFromString = function(x) { return biginteger.BigInteger(x); }; exports.primShowInteger = function(x) { return x.toString(); }; exports.uprimIntegerPlus = function(x,y) { return x.add(y); }; exports.uprimIntegerMinus = function(x,y) { return x.subtract(y); }; exports.uprimIntegerMultiply = function(x,y) { return x.multiply(y); }; exports.uprimIntegerRem = function(x, y) { return x.remainder(y); }; exports.uprimIntegerQuot = function(x, y) { return x.quotient(y); }; exports.uprimIntegerEqual = function(x,y) { return x.compare(y) == 0; }; exports.uprimIntegerGreaterOrEqualThan = function(x,y) { return x.compare(y) >= 0; }; exports.uprimIntegerLessThan = function(x,y) { return x.compare(y) == -1; }; exports.primNatMinus = function(x) { return function(y) { var z = x.subtract(y); if (z.isNegative()) { return biginteger.ZERO; } else { return z; } }; }; // Floats exports.primShowFloat = function(x) { // See Issue #2192. if (Number.isInteger(x)) { if (Object.is(x,-0.0)) { return ("-0.0"); } else { var a = x.toString(); return (a + ".0"); } } else { return x.toString(); } }; exports.primFloatEquality = function(x) { return function(y) { return Object.is(x,y); }; }; exports.primFloatNumericalEquality = function(x) { return function(y) { return x==y; }; }; exports.primFloatNumericalLess = function(x) { return function(y) { return x < y; }; }; exports.uprimFloatEquality = function(x, y) { return Object.is(x,y); }; exports.primFloatLess = function(x) { return function(y) { if(x == Number.NEGATIVE_INFINITY) { return y != Number.NEGATIVE_INFINITY; } else if(y == Number.NEGATIVE_INFINITY) { return false; } else if(isNaN(x)) { return !isNaN(y); } else if(isNaN(y)) { return false; } else { return x < y || Object.is(x, -0.0) && Object.is(y, 0.0); } }; }; exports.primFloatPlus = function(x) { return function(y) { return x+y; }; }; exports.primFloatMinus = function(x) { return function(y) { return x-y; }; }; exports.primFloatTimes = function(x) { return function(y) { return x*y; }; }; exports.primFloatNegate = function(x) { return -x; }; exports.primFloatDiv = function(x) { return function(y) { return x/y; }; }; exports.primFloatSqrt = function(x) { return Math.sqrt(x); }; exports.primSin = function(x) { return Math.sin(x); }; exports.primCos = function(x) { return Math.cos(x); }; exports.primTan = function(x) { return Math.tan(x); }; exports.primASin = function(x) { return Math.asin(x); }; exports.primACos = function(x) { return Math.acos(x); }; exports.primATan = function(x) { return Math.atan(x); }; exports.primATan2 = function(y) { return function(x){ return Math.atan2(y,x); } }; exports.primExp = function(x) { return Math.exp(x); }; // As Javascript is strict, this should be fine in general. Not sure // what PSeq (Axiom ...) (...) should do? exports.primSeq = function(x, y) { return y; }; exports.primShowQName = function(x) { return x["name"]; }; exports.uprimQNameEquality = function(x,y) { return x["id"].compare(y["id"]) == 0 && x["moduleId"].compare(y["moduleId"]) == 0; }; exports.primQNameEquality = function(x) { return function(y) { return exports.uprimQNameEquality(x, y); }; }; exports.primQNameLess = function(x) { return function(y) { switch (x["id"].compare(y["id"])) { case -1: return true; case 1: return false; case 0: return x["moduleId"].compare(y["moduleId"]) == -1; } }; }; exports.primQNameFixity = function(x) { return x["fixity"]; }; // Words var twoTo64 = exports.primIntegerFromString("18446744073709551616"); exports.primWord64ToNat = function(x) { return x; }; exports.primWord64FromNat = function(x) { return x.remainder(twoTo64); }; exports.uprimWord64Plus = function(x,y) { return x.add(y).remainder(twoTo64); }; exports.uprimWord64Minus = function(x,y) { return x.add(twoTo64).subtract(y).remainder(twoTo64); }; exports.uprimWord64Multiply = function(x,y) { return x.multiply(y).remainder(twoTo64); }; Agda-2.6.0.1/src/data/JS/biginteger.js0000644000000000000000000010155613466402171015405 0ustar0000000000000000/* JavaScript BigInteger library version 0.9.1 http://silentmatt.com/biginteger/ Copyright (c) 2009 Matthew Crumley Copyright (c) 2010,2011 by John Tobey Licensed under the MIT license. Support for arbitrary internal representation base was added by Vitaly Magerya. */ /* File: biginteger.js Exports: */ (function(exports) { "use strict"; /* Class: BigInteger An arbitrarily-large integer. objects should be considered immutable. None of the "built-in" methods modify *this* or their arguments. All properties should be considered private. All the methods of instances can be called "statically". The static versions are convenient if you don't already have a object. As an example, these calls are equivalent. > BigInteger(4).multiply(5); // returns BigInteger(20); > BigInteger.multiply(4, 5); // returns BigInteger(20); > var a = 42; > var a = BigInteger.toJSValue("0b101010"); // Not completely useless... */ var CONSTRUCT = {}; // Unique token to call "private" version of constructor /* Constructor: BigInteger() Convert a value to a . Although is the constructor for objects, it is best not to call it as a constructor. If *n* is a object, it is simply returned as-is. Otherwise, is equivalent to without a radix argument. > var n0 = BigInteger(); // Same as > var n1 = BigInteger("123"); // Create a new with value 123 > var n2 = BigInteger(123); // Create a new with value 123 > var n3 = BigInteger(n2); // Return n2, unchanged The constructor form only takes an array and a sign. *n* must be an array of numbers in little-endian order, where each digit is between 0 and BigInteger.base. The second parameter sets the sign: -1 for negative, +1 for positive, or 0 for zero. The array is *not copied and may be modified*. If the array contains only zeros, the sign parameter is ignored and is forced to zero. > new BigInteger([5], -1): create a new BigInteger with value -5 Parameters: n - Value to convert to a . Returns: A value. See Also: , */ function BigInteger(n, s, token) { if (token !== CONSTRUCT) { if (n instanceof BigInteger) { return n; } else if (typeof n === "undefined") { return ZERO; } return BigInteger.parse(n); } n = n || []; // Provide the nullary constructor for subclasses. while (n.length && !n[n.length - 1]) { --n.length; } this._d = n; this._s = n.length ? (s || 1) : 0; } BigInteger._construct = function(n, s) { return new BigInteger(n, s, CONSTRUCT); }; // Base-10 speedup hacks in parse, toString, exp10 and log functions // require base to be a power of 10. 10^7 is the largest such power // that won't cause a precision loss when digits are multiplied. var BigInteger_base = 10000000; var BigInteger_base_log10 = 7; BigInteger.base = BigInteger_base; BigInteger.base_log10 = BigInteger_base_log10; var ZERO = new BigInteger([], 0, CONSTRUCT); // Constant: ZERO // 0. BigInteger.ZERO = ZERO; var ONE = new BigInteger([1], 1, CONSTRUCT); // Constant: ONE // 1. BigInteger.ONE = ONE; var M_ONE = new BigInteger(ONE._d, -1, CONSTRUCT); // Constant: M_ONE // -1. BigInteger.M_ONE = M_ONE; // Constant: _0 // Shortcut for . BigInteger._0 = ZERO; // Constant: _1 // Shortcut for . BigInteger._1 = ONE; /* Constant: small Array of from 0 to 36. These are used internally for parsing, but useful when you need a "small" . See Also: , , <_0>, <_1> */ BigInteger.small = [ ZERO, ONE, /* Assuming BigInteger_base > 36 */ new BigInteger( [2], 1, CONSTRUCT), new BigInteger( [3], 1, CONSTRUCT), new BigInteger( [4], 1, CONSTRUCT), new BigInteger( [5], 1, CONSTRUCT), new BigInteger( [6], 1, CONSTRUCT), new BigInteger( [7], 1, CONSTRUCT), new BigInteger( [8], 1, CONSTRUCT), new BigInteger( [9], 1, CONSTRUCT), new BigInteger([10], 1, CONSTRUCT), new BigInteger([11], 1, CONSTRUCT), new BigInteger([12], 1, CONSTRUCT), new BigInteger([13], 1, CONSTRUCT), new BigInteger([14], 1, CONSTRUCT), new BigInteger([15], 1, CONSTRUCT), new BigInteger([16], 1, CONSTRUCT), new BigInteger([17], 1, CONSTRUCT), new BigInteger([18], 1, CONSTRUCT), new BigInteger([19], 1, CONSTRUCT), new BigInteger([20], 1, CONSTRUCT), new BigInteger([21], 1, CONSTRUCT), new BigInteger([22], 1, CONSTRUCT), new BigInteger([23], 1, CONSTRUCT), new BigInteger([24], 1, CONSTRUCT), new BigInteger([25], 1, CONSTRUCT), new BigInteger([26], 1, CONSTRUCT), new BigInteger([27], 1, CONSTRUCT), new BigInteger([28], 1, CONSTRUCT), new BigInteger([29], 1, CONSTRUCT), new BigInteger([30], 1, CONSTRUCT), new BigInteger([31], 1, CONSTRUCT), new BigInteger([32], 1, CONSTRUCT), new BigInteger([33], 1, CONSTRUCT), new BigInteger([34], 1, CONSTRUCT), new BigInteger([35], 1, CONSTRUCT), new BigInteger([36], 1, CONSTRUCT) ]; // Used for parsing/radix conversion BigInteger.digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""); /* Method: toString Convert a to a string. When *base* is greater than 10, letters are upper case. Parameters: base - Optional base to represent the number in (default is base 10). Must be between 2 and 36 inclusive, or an Error will be thrown. Returns: The string representation of the . */ BigInteger.prototype.toString = function(base) { base = +base || 10; if (base < 2 || base > 36) { throw new Error("illegal radix " + base + "."); } if (this._s === 0) { return "0"; } if (base === 10) { var str = this._s < 0 ? "-" : ""; str += this._d[this._d.length - 1].toString(); for (var i = this._d.length - 2; i >= 0; i--) { var group = this._d[i].toString(); while (group.length < BigInteger_base_log10) group = '0' + group; str += group; } return str; } else { var numerals = BigInteger.digits; base = BigInteger.small[base]; var sign = this._s; var n = this.abs(); var digits = []; var digit; while (n._s !== 0) { var divmod = n.divRem(base); n = divmod[0]; digit = divmod[1]; // TODO: This could be changed to unshift instead of reversing at the end. // Benchmark both to compare speeds. digits.push(numerals[digit.valueOf()]); } return (sign < 0 ? "-" : "") + digits.reverse().join(""); } }; // Verify strings for parsing BigInteger.radixRegex = [ /^$/, /^$/, /^[01]*$/, /^[012]*$/, /^[0-3]*$/, /^[0-4]*$/, /^[0-5]*$/, /^[0-6]*$/, /^[0-7]*$/, /^[0-8]*$/, /^[0-9]*$/, /^[0-9aA]*$/, /^[0-9abAB]*$/, /^[0-9abcABC]*$/, /^[0-9a-dA-D]*$/, /^[0-9a-eA-E]*$/, /^[0-9a-fA-F]*$/, /^[0-9a-gA-G]*$/, /^[0-9a-hA-H]*$/, /^[0-9a-iA-I]*$/, /^[0-9a-jA-J]*$/, /^[0-9a-kA-K]*$/, /^[0-9a-lA-L]*$/, /^[0-9a-mA-M]*$/, /^[0-9a-nA-N]*$/, /^[0-9a-oA-O]*$/, /^[0-9a-pA-P]*$/, /^[0-9a-qA-Q]*$/, /^[0-9a-rA-R]*$/, /^[0-9a-sA-S]*$/, /^[0-9a-tA-T]*$/, /^[0-9a-uA-U]*$/, /^[0-9a-vA-V]*$/, /^[0-9a-wA-W]*$/, /^[0-9a-xA-X]*$/, /^[0-9a-yA-Y]*$/, /^[0-9a-zA-Z]*$/ ]; /* Function: parse Parse a string into a . *base* is optional but, if provided, must be from 2 to 36 inclusive. If *base* is not provided, it will be guessed based on the leading characters of *s* as follows: - "0x" or "0X": *base* = 16 - "0c" or "0C": *base* = 8 - "0b" or "0B": *base* = 2 - else: *base* = 10 If no base is provided, or *base* is 10, the number can be in exponential form. For example, these are all valid: > BigInteger.parse("1e9"); // Same as "1000000000" > BigInteger.parse("1.234*10^3"); // Same as 1234 > BigInteger.parse("56789 * 10 ** -2"); // Same as 567 If any characters fall outside the range defined by the radix, an exception will be thrown. Parameters: s - The string to parse. base - Optional radix (default is to guess based on *s*). Returns: a instance. */ BigInteger.parse = function(s, base) { // Expands a number in exponential form to decimal form. // expandExponential("-13.441*10^5") === "1344100"; // expandExponential("1.12300e-1") === "0.112300"; // expandExponential(1000000000000000000000000000000) === "1000000000000000000000000000000"; function expandExponential(str) { str = str.replace(/\s*[*xX]\s*10\s*(\^|\*\*)\s*/, "e"); return str.replace(/^([+\-])?(\d+)\.?(\d*)[eE]([+\-]?\d+)$/, function(x, s, n, f, c) { c = +c; var l = c < 0; var i = n.length + c; x = (l ? n : f).length; c = ((c = Math.abs(c)) >= x ? c - x + l : 0); var z = (new Array(c + 1)).join("0"); var r = n + f; return (s || "") + (l ? r = z + r : r += z).substr(0, i += l ? z.length : 0) + (i < r.length ? "." + r.substr(i) : ""); }); } s = s.toString(); if (typeof base === "undefined" || +base === 10) { s = expandExponential(s); } var prefixRE; if (typeof base === "undefined") { prefixRE = '0[xcb]'; } else if (base == 16) { prefixRE = '0x'; } else if (base == 8) { prefixRE = '0c'; } else if (base == 2) { prefixRE = '0b'; } else { prefixRE = ''; } var parts = new RegExp('^([+\\-]?)(' + prefixRE + ')?([0-9a-z]*)(?:\\.\\d*)?$', 'i').exec(s); if (parts) { var sign = parts[1] || "+"; var baseSection = parts[2] || ""; var digits = parts[3] || ""; if (typeof base === "undefined") { // Guess base if (baseSection === "0x" || baseSection === "0X") { // Hex base = 16; } else if (baseSection === "0c" || baseSection === "0C") { // Octal base = 8; } else if (baseSection === "0b" || baseSection === "0B") { // Binary base = 2; } else { base = 10; } } else if (base < 2 || base > 36) { throw new Error("Illegal radix " + base + "."); } base = +base; // Check for digits outside the range if (!(BigInteger.radixRegex[base].test(digits))) { throw new Error("Bad digit for radix " + base); } // Strip leading zeros, and convert to array digits = digits.replace(/^0+/, "").split(""); if (digits.length === 0) { return ZERO; } // Get the sign (we know it's not zero) sign = (sign === "-") ? -1 : 1; // Optimize 10 if (base == 10) { var d = []; while (digits.length >= BigInteger_base_log10) { d.push(parseInt(digits.splice(digits.length-BigInteger.base_log10, BigInteger.base_log10).join(''), 10)); } d.push(parseInt(digits.join(''), 10)); return new BigInteger(d, sign, CONSTRUCT); } // Do the conversion var d = ZERO; base = BigInteger.small[base]; var small = BigInteger.small; for (var i = 0; i < digits.length; i++) { d = d.multiply(base).add(small[parseInt(digits[i], 36)]); } return new BigInteger(d._d, sign, CONSTRUCT); } else { throw new Error("Invalid BigInteger format: " + s); } }; /* Function: add Add two . Parameters: n - The number to add to *this*. Will be converted to a . Returns: The numbers added together. See Also: , , , */ BigInteger.prototype.add = function(n) { if (this._s === 0) { return BigInteger(n); } n = BigInteger(n); if (n._s === 0) { return this; } if (this._s !== n._s) { n = n.negate(); return this.subtract(n); } var a = this._d; var b = n._d; var al = a.length; var bl = b.length; var sum = new Array(Math.max(al, bl) + 1); var size = Math.min(al, bl); var carry = 0; var digit; for (var i = 0; i < size; i++) { digit = a[i] + b[i] + carry; sum[i] = digit % BigInteger_base; carry = (digit / BigInteger_base) | 0; } if (bl > al) { a = b; al = bl; } for (i = size; carry && i < al; i++) { digit = a[i] + carry; sum[i] = digit % BigInteger_base; carry = (digit / BigInteger_base) | 0; } if (carry) { sum[i] = carry; } for ( ; i < al; i++) { sum[i] = a[i]; } return new BigInteger(sum, this._s, CONSTRUCT); }; /* Function: negate Get the additive inverse of a . Returns: A with the same magnatude, but with the opposite sign. See Also: */ BigInteger.prototype.negate = function() { return new BigInteger(this._d, (-this._s) | 0, CONSTRUCT); }; /* Function: abs Get the absolute value of a . Returns: A with the same magnatude, but always positive (or zero). See Also: */ BigInteger.prototype.abs = function() { return (this._s < 0) ? this.negate() : this; }; /* Function: subtract Subtract two . Parameters: n - The number to subtract from *this*. Will be converted to a . Returns: The *n* subtracted from *this*. See Also: , , , */ BigInteger.prototype.subtract = function(n) { if (this._s === 0) { return BigInteger(n).negate(); } n = BigInteger(n); if (n._s === 0) { return this; } if (this._s !== n._s) { n = n.negate(); return this.add(n); } var m = this; // negative - negative => -|a| - -|b| => -|a| + |b| => |b| - |a| if (this._s < 0) { m = new BigInteger(n._d, 1, CONSTRUCT); n = new BigInteger(this._d, 1, CONSTRUCT); } // Both are positive => a - b var sign = m.compareAbs(n); if (sign === 0) { return ZERO; } else if (sign < 0) { // swap m and n var t = n; n = m; m = t; } // a > b var a = m._d; var b = n._d; var al = a.length; var bl = b.length; var diff = new Array(al); // al >= bl since a > b var borrow = 0; var i; var digit; for (i = 0; i < bl; i++) { digit = a[i] - borrow - b[i]; if (digit < 0) { digit += BigInteger_base; borrow = 1; } else { borrow = 0; } diff[i] = digit; } for (i = bl; i < al; i++) { digit = a[i] - borrow; if (digit < 0) { digit += BigInteger_base; } else { diff[i++] = digit; break; } diff[i] = digit; } for ( ; i < al; i++) { diff[i] = a[i]; } return new BigInteger(diff, sign, CONSTRUCT); }; (function() { function addOne(n, sign) { var a = n._d; var sum = a.slice(); var carry = true; var i = 0; while (true) { var digit = (a[i] || 0) + 1; sum[i] = digit % BigInteger_base; if (digit <= BigInteger_base - 1) { break; } ++i; } return new BigInteger(sum, sign, CONSTRUCT); } function subtractOne(n, sign) { var a = n._d; var sum = a.slice(); var borrow = true; var i = 0; while (true) { var digit = (a[i] || 0) - 1; if (digit < 0) { sum[i] = digit + BigInteger_base; } else { sum[i] = digit; break; } ++i; } return new BigInteger(sum, sign, CONSTRUCT); } /* Function: next Get the next (add one). Returns: *this* + 1. See Also: , */ BigInteger.prototype.next = function() { switch (this._s) { case 0: return ONE; case -1: return subtractOne(this, -1); // case 1: default: return addOne(this, 1); } }; /* Function: prev Get the previous (subtract one). Returns: *this* - 1. See Also: , */ BigInteger.prototype.prev = function() { switch (this._s) { case 0: return M_ONE; case -1: return addOne(this, -1); // case 1: default: return subtractOne(this, 1); } }; })(); /* Function: compareAbs Compare the absolute value of two . Calling is faster than calling twice, then . Parameters: n - The number to compare to *this*. Will be converted to a . Returns: -1, 0, or +1 if *|this|* is less than, equal to, or greater than *|n|*. See Also: , */ BigInteger.prototype.compareAbs = function(n) { if (this === n) { return 0; } if (!(n instanceof BigInteger)) { if (!isFinite(n)) { return(isNaN(n) ? n : -1); } n = BigInteger(n); } if (this._s === 0) { return (n._s !== 0) ? -1 : 0; } if (n._s === 0) { return 1; } var l = this._d.length; var nl = n._d.length; if (l < nl) { return -1; } else if (l > nl) { return 1; } var a = this._d; var b = n._d; for (var i = l-1; i >= 0; i--) { if (a[i] !== b[i]) { return a[i] < b[i] ? -1 : 1; } } return 0; }; /* Function: compare Compare two . Parameters: n - The number to compare to *this*. Will be converted to a . Returns: -1, 0, or +1 if *this* is less than, equal to, or greater than *n*. See Also: , , , */ BigInteger.prototype.compare = function(n) { if (this === n) { return 0; } n = BigInteger(n); if (this._s === 0) { return -n._s; } if (this._s === n._s) { // both positive or both negative var cmp = this.compareAbs(n); return cmp * this._s; } else { return this._s; } }; /* Function: isUnit Return true iff *this* is either 1 or -1. Returns: true if *this* compares equal to or . See Also: , , , , , , */ BigInteger.prototype.isUnit = function() { return this === ONE || this === M_ONE || (this._d.length === 1 && this._d[0] === 1); }; /* Function: multiply Multiply two . Parameters: n - The number to multiply *this* by. Will be converted to a . Returns: The numbers multiplied together. See Also: , , , */ BigInteger.prototype.multiply = function(n) { // TODO: Consider adding Karatsuba multiplication for large numbers if (this._s === 0) { return ZERO; } n = BigInteger(n); if (n._s === 0) { return ZERO; } if (this.isUnit()) { if (this._s < 0) { return n.negate(); } return n; } if (n.isUnit()) { if (n._s < 0) { return this.negate(); } return this; } if (this === n) { return this.square(); } var r = (this._d.length >= n._d.length); var a = (r ? this : n)._d; // a will be longer than b var b = (r ? n : this)._d; var al = a.length; var bl = b.length; var pl = al + bl; var partial = new Array(pl); var i; for (i = 0; i < pl; i++) { partial[i] = 0; } for (i = 0; i < bl; i++) { var carry = 0; var bi = b[i]; var jlimit = al + i; var digit; for (var j = i; j < jlimit; j++) { digit = partial[j] + bi * a[j - i] + carry; carry = (digit / BigInteger_base) | 0; partial[j] = (digit % BigInteger_base) | 0; } if (carry) { digit = partial[j] + carry; carry = (digit / BigInteger_base) | 0; partial[j] = digit % BigInteger_base; } } return new BigInteger(partial, this._s * n._s, CONSTRUCT); }; // Multiply a BigInteger by a single-digit native number // Assumes that this and n are >= 0 // This is not really intended to be used outside the library itself BigInteger.prototype.multiplySingleDigit = function(n) { if (n === 0 || this._s === 0) { return ZERO; } if (n === 1) { return this; } var digit; if (this._d.length === 1) { digit = this._d[0] * n; if (digit >= BigInteger_base) { return new BigInteger([(digit % BigInteger_base)|0, (digit / BigInteger_base)|0], 1, CONSTRUCT); } return new BigInteger([digit], 1, CONSTRUCT); } if (n === 2) { return this.add(this); } if (this.isUnit()) { return new BigInteger([n], 1, CONSTRUCT); } var a = this._d; var al = a.length; var pl = al + 1; var partial = new Array(pl); for (var i = 0; i < pl; i++) { partial[i] = 0; } var carry = 0; for (var j = 0; j < al; j++) { digit = n * a[j] + carry; carry = (digit / BigInteger_base) | 0; partial[j] = (digit % BigInteger_base) | 0; } if (carry) { partial[j] = carry; } return new BigInteger(partial, 1, CONSTRUCT); }; /* Function: square Multiply a by itself. This is slightly faster than regular multiplication, since it removes the duplicated multiplcations. Returns: > this.multiply(this) See Also: */ BigInteger.prototype.square = function() { // Normally, squaring a 10-digit number would take 100 multiplications. // Of these 10 are unique diagonals, of the remaining 90 (100-10), 45 are repeated. // This procedure saves (N*(N-1))/2 multiplications, (e.g., 45 of 100 multiplies). // Based on code by Gary Darby, Intellitech Systems Inc., www.DelphiForFun.org if (this._s === 0) { return ZERO; } if (this.isUnit()) { return ONE; } var digits = this._d; var length = digits.length; var imult1 = new Array(length + length + 1); var product, carry, k; var i; // Calculate diagonal for (i = 0; i < length; i++) { k = i * 2; product = digits[i] * digits[i]; carry = (product / BigInteger_base) | 0; imult1[k] = product % BigInteger_base; imult1[k + 1] = carry; } // Calculate repeating part for (i = 0; i < length; i++) { carry = 0; k = i * 2 + 1; for (var j = i + 1; j < length; j++, k++) { product = digits[j] * digits[i] * 2 + imult1[k] + carry; carry = (product / BigInteger_base) | 0; imult1[k] = product % BigInteger_base; } k = length + i; var digit = carry + imult1[k]; carry = (digit / BigInteger_base) | 0; imult1[k] = digit % BigInteger_base; imult1[k + 1] += carry; } return new BigInteger(imult1, 1, CONSTRUCT); }; /* Function: quotient Divide two and truncate towards zero. throws an exception if *n* is zero. Parameters: n - The number to divide *this* by. Will be converted to a . Returns: The *this* / *n*, truncated to an integer. See Also: , , , , */ BigInteger.prototype.quotient = function(n) { return this.divRem(n)[0]; }; /* Function: divide Deprecated synonym for . */ BigInteger.prototype.divide = BigInteger.prototype.quotient; /* Function: remainder Calculate the remainder of two . throws an exception if *n* is zero. Parameters: n - The remainder after *this* is divided *this* by *n*. Will be converted to a . Returns: *this* % *n*. See Also: , */ BigInteger.prototype.remainder = function(n) { return this.divRem(n)[1]; }; /* Function: divRem Calculate the integer quotient and remainder of two . throws an exception if *n* is zero. Parameters: n - The number to divide *this* by. Will be converted to a . Returns: A two-element array containing the quotient and the remainder. > a.divRem(b) is exactly equivalent to > [a.quotient(b), a.remainder(b)] except it is faster, because they are calculated at the same time. See Also: , */ BigInteger.prototype.divRem = function(n) { n = BigInteger(n); if (n._s === 0) { throw new Error("Divide by zero"); } if (this._s === 0) { return [ZERO, ZERO]; } if (n._d.length === 1) { return this.divRemSmall(n._s * n._d[0]); } // Test for easy cases -- |n1| <= |n2| switch (this.compareAbs(n)) { case 0: // n1 == n2 return [this._s === n._s ? ONE : M_ONE, ZERO]; case -1: // |n1| < |n2| return [ZERO, this]; } var sign = this._s * n._s; var a = n.abs(); var b_digits = this._d; var b_index = b_digits.length; var digits = n._d.length; var quot = []; var guess; var part = new BigInteger([], 0, CONSTRUCT); while (b_index) { part._d.unshift(b_digits[--b_index]); part = new BigInteger(part._d, 1, CONSTRUCT); if (part.compareAbs(n) < 0) { quot.push(0); continue; } if (part._s === 0) { guess = 0; } else { var xlen = part._d.length, ylen = a._d.length; var highx = part._d[xlen-1]*BigInteger_base + part._d[xlen-2]; var highy = a._d[ylen-1]*BigInteger_base + a._d[ylen-2]; if (part._d.length > a._d.length) { // The length of part._d can either match a._d length, // or exceed it by one. highx = (highx+1)*BigInteger_base; } guess = Math.ceil(highx/highy); } do { var check = a.multiplySingleDigit(guess); if (check.compareAbs(part) <= 0) { break; } guess--; } while (guess); quot.push(guess); if (!guess) { continue; } var diff = part.subtract(check); part._d = diff._d.slice(); } return [new BigInteger(quot.reverse(), sign, CONSTRUCT), new BigInteger(part._d, this._s, CONSTRUCT)]; }; // Throws an exception if n is outside of (-BigInteger.base, -1] or // [1, BigInteger.base). It's not necessary to call this, since the // other division functions will call it if they are able to. BigInteger.prototype.divRemSmall = function(n) { var r; n = +n; if (n === 0) { throw new Error("Divide by zero"); } var n_s = n < 0 ? -1 : 1; var sign = this._s * n_s; n = Math.abs(n); if (n < 1 || n >= BigInteger_base) { throw new Error("Argument out of range"); } if (this._s === 0) { return [ZERO, ZERO]; } if (n === 1 || n === -1) { return [(sign === 1) ? this.abs() : new BigInteger(this._d, sign, CONSTRUCT), ZERO]; } // 2 <= n < BigInteger_base // divide a single digit by a single digit if (this._d.length === 1) { var q = new BigInteger([(this._d[0] / n) | 0], 1, CONSTRUCT); r = new BigInteger([(this._d[0] % n) | 0], 1, CONSTRUCT); if (sign < 0) { q = q.negate(); } if (this._s < 0) { r = r.negate(); } return [q, r]; } var digits = this._d.slice(); var quot = new Array(digits.length); var part = 0; var diff = 0; var i = 0; var guess; while (digits.length) { part = part * BigInteger_base + digits[digits.length - 1]; if (part < n) { quot[i++] = 0; digits.pop(); diff = BigInteger_base * diff + part; continue; } if (part === 0) { guess = 0; } else { guess = (part / n) | 0; } var check = n * guess; diff = part - check; quot[i++] = guess; if (!guess) { digits.pop(); continue; } digits.pop(); part = diff; } r = new BigInteger([diff], 1, CONSTRUCT); if (this._s < 0) { r = r.negate(); } return [new BigInteger(quot.reverse(), sign, CONSTRUCT), r]; }; /* Function: isEven Return true iff *this* is divisible by two. Note that is even. Returns: true if *this* is even, false otherwise. See Also: */ BigInteger.prototype.isEven = function() { var digits = this._d; return this._s === 0 || digits.length === 0 || (digits[0] % 2) === 0; }; /* Function: isOdd Return true iff *this* is not divisible by two. Returns: true if *this* is odd, false otherwise. See Also: */ BigInteger.prototype.isOdd = function() { return !this.isEven(); }; /* Function: sign Get the sign of a . Returns: * -1 if *this* < 0 * 0 if *this* == 0 * +1 if *this* > 0 See Also: , , , , */ BigInteger.prototype.sign = function() { return this._s; }; /* Function: isPositive Return true iff *this* > 0. Returns: true if *this*.compare() == 1. See Also: , , , , , */ BigInteger.prototype.isPositive = function() { return this._s > 0; }; /* Function: isNegative Return true iff *this* < 0. Returns: true if *this*.compare() == -1. See Also: , , , , , */ BigInteger.prototype.isNegative = function() { return this._s < 0; }; /* Function: isZero Return true iff *this* == 0. Returns: true if *this*.compare() == 0. See Also: , , , , */ BigInteger.prototype.isZero = function() { return this._s === 0; }; /* Function: exp10 Multiply a by a power of 10. This is equivalent to, but faster than > if (n >= 0) { > return this.multiply(BigInteger("1e" + n)); > } > else { // n <= 0 > return this.quotient(BigInteger("1e" + -n)); > } Parameters: n - The power of 10 to multiply *this* by. *n* is converted to a javascipt number and must be no greater than (0x7FFFFFFF), or an exception will be thrown. Returns: *this* * (10 ** *n*), truncated to an integer if necessary. See Also: , */ BigInteger.prototype.exp10 = function(n) { n = +n; if (n === 0) { return this; } if (Math.abs(n) > Number(MAX_EXP)) { throw new Error("exponent too large in BigInteger.exp10"); } // Optimization for this == 0. This also keeps us from having to trim zeros in the positive n case if (this._s === 0) { return ZERO; } if (n > 0) { var k = new BigInteger(this._d.slice(), this._s, CONSTRUCT); for (; n >= BigInteger_base_log10; n -= BigInteger_base_log10) { k._d.unshift(0); } if (n == 0) return k; k._s = 1; k = k.multiplySingleDigit(Math.pow(10, n)); return (this._s < 0 ? k.negate() : k); } else if (-n >= this._d.length*BigInteger_base_log10) { return ZERO; } else { var k = new BigInteger(this._d.slice(), this._s, CONSTRUCT); for (n = -n; n >= BigInteger_base_log10; n -= BigInteger_base_log10) { k._d.shift(); } return (n == 0) ? k : k.divRemSmall(Math.pow(10, n))[0]; } }; /* Function: pow Raise a to a power. In this implementation, 0**0 is 1. Parameters: n - The exponent to raise *this* by. *n* must be no greater than (0x7FFFFFFF), or an exception will be thrown. Returns: *this* raised to the *nth* power. See Also: */ BigInteger.prototype.pow = function(n) { if (this.isUnit()) { if (this._s > 0) { return this; } else { return BigInteger(n).isOdd() ? this : this.negate(); } } n = BigInteger(n); if (n._s === 0) { return ONE; } else if (n._s < 0) { if (this._s === 0) { throw new Error("Divide by zero"); } else { return ZERO; } } if (this._s === 0) { return ZERO; } if (n.isUnit()) { return this; } if (n.compareAbs(MAX_EXP) > 0) { throw new Error("exponent too large in BigInteger.pow"); } var x = this; var aux = ONE; var two = BigInteger.small[2]; while (n.isPositive()) { if (n.isOdd()) { aux = aux.multiply(x); if (n.isUnit()) { return aux; } } x = x.square(); n = n.quotient(two); } return aux; }; /* Function: modPow Raise a to a power (mod m). Because it is reduced by a modulus, is not limited by like . Parameters: exponent - The exponent to raise *this* by. Must be positive. modulus - The modulus. Returns: *this* ^ *exponent* (mod *modulus*). See Also: , */ BigInteger.prototype.modPow = function(exponent, modulus) { var result = ONE; var base = this; while (exponent.isPositive()) { if (exponent.isOdd()) { result = result.multiply(base).remainder(modulus); } exponent = exponent.quotient(BigInteger.small[2]); if (exponent.isPositive()) { base = base.square().remainder(modulus); } } return result; }; /* Function: log Get the natural logarithm of a as a native JavaScript number. This is equivalent to > Math.log(this.toJSValue()) but handles values outside of the native number range. Returns: log( *this* ) See Also: */ BigInteger.prototype.log = function() { switch (this._s) { case 0: return -Infinity; case -1: return NaN; default: // Fall through. } var l = this._d.length; if (l*BigInteger_base_log10 < 30) { return Math.log(this.valueOf()); } var N = Math.ceil(30/BigInteger_base_log10); var firstNdigits = this._d.slice(l - N); return Math.log((new BigInteger(firstNdigits, 1, CONSTRUCT)).valueOf()) + (l - N) * Math.log(BigInteger_base); }; /* Function: valueOf Convert a to a native JavaScript integer. This is called automatically by JavaScipt to convert a to a native value. Returns: > parseInt(this.toString(), 10) See Also: , */ BigInteger.prototype.valueOf = function() { return parseInt(this.toString(), 10); }; /* Function: toJSValue Convert a to a native JavaScript integer. This is the same as valueOf, but more explicitly named. Returns: > parseInt(this.toString(), 10) See Also: , */ BigInteger.prototype.toJSValue = function() { return parseInt(this.toString(), 10); }; var MAX_EXP = BigInteger(0x7FFFFFFF); // Constant: MAX_EXP // The largest exponent allowed in and (0x7FFFFFFF or 2147483647). BigInteger.MAX_EXP = MAX_EXP; (function() { function makeUnary(fn) { return function(a) { return fn.call(BigInteger(a)); }; } function makeBinary(fn) { return function(a, b) { return fn.call(BigInteger(a), BigInteger(b)); }; } function makeTrinary(fn) { return function(a, b, c) { return fn.call(BigInteger(a), BigInteger(b), BigInteger(c)); }; } (function() { var i, fn; var unary = "toJSValue,isEven,isOdd,sign,isZero,isNegative,abs,isUnit,square,negate,isPositive,toString,next,prev,log".split(","); var binary = "compare,remainder,divRem,subtract,add,quotient,divide,multiply,pow,compareAbs".split(","); var trinary = ["modPow"]; for (i = 0; i < unary.length; i++) { fn = unary[i]; BigInteger[fn] = makeUnary(BigInteger.prototype[fn]); } for (i = 0; i < binary.length; i++) { fn = binary[i]; BigInteger[fn] = makeBinary(BigInteger.prototype[fn]); } for (i = 0; i < trinary.length; i++) { fn = trinary[i]; BigInteger[fn] = makeTrinary(BigInteger.prototype[fn]); } BigInteger.exp10 = function(x, n) { return BigInteger(x).exp10(n); }; })(); })(); exports.BigInteger = BigInteger; })(typeof exports !== 'undefined' ? exports : this); Agda-2.6.0.1/src/main/0000755000000000000000000000000013466402171012417 5ustar0000000000000000Agda-2.6.0.1/src/main/Main.hs0000644000000000000000000000035613466402171013643 0ustar0000000000000000-- | Wrapper for "Agda.Main". -- -- Agda is installed as a library. This module is used to build the -- executable. module Main (main) where import qualified Agda.Main ( main ) import Prelude ( IO ) main :: IO () main = Agda.Main.main Agda-2.6.0.1/src/agda-mode/0000755000000000000000000000000013466402171013311 5ustar0000000000000000Agda-2.6.0.1/src/agda-mode/Main.hs0000644000000000000000000001706213466402171014537 0ustar0000000000000000-- | A program which either tries to add setup code for Agda's Emacs -- mode to the users .emacs file, or provides information to Emacs -- about where the Emacs mode is installed. module Main (main) where import Control.Exception import Control.Monad import Data.Char import Data.List import Data.Maybe import Data.Version import Numeric import System.Directory import System.Environment import System.Exit import System.FilePath import System.IO import System.Process import Paths_Agda (getDataDir, version) -- | The program. main :: IO () main = do prog <- getProgName args <- getArgs case args of [arg] | arg == locateFlag -> printEmacsModeFile | arg == setupFlag -> do dotEmacs <- findDotEmacs setupDotEmacs (Files { thisProgram = prog , dotEmacs = dotEmacs }) | arg == compileFlag -> compileElispFiles _ -> do inform usage exitFailure -- Command line options. setupFlag = "setup" locateFlag = "locate" compileFlag = "compile" -- | Usage information. usage :: String usage = unlines [ "This program, which is part of Agda version " ++ ver ++ ", can be run" , "in three modes, depending on which option it is invoked with:" , "" , setupFlag , "" , " The program tries to add setup code for Agda's Emacs mode to the" , " current user's .emacs file. It is assumed that the .emacs file" , " uses the character encoding specified by the locale." , "" , locateFlag , "" , " The path to the Emacs mode's main file is printed on standard" , " output (using the UTF-8 character encoding and no trailing" , " newline)." , "" , compileFlag , "" , " The program tries to compile Agda's Emacs mode's source files." , "" , " WARNING: If you reinstall the Agda mode without recompiling the Emacs" , " Lisp files, then Emacs may continue using the old, compiled files." ] -- | The current version of Agda. ver :: String ver = intercalate "." $ map show $ versionBranch version ------------------------------------------------------------------------ -- Locating the Agda mode -- | Prints out the path to the Agda mode's main file (using UTF-8 and -- without any trailing newline). printEmacsModeFile :: IO () printEmacsModeFile = do dataDir <- getDataDir let path = dataDir "emacs-mode" "agda2.el" hSetEncoding stdout utf8 putStr path ------------------------------------------------------------------------ -- Setting up the .emacs file data Files = Files { dotEmacs :: FilePath -- ^ The .emacs file. , thisProgram :: FilePath -- ^ The name of the current program. } -- | Tries to set up the Agda mode in the given .emacs file. setupDotEmacs :: Files -> IO () setupDotEmacs files = do informLn $ "The .emacs file used: " ++ dotEmacs files already <- alreadyInstalled files if already then informLn "It seems as if setup has already been performed." else do appendFile (dotEmacs files) (setupString files) inform $ unlines $ [ "Setup done. Try to (re)start Emacs and open an Agda file." , "The following text was appended to the .emacs file:" ] ++ lines (setupString files) -- | Tries to find the user's .emacs file by querying Emacs. findDotEmacs :: IO FilePath findDotEmacs = askEmacs "(insert (expand-file-name user-init-file))" -- | Has the Agda mode already been set up? alreadyInstalled :: Files -> IO Bool alreadyInstalled files = do exists <- doesFileExist (dotEmacs files) if not exists then return False else withFile (dotEmacs files) ReadMode $ \h -> evaluate . (identifier files `isInfixOf`) =<< hGetContents h -- Uses evaluate to ensure that the file is not closed -- prematurely. -- | If this string occurs in the .emacs file, then it is assumed that -- setup has already been performed. identifier :: Files -> String identifier files = takeFileName (thisProgram files) ++ " " ++ locateFlag -- | The string appended to the end of the .emacs file. setupString :: Files -> String setupString files = unlines [ "" , "(load-file (let ((coding-system-for-read 'utf-8))" , " (shell-command-to-string \"" ++ identifier files ++ "\")))" ] ------------------------------------------------------------------------ -- Querying Emacs -- | Evaluates the given Elisp command using Emacs. The output of the -- command (whatever was written into the current buffer) is returned. -- -- Note: The input is not checked. The input is assumed to come from a -- trusted source. askEmacs :: String -> IO String askEmacs query = do tempDir <- getTemporaryDirectory bracket (openTempFile tempDir "askEmacs") (removeFile . fst) $ \(file, h) -> do hClose h exit <- rawSystem "emacs" [ "--no-desktop", "-nw", "--no-splash" -- Andreas, 2014-01-11: ^ try a leaner startup of emacs -- Andreas, 2018-09-08: -nw instead of --no-window-system as some emacses do not support the long version , "--eval" , "(with-temp-file " ++ escape file ++ " " ++ query ++ ")" , "--kill" ] unless (exit == ExitSuccess) $ do informLn "Unable to query Emacs." exitFailure withFile file ReadMode $ \h -> do result <- hGetContents h evaluate (length result) -- Uses evaluate to ensure that the file is not closed -- prematurely. return result -- | Escapes the string so that Emacs can parse it as an Elisp string. escape :: FilePath -> FilePath escape s = "\"" ++ concatMap esc s ++ "\"" where esc c | c `elem` ['\\', '"'] = '\\' : [c] | isAscii c && isPrint c = [c] | otherwise = "\\x" ++ showHex (fromEnum c) "\\ " ------------------------------------------------------------------------ -- Compiling Emacs Lisp files -- | The Agda mode's Emacs Lisp files, given in the order in which -- they should be compiled. emacsLispFiles :: [FilePath] emacsLispFiles = [ "agda2-abbrevs.el" , "annotation.el" , "agda2-queue.el" , "eri.el" , "agda2.el" , "agda-input.el" , "agda2-highlight.el" , "agda2-mode.el" ] -- | Tries to compile the Agda mode's Emacs Lisp files. compileElispFiles :: IO () compileElispFiles = do dataDir <- ( "emacs-mode") <$> getDataDir let elFiles = map (dataDir ) emacsLispFiles elFiles <- filterM doesFileExist elFiles results <- mapM (compile dataDir) elFiles case catMaybes results of [] -> return () fs -> do informLn "Unable to compile the following Emacs Lisp files:" mapM_ (informLn . (" " ++)) fs exitFailure where compile dataDir f = do exit <- rawSystem "emacs" $ [ "--no-init-file", "--no-site-file" , "--directory", dataDir , "--batch" , "--eval" , "(progn \ \(setq byte-compile-error-on-warn t) \ \(byte-compile-disable-warning 'cl-functions) \ \(batch-byte-compile))" , f ] return $ if exit == ExitSuccess then Nothing else Just f ------------------------------------------------------------------------ -- Helper functions -- These functions inform the user about something by printing on -- stderr. inform = hPutStr stderr informLn = hPutStrLn stderr Agda-2.6.0.1/src/full/0000755000000000000000000000000013466402171012435 5ustar0000000000000000Agda-2.6.0.1/src/full/undefined.h0000644000000000000000000000121413466402171014545 0ustar0000000000000000#define __IMPOSSIBLE__ (throwImpossible (Impossible __FILE__ __LINE__)) #define __IMPOSSIBLE_TERM__ (impossibleTerm __FILE__ __LINE__) #define __IMPOSSIBLE_VERBOSE__ (\ s -> do { reportSLn "impossible" 10 s ; __IMPOSSIBLE__ }) #define __UNREACHABLE__ (throwImpossible (Unreachable __FILE__ __LINE__)) #define __CRASH_WHEN__ (\ k n -> whenExactVerbosity k n __UNREACHABLE__) #define __DUMMY_TERM__ (dummyTerm __FILE__ __LINE__) #define __DUMMY_TYPE__ (dummyType __FILE__ __LINE__) #define __DUMMY_SORT__ (dummySort __FILE__ __LINE__) #define __DUMMY_LEVEL__ (dummyLevel __FILE__ __LINE__) #define __DUMMY_DOM__ (dummyDom __FILE__ __LINE__) Agda-2.6.0.1/src/full/Agda/0000755000000000000000000000000013466402171013271 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Version.hs0000644000000000000000000000036213466402171015253 0ustar0000000000000000module Agda.Version where import Data.Version import Data.List ( intercalate, map ) import qualified Paths_Agda as PA -- | The version of Agda. version :: String version = intercalate "." $ map show $ versionBranch PA.version Agda-2.6.0.1/src/full/Agda/TheTypeChecker.hs0000644000000000000000000000026213466402171016474 0ustar0000000000000000module Agda.TheTypeChecker ( checkDecls, checkDecl, checkDeclCached , inferExpr, checkExpr ) where import Agda.TypeChecking.Rules.Decl import Agda.TypeChecking.Rules.Term Agda-2.6.0.1/src/full/Agda/ImpossibleTest.hs0000644000000000000000000000024113466402171016570 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.ImpossibleTest where #include "undefined.h" import Agda.Utils.Impossible impossibleTest :: a impossibleTest = __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/VersionCommit.hs0000644000000000000000000000137213466402171016426 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} module Agda.VersionCommit where import Development.GitRev import Agda.Version versionWithCommitInfo :: String versionWithCommitInfo = version ++ case commitInfo of Nothing -> "" Just info -> "-" ++ info -- | Information about current git commit, generated at compile time commitInfo :: Maybe String commitInfo | hash == "UNKNOWN" = Nothing | otherwise = Just $ abbrev hash ++ dirty where hash = $(gitHash) -- | Check if any tracked files have uncommitted changes dirty | $(gitDirtyTracked) = "-dirty" | otherwise = "" -- | Abbreviate a commit hash while keeping it unambiguous abbrev = take 7 Agda-2.6.0.1/src/full/Agda/Benchmarking.hs0000644000000000000000000000770013466402171016221 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Agda-specific benchmarking structure. module Agda.Benchmarking where import qualified Control.Exception as E import Data.IORef import System.IO.Unsafe import Agda.Syntax.Concrete.Name (TopLevelModuleName) import Agda.Syntax.Concrete.Pretty import Agda.Syntax.Abstract.Name import Agda.Utils.Benchmark (MonadBench(..)) import qualified Agda.Utils.Benchmark as B import Agda.Utils.Null import Agda.Utils.Pretty -- | Phases to allocate CPU time to. data Phase = Parsing -- ^ Happy parsing and operator parsing. | Import -- ^ Import chasing. | Deserialization -- ^ Reading interface files. | Scoping -- ^ Scope checking and translation to abstract syntax. | Typing -- ^ Type checking and translation to internal syntax. | Termination -- ^ Termination checking. | Positivity -- ^ Positivity checking and polarity computation. | Injectivity -- ^ Injectivity checking. | ProjectionLikeness -- ^ Checking for projection likeness. | Coverage -- ^ Coverage checking and compilation to case trees. | Highlighting -- ^ Generating highlighting info. | Serialization -- ^ Writing interface files. | DeadCode -- ^ Deac code elimination. | Graph -- ^ Subphase for 'Termination'. | RecCheck -- ^ Subphase for 'Termination'. | Reduce -- ^ Subphase for 'Termination'. | Level -- ^ Subphase for 'Termination'. | Compare -- ^ Subphase for 'Termination'. | With -- ^ Subphase for 'Termination'. | ModuleName -- ^ Subphase for 'Import'. | BuildInterface -- ^ Subphase for 'Serialization'. | Sort -- ^ Subphase for 'Serialization'. | BinaryEncode -- ^ Subphase for 'Serialization'. | Compress -- ^ Subphase for 'Serialization'. | OperatorsExpr -- ^ Subphase for 'Parsing'. | OperatorsPattern -- ^ Subphase for 'Parsing'. | Free -- ^ Subphase for 'Typing': free variable computation. | OccursCheck -- ^ Subphase for 'Typing': occurs check for solving metas. | CheckLHS -- ^ Subphase for 'Typing': checking the LHS | CheckRHS -- ^ Subphase for 'Typing': checking the RHS | TypeSig -- ^ Subphase for 'Typing': checking a type signature | Generalize -- ^ Subphase for 'Typing': generalizing over `variable`s | InstanceSearch -- ^ Subphase for 'Typing': solving instance goals | UnifyIndices -- ^ Subphase for 'CheckLHS': unification of the indices | InverseScopeLookup -- ^ Pretty printing names. | TopModule TopLevelModuleName | Definition QName deriving (Eq, Ord, Show) instance Pretty Phase where pretty (TopModule m) = pretty m pretty (Definition q) = pretty q pretty a = text (show a) type Benchmark = B.Benchmark Phase type Account = B.Account Phase isModuleAccount :: Account -> Bool isModuleAccount [] = True isModuleAccount (TopModule{} : _) = True isModuleAccount _ = False isDefAccount :: Account -> Bool isDefAccount [] = True isDefAccount (Definition{} : _) = True isDefAccount _ = False isInternalAccount :: Account -> Bool isInternalAccount (TopModule{} : _) = False isInternalAccount (Definition{} : _) = False isInternalAccount _ = True -- * Benchmarking in the IO monad. -- | Global variable to store benchmark statistics. {-# NOINLINE benchmarks #-} benchmarks :: IORef Benchmark benchmarks = unsafePerformIO $ newIORef empty instance MonadBench Phase IO where getBenchmark = readIORef benchmarks putBenchmark = writeIORef benchmarks finally = E.finally -- | Benchmark an IO computation and bill it to the given account. billToIO :: Account -> IO a -> IO a billToIO = B.billTo -- | Benchmark a pure computation and bill it to the given account. billToPure :: Account -> a -> a billToPure acc a = unsafePerformIO $ billToIO acc $ return a Agda-2.6.0.1/src/full/Agda/Main.hs0000644000000000000000000001675213466402171014524 0ustar0000000000000000{-# LANGUAGE CPP #-} {-| Agda main module. -} module Agda.Main where import Control.Monad.State import Data.Maybe import System.Environment import System.Exit import System.Console.GetOpt import Agda.Syntax.Position (Range) import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Abstract.Name (toTopLevelModuleName) import Agda.Interaction.CommandLine import Agda.Interaction.Options import Agda.Interaction.Options.Help (Help (..)) import Agda.Interaction.Monad import Agda.Interaction.EmacsTop (mimicGHCi) import Agda.Interaction.JSONTop (jsonREPL) import Agda.Interaction.Imports (MaybeWarnings'(..)) import qualified Agda.Interaction.Imports as Imp import qualified Agda.Interaction.Highlighting.Dot as Dot import qualified Agda.Interaction.Highlighting.LaTeX as LaTeX import Agda.Interaction.Highlighting.HTML import Agda.TypeChecking.Monad import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Errors import Agda.TypeChecking.Warnings import Agda.TypeChecking.Pretty import Agda.Compiler.Common (IsMain (..)) import Agda.Compiler.MAlonzo.Compiler (ghcBackend) import Agda.Compiler.JS.Compiler (jsBackend) import Agda.Compiler.Backend import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.String import Agda.VersionCommit import qualified Agda.Utils.Benchmark as UtilsBench import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Impossible import Agda.Utils.Lens #include "undefined.h" builtinBackends :: [Backend] builtinBackends = [ ghcBackend, jsBackend ] -- | The main function runAgda :: [Backend] -> IO () runAgda backends = runAgda' $ builtinBackends ++ backends runAgda' :: [Backend] -> IO () runAgda' backends = runTCMPrettyErrors $ do progName <- liftIO getProgName argv <- liftIO getArgs opts <- liftIO $ runOptM $ parseBackendOptions backends argv defaultOptions case opts of Left err -> liftIO $ optionError err Right (bs, opts) -> do setTCLens stBackends bs let enabled (Backend b) = isEnabled b (options b) bs' = filter enabled bs () <$ runAgdaWithOptions backends generateHTML (interaction bs') progName opts where interaction bs = backendInteraction bs $ defaultInteraction opts defaultInteraction :: CommandLineOptions -> TCM (Maybe Interface) -> TCM () defaultInteraction opts | i = runIM . interactionLoop | ghci = mimicGHCi . (failIfInt =<<) | json = jsonREPL . (failIfInt =<<) | otherwise = (() <$) where i = optInteractive opts ghci = optGHCiInteraction opts json = optJSONInteraction opts failIfInt Nothing = return () failIfInt (Just _) = __IMPOSSIBLE__ -- | Run Agda with parsed command line options and with a custom HTML generator runAgdaWithOptions :: [Backend] -- ^ Backends only for printing usage and version information -> TCM () -- ^ HTML generating action -> (TCM (Maybe Interface) -> TCM a) -- ^ Backend interaction -> String -- ^ program name -> CommandLineOptions -- ^ parsed command line options -> TCM (Maybe a) runAgdaWithOptions backends generateHTML interaction progName opts | Just hp <- optShowHelp opts = Nothing <$ liftIO (printUsage backends hp) | optShowVersion opts = Nothing <$ liftIO (printVersion backends) | isNothing (optInputFile opts) && not (optInteractive opts) && not (optGHCiInteraction opts) && not (optJSONInteraction opts) = Nothing <$ liftIO (printUsage backends GeneralHelp) | otherwise = do -- Main function. -- Bill everything to root of Benchmark trie. UtilsBench.setBenchmarking UtilsBench.BenchmarkOn -- Andreas, Nisse, 2016-10-11 AIM XXIV -- Turn benchmarking on provisionally, otherwise we lose track of time spent -- on e.g. LaTeX-code generation. -- Benchmarking might be turned off later by setCommandlineOptions Bench.billTo [] checkFile `finally_` do -- Print benchmarks. Bench.print -- Print accumulated statistics. printStatistics 1 Nothing =<< useTC lensAccumStatistics where checkFile = Just <$> do when (optInteractive opts) $ liftIO $ putStr splashScreen interaction $ do setCommandLineOptions opts hasFile <- hasInputFile -- Andreas, 2013-10-30 The following 'resetState' kills the -- verbosity options. That does not make sense (see fail/Issue641). -- 'resetState' here does not seem to serve any purpose, -- thus, I am removing it. -- resetState if not hasFile then return Nothing else do let mode = if optOnlyScopeChecking opts then Imp.ScopeCheck else Imp.TypeCheck file <- getInputFile (i, mw) <- Imp.typeCheckMain file mode =<< Imp.sourceInfo file -- An interface is only generated if the mode is -- Imp.TypeCheck and there are no warnings. result <- case (mode, mw) of (Imp.ScopeCheck, _) -> return Nothing (_, NoWarnings) -> return $ Just i (_, SomeWarnings ws) -> do ws' <- applyFlagsToTCWarnings ws case ws' of [] -> return Nothing cuws -> tcWarningsToError cuws reportSDoc "main" 50 $ pretty i whenM (optGenerateHTML <$> commandLineOptions) $ generateHTML whenM (isJust . optDependencyGraph <$> commandLineOptions) $ Dot.generateDot $ i whenM (optGenerateLaTeX <$> commandLineOptions) $ LaTeX.generateLaTeX i -- Print accumulated warnings ws <- (snd . classifyWarnings) <$> Imp.getAllWarnings AllWarnings unless (null ws) $ do let banner = text $ "\n" ++ delimiter "All done; warnings encountered" reportSDoc "warning" 1 $ vcat $ punctuate "\n" $ banner : (prettyTCM <$> ws) return result -- | Print usage information. printUsage :: [Backend] -> Help -> IO () printUsage backends hp = do progName <- getProgName putStr $ usage standardOptions_ progName hp when (hp == GeneralHelp) $ mapM_ (putStr . backendUsage) backends backendUsage :: Backend -> String backendUsage (Backend b) = usageInfo ("\n" ++ backendName b ++ " backend options") $ map (fmap $ const ()) (commandLineFlags b) -- | Print version information. printVersion :: [Backend] -> IO () printVersion backends = do putStrLn $ "Agda version " ++ versionWithCommitInfo mapM_ putStrLn [ " - " ++ name ++ " backend version " ++ ver | Backend Backend'{ backendName = name, backendVersion = Just ver } <- backends ] -- | What to do for bad options. optionError :: String -> IO () optionError err = do prog <- getProgName putStrLn $ "Error: " ++ err ++ "\nRun '" ++ prog ++ " --help' for help on command line options." exitFailure -- | Run a TCM action in IO; catch and pretty print errors. runTCMPrettyErrors :: TCM () -> IO () runTCMPrettyErrors tcm = do r <- runTCMTop $ tcm `catchError` \err -> do s2s <- prettyTCWarnings' =<< Imp.getAllWarningsOfTCErr err s1 <- prettyError err let ss = filter (not . null) $ s2s ++ [s1] unless (null s1) (liftIO $ putStr $ unlines ss) throwError err case r of Right _ -> exitSuccess Left _ -> exitFailure `catchImpossible` \e -> do putStr $ show e exitFailure -- | Main main :: IO () main = runAgda [] Agda-2.6.0.1/src/full/Agda/Auto/0000755000000000000000000000000013466402171014201 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Auto/Auto.hs0000644000000000000000000005575213466402171015463 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Auto.Auto (auto , AutoResult(..) , AutoProgress(..) ) where import Prelude hiding (null) import Data.Functor import Control.Monad.State import qualified Data.List as List import qualified Data.Map as Map import Data.IORef import qualified System.Timeout import Data.Maybe import qualified Data.Traversable as Trav import Agda.Utils.Permutation (permute, takeP) import Agda.TypeChecking.Monad hiding (withCurrentModule) import Agda.TypeChecking.Telescope import Agda.Syntax.Common (Hiding(..)) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pretty (prettyA) import qualified Agda.Syntax.Concrete.Name as C import qualified Text.PrettyPrint as PP import qualified Agda.TypeChecking.Pretty as TCM import Agda.Syntax.Position import qualified Agda.Syntax.Internal as I import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Translation.AbstractToConcrete (abstractToConcreteScope, abstractToConcrete_, runAbsToCon, toConcrete) import Agda.Interaction.BasicOps hiding (refine) import Agda.TypeChecking.Reduce (normalise) import Agda.Syntax.Common import qualified Agda.Syntax.Scope.Base as Scope import Agda.Syntax.Scope.Monad (withCurrentModule) import Agda.Syntax.Concrete.Name (NameInScope(..), LensInScope(..)) import qualified Agda.Syntax.Abstract.Name as AN import qualified Agda.TypeChecking.Monad.Base as TCM import Agda.TypeChecking.EtaContract (etaContract) import qualified Agda.Utils.HashMap as HMap import Agda.Auto.Options import Agda.Auto.Convert import Agda.Auto.NarrowingSearch import Agda.Auto.Syntax import Agda.Auto.SearchControl import Agda.Auto.Typecheck import Agda.Auto.CaseSplit import Agda.Utils.Except ( runExceptT, MonadError(catchError) ) import Agda.Utils.Functor import Agda.Utils.Impossible import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Null import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Tuple #include "undefined.h" insertAbsurdPattern :: String -> String insertAbsurdPattern [] = [] insertAbsurdPattern s@(_:_) | take (length abspatvarname) s == abspatvarname = "()" ++ drop (length abspatvarname) s insertAbsurdPattern (c:s) = c : insertAbsurdPattern s getHeadAsHint :: A.Expr -> Maybe Hint getHeadAsHint (A.ScopedExpr _ e) = getHeadAsHint e getHeadAsHint (A.Def qname) = Just $ Hint False qname getHeadAsHint (A.Proj _ qname) = Just $ Hint False $ AN.headAmbQ qname getHeadAsHint (A.Con qname) = Just $ Hint True $ AN.headAmbQ qname getHeadAsHint _ = Nothing -- | Result type: Progress & potential Message for the user -- -- The of the Auto tactic can be one of the following three: -- -- 1. @Solutions [(ii,s)]@ -- A list of solutions @s@ for interaction ids @ii@. -- In particular, @Solutions []@ means Agsy found no solution. -- -- 2. @FunClauses cs@ -- A list of clauses for the interaction id @ii@ in which Auto -- was invoked with case-splitting turned on. -- -- 3. @Refinement s@ -- A refinement for the interaction id @ii@ in which Auto was invoked. data AutoProgress = Solutions [(InteractionId, String)] | FunClauses [String] | Refinement String data AutoResult = AutoResult { autoProgress :: AutoProgress , autoMessage :: Maybe String } stopWithMsg :: String -> TCM AutoResult stopWithMsg msg = return $ AutoResult (Solutions []) (Just msg) -- | Entry point for Auto tactic (Agsy). -- -- If the @autoMessage@ part of the result is set to @Just msg@, the -- message @msg@ produced by Agsy should be displayed to the user. {-# SPECIALIZE auto :: InteractionId -> Range -> String -> TCM AutoResult #-} auto :: MonadTCM tcm => InteractionId -> Range -> String -> tcm AutoResult auto ii rng argstr = liftTCM $ do -- Parse hints and other configuration. let autoOptions = parseArgs argstr let hints = autoOptions ^. aoHints let timeout = autoOptions ^. aoTimeOut let pick = autoOptions ^. aoPick let mode = autoOptions ^. aoMode let hintmode = autoOptions ^. aoHintMode ahints <- case mode of MRefine{} -> return [] _ -> mapM (parseExprIn ii rng) hints let failHints = stopWithMsg "Hints must be a list of constant names" eqstuff <- getEqCombinators ii rng caseMaybe (mapM getHeadAsHint ahints) failHints $ \ ehints -> do -- Get the meta variable for the interaction point we are trying to fill. -- Add the @autohints@ for that meta to the hints collection. mi <- lookupInteractionId ii thisdefinfo <- findClauseDeep ii ehints <- (ehints ++) <$> do autohints hintmode mi $ fmap fst3 thisdefinfo -- If @thisdefinfo /= Nothing@ get the its type (normalized). mrectyp <- maybeToList <$> do Trav.forM thisdefinfo $ \ (def, _, _) -> do normalise =<< do TCM.defType <$> getConstInfo def (myhints', mymrectyp, tccons, eqcons, cmap) <- tomy mi (ehints ++ eqstuff) mrectyp let (myhints, c1to6) = splitAt (length myhints' - length eqstuff) myhints' meqr = ifNull eqstuff Nothing $ \ _ -> {- else -} let [c1, c2, c3, c4, c5, c6] = c1to6 in Just $ EqReasoningConsts c1 c2 c3 c4 c5 c6 let tcSearchSC isdep ctx typ trm = caseMaybe meqr a $ \ eqr -> mpret $ Sidecondition (calcEqRState eqr trm) a where a = tcSearch isdep ctx typ trm let (mainm, _, _, _) = tccons Map.! mi case mode of MNormal listmode disprove -> do let numsols = if listmode then 10 else 1 -- Andreas, 2015-05-17 Issue 1504: -- wish to produce several solutions, as -- the first one might be ill-typed. -- However, currently changing the 1 to something higher makes Agsy loop. sols <- liftIO $ newIORef ([] :: [[I.Term]]) nsol <- liftIO $ newIORef $ pick + numsols let hsol = do nsol' <- readIORef nsol let cond = nsol' <= numsols when cond $ do trms <- runExceptT $ mapM (\ (m , _, _, _) -> convert (Meta m) :: MOT I.Term) $ Map.elems tccons case trms of Left{} -> writeIORef nsol $! nsol' + 1 Right trms -> modifyIORef sols (trms :) -- Right trms -> if listmode then modifyIORef sols (trms :) -- else writeIORef sols [trms] ticks <- liftIO $ newIORef 0 let exsearch initprop recinfo defdfv = liftIO $ System.Timeout.timeout (getTimeOut timeout * 1000) $ loop 0 where loop d = do let rechint x = case recinfo of Nothing -> x Just (_, recdef) -> (recdef, HMRecCall) : x env = RIEnv { rieHints = rechint $ map (,HMNormal) myhints , rieDefFreeVars = defdfv , rieEqReasoningConsts = meqr } depreached <- topSearch ticks nsol hsol env (initprop) d costIncrease nsol' <- readIORef nsol if nsol' /= 0 && depreached then loop (d + costIncrease) else return depreached let getsols sol = do exprs <- forM (zip (Map.keys tccons) sol) $ \ (mi, e) -> do mv <- lookupMeta mi e <- etaContract e expr <- modifyAbstractExpr <$> do withMetaInfo (getMetaInfo mv) $ reify e return (mi, expr) let loop :: I.MetaId -> StateT [I.MetaId] TCM [(I.MetaId, A.Expr)] loop midx = do let (m, _, _, deps) = tccons Map.! midx asolss <- mapM loop deps dones <- get asols <- if midx `elem` dones then return [] else do put (midx : dones) return [(midx, fromMaybe __IMPOSSIBLE__ $ lookup midx exprs)] return $ concat asolss ++ asols (asols, _) <- runStateT (loop mi) [] return asols if disprove then case eqcons of [] -> case Map.elems tccons of (m, mytype, mylocalVars, _) : [] -> do defdfv <- case thisdefinfo of Just (def, _, _) -> getdfv mi def Nothing -> return 0 ee <- liftIO $ newIORef $ ConstDef {cdname = "T", cdorigin = __IMPOSSIBLE__, cdtype = NotM $ Sort (Set 0), cdcont = Postulate, cddeffreevars = 0} let (restargs, modargs) = splitAt (length mylocalVars - defdfv) mylocalVars mytype' = foldl (\x y -> NotM $ Pi Nothing NotHidden (freeIn 0 y) y (Abs NoId x)) mytype restargs htyp = negtype ee mytype' sctx = (Id "h", closify htyp) : map (\x -> (NoId, closify x)) modargs ntt = closify (NotM $ App Nothing (NotM OKVal) (Const ee) (NotM ALNil)) res <- exsearch (tcSearchSC False sctx ntt (Meta m)) Nothing defdfv rsols <- liftM reverse $ liftIO $ readIORef sols if null rsols then do nsol' <- liftIO $ readIORef nsol stopWithMsg $ insuffsols (pick + numsols - nsol') else do aexprss <- mapM getsols rsols cexprss <- forM aexprss $ mapM $ \(mi, e) -> do mv <- lookupMeta mi withMetaInfo (getMetaInfo mv) $ do (mi,) <$> abstractToConcrete_ e let ss = dropWhile (== ' ') . dropWhile (/= ' ') . prettyShow disp [(_, cexpr)] = ss cexpr disp cexprs = concat $ map (\ (mi, cexpr) -> ss cexpr ++ " ") cexprs ticks <- liftIO $ readIORef ticks stopWithMsg $ unlines $ ("Listing disproof(s) " ++ show pick ++ "-" ++ show (pick + length rsols - 1)) : for (zip cexprss [pick..]) (\ (x, y) -> show y ++ " " ++ disp x) _ -> stopWithMsg "Metavariable dependencies not allowed in disprove mode" _ -> stopWithMsg "Metavariable dependencies not allowed in disprove mode" else do (recinfo, defdfv) <- case thisdefinfo of Just (def, clause, _) -> do let [rectyp'] = mymrectyp defdfv <- getdfv mi def myrecdef <- liftIO $ newIORef $ ConstDef {cdname = "", cdorigin = (Nothing, def), cdtype = rectyp', cdcont = Postulate, cddeffreevars = defdfv} (_, pats) <- constructPats cmap mi clause defdfv <- getdfv mi def return $ if contains_constructor pats then (Just (pats, myrecdef), defdfv) else (Nothing, defdfv) Nothing -> return (Nothing, 0) let tc (m, mytype, mylocalVars) isdep = tcSearchSC isdep (map (\x -> (NoId, closify x)) mylocalVars) (closify mytype) (Meta m) initprop = foldl (\x (ineq, e, i) -> mpret $ And Nothing x (comp' ineq (closify e) (closify i))) (foldl (\x (m, mt, mlv, _) -> if hequalMetavar m mainm then case recinfo of Just (recpats, recdef) -> mpret $ Sidecondition (localTerminationSidecond (localTerminationEnv recpats) recdef (Meta m)) (tc (m, mt, mlv) False) Nothing -> mpret $ And Nothing x (tc (m, mt, mlv) False) else mpret $ And Nothing x (tc (m, mt, mlv) True) ) (mpret OK) (Map.elems tccons) ) eqcons res <- exsearch initprop recinfo defdfv riis <- map swap <$> getInteractionIdsAndMetas let timeoutString | isNothing res = " after timeout (" ++ show timeout ++ "ms)" | otherwise = "" if listmode then do rsols <- liftM reverse $ liftIO $ readIORef sols if null rsols then do nsol' <- liftIO $ readIORef nsol stopWithMsg $ insuffsols (pick + numsols - nsol') ++ timeoutString else do aexprss <- mapM getsols rsols -- cexprss <- mapM (mapM (\(mi, e) -> lookupMeta mi >>= \mv -> withMetaInfo (getMetaInfo mv) $ abstractToConcrete_ e >>= \e' -> return (mi, e'))) aexprss cexprss <- forM aexprss $ do mapM $ \ (mi, e) -> do mv <- lookupMeta mi withMetaInfo (getMetaInfo mv) $ do e' <- abstractToConcrete_ e return (mi, e') let disp [(_, cexpr)] = prettyShow cexpr disp cexprs = concat $ for cexprs $ \ (mi, cexpr) -> maybe (show mi) show (lookup mi riis) ++ " := " ++ prettyShow cexpr ++ " " ticks <- liftIO $ readIORef ticks stopWithMsg $ "Listing solution(s) " ++ show pick ++ "-" ++ show (pick + length rsols - 1) ++ timeoutString ++ "\n" ++ unlines (map (\(x, y) -> show y ++ " " ++ disp x) $ zip cexprss [pick..]) else {- not listmode -} case res of Nothing -> do nsol' <- liftIO $ readIORef nsol stopWithMsg $ insuffsols (pick + numsols - nsol') ++ timeoutString Just depthreached -> do ticks <- liftIO $ readIORef ticks rsols <- liftIO $ readIORef sols case rsols of [] -> do nsol' <- liftIO $ readIORef nsol stopWithMsg $ insuffsols (pick + numsols - nsol') terms -> loop terms where -- Andreas, 2015-05-17 Issue 1504 -- If giving a solution failed (e.g. ill-typed) -- we could try the next one. -- However, currently @terms@ is always a singleton list. -- Thus, the following @loop@ is not doing something very -- meaningful. loop :: [[I.Term]] -> TCM AutoResult loop [] = return $ AutoResult (Solutions []) (Just "") loop (term : terms') = do -- On exception, try next solution flip catchError (const $ loop terms') $ do exprs <- getsols term reportSDoc "auto" 20 $ "Trying solution " TCM.<+> TCM.prettyTCM exprs giveress <- forM exprs $ \ (mi, expr0) -> do let expr = killRange expr0 case lookup mi riis of Nothing -> -- catchError (giveExpr WithoutForce Nothing mi expr >> return (Nothing, Nothing)) -- (const retry) -- (\_ -> return (Nothing, Just ("Failed to give expr for side solution of " ++ show mi))) Just ii' -> do ae <- give WithoutForce ii' Nothing expr mv <- lookupMeta mi let scope = getMetaScope mv ce <- abstractToConcreteScope scope ae let cmnt = if ii' == ii then agsyinfo ticks else "" return (Just (ii', prettyShow ce ++ cmnt), Nothing) -- Andreas, 2015-05-17, Issue 1504 -- When Agsy produces an ill-typed solution, return nothing. -- TODO: try other solution. -- `catchError` const retry -- (return (Nothing, Nothing)) let msg = if length exprs == 1 then Nothing else Just $ "Also gave solution(s) for hole(s)" ++ concatMap (\(mi', _) -> if mi' == mi then "" else (" " ++ case lookup mi' riis of {Nothing -> show mi'; Just ii -> show ii}) ) exprs let msgs = catMaybes $ msg : map snd giveress msg' = unlines msgs <$ guard (not $ null msgs) return $ AutoResult (Solutions $ catMaybes $ map fst giveress) msg' MCaseSplit -> do case thisdefinfo of Just (def, clause, True) -> case Map.elems tccons of [(m, mytype, mylocalVars, _)] | null eqcons -> do (ids, pats) <- constructPats cmap mi clause let ctx = map (\((hid, id), t) -> HI hid (id, t)) (zip ids mylocalVars) ticks <- liftIO $ newIORef 0 let [rectyp'] = mymrectyp defdfv <- getdfv mi def myrecdef <- liftIO $ newIORef $ ConstDef {cdname = "", cdorigin = (Nothing, def), cdtype = rectyp', cdcont = Postulate, cddeffreevars = defdfv} sols <- liftIO $ System.Timeout.timeout (getTimeOut timeout * 1000) ( let r d = do sols <- liftIO $ caseSplitSearch ticks __IMPOSSIBLE__ myhints meqr __IMPOSSIBLE__ d myrecdef ctx mytype pats case sols of [] -> r (d + costIncrease) (_:_) -> return sols in r 0) case sols of Just (cls : _) -> withInteractionId ii $ do cls' <- liftIO $ runExceptT (mapM frommyClause cls) case cls' of Left{} -> stopWithMsg "No solution found" Right cls' -> do cls'' <- forM cls' $ \ (I.Clause _ _ tel ps body t catchall reachable) -> do withCurrentModule (AN.qnameModule def) $ do -- Normalise the dot patterns ps <- addContext tel $ normalise ps body <- etaContract body liftM modifyAbstractClause $ inTopContext $ reify $ AN.QNamed def $ I.Clause noRange noRange tel ps body t catchall reachable moduleTel <- lookupSection (AN.qnameModule def) pcs <- withInteractionId ii $ inTopContext $ addContext moduleTel $ mapM prettyA cls'' ticks <- liftIO $ readIORef ticks return $ AutoResult (FunClauses $ map (insertAbsurdPattern . PP.renderStyle (PP.style { PP.mode = PP.OneLineMode })) pcs) Nothing Just [] -> stopWithMsg "No solution found" -- case not possible at the moment because case split doesnt care about search exhaustiveness Nothing -> stopWithMsg $ "No solution found at time out (" ++ show timeout ++ "s)" _ -> stopWithMsg "Metavariable dependencies not allowed in case split mode" _ -> stopWithMsg "Metavariable is not at top level of clause RHS" MRefine listmode -> do mv <- lookupMeta mi let tt = jMetaType $ mvJudgement mv minfo = getMetaInfo mv targettyp <- withMetaInfo minfo $ do vs <- getContextArgs targettype <- tt `piApplyM` permute (takeP (length vs) $ mvPermutation mv) vs normalise targettype let tctx = length $ envContext $ clEnv minfo hits <- if elem "-a" hints then do st <- liftTCM $ join $ pureTCM $ \st _ -> return st let defs = st^.stSignature.sigDefinitions idefs = st^.stImports.sigDefinitions alldefs = HMap.keys defs ++ HMap.keys idefs liftM catMaybes $ mapM (\n -> case thisdefinfo of Just (def, _, _) | def == n -> return Nothing _ -> do cn <- withMetaInfo minfo $ runAbsToCon $ toConcrete n if C.isInScope cn == C.NotInScope then return Nothing else do c <- getConstInfo n ctyp <- normalise $ defType c cdfv <- withMetaInfo minfo $ getDefFreeVars n return $ case matchType cdfv tctx ctyp targettyp of Nothing -> Nothing Just score -> Just (prettyShow cn, score) ) alldefs else do let scopeinfo = clScope (getMetaInfo mv) namespace = Scope.everythingInScope scopeinfo names = Scope.nsNames namespace qnames = map (\(x, y) -> (x, Scope.anameName $ head y)) $ Map.toList names modnames = case thisdefinfo of Just (def, _, _) -> filter (\(_, n) -> n /= def) qnames Nothing -> qnames liftM catMaybes $ mapM (\(cn, n) -> do c <- getConstInfo n ctyp <- normalise $ defType c cdfv <- withMetaInfo minfo $ getDefFreeVars n return $ case matchType cdfv tctx ctyp targettyp of Nothing -> Nothing Just score -> Just (prettyShow cn, score) ) modnames let sorthits = List.sortBy (\(_, (pa1, pb1)) (_, (pa2, pb2)) -> case compare pa2 pa1 of {EQ -> compare pb1 pb2; o -> o}) hits if listmode || pick == (-1) then let pick' = max 0 pick in if pick' >= length sorthits then stopWithMsg $ insuffcands $ length sorthits else let showhits = take 10 $ drop pick' sorthits in stopWithMsg $ "Listing candidate(s) " ++ show pick' ++ "-" ++ show (pick' + length showhits - 1) ++ " (found " ++ show (length sorthits) ++ " in total)\n" ++ unlines (map (\(i, (cn, _)) -> show i ++ " " ++ cn) (zip [pick'..pick' + length showhits - 1] showhits)) else if pick >= length sorthits then stopWithMsg $ insuffcands $ length sorthits else return $ AutoResult (Refinement $ fst $ sorthits !! pick) Nothing where agsyinfo ticks = "" -- Get the functions and axioms defined in the same module as @def@. autohints :: AutoHintMode -> I.MetaId -> Maybe AN.QName -> TCM [Hint] autohints AHMModule mi (Just def) = do scope <- clScope . getMetaInfo <$> lookupMeta mi let names = Scope.nsNames $ Scope.everythingInScope scope qnames = map (Scope.anameName . head) $ Map.elems names modnames = filter (\n -> AN.qnameModule n == AN.qnameModule def && n /= def) qnames map (Hint False) <$> do (`filterM` modnames) $ \ n -> do c <- getConstInfo n case theDef c of Axiom{} -> return True AbstractDefn{} -> return True Function{} -> return True _ -> return False autohints _ _ _ = return [] -- | Names for the equality reasoning combinators -- Empty if any of these names is not defined. getEqCombinators :: InteractionId -> Range -> TCM [Hint] getEqCombinators ii rng = do let eqCombinators = ["_≡_", "begin_", "_≡⟨_⟩_", "_∎", "sym", "cong"] raw <- mapM (parseExprIn ii rng) eqCombinators `catchError` const (pure []) return $ fromMaybe [] $ mapM getHeadAsHint raw -- | Templates for error messages genericNotEnough :: String -> Int -> String genericNotEnough str n = List.intercalate " " $ case n of 0 -> [ "No" , str, "found"] 1 -> [ "Only 1", str, "found" ] _ -> [ "Only", show n, str ++ "s", "found" ] insuffsols :: Int -> String insuffsols = genericNotEnough "solution" insuffcands :: Int -> String insuffcands = genericNotEnough "candidate" Agda-2.6.0.1/src/full/Agda/Auto/CaseSplit.hs0000644000000000000000000005666213466402171016443 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} module Agda.Auto.CaseSplit where import Data.IORef import Data.Tuple (swap) import Data.List (findIndex, union) import Data.Monoid ((<>), Sum(..)) import Data.Foldable (foldMap) import qualified Data.Set as Set import qualified Data.IntMap as IntMap import Control.Monad.State as St hiding (lift) import Control.Monad.Reader as Rd hiding (lift) import qualified Control.Monad.State as St import Data.Function import Agda.Syntax.Common (Hiding(..)) import Agda.Auto.NarrowingSearch import Agda.Auto.Syntax import Agda.Auto.SearchControl import Agda.Auto.Typecheck #include "undefined.h" import Agda.Utils.Impossible import Agda.Utils.Monad (or2M) abspatvarname :: String abspatvarname = "\0absurdPattern" costCaseSplitVeryHigh, costCaseSplitHigh, costCaseSplitLow, costAddVarDepth :: Cost costCaseSplitVeryHigh = 10000 costCaseSplitHigh = 5000 costCaseSplitLow = 2000 costAddVarDepth = 1000 data HI a = HI Hiding a drophid :: [HI a] -> [a] drophid = map (\(HI _ x) -> x) type CSPat o = HI (CSPatI o) type CSCtx o = [HI (MId, MExp o)] data CSPatI o = CSPatConApp (ConstRef o) [CSPat o] | CSPatVar Nat | CSPatExp (MExp o) | CSWith (MExp o) -- always an App | CSAbsurd | CSOmittedArg type Sol o = [(CSCtx o, [CSPat o], Maybe (MExp o))] caseSplitSearch :: forall o . IORef Int -> Int -> [ConstRef o] -> Maybe (EqReasoningConsts o) -> Int -> Cost -> ConstRef o -> CSCtx o -> MExp o -> [CSPat o] -> IO [Sol o] caseSplitSearch ticks nsolwanted chints meqr depthinterval depth recdef ctx tt pats = do let branchsearch :: Cost -> CSCtx o -> MExp o -> ([Nat], Nat, [Nat]) -> IO (Maybe (MExp o)) branchsearch depth ctx tt termcheckenv = do nsol <- newIORef 1 m <- initMeta sol <- newIORef Nothing let trm = Meta m hsol = do trm' <- expandMetas trm writeIORef sol (Just trm') initcon = mpret $ Sidecondition (localTerminationSidecond termcheckenv recdef trm) $ (case meqr of Nothing -> id Just eqr -> mpret . Sidecondition (calcEqRState eqr trm) ) $ tcSearch False (map (fmap closify) (drophid ctx)) (closify tt) trm recdefd <- readIORef recdef let env = RIEnv { rieHints = (recdef, HMRecCall) : map (, HMNormal) chints , rieDefFreeVars = cddeffreevars recdefd , rieEqReasoningConsts = meqr } depreached <- topSearch ticks nsol hsol env initcon depth (depth + 1) rsol <- readIORef sol return rsol ctx' = ff 1 ctx ff _ [] = [] ff n (HI hid (id, t) : ctx) = HI hid (id, lift n t) : ff (n + 1) ctx caseSplitSearch' branchsearch depthinterval depth recdef ctx' tt pats caseSplitSearch' :: forall o . (Cost -> CSCtx o -> MExp o -> ([Nat], Nat, [Nat]) -> IO (Maybe (MExp o))) -> Int -> Cost -> ConstRef o -> CSCtx o -> MExp o -> [CSPat o] -> IO [Sol o] caseSplitSearch' branchsearch depthinterval depth recdef ctx tt pats = do recdefd <- readIORef recdef sols <- rc depth (cddeffreevars recdefd) ctx tt pats return sols where rc :: Cost -> Int -> CSCtx o -> MExp o -> [CSPat o] -> IO [Sol o] rc depth _ _ _ _ | depth < 0 = return [] rc depth nscrutavoid ctx tt pats = do mblkvar <- getblks tt fork mblkvar where fork :: [Nat] -> IO [Sol o] fork mblkvar = do sols1 <- dobody case sols1 of (_:_) -> return sols1 [] -> do let r :: [Nat] -> IO [Sol o] r [] = return [] r (v:vs) = do sols2 <- splitvar mblkvar v case sols2 of (_:_) -> return sols2 [] -> r vs r [nv - x | x <- [0..nv]] -- [0..length ctx - 1 - nscrutavoid] where nv = length ctx - 1 dobody :: IO [Sol o] dobody = do case findperm (map snd (drophid ctx)) of Just perm -> do let (ctx', tt', pats') = applyperm perm ctx tt pats res <- branchsearch depth ctx' tt' (localTerminationEnv pats') return $ case res of Just trm -> [[(ctx', pats', Just trm)]] Nothing -> [] Nothing -> __IMPOSSIBLE__ -- no permutation found splitvar :: [Nat] -> Nat -> IO [Sol o] splitvar mblkvar scrut = do let scruttype = infertypevar ctx scrut case rm __IMPOSSIBLE__ scruttype of App _ _ (Const c) _ -> do cd <- readIORef c case cdcont cd of Datatype cons _ -> do sols <- dobranches cons return $ map (\sol -> case sol of [] -> case findperm (map snd (drophid ctx)) of Just perm -> let HI scrhid(_, scrt) = ctx !! scrut ctx1 = take scrut ctx ++ (HI scrhid (Id abspatvarname, scrt)) : drop (scrut + 1) ctx (ctx', _, pats') = applyperm perm ctx1 tt ({-map (replacep scrut 1 CSAbsurd __IMPOSSIBLE__) -}pats) in [(ctx', pats', Nothing)] Nothing -> __IMPOSSIBLE__ -- no permutation found _ -> sol ) sols where dobranches :: [ConstRef o] -> IO [Sol o] dobranches [] = return [[]] dobranches (con : cons) = do cond <- readIORef con let ff t = case rm __IMPOSSIBLE__ t of Pi _ h _ it (Abs id ot) -> let (xs, inft) = ff ot in (((h, scrut + length xs), id, lift (scrut + length xs + 1) it) : xs, inft) _ -> ([], lift scrut t) (newvars, inftype) = ff (cdtype cond) constrapp = NotM $ App Nothing (NotM OKVal) (Const con) (foldl (\xs ((h, v), _, _) -> NotM $ ALCons h (NotM $ App Nothing (NotM OKVal) (Var v) (NotM ALNil)) xs) (NotM ALNil) (reverse newvars)) pconstrapp = CSPatConApp con (map (\((hid, v), _, _) -> HI hid (CSPatVar v)) newvars) thesub = replace scrut (length newvars) constrapp Id newvarprefix = fst $ (drophid ctx) !! scrut ctx1 = map (\(HI hid (id, t)) -> HI hid (id, thesub t)) (take scrut ctx) ++ reverse (map (\(((hid, _), id, t), i) -> HI hid (Id (case id of {NoId -> newvarprefix{- ++ show i-}; Id id -> id}), t) ) (zip newvars [0..])) ++ map (\(HI hid (id, t)) -> HI hid (id, thesub t)) (drop (scrut + 1) ctx) tt' = thesub tt pats' = map (replacep scrut (length newvars) pconstrapp constrapp) pats scruttype' = thesub scruttype -- scruttype shouldn't really refer to scrutvar so lift is enough, but what if circular ref has been created and this is not detected until case split is done case unifyexp inftype scruttype' of Nothing -> do res <- notequal scrut (length newvars) scruttype' inftype if res then -- branch absurd dobranches cons else -- branch dont know return [] Just unif -> do let (ctx2, tt2, pats2) = removevar ctx1 tt' pats' unif --cost = if elem scrut mblkvar then costCaseSplit - (costCaseSplit - costCaseSplitFollow) `div` (length mblkvar) else costCaseSplit cost = if null mblkvar then if scrut < length ctx - nscrutavoid && nothid then costCaseSplitLow + costAddVarDepth * Cost (depthofvar scrut pats) else costCaseSplitVeryHigh else if elem scrut mblkvar then costCaseSplitLow else (if scrut < length ctx - nscrutavoid && nothid then costCaseSplitHigh else costCaseSplitVeryHigh) nothid = let HI hid _ = ctx !! scrut in hid == NotHidden sols <- rc (depth - cost) (length ctx - 1 - scrut) ctx2 tt2 pats2 case sols of [] -> return [] _ -> do sols2 <- dobranches cons return $ concat (map (\sol -> map (\sol2 -> sol ++ sol2) sols2) sols) _ -> return [] -- split failed "scrut type is not datatype" _ -> return [] -- split failed "scrut type is not datatype" infertypevar :: CSCtx o -> Nat -> MExp o infertypevar ctx v = snd $ (drophid ctx) !! v class Replace o t u | t u -> o where replace' :: Nat -> MExp o -> t -> Reader (Nat, Nat) u replace :: Replace o t u => Nat -> Nat -> MExp o -> t -> u replace sv nnew e t = replace' 0 e t `runReader` (sv, nnew) instance Replace o t u => Replace o (Abs t) (Abs u) where replace' n re (Abs mid b) = Abs mid <$> replace' (n + 1) re b instance Replace o (Exp o) (MExp o) where replace' n re e = case e of App uid ok elr@(Var v) args -> do ih <- NotM <$> replace' n re args (sv, nnew) <- ask return $ if v >= n then if v - n == sv then betareduce (lift n re) ih else if v - n > sv then NotM $ App uid ok (Var (v + nnew - 1)) ih else NotM $ App uid ok elr ih else NotM $ App uid ok elr ih App uid ok elr@Const{} args -> NotM . App uid ok elr . NotM <$> replace' n re args Lam hid b -> NotM . Lam hid <$> replace' (n + 1) re b Pi uid hid possdep it b -> fmap NotM $ Pi uid hid possdep <$> replace' n re it <*> replace' n re b Sort{} -> return $ NotM e AbsurdLambda{} -> return $ NotM e instance Replace o t u => Replace o (MM t (RefInfo o)) u where replace' n re = replace' n re . rm __IMPOSSIBLE__ instance Replace o (ArgList o) (ArgList o) where replace' n re args = case args of ALNil -> return ALNil ALCons hid a as -> ALCons hid <$> replace' n re a <*> (NotM <$> replace' n re as) ALProj{} -> __IMPOSSIBLE__ ALConPar as -> ALConPar . NotM <$> replace' n re as betareduce :: MExp o -> MArgList o -> MExp o betareduce e args = case rm __IMPOSSIBLE__ args of ALNil -> e ALCons _ a rargs -> case rm __IMPOSSIBLE__ e of App uid ok elr eargs -> NotM $ App uid ok elr (concatargs eargs args) Lam _ (Abs _ b) -> betareduce (replace 0 0 a b) rargs _ -> __IMPOSSIBLE__ -- not type correct if this happens ALProj{} -> __IMPOSSIBLE__ ALConPar as -> __IMPOSSIBLE__ concatargs :: MArgList o -> MArgList o -> MArgList o concatargs xs ys = case rm __IMPOSSIBLE__ xs of ALNil -> ys ALCons hid x xs -> NotM $ ALCons hid x (concatargs xs ys) ALProj{} -> __IMPOSSIBLE__ ALConPar as -> NotM $ ALConPar (concatargs xs ys) replacep :: forall o. Nat -> Nat -> CSPatI o -> MExp o -> CSPat o -> CSPat o replacep sv nnew rp re = r where r :: CSPat o -> CSPat o r (HI hid (CSPatConApp c ps)) = HI hid (CSPatConApp c (map r ps)) r (HI hid (CSPatVar v)) = if v == sv then HI hid rp else if v > sv then HI hid (CSPatVar (v + nnew - 1)) else HI hid (CSPatVar v) r (HI hid (CSPatExp e)) = HI hid (CSPatExp $ replace sv nnew re e) r p@(HI _ CSOmittedArg) = p r _ = __IMPOSSIBLE__ -- other constructors dont appear in indata Pats -- Unification takes two values of the same type and generates a list -- of assignments making the two terms equal. type Assignments o = [(Nat, Exp o)] class Unify o t | t -> o where unify' :: t -> t -> StateT (Assignments o) Maybe () notequal' :: t -> t -> ReaderT (Nat, Nat) (StateT (Assignments o) IO) Bool unify :: Unify o t => t -> t -> Maybe (Assignments o) unify t u = unify' t u `execStateT` [] notequal :: Unify o t => Nat -> Nat -> t -> t -> IO Bool notequal fstnew nbnew t1 t2 = notequal' t1 t2 `runReaderT` (fstnew, nbnew) `evalStateT` [] instance Unify o t => Unify o (MM t (RefInfo o)) where unify' = unify' `on` rm __IMPOSSIBLE__ notequal' = notequal' `on` rm __IMPOSSIBLE__ unifyVar :: Nat -> Exp o -> StateT (Assignments o) Maybe () unifyVar v e = do unif <- get case lookup v unif of Nothing -> modify ((v, e) :) Just e' -> unify' e e' instance Unify o t => Unify o (Abs t) where unify' (Abs _ b1) (Abs _ b2) = unify' b1 b2 notequal' (Abs _ b1) (Abs _ b2) = notequal' b1 b2 instance Unify o (Exp o) where unify' e1 e2 = case (e1, e2) of (App _ _ elr1 args1, App _ _ elr2 args2) | elr1 == elr2 -> unify' args1 args2 (Lam hid1 b1, Lam hid2 b2) | hid1 == hid2 -> unify' b1 b2 (Pi _ hid1 _ a1 b1, Pi _ hid2 _ a2 b2) | hid1 == hid2 -> unify' a1 a2 >> unify' b1 b2 (Sort _, Sort _) -> return () -- a bit sloppy (App _ _ (Var v) (NotM ALNil), _) | elem v (freevars e2) -> St.lift Nothing -- Occurs check (_, App _ _ (Var v) (NotM ALNil)) | elem v (freevars e1) -> St.lift Nothing -- Occurs check (App _ _ (Var v) (NotM ALNil), _) -> unifyVar v e2 (_, App _ _ (Var v) (NotM ALNil)) -> unifyVar v e1 _ -> St.lift Nothing notequal' e1 e2 = do (fstnew, nbnew) <- ask unifier <- get case (e1, e2) of (App _ _ elr1 es1, App _ _ elr2 es2) | elr1 == elr2 -> notequal' es1 es2 (_, App _ _ (Var v2) (NotM ALNil)) -- why is this not symmetric?! | fstnew <= v2 && v2 < fstnew + nbnew -> case lookup v2 unifier of Nothing -> modify ((v2, e1):) >> return False Just e2' -> notequal' e1 e2' {- GA: Skipped these: Not sure why we'd claim they're impossible (_, App _ _ (Var v2) (NotM ALProj{})) -> __IMPOSSIBLE__ (_, App _ _ (Var v2) (NotM ALConPar{})) -> __IMPOSSIBLE__ -} (App _ _ (Const c1) es1, App _ _ (Const c2) es2) -> do cd1 <- liftIO $ readIORef c1 cd2 <- liftIO $ readIORef c2 case (cdcont cd1, cdcont cd2) of (Constructor{}, Constructor{}) -> if c1 == c2 then notequal' es1 es2 else return True _ -> return False {- GA: Why don't we have a case for distinct heads after all these unification cases for vars with no spines & metas that can be looked up? (App _ _ elr1 _, App _ _ elr2 _) | elr1 <> elr2 -> return True -} _ -> return False instance Unify o (ArgList o) where unify' args1 args2 = case (args1, args2) of (ALNil, ALNil) -> pure () (ALCons hid1 a1 as1, ALCons hid2 a2 as2) | hid1 == hid2 -> unify' a1 a2 >> unify' as1 as2 (ALConPar as1, ALCons _ _ as2) -> unify' as1 as2 (ALCons _ _ as1, ALConPar as2) -> unify' as1 as2 (ALConPar as1, ALConPar as2) -> unify' as1 as2 _ -> St.lift Nothing notequal' args1 args2 = case (args1, args2) of (ALCons _ e es, ALCons _ f fs) -> notequal' e f `or2M` notequal' es fs (ALConPar es1, ALConPar es2) -> notequal' es1 es2 _ -> return False -- This definition is only here to respect the previous interface. unifyexp :: MExp o -> MExp o -> Maybe ([(Nat, MExp o)]) unifyexp e1 e2 = fmap (NotM <$>) <$> unify e1 e2 class Lift t where lift' :: Nat -> Nat -> t -> t lift :: Lift t => Nat -> t -> t lift 0 = id lift n = lift' n 0 instance Lift t => Lift (Abs t) where lift' n j (Abs mid b) = Abs mid (lift' n (j + 1) b) instance Lift t => Lift (MM t r) where lift' n j = NotM . lift' n j . rm __IMPOSSIBLE__ instance Lift (Exp o) where lift' n j e = case e of App uid ok elr args -> case elr of Var v | v >= j -> App uid ok (Var (v + n)) (lift' n j args) _ -> App uid ok elr (lift' n j args) Lam hid b -> Lam hid (lift' n j b) Pi uid hid possdep it b -> Pi uid hid possdep (lift' n j it) (lift' n j b) Sort{} -> e AbsurdLambda{} -> e instance Lift (ArgList o) where lift' n j args = case args of ALNil -> ALNil ALCons hid a as -> ALCons hid (lift' n j a) (lift' n j as) ALProj{} -> __IMPOSSIBLE__ ALConPar as -> ALConPar (lift' n j as) removevar :: CSCtx o -> MExp o -> [CSPat o] -> [(Nat, MExp o)] -> (CSCtx o, MExp o, [CSPat o]) removevar ctx tt pats [] = (ctx, tt, pats) removevar ctx tt pats ((v, e) : unif) = let e2 = replace v 0 __IMPOSSIBLE__ {- occurs check failed -} e thesub = replace v 0 e2 ctx1 = map (\(HI hid (id, t)) -> HI hid (id, thesub t)) (take v ctx) ++ map (\(HI hid (id, t)) -> HI hid (id, thesub t)) (drop (v + 1) ctx) tt' = thesub tt pats' = map (replacep v 0 (CSPatExp e2) e2) pats unif' = map (\(uv, ue) -> (if uv > v then uv - 1 else uv, thesub ue)) unif in removevar ctx1 tt' pats' unif' findperm :: [MExp o] -> Maybe [Nat] findperm ts = let frees = map freevars ts m = IntMap.fromList $ map (\i -> (i, length (filter (elem i) frees))) [0..length ts - 1] r _ perm 0 = Just $ reverse perm r m perm n = case lookup 0 (map swap (IntMap.toList m)) of Nothing -> Nothing Just i -> r (foldl (flip $ IntMap.adjust (subtract 1)) (IntMap.insert i (-1) m) (frees !! i)) (i : perm) (n - 1) in r m [] (length ts) freevars :: FreeVars t => t -> [Nat] freevars = Set.toList . freeVars applyperm :: [Nat] -> CSCtx o -> MExp o -> [CSPat o] -> (CSCtx o, MExp o, [CSPat o]) applyperm perm ctx tt pats = let ctx1 = map (\(HI hid (id, t)) -> HI hid (id, rename (ren perm) t)) ctx ctx2 = map (\i -> ctx1 !! i) perm ctx3 = seqctx ctx2 tt' = rename (ren perm) tt pats' = map (rename (ren perm)) pats in (ctx3, tt', pats') ren :: [Nat] -> Nat -> Int ren n i = let Just j = findIndex (== i) n in j instance Renaming t => Renaming (HI t) where renameOffset j ren (HI hid t) = HI hid $ renameOffset j ren t instance Renaming (CSPatI o) where renameOffset j ren e = case e of CSPatConApp c pats -> CSPatConApp c $ map (renameOffset j ren) pats CSPatVar i -> CSPatVar $ j + ren i CSPatExp e -> CSPatExp $ renameOffset j ren e CSOmittedArg -> e _ -> __IMPOSSIBLE__ seqctx :: CSCtx o -> CSCtx o seqctx = r (-1) where r _ [] = [] r n (HI hid (id, t) : ctx) = HI hid (id, lift n t) : r (n - 1) ctx -- -------------------- depthofvar :: Nat -> [CSPat o] -> Nat depthofvar v pats = let [depth] = concatMap (f 0) (drophid pats) f d (CSPatConApp _ pats) = concatMap (f (d + 1)) (drophid pats) f d (CSPatVar v') = if v == v' then [d] else [] f _ _ = [] in depth -- -------------------- -- | Speculation: Type class computing the size (?) of a pattern -- and collecting the vars it introduces class LocalTerminationEnv a where sizeAndBoundVars :: a -> (Sum Nat, [Nat]) instance LocalTerminationEnv a => LocalTerminationEnv (HI a) where sizeAndBoundVars (HI _ p) = sizeAndBoundVars p instance LocalTerminationEnv (CSPatI o) where sizeAndBoundVars p = case p of CSPatConApp _ ps -> (1, []) <> sizeAndBoundVars ps CSPatVar n -> (0, [n]) CSPatExp e -> sizeAndBoundVars e _ -> (0, []) instance LocalTerminationEnv a => LocalTerminationEnv [a] where sizeAndBoundVars = foldMap sizeAndBoundVars instance LocalTerminationEnv (MExp o) where -- sizeAndBoundVars e = case rm __IMPOSSIBLE__ e of -- GA: 2017 06 27: Not actually impossible! (cf. #2620) sizeAndBoundVars Meta{} = (0, []) -- Does this default behaviour even make sense? The catchall in the -- following match seems to suggest it does sizeAndBoundVars (NotM e) = case e of App _ _ (Var v) _ -> (0, [v]) App _ _ (Const _) args -> (1, []) <> sizeAndBoundVars args _ -> (0, []) instance (LocalTerminationEnv a, LocalTerminationEnv b) => LocalTerminationEnv (a, b) where sizeAndBoundVars (a, b) = sizeAndBoundVars a <> sizeAndBoundVars b instance LocalTerminationEnv (MArgList o) where sizeAndBoundVars as = case rm __IMPOSSIBLE__ as of ALNil -> (0, []) ALCons _ a as -> sizeAndBoundVars (a, as) ALProj{} -> __IMPOSSIBLE__ ALConPar as -> sizeAndBoundVars as -- | Take a list of patterns and returns (is, size, vars) where (speculation): --- * the is are the pattern indices the vars are contained in -- * size is total number of constructors removed (?) to access vars localTerminationEnv :: [CSPat o] -> ([Nat], Nat, [Nat]) localTerminationEnv pats = (is, getSum s, vs) where (is , s , vs) = g 0 pats g :: Nat -> [CSPat o] -> ([Nat], Sum Nat, [Nat]) g _ [] = ([], 0, []) g i (hp@(HI _ p) : ps) = case p of CSPatConApp{} -> let (size, vars) = sizeAndBoundVars hp in ([i], size, vars) <> g (i + 1) ps _ -> g (i + 1) ps localTerminationSidecond :: ([Nat], Nat, [Nat]) -> ConstRef o -> MExp o -> EE (MyPB o) localTerminationSidecond (is, size, vars) reccallc b = ok b where ok e = mmpcase (False, prioNo, Nothing) e $ \e -> case e of App _ _ elr args -> mpret $ Sidecondition (oks args) (case elr of Const c | c == reccallc -> if size == 0 then mpret (Error "localTerminationSidecond: no size to decrement") else okcall 0 size vars args _ -> mpret OK ) Lam _ (Abs _ e) -> ok e Pi _ _ _ it (Abs _ ot) -> mpret $ Sidecondition (ok it) (ok ot) Sort{} -> mpret OK AbsurdLambda{} -> mpret OK oks as = mmpcase (False, prioNo, Nothing) as $ \as -> case as of ALNil -> mpret OK ALCons _ a as -> mpret $ Sidecondition (ok a) (oks as) ALProj eas _ _ as -> mpret $ Sidecondition (oks eas) (oks as) ALConPar as -> oks as okcall i size vars as = mmpcase (False, prioNo, Nothing) as $ \as -> case as of ALNil -> mpret OK ALCons _ a as | elem i is -> mbpcase prioNo Nothing (he size vars a) $ \x -> case x of Nothing -> mpret $ Error "localTerminationSidecond: reccall not ok" Just (size', vars') -> okcall (i + 1) size' vars' as ALCons _ a as -> okcall (i + 1) size vars as ALProj{} -> mpret OK ALConPar as -> __IMPOSSIBLE__ he size vars e = mmcase e $ \e -> case e of App _ _ (Var v) _ -> case remove v vars of Nothing -> mbret Nothing Just vars' -> mbret $ Just (size, vars') App _ _ (Const c) args -> do cd <- readIORef c case cdcont cd of Constructor{} -> if size == 1 then mbret Nothing else hes (size - 1) vars args _ -> mbret Nothing _ -> mbret Nothing hes size vars as = mmcase as $ \as -> case as of ALNil -> mbret $ Just (size, vars) ALCons _ a as -> mbcase (he size vars a) $ \x -> case x of Nothing -> mbret Nothing Just (size', vars') -> hes size' vars' as ALProj{} -> __IMPOSSIBLE__ ALConPar as -> __IMPOSSIBLE__ remove _ [] = Nothing remove x (y : ys) | x == y = Just ys remove x (y : ys) = case remove x ys of {Nothing -> Nothing; Just ys' -> Just (y : ys')} -- --------------------------- getblks :: MExp o -> IO [Nat] getblks tt = do NotB (hntt, blks) <- hnn_blks (Clos [] tt) case f blks of Just v -> return [v] Nothing -> case rawValue hntt of HNApp (Const c) args -> do cd <- readIORef c case cdcont cd of Datatype{} -> g [] args _ -> return [] _ -> return [] where f blks = case blks of (_:_) -> case rawValue (last blks) of HNApp (Var v) _ -> Just v _ -> Nothing _ -> Nothing g vs args = do NotB hnargs <- hnarglist args case hnargs of HNALCons _ a as -> do NotB (_, blks) <- hnn_blks a let vs' = case f blks of Just v | v `notElem` vs -> v : vs _ -> vs g vs' as _ -> return vs -- --------------------------- Agda-2.6.0.1/src/full/Agda/Auto/Typecheck.hs0000644000000000000000000007636713466402171016477 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Auto.Typecheck where import Data.IORef import Control.Monad (liftM) import Agda.Syntax.Common (Hiding (..)) import Agda.Auto.NarrowingSearch import Agda.Auto.Syntax import Agda.Auto.SearchControl #include "undefined.h" import Agda.Utils.Impossible -- --------------------------------- -- | Typechecker drives the solution of metas. tcExp :: Bool -> Ctx o -> CExp o -> MExp o -> EE (MyPB o) tcExp isdep ctx typ@(TrBr typtrs ityp@(Clos _ itypexp)) trm = mbpcase prioTypeUnknown Nothing (hnn_checkstep ityp) $ \(hntyp, iotastepdone) -> mmpcase (True, prioTypecheck isdep, Just (RIMainInfo (length ctx) hntyp iotastepdone)) trm $ \trm -> case trm of App _ okh elr args -> case rawValue hntyp of HNPi{} | isdep -> mpret $ Error "tcExp, dep terms should be eta-long" _ -> do (ityp, sc) <- case elr of Var v -> -- assuming within scope return (weak (v + 1) (snd $ ctx !! v), id) Const c -> do cdef <- readIORef c return (closify (cdtype cdef), \x -> mpret $ And (Just [Term args]) (noiotastep_term c args) x) ndfv <- case elr of Var{} -> return 0 Const c -> readIORef c >>= \cd -> return (cddeffreevars cd) isconstructor <- case elr of Var{} -> return False Const c -> do cdef <- readIORef c return $ case cdcont cdef of {Constructor{} -> True; _ -> False} sc $ tcargs ndfv isdep ctx ityp args (NotM $ App Nothing (NotM OKVal) elr (NotM ALNil)) isconstructor $ \ityp _ -> mpret $ ConnectHandle okh (comp' True typ ityp) Lam hid (Abs id1 b) -> case rawValue hntyp of HNPi hid2 _ it (Abs id2 ot) | hid == hid2 -> tcExp isdep ((pickid id1 id2, t it) : ctx) (t ot) b _ -> mpret $ Error "tcExp, type of lam should be fun or pi (and same hid)" Pi _ _ _ it (Abs id ot) -> case rawValue hntyp of HNSort s -> mpret $ And (Just [Term ctx, Term it]) (tcExp True ctx (closify (NotM $ Sort s)) it) (tcExp isdep ((id, closify it) : ctx) (closify (NotM $ Sort s)) ot) _ -> mpret $ Error "tcExp, type of pi should be set" Sort (Set i) -> case rawValue hntyp of HNSort s2 -> case s2 of Set j -> mpret $ if i < j then OK else Error "tcExp, type of set should be larger set" UnknownSort -> mpret OK -- mpret $ Error "tcExp, type of set i unknown sort" -- OK instead? (prev __IMPOSSIBLE__) Type -> mpret OK _ -> mpret $ Error "tcExp, type of set should be set" Sort UnknownSort -> __IMPOSSIBLE__ Sort Type -> __IMPOSSIBLE__ AbsurdLambda hid -> case rawValue hntyp of HNPi hid2 _ it _ | hid == hid2 -> mbpcase prioAbsurdLambda Nothing (getDatatype it) $ \res -> case res of Just (indeces, cons) -> foldl (\p con -> mpret $ And Nothing p ( constructorImpossible indeces con )) (mpret OK) cons Nothing -> mpret $ Error "tcExp, absurd lambda, datatype needed" _ -> mpret $ Error "tcExp, type of absurd lam should be fun or pi (and same hid)" where t = TrBr typtrs getDatatype :: ICExp o -> EE (MyMB (Maybe (ICArgList o, [ConstRef o])) o) getDatatype t = mbcase (hnn t) $ \hnt -> case rawValue hnt of HNApp (Const c) args -> do cd <- readIORef c case cdcont cd of Datatype cons _ -> mbret $ Just (args, cons) -- ?? check that lenth args corresponds to type of datatype _ -> mbret Nothing _ -> mbret Nothing constructorImpossible :: ICArgList o -> ConstRef o -> EE (MyPB o) constructorImpossible args c = do cd <- readIORef c mbpcase prioAbsurdLambda Nothing (traversePi (-1) (Clos [] $ cdtype cd)) $ \hnot -> case rawValue hnot of HNApp _ args2 -> unequals args args2 (\_ -> mpret $ Error "not unequal") [] _ -> mpret $ Error "constructorImpossible 1" unequals :: ICArgList o -> ICArgList o -> ([(Nat, HNExp o)] -> EE (MyPB o)) -> [(Nat, HNExp o)] -> EE (MyPB o) unequals es1 es2 cont unifier2 = mbpcase prioAbsurdLambda Nothing (hnarglist es1) $ \hnes1 -> mbpcase prioAbsurdLambda Nothing (hnarglist es2) $ \hnes2 -> case (hnes1, hnes2) of (HNALCons _ e1 es1, HNALCons _ e2 es2) -> unequal e1 e2 (unequals es1 es2 cont) unifier2 (HNALConPar es1, HNALConPar es2) -> unequals es1 es2 cont unifier2 _ -> cont unifier2 unequal :: ICExp o -> ICExp o -> ([(Nat, HNExp o)] -> EE (MyPB o)) -> [(Nat, HNExp o)] -> EE (MyPB o) unequal e1 e2 cont unifier2 = mbpcase prioAbsurdLambda Nothing (hnn e1) $ \hne1 -> mbpcase prioAbsurdLambda Nothing (hnn e2) $ \hne2 -> case rawValue hne2 of HNApp (Var v2) es2 | v2 < 0 -> mbpcase prioAbsurdLambda Nothing (hnarglist es2) $ \hnes2 -> case hnes2 of HNALNil -> case lookup v2 unifier2 of Nothing -> cont ((v2, hne1) : unifier2) Just hne2' -> cc hne1 hne2' HNALCons{} -> cont unifier2 HNALConPar{} -> __IMPOSSIBLE__ _ -> cc hne1 hne2 where cc hne1 hne2 = case (rawValue hne1, rawValue hne2) of (HNApp (Const c1) es1, HNApp (Const c2) es2) -> do cd1 <- readIORef c1 cd2 <- readIORef c2 case (cdcont cd1, cdcont cd2) of (Constructor{}, Constructor{}) -> if c1 == c2 then unequals es1 es2 cont unifier2 else mpret OK _ -> cont unifier2 _ -> cont unifier2 traversePi :: Int -> ICExp o -> EE (MyMB (HNExp o) o) traversePi v t = mbcase (hnn t) $ \hnt -> case rawValue hnt of HNPi _ _ _ (Abs _ ot) -> traversePi (v - 1) $ subi (NotM $ App Nothing (NotM OKVal) (Var v) (NotM ALNil)) ot _ -> mbret hnt tcargs :: Nat -> Bool -> Ctx o -> CExp o -> MArgList o -> MExp o -> Bool -> (CExp o -> MExp o -> EE (MyPB o)) -> EE (MyPB o) tcargs ndfv isdep ctx ityp@(TrBr ityptrs iityp) args elimtrm isconstructor cont = mmpcase (True, prioTypecheckArgList, (Just $ RICheckElim $ isdep || isconstructor)) args $ \args' -> case args' of ALNil -> cont ityp elimtrm ALCons hid a as -> mbpcase prioInferredTypeUnknown (Just RIInferredTypeUnknown) (hnn iityp) $ \hnityp -> case rawValue hnityp of HNPi hid2 possdep it (Abs _ ot) | ndfv > 0 || copyarg a || hid == hid2 -> mpret $ And (Just ((if possdep then [Term a] else []) ++ [Term ctx, Term ityptrs])) (if ndfv > 0 then mpret OK else (tcExp (isdep || possdep) ctx (t it) a)) (tcargs (ndfv - 1) isdep ctx (sub a (t ot)) as (addend hid a elimtrm) isconstructor cont) _ -> mpret $ Error "tcargs, inf type should be fun or pi (and same hid)" ALProj{} | ndfv > 0 -> __IMPOSSIBLE__ ALProj preas projidx hid as -> mbpcase prioInferredTypeUnknown (Just RIInferredTypeUnknown) (hnn iityp) $ \hnityp -> case rawValue hnityp of HNApp (Const dd) _ -> do dddef <- readIORef dd case cdcont dddef of Datatype _ projs -> mmpcase (True, prioProjIndex, Just (RICheckProjIndex projs)) projidx $ \projidx -> do projd <- readIORef projidx tcargs (cddeffreevars projd) isdep ctx (closify $ cdtype projd) preas (NotM $ App Nothing (NotM OKVal) (Const projidx) (NotM ALNil)) True $ \ityp2@(TrBr ityp2trs iityp2) elimtrm2 -> case iityp2 of Clos _ (NotM (Pi _ _ _ (NotM (App _ _ (Const dd2) _)) _)) | dd2 == dd -> mbpcase prioInferredTypeUnknown (Just RIInferredTypeUnknown) (hnn iityp2) $ \hnityp2 -> case rawValue hnityp2 of HNPi hid2 possdep it (Abs _ ot) | hid == hid2 -> mpret $ And Nothing (comp' True (TrBr ityp2trs it) ityp) (tcargs 0 isdep ctx (sub elimtrm (t ot)) as (addend hid elimtrm elimtrm2) isconstructor cont) _ -> mpret $ Error "proj function type is not a Pi" _ -> mpret $ Error "proj function type is not correct" _ -> mpret $ Error "proj, not a datatype" _ -> mpret $ Error "proj, not a const app" ALConPar _ -> __IMPOSSIBLE__ where t = TrBr ityptrs addend :: Hiding -> MExp o -> MM (Exp o) blk -> MM (Exp o) blk addend hid a (NotM (App uid okh elr as)) = NotM $ App uid okh elr (f as) where f (NotM ALNil) = NotM $ ALCons hid a (NotM $ ALNil) f (NotM (ALCons hid a as)) = NotM $ ALCons hid a (f as) f _ = __IMPOSSIBLE__ addend _ _ _ = __IMPOSSIBLE__ copyarg :: MExp o -> Bool copyarg _ = False -- --------------------------------- type HNNBlks o = [HNExp o] noblks :: HNNBlks o noblks = [] addblk :: HNExp o -> HNNBlks o -> HNNBlks o addblk = (:) hnn :: ICExp o -> EE (MyMB (HNExp o) o) hnn e = mbcase (hnn_blks e) $ \(hne, _) -> mbret hne hnn_blks :: ICExp o -> EE (MyMB (HNExp o, HNNBlks o) o) hnn_blks e = hnn' e CALNil hnn_checkstep :: ICExp o -> EE (MyMB (HNExp o, Bool) o) hnn_checkstep e = mbcase (hnb e CALNil) $ \hne -> mbcase (iotastep True hne) $ \res -> case res of Right _ -> mbret (hne, False) Left (e, as) -> mbcase (hnn' e as) $ \(hne, _) -> mbret (hne, True) hnn' :: ICExp o -> ICArgList o -> EE (MyMB (HNExp o, HNNBlks o) o) hnn' e as = mbcase (hnb e as) $ \hne -> mbcase (iotastep True hne) $ \res -> case res of Right blks -> mbret (hne, blks) Left (e, as) -> hnn' e as hnb :: ICExp o -> ICArgList o -> EE (MyMB (HNExp o) o) hnb e as = mbcase (hnc False e as []) $ \res -> case res of HNDone _ hne -> mbret hne HNMeta{} -> __IMPOSSIBLE__ data HNRes o = HNDone (Maybe (Metavar (Exp o) (RefInfo o))) (HNExp o) | HNMeta (ICExp o) (ICArgList o) [Maybe (UId o)] hnc :: Bool -> ICExp o -> ICArgList o -> [Maybe (UId o)] -> EE (MyMB (HNRes o) o) hnc haltmeta = loop where loop ce@(Clos cl e) cargs seenuids = (if haltmeta then mmmcase e (mbret $ HNMeta ce cargs seenuids) else mmcase e) $ \ee -> case ee of App uid okh elr args -> let ncargs = CALConcat (Clos cl args) cargs in case elr of Var v -> case doclos cl v of Left v' -> mbret $ HNDone expmeta $ WithSeenUIds (uid : seenuids) $ HNApp (Var v') ncargs Right f -> loop f ncargs (uid : seenuids) Const _ -> mbret $ HNDone expmeta $ WithSeenUIds (uid : seenuids) $ HNApp elr ncargs Lam hid (Abs id b) -> mbcase (hnarglist cargs) $ \hncargs -> case hncargs of HNALNil -> mbret $ HNDone expmeta $ WithSeenUIds seenuids $ HNLam hid (Abs id (Clos (Skip : cl) b)) HNALCons _ arg cargs' -> loop (Clos (Sub arg : cl) b) cargs' seenuids HNALConPar{} -> __IMPOSSIBLE__ Pi uid hid possdep it (Abs id ot) -> checkNoArgs cargs $ mbret $ HNDone expmeta $ WithSeenUIds (uid : seenuids) $ HNPi hid possdep (Clos cl it) (Abs id (Clos (Skip : cl) ot)) Sort s -> checkNoArgs cargs $ mbret $ HNDone expmeta $ WithSeenUIds [] $ HNSort s AbsurdLambda{} -> mbfailed "hnc: encountered absurdlambda" where expmeta = case e of {Meta m -> Just m; NotM _ -> Nothing} checkNoArgs cargs c = mbcase (hnarglist cargs) $ \hncargs -> case hncargs of HNALNil -> c HNALCons{} -> mbfailed "hnc: there should be no args" HNALConPar{} -> __IMPOSSIBLE__ hnarglist :: ICArgList o -> EE (MyMB (HNArgList o) o) hnarglist args = case args of CALNil -> mbret HNALNil CALConcat (Clos cl args) args2 -> mmcase args $ \args -> case args of ALNil -> hnarglist args2 ALCons hid arg argsb -> mbret $ HNALCons hid (Clos cl arg) (CALConcat (Clos cl argsb) args2) ALProj{} -> mbret HNALNil -- dirty hack to make check of no-iota in term work ALConPar args -> mbret $ HNALConPar (CALConcat (Clos cl args) args2) -- ----------------------------- getNArgs :: Nat -> ICArgList o -> EE (MyMB (Maybe ([ICExp o], ICArgList o)) o) getNArgs 0 args = mbret $ Just ([], args) getNArgs narg args = mbcase (hnarglist args) $ \hnargs -> case hnargs of HNALNil -> mbret Nothing HNALCons _ arg args' -> mbcase (getNArgs (narg - 1) args') $ \res -> case res of Nothing -> mbret Nothing Just (pargs, rargs) -> mbret $ Just (arg : pargs, rargs) HNALConPar{} -> __IMPOSSIBLE__ getAllArgs :: ICArgList o -> EE (MyMB [ICExp o] o) getAllArgs args = mbcase (hnarglist args) $ \hnargs -> case hnargs of HNALNil -> mbret [] HNALCons _ arg args' -> mbcase (getAllArgs args') $ \args'' -> mbret (arg : args'') HNALConPar args2 -> mbcase (getAllArgs args2) $ \args3 -> mbret (__IMPOSSIBLE__ : args3) data PEval o = PENo (ICExp o) | PEConApp (ICExp o) (ConstRef o) [PEval o] iotastep :: Bool -> HNExp o -> EE (MyMB (Either (ICExp o, ICArgList o) (HNNBlks o)) o) iotastep smartcheck e = case rawValue e of HNApp (Const c) args -> do cd <- readIORef c case cdcont cd of Def narg cls _ _ -> mbcase (getNArgs narg args) $ \res -> case res of Nothing -> mbret (Right noblks) Just (pargs, rargs) -> mbcase (dorules cls (map PENo pargs)) $ \res -> case res of Right blks -> mbret (Right blks) Left rhs -> mbret $ Left (rhs, rargs) _ -> mbret $ Right noblks _ -> mbret $ Right noblks where dorules :: [Clause o] -> [PEval o] -> EE (MyMB (Either (ICExp o) (HNNBlks o)) o) dorules [] _ = mbret $ Right noblks dorules (rule:rules') as = mbcase (dorule rule as) $ \x -> case x of Left (Left as') -> dorules rules' as' Left (Right blks) -> mbret (Right blks) Right rhs -> mbret $ Left rhs dorule :: Clause o -> [PEval o] -> EE (MyMB (Either (Either [PEval o] (HNNBlks o)) (ICExp o)) o) dorule (pats, rhs) as = mbcase (dopats pats as) $ \x -> case x of Right (_, ss) -> mbret $ Right (Clos (map Sub ss) rhs) Left hnas -> mbret $ Left hnas dopats :: [Pat o] -> [PEval o] -> EE (MyMB (Either (Either [PEval o] (HNNBlks o)) ([PEval o], [ICExp o])) o) dopats [] [] = mbret $ Right ([], []) dopats (p:ps') (a:as') = mbcase (dopat p a) $ \x -> case x of Right (hna, ss) -> mbcase (dopats ps' as') $ \x -> case x of Right (hnas, ss2) -> mbret $ Right (hna : hnas, ss2 ++ ss) Left (Right blks) -> mbret $ Left (Right blks) Left (Left hnas) -> mbret $ Left $ Left (hna : hnas) Left (Right blks) -> mbret $ Left (Right blks) Left (Left hna) -> mbret $ Left $ Left (hna : as') dopats _ _ = mbfailed "bad patterns" dopat :: Pat o -> PEval o -> EE (MyMB (Either (Either (PEval o) (HNNBlks o)) (PEval o, [ICExp o])) o) dopat (PatConApp c pas) a = case a of PENo a -> if smartcheck then mbcase (meta_not_constructor a) $ \notcon -> if notcon then mbret $ Left $ Right noblks else qq -- to know more often if iota step is possible else qq where qq = mbcase (hnn_blks a) $ \(hna, blks) -> case rawValue hna of HNApp (Const c') as -> if c == c' then mbcase (getAllArgs as) $ \as' -> if length as' == length pas then mbcase (dopats pas (map PENo as')) $ \x -> case x of Right (hnas, ss) -> mbret $ Right (PEConApp a c' hnas, ss) Left (Right blks) -> mbret $ Left (Right blks) Left (Left hnas) -> mbret $ Left $ Left (PEConApp a c' hnas) else mbfailed "dopat: wrong amount of args" else do cd <- readIORef c' case cdcont cd of Constructor{} -> mbcase (getAllArgs as) $ \as' -> mbret $ Left (Left (PEConApp a c' (map PENo as'))) _ -> mbret $ Left (Right (addblk hna blks)) _ -> mbret $ Left (Right (addblk hna blks)) aa@(PEConApp a c' as) -> if c == c' then if length as == length pas then mbcase (dopats pas as) $ \x -> case x of Right (hnas, ss) -> mbret $ Right (PEConApp a c' hnas, ss) Left (Right blks) -> mbret $ Left (Right blks) Left (Left hnas) -> mbret $ Left $ Left (PEConApp a c' hnas) else mbfailed "dopat: wrong amount of args" else mbret $ Left (Left aa) dopat PatVar{} a@(PENo a') = mbret $ Right (a, [a']) dopat PatVar{} a@(PEConApp a' _ _) = mbret $ Right (a, [a']) dopat PatExp a = mbret $ Right (a, []) -- ----------------------------- noiotastep :: HNExp o -> EE (MyPB o) noiotastep hne = mbpcase prioNoIota Nothing (iotastep False hne) $ \res -> case res of Left _ -> mpret $ Error "iota step possible contrary to assumed" Right _ -> mpret OK noiotastep_term :: ConstRef o -> MArgList o -> EE (MyPB o) noiotastep_term c args = do cd <- readIORef c case cdcont cd of Def _ [(pats, _)] _ _ -> mpret OK -- all (\pat -> case pat of {PatConApp{} -> False; _ -> True}) pats _ -> noiotastep $ WithSeenUIds [] $ HNApp (Const c) $ CALConcat (Clos [] args) CALNil data CMode o = CMRigid (Maybe (Metavar (Exp o) (RefInfo o))) (HNExp o) | forall b . Refinable b (RefInfo o) => CMFlex (MM b (RefInfo o)) (CMFlex o) data CMFlex o = CMFFlex (ICExp o) (ICArgList o) [Maybe (UId o)] | CMFSemi (Maybe (Metavar (Exp o) (RefInfo o))) (HNExp o) | CMFBlocked (Maybe (Metavar (Exp o) (RefInfo o))) (HNExp o) comp' :: forall o . Bool -> CExp o -> CExp o -> EE (MyPB o) comp' ineq lhs@(TrBr trs1 e1) rhs@(TrBr trs2 e2) = comp ineq e1 e2 where comp :: Bool -> ICExp o -> ICExp o -> EE (MyPB o) comp ineq e1 e2 = proc e1 e2 where proc e1 e2 = f True e1 CALNil [] $ \res1 -> f True e2 CALNil [] $ \res2 -> g res1 res2 f semifok e as seenuids cont = mbpcase prioCompBeta Nothing (hnc True e as seenuids) $ \res -> case res of HNDone mexpmeta hne -> fhn semifok mexpmeta hne cont HNMeta ce@(Clos cl m) cargs seenuids -> do b1 <- boringClos cl b2 <- boringArgs cargs if b1 && b2 then cont $ CMFlex m (CMFFlex ce cargs seenuids) else mbpcase prioCompBetaStructured Nothing (hnc False ce cargs seenuids) $ \res -> case res of HNDone mexpmeta hne -> cont $ CMFlex m (CMFBlocked mexpmeta hne) HNMeta{} -> __IMPOSSIBLE__ fhn semifok mexpmeta hne cont = mmbpcase (iotastep True hne) (\m -> do sf <- return False {- semiflex hne -} if semifok && sf then cont (CMFlex m (CMFSemi mexpmeta hne)) else cont (CMFlex m (CMFBlocked mexpmeta hne)) ) (\res -> case res of Right _ -> cont (CMRigid mexpmeta hne) Left (e, as) -> f semifok e as [] cont ) g res1 res2 = case (res1, res2) of (CMRigid mexpmeta1 hne1, CMRigid mexpmeta2 hne2) -> comphn ineq mexpmeta1 hne1 mexpmeta2 hne2 (CMFlex m1 (CMFBlocked mexpmeta1 hne1), _) -> mstp False mexpmeta1 hne1 $ \res1 -> g res1 res2 (_, CMFlex m2 (CMFBlocked mexpmeta2 hne2)) -> mstp False mexpmeta2 hne2 $ \res2 -> g res1 res2 (CMRigid mexpmeta1 hne1, CMFlex _ fl2) -> unif True mexpmeta1 hne1 fl2 (CMFlex _ fl1, CMRigid mexpmeta2 hne2) -> unif False mexpmeta2 hne2 fl1 (CMFlex m1 fl1, CMFlex m2 fl2) -> doubleblock m1 m2 $ fcm fl1 $ \res1 -> fcm fl2 $ \res2 -> g res1 res2 fcm (CMFFlex ce cargs seenuids) = f True ce cargs seenuids fcm (CMFSemi mexpmeta hne) = fhn True mexpmeta hne fcm (CMFBlocked _ hne) = __IMPOSSIBLE__ -- not used. if so should be: fhn False hne mstp semif mexpmeta hne cont = mpret $ Or prioCompChoice (mpret $ And (Just [Term lhs, Term rhs]) (noiotastep hne) (cont (CMRigid mexpmeta hne)) ) (stp semif hne cont) stp semif hne cont = mbpcase prioCompIota (Just $ RIIotaStep semif) (iotastep True hne) $ \res -> case res of Right _ -> mpret $ Error "no iota step possible, contrary to assumed" Left (e, as) -> f semif e as [] cont unif oppis1 oppmexpmeta opphne res = let iter res = if oppis1 then g (CMRigid oppmexpmeta opphne) res else g res (CMRigid oppmexpmeta opphne) in case res of CMFFlex ce cargs seenuids -> do poss <- iotapossmeta ce cargs maybeor poss prioCompChoice (loop ce cargs seenuids) -- (mbpcase prioCompBeta (Just $ RIIotaStep False) (hnb ce cargs) $ \hne -> (mbpcase prioCompBeta (Just $ RIIotaStep False) (hnc False ce cargs seenuids) $ \res -> -- RIIotaStep here on beta-norm to make cost high when guessing elim const in type par case res of HNDone mexpmeta hne -> stp False hne iter HNMeta{} -> __IMPOSSIBLE__ ) where loop ce@(Clos cl m) cargs seenuids = mmpcase (False, prioCompUnif, Just (RIUnifInfo cl opphne)) m $ \_ -> mbpcase prioCompBeta Nothing (hnc True ce cargs seenuids) $ \res -> case res of HNDone mexpmeta hne -> mpret $ And (Just [Term lhs, Term rhs]) (noiotastep hne) (iter (CMRigid mexpmeta hne)) HNMeta ce cargs seenuids -> loop ce cargs seenuids CMFSemi _ hne -> __IMPOSSIBLE__ -- CMFSemi disabled, if used should be: stp True hne iter CMFBlocked{} -> __IMPOSSIBLE__ comphn :: Bool -> Maybe (Metavar (Exp o) (RefInfo o)) -> HNExp o -> Maybe (Metavar (Exp o) (RefInfo o)) -> HNExp o -> EE (MyPB o) comphn ineq mexpmeta1 hne1 mexpmeta2 hne2 = case (rawValue hne1, rawValue hne2) of (HNApp elr1 args1, HNApp elr2 args2) -> let ce = case (elr1, elr2) of (Var v1, Var v2) -> if v1 == v2 then Nothing else Just "comphn, elr, vars not equal" (Const c1, Const c2) -> if c1 == c2 then Nothing else Just "comphn, elr, consts not equal" (_, _) -> Just "comphn, elrs not equal" in case ce of Nothing -> compargs args1 args2 Just msg -> mpret $ Error msg (HNLam hid1 (Abs id1 b1), HNLam hid2 (Abs id2 b2)) -> comp False b1 b2 (HNLam _ (Abs _ b1), HNApp elr2 args2) -> f True b1 CALNil (seenUIds hne1) $ \res1 -> fhn True mexpmeta2 (WithSeenUIds (seenUIds hne2) $ HNApp (weak 1 elr2) (addtrailingargs (Clos [] $ NotM $ ALCons NotHidden{- arbitrary -} (NotM $ App Nothing (NotM OKVal) (Var 0) (NotM ALNil)) (NotM ALNil)) (weak 1 args2))) $ \res2 -> g res1 res2 (HNApp elr1 args1, HNLam _ (Abs _ b2)) -> fhn True mexpmeta1 (WithSeenUIds (seenUIds hne1) $ HNApp (weak 1 elr1) (addtrailingargs (Clos [] $ NotM $ ALCons NotHidden{- arbitrary -} (NotM $ App Nothing (NotM OKVal) (Var 0) (NotM ALNil)) (NotM ALNil)) (weak 1 args1))) $ \res1 -> f True b2 CALNil (seenUIds hne2) $ \res2 -> g res1 res2 {- (HNLam _ (Abs _ b1), HNApp uid2 elr2 args2) -> f True b1 CALNil $ \res1 -> g res1 (CMRigid mexpmeta2 (HNApp uid2 (weak 1 elr2) (addtrailingargs (Clos [] $ NotM $ ALCons NotHidden{- arbitrary -} (NotM $ App Nothing (NotM OKVal) (Var 0) (NotM ALNil)) (NotM ALNil)) (weak 1 args2)))) (HNApp uid1 elr1 args1, HNLam _ (Abs _ b2)) -> f True b2 CALNil $ \res2 -> g (CMRigid mexpmeta1 (HNApp uid1 (weak 1 elr1) (addtrailingargs (Clos [] $ NotM $ ALCons NotHidden{- arbitrary -} (NotM $ App Nothing (NotM OKVal) (Var 0) (NotM ALNil)) (NotM ALNil)) (weak 1 args1)))) res2 -} (HNPi hid1 _ it1 (Abs id1 ot1), HNPi hid2 _ it2 (Abs id2 ot2)) -> mpret $ And (Just [Term trs1, Term trs2]) (comp False it1 it2) (comp ineq ot1 ot2) (HNSort s1, HNSort s2) -> mpret $ case (s1, s2) of (Set i1, Set i2) -> if i1 == i2 || ineq && i1 > i2 then OK else Error "comphn, set levels not matching" (Set _, UnknownSort) -> OK (UnknownSort, Set _) -> OK (UnknownSort, UnknownSort) -> OK (Type, Set _) | ineq -> OK (Type, UnknownSort) | ineq -> OK _ -> __IMPOSSIBLE__ (HNApp (Const c1) _, _) -> case mexpmeta2 of Nothing -> mpret $ Error "comphn, not equal (2)" Just m2 -> mpret $ AddExtraRef "comphn: not equal, adding extra ref" m2 (extraref m2 (seenUIds hne1) c1) (_, HNApp (Const c2) _) -> case mexpmeta1 of Nothing -> mpret $ Error "comphn, not equal (3)" Just m1 -> mpret $ AddExtraRef "comphn: not equal, adding extra ref" m1 (extraref m1 (seenUIds hne2) c2) (_, _) -> mpret $ Error "comphn, not equal" compargs :: ICArgList o -> ICArgList o -> EE (MyPB o) compargs args1 args2 = mbpcase prioCompareArgList Nothing (hnarglist args1) $ \hnargs1 -> mbpcase prioCompareArgList Nothing (hnarglist args2) $ \hnargs2 -> case (hnargs1, hnargs2) of (HNALNil, HNALNil) -> mpret OK (HNALCons hid1 arg1 args1b, HNALCons hid2 arg2 args2b) -> mpret $ And (Just [Term trs1, Term trs2]) (comp False arg1 arg2) (compargs args1b args2b) (HNALConPar args1b, HNALCons _ _ args2b) -> compargs args1b args2b (HNALCons _ _ args1b, HNALConPar args2b) -> compargs args1b args2b (HNALConPar args1', HNALConPar args2') -> compargs args1' args2' (_, _) -> mpret $ Error $ "comphnargs, not equal" boringExp :: ICExp o -> EE Bool boringExp (Clos cl e) = do e <- expandbind e case e of Meta{} -> boringClos cl NotM e -> case e of App _ _ (Var v) as -> do as <- expandbind as case as of Meta{} -> return False NotM as -> case as of ALNil -> case doclos cl v of Left _ -> return True Right e -> boringExp e ALCons{} -> return False ALProj{} -> return False ALConPar{} -> return False _ -> return False boringClos :: [CAction o] -> EE Bool boringClos cl = liftM (all id) $ mapM f cl where f (Sub e) = boringExp e f Skip = return True f (Weak _) = return True boringArgs :: ICArgList o -> EE Bool boringArgs CALNil = return True boringArgs (CALConcat (Clos cl as) as2) = do b1 <- f cl as b2 <- boringArgs as2 return $ b1 && b2 where f cl as = do as <- expandbind as case as of Meta{} -> return False NotM as -> case as of ALNil -> return True ALCons _ a as -> do b1 <- boringExp (Clos cl a) b2 <- f cl as return $ b1 && b2 ALProj{} -> return False -- Not impossible: #2966 ALConPar as -> f cl as -- --------------------------------- checkeliminand :: MExp o -> EE (MyPB o) checkeliminand = f [] [] where f uids used e = mmpcase (False, prioNo, Just (RIUsedVars uids used)) e $ \e -> case e of App uid _ elr@(Var{}) args -> fs (adduid uid uids) (elr : used) args App uid _ elr@(Const c) args -> do cd <- readIORef c case cdcont cd of Def _ _ (Just i) _ -> mpret $ Sidecondition (fs (adduid uid uids) (elr : used) args) (g i args) where g i as = mmpcase (False, prioNo, Nothing) as $ \as -> case as of ALNil -> mpret OK ALCons _ a as -> case i of 0 -> mmpcase (False, prioNo, Just RINotConstructor) a $ \_ -> mpret OK _ -> g (i - 1) as ALProj eas _ _ as -> mpret OK ALConPar as -> case i of 0 -> __IMPOSSIBLE__ _ -> g (i - 1) as _ -> fs (adduid uid uids) (elr : used) args Lam _ (Abs _ e) -> f uids (w used) e Pi uid _ _ e1 (Abs _ e2) -> mpret $ Sidecondition (f (adduid uid uids) used e1) (f (adduid uid uids) (w used) e2) Sort _ -> mpret OK AbsurdLambda{} -> mpret OK fs uids used as = mmpcase (False, prioNo, Nothing) as $ \as -> case as of ALNil -> mpret OK ALCons _ a as -> mpret $ Sidecondition (f uids used a) (fs uids used as) ALProj eas _ _ as -> mpret $ Sidecondition (fs uids used eas) (fs uids used as) ALConPar as -> fs uids used as w = map (\x -> case x of {Var v -> Var (v + 1); Const{} -> x}) adduid (Just uid) uids = uid : uids adduid Nothing uids = uids -- --------------------------------- maybeor :: Bool -> Prio -> IO (PB (RefInfo o)) -> IO (PB (RefInfo o)) -> IO (PB (RefInfo o)) maybeor _ _ mainalt _ = mainalt iotapossmeta :: ICExp o -> ICArgList o -> EE Bool iotapossmeta ce@(Clos cl _) cargs = do xs <- mapM ncaction cl y <- nccargs cargs return $ not (all id xs && y) where ncaction (Sub ce) = nonconstructor ce ncaction Skip = return True ncaction (Weak{}) = return True nccargs CALNil = return True nccargs (CALConcat (Clos cl margs) cargs) = do x <- ncmargs cl margs y <- nccargs cargs return $ x && y ncmargs cl (Meta m) = do mb <- readIORef (mbind m) case mb of Nothing -> return False Just x -> ncargs cl x ncmargs cl (NotM args) = ncargs cl args ncargs cl ALNil = return True ncargs cl (ALCons _ a args) = do x <- nonconstructor (Clos cl a) y <- ncmargs cl args return $ x && y ncargs _ (ALProj{}) = __IMPOSSIBLE__ ncargs cl (ALConPar args) = ncmargs cl args nonconstructor :: ICExp o -> EE Bool nonconstructor ce = do res <- hnc True ce CALNil [] case res of Blocked{} -> return False Failed{} -> return False NotB res -> case res of HNMeta ce _ _ -> do let (Clos _ (Meta m)) = ce infos <- extractblkinfos m if any (\info -> case info of {RINotConstructor -> True; _ -> False}) infos then do return True else return False -- return False -- return True -- ?? removes completeness - Yes, in DavidW1.additionRight HNDone{} -> do res <- hnn ce case res of NotB hne -> case rawValue hne of HNApp (Const c) _ -> do cd <- readIORef c case cdcont cd of Constructor{} -> return False _ -> return True _ -> return True Blocked m _ -> return False -- not necessary to do check here because already done by hnn (!! if it's known that m stands for an eliminator then it cannot be constructor so True instead) Failed _ -> return False meta_not_constructor :: ICExp o -> EE (MB Bool (RefInfo o)) meta_not_constructor a = mbcase (hnc True a CALNil []) $ \res -> case res of HNMeta ce _ _ -> do let (Clos _ (Meta m)) = ce infos <- extractblkinfos m if any (\info -> case info of {RINotConstructor -> True; _ -> False}) infos then do b <- iotapossmeta ce CALNil mbret $ not b else mbret False HNDone{} -> mbret False -- --------------------------------- calcEqRState :: EqReasoningConsts o -> MExp o -> EE (MyPB o) calcEqRState cs = f EqRSNone where f s e = mmpcase (False, prioNo, Just (RIEqRState s)) e $ \e -> case e of App _ _ (Const c) args -> case () of _ | c == eqrcBegin cs -> fs [EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSChain] args _ | c == eqrcStep cs -> fs [EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSPrf1, EqRSChain] args _ | c == eqrcSym cs -> fs [EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSPrf2] args _ | c == eqrcCong cs -> fs [EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSNone, EqRSPrf3] args _ -> fs [] args App _ _ (Var{}) args -> fs [] args Lam _ (Abs _ b) -> f EqRSNone b Pi _ _ _ it (Abs _ ot) -> mpret $ Sidecondition (f EqRSNone it) (f EqRSNone ot) Sort{} -> mpret OK AbsurdLambda{} -> mpret OK fs ss args = mmpcase (False, prioNo, Nothing) args $ \args -> case (ss, args) of (_, ALNil) -> mpret OK (s : ss, ALCons _ a args) -> mpret $ Sidecondition (f s a) (fs ss args) ([], ALCons _ a args) -> mpret $ Sidecondition (f EqRSNone a) (fs [] args) (_, ALProj eas _ _ as) -> mpret $ Sidecondition (fs [] eas) (fs [] as) -- when eqr-hint is given manually, ss can be non-empty here (_ : ss, ALConPar args) -> fs ss args ([], ALConPar args) -> fs [] args -- --------------------------------- pickid :: MId -> MId -> MId pickid mid1@(Id _) _ = mid1 pickid _ mid2 = mid2 -- --------------------------------- tcSearch :: Bool -> Ctx o -> CExp o -> MExp o -> EE (MyPB o) tcSearch isdep ctx typ trm = mpret $ Sidecondition (checkeliminand trm) (tcExp isdep ctx typ trm) -- ---------------------------- Agda-2.6.0.1/src/full/Agda/Auto/Syntax.hs0000644000000000000000000003227213466402171016031 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Auto.Syntax where import Data.IORef import qualified Data.Set as Set import Agda.Syntax.Common (Hiding) import Agda.Auto.NarrowingSearch #include "undefined.h" import Agda.Utils.Impossible -- | Unique identifiers for variable occurrences in unification. type UId o = Metavar (Exp o) (RefInfo o) data HintMode = HMNormal | HMRecCall data EqReasoningConsts o = EqReasoningConsts { eqrcId -- "_≡_" , eqrcBegin -- "begin_" , eqrcStep -- "_≡⟨_⟩_" , eqrcEnd -- "_∎" , eqrcSym -- "sym" , eqrcCong -- "cong" :: ConstRef o } data EqReasoningState = EqRSNone | EqRSChain | EqRSPrf1 | EqRSPrf2 | EqRSPrf3 deriving (Eq, Show) -- | The concrete instance of the 'blk' parameter in 'Metavar'. -- I.e., the information passed to the search control. data RefInfo o = RIEnv { rieHints :: [(ConstRef o, HintMode)] , rieDefFreeVars :: Nat -- ^ Nat - deffreevars -- (to make cost of using module parameters correspond to that of hints). , rieEqReasoningConsts :: Maybe (EqReasoningConsts o) } | RIMainInfo { riMainCxtLength :: Nat -- ^ Size of typing context in which meta was created. , riMainType :: HNExp o -- ^ Head normal form of type of meta. , riMainIota :: Bool -- ^ True if iota steps performed when normalising target type -- (used to put cost when traversing a definition -- by construction instantiation). } | RIUnifInfo [CAction o] (HNExp o) -- meta environment, opp hne | RICopyInfo (ICExp o) | RIIotaStep Bool -- True - semiflex | RIInferredTypeUnknown | RINotConstructor | RIUsedVars [UId o] [Elr o] | RIPickSubsvar | RIEqRState EqReasoningState | RICheckElim Bool -- isdep | RICheckProjIndex [ConstRef o] -- noof proj functions type MyPB o = PB (RefInfo o) type MyMB a o = MB a (RefInfo o) type Nat = Int data MId = Id String | NoId -- | Abstraction with maybe a name. -- -- Different from Agda, where there is also info -- whether function is constant. data Abs a = Abs MId a -- | Constant signatures. data ConstDef o = ConstDef { cdname :: String -- ^ For debug printing. , cdorigin :: o -- ^ Reference to the Agda constant. , cdtype :: MExp o -- ^ Type of constant. , cdcont :: DeclCont o -- ^ Constant definition. , cddeffreevars :: Nat -- ^ Free vars of the module where the constant is defined.. } -- contains no metas -- | Constant definitions. data DeclCont o = Def Nat [Clause o] (Maybe Nat) -- maybe an index to elimand argument (Maybe Nat) -- maybe index to elim arg if semiflex | Datatype [ConstRef o] -- constructors [ConstRef o] -- projection functions (in case it is a record) | Constructor Nat -- number of omitted args | Postulate type Clause o = ([Pat o], MExp o) data Pat o = PatConApp (ConstRef o) [Pat o] | PatVar String | PatExp -- ^ Dot pattern. {- TODO: projection patterns. | PatProj (ConstRef o) -- ^ Projection pattern. -} type ConstRef o = IORef (ConstDef o) -- | Head of application (elimination). data Elr o = Var Nat | Const (ConstRef o) deriving (Eq) getVar :: Elr o -> Maybe Nat getVar (Var n) = Just n getVar Const{} = Nothing getConst :: Elr o -> Maybe (ConstRef o) getConst (Const c) = Just c getConst Var{} = Nothing data Sort = Set Nat | UnknownSort | Type -- | Agsy's internal syntax. data Exp o = App { appUId :: Maybe (UId o) -- ^ Unique identifier of the head. , appOK :: OKHandle (RefInfo o) -- ^ This application has been type-checked. , appHead :: Elr o -- ^ Head. , appElims :: MArgList o -- ^ Arguments. } | Lam Hiding (Abs (MExp o)) -- ^ Lambda with hiding information. | Pi (Maybe (UId o)) Hiding Bool (MExp o) (Abs (MExp o)) -- ^ @True@ if possibly dependent (var not known to not occur). -- @False@ if non-dependent. | Sort Sort | AbsurdLambda Hiding -- ^ Absurd lambda with hiding information. dontCare :: Exp o dontCare = Sort UnknownSort -- | "Maybe expression": Expression or reference to meta variable. type MExp o = MM (Exp o) (RefInfo o) data ArgList o = ALNil -- ^ No more eliminations. | ALCons Hiding (MExp o) (MArgList o) -- ^ Application and tail. | ALProj (MArgList o) (MM (ConstRef o) (RefInfo o)) Hiding (MArgList o) -- ^ proj pre args, projfcn idx, tail | ALConPar (MArgList o) -- ^ Constructor parameter (missing in Agda). -- Agsy has monomorphic constructors. -- Inserted to cover glitch of polymorphic constructor -- applications coming from Agda type MArgList o = MM (ArgList o) (RefInfo o) data WithSeenUIds a o = WithSeenUIds { seenUIds :: [Maybe (UId o)] , rawValue :: a } type HNExp o = WithSeenUIds (HNExp' o) o data HNExp' o = HNApp (Elr o) (ICArgList o) | HNLam Hiding (Abs (ICExp o)) | HNPi Hiding Bool (ICExp o) (Abs (ICExp o)) | HNSort Sort -- | Head-normal form of 'ICArgList'. First entry is exposed. -- -- Q: Why are there no projection eliminations? data HNArgList o = HNALNil | HNALCons Hiding (ICExp o) (ICArgList o) | HNALConPar (ICArgList o) -- | Lazy concatenation of argument lists under explicit substitutions. data ICArgList o = CALNil | CALConcat (Clos (MArgList o) o) (ICArgList o) -- | An expression @a@ in an explicit substitution @[CAction a]@. type ICExp o = Clos (MExp o) o data Clos a o = Clos [CAction o] a type CExp o = TrBr (ICExp o) o data TrBr a o = TrBr [MExp o] a -- | Entry of an explicit substitution. -- -- An explicit substitution is a list of @CAction@s. -- This is isomorphic to the usual presentation where -- @Skip@ and @Weak@ would be constructors of exp. substs. data CAction o = Sub (ICExp o) -- ^ Instantation of variable. | Skip -- ^ For going under a binder, often called "Lift". | Weak Nat -- ^ Shifting substitution (going to a larger context). type Ctx o = [(MId, CExp o)] type EE = IO -- ------------------------------------------- detecteliminand :: [Clause o] -> Maybe Nat detecteliminand cls = case map cleli cls of [] -> Nothing (i:is) -> if all (i ==) is then i else Nothing where cleli (pats, _) = pateli 0 pats pateli i (PatConApp _ args : pats) = if all notcon (args ++ pats) then Just i else Nothing pateli i (_ : pats) = pateli (i + 1) pats pateli i [] = Nothing notcon PatConApp{} = False notcon _ = True detectsemiflex :: ConstRef o -> [Clause o] -> IO Bool detectsemiflex _ _ = return False -- disabled categorizedecl :: ConstRef o -> IO () categorizedecl c = do cd <- readIORef c case cdcont cd of Def narg cls _ _ -> do semif <- detectsemiflex c cls let elim = detecteliminand cls semifb = case (semif, elim) of (True, Just i) -> Just i -- just copying val of elim arg. this should be changed (_, _) -> Nothing writeIORef c (cd {cdcont = Def narg cls elim semifb}) _ -> return () -- ------------------------------------------- class MetaliseOKH t where metaliseOKH :: t -> IO t instance MetaliseOKH t => MetaliseOKH (MM t a) where metaliseOKH e = case e of Meta m -> return $ Meta m NotM e -> NotM <$> metaliseOKH e instance MetaliseOKH t => MetaliseOKH (Abs t) where metaliseOKH (Abs id b) = Abs id <$> metaliseOKH b instance MetaliseOKH (Exp o) where metaliseOKH e = case e of App uid okh elr args -> (\ m -> App uid m elr) <$> (Meta <$> initMeta) <*> metaliseOKH args Lam hid b -> Lam hid <$> metaliseOKH b Pi uid hid dep it ot -> Pi uid hid dep <$> metaliseOKH it <*> metaliseOKH ot Sort{} -> return e AbsurdLambda{} -> return e instance MetaliseOKH (ArgList o) where metaliseOKH e = case e of ALNil -> return ALNil ALCons hid a as -> ALCons hid <$> metaliseOKH a <*> metaliseOKH as ALProj eas idx hid as -> (\ eas -> ALProj eas idx hid) <$> metaliseOKH eas <*> metaliseOKH as ALConPar as -> ALConPar <$> metaliseOKH as metaliseokh :: MExp o -> IO (MExp o) metaliseokh = metaliseOKH -- ------------------------------------------- class ExpandMetas t where expandMetas :: t -> IO t instance ExpandMetas t => ExpandMetas (MM t a) where expandMetas t = case t of NotM e -> NotM <$> expandMetas e Meta m -> do mb <- readIORef (mbind m) case mb of Nothing -> return $ Meta m Just e -> NotM <$> expandMetas e instance ExpandMetas t => ExpandMetas (Abs t) where expandMetas (Abs id b) = Abs id <$> expandMetas b instance ExpandMetas (Exp o) where expandMetas t = case t of App uid okh elr args -> App uid okh elr <$> expandMetas args Lam hid b -> Lam hid <$> expandMetas b Pi uid hid dep it ot -> Pi uid hid dep <$> expandMetas it <*> expandMetas ot Sort{} -> return t AbsurdLambda{} -> return t instance ExpandMetas (ArgList o) where expandMetas e = case e of ALNil -> return ALNil ALCons hid a as -> ALCons hid <$> expandMetas a <*> expandMetas as ALProj eas idx hid as -> (\ a b -> ALProj a b hid) <$> expandMetas eas <*> expandbind idx <*> expandMetas as ALConPar as -> ALConPar <$> expandMetas as -- --------------------------------- addtrailingargs :: Clos (MArgList o) o -> ICArgList o -> ICArgList o addtrailingargs newargs CALNil = CALConcat newargs CALNil addtrailingargs newargs (CALConcat x xs) = CALConcat x (addtrailingargs newargs xs) -- --------------------------------- closify :: MExp o -> CExp o closify e = TrBr [e] (Clos [] e) sub :: MExp o -> CExp o -> CExp o -- sub e (Clos [] x) = Clos [Sub e] x sub e (TrBr trs (Clos (Skip : as) x)) = TrBr (e : trs) (Clos (Sub (Clos [] e) : as) x) {-sub e (Clos (Weak n : as) x) = if n == 1 then Clos as x else Clos (Weak (n - 1) : as) x-} sub _ _ = __IMPOSSIBLE__ subi :: MExp o -> ICExp o -> ICExp o subi e (Clos (Skip : as) x) = Clos (Sub (Clos [] e) : as) x subi _ _ = __IMPOSSIBLE__ weak :: Weakening t => Nat -> t -> t weak 0 = id weak n = weak' n class Weakening t where weak' :: Nat -> t -> t instance Weakening a => Weakening (TrBr a o) where weak' n (TrBr trs e) = TrBr trs (weak' n e) instance Weakening (Clos a o) where weak' n (Clos as x) = Clos (Weak n : as) x instance Weakening (ICArgList o) where weak' n e = case e of CALNil -> CALNil CALConcat a as -> CALConcat (weak' n a) (weak' n as) instance Weakening (Elr o) where weak' n = rename (n+) -- | Substituting for a variable. doclos :: [CAction o] -> Nat -> Either Nat (ICExp o) doclos = f 0 where -- ns is the number of weakenings f ns [] i = Left (ns + i) f ns (Weak n : xs) i = f (ns + n) xs i f ns (Sub s : _ ) 0 = Right (weak ns s) f ns (Skip : _ ) 0 = Left ns f ns (Skip : xs) i = f (ns + 1) xs (i - 1) f ns (Sub _ : xs) i = f ns xs (i - 1) -- | FreeVars class and instances freeVars :: FreeVars t => t -> Set.Set Nat freeVars = freeVarsOffset 0 class FreeVars t where freeVarsOffset :: Nat -> t -> Set.Set Nat instance (FreeVars a, FreeVars b) => FreeVars (a, b) where freeVarsOffset n (a, b) = Set.union (freeVarsOffset n a) (freeVarsOffset n b) instance FreeVars t => FreeVars (MM t a) where freeVarsOffset n e = freeVarsOffset n (rm __IMPOSSIBLE__ e) instance FreeVars t => FreeVars (Abs t) where freeVarsOffset n (Abs id e) = freeVarsOffset (n + 1) e instance FreeVars (Elr o) where freeVarsOffset n e = case e of Var v -> Set.singleton (v - n) Const{} -> Set.empty instance FreeVars (Exp o) where freeVarsOffset n e = case e of App _ _ elr args -> freeVarsOffset n (elr, args) Lam _ b -> freeVarsOffset n b Pi _ _ _ it ot -> freeVarsOffset n (it, ot) Sort{} -> Set.empty AbsurdLambda{} -> Set.empty instance FreeVars (ArgList o) where freeVarsOffset n es = case es of ALNil -> Set.empty ALCons _ e es -> freeVarsOffset n (e, es) ALConPar es -> freeVarsOffset n es ALProj{} -> __IMPOSSIBLE__ -- | Renaming Typeclass and instances rename :: Renaming t => (Nat -> Nat) -> t -> t rename = renameOffset 0 class Renaming t where renameOffset :: Nat -> (Nat -> Nat) -> t -> t instance (Renaming a, Renaming b) => Renaming (a, b) where renameOffset j ren (a, b) = (renameOffset j ren a, renameOffset j ren b) instance Renaming t => Renaming (MM t a) where renameOffset j ren e = NotM $ renameOffset j ren (rm __IMPOSSIBLE__ e) instance Renaming t => Renaming (Abs t) where renameOffset j ren (Abs id e) = Abs id $ renameOffset (j + 1) ren e instance Renaming (Elr o) where renameOffset j ren e = case e of Var v | v >= j -> Var (ren (v - j) + j) _ -> e instance Renaming (Exp o) where renameOffset j ren e = case e of App uid ok elr args -> uncurry (App uid ok) $ renameOffset j ren (elr, args) Lam hid e -> Lam hid (renameOffset j ren e) Pi a b c it ot -> uncurry (Pi a b c) $ renameOffset j ren (it, ot) Sort{} -> e AbsurdLambda{} -> e instance Renaming (ArgList o) where renameOffset j ren e = case e of ALNil -> ALNil ALCons hid a as -> uncurry (ALCons hid) $ renameOffset j ren (a, as) ALConPar as -> ALConPar (renameOffset j ren as) ALProj{} -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/Auto/NarrowingSearch.hs0000644000000000000000000004633013466402171017637 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.Auto.NarrowingSearch where import Data.IORef hiding (writeIORef, modifyIORef) import qualified Data.IORef as NoUndo (writeIORef, modifyIORef) import Control.Monad.State import Control.Applicative hiding (Const(..), getConst) #include "undefined.h" import Agda.Utils.Impossible import Agda.Utils.Empty newtype Prio = Prio { getPrio :: Int } deriving (Eq, Ord, Num) class Trav a blk | a -> blk where trav :: Monad m => (forall b . Trav b blk => MM b blk -> m ()) -> a -> m () instance Trav a blk => Trav (MM a blk) blk where trav f me = f me data Term blk = forall a . Trav a blk => Term a -- | Result of type-checking. data Prop blk = OK -- ^ Success. | Error String -- ^ Definite failure. | forall a . AddExtraRef String (Metavar a blk) (Move' blk a) -- ^ Experimental. | And (Maybe [Term blk]) (MetaEnv (PB blk)) (MetaEnv (PB blk)) -- ^ Parallel conjunction of constraints. | Sidecondition (MetaEnv (PB blk)) (MetaEnv (PB blk)) -- ^ Experimental, related to 'mcompoint'. -- First arg is sidecondition. | Or Prio (MetaEnv (PB blk)) (MetaEnv (PB blk)) -- ^ Forking proof on something that is not part of the term language. -- E.g. whether a term will reduce or not. | ConnectHandle (OKHandle blk) (MetaEnv (PB blk)) -- ^ Obsolete. data OKVal = OKVal type OKHandle blk = MM OKVal blk type OKMeta blk = Metavar OKVal blk -- | Agsy's meta variables. -- -- @a@ the type of the metavariable (what it can be instantiated with). -- @blk@ the search control information (e.g. the scope of the meta). data Metavar a blk = Metavar { mbind :: IORef (Maybe a) -- ^ Maybe an instantiation (refinement). It is usually shallow, -- i.e., just one construct(or) with arguments again being metas. , mprincipalpresent :: IORef Bool -- ^ Does this meta block a principal constraint -- (i.e., a type-checking constraint). , mobs :: IORef [(QPB a blk, Maybe (CTree blk))] -- ^ List of observers, i.e., constraints blocked by this meta. , mcompoint :: IORef [SubConstraints blk] -- ^ Used for experiments with independence of subproofs. , mextrarefs :: IORef [Move' blk a] -- ^ Experimental. } hequalMetavar :: Metavar a1 blk1 -> Metavar a2 bkl2 -> Bool hequalMetavar m1 m2 = mprincipalpresent m1 == mprincipalpresent m2 instance Eq (Metavar a blk) where x == y = hequalMetavar x y newMeta :: IORef [SubConstraints blk] -> IO (Metavar a blk) newMeta mcompoint = do bind <- newIORef Nothing pp <- newIORef False obs <- newIORef [] erefs <- newIORef [] return $ Metavar bind pp obs mcompoint erefs initMeta :: IO (Metavar a blk) initMeta = do cp <- newIORef [] newMeta cp data CTree blk = CTree {ctpriometa :: IORef (PrioMeta blk), ctsub :: IORef (Maybe (SubConstraints blk)), ctparent :: IORef (Maybe (CTree blk)), -- Nothing - root cthandles :: IORef [OKMeta blk] } data SubConstraints blk = SubConstraints {scflip :: IORef Bool, sccomcount :: IORef Int, scsub1 :: CTree blk, scsub2 :: CTree blk } newCTree :: Maybe (CTree blk) -> IO (CTree blk) newCTree parent = do priometa <- newIORef (NoPrio False) sub <- newIORef Nothing rparent <- newIORef parent handles <- newIORef [] return $ CTree priometa sub rparent handles newSubConstraints :: CTree blk -> IO (SubConstraints blk) newSubConstraints node = do flip <- newIORef True -- False -- initially (and always) True, trying out prefer rightmost subterm when none have priority comcount <- newIORef 0 sub1 <- newCTree $ Just node sub2 <- newCTree $ Just node return $ SubConstraints flip comcount sub1 sub2 data PrioMeta blk = forall a . Refinable a blk => PrioMeta Prio (Metavar a blk) | NoPrio Bool -- True if subconstraint is done (all OK) instance Eq (PrioMeta blk) where NoPrio d1 == NoPrio d2 = d1 == d2 PrioMeta p1 m1 == PrioMeta p2 m2 = p1 == p2 && hequalMetavar m1 m2 _ == _ = False -- ----------------------- data Restore = forall a . Restore (IORef a) a type Undo = StateT [Restore] IO ureadIORef :: IORef a -> Undo a ureadIORef ptr = lift $ readIORef ptr uwriteIORef :: IORef a -> a -> Undo () uwriteIORef ptr newval = do oldval <- ureadIORef ptr modify (Restore ptr oldval :) lift $ NoUndo.writeIORef ptr newval umodifyIORef :: IORef a -> (a -> a) -> Undo () umodifyIORef ptr f = do oldval <- ureadIORef ptr modify (Restore ptr oldval :) lift $ NoUndo.writeIORef ptr (f oldval) ureadmodifyIORef :: IORef a -> (a -> a) -> Undo a ureadmodifyIORef ptr f = do oldval <- ureadIORef ptr modify (Restore ptr oldval :) lift $ NoUndo.writeIORef ptr (f oldval) return oldval runUndo :: Undo a -> IO a runUndo x = do (res, restores) <- runStateT x [] mapM_ (\(Restore ptr oldval) -> NoUndo.writeIORef ptr oldval) restores return res -- ----------------------- newtype RefCreateEnv blk a = RefCreateEnv { runRefCreateEnv :: StateT ((IORef [SubConstraints blk]), Int) IO a } instance Functor (RefCreateEnv blk) where fmap f = RefCreateEnv . fmap f . runRefCreateEnv instance Applicative (RefCreateEnv blk) where pure = RefCreateEnv . pure f <*> t = RefCreateEnv $ runRefCreateEnv f <*> runRefCreateEnv t instance Monad (RefCreateEnv blk) where return = pure t >>= f = RefCreateEnv $ runRefCreateEnv t >>= runRefCreateEnv . f newtype Cost = Cost { getCost :: Int } deriving (Num, Eq, Ord) data Move' blk a = Move { moveCost :: Cost , moveNext :: RefCreateEnv blk a } class Refinable a blk where refinements :: blk -> [blk] -> Metavar a blk -> IO [Move' blk a] newPlaceholder :: RefCreateEnv blk (MM a blk) newPlaceholder = RefCreateEnv $ do (mcompoint, c) <- get m <- lift $ newMeta mcompoint put (mcompoint, (c + 1)) return $ Meta m newOKHandle :: RefCreateEnv blk (OKHandle blk) newOKHandle = RefCreateEnv $ do (e, c) <- get cp <- lift $ newIORef [] m <- lift $ newMeta cp put (e, (c + 1)) return $ Meta m dryInstantiate :: RefCreateEnv blk a -> IO a dryInstantiate bind = evalStateT (runRefCreateEnv bind) (__IMPOSSIBLE__, 0) type BlkInfo blk = (Bool, Prio, Maybe blk) -- Bool - is principal data MM a blk = NotM a | Meta (Metavar a blk) rm :: Empty -> MM a b -> a rm e (NotM x) = x rm e Meta{} = absurd e type MetaEnv = IO data MB a blk = NotB a | forall b . Refinable b blk => Blocked (Metavar b blk) (MetaEnv (MB a blk)) | Failed String data PB blk = NotPB (Prop blk) | forall b . Refinable b blk => PBlocked (Metavar b blk) (BlkInfo blk) (MetaEnv (PB blk)) | forall b1 b2 . (Refinable b1 blk, Refinable b2 blk) => PDoubleBlocked (Metavar b1 blk) (Metavar b2 blk) (MetaEnv (PB blk)) data QPB b blk = QPBlocked (BlkInfo blk) (MetaEnv (PB blk)) | QPDoubleBlocked (IORef Bool) (MetaEnv (PB blk)) -- flag set True by first observer that continues mmcase :: Refinable a blk => MM a blk -> (a -> MetaEnv (MB b blk)) -> MetaEnv (MB b blk) mmcase x f = case x of NotM x -> f x x@(Meta m) -> do bind <- readIORef $ mbind m case bind of Just x -> f x Nothing -> return $ Blocked m (mmcase x f) mmmcase :: MM a blk -> MetaEnv (MB b blk) -> (a -> MetaEnv (MB b blk)) -> MetaEnv (MB b blk) mmmcase x fm f = case x of NotM x -> f x Meta m -> do bind <- readIORef $ mbind m case bind of Just x -> f x Nothing -> fm mmpcase :: Refinable a blk => BlkInfo blk -> MM a blk -> (a -> MetaEnv (PB blk)) -> MetaEnv (PB blk) mmpcase blkinfo x f = case x of NotM x -> f x x@(Meta m) -> do bind <- readIORef $ mbind m case bind of Just x -> f x Nothing -> return $ PBlocked m blkinfo (mmpcase __IMPOSSIBLE__ x f) -- blkinfo not needed because will be notb next time doubleblock :: (Refinable a blk, Refinable b blk) => MM a blk -> MM b blk -> MetaEnv (PB blk) -> MetaEnv (PB blk) doubleblock (Meta m1) (Meta m2) cont = return $ PDoubleBlocked m1 m2 cont doubleblock _ _ _ = __IMPOSSIBLE__ mbcase :: MetaEnv (MB a blk) -> (a -> MetaEnv (MB b blk)) -> MetaEnv (MB b blk) mbcase x f = do x' <- x case x' of NotB x -> f x Blocked m x -> return $ Blocked m (mbcase x f) Failed msg -> return $ Failed msg mbpcase :: Prio -> Maybe blk -> MetaEnv (MB a blk) -> (a -> MetaEnv (PB blk)) -> MetaEnv (PB blk) mbpcase prio bi x f = do x' <- x case x' of NotB x -> f x Blocked m x -> return $ PBlocked m (False, prio, bi) (mbpcase prio bi x f) Failed msg -> return $ NotPB $ Error msg mmbpcase :: MetaEnv (MB a blk) -> (forall b . Refinable b blk => MM b blk -> MetaEnv (PB blk)) -> (a -> MetaEnv (PB blk)) -> MetaEnv (PB blk) mmbpcase x fm f = do x' <- x case x' of NotB x -> f x Blocked m x -> fm (Meta m) Failed msg -> return $ NotPB $ Error msg waitok :: OKHandle blk -> MetaEnv (MB b blk) -> MetaEnv (MB b blk) waitok okh f = mmcase okh $ \b -> case b of -- principle constraint is never present for okhandle so it will not be refined OKVal -> f mbret :: a -> MetaEnv (MB a blk) mbret x = return $ NotB x mbfailed :: String -> MetaEnv (MB a blk) mbfailed msg = return $ Failed msg mpret :: Prop blk -> MetaEnv (PB blk) mpret p = return $ NotPB p expandbind :: MM a blk -> MetaEnv (MM a blk) expandbind x = case x of NotM{} -> return x Meta m -> do bind <- readIORef $ mbind m case bind of Just x -> return $ NotM x Nothing -> return x -- ----------------------- type HandleSol = IO () type SRes = Either Bool Int topSearch :: forall blk . IORef Int -> IORef Int -> HandleSol -> blk -> MetaEnv (PB blk) -> Cost -> Cost -> IO Bool topSearch ticks nsol hsol envinfo p searchdepth depthinterval = do depthreached <- newIORef False mainroot <- newCTree Nothing let searchSubProb :: [(CTree blk, Maybe (IORef Bool))] -> Cost -> IO SRes searchSubProb [] depth = do when (depth < depthinterval) $ do hsol n <- readIORef nsol NoUndo.writeIORef nsol $! n - 1 return $ Left True searchSubProb ((root, firstdone) : restprobs) depth = let search :: Cost -> IO SRes search depth = do pm <- readIORef $ ctpriometa root case pm of NoPrio False -> return $ Left False -- nothing to refine but not done, this can happen when eq constraints are passed along with main constraint in agdaplugin NoPrio True -> searchSubProb restprobs depth -- ?? what should depth be PrioMeta _ m -> do let carryon = fork m depth sub <- readIORef $ ctsub root case sub of Nothing -> carryon Just sc -> do let sub1 = scsub1 sc sub2 = scsub2 sc pm1 <- readIORef $ ctpriometa sub1 pm2 <- readIORef $ ctpriometa sub2 let split = carryon -- split disabled case pm1 of NoPrio True -> split _ -> case pm2 of NoPrio True -> split _ -> do comc <- readIORef $ sccomcount sc case comc of 0 -> split _ -> carryon fork :: forall a. Refinable a blk => Metavar a blk -> Cost -> IO SRes fork m depth = do blkinfos <- extractblkinfos m refs <- refinements envinfo blkinfos m f refs where f :: [Move' blk a] -> IO SRes f [] = do erefs <- readIORef $ mextrarefs m case erefs of [] -> return (Left False) _ -> do NoUndo.writeIORef (mextrarefs m) [] f erefs f (Move cost bind : binds) = hsres (refine m bind (depth - cost)) (f binds) hsres :: IO SRes -> IO SRes -> IO SRes hsres x1 x2 = do res <- x1 case res of Right _ -> return res Left found -> do n <- readIORef nsol if n == 0 then return res else do res2 <- x2 case res2 of Right _ -> if found then __IMPOSSIBLE__ else return res2 Left found2 -> return $ Left (found || found2) refine :: Metavar a blk -> RefCreateEnv blk a -> Cost -> IO SRes refine _ _ depthleft | depthleft < 0 = do NoUndo.writeIORef depthreached True return $ Left False refine m bind depthleft = runUndo $ do t <- ureadIORef ticks lift $ NoUndo.writeIORef ticks $! t + 1 (bind, (_, nnewmeta)) <- lift $ runStateT (runRefCreateEnv bind) (mcompoint m, 0) uwriteIORef (mbind m) (Just bind) mcomptr <- ureadIORef $ mcompoint m mapM_ (\comptr -> umodifyIORef (sccomcount comptr) (+ (nnewmeta - 1)) -- umodifyIORef (scflip comptr) not -- don't flip now since trying prefer rightmost subterm if non have prio ) mcomptr obs <- ureadIORef (mobs m) res <- recalcs obs case res of True -> -- failed return $ Left False False -> lift $ search depthleft -- succeeded doit = do res <- search depth return $ case res of Right n -> case firstdone of Nothing -> if n == 0 then Left False else Right (n - 1) Just _ -> Right (n + 1) res@(Left True) -> res res@(Left False) -> case firstdone of Nothing -> res Just _ -> Right 0 in case firstdone of Nothing -> doit Just rdone -> do done <- readIORef rdone if done then searchSubProb restprobs depth else do NoUndo.writeIORef rdone True doit runUndo $ do res <- reccalc p (Just mainroot) case res of True -> -- failed immediately return False False -> do Left solfound <- lift $ searchSubProb [(mainroot, Nothing)] searchdepth dr <- lift $ readIORef depthreached return dr extractblkinfos :: Metavar a blk -> IO [blk] extractblkinfos m = do obs <- readIORef $ mobs m return $ f obs where f [] = [] f ((QPBlocked (_,_,mblkinfo) _, _) : cs) = case mblkinfo of Nothing -> f cs Just blkinfo -> blkinfo : f cs f ((QPDoubleBlocked{}, _) : cs) = f cs recalcs :: [(QPB a blk, Maybe (CTree blk))] -> Undo Bool recalcs [] = return False recalcs (c : cs) = seqc (recalc c) (recalcs cs) seqc :: Undo Bool -> Undo Bool -> Undo Bool seqc x y = do res1 <- x case res1 of res1@True -> return res1 False -> y recalc :: (QPB a blk, Maybe (CTree blk)) -> Undo Bool recalc (con, node) = case con of QPBlocked _ cont -> reccalc cont node QPDoubleBlocked flag cont -> do fl <- ureadIORef flag if fl then return False else do uwriteIORef flag True reccalc cont node reccalc :: MetaEnv (PB blk) -> Maybe (CTree blk) -> Undo Bool reccalc cont node = do res <- calc cont node case res of Nothing -> return True Just pendhandles -> foldM (\res1 h -> case res1 of True -> return res1 False -> do uwriteIORef (mbind h) $ Just OKVal obs <- ureadIORef (mobs h) recalcs obs ) False pendhandles calc :: forall blk . MetaEnv (PB blk) -> Maybe (CTree blk) -> Undo (Maybe [OKMeta blk]) calc cont node = do res <- donewp node cont case res of Just (_, pendhandles) -> do pendhandles2 <- case node of Just node -> propagatePrio node Nothing -> return [] return $ Just (pendhandles ++ pendhandles2) Nothing -> return Nothing where storeprio (Just node) pm pendhandles = do pendhandles' <- case pm of NoPrio True -> do handles <- ureadIORef (cthandles node) return $ handles ++ pendhandles _ -> return pendhandles uwriteIORef (ctpriometa node) pm return $ Just (pm, pendhandles') storeprio Nothing _ _ = return $ Just (NoPrio False, []) donewp node p = do bp <- lift p case bp of NotPB p -> doprop node p PBlocked m blkinfo cont -> do oldobs <- ureadmodifyIORef (mobs m) ((QPBlocked blkinfo cont, node) :) let (princ, prio, _) = blkinfo pp <- ureadIORef (mprincipalpresent m) when (princ && not pp) $ do uwriteIORef (mprincipalpresent m) True mapM_ (\(qpb, node) -> case node of Just node -> case qpb of QPBlocked (_, prio, _) _ -> do uwriteIORef (ctpriometa node) (PrioMeta prio m) propagatePrio node QPDoubleBlocked flag _ -> return [] Nothing -> return [] ) oldobs if pp || princ then storeprio node (PrioMeta prio m) [] else storeprio node (NoPrio False) [] PDoubleBlocked m1 m2 cont -> do flag <- lift $ newIORef False let newobs = ((QPDoubleBlocked flag cont, node) :) umodifyIORef (mobs m1) newobs umodifyIORef (mobs m2) newobs storeprio node (NoPrio False) [] doprop node p = case p of OK -> storeprio node (NoPrio True) [] Error _ -> return Nothing AddExtraRef _ m eref -> do lift $ NoUndo.modifyIORef (mextrarefs m) (eref :) return Nothing And coms p1 p2 -> do let Just jnode = node sc <- lift $ newSubConstraints jnode uwriteIORef (ctsub jnode) $ Just sc ndep <- case coms of Nothing -> return 1 -- no metas pointing to it so will never decrement to 0 Just coms -> return 1 -- dito lift $ NoUndo.writeIORef (sccomcount sc) ndep -- OK since sc was just created resp1 <- donewp (Just $ scsub1 sc) p1 case resp1 of Just (pm1, phs1) -> do resp2 <- donewp (Just $ scsub2 sc) p2 case resp2 of Just (pm2, phs2) -> storeprio node (choosePrioMeta False pm1 pm2) (phs1 ++ phs2) resp2@Nothing -> return resp2 resp1@Nothing -> return resp1 Sidecondition sidep mainp -> do resp1 <- donewp Nothing sidep case resp1 of Just{} -> do resp2 <- donewp node mainp case resp2 of Just (pm2, phs2) -> storeprio node pm2 phs2 resp2@Nothing -> return resp2 resp1@Nothing -> return resp1 Or prio p1 p2 -> do cm <- lift $ initMeta donewp node (choose (Meta cm) prio p1 p2) ConnectHandle (Meta handle) p' -> do let Just jnode = node umodifyIORef (cthandles jnode) (handle :) donewp node p' ConnectHandle (NotM _) _ -> __IMPOSSIBLE__ choosePrioMeta :: Bool -> PrioMeta blk -> PrioMeta blk -> PrioMeta blk choosePrioMeta flip pm1@(PrioMeta p1 _) pm2@(PrioMeta p2 _) = if p1 > p2 then pm1 else if p2 > p1 then pm2 else if flip then pm2 else pm1 choosePrioMeta _ pm@(PrioMeta _ _) (NoPrio _) = pm choosePrioMeta _ (NoPrio _) pm@(PrioMeta _ _) = pm choosePrioMeta _ (NoPrio d1) (NoPrio d2) = NoPrio (d1 && d2) propagatePrio :: CTree blk -> Undo [OKMeta blk] propagatePrio node = do parent <- lift $ readIORef $ ctparent node case parent of Nothing -> return [] Just parent -> do Just sc <- ureadIORef (ctsub parent) pm1 <- ureadIORef $ ctpriometa $ scsub1 sc pm2 <- ureadIORef $ ctpriometa $ scsub2 sc flip <- ureadIORef $ scflip sc let pm = choosePrioMeta flip pm1 pm2 opm <- ureadIORef (ctpriometa parent) if (not (pm == opm)) then do uwriteIORef (ctpriometa parent) pm phs <- case pm of NoPrio True -> ureadIORef (cthandles parent) _ -> return [] phs2 <- propagatePrio parent return $ phs ++ phs2 else return [] data Choice = LeftDisjunct | RightDisjunct choose :: MM Choice blk -> Prio -> MetaEnv (PB blk) -> MetaEnv (PB blk) -> MetaEnv (PB blk) choose c prio p1 p2 = mmpcase (True, prio, Nothing) c $ \c -> case c of LeftDisjunct -> p1 RightDisjunct -> p2 instance Refinable Choice blk where refinements _ x _ = return $ Move 0 . return <$> [LeftDisjunct, RightDisjunct] instance Refinable OKVal blk where refinements _ _ _ = __IMPOSSIBLE__ -- OKVal should never be refined -- ------------------------------------ Agda-2.6.0.1/src/full/Agda/Auto/Convert.hs0000644000000000000000000007435313466402171016171 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Auto.Convert where import Control.Applicative hiding (getConst, Const(..)) import Data.IORef import Data.Maybe (catMaybes) import Data.Map (Map) import qualified Data.Map as Map import Data.Traversable (traverse) import Control.Monad.State import Agda.Syntax.Common (Hiding(..), getHiding) import Agda.Syntax.Concrete (exprFieldA) import qualified Agda.Syntax.Internal as I import qualified Agda.Syntax.Internal.Pattern as IP import qualified Agda.Syntax.Common as Cm import Agda.Syntax.Common (Dom(..),domInfo,unDom) import qualified Agda.Syntax.Abstract.Name as AN import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Position as SP import qualified Agda.TypeChecking.Monad.Base as MB import Agda.TypeChecking.Monad.Signature (getConstInfo, getDefFreeVars, ignoreAbstractMode) import Agda.Utils.Permutation (Permutation(Perm), permute, takeP, compactP) import Agda.TypeChecking.Level (reallyUnLevelView) import Agda.TypeChecking.Monad.Base (mvJudgement, mvPermutation, getMetaInfo, envContext, clEnv) import Agda.TypeChecking.Monad.MetaVars (lookupMeta, withMetaInfo, lookupInteractionPoint) import Agda.TypeChecking.Monad.Context (getContextArgs) import Agda.TypeChecking.Monad.Constraints (getAllConstraints) import Agda.TypeChecking.Substitute (applySubst, renamingR) import Agda.TypeChecking.Telescope (piApplyM) import qualified Agda.TypeChecking.Substitute as I (absBody) import Agda.TypeChecking.Reduce (normalise, instantiate) import Agda.TypeChecking.EtaContract (etaContract) import Agda.TypeChecking.Monad.Builtin (constructorForm) import Agda.TypeChecking.Free as Free (freeIn) import Agda.TypeChecking.Errors ( stringTCErr ) import Agda.Interaction.MakeCase (getClauseZipperForIP) import Agda.Auto.NarrowingSearch import Agda.Auto.Syntax hiding (getConst) import Agda.Auto.CaseSplit hiding (lift) import Agda.Utils.Either import Agda.Utils.Except ( ExceptT , MonadError(throwError) ) import Agda.Utils.Lens import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Impossible #include "undefined.h" data Hint = Hint { hintIsConstructor :: Bool , hintQName :: I.QName } type O = (Maybe Int, AN.QName) -- Nothing - Def -- Just npar - Con with npar parameters which don't appear in Agda data TMode = TMAll -- can be extended to distinguish between different modes (all, only def) deriving Eq type MapS a b = (Map a b, [a]) initMapS :: MapS a b initMapS = (Map.empty, []) popMapS :: (S -> (a, [b])) -> ((a, [b]) -> S -> S) -> TOM (Maybe b) popMapS r w = do (m, xs) <- gets r case xs of [] -> return Nothing (x:xs) -> do modify (w (m, xs)) return $ Just x data S = S {sConsts :: MapS AN.QName (TMode, ConstRef O), sMetas :: MapS I.MetaId (Metavar (Exp O) (RefInfo O), Maybe (MExp O, [MExp O]), [I.MetaId]), sEqs :: MapS Int (Maybe (Bool, MExp O, MExp O)), sCurMeta :: Maybe I.MetaId, sMainMeta :: I.MetaId } type TOM = StateT S MB.TCM type MOT = ExceptT String IO tomy :: I.MetaId -> [Hint] -> [I.Type] -> MB.TCM ([ConstRef O] , [MExp O] , Map I.MetaId (Metavar (Exp O) (RefInfo O), MExp O, [MExp O], [I.MetaId]) , [(Bool, MExp O, MExp O)] , Map AN.QName (TMode, ConstRef O)) tomy imi icns typs = do eqs <- getEqs let r :: [AN.QName] -> TOM [AN.QName] r projfcns = do nxt <- popMapS sConsts (\x y -> y {sConsts = x}) case nxt of Just cn -> do cmap <- fst `liftM` gets sConsts let (mode, c) = cmap Map.! cn def <- lift $ getConstInfo cn let typ = MB.defType def defn = MB.theDef def typ <- lift $ normalise typ typ' <- convert typ let clausesToDef clauses = do clauses' <- convert clauses let narg = case clauses of [] -> 0 I.Clause {I.namedClausePats = xs} : _ -> length xs return (Def narg clauses' Nothing Nothing, []) (cont, projfcns2) <- case defn of MB.Axiom {} -> return (Postulate, []) MB.DataOrRecSig{} -> return (Postulate, []) MB.GeneralizableVar{} -> __IMPOSSIBLE__ MB.AbstractDefn{} -> return (Postulate, []) MB.Function {MB.funClauses = clauses} -> clausesToDef clauses -- MB.Primitive {MB.primClauses = []} -> throwError $ strMsg "Auto: Primitive functions are not supported" -- Andreas, 2013-06-17 breaks interaction/AutoMisc MB.Primitive {MB.primClauses = clauses} -> clausesToDef clauses MB.Datatype {MB.dataCons = cons} -> do cons2 <- mapM (\con -> getConst True con TMAll) cons return (Datatype cons2 [], []) MB.Record {MB.recFields = fields, MB.recTel = tel} -> do -- the value of recPars seems unreliable or don't know what it signifies let pars n (I.El _ (I.Pi it typ)) = Cm.Arg (Cm.domInfo it) (I.var n) : pars (n - 1) (I.unAbs typ) pars _ (I.El _ _) = [] contyp npar I.EmptyTel = I.El (I.mkType 0 {- arbitrary -}) $ I.Def cn $ map I.Apply $ pars (npar - 1) typ contyp npar (I.ExtendTel it (I.Abs v tel)) = I.El (I.mkType 0 {- arbitrary -}) (I.Pi it (I.Abs v (contyp (npar + 1) tel))) contyp npar (I.ExtendTel it I.NoAbs{}) = __IMPOSSIBLE__ contyp' <- convert $ contyp 0 tel cc <- lift $ liftIO $ readIORef c let Datatype [con] [] = cdcont cc lift $ liftIO $ modifyIORef con (\cdef -> cdef {cdtype = contyp'}) projfcns <- mapM (\name -> getConst False name TMAll) (map Cm.unArg fields) return (Datatype [con] projfcns, []{-map snd fields-}) MB.Constructor {MB.conData = dt} -> do _ <- getConst False dt TMAll -- make sure that datatype is included cc <- lift $ liftIO $ readIORef c let (Just nomi, _) = cdorigin cc return (Constructor (nomi - cddeffreevars cc), []) lift $ liftIO $ modifyIORef c (\cdef -> cdef {cdtype = typ', cdcont = cont}) r $ projfcns2 ++ projfcns Nothing -> do nxt <- popMapS sMetas (\x y -> y {sMetas = x}) case nxt of Just mi -> do mapM_ (\((_, e, i), eqi) -> do when (fmExp mi e || fmExp mi i) $ do (eqsm, eqsl) <- gets sEqs when (Map.notMember eqi eqsm) $ do modify $ \s -> s {sEqs = (Map.insert eqi Nothing eqsm, eqi : eqsl)} ) (zip eqs [0..]) mv <- lift $ lookupMeta mi msol <- case MB.mvInstantiation mv of MB.InstV{} -> lift $ withMetaInfo (getMetaInfo mv) $ do args <- getContextArgs --sol <- norm (I.MetaV mi args) sol <- instantiate $ I.MetaV mi $ map I.Apply $ permute (takeP (length args) $ mvPermutation mv) args return $ Just sol _ -> return Nothing case msol of Nothing -> return () Just sol -> do m <- getMeta mi sol' <- convert sol modify $ \s -> s {sEqs = (Map.insert (Map.size (fst $ sEqs s)) (Just (False, Meta m, sol')) (fst $ sEqs s), snd $ sEqs s)} let tt = MB.jMetaType $ mvJudgement mv minfo = getMetaInfo mv localVars = map (snd . Cm.unDom) . envContext . clEnv $ minfo (targettype, localVars) <- lift $ withMetaInfo minfo $ do vs <- getContextArgs targettype <- tt `piApplyM` permute (takeP (length vs) $ mvPermutation mv) vs targettype <- normalise targettype localVars <- mapM normalise localVars return (targettype, localVars) modify (\s -> s {sCurMeta = Just mi}) typ' <- convert targettype ctx' <- mapM convert localVars modify (\s -> s {sCurMeta = Nothing}) modify (\s -> s {sMetas = (Map.adjust (\(m, _, deps) -> (m, Just (typ', ctx'), deps)) mi (fst $ sMetas s), snd $ sMetas s)}) r projfcns Nothing -> do nxt <- popMapS sEqs (\x y -> y {sEqs = x}) case nxt of Just eqi -> do let (ineq, e, i) = eqs !! eqi e' <- convert e i' <- convert i modify (\s -> s {sEqs = (Map.adjust (\_ -> Just (ineq, e', i')) eqi (fst $ sEqs s), snd $ sEqs s)}) r projfcns Nothing -> return projfcns ((icns', typs'), s) <- runStateT (do _ <- getMeta imi icns' <- mapM (\ (Hint iscon name) -> getConst iscon name TMAll) icns typs' <- mapM convert typs projfcns <- r [] projfcns' <- mapM (\name -> getConst False name TMAll) projfcns [] <- r [] return (projfcns' ++ icns', typs') ) (S {sConsts = initMapS, sMetas = initMapS, sEqs = initMapS, sCurMeta = Nothing, sMainMeta = imi}) lift $ liftIO $ mapM_ categorizedecl icns' return (icns', typs', Map.map flatten (fst (sMetas s)), map fromJust $ Map.elems (fst (sEqs s)), fst (sConsts s)) where flatten (x, Just (y, z), w) = (x, y, z, w) flatten (x, Nothing, w) = __IMPOSSIBLE__ fromJust (Just x) = x fromJust Nothing = __IMPOSSIBLE__ getConst :: Bool -> AN.QName -> TMode -> TOM (ConstRef O) getConst iscon name mode = do def <- lift $ getConstInfo name case MB.theDef def of MB.Record {MB.recConHead = con} -> do let conname = I.conName con cmap <- fst `liftM` gets sConsts case Map.lookup name cmap of Just (mode', c) -> if iscon then do cd <- lift $ liftIO $ readIORef c let Datatype [con] _ = cdcont cd return con else return c Nothing -> do mainm <- gets sMainMeta dfv <- lift $ getdfv mainm name let nomi = I.arity (MB.defType def) ccon <- lift $ liftIO $ newIORef (ConstDef {cdname = prettyShow name ++ ".CONS", cdorigin = (Just nomi, conname), cdtype = __IMPOSSIBLE__, cdcont = Constructor (nomi - dfv), cddeffreevars = dfv}) -- ?? correct value of deffreevars for records? c <- lift $ liftIO $ newIORef (ConstDef {cdname = prettyShow name, cdorigin = (Nothing, name), cdtype = __IMPOSSIBLE__, cdcont = Datatype [ccon] [], cddeffreevars = dfv}) -- ?? correct value of deffreevars for records? modify (\s -> s {sConsts = (Map.insert name (mode, c) cmap, name : snd (sConsts s))}) return $ if iscon then ccon else c _ -> do cmap <- fst `liftM` gets sConsts case Map.lookup name cmap of Just (mode', c) -> return c Nothing -> do (miscon, sname) <- if iscon then do let MB.Constructor {MB.conPars = npar, MB.conData = dname} = MB.theDef def return (Just npar, prettyShow dname ++ "." ++ prettyShow (I.qnameName name)) else return (Nothing, prettyShow name) mainm <- gets sMainMeta dfv <- lift $ getdfv mainm name c <- lift $ liftIO $ newIORef (ConstDef {cdname = sname, cdorigin = (miscon, name), cdtype = __IMPOSSIBLE__, cdcont = __IMPOSSIBLE__, cddeffreevars = dfv}) modify (\s -> s {sConsts = (Map.insert name (mode, c) cmap, name : snd (sConsts s))}) return c getdfv :: I.MetaId -> A.QName -> MB.TCM Cm.Nat getdfv mainm name = do mv <- lookupMeta mainm withMetaInfo (getMetaInfo mv) $ getDefFreeVars name getMeta :: I.MetaId -> TOM (Metavar (Exp O) (RefInfo O)) getMeta name = do mmap <- fst `liftM` gets sMetas case Map.lookup name mmap of Just (m, _, _) -> return m Nothing -> do m <- lift $ liftIO initMeta modify (\s -> s {sMetas = (Map.insert name (m, Nothing, []) mmap, name : snd (sMetas s))}) return m getEqs :: MB.TCM [(Bool, I.Term, I.Term)] getEqs = do eqs <- getAllConstraints let r = mapM (\eqc -> do neqc <- normalise eqc case MB.clValue $ MB.theConstraint neqc of MB.ValueCmp ineq _ i e -> do ei <- etaContract i ee <- etaContract e return [(tomyIneq ineq, ee, ei)] MB.TypeCmp ineq i e -> do I.El _ ei <- etaContract i I.El _ ee <- etaContract e return [(tomyIneq ineq, ee, ei)] MB.Guarded (MB.UnBlock _) pid -> return [] _ -> return [] ) eqs' <- r eqs return $ concat eqs' copatternsNotImplemented :: MB.TCM a copatternsNotImplemented = MB.typeError $ MB.NotImplemented $ "The Agda synthesizer (Agsy) does not support copatterns yet" literalsNotImplemented :: MB.TCM a literalsNotImplemented = MB.typeError $ MB.NotImplemented $ "The Agda synthesizer (Agsy) does not support literals yet" hitsNotImplemented :: MB.TCM a hitsNotImplemented = MB.typeError $ MB.NotImplemented $ "The Agda synthesizer (Agsy) does not support HITs yet" class Conversion m a b where convert :: a -> m b instance Conversion TOM [I.Clause] [([Pat O], MExp O)] where convert = fmap catMaybes . mapM convert instance Conversion TOM I.Clause (Maybe ([Pat O], MExp O)) where convert cl = do let -- Jesper, 2016-07-28: -- I can't figure out if this should be the old or new -- clause body (i.e. relative to the positions of pattern variables or -- relative to the clauseTel). Both options pass the test suite, so I -- have the impression it doesn't actually matter. -- ALTERNATIVE CODE: -- perm = fromMaybe __IMPOSSIBLE__ $ IP.clausePerm cl -- body = applySubst (renamingR perm) $ I.clauseBody cl body = I.clauseBody cl pats = I.clausePats cl pats' <- mapM convert (IP.unnumberPatVars pats :: [Cm.Arg I.Pattern]) body' <- traverse convert =<< lift (normalise body) return $ (pats',) <$> body' instance Conversion TOM (Cm.Arg I.Pattern) (Pat O) where convert p = case Cm.unArg p of I.IApplyP _ _ _ n -> return $ PatVar (show n) I.VarP _ n -> return $ PatVar (show n) I.DotP _ _ -> return $ PatVar "_" -- because Agda includes these when referring to variables in the body I.ConP con _ pats -> do let n = I.conName con c <- getConst True n TMAll pats' <- mapM (convert . fmap Cm.namedThing) pats def <- lift $ getConstInfo n cc <- lift $ liftIO $ readIORef c let Just npar = fst $ cdorigin cc return $ PatConApp c (replicate npar PatExp ++ pats') -- UNSUPPORTED CASES I.ProjP{} -> lift copatternsNotImplemented I.LitP _ -> lift literalsNotImplemented I.DefP{} -> lift hitsNotImplemented instance Conversion TOM I.Type (MExp O) where convert (I.El _ t) = convert t -- sort info is thrown away instance Conversion TOM I.Term (MExp O) where convert v0 = case I.unSpine v0 of I.Var v es -> do let Just as = I.allApplyElims es as' <- convert as return $ NotM $ App Nothing (NotM OKVal) (Var v) as' I.Lam info b -> do b' <- convert (I.absBody b) return $ NotM $ Lam (getHiding info) (Abs (Id $ I.absName b) b') t@I.Lit{} -> do t <- lift $ constructorForm t case t of I.Lit{} -> lift literalsNotImplemented _ -> convert t I.Level l -> convert =<< lift (reallyUnLevelView l) I.Def name es -> do let Just as = I.allApplyElims es c <- getConst False name TMAll as' <- convert as return $ NotM $ App Nothing (NotM OKVal) (Const c) as' I.Con con ci es -> do let Just as = I.allApplyElims es let name = I.conName con c <- getConst True name TMAll as' <- convert as def <- lift $ getConstInfo name cc <- lift $ liftIO $ readIORef c let Just npar = fst $ cdorigin cc return $ NotM $ App Nothing (NotM OKVal) (Const c) (foldl (\x _ -> NotM $ ALConPar x) as' [1..npar]) I.Pi (Cm.Dom{domInfo = info, unDom = x}) b -> do let y = I.absBody b name = I.absName b x' <- convert x y' <- convert y return $ NotM $ Pi Nothing (getHiding info) (Free.freeIn 0 y) x' (Abs (Id name) y') I.Sort (I.Type (I.Max [I.ClosedLevel l])) -> return $ NotM $ Sort $ Set $ fromIntegral l I.Sort _ -> return $ NotM $ Sort UnknownSort I.Dummy{}-> return $ NotM $ Sort UnknownSort t@I.MetaV{} -> do t <- lift $ instantiate t case t of I.MetaV mid _ -> do mcurmeta <- gets sCurMeta case mcurmeta of Nothing -> return () Just curmeta -> modify $ \ s -> s { sMetas = ( Map.adjust (\(m, x, deps) -> (m, x, mid : deps)) curmeta (fst $ sMetas s) , snd $ sMetas s ) } m <- getMeta mid return $ Meta m _ -> convert t I.DontCare _ -> return $ NotM dontCare instance Conversion TOM a b => Conversion TOM (Cm.Arg a) (Hiding, b) where convert (Cm.Arg info a) = (getHiding info,) <$> convert a instance Conversion TOM I.Args (MM (ArgList O) (RefInfo O)) where convert as = NotM . foldr (\ (hid,t) -> ALCons hid t . NotM) ALNil <$> mapM convert as tomyIneq :: MB.Comparison -> Bool tomyIneq MB.CmpEq = False tomyIneq MB.CmpLeq = True -- --------------------------------------------- fmType :: I.MetaId -> I.Type -> Bool fmType m (I.El _ t) = fmExp m t fmExp :: I.MetaId -> I.Term -> Bool fmExp m (I.Var _ as) = fmExps m $ I.argsFromElims as fmExp m (I.Lam _ b) = fmExp m (I.unAbs b) fmExp m (I.Lit _) = False fmExp m (I.Level (I.Max as)) = any (fmLevel m) as fmExp m (I.Def _ as) = fmExps m $ I.argsFromElims as fmExp m (I.Con _ ci as) = fmExps m $ I.argsFromElims as fmExp m (I.Pi x y) = fmType m (Cm.unDom x) || fmType m (I.unAbs y) fmExp m (I.Sort _) = False fmExp m (I.MetaV mid _) = mid == m fmExp m (I.DontCare _) = False fmExp _ I.Dummy{} = False fmExps :: I.MetaId -> I.Args -> Bool fmExps m [] = False fmExps m (a : as) = fmExp m (Cm.unArg a) || fmExps m as fmLevel :: I.MetaId -> I.PlusLevel -> Bool fmLevel m I.ClosedLevel{} = False fmLevel m (I.Plus _ l) = case l of I.MetaLevel m' _ -> m == m' I.NeutralLevel _ v -> fmExp m v I.BlockedLevel _ v -> fmExp m v I.UnreducedLevel v -> fmExp m v -- --------------------------------------------- icnvh :: Hiding -> Cm.ArgInfo icnvh h = Cm.setHiding h $ Cm.setOrigin o $ Cm.defaultArgInfo where -- Andreas, 2017-01-18, issue #819. -- Visible arguments are made UserWritten, -- otherwise they might not be printed in patterns. o = case h of NotHidden -> Cm.UserWritten Instance{} -> Cm.Inserted Hidden -> Cm.Inserted -- --------------------------------------------- instance Conversion MOT a b => Conversion MOT (MM a (RefInfo O)) b where convert meta = case meta of NotM a -> convert a Meta m -> do ma <- lift $ readIORef $ mbind m case ma of Nothing -> throwError "meta not bound" Just a -> convert a instance Conversion MOT a b => Conversion MOT (Abs a) (I.Abs b) where convert (Abs mid t) = I.Abs id <$> convert t where id = case mid of NoId -> "x" Id id -> id instance Conversion MOT (Exp O) I.Type where convert e = I.El (I.mkType 0) <$> convert e -- 0 is arbitrary, sort not read by Agda when reifying instance Conversion MOT (Exp O) I.Term where convert e = case e of App _ _ (Var v) as -> frommyExps 0 as (I.Var v []) App _ _ (Const c) as -> do cdef <- lift $ readIORef c let (iscon, name) = cdorigin cdef {- case iscon of Just n -> do v <- getConTerm name -- We are not in TCM frommyExps n as v -} (ndrop, h) = case iscon of Just n -> (n, \ q -> I.Con (I.ConHead q Cm.Inductive []) Cm.ConOSystem) -- TODO: restore fields Nothing -> (0, \ f vs -> I.Def f vs) frommyExps ndrop as (h name []) Lam hid t -> I.Lam (icnvh hid) <$> convert t Pi _ hid _ x y -> do x' <- convert x let dom = (Cm.defaultDom x') {domInfo = icnvh hid} I.Pi dom <$> convert y -- maybe have case for Pi where possdep is False which produces Fun (and has to unweaken y), return $ I.Fun (Cm.Arg (icnvh hid) x') y' Sort (Set l) -> return $ I.Sort (I.mkType (fromIntegral l)) Sort Type -> __IMPOSSIBLE__ Sort UnknownSort -> return $ I.Sort (I.mkType 0) -- hoping it's thrown away AbsurdLambda hid -> return $ I.Lam (icnvh hid) $ I.Abs abslamvarname (I.Var 0 []) frommyExps :: Nat -> MArgList O -> I.Term -> ExceptT String IO I.Term frommyExps ndrop (Meta m) trm = do bind <- lift $ readIORef $ mbind m case bind of Nothing -> throwError "meta not bound" Just e -> frommyExps ndrop (NotM e) trm frommyExps ndrop (NotM as) trm = case as of ALNil -> return trm ALCons _ _ xs | ndrop > 0 -> frommyExps (ndrop - 1) xs trm ALCons hid x xs -> do x' <- convert x frommyExps ndrop xs (addend (Cm.Arg (icnvh hid) x') trm) -- Andreas, 2013-10-19 TODO: restore postfix projections ALProj eas idx hid xs -> do idx <- lift $ expandbind idx c <- case idx of NotM c -> return c Meta{} -> throwError "meta not bound" cdef <- lift $ readIORef c let name = snd $ cdorigin cdef trm2 <- frommyExps 0 eas (I.Def name []) frommyExps 0 xs (addend (Cm.Arg (icnvh hid) trm) trm2) ALConPar xs | ndrop > 0 -> frommyExps (ndrop - 1) xs trm ALConPar _ -> __IMPOSSIBLE__ where addend x (I.Var h xs) = I.Var h (xs ++ [I.Apply x]) addend x (I.Con h ci xs) = I.Con h ci (xs ++ [I.Apply x]) addend x (I.Def h xs) = I.Def h (xs ++ [I.Apply x]) addend _ _ = __IMPOSSIBLE__ -- -------------------------------- abslamvarname :: String abslamvarname = "\0absurdlambda" modifyAbstractExpr :: A.Expr -> A.Expr modifyAbstractExpr = f where f (A.App i e1 (Cm.Arg info (Cm.Named n e2))) = A.App i (f e1) (Cm.Arg info (Cm.Named n (f e2))) f (A.Lam i (A.DomainFree x) _) | A.BindName n <- Cm.namedArg x , prettyShow (A.nameConcrete n) == abslamvarname = A.AbsurdLam i $ Cm.getHiding x f (A.Lam i b e) = A.Lam i b (f e) f (A.Rec i xs) = A.Rec i (map (mapLeft (over exprFieldA f)) xs) f (A.RecUpdate i e xs) = A.RecUpdate i (f e) (map (over exprFieldA f) xs) f (A.ScopedExpr i e) = A.ScopedExpr i (f e) f e = e modifyAbstractClause :: A.Clause -> A.Clause modifyAbstractClause (A.Clause lhs spats (A.RHS e mc) decls catchall) = A.Clause lhs spats (A.RHS (modifyAbstractExpr e) mc) decls catchall modifyAbstractClause cl = cl -- --------------------------------- constructPats :: Map AN.QName (TMode, ConstRef O) -> I.MetaId -> I.Clause -> MB.TCM ([(Hiding, MId)], [CSPat O]) constructPats cmap mainm clause = do let cnvps ns [] = return (ns, []) cnvps ns (p : ps) = do (ns', ps') <- cnvps ns ps (ns'', p') <- cnvp ns' p return (ns'', p' : ps') cnvp ns p = let hid = getHiding $ Cm.argInfo p in case Cm.namedArg p of I.VarP _ n -> return ((hid, Id n) : ns, HI hid (CSPatVar $ length ns)) I.IApplyP _ _ _ n -> return ((hid, Id n) : ns, HI hid (CSPatVar $ length ns)) I.ConP con _ ps -> do let c = I.conName con (c2, _) <- runStateT (getConst True c TMAll) (S {sConsts = (cmap, []), sMetas = initMapS, sEqs = initMapS, sCurMeta = Nothing, sMainMeta = mainm}) (ns', ps') <- cnvps ns ps cc <- liftIO $ readIORef c2 let Just npar = fst $ cdorigin cc return (ns', HI hid (CSPatConApp c2 (replicate npar (HI Hidden CSOmittedArg) ++ ps'))) I.DotP _ t -> do (t2, _) <- runStateT (convert t) (S {sConsts = (cmap, []), sMetas = initMapS, sEqs = initMapS, sCurMeta = Nothing, sMainMeta = mainm}) return (ns, HI hid (CSPatExp t2)) I.ProjP{} -> copatternsNotImplemented I.LitP{} -> literalsNotImplemented I.DefP{} -> hitsNotImplemented (names, pats) <- cnvps [] (IP.unnumberPatVars $ I.namedClausePats clause) return (reverse names, pats) frommyClause :: (CSCtx O, [CSPat O], Maybe (MExp O)) -> ExceptT String IO I.Clause frommyClause (ids, pats, mrhs) = do let ctel [] = return I.EmptyTel ctel (HI hid (mid, t) : ctx) = do let Id id = mid tel <- ctel ctx t' <- convert t let dom = (Cm.defaultDom t') {domInfo = icnvh hid} return $ I.ExtendTel dom (I.Abs id tel) tel <- ctel $ reverse ids let getperms 0 [] perm nv = return (perm, nv) getperms n [] _ _ = __IMPOSSIBLE__ getperms 0 (p : ps) perm nv = do (perm, nv) <- getperm p perm nv getperms 0 ps perm nv getperms n (HI _ CSPatExp{} : ps) perm nv = getperms (n - 1) ps perm nv getperms n (HI _ CSOmittedArg{} : ps) perm nv = getperms (n - 1) ps perm nv getperms n (_ : _) _ _ = __IMPOSSIBLE__ getperm (HI _ p) perm nv = case p of --CSPatVar v -> return (length ids + nv - 1 - v : perm, nv) CSPatVar v -> return ((length ids - 1 - v, nv) : perm, nv + 1) CSPatConApp c ps -> do cdef <- lift $ readIORef c let (Just ndrop, _) = cdorigin cdef getperms ndrop ps perm nv CSPatExp e -> return (perm, nv + 1) _ -> __IMPOSSIBLE__ (rperm, nv) <- getperms 0 pats [] 0 let --perm = reverse rperm perm = map (\i -> let Just x = lookup i rperm in x) [0..length ids - 1] --renperm = map (\i -> length ids + nv - 1 - i) rperm --renm = rename (\i -> renperm !! i) cnvps 0 [] = return [] cnvps n [] = __IMPOSSIBLE__ cnvps 0 (p : ps) = do p' <- cnvp p ps' <- cnvps 0 ps return (p' : ps') cnvps n (HI _ CSPatExp{} : ps) = cnvps (n - 1) ps cnvps n (HI _ CSOmittedArg{} : ps) = cnvps (n - 1) ps cnvps n (_ : _) = __IMPOSSIBLE__ cnvp (HI hid p) = do p' <- case p of CSPatVar v -> return (I.varP $ let HI _ (Id n, _) = ids !! v in n) CSPatConApp c ps -> do cdef <- lift $ readIORef c let (Just ndrop, name) = cdorigin cdef ps' <- cnvps ndrop ps let con = I.ConHead name Cm.Inductive [] -- TODO: restore record fields! return (I.ConP con I.noConPatternInfo ps') CSPatExp e -> do e' <- convert e {- renm e -} -- renaming before adding to clause below return (I.dotP e') CSAbsurd -> __IMPOSSIBLE__ -- CSAbsurd not used _ -> __IMPOSSIBLE__ return $ Cm.Arg (icnvh hid) $ Cm.unnamed p' -- TODO: recover names ps <- cnvps 0 pats body <- case mrhs of Nothing -> return $ Nothing Just e -> Just <$> convert e let cperm = Perm nv perm return $ I.Clause { I.clauseLHSRange = SP.noRange , I.clauseFullRange = SP.noRange , I.clauseTel = tel , I.namedClausePats = IP.numberPatVars __IMPOSSIBLE__ cperm $ applySubst (renamingR $ compactP cperm) ps , I.clauseBody = body , I.clauseType = Nothing -- TODO: compute clause type , I.clauseCatchall = False , I.clauseUnreachable = Nothing -- TODO: Don't know here whether reachable or not !? } contains_constructor :: [CSPat O] -> Bool contains_constructor = any f where f (HI _ p) = case p of CSPatConApp{} -> True _ -> False -- --------------------------------- freeIn :: Nat -> MExp o -> Bool freeIn = f where mr x = let NotM x' = x in x' f v e = case mr e of App _ _ elr args -> case elr of Var v' | v' == v -> False _ -> fs v args Lam _ (Abs _ b) -> f (v + 1) b Pi _ _ _ it (Abs _ ot) -> f v it && f (v + 1) ot Sort{} -> True AbsurdLambda{} -> True fs v es = case mr es of ALNil -> True ALCons _ a as -> f v a && fs v as ALProj{} -> __IMPOSSIBLE__ ALConPar as -> fs v as negtype :: ConstRef o -> MExp o -> MExp o negtype ee = f (0 :: Int) where mr x = let NotM x' = x in x' f n e = case mr e of Pi uid hid possdep it (Abs id ot) -> NotM $ Pi uid hid possdep it (Abs id (f (n + 1) ot)) _ -> NotM $ Pi Nothing NotHidden False (NotM $ Pi Nothing NotHidden False e (Abs NoId (NotM $ Pi Nothing NotHidden True (NotM $ Sort (Set 0)) (Abs NoId (NotM $ App Nothing (NotM OKVal) (Var 0) (NotM ALNil)))))) (Abs NoId (NotM $ App Nothing (NotM OKVal) (Const ee) (NotM ALNil))) -- --------------------------------------- findClauseDeep :: Cm.InteractionId -> MB.TCM (Maybe (AN.QName, I.Clause, Bool)) findClauseDeep ii = ignoreAbstractMode $ do -- Andreas, 2016-09-04, issue #2162 MB.InteractionPoint { MB.ipClause = ipCl} <- lookupInteractionPoint ii case ipCl of MB.IPNoClause -> return Nothing MB.IPClause f clauseNo _ -> do (_, (_, c, _)) <- getClauseZipperForIP f clauseNo return $ Just (f, c, maybe __IMPOSSIBLE__ toplevel $ I.clauseBody c) where toplevel e = case e of I.MetaV{} -> True _ -> False -- --------------------------------------- matchType :: Int -> Int -> I.Type -> I.Type -> Maybe (Nat, Nat) -- Nat is deffreevars of const, Nat is ctx length of target type, left arg is const type, right is target type matchType cdfv tctx ctyp ttyp = trmodps cdfv ctyp where trmodps 0 ctyp = tr 0 0 ctyp trmodps n ctyp = case I.unEl ctyp of I.Pi _ ot -> trmodps (n - 1) (I.absBody ot) _ -> __IMPOSSIBLE__ tr narg na ctyp = case ft 0 0 Just ctyp ttyp of Just n -> Just (n, narg) Nothing -> case I.unEl ctyp of I.Pi _ (I.Abs _ ot) -> tr (narg + 1) (na + 1) ot I.Pi _ (I.NoAbs _ ot) -> tr (narg + 1) na ot _ -> Nothing where ft nl n c (I.El _ e1) (I.El _ e2) = f nl n c e1 e2 f nl n c e1 e2 = case e1 of I.Var v1 as1 | v1 < nl -> case e2 of I.Var v2 as2 | v1 == v2 -> fes nl (n + 1) c as1 as2 _ -> Nothing I.Var v1 _ | v1 < nl + na -> c n -- unify vars with no args? I.Var v1 as1 -> case e2 of I.Var v2 as2 | cdfv + na + nl - v1 == tctx + nl - v2 -> fes nl (n + 1) c as1 as2 _ -> Nothing _ -> case (e1, e2) of (I.MetaV{}, _) -> c n (_, I.MetaV{}) -> c n (I.Lam hid1 b1, I.Lam hid2 b2) | hid1 == hid2 -> f (nl + 1) n c (I.absBody b1) (I.absBody b2) (I.Lit lit1, I.Lit lit2) | lit1 == lit2 -> c (n + 1) (I.Def n1 as1, I.Def n2 as2) | n1 == n2 -> fes nl (n + 1) c as1 as2 (I.Con n1 _ as1, I.Con n2 _ as2) | n1 == n2 -> fs nl (n + 1) c as1 as2 (I.Pi (Cm.Dom{domInfo = info1, unDom = it1}) ot1, I.Pi (Cm.Dom{domInfo = info2, unDom = it2}) ot2) | Cm.argInfoHiding info1 == Cm.argInfoHiding info2 -> ft nl n (\n -> ft (nl + 1) n c (I.absBody ot1) (I.absBody ot2)) it1 it2 (I.Sort{}, I.Sort{}) -> c n -- sloppy _ -> Nothing fs nl n c es1 es2 = case (es1, es2) of ([], []) -> c n (I.Apply (Cm.Arg info1 e1) : es1, I.Apply (Cm.Arg info2 e2) : es2) | Cm.argInfoHiding info1 == Cm.argInfoHiding info2 -> f nl n (\n -> fs nl n c es1 es2) e1 e2 _ -> Nothing fes nl n c es1 es2 = case (es1, es2) of ([], []) -> c n (I.Proj _ f : es1, I.Proj _ f' : es2) | f == f' -> fes nl n c es1 es2 (I.Apply (Cm.Arg info1 e1) : es1, I.Apply (Cm.Arg info2 e2) : es2) | Cm.argInfoHiding info1 == Cm.argInfoHiding info2 -> f nl n (\n -> fes nl n c es1 es2) e1 e2 _ -> Nothing Agda-2.6.0.1/src/full/Agda/Auto/Options.hs0000644000000000000000000000577413466402171016205 0ustar0000000000000000module Agda.Auto.Options where import Data.Char import Control.Monad.State import Agda.Utils.Lens data Mode = MNormal Bool Bool -- true if list mode, true if disprove | MCaseSplit | MRefine Bool -- true if list mode data AutoHintMode = AHMNone | AHMModule type Hints = [String] newtype TimeOut = TimeOut { getTimeOut :: Int } -- in ms instance Show TimeOut where show = show . getTimeOut -- | Options for Auto, default value and lenses data AutoOptions = AutoOptions { autoHints :: Hints , autoTimeOut :: TimeOut , autoPick :: Int , autoMode :: Mode , autoHintMode :: AutoHintMode } initAutoOptions :: AutoOptions initAutoOptions = AutoOptions { autoHints = [] , autoTimeOut = TimeOut 1000 , autoPick = 0 , autoMode = MNormal False False , autoHintMode = AHMNone } aoHints :: Lens' Hints AutoOptions aoHints f s = f (autoHints s) <&> \x -> s {autoHints = x} aoTimeOut :: Lens' TimeOut AutoOptions aoTimeOut f s = f (autoTimeOut s) <&> \x -> s {autoTimeOut = x} aoPick :: Lens' Int AutoOptions aoPick f s = f (autoPick s) <&> \x -> s {autoPick = x} aoMode :: Lens' Mode AutoOptions aoMode f s = f (autoMode s) <&> \x -> s {autoMode = x} aoHintMode :: Lens' AutoHintMode AutoOptions aoHintMode f s = f (autoHintMode s) <&> \x -> s {autoHintMode = x} -- | Tokenising the input (makes `parseArgs` cleaner) data AutoToken = M | C | R | D | L | T String | S Int | H String autoTokens :: [String] -> [AutoToken] autoTokens [] = [] autoTokens ("-t" : t : ws) = T t : autoTokens ws autoTokens ("-s" : s : ws) = S (read s) : autoTokens ws autoTokens ("-l" : ws) = L : autoTokens ws autoTokens ("-d" : ws) = D : autoTokens ws autoTokens ("-m" : ws) = M : autoTokens ws autoTokens ("-c" : ws) = C : autoTokens ws autoTokens ("-r" : ws) = R : autoTokens ws autoTokens (h : ws) = H h : autoTokens ws parseTime :: String -> Int parseTime [] = 0 parseTime xs = read ds * modifier + parseTime r where (ds , modr) = span isDigit xs (mod , r) = span (not . isDigit) modr modifier = case mod of "ms" -> 1 "cs" -> 10 "ds" -> 100 "s" -> 1000 _ -> 1000 parseArgs :: String -> AutoOptions parseArgs s = mapM_ step (autoTokens $ words s) `execState` initAutoOptions where step :: AutoToken -> State AutoOptions () step M = aoHintMode .= AHMModule step C = aoMode .= MCaseSplit step R = aoPick .= (-1) >> aoMode .= MRefine False step (T t) = aoTimeOut .= TimeOut (parseTime t) step (S p) = aoPick .= p step (H h) = aoHints %= (h :) step D = do mode <- use aoMode case mode of MNormal lm _ -> aoMode .= MNormal lm True _ -> return () step L = do mode <- use aoMode case mode of MNormal _ dp -> aoMode .= MNormal True dp MRefine _ -> aoMode .= MRefine True _ -> return () Agda-2.6.0.1/src/full/Agda/Auto/SearchControl.hs0000644000000000000000000003650713466402171017316 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.Auto.SearchControl where import Control.Applicative hiding (getConst, Const(..)) import Control.Monad import Data.IORef import Control.Monad.State import Data.Maybe (mapMaybe, fromMaybe) import Agda.Syntax.Common (Hiding(..)) import Agda.Auto.NarrowingSearch import Agda.Auto.Syntax #include "undefined.h" import Agda.Utils.Impossible instance Refinable (ArgList o) (RefInfo o) where refinements _ infos _ = return $ fmap (Move 0) $ [ return ALNil, cons NotHidden, cons Hidden ] ++ if getIsDep infos then [] else [ proj NotHidden, proj Hidden ] where getIsDep :: [RefInfo o] -> Bool getIsDep (x : xs) = case x of RICheckElim isDep -> isDep _ -> getIsDep xs getIsDep _ = __IMPOSSIBLE__ proj :: Hiding -> RefCreateEnv (RefInfo o) (ArgList o) proj hid = ALProj <$> newPlaceholder <*> newPlaceholder <*> return hid <*> newPlaceholder cons :: Hiding -> RefCreateEnv (RefInfo o) (ArgList o) cons hid = ALCons hid <$> newPlaceholder <*> newPlaceholder data ExpRefInfo o = ExpRefInfo { eriMain :: Maybe (RefInfo o) , eriUnifs :: [RefInfo o] , eriInfTypeUnknown :: Bool , eriIsEliminand :: Bool , eriUsedVars :: Maybe ([UId o], [Elr o]) , eriIotaStep :: Maybe Bool , eriPickSubsVar :: Bool , eriEqRState :: Maybe EqReasoningState } initExpRefInfo :: ExpRefInfo o initExpRefInfo = ExpRefInfo { eriMain = Nothing , eriUnifs = [] , eriInfTypeUnknown = False , eriIsEliminand = False , eriUsedVars = Nothing , eriIotaStep = Nothing , eriPickSubsVar = False , eriEqRState = Nothing } getinfo :: [RefInfo o] -> ExpRefInfo o getinfo = foldl step initExpRefInfo where step :: ExpRefInfo o -> RefInfo o -> ExpRefInfo o step eri x@RIMainInfo{} = eri { eriMain = Just x } step eri x@RIUnifInfo{} = eri { eriUnifs = x : eriUnifs eri } step eri RIInferredTypeUnknown = eri { eriInfTypeUnknown = True } step eri RINotConstructor = eri { eriIsEliminand = True } step eri (RIUsedVars nuids nused) = eri { eriUsedVars = Just (nuids, nused) } step eri (RIIotaStep semif) = eri { eriIotaStep = Just iota' } where iota' = semif || fromMaybe False (eriIotaStep eri) step eri RIPickSubsvar = eri { eriPickSubsVar = True } step eri (RIEqRState s) = eri { eriEqRState = Just s } step eri _ = __IMPOSSIBLE__ -- | @univar sub v@ figures out what the name of @v@ "outside" of -- the substitution @sub@ ought to be, if anything. univar :: [CAction o] -> Nat -> Maybe Nat univar cl v = getOutsideName cl v 0 where getOutsideName :: [CAction o] -> Nat -> Nat -> Maybe Nat -- @v@ is offset by @v'@ binders getOutsideName [] v v' = Just (v' + v) -- @v@ was introduced by the weakening: disappears getOutsideName (Weak n : _) v v' | v < n = Nothing -- @v@ was introduced before the weakening: strengthened getOutsideName (Weak n : xs) v v' = getOutsideName xs (v - n) v' -- Name of @v@ before the substitution was pushed in -- had to be offset by 1 getOutsideName (Sub _ : xs) v v' = getOutsideName xs v (v' + 1) -- If this is the place where @v@ was bound, it used to -- be called 0 + offset of all the vars substituted for getOutsideName (Skip : _) 0 v' = Just v' -- Going over a binder: de Bruijn name of @v@ decreased -- but offset increased getOutsideName (Skip : xs) v v' = getOutsideName xs (v - 1) (v' + 1) -- | List of the variables instantiated by the substitution subsvars :: [CAction o] -> [Nat] subsvars = f 0 where f :: Nat -> [CAction o] -> [Nat] f n [] = [] f n (Weak _ : xs) = f n xs -- why? f n (Sub _ : xs) = n : f (n + 1) xs f n (Skip : xs) = f (n + 1) xs -- | Moves -- A move is composed of a @Cost@ together with an action -- computing the refined problem. type Move o = Move' (RefInfo o) (Exp o) -- | New constructors -- Taking a step towards a solution consists in picking a -- constructor and filling in the missing parts with -- placeholders to be discharged later on. newAbs :: MId -> RefCreateEnv blk (Abs (MM a blk)) newAbs mid = Abs mid <$> newPlaceholder newLam :: Hiding -> MId -> RefCreateEnv (RefInfo o) (Exp o) newLam hid mid = Lam hid <$> newAbs mid newPi :: UId o -> Bool -> Hiding -> RefCreateEnv (RefInfo o) (Exp o) newPi uid dep hid = Pi (Just uid) hid dep <$> newPlaceholder <*> newAbs NoId foldArgs :: [(Hiding, MExp o)] -> MArgList o foldArgs = foldr (\ (h, a) sp -> NotM $ ALCons h a sp) (NotM ALNil) -- | New spine of arguments potentially using placeholders newArgs' :: [Hiding] -> [MExp o] -> RefCreateEnv (RefInfo o) (MArgList o) newArgs' h tms = foldArgs . zip h . (++ tms) <$> replicateM size newPlaceholder where size = length h - length tms newArgs :: [Hiding] -> RefCreateEnv (RefInfo o) (MArgList o) newArgs h = newArgs' h [] -- | New @App@lication node using a new spine of arguments -- respecting the @Hiding@ annotation newApp' :: UId o -> ConstRef o -> [Hiding] -> [MExp o] -> RefCreateEnv (RefInfo o) (Exp o) newApp' meta cst hds tms = App (Just meta) <$> newOKHandle <*> return (Const cst) <*> newArgs' hds tms newApp :: UId o -> ConstRef o -> [Hiding] -> RefCreateEnv (RefInfo o) (Exp o) newApp meta cst hds = newApp' meta cst hds [] -- | Equality reasoning steps -- The begin token is accompanied by two steps because -- it does not make sense to have a derivation any shorter -- than that. eqStep :: UId o -> EqReasoningConsts o -> Move o eqStep meta eqrc = Move costEqStep $ newApp meta (eqrcStep eqrc) [Hidden, Hidden, NotHidden, Hidden, Hidden, NotHidden, NotHidden] eqEnd :: UId o -> EqReasoningConsts o -> Move o eqEnd meta eqrc = Move costEqEnd $ newApp meta (eqrcEnd eqrc) [Hidden, Hidden, NotHidden] eqCong :: UId o -> EqReasoningConsts o -> Move o eqCong meta eqrc = Move costEqCong $ newApp meta (eqrcCong eqrc) [Hidden, Hidden, Hidden, Hidden, NotHidden, Hidden, Hidden, NotHidden] eqSym :: UId o -> EqReasoningConsts o -> Move o eqSym meta eqrc = Move costEqSym $ newApp meta (eqrcSym eqrc) [Hidden, Hidden, Hidden, Hidden, NotHidden] eqBeginStep2 :: UId o -> EqReasoningConsts o -> Move o eqBeginStep2 meta eqrc = Move costEqStep $ do e1 <- newApp meta (eqrcStep eqrc) [Hidden, Hidden, NotHidden, Hidden, Hidden, NotHidden, NotHidden] e2 <- newApp' meta (eqrcStep eqrc) [Hidden, Hidden, NotHidden, Hidden, Hidden, NotHidden, NotHidden] [NotM e1] newApp' meta (eqrcBegin eqrc) [Hidden, Hidden, Hidden, Hidden, NotHidden] [NotM e2] -- | Pick the first unused UId amongst the ones you have seen (GA: ??) -- Defaults to the head of the seen ones. pickUid :: forall o. [UId o] -> [Maybe (UId o)] -> (Maybe (UId o), Bool) pickUid used seen = maybe (head seen, False) (, True) $ firstUnused seen where {- ?? which uid to pick -} firstUnused :: [Maybe (UId o)] -> Maybe (Maybe (UId o)) firstUnused [] = Nothing firstUnused (Nothing : _) = Just Nothing firstUnused (mu@(Just u) : us) = if u `elem` used then firstUnused us else Just mu instance Refinable (Exp o) (RefInfo o) where refinements envinfo infos meta = let hints = rieHints envinfo deffreevars = rieDefFreeVars envinfo meqr = rieEqReasoningConsts envinfo ExpRefInfo { eriMain = Just (RIMainInfo n tt iotastepdone) , eriUnifs = unis , eriInfTypeUnknown = inftypeunknown , eriIsEliminand = iseliminand , eriUsedVars = Just (uids, usedvars) , eriIotaStep = iotastep , eriPickSubsVar = picksubsvar , eriEqRState = meqrstate } = getinfo infos eqrstate = fromMaybe EqRSNone meqrstate set l = return $ Sort (Set l) in case unis of [] -> let eqr = fromMaybe __IMPOSSIBLE__ meqr eq_end = eqEnd meta eqr eq_step = eqStep meta eqr eq_cong = eqCong meta eqr eq_sym = eqSym meta eqr eq_begin_step2 = eqBeginStep2 meta eqr adjustCost i = if inftypeunknown then costInferredTypeUnkown else i varcost v | v < n - deffreevars = adjustCost $ if elem v (mapMaybe getVar usedvars) then costAppVarUsed else costAppVar varcost v | otherwise = adjustCost costAppHint varapps = map (\ v -> Move (varcost v) $ app n meta Nothing (Var v)) [0..n - 1] hintapps = map (\(c, hm) -> Move (cost c hm) (app n meta Nothing (Const c))) hints where cost :: ConstRef o -> HintMode -> Cost cost c hm = adjustCost $ case (iotastep , hm) of (Just _ , _ ) -> costIotaStep (Nothing , HMNormal) -> if elem c (mapMaybe getConst usedvars) then costAppHintUsed else costAppHint (Nothing , HMRecCall) -> if elem c (mapMaybe getConst usedvars) then costAppRecCallUsed else costAppRecCall generics = varapps ++ hintapps in case rawValue tt of _ | eqrstate == EqRSChain -> return [eq_end, eq_step] HNPi hid _ _ (Abs id _) -> return $ (Move (adjustCost (if iotastepdone then costLamUnfold else costLam)) $ newLam hid id) : (Move costAbsurdLam $ return $ AbsurdLambda hid) : generics HNSort (Set l) -> return $ map (Move (adjustCost costSort) . set) [0..l - 1] ++ map (Move (adjustCost costPi) . newPi meta True) [NotHidden, Hidden] ++ generics HNApp (Const c) _ -> do cd <- readIORef c return $ case cdcont cd of Datatype cons _ | eqrstate == EqRSNone -> map (\c -> Move (adjustCost $ case iotastep of Just True -> costUnification _ -> if length cons <= 1 then costAppConstructorSingle else costAppConstructor) $ app n meta Nothing (Const c)) cons ++ generics ++ (guard (maybe False ((c ==) . eqrcId) meqr) *> [eq_sym, eq_cong, eq_begin_step2]) _ | eqrstate == EqRSPrf1 -> generics ++ [eq_sym, eq_cong] _ | eqrstate == EqRSPrf2 -> generics ++ [eq_cong] _ -> generics _ -> return generics (RIUnifInfo cl hne : _) -> let subsvarapps = map (Move costUnification . app n meta Nothing . Var) (subsvars cl) mlam = case rawValue tt of HNPi hid _ _ (Abs id _) -> [Move costUnification (newLam hid id)] _ -> [] generics = mlam ++ subsvarapps in return $ case rawValue hne of HNApp (Var v) _ -> let (uid, isunique) = pickUid uids $ seenUIds hne uni = case univar cl v of Just v | v < n -> [Move (costUnificationIf isunique) $ app n meta uid (Var v)] _ -> [] in uni ++ generics HNApp (Const c) _ -> let (uid, isunique) = pickUid uids $ seenUIds hne in (Move (costUnificationIf isunique) $ app n meta uid (Const c)) : generics HNLam{} -> generics HNPi hid possdep _ _ -> let (uid, isunique) = pickUid uids $ seenUIds hne in (Move (costUnificationIf isunique) $ newPi (fromMaybe meta uid) possdep hid) : generics HNSort (Set l) -> map (Move costUnification . set) [0..l] ++ generics HNSort _ -> generics _ -> __IMPOSSIBLE__ where app :: Nat -> UId o -> Maybe (UId o) -> Elr o -> RefCreateEnv (RefInfo o) (Exp o) app n meta muid elr = do p <- newPlaceholder p <- case elr of Var{} -> return p Const c -> do cd <- RefCreateEnv $ lift $ readIORef c let dfvapp 0 _ = p dfvapp i n = NotM $ ALCons NotHidden (NotM $ App Nothing (NotM $ OKVal) (Var n) (NotM ALNil)) (dfvapp (i - 1) (n - 1)) -- NotHidden is ok because agda reification throws these arguments -- away and agsy skips typechecking them return $ dfvapp (cddeffreevars cd) (n - 1) okh <- newOKHandle return $ App (Just $ fromMaybe meta muid) okh elr p extraref :: UId o -> [Maybe (UId o)] -> ConstRef o -> Move o extraref meta seenuids c = Move costAppExtraRef $ app (head seenuids) (Const c) where app muid elr = App (Just $ fromMaybe meta muid) <$> newOKHandle <*> return elr <*> newPlaceholder instance Refinable (ICExp o) (RefInfo o) where refinements _ infos _ = let (RICopyInfo e : _) = infos in return [Move 0 (return e)] instance Refinable (ConstRef o) (RefInfo o) where refinements _ [RICheckProjIndex projs] _ = return $ map (Move 0 . return) projs refinements _ _ _ = __IMPOSSIBLE__ -- --------------------------------- costIncrease, costUnificationOccurs, costUnification, costAppVar, costAppVarUsed, costAppHint, costAppHintUsed, costAppRecCall, costAppRecCallUsed, costAppConstructor, costAppConstructorSingle, costAppExtraRef, costLam, costLamUnfold, costPi, costSort, costIotaStep, costInferredTypeUnkown, costAbsurdLam :: Cost costUnificationIf :: Bool -> Cost costUnificationIf b = if b then costUnification else costUnificationOccurs costIncrease = 1000 costUnificationOccurs = 100 -- 1000001 -- 1 -- 100 costUnification = 0000 costAppVar = 0000 -- 0, 1 costAppVarUsed = 1000 -- 5 costAppHint = 3000 -- 2, 5 costAppHintUsed = 5000 costAppRecCall = 0 -- 1000? costAppRecCallUsed = 10000 -- 1000? costAppConstructor = 1000 costAppConstructorSingle = 0000 costAppExtraRef = 1000 costLam = 0000 -- 1, 0 costLamUnfold = 1000 -- 1, 0 costPi = 1000003 -- 100 -- 5 costSort = 1000004 -- 0 costIotaStep = 3000 -- 1000005 -- 2 -- 100 costInferredTypeUnkown = 1000006 -- 100 costAbsurdLam = 0 costEqStep, costEqEnd, costEqSym, costEqCong :: Cost costEqStep = 2000 costEqEnd = 0 costEqSym = 0 costEqCong = 500 prioNo, prioTypeUnknown, prioTypecheckArgList, prioInferredTypeUnknown, prioCompBeta, prioCompBetaStructured, prioCompareArgList, prioCompIota, prioCompChoice, prioCompUnif, prioCompCopy, prioNoIota, prioAbsurdLambda, prioProjIndex :: Prio prioNo = (-1) prioTypeUnknown = 0 prioTypecheckArgList = 3000 prioInferredTypeUnknown = 4000 prioCompBeta = 4000 prioCompBetaStructured = 4000 prioCompIota = 4000 prioCompChoice = 5000 -- 700 -- 5000 prioCompUnif = 6000 -- 2 prioCompCopy = 8000 prioCompareArgList = 7000 -- 5 -- 2 prioNoIota = 500 -- 500 prioAbsurdLambda = 1000 prioProjIndex = 3000 prioTypecheck :: Bool -> Prio prioTypecheck False = 1000 prioTypecheck True = 0 -- --------------------------------- instance Trav a blk => Trav [a] blk where trav _ [] = return () trav f (x:xs) = trav f x >> trav f xs instance Trav (MId, CExp o) (RefInfo o) where trav f (_, ce) = trav f ce instance Trav (TrBr a o) (RefInfo o) where trav f (TrBr es _) = trav f es instance Trav (Exp o) (RefInfo o) where trav f e = case e of App _ _ _ args -> trav f args Lam _ (Abs _ b) -> trav f b Pi _ _ _ it (Abs _ ot) -> trav f it >> trav f ot Sort _ -> return () AbsurdLambda{} -> return () instance Trav (ArgList o) (RefInfo o) where trav _ ALNil = return () trav f (ALCons _ arg args) = trav f arg >> trav f args trav f (ALProj eas _ _ as) = trav f eas >> trav f as trav f (ALConPar args) = trav f args -- --------------------------------- Agda-2.6.0.1/src/full/Agda/Compiler/0000755000000000000000000000000013466402171015043 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Compiler/Backend.hs-boot0000644000000000000000000000006213466402171017665 0ustar0000000000000000 module Agda.Compiler.Backend where data Backend Agda-2.6.0.1/src/full/Agda/Compiler/Backend.hs0000644000000000000000000001765513466402171016744 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} -- | Interface for compiler backend writers. module Agda.Compiler.Backend ( Backend(..), Backend'(..), Recompile(..), IsMain(..) , Flag , toTreeless , module Agda.Syntax.Treeless , module Agda.TypeChecking.Monad -- For Agda.Main , backendInteraction , parseBackendOptions -- For InteractionTop , callBackend ) where import Control.Monad.State import qualified Data.List as List import Data.Functor import Data.Map (Map) import qualified Data.Map as Map import System.Environment import System.Exit import System.Console.GetOpt import Agda.Syntax.Treeless import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce import Agda.TypeChecking.Pretty as P import Agda.Interaction.Options import Agda.Interaction.FindFile import Agda.Interaction.Highlighting.HTML import Agda.Interaction.Imports (getAllWarnings) import Agda.TypeChecking.Warnings import Agda.Utils.FileName import Agda.Utils.Functor import Agda.Utils.IndexedList import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Compiler.ToTreeless import Agda.Compiler.Common #include "undefined.h" import Agda.Utils.Impossible -- Public interface ------------------------------------------------------- data Backend where Backend :: Backend' opts env menv mod def -> Backend data Backend' opts env menv mod def = Backend' { backendName :: String , backendVersion :: Maybe String -- ^ Optional version information to be printed with @--version@. , options :: opts -- ^ Default options , commandLineFlags :: [OptDescr (Flag opts)] -- ^ Backend-specific command-line flags. Should at minimum contain a -- flag to enable the backend. , isEnabled :: opts -> Bool -- ^ Unless the backend has been enabled, @runAgda@ will fall back to -- vanilla Agda behaviour. , preCompile :: opts -> TCM env -- ^ Called after type checking completes, but before compilation starts. , postCompile :: env -> IsMain -> Map ModuleName mod -> TCM () -- ^ Called after module compilation has completed. The @IsMain@ argument -- is @NotMain@ if the @--no-main@ flag is present. , preModule :: env -> ModuleName -> FilePath -> TCM (Recompile menv mod) -- ^ Called before compilation of each module. Gets the path to the -- @.agdai@ file to allow up-to-date checking of previously written -- compilation results. Should return @Skip m@ if compilation is not -- required. , postModule :: env -> menv -> IsMain -> ModuleName -> [def] -> TCM mod -- ^ Called after all definitions of a module has been compiled. , compileDef :: env -> menv -> IsMain -> Definition -> TCM def -- ^ Compile a single definition. , scopeCheckingSuffices :: Bool -- ^ True if the backend works if @--only-scope-checking@ is used. } data Recompile menv mod = Recompile menv | Skip mod callBackend :: String -> IsMain -> Interface -> TCM () callBackend name iMain i = do backends <- useTC stBackends case [ b | b@(Backend b') <- backends, backendName b' == name ] of Backend b : _ -> compilerMain b iMain i [] -> genericError $ "No backend called '" ++ name ++ "' " ++ "(installed backends: " ++ List.intercalate ", " (List.sort $ otherBackends ++ [ backendName b | Backend b <- backends ]) ++ ")" -- | Backends that are not included in the state, but still available -- to the user. otherBackends :: [String] otherBackends = ["GHCNoMain", "LaTeX", "QuickLaTeX"] -- Internals -------------------------------------------------------------- data BackendWithOpts opts where BackendWithOpts :: Backend' opts env menv mod def -> BackendWithOpts opts backendWithOpts :: Backend -> Some BackendWithOpts backendWithOpts (Backend backend) = Some (BackendWithOpts backend) forgetOpts :: BackendWithOpts opts -> Backend forgetOpts (BackendWithOpts backend) = Backend backend bOptions :: Lens' opts (BackendWithOpts opts) bOptions f (BackendWithOpts b) = f (options b) <&> \ opts -> BackendWithOpts b{ options = opts } embedFlag :: Lens' a b -> Flag a -> Flag b embedFlag l flag = l flag embedOpt :: Lens' a b -> OptDescr (Flag a) -> OptDescr (Flag b) embedOpt l = fmap (embedFlag l) parseBackendOptions :: [Backend] -> [String] -> CommandLineOptions -> OptM ([Backend], CommandLineOptions) parseBackendOptions backends argv opts0 = case makeAll backendWithOpts backends of Some bs -> do let agdaFlags = map (embedOpt lSnd) (deadStandardOptions ++ standardOptions) backendFlags = do Some i <- forgetAll Some $ allIndices bs BackendWithOpts b <- [lookupIndex bs i] opt <- commandLineFlags b return $ embedOpt (lFst . lIndex i . bOptions) opt (backends, opts) <- getOptSimple (stripRTS argv) (agdaFlags ++ backendFlags) (embedFlag lSnd . inputFlag) (bs, opts0) opts <- checkOpts opts return (forgetAll forgetOpts backends, opts) backendInteraction :: [Backend] -> (TCM (Maybe Interface) -> TCM ()) -> TCM (Maybe Interface) -> TCM () backendInteraction [] fallback check = fallback check backendInteraction backends _ check = do opts <- commandLineOptions let backendNames = [ backendName b | Backend b <- backends ] err flag = genericError $ "Cannot mix --" ++ flag ++ " and backends (" ++ List.intercalate ", " backendNames ++ ")" when (optInteractive opts) $ err "interactive" when (optGHCiInteraction opts) $ err "interaction" when (optJSONInteraction opts) $ err "interaction-json" mi <- check -- reset warnings stTCWarnings `setTCLens` [] noMain <- optCompileNoMain <$> pragmaOptions let isMain | noMain = NotMain | otherwise = IsMain case mi of Nothing -> genericError $ "You can only compile modules without unsolved metavariables." Just i -> sequence_ [ compilerMain backend isMain i | Backend backend <- backends ] -- print warnings that might have accumulated during compilation ws <- filter (not . isUnsolvedWarning . tcWarning) <$> getAllWarnings AllWarnings unless (null ws) $ reportSDoc "warning" 1 $ P.vcat $ P.prettyTCM <$> ws compilerMain :: Backend' opts env menv mod def -> IsMain -> Interface -> TCM () compilerMain backend isMain0 i = inCompilerEnv i $ do onlyScoping <- optOnlyScopeChecking <$> commandLineOptions when (not (scopeCheckingSuffices backend) && onlyScoping) $ genericError $ "The --only-scope-checking flag cannot be combined with " ++ backendName backend ++ "." -- Andreas, 2017-08-23, issue #2714 -- If the backend is invoked from Emacs, we can only get the --no-main -- pragma option now, coming from the interface file. isMain <- ifM (optCompileNoMain <$> pragmaOptions) {-then-} (return NotMain) {-else-} (return isMain0) env <- preCompile backend (options backend) mods <- doCompile isMain i $ \ isMain i -> Map.singleton (iModuleName i) <$> compileModule backend env isMain i setInterface i postCompile backend env isMain mods compileModule :: Backend' opts env menv mod def -> env -> IsMain -> Interface -> TCM mod compileModule backend env isMain i = do ifile <- maybe __IMPOSSIBLE__ filePath <$> (findInterfaceFile . toTopLevelModuleName =<< curMName) r <- preModule backend env (iModuleName i) ifile case r of Skip m -> return m Recompile menv -> do defs <- map snd . sortDefs <$> curDefs res <- mapM (compileDef' backend env menv isMain <=< instantiateFull) defs postModule backend env menv isMain (iModuleName i) res compileDef' :: Backend' opts env menv mod def -> env -> menv -> IsMain -> Definition -> TCM def compileDef' backend env menv isMain def = setCurrentRange (defName def) $ compileDef backend env menv isMain def Agda-2.6.0.1/src/full/Agda/Compiler/ToTreeless.hs0000644000000000000000000004373413466402171017503 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.ToTreeless ( toTreeless , closedTermToTreeless ) where import Control.Arrow (first, second) import Control.Monad.Reader import Control.Monad.State import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Internal as I import qualified Agda.Syntax.Treeless as C import Agda.Syntax.Treeless (TTerm, EvaluationStrategy) import Agda.Syntax.Literal import qualified Agda.TypeChecking.CompiledClause as CC import qualified Agda.TypeChecking.CompiledClause.Compile as CC import Agda.TypeChecking.Records (getRecordConstructor) import Agda.TypeChecking.Pretty import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Telescope import Agda.Compiler.Treeless.Builtin import Agda.Compiler.Treeless.Simplify import Agda.Compiler.Treeless.Erase import Agda.Compiler.Treeless.Uncase import Agda.Compiler.Treeless.Pretty import Agda.Compiler.Treeless.Unused import Agda.Compiler.Treeless.AsPatterns import Agda.Compiler.Treeless.Identity import Agda.Syntax.Common import Agda.TypeChecking.Monad as TCM import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.Utils.Functor import qualified Agda.Utils.HashMap as HMap import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Lens import Agda.Utils.Pretty (prettyShow) import qualified Agda.Utils.Pretty as P #include "undefined.h" import Agda.Utils.Impossible prettyPure :: P.Pretty a => a -> TCM Doc prettyPure = return . P.pretty -- | Recompile clauses with forcing translation turned on. getCompiledClauses :: QName -> TCM CC.CompiledClauses getCompiledClauses q = do def <- getConstInfo q let cs = defClauses def isProj | Function{ funProjection = proj } <- theDef def = isJust (projProper =<< proj) | otherwise = False translate | isProj = CC.DontRunRecordPatternTranslation | otherwise = CC.RunRecordPatternTranslation reportSDoc "treeless.convert" 40 $ "-- before clause compiler" $$ (pretty q <+> "=") vcat (map pretty cs) let mst = funSplitTree $ theDef def reportSDoc "treeless.convert" 70 $ caseMaybe mst "-- not using split tree" $ \st -> "-- using split tree" $$ pretty st CC.compileClauses' translate cs mst -- | Converts compiled clauses to treeless syntax. -- -- Note: Do not use any of the concrete names in the returned -- term for identification purposes! If you wish to do so, -- first apply the Agda.Compiler.Treeless.NormalizeNames -- transformation. toTreeless :: EvaluationStrategy -> QName -> TCM (Maybe C.TTerm) toTreeless eval q = ifM (alwaysInline q) (pure Nothing) $ Just <$> toTreeless' eval q toTreeless' :: EvaluationStrategy -> QName -> TCM C.TTerm toTreeless' eval q = flip fromMaybeM (getTreeless q) $ verboseBracket "treeless.convert" 20 ("compiling " ++ prettyShow q) $ do cc <- getCompiledClauses q unlessM (alwaysInline q) $ setTreeless q (C.TDef q) -- so recursive inlining doesn't loop, but not for always inlined -- functions, since that would risk inlining to fail. ccToTreeless eval q cc -- | Does not require the name to refer to a function. cacheTreeless :: EvaluationStrategy -> QName -> TCM () cacheTreeless eval q = do def <- theDef <$> getConstInfo q case def of Function{} -> () <$ toTreeless' eval q _ -> return () ccToTreeless :: EvaluationStrategy -> QName -> CC.CompiledClauses -> TCM C.TTerm ccToTreeless eval q cc = do let pbody b = pbody' "" b pbody' suf b = sep [ text (prettyShow q ++ suf) <+> "=", nest 2 $ prettyPure b ] v <- ifM (alwaysInline q) (return 20) (return 0) reportSDoc "treeless.convert" (30 + v) $ "-- compiled clauses of" <+> prettyTCM q $$ nest 2 (prettyPure cc) body <- casetreeTop eval cc reportSDoc "treeless.opt.converted" (30 + v) $ "-- converted" $$ pbody body body <- runPipeline eval q (compilerPipeline v q) body used <- usedArguments q body when (any not used) $ reportSDoc "treeless.opt.unused" (30 + v) $ "-- used args:" <+> hsep [ if u then text [x] else "_" | (x, u) <- zip ['a'..] used ] $$ pbody' "[stripped]" (stripUnusedArguments used body) reportSDoc "treeless.opt.final" (20 + v) $ pbody body setTreeless q body setCompiledArgUse q used return body data Pipeline = FixedPoint Int Pipeline | Sequential [Pipeline] | SinglePass CompilerPass data CompilerPass = CompilerPass { passTag :: String , passVerbosity :: Int , passName :: String , passCode :: EvaluationStrategy -> TTerm -> TCM TTerm } compilerPass :: String -> Int -> String -> (EvaluationStrategy -> TTerm -> TCM TTerm) -> Pipeline compilerPass tag v name code = SinglePass (CompilerPass tag v name code) compilerPipeline :: Int -> QName -> Pipeline compilerPipeline v q = Sequential [ compilerPass "simpl" (35 + v) "simplification" $ const simplifyTTerm , compilerPass "builtin" (30 + v) "builtin translation" $ const translateBuiltins , FixedPoint 5 $ Sequential [ compilerPass "simpl" (30 + v) "simplification" $ const simplifyTTerm , compilerPass "erase" (30 + v) "erasure" $ eraseTerms q , compilerPass "uncase" (30 + v) "uncase" $ const caseToSeq , compilerPass "aspat" (30 + v) "@-pattern recovery" $ const recoverAsPatterns ] , compilerPass "id" (30 + v) "identity function detection" $ const (detectIdentityFunctions q) ] runPipeline :: EvaluationStrategy -> QName -> Pipeline -> TTerm -> TCM TTerm runPipeline eval q pipeline t = case pipeline of SinglePass p -> runCompilerPass eval q p t Sequential ps -> foldM (flip $ runPipeline eval q) t ps FixedPoint n p -> runFixedPoint n eval q p t runCompilerPass :: EvaluationStrategy -> QName -> CompilerPass -> TTerm -> TCM TTerm runCompilerPass eval q p t = do t' <- passCode p eval t let dbg f = reportSDoc ("treeless.opt." ++ passTag p) (passVerbosity p) $ f $ text ("-- " ++ passName p) pbody b = sep [ text (prettyShow q) <+> "=", nest 2 $ prettyPure b ] dbg $ if | t == t' -> (<+> "(No effect)") | otherwise -> ($$ pbody t') return t' runFixedPoint :: Int -> EvaluationStrategy -> QName -> Pipeline -> TTerm -> TCM TTerm runFixedPoint n eval q pipeline = go 1 where go i t | i > n = do reportSLn "treeless.opt.loop" 20 $ "++ Optimisation loop reached maximum iterations (" ++ show n ++ ")" return t go i t = do reportSLn "treeless.opt.loop" 30 $ "++ Optimisation loop iteration " ++ show i t' <- runPipeline eval q pipeline t if | t == t' -> do reportSLn "treeless.opt.loop" 30 $ "++ Optimisation loop terminating after " ++ show i ++ " iterations" return t' | otherwise -> go (i + 1) t' closedTermToTreeless :: EvaluationStrategy -> I.Term -> TCM C.TTerm closedTermToTreeless eval t = do substTerm t `runReaderT` initCCEnv eval alwaysInline :: QName -> TCM Bool alwaysInline q = do def <- theDef <$> getConstInfo q pure $ case def of -- always inline with functions and pattern lambdas Function{} -> isJust (funExtLam def) || isJust (funWith def) _ -> False -- | Initial environment for expression generation. initCCEnv :: EvaluationStrategy -> CCEnv initCCEnv eval = CCEnv { ccCxt = [] , ccCatchAll = Nothing , ccEvaluation = eval } -- | Environment for naming of local variables. data CCEnv = CCEnv { ccCxt :: CCContext -- ^ Maps case tree de-bruijn indices to TTerm de-bruijn indices , ccCatchAll :: Maybe Int -- ^ TTerm de-bruijn index of the current catch all -- If an inner case has no catch-all clause, we use the one from its parent. , ccEvaluation :: EvaluationStrategy } type CCContext = [Int] type CC = ReaderT CCEnv TCM shift :: Int -> CCContext -> CCContext shift n = map (+n) -- | Term variables are de Bruijn indices. lookupIndex :: Int -- ^ Case tree de bruijn index. -> CCContext -> Int -- ^ TTerm de bruijn index. lookupIndex i xs = fromMaybe __IMPOSSIBLE__ $ xs !!! i -- | Case variables are de Bruijn levels. lookupLevel :: Int -- ^ case tree de bruijn level -> CCContext -> Int -- ^ TTerm de bruijn index lookupLevel l xs = fromMaybe __IMPOSSIBLE__ $ xs !!! (length xs - 1 - l) -- | Compile a case tree into nested case and record expressions. casetreeTop :: EvaluationStrategy -> CC.CompiledClauses -> TCM C.TTerm casetreeTop eval cc = flip runReaderT (initCCEnv eval) $ do let a = commonArity cc lift $ reportSLn "treeless.convert.arity" 40 $ "-- common arity: " ++ show a lambdasUpTo a $ casetree cc casetree :: CC.CompiledClauses -> CC C.TTerm casetree cc = do case cc of CC.Fail -> return C.tUnreachable CC.Done xs v -> withContextSize (length xs) $ do -- Issue 2469: Body context size (`length xs`) may be smaller than current context size -- if some arguments are not used in the body. v <- lift (putAllowedReductions [ProjectionReductions, CopatternReductions] $ normalise v) substTerm v CC.Case _ (CC.Branches True _ _ _ Just{} _ _) -> __IMPOSSIBLE__ -- Andreas, 2016-06-03, issue #1986: Ulf: "no catch-all for copatterns!" -- lift $ do -- typeError . GenericDocError =<< do -- "Not yet implemented: compilation of copattern matching with catch-all clause" CC.Case (Arg _ n) (CC.Branches True conBrs _ _ Nothing _ _) -> lambdasUpTo n $ do mkRecord =<< traverse casetree (CC.content <$> conBrs) CC.Case (Arg _ n) (CC.Branches False conBrs etaBr litBrs catchAll _ lazy) -> lambdasUpTo (n + 1) $ do -- We can treat eta-matches as regular matches here. let conBrs' = Map.union conBrs $ Map.fromList $ map (first conName) $ maybeToList etaBr if Map.null conBrs' && Map.null litBrs then do -- there are no branches, just return default updateCatchAll catchAll fromCatchAll else do caseTy <- case (Map.keys conBrs', Map.keys litBrs) of ((c:_), []) -> do c' <- lift (canonicalName c) dtNm <- conData . theDef <$> lift (getConstInfo c') return $ C.CTData dtNm ([], (LitChar _ _):_) -> return C.CTChar ([], (LitString _ _):_) -> return C.CTString ([], (LitFloat _ _):_) -> return C.CTFloat ([], (LitQName _ _):_) -> return C.CTQName _ -> __IMPOSSIBLE__ updateCatchAll catchAll $ do x <- lookupLevel n <$> asks ccCxt def <- fromCatchAll let caseInfo = C.CaseInfo { caseType = caseTy, caseLazy = lazy } C.TCase x caseInfo def <$> do br1 <- conAlts n conBrs' br2 <- litAlts n litBrs return (br1 ++ br2) where -- normally, Agda should make sure that a pattern match is total, -- so we set the default to unreachable if no default has been provided. fromCatchAll :: CC C.TTerm fromCatchAll = maybe C.tUnreachable C.TVar <$> asks ccCatchAll commonArity :: CC.CompiledClauses -> Int commonArity cc = case arities 0 cc of [] -> 0 as -> minimum as where arities cxt (Case (Arg _ x) (Branches False cons eta lits def _ _)) = concatMap (wArities cxt') (Map.elems cons) ++ concatMap (wArities cxt') (map snd $ maybeToList eta) ++ concatMap (wArities cxt' . WithArity 0) (Map.elems lits) ++ concat [ arities cxt' c | Just c <- [def] ] -- ?? where cxt' = max (x + 1) cxt arities cxt (Case _ Branches{projPatterns = True}) = [cxt] arities cxt (Done xs _) = [max cxt (length xs)] arities _ Fail = [] wArities cxt (WithArity k c) = map (\ x -> x - k + 1) $ arities (cxt - 1 + k) c updateCatchAll :: Maybe CC.CompiledClauses -> (CC C.TTerm -> CC C.TTerm) updateCatchAll Nothing cont = cont updateCatchAll (Just cc) cont = do def <- casetree cc local (\e -> e { ccCatchAll = Just 0, ccCxt = shift 1 (ccCxt e) }) $ do C.mkLet def <$> cont -- | Shrinks or grows the context to the given size. -- Does not update the catchAll expression, the catchAll expression -- MUST NOT be used inside `cont`. withContextSize :: Int -> CC C.TTerm -> CC C.TTerm withContextSize n cont = do diff <- (n -) . length <$> asks ccCxt if diff <= 0 then do local (\e -> e { ccCxt = shift diff $ drop (-diff) (ccCxt e)}) $ C.mkTApp <$> cont <*> pure [C.TVar i | i <- reverse [0..(-diff - 1)]] else do local (\e -> e { ccCxt = [0..(diff - 1)] ++ shift diff (ccCxt e)}) $ do createLambdas diff <$> do cont where createLambdas :: Int -> C.TTerm -> C.TTerm createLambdas 0 cont' = cont' createLambdas i cont' | i > 0 = C.TLam (createLambdas (i - 1) cont') createLambdas _ _ = __IMPOSSIBLE__ -- | Adds lambdas until the context has at least the given size. -- Updates the catchAll expression to take the additional lambdas into account. lambdasUpTo :: Int -> CC C.TTerm -> CC C.TTerm lambdasUpTo n cont = do diff <- (n -) . length <$> asks ccCxt if diff <= 0 then cont -- no new lambdas needed else do catchAll <- asks ccCatchAll withContextSize n $ do case catchAll of Just catchAll' -> do -- the catch all doesn't know about the additional lambdas, so just directly -- apply it again to the newly introduced lambda arguments. -- we also bind the catch all to a let, to avoid code duplication local (\e -> e { ccCatchAll = Just 0 , ccCxt = shift 1 (ccCxt e)}) $ do let catchAllArgs = map C.TVar $ reverse [0..(diff - 1)] C.mkLet (C.mkTApp (C.TVar $ catchAll' + diff) catchAllArgs) <$> cont Nothing -> cont conAlts :: Int -> Map QName (CC.WithArity CC.CompiledClauses) -> CC [C.TAlt] conAlts x br = forM (Map.toList br) $ \ (c, CC.WithArity n cc) -> do c' <- lift $ canonicalName c replaceVar x n $ do branch (C.TACon c' n) cc litAlts :: Int -> Map Literal CC.CompiledClauses -> CC [C.TAlt] litAlts x br = forM (Map.toList br) $ \ (l, cc) -> -- Issue1624: we need to drop the case scrutinee from the environment here! replaceVar x 0 $ do branch (C.TALit l ) cc branch :: (C.TTerm -> C.TAlt) -> CC.CompiledClauses -> CC C.TAlt branch alt cc = do alt <$> casetree cc -- | Replace de Bruijn Level @x@ by @n@ new variables. replaceVar :: Int -> Int -> CC a -> CC a replaceVar x n cont = do let upd cxt = shift n ys ++ ixs ++ shift n zs where -- compute the de Bruijn index i = length cxt - 1 - x -- discard index i (ys, _:zs) = splitAt i cxt -- compute the de-bruijn indexes of the newly inserted variables ixs = [0..(n - 1)] local (\e -> e { ccCxt = upd (ccCxt e) , ccCatchAll = (+n) <$> ccCatchAll e }) $ cont -- | Precondition: Map not empty. mkRecord :: Map QName C.TTerm -> CC C.TTerm mkRecord fs = lift $ do -- Get the name of the first field let p1 = fst $ fromMaybe __IMPOSSIBLE__ $ headMaybe $ Map.toList fs -- Use the field name to get the record constructor and the field names. I.ConHead c _ind xs <- conSrcCon . theDef <$> (getConstInfo =<< canonicalName . I.conName =<< recConFromProj p1) reportSDoc "treeless.convert.mkRecord" 60 $ vcat [ text "record constructor fields: xs = " <+> (text . show) xs , text "to be filled with content: keys fs = " <+> (text . show) (Map.keys fs) ] -- Convert the constructor let (args :: [C.TTerm]) = for xs $ \ (Arg ai x) -> Map.findWithDefault __IMPOSSIBLE__ x fs return $ C.mkTApp (C.TCon c) args recConFromProj :: QName -> TCM I.ConHead recConFromProj q = do caseMaybeM (isProjection q) __IMPOSSIBLE__ $ \ proj -> do let d = unArg $ projFromType proj getRecordConstructor d -- | Translate the actual Agda terms, with an environment of all the bound variables -- from patternmatching. Agda terms are in de Bruijn indices, but the expected -- TTerm de bruijn indexes may differ. This is due to additional let-bindings -- introduced by the catch-all machinery, so we need to lookup casetree de bruijn -- indices in the environment as well. substTerm :: I.Term -> CC C.TTerm substTerm term = normaliseStatic term >>= \ term -> case I.unSpine term of I.Var ind es -> do ind' <- lookupIndex ind <$> asks ccCxt let args = fromMaybe __IMPOSSIBLE__ $ I.allApplyElims es C.mkTApp (C.TVar ind') <$> substArgs args I.Lam _ ab -> C.TLam <$> local (\e -> e { ccCxt = 0 : (shift 1 $ ccCxt e) }) (substTerm $ I.unAbs ab) I.Lit l -> return $ C.TLit l I.Level _ -> return C.TUnit I.Def q es -> do let args = fromMaybe __IMPOSSIBLE__ $ I.allApplyElims es maybeInlineDef q args I.Con c ci es -> do let args = fromMaybe __IMPOSSIBLE__ $ I.allApplyElims es c' <- lift $ canonicalName $ I.conName c C.mkTApp (C.TCon c') <$> substArgs args I.Pi _ _ -> return C.TUnit I.Sort _ -> return C.TSort I.MetaV _ _ -> __IMPOSSIBLE__ -- we don't compiled if unsolved metas I.DontCare _ -> return C.TErased I.Dummy{} -> __IMPOSSIBLE__ normaliseStatic :: I.Term -> CC I.Term normaliseStatic v@(I.Def f es) = lift $ do static <- isStaticFun . theDef <$> getConstInfo f if static then normalise v else pure v normaliseStatic v = pure v maybeInlineDef :: I.QName -> I.Args -> CC C.TTerm maybeInlineDef q vs = do eval <- asks ccEvaluation ifM (lift $ alwaysInline q) (doinline eval) $ do lift $ cacheTreeless eval q def <- lift $ getConstInfo q case theDef def of fun@Function{} | fun ^. funInline -> doinline eval | otherwise -> do used <- lift $ getCompiledArgUse q let substUsed False _ = pure C.TErased substUsed True arg = substArg arg C.mkTApp (C.TDef q) <$> sequence [ substUsed u arg | (arg, u) <- zip vs $ used ++ repeat True ] _ -> C.mkTApp (C.TDef q) <$> substArgs vs where doinline eval = C.mkTApp <$> inline eval q <*> substArgs vs inline eval q = lift $ toTreeless' eval q substArgs :: [Arg I.Term] -> CC [C.TTerm] substArgs = traverse substArg substArg :: Arg I.Term -> CC C.TTerm substArg x | usableModality x = substTerm (unArg x) | otherwise = return C.TErased Agda-2.6.0.1/src/full/Agda/Compiler/Common.hs0000644000000000000000000001476313466402171016642 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} module Agda.Compiler.Common where import Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Char import Data.Function import Data.Semigroup import Data.Monoid hiding ((<>)) import Control.Monad import Control.Monad.State hiding (mapM_, forM_, mapM, forM, sequence) import Agda.Syntax.Common import qualified Agda.Syntax.Abstract.Name as A import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Internal as I import Agda.Interaction.FindFile import Agda.Interaction.Imports import Agda.Interaction.Options import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.FileName import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty hiding ((<>)) #include "undefined.h" import Agda.Utils.Impossible data IsMain = IsMain | NotMain deriving (Eq, Show) -- | Conjunctive semigroup ('NotMain' is absorbing). instance Semigroup IsMain where NotMain <> _ = NotMain _ <> NotMain = NotMain IsMain <> IsMain = IsMain instance Monoid IsMain where mempty = IsMain mappend = (<>) doCompile :: forall r. Monoid r => IsMain -> Interface -> (IsMain -> Interface -> TCM r) -> TCM r doCompile isMain i f = do -- The Agda.Primitive module is implicitly assumed to be always imported, -- even though it not necesseraly occurs in iImportedModules. -- TODO: there should be a better way to get hold of Agda.Primitive? [agdaPrimInter] <- filter (("Agda.Primitive"==) . prettyShow . iModuleName) . map miInterface . Map.elems <$> getVisitedModules flip evalStateT Set.empty $ mappend <$> comp NotMain agdaPrimInter <*> comp isMain i where comp :: IsMain -> Interface -> StateT (Set ModuleName) TCM r comp isMain i = do alreadyDone <- Set.member (iModuleName i) <$> get if alreadyDone then return mempty else do imps <- lift $ map miInterface . catMaybes <$> mapM (getVisitedModule . toTopLevelModuleName . fst) (iImportedModules i) ri <- mconcat <$> mapM (comp NotMain) imps lift $ setInterface i r <- lift $ f isMain i modify (Set.insert $ iModuleName i) return $ mappend ri r setInterface :: Interface -> TCM () setInterface i = do opts <- getsTC (stPersistentOptions . stPersistentState) setCommandLineOptions opts mapM_ setOptionsFromPragma (iPragmaOptions i) stImportedModules `setTCLens` Set.fromList (map fst $ iImportedModules i) stCurrentModule `setTCLens` Just (iModuleName i) curIF :: TCM Interface curIF = do mName <- useTC stCurrentModule case mName of Nothing -> __IMPOSSIBLE__ Just name -> do mm <- getVisitedModule (toTopLevelModuleName name) case mm of Nothing -> __IMPOSSIBLE__ Just mi -> return $ miInterface mi curSig :: TCM Signature curSig = iSignature <$> curIF curMName :: TCM ModuleName curMName = sigMName <$> curSig curDefs :: TCM Definitions curDefs = fmap (HMap.filter (not . defNoCompilation)) $ (^. sigDefinitions) <$> curSig sortDefs :: Definitions -> [(QName, Definition)] sortDefs defs = -- The list is sorted to ensure that the order of the generated -- definitions does not depend on things like the number of bits -- in an Int (see Issue 1900). List.sortBy (compare `on` fst) $ HMap.toList defs sigMName :: Signature -> ModuleName sigMName sig = case Map.keys (sig ^. sigSections) of [] -> __IMPOSSIBLE__ m : _ -> m compileDir :: TCM FilePath compileDir = do mdir <- optCompileDir <$> commandLineOptions case mdir of Just dir -> return dir Nothing -> __IMPOSSIBLE__ repl :: [String] -> String -> String repl subs = go where go ('<':'<':c:'>':'>':s) | 0 <= i && i < length subs = subs !! i ++ go s where i = ord c - ord '0' go (c:s) = c : go s go [] = [] -- | Copy pasted from MAlonzo.... -- Move somewhere else! conArityAndPars :: QName -> TCM (Nat, Nat) conArityAndPars q = do def <- getConstInfo q n <- typeArity (defType def) let Constructor{ conPars = np } = theDef def return (n - np, np) -- | Sets up the compilation environment. inCompilerEnv :: Interface -> TCM a -> TCM a inCompilerEnv mainI cont = do -- Preserve the state (the compiler modifies the state). -- Andreas, 2014-03-23 But we might want to collect Benchmark info, -- so use localTCState. -- FNF, 2017-02-22 we also want to keep the warnings we have encountered, -- so use localTCStateSaving and pick them out. (a , s) <- localTCStateSaving $ do -- Compute the output directory. Note: using commandLineOptions would make -- the current pragma options persistent when we setCommandLineOptions -- below. opts <- getsTC $ stPersistentOptions . stPersistentState compileDir <- case optCompileDir opts of Just dir -> return dir Nothing -> do -- The default output directory is the project root. let tm = toTopLevelModuleName $ iModuleName mainI f <- findFile tm return $ filePath $ C.projectRoot f tm setCommandLineOptions $ opts { optCompileDir = Just compileDir } -- Andreas, 2017-08-23, issue #2714 recover pragma option --no-main -- Unfortunately, a pragma option is stored in the interface file as -- just a list of strings, thus, the solution is a bit of hack: -- We match on whether @["--no-main"]@ is one of the stored options. when (["--no-main"] `elem` iPragmaOptions mainI) $ stPragmaOptions `modifyTCLens` \ o -> o { optCompileNoMain = True } setScope (iInsideScope mainI) -- so that compiler errors don't use overly qualified names ignoreAbstractMode $ do cont -- keep generated warnings let newWarnings = stPostTCWarnings $ stPostScopeState $ s stTCWarnings `setTCLens` newWarnings return a topLevelModuleName :: ModuleName -> TCM ModuleName topLevelModuleName m = do -- get the names of the visited modules visited <- List.map (iModuleName . miInterface) . Map.elems <$> getVisitedModules -- find the module with the longest matching prefix to m let ms = sortBy (compare `on` (length . mnameToList)) $ List.filter (\ m' -> mnameToList m' `isPrefixOf` mnameToList m) visited case ms of (m' : _) -> return m' -- if we did not get anything, it may be because m is a section -- (a module _ ), see e.g. #1866 [] -> curMName Agda-2.6.0.1/src/full/Agda/Compiler/CallCompiler.hs0000644000000000000000000000506613466402171017754 0ustar0000000000000000{-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- | A command which calls a compiler ------------------------------------------------------------------------ module Agda.Compiler.CallCompiler where import qualified Control.Exception as E import Control.Monad.Trans import Data.List ( intercalate ) import qualified Data.List as List import System.Exit import System.IO import System.Process import Agda.TypeChecking.Monad #include "undefined.h" import Agda.Utils.Impossible -- | Calls a compiler: -- -- * Checks the exit code to see if the compiler exits successfully. -- If not, then an exception is raised, containing the text the -- compiler printed to stderr (if any). -- -- * Uses the debug printout machinery to relay any progress -- information the compiler prints to stdout. callCompiler :: Bool -- ^ Should we actually call the compiler -> FilePath -- ^ The path to the compiler -> [String] -- ^ Command-line arguments. -> TCM () callCompiler doCall cmd args = if doCall then do merrors <- callCompiler' cmd args case merrors of Nothing -> return () Just errors -> typeError (CompilationError errors) else reportSLn "compile.cmd" 1 $ "NOT calling: " ++ intercalate " " (cmd : args) -- | Generalisation of @callCompiler@ where the raised exception is -- returned. callCompiler' :: FilePath -- ^ The path to the compiler -> [String] -- ^ Command-line arguments. -> TCM (Maybe String) callCompiler' cmd args = do reportSLn "compile.cmd" 1 $ "Calling: " ++ intercalate " " (cmd : args) (_, out, err, p) <- liftIO $ createProcess (proc cmd args) { std_err = CreatePipe , std_out = CreatePipe } -- In -v0 mode we throw away any progress information printed to -- stdout. case out of Nothing -> __IMPOSSIBLE__ Just out -> forkTCM $ do -- The handle should be in text mode. liftIO $ hSetBinaryMode out False progressInfo <- liftIO $ hGetContents out mapM_ (reportSLn "compile.output" 1) $ lines progressInfo errors <- liftIO $ case err of Nothing -> __IMPOSSIBLE__ Just err -> do -- The handle should be in text mode. hSetBinaryMode err False hGetContents err exitcode <- liftIO $ do -- Ensure that the output has been read before waiting for the -- process. _ <- E.evaluate (length errors) waitForProcess p case exitcode of ExitFailure _ -> return $ Just errors _ -> return Nothing Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/0000755000000000000000000000000013466402171016631 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/EliminateLiteralPatterns.hs0000644000000000000000000000450313466402171024134 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Converts case matches on literals to if cascades with equality comparisons. module Agda.Compiler.Treeless.EliminateLiteralPatterns where import Data.Maybe import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Treeless import Agda.Syntax.Literal import qualified Agda.Syntax.Internal as I import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Primitive import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Utils.Impossible #include "undefined.h" eliminateLiteralPatterns :: TTerm -> TCM TTerm eliminateLiteralPatterns t = do kit <- BuiltinKit <$> getBuiltinName builtinNat <*> getBuiltinName builtinInteger return $ transform kit t data BuiltinKit = BuiltinKit { nat :: Maybe QName , int :: Maybe QName } transform :: BuiltinKit -> TTerm -> TTerm transform kit = tr where tr :: TTerm -> TTerm tr t = case t of TCase sc t def alts | caseType t `elem` [CTChar, CTString, CTQName, CTNat, CTInt, CTFloat] -> foldr litAlt (tr def) alts where litAlt :: TAlt -> TTerm -> TTerm litAlt (TALit l body) cont = tIfThenElse (tOp (eqFromLit l) (TLit l) (TVar sc)) (tr body) cont litAlt _ _ = __IMPOSSIBLE__ TCase sc t@CaseInfo{caseType = CTData dt} def alts -> TCase sc t (tr def) (map trAlt alts) where trAlt a = case a of TAGuard g b -> TAGuard (tr g) (tr b) TACon q a b -> TACon q a (tr b) TALit l b -> TALit l (tr b) TCase _ _ _ _ -> __IMPOSSIBLE__ TVar{} -> t TDef{} -> t TCon{} -> t TPrim{} -> t TLit{} -> t TUnit{} -> t TSort{} -> t TErased{} -> t TError{} -> t TCoerce a -> TCoerce (tr a) TLam b -> TLam (tr b) TApp a bs -> TApp (tr a) (map tr bs) TLet e b -> TLet (tr e) (tr b) isCaseOn (CTData dt) xs = dt `elem` mapMaybe ($ kit) xs isCaseOn _ _ = False eqFromLit :: Literal -> TPrim eqFromLit x = case x of LitNat _ _ -> PEqI LitFloat _ _ -> PEqF LitString _ _ -> PEqS LitChar _ _ -> PEqC LitQName _ _ -> PEqQ _ -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Subst.hs0000644000000000000000000001017613466402171020272 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.Compiler.Treeless.Subst where import qualified Data.Map as Map import Data.Map (Map) import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup, (<>), All(..), Any(..) ) import Agda.Syntax.Treeless import Agda.Syntax.Internal (Substitution'(..)) import Agda.TypeChecking.Substitute import Agda.Utils.Impossible #include "undefined.h" instance DeBruijn TTerm where deBruijnVar = TVar deBruijnView (TVar i) = Just i deBruijnView _ = Nothing instance Subst TTerm TTerm where applySubst IdS t = t applySubst rho t = case t of TDef{} -> t TLit{} -> t TCon{} -> t TPrim{} -> t TUnit{} -> t TSort{} -> t TErased{} -> t TError{} -> t TVar i -> lookupS rho i TApp f ts -> tApp (applySubst rho f) (applySubst rho ts) TLam b -> TLam (applySubst (liftS 1 rho) b) TLet e b -> TLet (applySubst rho e) (applySubst (liftS 1 rho) b) TCase i t d bs -> case applySubst rho (TVar i) of TVar j -> TCase j t (applySubst rho d) (applySubst rho bs) e -> TLet e $ TCase 0 t (applySubst rho' d) (applySubst rho' bs) where rho' = wkS 1 rho TCoerce e -> TCoerce (applySubst rho e) where tApp (TPrim PSeq) [TErased, b] = b tApp f ts = TApp f ts instance Subst TTerm TAlt where applySubst rho (TACon c i b) = TACon c i (applySubst (liftS i rho) b) applySubst rho (TALit l b) = TALit l (applySubst rho b) applySubst rho (TAGuard g b) = TAGuard (applySubst rho g) (applySubst rho b) newtype UnderLambda = UnderLambda Any deriving (Eq, Ord, Show, Semigroup, Monoid) newtype SeqArg = SeqArg All deriving (Eq, Ord, Show, Semigroup, Monoid) data Occurs = Occurs Int UnderLambda SeqArg deriving (Eq, Ord, Show) once :: Occurs once = Occurs 1 mempty (SeqArg $ All False) inSeq :: Occurs -> Occurs inSeq (Occurs n l _) = Occurs n l mempty underLambda :: Occurs -> Occurs underLambda o = o <> Occurs 0 (UnderLambda $ Any True) mempty instance Semigroup Occurs where Occurs a k s <> Occurs b l t = Occurs (a + b) (k <> l) (s <> t) instance Monoid Occurs where mempty = Occurs 0 mempty mempty mappend = (<>) class HasFree a where freeVars :: a -> Map Int Occurs freeIn :: HasFree a => Int -> a -> Bool freeIn i x = Map.member i (freeVars x) occursIn :: HasFree a => Int -> a -> Occurs occursIn i x = fromMaybe mempty $ Map.lookup i (freeVars x) instance HasFree Int where freeVars x = Map.singleton x once instance HasFree a => HasFree [a] where freeVars xs = Map.unionsWith mappend $ map freeVars xs instance (HasFree a, HasFree b) => HasFree (a, b) where freeVars (x, y) = Map.unionWith mappend (freeVars x) (freeVars y) data Binder a = Binder Int a instance HasFree a => HasFree (Binder a) where freeVars (Binder 0 x) = freeVars x freeVars (Binder k x) = Map.filterWithKey (\ k _ -> k >= 0) $ Map.mapKeysMonotonic (subtract k) $ freeVars x newtype InSeq a = InSeq a instance HasFree a => HasFree (InSeq a) where freeVars (InSeq x) = inSeq <$> freeVars x instance HasFree TTerm where freeVars t = case t of TDef{} -> Map.empty TLit{} -> Map.empty TCon{} -> Map.empty TPrim{} -> Map.empty TUnit{} -> Map.empty TSort{} -> Map.empty TErased{} -> Map.empty TError{} -> Map.empty TVar i -> freeVars i TApp (TPrim PSeq) [TVar x, b] -> freeVars (InSeq x, b) TApp f ts -> freeVars (f, ts) TLam b -> underLambda <$> freeVars (Binder 1 b) TLet e b -> freeVars (e, Binder 1 b) TCase i _ d bs -> freeVars (i, (d, bs)) TCoerce t -> freeVars t instance HasFree TAlt where freeVars a = case a of TACon _ i b -> freeVars (Binder i b) TALit _ b -> freeVars b TAGuard g b -> freeVars (g, b) -- | Strenghtening. tryStrengthen :: (HasFree a, Subst t a) => Int -> a -> Maybe a tryStrengthen n t = case Map.minViewWithKey (freeVars t) of Just ((i, _), _) | i < n -> Nothing _ -> Just $ applySubst (strengthenS __IMPOSSIBLE__ n) t Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/NormalizeNames.hs0000644000000000000000000000301513466402171022110 0ustar0000000000000000-- | Ensures that all occurences of an abstract name share -- the same concrete name. -- -- Apply this transformation if your backend uses concrete names -- for identification purposes! -- -- The identity of an abstract name is only the nameId, the concrete -- name is only a naming suggestion. If renaming imports are used, -- the concrete name may change. This transformation makes sure -- that all occurences of an abstract name share the same -- concrete name. -- -- This transfomation should be run as the last transformation. {-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.NormalizeNames ( normalizeNames ) where import Agda.TypeChecking.Monad import Agda.Syntax.Treeless normalizeNames :: TTerm -> TCM TTerm normalizeNames = tr where tr t = case t of TDef q -> do q' <- defName <$> getConstInfo q return $ TDef q' TVar{} -> done TCon{} -> done TPrim{} -> done TLit{} -> done TUnit{} -> done TSort{} -> done TErased{} -> done TError{} -> done TLam b -> TLam <$> tr b TApp a bs -> TApp <$> tr a <*> mapM tr bs TLet e b -> TLet <$> tr e <*> tr b TCase sc t def alts -> TCase sc t <$> tr def <*> mapM trAlt alts TCoerce a -> TCoerce <$> tr a where done :: TCM TTerm done = return t trAlt a = case a of TAGuard g b -> TAGuard <$> tr g <*> tr b TACon q a b -> TACon q a <$> tr b TALit l b -> TALit l <$> tr b Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Pretty.hs0000644000000000000000000001236713466402171020465 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.Compiler.Treeless.Pretty () where import Prelude hiding ((!!)) -- don't use partial functions! import Control.Arrow ((&&&), (***), first, second) import Control.Monad.Reader import Data.Maybe import qualified Data.Map as Map import Agda.Syntax.Treeless import Agda.Compiler.Treeless.Subst import Agda.Utils.Pretty import Agda.Utils.List #include "undefined.h" import Agda.Utils.Impossible data PEnv = PEnv { pPrec :: Int , pFresh :: [String] , pBound :: [String] } type P = Reader PEnv withName :: (String -> P a) -> P a withName k = withNames 1 $ \[x] -> k x withNames :: Int -> ([String] -> P a) -> P a withNames n k = do (xs, ys) <- asks $ splitAt n . pFresh local (\ e -> e { pFresh = ys }) (k xs) -- | Don't generate fresh names for unused variables. withNames' :: HasFree a => Int -> a -> ([String] -> P b) -> P b withNames' n tm k = withNames n' $ k . insBlanks where fv = freeVars tm n' = length $ filter (< n) $ Map.keys fv insBlanks = go n where go 0 _ = [] go i xs0@(~(x : xs)) | Map.member (i - 1) fv = x : go (i - 1) xs | otherwise = "_" : go (i - 1) xs0 bindName :: String -> P a -> P a bindName x = local $ \ e -> e { pBound = x : pBound e } bindNames :: [String] -> P a -> P a bindNames xs p = foldr bindName p xs paren :: Int -> P Doc -> P Doc paren p doc = do n <- asks pPrec (if p < n then parens else id) <$> doc prec :: Int -> P a -> P a prec p = local $ \ e -> e { pPrec = p } name :: Int -> P String name x = asks $ (\ xs -> indexWithDefault __IMPOSSIBLE__ xs x) . (++ map (("^" ++) . show) [1..]) . pBound runP :: P a -> a runP p = runReader p PEnv{ pPrec = 0, pFresh = names, pBound = [] } where names = [ x ++ i | i <- "" : map show [1..], x <- map (:[]) ['a'..'z'] ] instance Pretty TTerm where prettyPrec p t = runP $ prec p (pTerm t) opName :: TPrim -> String opName PAdd = "+" opName PSub = "-" opName PMul = "*" opName PQuot = "quot" opName PRem = "rem" opName PGeq = ">=" opName PLt = "<" opName PEqI = "==I" opName PAdd64 = "+64" opName PSub64 = "-64" opName PMul64 = "*64" opName PQuot64 = "quot64" opName PRem64 = "rem64" opName PLt64 = "<64" opName PEq64 = "==64" opName PEqF = "==F" opName PEqS = "==S" opName PEqC = "==C" opName PEqQ = "==Q" opName PIf = "if_then_else_" opName PSeq = "seq" opName PITo64 = "toWord64" opName P64ToI = "fromWord64" isInfix :: TPrim -> Maybe (Int, Int, Int) isInfix op = case op of PMul -> l 7 PAdd -> l 6 PSub -> l 6 PGeq -> non 4 PLt -> non 4 PMul64 -> l 7 PAdd64 -> l 6 PSub64 -> l 6 PLt64 -> non 4 p | isPrimEq p -> non 4 _ -> Nothing where l n = Just (n, n, n + 1) r n = Just (n, n + 1, n) non n = Just (n, n + 1, n + 1) pTerm' :: Int -> TTerm -> P Doc pTerm' p = prec p . pTerm pTerm :: TTerm -> P Doc pTerm t = case t of TVar x -> text <$> name x TApp (TPrim op) [a, b] | Just (c, l, r) <- isInfix op -> paren c $ sep <$> sequence [ pTerm' l a , pure $ text $ opName op , pTerm' r b ] TApp (TPrim PIf) [a, b, c] -> paren 0 $ (\ a b c -> sep [ "if" <+> a , nest 2 $ "then" <+> b , nest 2 $ "else" <+> c ]) <$> pTerm' 0 a <*> pTerm' 0 b <*> pTerm c TDef f -> pure $ pretty f TCon c -> pure $ pretty c TLit l -> pure $ pretty l TPrim op | isJust (isInfix op) -> pure $ text ("_" ++ opName op ++ "_") | otherwise -> pure $ text (opName op) TApp f es -> paren 9 $ (\a bs -> sep [a, nest 2 $ fsep bs]) <$> pTerm' 9 f <*> mapM (pTerm' 10) es TLam _ -> paren 0 $ withNames' n b $ \ xs -> bindNames xs $ (\b -> sep [ text ("λ " ++ unwords xs ++ " →") , nest 2 b ]) <$> pTerm' 0 b where (n, b) = tLamView t TLet{} -> paren 0 $ withNames (length es) $ \ xs -> (\ (binds, b) -> sep [ "let" <+> vcat [ sep [ text x <+> "=" , nest 2 e ] | (x, e) <- binds ] <+> "in", b ]) <$> pLets (zip xs es) b where (es, b) = tLetView t pLets [] b = ([],) <$> pTerm' 0 b pLets ((x, e) : bs) b = do e <- pTerm' 0 e first ((x, e) :) <$> bindName x (pLets bs b) TCase x _ def alts -> paren 0 $ (\ sc alts defd -> sep [ "case" <+> sc <+> "of" , nest 2 $ vcat (alts ++ [ "_ →" <+> defd | null alts || def /= TError TUnreachable ]) ] ) <$> pTerm' 0 (TVar x) <*> mapM pAlt alts <*> pTerm' 0 def where pAlt (TALit l b) = pAlt' <$> pTerm' 0 (TLit l) <*> pTerm' 0 b pAlt (TAGuard g b) = pAlt' <$> (("_" <+> "|" <+>) <$> pTerm' 0 g) <*> (pTerm' 0 b) pAlt (TACon c a b) = withNames' a b $ \ xs -> bindNames xs $ pAlt' <$> pTerm' 0 (TApp (TCon c) [TVar i | i <- reverse [0..a - 1]]) <*> pTerm' 0 b pAlt' p b = sep [p <+> "→", nest 2 b] TUnit -> pure "()" TSort -> pure "Set" TErased -> pure "_" TError err -> paren 9 $ pure $ "error" <+> text (show (show err)) TCoerce t -> paren 9 $ ("coe" <+>) <$> pTerm' 10 t Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/AsPatterns.hs0000644000000000000000000000447213466402171021260 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.AsPatterns (recoverAsPatterns) where import Control.Monad.Reader import Data.Monoid import Agda.Syntax.Treeless import Agda.Syntax.Literal import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Compiler.Treeless.Compare import Agda.Utils.Impossible #include "undefined.h" data AsPat = AsPat Int QName [Int] -- x@(c ys) deriving (Show) wk :: Int -> AsPat -> AsPat wk n (AsPat x c ys) = AsPat (n + x) c (map (n +) ys) type S = Reader [AsPat] runS :: S a -> a runS m = runReader m [] underBinds :: Int -> S a -> S a underBinds 0 = id underBinds n = local (map $ wk n) bindAsPattern :: AsPat -> S a -> S a bindAsPattern p = local (p :) lookupAsPattern :: QName -> [TTerm] -> S TTerm lookupAsPattern c vs | Just xs <- allVars vs = do ps <- ask case [ x | AsPat x c' ys <- ps, c == c', xs == ys ] of x : _ -> pure $ TVar x _ -> pure $ mkTApp (TCon c) vs | otherwise = pure $ mkTApp (TCon c) vs where allVars = mapM getVar getVar (TVar x) = Just x getVar _ = Nothing -- what about erased? -- | We lose track of @-patterns in the internal syntax. This pass puts them -- back. recoverAsPatterns :: Monad m => TTerm -> m TTerm recoverAsPatterns t = return $ runS (recover t) recover :: TTerm -> S TTerm recover t = case t of TApp f vs -> do f <- recover f vs <- mapM recover vs tApp f vs TLam b -> TLam <$> underBinds 1 (recover b) TCon{} -> tApp t [] -- need to recover nullary constructors as well (to make deep @-patterns work) TLet v b -> TLet <$> recover v <*> underBinds 1 (recover b) TCase x ct d bs -> TCase x ct <$> recover d <*> mapM (recoverAlt x) bs TCoerce t -> TCoerce <$> recover t TLit{} -> pure t TVar{} -> pure t TPrim{} -> pure t TDef{} -> pure t TUnit{} -> pure t TSort{} -> pure t TErased{} -> pure t TError{} -> pure t recoverAlt :: Int -> TAlt -> S TAlt recoverAlt x b = case b of TACon c n b -> TACon c n <$> underBinds n (bindAsPattern (AsPat (x + n) c [n - 1, n - 2..0]) $ recover b) TAGuard g b -> TAGuard <$> recover g <*> recover b TALit l b -> TALit l <$> recover b tApp :: TTerm -> [TTerm] -> S TTerm tApp (TCon c) vs = lookupAsPattern c vs tApp f vs = pure $ mkTApp f vs Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Unused.hs0000644000000000000000000000475313466402171020441 0ustar0000000000000000 module Agda.Compiler.Treeless.Unused ( usedArguments , stripUnusedArguments ) where import Control.Arrow (first) import qualified Data.Set as Set import Data.Maybe import Agda.Syntax.Treeless import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Compiler.Treeless.Pretty import Agda.Utils.Pretty (prettyShow) usedArguments :: QName -> TTerm -> TCM [Bool] usedArguments q t = computeUnused q b (replicate n False) where (n, b) = tLamView t computeUnused :: QName -> TTerm -> [Bool] -> TCM [Bool] computeUnused q t used = do reportSLn "treeless.opt.unused" 50 $ "Unused approximation for " ++ prettyShow q ++ ": " ++ unwords [ if u then [x] else "_" | (x, u) <- zip ['a'..] used ] setCompiledArgUse q used fv <- go t let used' = [ Set.member i fv | (i, _) <- reverse $ zip [0..] used ] if used == used' then return used' else computeUnused q t used' where go t = case t of TVar x -> pure $ Set.singleton x TPrim{} -> pure Set.empty TDef{} -> pure Set.empty TLit{} -> pure Set.empty TCon{} -> pure Set.empty TApp (TDef f) ts -> do used <- getCompiledArgUse f Set.unions <$> sequence [ go t | (t, True) <- zip ts $ used ++ repeat True ] TApp f ts -> Set.unions <$> mapM go (f : ts) TLam b -> underBinder <$> go b TLet e b -> do uses <- go b if | Set.member 0 uses -> Set.union (underBinder uses) <$> go e | otherwise -> pure (underBinder uses) TCase x _ d bs -> Set.insert x . Set.unions <$> ((:) <$> go d <*> mapM goAlt bs) TUnit{} -> pure Set.empty TSort{} -> pure Set.empty TErased{} -> pure Set.empty TError{} -> pure Set.empty TCoerce t -> go t goAlt (TALit _ b) = go b goAlt (TAGuard g b) = Set.union <$> go g <*> go b goAlt (TACon _ a b) = underBinders a <$> go b underBinder = underBinders 1 underBinders 0 = id underBinders n = Set.filter (>= 0) . Set.mapMonotonic (subtract n) stripUnusedArguments :: [Bool] -> TTerm -> TTerm stripUnusedArguments used t = mkTLam m $ applySubst rho b where (n, b) = tLamView t m = length $ filter id used' used' = reverse $ take n $ used ++ repeat True rho = computeSubst used' computeSubst (False : bs) = TErased :# computeSubst bs computeSubst (True : bs) = liftS 1 $ computeSubst bs computeSubst [] = idS Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Compare.hs0000644000000000000000000000447713466402171020567 0ustar0000000000000000module Agda.Compiler.Treeless.Compare (equalTerms) where import Agda.Syntax.Treeless import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst equalTerms :: TTerm -> TTerm -> Bool equalTerms u v = case (evalPrims u, evalPrims v) of (TLet s u@(TCase 0 _ _ _), TLet t v@(TCase 0 _ _ _)) -> equalTerms s t && equalTerms u v (TLet _ (TCase 0 _ _ _), _) -> False (_, TLet _ (TCase 0 _ _ _)) -> False (TLet t u, v) -> equalTerms (subst 0 t u) v (u, TLet t v) -> equalTerms u (subst 0 t v) (u, v) | u == v -> True (TApp f us, TApp g vs) -> eqList equalTerms (f : us) (g : vs) (TCase x _ d as, TCase y _ e bs) -> x == y && equalTerms d e && eqList equalAlts as bs (TLam u, TLam v) -> equalTerms u v _ -> False equalAlts :: TAlt -> TAlt -> Bool equalAlts (TACon c a b) (TACon c1 a1 b1) = (c, a) == (c1, a1) && equalTerms b b1 equalAlts (TALit l b) (TALit l1 b1) = l == l1 && equalTerms b b1 equalAlts (TAGuard g b) (TAGuard g1 b1) = equalTerms g g1 && equalTerms b b1 equalAlts _ _ = False eqList :: (a -> a -> Bool) -> [a] -> [a] -> Bool eqList eq xs ys = length xs == length ys && and (zipWith eq xs ys) evalPrims :: TTerm -> TTerm evalPrims (TApp (TPrim op) [a, b]) | Just n <- intView (evalPrims a), Just m <- intView (evalPrims b), Just r <- applyPrim op n m = tInt r evalPrims t = t applyPrim :: TPrim -> Integer -> Integer -> Maybe Integer applyPrim PAdd a b = Just (a + b) applyPrim PSub a b = Just (a - b) applyPrim PMul a b = Just (a * b) applyPrim PQuot a b | b /= 0 = Just (quot a b) | otherwise = Nothing applyPrim PRem a b | b /= 0 = Just (rem a b) | otherwise = Nothing applyPrim PGeq _ _ = Nothing applyPrim PLt _ _ = Nothing applyPrim PEqI _ _ = Nothing applyPrim PEqF _ _ = Nothing applyPrim PEqC _ _ = Nothing applyPrim PEqS _ _ = Nothing applyPrim PEqQ _ _ = Nothing applyPrim PIf _ _ = Nothing applyPrim PSeq _ _ = Nothing applyPrim PAdd64 _ _ = Nothing applyPrim PSub64 _ _ = Nothing applyPrim PMul64 _ _ = Nothing applyPrim PQuot64 _ _ = Nothing applyPrim PRem64 _ _ = Nothing applyPrim PLt64 _ _ = Nothing applyPrim PEq64 _ _ = Nothing applyPrim PITo64 _ _ = Nothing applyPrim P64ToI _ _ = Nothing Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Erase.hs0000644000000000000000000002541013466402171020226 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE PatternSynonyms #-} module Agda.Compiler.Treeless.Erase (eraseTerms, computeErasedConstructorArgs) where import Control.Arrow ((&&&), (***), first, second) import Control.Monad import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map import Data.Semigroup import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Position import Agda.Syntax.Treeless import Agda.Syntax.Literal import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad as I import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Telescope import Agda.TypeChecking.Reduce import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.Primitive import Agda.Compiler.Treeless.Subst import Agda.Compiler.Treeless.Pretty import Agda.Compiler.Treeless.Unused import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Memo import Agda.Utils.Monad import Agda.Utils.Pretty (prettyShow) import qualified Agda.Utils.Pretty as P import Agda.Utils.IntSet.Infinite (IntSet) import qualified Agda.Utils.IntSet.Infinite as IntSet #include "undefined.h" import Agda.Utils.Impossible data ESt = ESt { _funMap :: Map QName FunInfo , _typeMap :: Map QName TypeInfo } funMap :: Lens' (Map QName FunInfo) ESt funMap f r = f (_funMap r) <&> \ a -> r { _funMap = a } typeMap :: Lens' (Map QName TypeInfo) ESt typeMap f r = f (_typeMap r) <&> \ a -> r { _typeMap = a } type E = StateT ESt TCM runE :: E a -> TCM a runE m = evalStateT m (ESt Map.empty Map.empty) -- | Takes the name of the data/record type. computeErasedConstructorArgs :: QName -> TCM () computeErasedConstructorArgs d = do cs <- getConstructors d runE $ mapM_ getFunInfo cs eraseTerms :: QName -> EvaluationStrategy -> TTerm -> TCM TTerm eraseTerms q eval t = usedArguments q t *> runE (eraseTop q t) where eraseTop q t = do (_, h) <- getFunInfo q case h of Erasable -> pure TErased Empty -> pure TErased _ -> erase t erase t = case tAppView t of TCon c : vs -> do (rs, h) <- getFunInfo c when (length rs < length vs) __IMPOSSIBLE__ case h of Erasable -> pure TErased Empty -> pure TErased _ -> tApp (TCon c) <$> zipWithM eraseRel rs vs TDef f : vs -> do (rs, h) <- getFunInfo f case h of Erasable -> pure TErased Empty -> pure TErased _ -> tApp (TDef f) <$> zipWithM eraseRel (rs ++ repeat NotErasable) vs _ -> case t of TVar{} -> pure t TDef{} -> pure t TPrim{} -> pure t TLit{} -> pure t TCon{} -> pure t TApp f es -> tApp <$> erase f <*> mapM erase es TLam b -> tLam <$> erase b TLet e b -> do e <- erase e if isErased e then case b of TCase 0 _ _ _ -> tLet TErased <$> erase b _ -> erase $ subst 0 TErased b else tLet e <$> erase b TCase x t d bs -> do (d, bs) <- pruneUnreachable x (caseType t) d bs d <- erase d bs <- mapM eraseAlt bs tCase x t d bs TUnit -> pure t TSort -> pure t TErased -> pure t TError{} -> pure t TCoerce e -> TCoerce <$> erase e -- #3380: this is not safe for strict backends tLam TErased | eval == LazyEvaluation = TErased tLam t = TLam t tLet e b | freeIn 0 b = TLet e b | otherwise = strengthen __IMPOSSIBLE__ b tApp f [] = f tApp TErased _ = TErased tApp f _ | isUnreachable f = tUnreachable tApp f es = TApp f es tCase x t d bs | isErased d && all (isErased . aBody) bs = pure TErased | otherwise = case bs of [TACon c a b] -> do h <- snd <$> getFunInfo c case h of NotErasable -> noerase Empty -> pure TErased Erasable -> (if a == 0 then pure else erase) $ applySubst (replicate a TErased ++# idS) b -- might enable more erasure _ -> noerase where noerase = pure $ TCase x t d bs isErased t = t == TErased || isUnreachable t eraseRel r t | erasable r = pure TErased | otherwise = erase t eraseAlt a = case a of TALit l b -> TALit l <$> erase b TACon c a b -> do rs <- map erasable . fst <$> getFunInfo c let sub = foldr (\ e -> if e then (TErased :#) . wkS 1 else liftS 1) idS $ reverse rs TACon c a <$> erase (applySubst sub b) TAGuard g b -> TAGuard <$> erase g <*> erase b -- | Doesn't have any type information (other than the name of the data type), -- so we can't do better than checking if all constructors are present. pruneUnreachable :: Int -> CaseType -> TTerm -> [TAlt] -> E (TTerm, [TAlt]) pruneUnreachable _ (CTData q) d bs = do cs <- lift $ getConstructors q let complete =length cs == length [ b | b@TACon{} <- bs ] let d' | complete = tUnreachable | otherwise = d return (d', bs) pruneUnreachable x CTNat d bs = return $ pruneIntCase x d bs (IntSet.below 0) pruneUnreachable x CTInt d bs = return $ pruneIntCase x d bs IntSet.empty pruneUnreachable _ _ d bs = pure (d, bs) -- These are the guards we generate for Int/Nat pattern matching pattern Below :: Range -> Int -> Integer -> TTerm pattern Below r x n = TApp (TPrim PLt) [TVar x, TLit (LitNat r n)] pattern Above :: Range -> Int -> Integer -> TTerm pattern Above r x n = TApp (TPrim PGeq) [TVar x, TLit (LitNat r n)] -- | Strip unreachable clauses (replace by tUnreachable for the default). -- Fourth argument is the set of ints covered so far. pruneIntCase :: Int -> TTerm -> [TAlt] -> IntSet -> (TTerm, [TAlt]) pruneIntCase x d bs cover = go bs cover where go [] cover | cover == IntSet.full = (tUnreachable, []) | otherwise = (d, []) go (b : bs) cover = case b of TAGuard (Below _ y n) _ | x == y -> rec (IntSet.below n) TAGuard (Above _ y n) _ | x == y -> rec (IntSet.above n) TALit (LitNat _ n) _ -> rec (IntSet.singleton n) _ -> second (b :) $ go bs cover where rec this = second addAlt $ go bs cover' where this' = IntSet.difference this cover cover' = this' <> cover addAlt = case IntSet.toFiniteList this' of Just [] -> id -- unreachable case Just [n] -> (TALit (LitNat noRange n) (aBody b) :) -- possibly refined case _ -> (b :) -- unchanged case data TypeInfo = Empty | Erasable | NotErasable deriving (Eq, Show) sumTypeInfo :: [TypeInfo] -> TypeInfo sumTypeInfo is = foldr plus Empty is where plus Empty r = r plus r Empty = r plus Erasable r = r plus r Erasable = r plus NotErasable NotErasable = NotErasable erasable :: TypeInfo -> Bool erasable Erasable = True erasable Empty = True erasable NotErasable = False type FunInfo = ([TypeInfo], TypeInfo) getFunInfo :: QName -> E FunInfo getFunInfo q = memo (funMap . key q) $ getInfo q where getInfo q = do (rs, t) <- do (tel, t) <- lift $ typeWithoutParams q is <- mapM (getTypeInfo . snd . dget) tel used <- lift $ (++ repeat True) <$> getCompiledArgUse q forced <- lift $ (++ repeat NotForced) <$> getForcedArgs q return (zipWith3 (uncurry . mkR . getModality) tel (zip forced used) is, t) h <- if isAbsurdLambdaName q then pure Erasable else getTypeInfo t lift $ reportSLn "treeless.opt.erase.info" 50 $ "type info for " ++ prettyShow q ++ ": " ++ show rs ++ " -> " ++ show h lift $ setErasedConArgs q $ map erasable rs return (rs, h) -- Treat empty, erasable, or unused arguments as Erasable mkR :: Modality -> IsForced -> Bool -> TypeInfo -> TypeInfo mkR m f b i | not (usableModality m) = Erasable | not b = Erasable | Forced <- f = Erasable | otherwise = i telListView :: Type -> TCM (ListTel, Type) telListView t = do TelV tel t <- telView t return (telToList tel, t) typeWithoutParams :: QName -> TCM (ListTel, Type) typeWithoutParams q = do def <- getConstInfo q let d = case I.theDef def of Function{ funProjection = Just Projection{ projIndex = i } } -> i - 1 Constructor{ conPars = n } -> n _ -> 0 first (drop d) <$> telListView (defType def) getTypeInfo :: Type -> E TypeInfo getTypeInfo t0 = do (tel, t) <- lift $ telListView t0 et <- case I.unEl t of I.Def d _ -> do -- #2916: Only update the memo table for d. Results for other types are -- under the assumption that d is erasable! oldMap <- use typeMap dInfo <- typeInfo d typeMap .= Map.insert d dInfo oldMap return dInfo Sort{} -> return Erasable _ -> return NotErasable is <- mapM (getTypeInfo . snd . dget) tel let e | any (== Empty) is = Erasable | null is = et -- TODO: guard should really be "all inhabited is" | et == Empty = Erasable | otherwise = et lift $ reportSDoc "treeless.opt.erase.type" 50 $ prettyTCM t0 <+> text ("is " ++ show e) return e where typeInfo :: QName -> E TypeInfo typeInfo q = memoRec (typeMap . key q) Erasable $ do -- assume recursive occurrences are erasable msizes <- lift $ mapM getBuiltinName [builtinSize, builtinSizeLt] def <- lift $ getConstInfo q mcs <- return $ case I.theDef def of I.Datatype{ dataCons = cs } -> Just cs I.Record{ recConHead = c } -> Just [conName c] _ -> Nothing case mcs of _ | Just q `elem` msizes -> return Erasable Just [c] -> do (ts, _) <- lift $ typeWithoutParams c let rs = map getModality ts is <- mapM (getTypeInfo . snd . dget) ts let er = and [ erasable i || not (usableModality r) | (i, r) <- zip is rs ] return $ if er then Erasable else NotErasable Just [] -> return Empty Just (_:_:_) -> return NotErasable Nothing -> case I.theDef def of I.Function{ funClauses = cs } -> sumTypeInfo <$> mapM (maybe (return Empty) (getTypeInfo . El __DUMMY_SORT__) . clauseBody) cs _ -> return NotErasable Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Identity.hs0000644000000000000000000000671613466402171020770 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.Identity ( detectIdentityFunctions ) where import Prelude hiding ((!!)) -- don't use partial functions import Control.Applicative ( Alternative((<|>), empty) ) import Data.Foldable (foldMap) import Data.Semigroup import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List as List import Agda.Syntax.Treeless import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad import Agda.Utils.Lens import Agda.Utils.List #include "undefined.h" import Agda.Utils.Impossible detectIdentityFunctions :: QName -> TTerm -> TCM TTerm detectIdentityFunctions q t = case isIdentity q t of Nothing -> return t Just (n, k) -> do markInline True q def <- theDef <$> getConstInfo q return $ mkTLam n $ TVar k -- If isIdentity f t = Just (n, k) then -- f = t is equivalent to f = λ xn₋₁ .. x₀ → xk isIdentity :: QName -> TTerm -> Maybe (Int, Int) isIdentity q t = trivialIdentity q t <|> recursiveIdentity q t -- Does the function recurse on an argument, rebuilding the same value again. recursiveIdentity :: QName -> TTerm -> Maybe (Int, Int) recursiveIdentity q t = case b of TCase x _ (TError TUnreachable) bs | all (identityBranch x) bs -> pure (n, x) _ -> empty -- TODO: lets? where (n, b) = tLamView t identityBranch _ TALit{} = False identityBranch _ TAGuard{} = False identityBranch x (TACon c a b) = case b of TApp (TCon c') args -> c == c' && identityArgs a args TVar y -> y == x + a -- from @-pattern recovery _ -> False -- TODO: nested cases where identityArgs a args = length args == a && and (zipWith match (reverse args) [0..]) proj x args = indexWithDefault __IMPOSSIBLE__ (reverse args) x match TErased _ = True match (TVar z) y = z == y match (TApp (TDef f) args) y = f == q && length args == n && match (proj x args) y match _ _ = False data IdentityIn = IdIn [Int] notId :: IdentityIn notId = IdIn [] instance Semigroup IdentityIn where IdIn xs <> IdIn ys = IdIn $ List.intersect xs ys -- Does the function always return one of its arguments unchanged (possibly -- through recursive calls). trivialIdentity :: QName -> TTerm -> Maybe (Int, Int) trivialIdentity q t = case go 0 b of IdIn [x] -> pure (n, x) IdIn [] -> Nothing IdIn (_:_:_) -> Nothing -- only happens for empty functions (which will never be called) where (n, b) = tLamView t go :: Int -> TTerm -> IdentityIn go k t = case t of TVar x | x >= k -> IdIn [x - k] | otherwise -> notId TLet _ b -> go (k + 1) b TCase _ _ d bs -> sconcat (go k d :| map (goAlt k) bs) TApp (TDef f) args | f == q -> IdIn [ y | (TVar x, y) <- zip (reverse args) [0..], y + k == x ] TCoerce v -> go k v TApp{} -> notId TLam{} -> notId TLit{} -> notId TDef{} -> notId TCon{} -> notId TPrim{} -> notId TUnit{} -> notId TSort{} -> notId TErased{} -> notId TError{} -> notId goAlt :: Int -> TAlt -> IdentityIn goAlt k (TALit _ b) = go k b goAlt k (TAGuard _ b) = go k b goAlt k (TACon _ n b) = go (k + n) b Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/GuardsToPrims.hs0000644000000000000000000000323413466402171021732 0ustar0000000000000000-- | Translates guard alternatives to if-then-else cascades. -- -- The builtin translation must be run before this transformation. {-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.GuardsToPrims ( convertGuards ) where import qualified Data.List as List import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Treeless import Agda.Syntax.Literal import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Utils.Impossible #include "undefined.h" convertGuards :: TTerm -> TTerm convertGuards = tr where tr t = case t of TCase sc t def alts -> if null otherAlts then def' else TCase sc t def' (fmap trAlt otherAlts) where (plusAlts, otherAlts) = splitAlts alts guardedAlt :: TAlt -> TTerm -> TTerm guardedAlt (TAGuard g body) cont = tIfThenElse (tr g) (tr body) (tr cont) guardedAlt _ _ = __IMPOSSIBLE__ def' = foldr guardedAlt (tr def) plusAlts trAlt (TAGuard{}) = __IMPOSSIBLE__ trAlt a = a { aBody = tr (aBody a) } TVar{} -> t TDef{} -> t TCon{} -> t TPrim{} -> t TLit{} -> t TUnit{} -> t TSort{} -> t TErased{} -> t TError{} -> t TCoerce a -> TCoerce (tr a) TLam b -> TLam (tr b) TApp a bs -> TApp (tr a) (map tr bs) TLet e b -> TLet (tr e) (tr b) -- | Split alts into TAGuard alts and other alts. splitAlts :: [TAlt] -> ([TAlt], [TAlt]) splitAlts = List.partition isGuardAlt where isGuardAlt (TAGuard _ _) = True isGuardAlt _ = False Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Builtin.hs0000644000000000000000000001600113466402171020571 0ustar0000000000000000-- | Translates the Agda builtin nat datatype to arbitrary-precision integers. -- -- Philipp, 20150921: -- At the moment, this optimization is the reason that there is a -- TAPlus alternative. For Haskell, this can easily be translated to guards. However, in -- the long term it would be easier for the backends if these things were translated -- directly to a less-than primitive and if-then-else expressions or similar. This would -- require us to add some internal Bool-datatype as compiler-internal type and -- a primitive less-than function, which will be much easier once Treeless -- is used for whole modules. -- -- Ulf, 2015-09-21: No, actually we need the n+k patterns, or at least guards. -- Representing them with if-then-else would make it a lot harder to do -- optimisations that analyse case tree, like impossible case elimination. -- -- Ulf, 2015-10-30: Guards are actually a better primitive. Fixed that. {-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.Builtin (translateBuiltins) where import qualified Agda.Syntax.Internal as I import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Position import Agda.Syntax.Treeless import Agda.Syntax.Literal import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.Compiler.Treeless.Subst import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Maybe import Agda.Utils.Impossible #include "undefined.h" data BuiltinKit = BuiltinKit { isZero :: QName -> Bool , isSuc :: QName -> Bool , isPos :: QName -> Bool , isNegSuc :: QName -> Bool , isPlus :: QName -> Bool , isTimes :: QName -> Bool , isLess :: QName -> Bool , isEqual :: QName -> Bool , isForce :: QName -> Bool , isWord64FromNat :: QName -> Bool , isWord64ToNat :: QName -> Bool } builtinKit :: TCM BuiltinKit builtinKit = BuiltinKit <$> isB con builtinZero <*> isB con builtinSuc <*> isB con builtinIntegerPos <*> isB con builtinIntegerNegSuc <*> isB def builtinNatPlus <*> isB def builtinNatTimes <*> isB def builtinNatLess <*> isB def builtinNatEquals <*> isP pf "primForce" <*> isP pf "primWord64FromNat" <*> isP pf "primWord64ToNat" where con (I.Con c _ _) = pure $ I.conName c con _ = Nothing def (I.Def d _) = pure d def _ = Nothing pf = Just . primFunName is a b = maybe (const False) (==) . (a =<<) <$> b isB a b = is a (getBuiltin' b) isP a p = is a (getPrimitive' p) translateBuiltins :: TTerm -> TCM TTerm translateBuiltins t = do kit <- builtinKit return $ transform kit t transform :: BuiltinKit -> TTerm -> TTerm transform BuiltinKit{..} = tr where tr t = case t of TCon c | isZero c -> tInt 0 | isSuc c -> TLam (tPlusK 1 (TVar 0)) | isPos c -> TLam (TVar 0) | isNegSuc c -> TLam $ tNegPlusK 1 (TVar 0) TDef f | isPlus f -> TPrim PAdd | isTimes f -> TPrim PMul | isLess f -> TPrim PLt | isEqual f -> TPrim PEqI | isWord64ToNat f -> TPrim P64ToI | isWord64FromNat f -> TPrim PITo64 -- Note: Don't do this for builtinNatMinus! PSub is integer minus and -- builtin minus is monus. The simplifier will do it if it can see -- that it won't underflow. TApp (TDef q) (_ : _ : _ : _ : e : f : es) | isForce q -> tr $ TLet e $ mkTApp (tOp PSeq (TVar 0) $ mkTApp (raise 1 f) [TVar 0]) es TApp (TCon s) [e] | isSuc s -> case tr e of TLit (LitNat r n) -> tInt (n + 1) e | Just (i, e) <- plusKView e -> tPlusK (i + 1) e e -> tPlusK 1 e TApp (TCon c) [e] | isPos c -> tr e | isNegSuc c -> case tr e of TLit (LitNat _ n) -> tInt (-n - 1) e | Just (i, e) <- plusKView e -> tNegPlusK (i + 1) e e -> tNegPlusK 1 e TCase e t d bs -> TCase e (inferCaseType t bs) (tr d) $ concatMap trAlt bs where trAlt b = case b of TACon c 0 b | isZero c -> [TALit (LitNat noRange 0) (tr b)] TACon c 1 b | isSuc c -> case tr b of -- Collapse nested n+k patterns TCase 0 _ d bs' -> map sucBranch bs' ++ [nPlusKAlt 1 d] b -> [nPlusKAlt 1 b] where sucBranch (TALit (LitNat r i) b) = TALit (LitNat r (i + 1)) $ TLet (tInt i) b sucBranch alt | Just (k, b) <- nPlusKView alt = nPlusKAlt (k + 1) $ TLet (tOp PAdd (TVar 0) (tInt 1)) $ applySubst ([TVar 1, TVar 0] ++# wkS 2 idS) b sucBranch _ = __IMPOSSIBLE__ nPlusKAlt k b = TAGuard (tOp PGeq (TVar e) (tInt k)) $ TLet (tOp PSub (TVar e) (tInt k)) b str err = compactS err [Nothing] TACon c 1 b | isPos c -> case tr b of -- collapse nested nat patterns TCase 0 _ d bs -> map sub bs ++ [posAlt d] b -> [posAlt b] where -- subst scrutinee for the pos argument sub :: Subst TTerm a => a -> a sub = applySubst (TVar e :# IdS) posAlt b = TAGuard (tOp PGeq (TVar e) (tInt 0)) $ sub b TACon c 1 b | isNegSuc c -> case tr b of -- collapse nested nat patterns TCase 0 _ d bs -> map negsucBranch bs ++ [negAlt d] b -> [negAlt b] where body b = TLet (tNegPlusK 1 (TVar e)) b negAlt b = TAGuard (tOp PLt (TVar e) (tInt 0)) $ body b negsucBranch (TALit (LitNat r i) b) = TALit (LitNat r (-i - 1)) $ body b negsucBranch alt | Just (k, b) <- nPlusKView alt = TAGuard (tOp PLt (TVar e) (tInt (-k))) $ body $ TLet (tNegPlusK (k + 1) (TVar $ e + 1)) b negsucBranch _ = __IMPOSSIBLE__ TACon c a b -> [TACon c a (tr b)] TALit l b -> [TALit l (tr b)] TAGuard g b -> [TAGuard (tr g) (tr b)] TVar{} -> t TDef{} -> t TCon{} -> t TPrim{} -> t TLit{} -> t TUnit{} -> t TSort{} -> t TErased{} -> t TError{} -> t TCoerce a -> TCoerce (tr a) TLam b -> TLam (tr b) TApp a bs -> TApp (tr a) (map tr bs) TLet e b -> TLet (tr e) (tr b) inferCaseType t (TACon c _ _ : _) | isZero c = t { caseType = CTNat } | isSuc c = t { caseType = CTNat } | isPos c = t { caseType = CTInt } | isNegSuc c = t { caseType = CTInt } inferCaseType t _ = t nPlusKView (TAGuard (TApp (TPrim PGeq) [TVar 0, (TLit (LitNat _ k))]) (TLet (TApp (TPrim PSub) [TVar 0, (TLit (LitNat _ j))]) b)) | k == j = Just (k, b) nPlusKView _ = Nothing Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Simplify.hs0000644000000000000000000004345013466402171020767 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.Simplify (simplifyTTerm) where import Control.Arrow (first, second, (***)) import Control.Monad.Reader import Control.Monad.Writer import Data.Traversable (traverse) import qualified Data.List as List import Agda.Syntax.Treeless import Agda.Syntax.Internal (Substitution'(..)) import Agda.Syntax.Literal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Primitive import Agda.TypeChecking.Substitute import Agda.Utils.Maybe import Agda.Compiler.Treeless.Subst import Agda.Compiler.Treeless.Pretty import Agda.Compiler.Treeless.Compare import Agda.Utils.Pretty import Agda.Utils.Impossible #include "undefined.h" data SEnv = SEnv { envSubst :: Substitution' TTerm , envRewrite :: [(TTerm, TTerm)] } type S = Reader SEnv runS :: S a -> a runS m = runReader m $ SEnv IdS [] lookupVar :: Int -> S TTerm lookupVar i = asks $ (`lookupS` i) . envSubst onSubst :: (Substitution' TTerm -> Substitution' TTerm) -> S a -> S a onSubst f = local $ \ env -> env { envSubst = f (envSubst env) } onRewrite :: Substitution' TTerm -> S a -> S a onRewrite rho = local $ \ env -> env { envRewrite = map (applySubst rho *** applySubst rho) (envRewrite env) } addRewrite :: TTerm -> TTerm -> S a -> S a addRewrite lhs rhs = local $ \ env -> env { envRewrite = (lhs, rhs) : envRewrite env } underLams :: Int -> S a -> S a underLams i = onRewrite (raiseS i) . onSubst (liftS i) underLam :: S a -> S a underLam = underLams 1 underLet :: TTerm -> S a -> S a underLet u = onRewrite (raiseS 1) . onSubst (\rho -> wkS 1 $ u :# rho) bindVar :: Int -> TTerm -> S a -> S a bindVar x u = onSubst (inplaceS x u `composeS`) rewrite :: TTerm -> S TTerm rewrite t = do rules <- asks envRewrite case [ rhs | (lhs, rhs) <- rules, equalTerms t lhs ] of rhs : _ -> pure rhs [] -> pure t data FunctionKit = FunctionKit { modAux, divAux, natMinus, true, false :: Maybe QName } simplifyTTerm :: TTerm -> TCM TTerm simplifyTTerm t = do kit <- FunctionKit <$> getBuiltinName builtinNatModSucAux <*> getBuiltinName builtinNatDivSucAux <*> getBuiltinName builtinNatMinus <*> getBuiltinName builtinTrue <*> getBuiltinName builtinFalse return $ runS $ simplify kit t simplify :: FunctionKit -> TTerm -> S TTerm simplify FunctionKit{..} = simpl where simpl = rewrite' >=> unchainCase >=> \ t -> case t of TDef{} -> pure t TPrim{} -> pure t TVar{} -> pure t TApp (TDef f) [TLit (LitNat _ 0), m, n, m'] -- div/mod are equivalent to quot/rem on natural numbers. | m == m', Just f == divAux -> simpl $ tOp PQuot n (tPlusK 1 m) | m == m', Just f == modAux -> simpl $ tOp PRem n (tPlusK 1 m) -- Word64 primitives -- -- toWord (a ∙ b) == toWord a ∙64 toWord b TPFn PITo64 (TPOp op a b) | Just op64 <- opTo64 op -> simpl $ tOp op64 (TPFn PITo64 a) (TPFn PITo64 b) where opTo64 op = lookup op [(PAdd, PAdd64), (PSub, PSub64), (PMul, PMul64), (PQuot, PQuot64), (PRem, PRem64)] TApp (TPrim _) _ -> pure t -- taken care of by rewrite' TCoerce t -> TCoerce <$> simpl t TApp f es -> do f <- simpl f es <- traverse simpl es maybeMinusToPrim f es TLam b -> TLam <$> underLam (simpl b) TLit{} -> pure t TCon{} -> pure t TLet e b -> do e <- simpl e case e of TPFn P64ToI a -> do -- Inline calls to P64ToI since these trigger optimisations. -- Ideally, the optimisations would trigger anyway, but at the -- moment they only do if inlining the entire let looks like a -- good idea. let rho = inplaceS 0 (TPFn P64ToI (TVar 0)) tLet a <$> underLet a (simpl (applySubst rho b)) _ -> tLet e <$> underLet e (simpl b) TCase x t d bs -> do v <- lookupVar x let (lets, u) = tLetView v case u of -- TODO: also for literals _ | Just (c, as) <- conView u -> simpl $ matchCon lets c as d bs | Just (k, TVar y) <- plusKView u -> simpl . mkLets lets . TCase y t d =<< mapM (matchPlusK y x k) bs TCase y t1 d1 bs1 -> simpl $ mkLets lets $ TCase y t1 (distrDef case1 d1) $ map (distrCase case1) bs1 where -- Γ x Δ -> Γ _ Δ Θ y, where x maps to y and Θ are the lets n = length lets rho = liftS (x + n + 1) (raiseS 1) `composeS` singletonS (x + n + 1) (TVar 0) `composeS` raiseS (n + 1) case1 = applySubst rho (TCase x t d bs) distrDef v d | isUnreachable d = tUnreachable | otherwise = tLet d v distrCase v (TACon c a b) = TACon c a $ TLet b $ raiseFrom 1 a v distrCase v (TALit l b) = TALit l $ TLet b v distrCase v (TAGuard g b) = TAGuard g $ TLet b v _ -> do d <- simpl d bs <- traverse (simplAlt x) bs tCase x t d bs TUnit -> pure t TSort -> pure t TErased -> pure t TError{} -> pure t conView (TCon c) = Just (c, []) conView (TApp (TCon c) as) = Just (c, as) conView e = Nothing -- Collapse chained cases (case x of bs -> vs; _ -> case x of bs' -> vs' ==> -- case x of bs -> vs; bs' -> vs') unchainCase :: TTerm -> S TTerm unchainCase e@(TCase x t d bs) = do let (lets, u) = tLetView d k = length lets return $ case u of TCase y _ d' bs' | x + k == y -> mkLets lets $ TCase y t d' $ raise k bs ++ bs' _ -> e unchainCase e = return e mkLets es b = foldr TLet b es matchCon _ _ _ d [] = d matchCon lets c as d (TALit{} : bs) = matchCon lets c as d bs matchCon lets c as d (TAGuard{} : bs) = matchCon lets c as d bs matchCon lets c as d (TACon c' a b : bs) | c == c' = flip (foldr TLet) lets $ mkLet 0 as (raiseFrom a (length lets) b) | otherwise = matchCon lets c as d bs where mkLet _ [] b = b mkLet i (a : as) b = TLet (raise i a) $ mkLet (i + 1) as b -- Simplify let y = x + k in case y of j -> u; _ | g[y] -> v -- to let y = x + k in case x of j - k -> u; _ | g[x + k] -> v matchPlusK :: Int -> Int -> Integer -> TAlt -> S TAlt matchPlusK x y k (TALit (LitNat r j) b) = return $ TALit (LitNat r (j - k)) b matchPlusK x y k (TAGuard g b) = flip TAGuard b <$> simpl (applySubst (inplaceS y (tPlusK k (TVar x))) g) matchPlusK x y k TACon{} = __IMPOSSIBLE__ matchPlusK x y k TALit{} = __IMPOSSIBLE__ simplPrim (TApp f@TPrim{} args) = do args <- mapM simpl args inlined <- mapM inline args let u = TApp f args v = simplPrim' (TApp f inlined) pure $ if v `betterThan` u then v else u where inline (TVar x) = do v <- lookupVar x if v == TVar x then pure v else inline v inline (TApp f@TPrim{} args) = TApp f <$> mapM inline args inline u@(TLet _ (TCase 0 _ _ _)) = pure u inline (TLet e b) = inline (subst 0 e b) inline u = pure u simplPrim t = pure t simplPrim' :: TTerm -> TTerm simplPrim' (TApp (TPrim PSeq) (u : v : vs)) | u == v = mkTApp v vs | TApp TCon{} _ <- u = mkTApp v vs | TApp TLit{} _ <- u = mkTApp v vs simplPrim' (TApp (TPrim PLt) [u, v]) | Just (PAdd, k, u) <- constArithView u, Just (PAdd, j, v) <- constArithView v, k == j = tOp PLt u v | Just (PAdd, k, v) <- constArithView v, TApp (TPrim P64ToI) [u] <- u, k >= 2^64, Just trueCon <- true = TCon trueCon | Just k <- intView u , Just j <- intView v , Just trueCon <- true , Just falseCon <- false = if k < j then TCon trueCon else TCon falseCon simplPrim' (TApp (TPrim op) [u, v]) | elem op [PGeq, PLt, PEqI] , Just (PAdd, k, u) <- constArithView u , Just j <- intView v = TApp (TPrim op) [u, tInt (j - k)] simplPrim' (TApp (TPrim PEqI) [u, v]) | Just (op1, k, u) <- constArithView u, Just (op2, j, v) <- constArithView v, op1 == op2, k == j, elem op1 [PAdd, PSub] = tOp PEqI u v simplPrim' (TPOp op u v) | zeroL, isMul || isDiv = tInt 0 | zeroL, isAdd = v | zeroR, isMul = tInt 0 | zeroR, isAdd || isSub = u where zeroL = Just 0 == intView u || Just 0 == word64View u zeroR = Just 0 == intView v || Just 0 == word64View v isAdd = elem op [PAdd, PAdd64] isSub = elem op [PSub, PSub64] isMul = elem op [PMul, PMul64] isDiv = elem op [PQuot, PQuot64, PRem, PRem64] simplPrim' (TApp (TPrim op) [u, v]) | Just u <- negView u, Just v <- negView v, elem op [PMul, PQuot] = tOp op u v | Just u <- negView u, elem op [PMul, PQuot] = simplArith $ tOp PSub (tInt 0) (tOp op u v) | Just v <- negView v, elem op [PMul, PQuot] = simplArith $ tOp PSub (tInt 0) (tOp op u v) simplPrim' (TApp (TPrim PRem) [u, v]) | Just u <- negView u = simplArith $ tOp PSub (tInt 0) (tOp PRem u (unNeg v)) | Just v <- negView v = tOp PRem u v -- (fromWord a == fromWord b) = (a ==64 b) simplPrim' (TPOp op (TPFn P64ToI a) (TPFn P64ToI b)) | Just op64 <- opTo64 op = tOp op64 a b where opTo64 op = lookup op [(PEqI, PEq64), (PLt, PLt64)] -- toWord/fromWord k == fromIntegral k simplPrim' (TPFn PITo64 (TLit (LitNat r n))) = TLit (LitWord64 r (fromIntegral n)) simplPrim' (TPFn P64ToI (TLit (LitWord64 r n))) = TLit (LitNat r (fromIntegral n)) -- toWord (fromWord a) == a simplPrim' (TPFn PITo64 (TPFn P64ToI a)) = a simplPrim' (TApp f@(TPrim op) [u, v]) = simplArith $ TApp f [simplPrim' u, simplPrim' v] simplPrim' u = u unNeg u | Just v <- negView u = v | otherwise = u negView (TApp (TPrim PSub) [a, b]) | Just 0 <- intView a = Just b negView _ = Nothing -- Count arithmetic operations betterThan u v = operations u <= operations v where operations (TApp (TPrim _) [a, b]) = 1 + operations a + operations b operations (TApp (TPrim PSeq) (a : _)) | notVar a = 1000000 -- only seq on variables! operations (TApp (TPrim _) [a]) = 1 + operations a operations TVar{} = 0 operations TLit{} = 0 operations TCon{} = 0 operations TDef{} = 0 operations _ = 1000 notVar TVar{} = False notVar _ = True rewrite' t = rewrite =<< simplPrim t constArithView :: TTerm -> Maybe (TPrim, Integer, TTerm) constArithView (TApp (TPrim op) [TLit (LitNat _ k), u]) | elem op [PAdd, PSub] = Just (op, k, u) constArithView (TApp (TPrim op) [u, TLit (LitNat _ k)]) | op == PAdd = Just (op, k, u) | op == PSub = Just (PAdd, -k, u) constArithView _ = Nothing simplAlt x (TACon c a b) = TACon c a <$> underLams a (maybeAddRewrite (x + a) conTerm $ simpl b) where conTerm = mkTApp (TCon c) [TVar i | i <- reverse $ take a [0..]] simplAlt x (TALit l b) = TALit l <$> maybeAddRewrite x (TLit l) (simpl b) simplAlt x (TAGuard g b) = TAGuard <$> simpl g <*> simpl b -- If x is already bound we add a rewrite, otherwise we bind x to rhs. maybeAddRewrite x rhs cont = do v <- lookupVar x case v of TVar y | x == y -> bindVar x rhs $ cont _ -> addRewrite v rhs cont isTrue (TCon c) = Just c == true isTrue _ = False isFalse (TCon c) = Just c == false isFalse _ = False maybeMinusToPrim f@(TDef minus) es@[a, b] | Just minus == natMinus = do leq <- checkLeq b a if leq then pure $ tOp PSub a b else tApp f es maybeMinusToPrim f es = tApp f es tLet (TVar x) b = subst 0 (TVar x) b tLet e (TVar 0) = e tLet e b = TLet e b tCase :: Int -> CaseInfo -> TTerm -> [TAlt] -> S TTerm tCase x t d [] = pure d tCase x t d bs | isUnreachable d = case reverse bs' of [] -> pure d TALit _ b : as -> tCase x t b (reverse as) TAGuard _ b : as -> tCase x t b (reverse as) TACon c a b : _ -> tCase' x t d bs' | otherwise = do d' <- lookupIfVar d case d' of TCase y _ d bs'' | x == y -> tCase x t d (bs' ++ filter noOverlap bs'') _ -> tCase' x t d bs' where bs' = filter (not . isUnreachable) bs lookupIfVar (TVar i) = lookupVar i lookupIfVar t = pure t noOverlap b = not $ any (overlapped b) bs' overlapped (TACon c _ _) (TACon c' _ _) = c == c' overlapped (TALit l _) (TALit l' _) = l == l' overlapped _ _ = False -- | Drop unreachable cases for Nat and Int cases. pruneLitCases :: Int -> CaseInfo -> TTerm -> [TAlt] -> S TTerm pruneLitCases x t d bs | CTNat == caseType t = case complete bs [] Nothing of Just bs' -> tCase x t tUnreachable bs' Nothing -> return $ TCase x t d bs where complete bs small (Just upper) | null $ [0..upper - 1] List.\\ small = Just [] complete (b@(TALit (LitNat _ n) _) : bs) small upper = (b :) <$> complete bs (n : small) upper complete (b@(TAGuard (TApp (TPrim PGeq) [TVar y, TLit (LitNat _ j)]) _) : bs) small upper | x == y = (b :) <$> complete bs small (Just $ maybe j (min j) upper) complete _ _ _ = Nothing pruneLitCases x t d bs | CTInt == caseType t = return $ TCase x t d bs -- TODO | otherwise = return $ TCase x t d bs tCase' x t d [] = return d tCase' x t d bs = pruneLitCases x t d bs tApp :: TTerm -> [TTerm] -> S TTerm tApp (TLet e b) es = TLet e <$> underLet e (tApp b (raise 1 es)) tApp (TCase x t d bs) es = do d <- tApp d es bs <- mapM (`tAppAlt` es) bs simpl $ TCase x t d bs -- will resimplify branches tApp (TVar x) es = do v <- lookupVar x case v of _ | v /= TVar x && isAtomic v -> tApp v es TLam{} -> tApp v es -- could blow up the code _ -> pure $ mkTApp (TVar x) es tApp f [] = pure f tApp (TLam b) (TVar i : es) = tApp (subst 0 (TVar i) b) es tApp (TLam b) (e : es) = tApp (TLet e b) es tApp f es = pure $ TApp f es tAppAlt (TACon c a b) es = TACon c a <$> underLams a (tApp b (raise a es)) tAppAlt (TALit l b) es = TALit l <$> tApp b es tAppAlt (TAGuard g b) es = TAGuard g <$> tApp b es isAtomic v = case v of TVar{} -> True TCon{} -> True TPrim{} -> True TDef{} -> True TLit{} -> True TSort{} -> True TErased{} -> True TError{} -> True _ -> False checkLeq a b = do rho <- asks envSubst rwr <- asks envRewrite let nf = toArith . applySubst rho less = [ (nf a, nf b) | (TPOp PLt a b, rhs) <- rwr, isTrue rhs ] leq = [ (nf b, nf a) | (TPOp PLt a b, rhs) <- rwr, isFalse rhs ] match (j, as) (k, bs) | as == bs = Just (j - k) | otherwise = Nothing -- Do we have x ≤ y given x' < y' + d ? matchEqn d x y (x', y') = isJust $ do k <- match x x' -- x = x' + k j <- match y y' -- y = y' + j guard (k <= j + d) -- x ≤ y if k ≤ j + d matchLess = matchEqn 1 matchLeq = matchEqn 0 literal (j, []) (k, []) = j <= k literal _ _ = False -- k + fromWord x ≤ y if k + 2^64 - 1 ≤ y wordUpperBound (k, [Pos (TApp (TPrim P64ToI) _)]) y = go (k + 2^64 - 1, []) y wordUpperBound _ _ = False -- x ≤ k + fromWord y if x ≤ k wordLowerBound a (k, [Pos (TApp (TPrim P64ToI) _)]) = go a (k, []) wordLowerBound _ _ = False go x y = or [ literal x y , wordUpperBound x y , wordLowerBound x y , any (matchLess x y) less , any (matchLeq x y) leq ] return $ go (nf a) (nf b) type Arith = (Integer, [Atom]) data Atom = Pos TTerm | Neg TTerm deriving (Show, Eq, Ord) aNeg :: Atom -> Atom aNeg (Pos a) = Neg a aNeg (Neg a) = Pos a aCancel :: [Atom] -> [Atom] aCancel (a : as) | elem (aNeg a) as = aCancel (List.delete (aNeg a) as) | otherwise = a : aCancel as aCancel [] = [] sortR :: Ord a => [a] -> [a] sortR = List.sortBy (flip compare) aAdd :: Arith -> Arith -> Arith aAdd (a, xs) (b, ys) = (a + b, aCancel $ sortR $ xs ++ ys) aSub :: Arith -> Arith -> Arith aSub (a, xs) (b, ys) = (a - b, aCancel $ sortR $ xs ++ map aNeg ys) fromArith :: Arith -> TTerm fromArith (n, []) = tInt n fromArith (0, xs) | (ys, Pos a : zs) <- break isPos xs = foldl addAtom a (ys ++ zs) fromArith (n, xs) | n < 0, (ys, Pos a : zs) <- break isPos xs = tOp PSub (foldl addAtom a (ys ++ zs)) (tInt (-n)) fromArith (n, xs) = foldl addAtom (tInt n) xs isPos :: Atom -> Bool isPos Pos{} = True isPos Neg{} = False addAtom :: TTerm -> Atom -> TTerm addAtom t (Pos a) = tOp PAdd t a addAtom t (Neg a) = tOp PSub t a toArith :: TTerm -> Arith toArith t | Just n <- intView t = (n, []) toArith (TApp (TPrim PAdd) [a, b]) = aAdd (toArith a) (toArith b) toArith (TApp (TPrim PSub) [a, b]) = aSub (toArith a) (toArith b) toArith t = (0, [Pos t]) simplArith :: TTerm -> TTerm simplArith = fromArith . toArith Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/Uncase.hs0000644000000000000000000000423413466402171020406 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.Treeless.Uncase (caseToSeq) where import Data.Monoid import Agda.Syntax.Treeless import Agda.Syntax.Literal import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Compiler.Treeless.Compare import Agda.Utils.Impossible #include "undefined.h" caseToSeq :: Monad m => TTerm -> m TTerm caseToSeq t = return $ uncase t uncase :: TTerm -> TTerm uncase t = case t of TVar{} -> t TPrim{} -> t TDef{} -> t TApp f es -> tApp (uncase f) (map uncase es) TLam b -> TLam $ uncase b TLit{} -> t TCon{} -> t TLet e b -> tLet (uncase e) (uncase b) TCase x t d bs -> doCase x t (uncase d) (map uncaseAlt bs) TUnit{} -> t TSort{} -> t TErased{} -> t TError{} -> t TCoerce t -> TCoerce (uncase t) where uncaseAlt (TACon c a b) = TACon c a $ uncase b uncaseAlt (TALit l b) = TALit l $ uncase b uncaseAlt (TAGuard g b) = TAGuard (uncase g) (uncase b) doCase x t d bs | Just u <- mu, all (equalTo x u) bs = maybeSeq u | otherwise = fallback where maybeSeq u | caseLazy t = u | otherwise = tApp (TPrim PSeq) [TVar x, u] fallback = TCase x t d bs (fv, mu) | isUnreachable d = case last bs of TACon _ a b -> (a, tryStrengthen a b) TALit l b -> (0, Just b) TAGuard _ b -> (0, Just b) | otherwise = (0, Just d) equalTo :: Int -> TTerm -> TAlt -> Bool equalTo x t (TACon c a b) | Just b' <- tryStrengthen a b = equalTerms (subst x v t) (subst x v b') | otherwise = False where v = mkTApp (TCon c) (replicate a TErased) equalTo x t (TALit l b) = equalTerms (subst x (TLit l) t) (subst x (TLit l) b) equalTo x t (TAGuard _ b) = equalTerms t b tLet e b = case occursIn 0 b of Occurs 0 _ _ -> strengthen __IMPOSSIBLE__ b _ -> TLet e b -- Primitive operations are already strict tApp (TPrim PSeq) [_, b@(TApp (TPrim op) _)] | op `elem` [PAdd, PSub, PMul, PLt, PGeq, PRem, PQuot] || isPrimEq op = b tApp f es = TApp f es Agda-2.6.0.1/src/full/Agda/Compiler/Treeless/EliminateDefaults.hs0000644000000000000000000000370713466402171022573 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Eliminates case defaults by adding an alternative for all possible -- constructors. Literal cases are preserved as-is. module Agda.Compiler.Treeless.EliminateDefaults where import Control.Monad import qualified Data.List as List import Data.Maybe import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Treeless import Agda.Syntax.Literal import qualified Agda.Syntax.Internal as I import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Primitive import Agda.TypeChecking.Substitute import Agda.Compiler.Treeless.Subst import Agda.Utils.Impossible #include "undefined.h" eliminateCaseDefaults :: TTerm -> TCM TTerm eliminateCaseDefaults = tr where tr :: TTerm -> TCM TTerm tr t = case t of TCase sc ct@CaseInfo{caseType = CTData qn} def alts | not (isUnreachable def) -> do dtCons <- defConstructors . theDef <$> getConstInfo qn let missingCons = dtCons List.\\ map aCon alts def <- tr def newAlts <- forM missingCons $ \con -> do Constructor {conArity = ar} <- theDef <$> getConstInfo con return $ TACon con ar (TVar ar) alts' <- (++ newAlts) <$> mapM (trAlt . raise 1) alts return $ TLet def $ TCase (sc + 1) ct tUnreachable alts' TCase sc ct def alts -> TCase sc ct <$> tr def <*> mapM trAlt alts TVar{} -> tt TDef{} -> tt TCon{} -> tt TPrim{} -> tt TLit{} -> tt TUnit{} -> tt TSort{} -> tt TErased{} -> tt TError{} -> tt TCoerce a -> TCoerce <$> tr a TLam b -> TLam <$> tr b TApp a bs -> TApp <$> tr a <*> mapM tr bs TLet e b -> TLet <$> tr e <*> tr b where tt = return t trAlt :: TAlt -> TCM TAlt trAlt a = case a of TAGuard g b -> TAGuard <$> tr g <*> tr b TACon q a b -> TACon q a <$> tr b TALit l b -> TALit l <$> tr b Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/0000755000000000000000000000000013466402171016422 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/HaskellTypes.hs0000644000000000000000000002554613466402171021402 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Translating Agda types to Haskell types. Used to ensure that imported -- Haskell functions have the right type. module Agda.Compiler.MAlonzo.HaskellTypes ( haskellType , checkConstructorCount , hsTelApproximation, hsTelApproximation' ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Monad (zipWithM) import Data.Maybe (fromMaybe) import Data.List (intercalate) import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive (getBuiltinName) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.TypeChecking.Telescope import Agda.Compiler.MAlonzo.Pragmas import Agda.Compiler.MAlonzo.Misc import Agda.Compiler.MAlonzo.Pretty import qualified Agda.Utils.Haskell.Syntax as HS import Agda.Utils.Except import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Null #include "undefined.h" import Agda.Utils.Impossible hsQCon :: String -> String -> HS.Type hsQCon m f = HS.TyCon $ HS.Qual (HS.ModuleName m) (HS.Ident f) hsCon :: String -> HS.Type hsCon = HS.TyCon . HS.UnQual . HS.Ident hsUnit :: HS.Type hsUnit = hsCon "()" hsVar :: HS.Name -> HS.Type hsVar = HS.TyVar hsApp :: HS.Type -> [HS.Type] -> HS.Type hsApp d ds = foldl HS.TyApp d ds hsForall :: HS.Name -> HS.Type -> HS.Type hsForall x = HS.TyForall [HS.UnkindedVar x] data WhyNot = NoPragmaFor QName | WrongPragmaFor Range QName | BadLambda Term | BadMeta Term | BadDontCare Term type ToHs = ExceptT WhyNot TCM notAHaskellType :: Term -> WhyNot -> TCM a notAHaskellType top offender = typeError . GenericDocError =<< do fsep (pwords "The type" ++ [prettyTCM top] ++ pwords "cannot be translated to a corresponding Haskell type, because it contains" ++ reason offender) $$ possibleFix offender where reason (BadLambda v) = pwords "the lambda term" ++ [prettyTCM v <> "."] reason (BadMeta v) = pwords "a meta variable" ++ [prettyTCM v <> "."] reason (BadDontCare v) = pwords "an erased term" ++ [prettyTCM v <> "."] reason (NoPragmaFor x) = [prettyTCM x] ++ pwords "which does not have a COMPILE pragma." reason (WrongPragmaFor _ x) = [prettyTCM x] ++ pwords "which has the wrong kind of COMPILE pragma." possibleFix BadLambda{} = empty possibleFix BadMeta{} = empty possibleFix BadDontCare{} = empty possibleFix (NoPragmaFor d) = suggestPragma d $ "add a pragma" possibleFix (WrongPragmaFor r d) = suggestPragma d $ sep [ "replace the value-level pragma at", nest 2 $ pretty r, "by" ] suggestPragma d action = do def <- theDef <$> getConstInfo d let dataPragma n = ("data type HsD", "data HsD (" ++ intercalate " | " [ "C" ++ show i | i <- [1..n] ] ++ ")") typePragma = ("type HsT", "type HsT") (hsThing, pragma) = case def of Datatype{ dataCons = cs } -> dataPragma (length cs) Record{} -> dataPragma 1 _ -> typePragma vcat [ sep ["Possible fix:", action] , nest 2 $ hsep [ "{-# COMPILE GHC", prettyTCM d, "=", text pragma, "#-}" ] , text ("for a suitable Haskell " ++ hsThing ++ ".") ] runToHs :: Term -> ToHs a -> TCM a runToHs top m = either (notAHaskellType top) return =<< runExceptT m liftE1 :: (forall a. m a -> m a) -> ExceptT e m a -> ExceptT e m a liftE1 f = mkExceptT . f . runExceptT liftE1' :: (forall b. (a -> m b) -> m b) -> (a -> ExceptT e m b) -> ExceptT e m b liftE1' f k = mkExceptT (f (runExceptT . k)) -- Only used in hsTypeApproximation below, and in that case we catch the error. getHsType' :: QName -> TCM HS.Type getHsType' q = runToHs (Def q []) (getHsType q) getHsType :: QName -> ToHs HS.Type getHsType x = do d <- liftTCM $ getHaskellPragma x list <- liftTCM $ getBuiltinName builtinList inf <- liftTCM $ getBuiltinName builtinInf let namedType = liftTCM $ do -- For these builtin types, the type name (xhqn ...) refers to the -- generated, but unused, datatype and not the primitive type. nat <- getBuiltinName builtinNat int <- getBuiltinName builtinInteger bool <- getBuiltinName builtinBool if | Just x `elem` [nat, int] -> return $ hsCon "Integer" | Just x == bool -> return $ hsCon "Bool" | otherwise -> hsCon . prettyShow <$> xhqn "T" x liftE1 (setCurrentRange d) $ case d of _ | Just x == list -> liftTCM $ hsCon . prettyShow <$> xhqn "T" x -- we ignore Haskell pragmas for List _ | Just x == inf -> return $ hsQCon "MAlonzo.RTE" "Infinity" Just HsDefn{} -> throwError $ WrongPragmaFor (getRange d) x Just HsType{} -> namedType Just HsData{} -> namedType _ -> throwError $ NoPragmaFor x getHsVar :: MonadTCM tcm => Nat -> tcm HS.Name getHsVar i = HS.Ident . encodeName <$> nameOfBV i where encodeName x = "x" ++ concatMap encode (prettyShow x) okChars = ['a'..'z'] ++ ['A'..'Y'] ++ "_'" encode 'Z' = "ZZ" encode c | c `elem` okChars = [c] | otherwise = "Z" ++ show (fromEnum c) haskellType' :: Type -> TCM HS.Type haskellType' t = runToHs (unEl t) (fromType t) where fromArgs = mapM (fromTerm . unArg) fromType = fromTerm . unEl fromTerm v = do v <- liftTCM $ unSpine <$> reduce v reportSLn "compile.haskell.type" 50 $ "toHaskellType " ++ show v kit <- liftTCM coinductionKit case v of Var x es -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es hsApp . hsVar <$> getHsVar x <*> fromArgs args Def d es -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es hsApp <$> getHsType d <*> fromArgs args Pi a b -> if isBinderUsed b -- Andreas, 2012-04-03. Q: could we rely on Abs/NoAbs instead of again checking freeness of variable? then do hsA <- fromType (unDom a) liftE1' (underAbstraction a b) $ \ b -> hsForall <$> getHsVar 0 <*> (HS.TyFun hsA <$> fromType b) else HS.TyFun <$> fromType (unDom a) <*> fromType (noabsApp __IMPOSSIBLE__ b) Con c ci es -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es hsApp <$> getHsType (conName c) <*> fromArgs args Lam{} -> throwError (BadLambda v) Level{} -> return hsUnit Lit{} -> return hsUnit Sort{} -> return hsUnit MetaV{} -> throwError (BadMeta v) DontCare{} -> throwError (BadDontCare v) Dummy s -> __IMPOSSIBLE_VERBOSE__ s haskellType :: QName -> TCM HS.Type haskellType q = do def <- getConstInfo q let (np, erased) = case theDef def of Constructor{ conPars = np, conErased = erased } -> (np, erased ++ repeat False) _ -> (0, repeat False) stripErased (True : es) (HS.TyFun _ t) = stripErased es t stripErased (False : es) (HS.TyFun s t) = HS.TyFun s $ stripErased es t stripErased es (HS.TyForall xs t) = HS.TyForall xs $ stripErased es t stripErased _ t = t underPars 0 a = stripErased erased <$> haskellType' a underPars n a = do a <- reduce a case unEl a of Pi a (NoAbs _ b) -> underPars (n - 1) b Pi a b -> underAbstraction a b $ \b -> hsForall <$> getHsVar 0 <*> underPars (n - 1) b _ -> __IMPOSSIBLE__ ty <- underPars np $ defType def reportSDoc "tc.pragma.compile" 10 $ ("Haskell type for" <+> prettyTCM q <> ":") pretty ty return ty checkConstructorCount :: QName -> [QName] -> [HaskellCode] -> TCM () checkConstructorCount d cs hsCons | n == hn = return () | otherwise = do let n_forms_are = case hn of 1 -> "1 Haskell constructor is" n -> show n ++ " Haskell constructors are" only | hn == 0 = "" | hn < n = "only " | otherwise = "" genericDocError =<< fsep ([prettyTCM d] ++ pwords ("has " ++ show n ++ " constructors, but " ++ only ++ n_forms_are ++ " given [" ++ unwords hsCons ++ "]")) where n = length cs hn = length hsCons -- Type approximations ---------------------------------------------------- data PolyApprox = PolyApprox | NoPolyApprox deriving (Eq) hsTypeApproximation :: PolyApprox -> Int -> Type -> TCM HS.Type hsTypeApproximation poly fv t = do list <- getBuiltinName builtinList bool <- getBuiltinName builtinBool int <- getBuiltinName builtinInteger nat <- getBuiltinName builtinNat word <- getBuiltinName builtinWord64 let is q b = Just q == b tyCon = HS.TyCon . HS.UnQual . HS.Ident rteCon = HS.TyCon . HS.Qual mazRTE . HS.Ident tyVar n i = HS.TyVar $ HS.Ident $ "a" ++ show (n - i) let go n t = do t <- unSpine <$> reduce t case t of Var i _ | poly == PolyApprox -> return $ tyVar n i Pi a b -> HS.TyFun <$> go n (unEl $ unDom a) <*> go (n + k) (unEl $ unAbs b) where k = case b of Abs{} -> 1; NoAbs{} -> 0 Def q els | q `is` list, Apply t <- last ([Proj ProjSystem __IMPOSSIBLE__] ++ els) -> HS.TyApp (tyCon "[]") <$> go n (unArg t) | q `is` bool -> return $ tyCon "Bool" | q `is` int -> return $ tyCon "Integer" | q `is` nat -> return $ tyCon "Integer" | q `is` word -> return $ rteCon "Word64" | otherwise -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims els foldl HS.TyApp <$> getHsType' q <*> mapM (go n . unArg) args `catchError` \ _ -> do -- Not a Haskell type def <- theDef <$> getConstInfo q let isData | Datatype{} <- def = True | Record{} <- def = True | otherwise = False if isData then HS.TyCon <$> xhqn "T" q else return mazAnyType Sort{} -> return $ HS.FakeType "()" _ -> return mazAnyType go fv (unEl t) -- Approximating polymorphic types is not actually a good idea unless we -- actually keep track of type applications in recursive functions, and -- generate parameterised datatypes. Otherwise we'll just coerce all type -- variables to `Any` at the first `unsafeCoerce`. hsTelApproximation :: Type -> TCM ([HS.Type], HS.Type) hsTelApproximation = hsTelApproximation' NoPolyApprox hsTelApproximation' :: PolyApprox -> Type -> TCM ([HS.Type], HS.Type) hsTelApproximation' poly t = do TelV tel res <- telView t let args = map (snd . unDom) (telToList tel) (,) <$> zipWithM (hsTypeApproximation poly) [0..] args <*> hsTypeApproximation poly (length args) res Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Pretty.hs0000644000000000000000000001653013466402171020252 0ustar0000000000000000{-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- Pretty-printing of Haskell modules ------------------------------------------------------------------------ module Agda.Compiler.MAlonzo.Pretty where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Data.Generics.Geniplate import qualified Agda.Utils.Haskell.Syntax as HS import Text.PrettyPrint (empty) import Agda.Compiler.MAlonzo.Encode import Agda.Utils.Pretty import Agda.Utils.Impossible #include "undefined.h" prettyPrint :: Pretty a => a -> String prettyPrint = show . pretty instance Pretty HS.Module where pretty (HS.Module m pragmas imps decls) = vcat [ vcat $ map pretty pragmas , "module" <+> pretty m <+> "where" , "" , vcat $ map pretty imps , "" , vcat $ map pretty decls ] instance Pretty HS.ModulePragma where pretty (HS.LanguagePragma ps) = "{-#" <+> "LANGUAGE" <+> fsep (punctuate comma $ map pretty ps) <+> "#-}" pretty (HS.OtherPragma p) = text p instance Pretty HS.ImportDecl where pretty HS.ImportDecl{ HS.importModule = m , HS.importQualified = q , HS.importSpecs = specs } = hsep [ "import" , if q then "qualified" else empty , pretty m , maybe empty prSpecs specs ] where prSpecs (hide, specs) = hsep [ if hide then "hiding" else empty , parens $ fsep $ punctuate comma $ map pretty specs ] instance Pretty HS.ImportSpec where pretty (HS.IVar x) = pretty x instance Pretty HS.Decl where pretty d = case d of HS.TypeDecl f xs t -> sep [ "type" <+> pretty f <+> fsep (map pretty xs) <+> "=" , nest 2 $ pretty t ] HS.DataDecl newt d xs cons derv -> sep [ pretty newt <+> pretty d <+> fsep (map pretty xs) , nest 2 $ if null cons then empty else "=" <+> fsep (punctuate " |" $ map pretty cons) , nest 2 $ prDeriving derv ] where prDeriving [] = empty prDeriving ds = "deriving" <+> parens (fsep $ punctuate comma $ map prDer ds) prDer (d, ts) = pretty (foldl HS.TyApp (HS.TyCon d) ts) HS.TypeSig fs t -> sep [ hsep (punctuate comma (map pretty fs)) <+> "::" , nest 2 $ pretty t ] HS.FunBind ms -> vcat $ map pretty ms HS.PatSyn p1 p2 -> sep [ "pattern" <+> pretty p1 <+> "=" <+> pretty p2 ] HS.FakeDecl s -> text s instance Pretty HS.ConDecl where pretty (HS.ConDecl c sts) = pretty c <+> fsep (map (\(s, t) -> maybe empty pretty s <> prettyPrec 10 t) sts) instance Pretty HS.Strictness where pretty HS.Strict = "!" pretty HS.Lazy = empty instance Pretty HS.Match where pretty (HS.Match f ps rhs wh) = prettyWhere wh $ sep [ pretty f <+> fsep (map (prettyPrec 10) ps) , nest 2 $ prettyRhs "=" rhs ] prettyWhere :: Maybe HS.Binds -> Doc -> Doc prettyWhere Nothing doc = doc prettyWhere (Just b) doc = vcat [ doc, nest 2 $ sep [ "where", nest 2 $ pretty b ] ] instance Pretty HS.Pat where prettyPrec pr pat = case pat of HS.PVar x -> pretty x HS.PLit l -> pretty l HS.PAsPat x p -> mparens (pr > 10) $ pretty x <> "@" <> prettyPrec 11 p HS.PWildCard -> "_" HS.PBangPat p -> "!" <> prettyPrec 11 p HS.PApp c ps -> mparens (pr > 9) $ pretty c <+> hsep (map (prettyPrec 10) ps) HS.PatTypeSig p t -> mparens (pr > 0) $ sep [ pretty p <+> "::", nest 2 $ pretty t ] HS.PIrrPat p -> mparens (pr > 10) $ "~" <> prettyPrec 11 p prettyRhs :: String -> HS.Rhs -> Doc prettyRhs eq (HS.UnGuardedRhs e) = text eq <+> pretty e prettyRhs eq (HS.GuardedRhss rhss) = vcat $ map (prettyGuardedRhs eq) rhss prettyGuardedRhs :: String -> HS.GuardedRhs -> Doc prettyGuardedRhs eq (HS.GuardedRhs ss e) = sep [ "|" <+> sep (punctuate comma $ map pretty ss) <+> text eq , nest 2 $ pretty e ] instance Pretty HS.Binds where pretty (HS.BDecls ds) = vcat $ map pretty ds instance Pretty HS.DataOrNew where pretty HS.DataType = "data" pretty HS.NewType = "newtype" instance Pretty HS.TyVarBind where pretty (HS.UnkindedVar x) = pretty x instance Pretty HS.Type where prettyPrec pr t = case t of HS.TyForall xs t -> mparens (pr > 0) $ sep [ "forall" <+> fsep (map pretty xs) <> "." , nest 2 $ pretty t ] HS.TyFun a b -> mparens (pr > 4) $ sep [ prettyPrec 5 a <+> "->", prettyPrec 4 b ] HS.TyCon c -> pretty c HS.TyVar x -> pretty x HS.TyApp (HS.TyCon (HS.UnQual (HS.Ident "[]"))) t -> brackets $ pretty t t@HS.TyApp{} -> mparens (pr > 9) $ sep [ prettyPrec 9 f , nest 2 $ fsep $ map (prettyPrec 10) ts ] where f : ts = appView t [] appView (HS.TyApp a b) as = appView a (b : as) appView t as = t : as HS.FakeType s -> text s instance Pretty HS.Stmt where pretty (HS.Qualifier e) = pretty e pretty (HS.Generator p e) = sep [ pretty p <+> "<-", nest 2 $ pretty e ] instance Pretty HS.Literal where pretty (HS.Int n) = integer n pretty (HS.Frac x) = double (fromRational x) pretty (HS.Char c) = text (show c) pretty (HS.String s) = text (show s) instance Pretty HS.Exp where prettyPrec pr e = case e of HS.Var x -> pretty x HS.Con c -> pretty c HS.Lit l -> pretty l HS.InfixApp a qop b -> mparens (pr > 0) $ sep [ prettyPrec 1 a , pretty qop <+> prettyPrec 1 b ] HS.App{} -> mparens (pr > 9) $ sep [ prettyPrec 9 f , nest 2 $ fsep $ map (prettyPrec 10) es ] where f : es = appView e [] appView (HS.App f e) es = appView f (e : es) appView f es = f : es HS.Lambda ps e -> mparens (pr > 0) $ sep [ "\\" <+> fsep (map (prettyPrec 10) ps) <+> "->" , nest 2 $ pretty e ] HS.Let bs e -> mparens (pr > 0) $ sep [ "let" <+> pretty bs <+> "in" , pretty e ] HS.If a b c -> mparens (pr > 0) $ sep [ "if" <+> pretty a , nest 2 $ "then" <+> pretty b , nest 2 $ "else" <+> prettyPrec 1 c ] HS.Case e bs -> mparens (pr > 0) $ vcat [ "case" <+> pretty e <+> "of" , nest 2 $ vcat $ map pretty bs ] HS.ExpTypeSig e t -> mparens (pr > 0) $ sep [ pretty e <+> "::" , nest 2 $ pretty t ] HS.NegApp exp -> parens $ "-" <> pretty exp HS.FakeExp s -> text s instance Pretty HS.Alt where pretty (HS.Alt pat rhs wh) = prettyWhere wh $ sep [ pretty pat, nest 2 $ prettyRhs "->" rhs ] instance Pretty HS.ModuleName where pretty m = text s where HS.ModuleName s = encodeModuleName m instance Pretty HS.QName where pretty q = mparens (isOperator q) (prettyQName q) instance Pretty HS.Name where pretty (HS.Ident s) = text s pretty (HS.Symbol s) = text s instance Pretty HS.QOp where pretty (HS.QVarOp x) | isOperator x = prettyQName x | otherwise = "`" <> prettyQName x <> "`" isOperator :: HS.QName -> Bool isOperator q = case q of HS.Qual _ x -> isOp x HS.UnQual x -> isOp x where isOp HS.Symbol{} = True isOp HS.Ident{} = False prettyQName :: HS.QName -> Doc prettyQName (HS.Qual m x) = pretty m <> "." <> pretty x prettyQName (HS.UnQual x) = pretty x Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Primitives.hs0000644000000000000000000002771613466402171021126 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.MAlonzo.Primitives where import Control.Monad.State import Data.Char import qualified Data.List as List import qualified Data.Map as Map import Data.Maybe import Agda.Compiler.Common import Agda.Compiler.ToTreeless import {-# SOURCE #-} Agda.Compiler.MAlonzo.Compiler (closedTerm) import Agda.Compiler.MAlonzo.Misc import Agda.Compiler.MAlonzo.Pretty import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Treeless import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Primitive import Agda.TypeChecking.Reduce import Agda.TypeChecking.Pretty import Agda.Utils.Either import Agda.Utils.Except import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Pretty (prettyShow) import qualified Agda.Utils.HashMap as HMap import qualified Agda.Utils.Haskell.Syntax as HS #include "undefined.h" import Agda.Utils.Impossible -- Andreas, 2019-04-29, issue #3731: exclude certain kinds of names, like constructors. -- TODO: Also only consider top-level definition (not buried inside a module). isMainFunction :: QName -> Defn -> Bool isMainFunction q = \case Axiom{} -> perhaps Function{ funProjection = Nothing } -> perhaps Function{ funProjection = Just{} } -> no AbstractDefn{} -> no GeneralizableVar{} -> no DataOrRecSig{} -> no Datatype{} -> no Record{} -> no Constructor{} -> no Primitive{} -> no where perhaps = "main" == prettyShow (nameConcrete $ qnameName q) -- ignores the qualification!? no = False hasMainFunction :: Interface -> IsMain hasMainFunction i | List.any (\ (x, def) -> isMainFunction x $ theDef def) names = IsMain | otherwise = NotMain where names = HMap.toList $ iSignature i ^. sigDefinitions -- | Check that the main function has type IO a, for some a. checkTypeOfMain :: IsMain -> QName -> Definition -> TCM [HS.Decl] -> TCM [HS.Decl] checkTypeOfMain NotMain q def ret = ret checkTypeOfMain IsMain q def ret | not (isMainFunction q $ theDef def) = ret | otherwise = do Def io _ <- primIO ty <- normalise $ defType def case unEl ty of Def d _ | d == io -> (mainAlias :) <$> ret _ -> do err <- fsep $ pwords "The type of main should be" ++ [prettyTCM io] ++ pwords " A, for some A. The given type is" ++ [prettyTCM ty] typeError $ GenericError $ show err where mainAlias = HS.FunBind [HS.Match mainLHS [] mainRHS emptyBinds ] mainLHS = HS.Ident "main" mainRHS = HS.UnGuardedRhs $ HS.App mazCoerce (HS.Var $ HS.UnQual $ unqhname "d" q) treelessPrimName :: TPrim -> String treelessPrimName p = case p of PQuot -> "quotInt" PRem -> "remInt" PSub -> "subInt" PAdd -> "addInt" PMul -> "mulInt" PGeq -> "geqInt" PLt -> "ltInt" PEqI -> "eqInt" PQuot64 -> "quot64" PRem64 -> "rem64" PSub64 -> "sub64" PAdd64 -> "add64" PMul64 -> "mul64" PLt64 -> "lt64" PEq64 -> "eq64" PITo64 -> "word64FromNat" P64ToI -> "word64ToNat" PEqF -> "eqFloat" -- MAlonzo uses literal patterns, so we don't need equality for the other primitive types PEqC -> __IMPOSSIBLE__ PEqS -> __IMPOSSIBLE__ PEqQ -> __IMPOSSIBLE__ PSeq -> "seq" -- primitives only used by GuardsToPrims transformation, which MAlonzo doesn't use PIf -> __IMPOSSIBLE__ -- | Haskell modules to be imported for BUILT-INs importsForPrim :: TCM [HS.ModuleName] importsForPrim = fmap (++ [HS.ModuleName "Data.Text"]) $ xForPrim $ List.map (\(s, ms) -> (s, return (List.map HS.ModuleName ms))) $ [ "CHAR" |-> ["Data.Char"] , "primIsAlpha" |-> ["Data.Char"] , "primIsAscii" |-> ["Data.Char"] , "primIsDigit" |-> ["Data.Char"] , "primIsHexDigit" |-> ["Data.Char"] , "primIsLatin1" |-> ["Data.Char"] , "primIsLower" |-> ["Data.Char"] , "primIsPrint" |-> ["Data.Char"] , "primIsSpace" |-> ["Data.Char"] , "primToLower" |-> ["Data.Char"] , "primToUpper" |-> ["Data.Char"] ] where (|->) = (,) -------------- xForPrim :: [(String, TCM [a])] -> TCM [a] xForPrim table = do qs <- HMap.keys <$> curDefs bs <- Map.toList <$> getsTC stBuiltinThings let getName (Builtin (Def q _)) = q getName (Builtin (Con q _ _)) = conName q getName (Builtin (Lam _ b)) = getName (Builtin $ unAbs b) getName (Builtin _) = __IMPOSSIBLE__ getName (Prim (PrimFun q _ _)) = q concat <$> sequence [ fromMaybe (return []) $ List.lookup s table | (s, def) <- bs, getName def `elem` qs ] -- | Definition bodies for primitive functions primBody :: String -> TCM HS.Exp primBody s = maybe unimplemented (fromRight (hsVarUQ . HS.Ident) <$>) $ List.lookup s $ [ -- Integer functions "primIntegerPlus" |-> binAsis "(+)" "Integer" , "primIntegerMinus" |-> binAsis "(-)" "Integer" , "primIntegerTimes" |-> binAsis "(*)" "Integer" , "primIntegerDiv" |-> binAsis "div" "Integer" , "primIntegerMod" |-> binAsis "mod" "Integer" , "primIntegerEquality"|-> rel "(==)" "Integer" , "primIntegerLess" |-> rel "(<)" "Integer" , "primIntegerAbs" |-> return "(abs :: Integer -> Integer)" , "primNatToInteger" |-> return "(id :: Integer -> Integer)" , "primShowInteger" |-> return "(Data.Text.pack . show :: Integer -> Data.Text.Text)" -- Levels , "primLevelZero" |-> return "()" , "primLevelSuc" |-> return "(\\ _ -> ())" , "primLevelMax" |-> return "(\\ _ _ -> ())" -- Sorts , "primSetOmega" |-> return "()" -- Natural number functions , "primNatPlus" |-> binNat "(+)" , "primNatMinus" |-> binNat "(\\ x y -> max 0 (x - y))" , "primNatTimes" |-> binNat "(*)" , "primNatDivSucAux" |-> binNat4 "(\\ k m n j -> k + div (max 0 $ n + m - j) (m + 1))" , "primNatModSucAux" |-> binNat4 "(\\ k m n j -> if n > j then mod (n - j - 1) (m + 1) else (k + n))" , "primNatEquality" |-> relNat "(==)" , "primNatLess" |-> relNat "(<)" -- Machine word functions , "primWord64ToNat" |-> return "MAlonzo.RTE.word64ToNat" , "primWord64FromNat" |-> return "MAlonzo.RTE.word64FromNat" , "primWord64ToNatInjective" |-> return "erased" -- Floating point functions , "primNatToFloat" |-> return "(fromIntegral :: Integer -> Double)" , "primFloatPlus" |-> return "((+) :: Double -> Double -> Double)" , "primFloatMinus" |-> return "((-) :: Double -> Double -> Double)" , "primFloatTimes" |-> return "((*) :: Double -> Double -> Double)" , "primFloatNegate" |-> return "(negate :: Double -> Double)" , "primFloatDiv" |-> return "((/) :: Double -> Double -> Double)" -- ASR (2016-09-14). We use bitwise equality for comparing Double -- because Haskell's Eq, which equates 0.0 and -0.0, allows to prove -- a contradiction (see Issue #2169). , "primFloatEquality" |-> return "MAlonzo.RTE.eqFloat" , "primFloatLess" |-> return "MAlonzo.RTE.ltFloat" , "primFloatNumericalEquality" |-> return "MAlonzo.RTE.eqNumFloat" , "primFloatNumericalLess" |-> return "MAlonzo.RTE.ltNumFloat" , "primFloatSqrt" |-> return "(sqrt :: Double -> Double)" , "primRound" |-> return "(round :: Double -> Integer)" , "primFloor" |-> return "(floor :: Double -> Integer)" , "primCeiling" |-> return "(ceiling :: Double -> Integer)" , "primExp" |-> return "(exp :: Double -> Double)" , "primLog" |-> return "(log :: Double -> Double)" , "primSin" |-> return "(sin :: Double -> Double)" , "primCos" |-> return "(cos :: Double -> Double)" , "primTan" |-> return "(tan :: Double -> Double)" , "primASin" |-> return "(asin :: Double -> Double)" , "primACos" |-> return "(acos :: Double -> Double)" , "primATan" |-> return "(atan :: Double -> Double)" , "primATan2" |-> return "(atan2 :: Double -> Double -> Double)" , "primShowFloat" |-> return "(Data.Text.pack . show :: Double -> Data.Text.Text)" -- Character functions , "primCharEquality" |-> rel "(==)" "Char" , "primIsLower" |-> return "Data.Char.isLower" , "primIsDigit" |-> return "Data.Char.isDigit" , "primIsAlpha" |-> return "Data.Char.isAlpha" , "primIsSpace" |-> return "Data.Char.isSpace" , "primIsAscii" |-> return "Data.Char.isAscii" , "primIsLatin1" |-> return "Data.Char.isLatin1" , "primIsPrint" |-> return "Data.Char.isPrint" , "primIsHexDigit" |-> return "Data.Char.isHexDigit" , "primToUpper" |-> return "Data.Char.toUpper" , "primToLower" |-> return "Data.Char.toLower" , "primCharToNat" |-> return "(fromIntegral . fromEnum :: Char -> Integer)" , "primNatToChar" |-> return "(toEnum . fromIntegral :: Integer -> Char)" , "primShowChar" |-> return "(Data.Text.pack . show :: Char -> Data.Text.Text)" , "primCharToNatInjective" |-> return "erased" -- String functions , "primStringToList" |-> return "Data.Text.unpack" , "primStringFromList" |-> return "Data.Text.pack" , "primStringAppend" |-> binAsis "Data.Text.append" "Data.Text.Text" , "primStringEquality" |-> rel "(==)" "Data.Text.Text" , "primShowString" |-> return "(Data.Text.pack . show :: Data.Text.Text -> Data.Text.Text)" , "primStringToListInjective" |-> return "erased" -- Reflection , "primQNameEquality" |-> rel "(==)" "MAlonzo.RTE.QName" , "primQNameLess" |-> rel "(<)" "MAlonzo.RTE.QName" , "primShowQName" |-> return "Data.Text.pack . MAlonzo.RTE.qnameString" , "primQNameFixity" |-> return "MAlonzo.RTE.qnameFixity" , "primMetaEquality" |-> rel "(==)" "Integer" , "primMetaLess" |-> rel "(<)" "Integer" , "primShowMeta" |-> return "\\ x -> Data.Text.pack (\"_\" ++ show (x :: Integer))" -- Seq , "primForce" |-> return "\\ _ _ _ _ x f -> f $! x" , "primForceLemma" |-> return "erased" -- Erase , ("primEraseEquality", Right <$> do refl <- primRefl let erase = hLam "a" $ hLam "A" $ hLam "x" $ hLam "y" $ nLam "eq" refl closedTerm =<< closedTermToTreeless LazyEvaluation erase ) ] where x |-> s = (x, Left <$> s) bin blt op ty from to = do from' <- bltQual' blt from to' <- bltQual' blt to return $ repl [op, opty ty, from', to'] $ "\\ x y -> <<3>> ((<<0>> :: <<1>>) (<<2>> x) (<<2>> y))" binNat op = return $ repl [op] "(<<0>> :: Integer -> Integer -> Integer)" binNat4 op = return $ repl [op] "(<<0>> :: Integer -> Integer -> Integer -> Integer -> Integer)" binAsis op ty = return $ repl [op, opty ty] $ "((<<0>>) :: <<1>>)" rel' toTy op ty = do return $ repl [op, ty, toTy] $ "(\\ x y -> (<<0>> :: <<1>> -> <<1>> -> Bool) (<<2>> x) (<<2>> y))" relNat op = do return $ repl [op] $ "(<<0>> :: Integer -> Integer -> Bool)" rel op ty = rel' "" op ty opty t = t ++ "->" ++ t ++ "->" ++ t axiom_prims = ["primIMin","primIMax","primINeg","primPartial","primPartialP","primPFrom1","primPOr","primComp"] unimplemented | s `List.elem` axiom_prims = return $ rtmError $ "primitive with no body evaluated: " ++ s | otherwise = typeError $ NotImplemented s hLam x t = Lam (setHiding Hidden defaultArgInfo) (Abs x t) nLam x t = Lam (setHiding NotHidden defaultArgInfo) (Abs x t) noCheckCover :: QName -> TCM Bool noCheckCover q = (||) <$> isBuiltin q builtinNat <*> isBuiltin q builtinInteger ---------------------- pconName :: String -> TCM String pconName s = toS =<< getBuiltin s where toS (Con q _ _) = prettyPrint <$> conhqn (conName q) toS (Lam _ t) = toS (unAbs t) toS _ = mazerror $ "pconName" ++ s bltQual' :: String -> String -> TCM String bltQual' b s = prettyPrint <$> bltQual b s Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Compiler.hs-boot0000644000000000000000000000031313466402171021466 0ustar0000000000000000module Agda.Compiler.MAlonzo.Compiler where import qualified Agda.Utils.Haskell.Syntax as HS import Agda.Syntax.Treeless (TTerm) import Agda.TypeChecking.Monad (TCM) closedTerm :: TTerm -> TCM HS.Exp Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Misc.hs0000644000000000000000000001545013466402171017656 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.MAlonzo.Misc where import Control.Monad.State (gets) import Data.Char import qualified Data.List as List import Data.Map as Map import Data.Set as Set import Data.Function import qualified Agda.Utils.Haskell.Syntax as HS import Agda.Compiler.Common import Agda.Compiler.MAlonzo.Pragmas import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Utils.Maybe #include "undefined.h" import Agda.Utils.Impossible -------------------------------------------------- -- Setting up Interface before compile -------------------------------------------------- curHsMod :: TCM HS.ModuleName curHsMod = mazMod <$> curMName -------------------------------------------------- -- utilities for haskell names -------------------------------------------------- -- The following naming scheme seems to be used: -- -- * Types coming from Agda are named "T\". -- -- * Other definitions coming from Agda are named "d\". -- Exception: the main function is named "main". -- -- * Names coming from Haskell must always be used qualified. -- Exception: names from the Prelude. ihname :: String -> Nat -> HS.Name ihname s i = HS.Ident $ s ++ show i unqhname :: String -> QName -> HS.Name {- NOT A GOOD IDEA, see Issue 728 unqhname s q | ("d", "main") == (s, show(qnameName q)) = HS.Ident "main" | otherwise = ihname s (idnum $ nameId $ qnameName $ q) -} unqhname s q = ihname s (idnum $ nameId $ qnameName $ q) where idnum (NameId x _) = fromIntegral x -- the toplevel module containing the given one tlmodOf :: ModuleName -> TCM HS.ModuleName tlmodOf = fmap mazMod . topLevelModuleName -- qualify HS.Name n by the module of QName q, if necessary; -- accumulates the used module in stImportedModules at the same time. xqual :: QName -> HS.Name -> TCM HS.QName xqual q n = do m1 <- topLevelModuleName (qnameModule q) m2 <- curMName if m1 == m2 then return (HS.UnQual n) else addImport m1 >> return (HS.Qual (mazMod m1) n) xhqn :: String -> QName -> TCM HS.QName xhqn s q = xqual q (unqhname s q) hsName :: String -> HS.QName hsName s = HS.UnQual (HS.Ident s) -- always use the original name for a constructor even when it's redefined. conhqn :: QName -> TCM HS.QName conhqn q = xhqn "C" =<< canonicalName q -- qualify name s by the module of builtin b bltQual :: String -> String -> TCM HS.QName bltQual b s = do Def q _ <- getBuiltin b xqual q (HS.Ident s) dname :: QName -> HS.Name dname q = unqhname "d" q -- | Name for definition stripped of unused arguments duname :: QName -> HS.Name duname q = unqhname "du" q hsPrimOp :: String -> HS.QOp hsPrimOp s = HS.QVarOp $ HS.UnQual $ HS.Symbol s hsPrimOpApp :: String -> HS.Exp -> HS.Exp -> HS.Exp hsPrimOpApp op e e1 = HS.InfixApp e (hsPrimOp op) e1 hsInt :: Integer -> HS.Exp hsInt n = HS.Lit (HS.Int n) hsTypedInt :: Integral a => a -> HS.Exp hsTypedInt n = HS.ExpTypeSig (HS.Lit (HS.Int $ fromIntegral n)) (HS.TyCon (hsName "Integer")) hsLet :: HS.Name -> HS.Exp -> HS.Exp -> HS.Exp hsLet x e b = HS.Let (HS.BDecls [HS.FunBind [HS.Match x [] (HS.UnGuardedRhs e) emptyBinds]]) b hsVarUQ :: HS.Name -> HS.Exp hsVarUQ = HS.Var . HS.UnQual hsAppView :: HS.Exp -> [HS.Exp] hsAppView = reverse . view where view (HS.App e e1) = e1 : view e view (HS.InfixApp e1 op e2) = [e2, e1, hsOpToExp op] view e = [e] hsOpToExp :: HS.QOp -> HS.Exp hsOpToExp (HS.QVarOp x) = HS.Var x hsLambda :: [HS.Pat] -> HS.Exp -> HS.Exp hsLambda ps (HS.Lambda ps1 e) = HS.Lambda (ps ++ ps1) e hsLambda ps e = HS.Lambda ps e hsMapAlt :: (HS.Exp -> HS.Exp) -> HS.Alt -> HS.Alt hsMapAlt f (HS.Alt p rhs wh) = HS.Alt p (hsMapRHS f rhs) wh hsMapRHS :: (HS.Exp -> HS.Exp) -> HS.Rhs -> HS.Rhs hsMapRHS f (HS.UnGuardedRhs def) = HS.UnGuardedRhs (f def) hsMapRHS f (HS.GuardedRhss es) = HS.GuardedRhss [ HS.GuardedRhs g (f e) | HS.GuardedRhs g e <- es ] -------------------------------------------------- -- Hard coded module names -------------------------------------------------- mazstr :: String mazstr = "MAlonzo.Code" mazName :: Name mazName = mkName_ __IMPOSSIBLE__ mazstr mazMod' :: String -> HS.ModuleName mazMod' s = HS.ModuleName $ mazstr ++ "." ++ s mazMod :: ModuleName -> HS.ModuleName mazMod = mazMod' . prettyShow mazerror :: String -> a mazerror msg = error $ mazstr ++ ": " ++ msg mazCoerceName :: String mazCoerceName = "coe" mazErasedName :: String mazErasedName = "erased" mazAnyTypeName :: String mazAnyTypeName = "AgdaAny" mazCoerce :: HS.Exp -- mazCoerce = HS.Var $ HS.Qual unsafeCoerceMod (HS.Ident "unsafeCoerce") -- mazCoerce = HS.Var $ HS.Qual mazRTE $ HS.Ident mazCoerceName mazCoerce = HS.Var $ HS.UnQual $ HS.Ident mazCoerceName -- Andreas, 2011-11-16: error incomplete match now RTE-call mazIncompleteMatch :: HS.Exp mazIncompleteMatch = HS.Var $ HS.Qual mazRTE $ HS.Ident "mazIncompleteMatch" rtmIncompleteMatch :: QName -> HS.Exp rtmIncompleteMatch q = mazIncompleteMatch `HS.App` hsVarUQ (unqhname "name" q) mazUnreachableError :: HS.Exp mazUnreachableError = HS.Var $ HS.Qual mazRTE $ HS.Ident "mazUnreachableError" rtmUnreachableError :: HS.Exp rtmUnreachableError = mazUnreachableError mazAnyType :: HS.Type mazAnyType = HS.TyCon (hsName mazAnyTypeName) mazRTE :: HS.ModuleName mazRTE = HS.ModuleName "MAlonzo.RTE" rtmQual :: String -> HS.QName rtmQual = HS.UnQual . HS.Ident rtmVar :: String -> HS.Exp rtmVar = HS.Var . rtmQual rtmError :: String -> HS.Exp rtmError s = rtmVar "error" `HS.App` (HS.Lit $ HS.String $ "MAlonzo Runtime Error: " ++ s) unsafeCoerceMod :: HS.ModuleName unsafeCoerceMod = HS.ModuleName "Unsafe.Coerce" -------------------------------------------------- -- Sloppy ways to declare = -------------------------------------------------- fakeD :: HS.Name -> String -> HS.Decl fakeD v s = HS.FunBind [HS.Match v [] (HS.UnGuardedRhs $ fakeExp s) emptyBinds] fakeDS :: String -> String -> HS.Decl fakeDS = fakeD . HS.Ident fakeDQ :: QName -> String -> HS.Decl fakeDQ = fakeD . unqhname "d" fakeType :: String -> HS.Type fakeType = HS.FakeType fakeExp :: String -> HS.Exp fakeExp = HS.FakeExp fakeDecl :: String -> HS.Decl fakeDecl = HS.FakeDecl -------------------------------------------------- -- Auxiliary definitions -------------------------------------------------- emptyBinds :: Maybe HS.Binds emptyBinds = Nothing -------------------------------------------------- -- Utilities for Haskell modules names -------------------------------------------------- -- | Can the character be used in a Haskell module name part -- (@conid@)? This function is more restrictive than what the Haskell -- report allows. isModChar :: Char -> Bool isModChar c = isLower c || isUpper c || isDigit c || c == '_' || c == '\'' Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Encode.hs0000644000000000000000000000432713466402171020161 0ustar0000000000000000------------------------------------------------------------------------ -- Module name encoding ------------------------------------------------------------------------ module Agda.Compiler.MAlonzo.Encode ( encodeModuleName ) where import Data.Char import Data.Function import qualified Data.List as List import qualified Agda.Utils.Haskell.Syntax as HS import Agda.Compiler.MAlonzo.Misc -- | Haskell module names have to satisfy the Haskell (including the -- hierarchical module namespace extension) lexical syntax: -- -- @modid -> [modid.] large {small | large | digit | ' }@ -- -- 'encodeModuleName' is an injective function into the set of module -- names defined by @modid@. The function preserves @.@s, and it also -- preserves module names whose first name part is not 'mazstr'. -- -- Precondition: The input must not start or end with @.@, and no two -- @.@s may be adjacent. encodeModuleName :: HS.ModuleName -> HS.ModuleName encodeModuleName (HS.ModuleName s) = HS.ModuleName $ case List.stripPrefix mazstr s of Just s' -> mazstr ++ foldr encNamePart "" (splitUp' s') Nothing -> s where -- splitUp ".apa.bepa." == [".","apa",".","bepa","."] -- splitUp = groupBy ((&&) `on` (/= '.')) -- Since comparison against "." is wasteful, and modules name components are nonempty, -- we can use "" as the separator. -- Since modules name components are nonempty, -- this is more efficient than adding a Maybe wrapper: -- We are effectively using ``String = Maybe NEString''. -- -- splitUp' ".apa.bepa." == ["","apa","","bepa",""] splitUp' :: String -> [String] splitUp' = h where h [] = [] h (c : cs) = case c of '.' -> "" : h cs _ -> g (c :) cs g acc [] = [acc []] g acc (c : cs) = case c of '.' -> acc [] : "" : h cs _ -> g (acc . (c :)) cs encNamePart "" r = '.' : r encNamePart s r = ensureFirstCharLarge s $ foldr enc r s ensureFirstCharLarge s r = case s of c : cs | isUpper c && c /= largeChar -> r _ -> largeChar : r largeChar = 'Q' escapeChar = 'Z' isOK c = c /= escapeChar && isModChar c enc c r | isOK c = c : r | otherwise = escapeChar : shows (fromEnum c) (escapeChar : r) Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Coerce.hs0000644000000000000000000000514013466402171020156 0ustar0000000000000000 module Agda.Compiler.MAlonzo.Coerce (addCoercions) where import Agda.Syntax.Treeless import Agda.TypeChecking.Monad import Agda.TypeChecking.Telescope import Agda.TypeChecking.Substitute import Agda.Utils.Functor -- | Insert unsafeCoerce (in the form of 'TCoerce') everywhere it's needed in -- the right-hand side of a definition. addCoercions :: TTerm -> TCM TTerm addCoercions = coerceTop where -- Don't coerce top-level lambdas. coerceTop (TLam b) = TLam <$> coerceTop b coerceTop t = coerce t -- Coerce a term `t`. The result (when translated to Haskell) has type -- `forall a. a`. coerce t = case t of TVar{} -> return $ TCoerce t TPrim{} -> return $ TCoerce t TDef{} -> return $ TCoerce t TCon{} -> return $ TCoerce t TLit{} -> return $ TCoerce t TUnit{} -> return $ TCoerce t TSort{} -> return $ TCoerce t TErased{} -> return t TCoerce{} -> return t TError{} -> return t TApp f vs -> do ar <- funArity f if length vs > ar then TApp (TCoerce f) <$> mapM softCoerce vs else TCoerce . TApp f <$> mapM coerce vs TLam b -> TCoerce . TLam <$> softCoerce b TLet e b -> TLet <$> softCoerce e <*> coerce b TCase x t d bs -> TCase x t <$> coerce d <*> mapM coerceAlt bs coerceAlt (TACon c a b) = TACon c a <$> coerce b coerceAlt (TAGuard g b) = TAGuard <$> coerce g <*> coerce b coerceAlt (TALit l b) = TALit l <$> coerce b -- Insert TCoerce in subterms. When translated to Haskell, the resulting -- term is well-typed with some type arbitrary type. softCoerce t = case t of TVar{} -> return t TPrim{} -> return t TDef{} -> return t TCon{} -> return t TLit{} -> return t TUnit{} -> return t TSort{} -> return t TErased{} -> return t TCoerce{} -> return t TError{} -> return t TApp f vs -> do ar <- funArity f if length vs > ar then TApp (TCoerce f) <$> mapM softCoerce vs else TApp f <$> mapM coerce vs TLam b -> TLam <$> softCoerce b TLet e b -> TLet <$> softCoerce e <*> softCoerce b TCase x t d bs -> TCase x t <$> coerce d <*> mapM coerceAlt bs funArity :: TTerm -> TCM Int funArity (TDef q) = maybe 0 (fst . tLamView) <$> getTreeless q funArity (TCon q) = length . filter not <$> getErasedConArgs q funArity (TPrim _) = return 3 -- max arity of any primitive funArity _ = return 0 Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Compiler.hs0000644000000000000000000007501713466402171020542 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.MAlonzo.Compiler where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Monad.Reader hiding (mapM_, forM_, mapM, forM, sequence) import Control.Monad.State hiding (mapM_, forM_, mapM, forM, sequence) import Data.Generics.Geniplate import Data.Foldable hiding (any, all, foldr, sequence_) import Data.Function import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable hiding (for) import Data.Monoid hiding ((<>)) import Numeric.IEEE import qualified Agda.Utils.Haskell.Syntax as HS import System.Directory (createDirectoryIfMissing) import System.FilePath hiding (normalise) import Agda.Compiler.CallCompiler import Agda.Compiler.Common import Agda.Compiler.MAlonzo.Coerce import Agda.Compiler.MAlonzo.Misc import Agda.Compiler.MAlonzo.Pretty import Agda.Compiler.MAlonzo.Primitives import Agda.Compiler.MAlonzo.HaskellTypes import Agda.Compiler.MAlonzo.Pragmas import Agda.Compiler.ToTreeless import Agda.Compiler.Treeless.Unused import Agda.Compiler.Treeless.Erase import Agda.Compiler.Backend import Agda.Interaction.FindFile import Agda.Interaction.Imports import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Fixity import qualified Agda.Syntax.Abstract.Name as A import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Names (namesIn) import qualified Agda.Syntax.Treeless as T import Agda.Syntax.Literal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Primitive (getBuiltinName) import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Pretty import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Warnings import Agda.TypeChecking.CompiledClause import Agda.Utils.FileName import Agda.Utils.Functor import Agda.Utils.IO.Directory import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty (prettyShow, Pretty) import qualified Agda.Utils.IO.UTF8 as UTF8 import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.String import Agda.Utils.Tuple import Paths_Agda #include "undefined.h" import Agda.Utils.Impossible -- The backend callbacks -------------------------------------------------- ghcBackend :: Backend ghcBackend = Backend ghcBackend' ghcBackend' :: Backend' GHCOptions GHCOptions GHCModuleEnv IsMain [HS.Decl] ghcBackend' = Backend' { backendName = "GHC" , backendVersion = Nothing , options = defaultGHCOptions , commandLineFlags = ghcCommandLineFlags , isEnabled = optGhcCompile , preCompile = ghcPreCompile , postCompile = ghcPostCompile , preModule = ghcPreModule , postModule = ghcPostModule , compileDef = ghcCompileDef , scopeCheckingSuffices = False } --- Options --- data GHCOptions = GHCOptions { optGhcCompile :: Bool , optGhcCallGhc :: Bool , optGhcFlags :: [String] } defaultGHCOptions :: GHCOptions defaultGHCOptions = GHCOptions { optGhcCompile = False , optGhcCallGhc = True , optGhcFlags = [] } ghcCommandLineFlags :: [OptDescr (Flag GHCOptions)] ghcCommandLineFlags = [ Option ['c'] ["compile", "ghc"] (NoArg enable) "compile program using the GHC backend" , Option [] ["ghc-dont-call-ghc"] (NoArg dontCallGHC) "don't call GHC, just write the GHC Haskell files." , Option [] ["ghc-flag"] (ReqArg ghcFlag "GHC-FLAG") "give the flag GHC-FLAG to GHC" ] where enable o = pure o{ optGhcCompile = True } dontCallGHC o = pure o{ optGhcCallGhc = False } ghcFlag f o = pure o{ optGhcFlags = optGhcFlags o ++ [f] } --- Top-level compilation --- ghcPreCompile :: GHCOptions -> TCM GHCOptions ghcPreCompile ghcOpts = do allowUnsolved <- optAllowUnsolved <$> pragmaOptions when allowUnsolved $ genericError $ "Unsolved meta variables are not allowed when compiling." return ghcOpts ghcPostCompile :: GHCOptions -> IsMain -> Map ModuleName IsMain -> TCM () ghcPostCompile opts isMain mods = copyRTEModules >> callGHC opts isMain mods --- Module compilation --- -- | This environment is no longer used for anything. type GHCModuleEnv = () ghcPreModule :: GHCOptions -> ModuleName -> FilePath -> TCM (Recompile GHCModuleEnv IsMain) ghcPreModule _ m ifile = ifM uptodate noComp yesComp where uptodate = liftIO =<< isNewerThan <$> outFile_ <*> pure ifile noComp = do reportSLn "compile.ghc" 2 . (++ " : no compilation is needed.") . show . A.mnameToConcrete =<< curMName Skip . hasMainFunction <$> curIF yesComp = do m <- show . A.mnameToConcrete <$> curMName out <- outFile_ reportSLn "compile.ghc" 1 $ repl [m, ifile, out] "Compiling <<0>> in <<1>> to <<2>>" stImportedModules `setTCLens` Set.empty -- we use stImportedModules to accumulate the required Haskell imports return (Recompile ()) ghcPostModule :: GHCOptions -> GHCModuleEnv -> IsMain -> ModuleName -> [[HS.Decl]] -> TCM IsMain ghcPostModule _ _ _ _ defs = do m <- curHsMod imps <- imports -- Get content of FOREIGN pragmas. (headerPragmas, hsImps, code) <- foreignHaskell writeModule $ HS.Module m (map HS.OtherPragma headerPragmas) imps (map fakeDecl (hsImps ++ code) ++ concat defs) hasMainFunction <$> curIF ghcCompileDef :: GHCOptions -> GHCModuleEnv -> IsMain -> Definition -> TCM [HS.Decl] ghcCompileDef _ = definition -- Compilation ------------------------------------------------------------ -------------------------------------------------- -- imported modules -- I use stImportedModules in a non-standard way, -- accumulating in it what are acutally used in Misc.xqual -------------------------------------------------- imports :: TCM [HS.ImportDecl] imports = (hsImps ++) <$> imps where hsImps :: [HS.ImportDecl] hsImps = [unqualRTE, decl mazRTE] unqualRTE :: HS.ImportDecl unqualRTE = HS.ImportDecl mazRTE False $ Just $ (False, [ HS.IVar $ HS.Ident x | x <- [mazCoerceName, mazErasedName, mazAnyTypeName] ++ map treelessPrimName rtePrims ]) rtePrims = [T.PAdd, T.PSub, T.PMul, T.PQuot, T.PRem, T.PGeq, T.PLt, T.PEqI, T.PEqF, T.PAdd64, T.PSub64, T.PMul64, T.PQuot64, T.PRem64, T.PLt64, T.PEq64, T.PITo64, T.P64ToI] imps :: TCM [HS.ImportDecl] imps = List.map decl . uniq <$> ((++) <$> importsForPrim <*> (List.map mazMod <$> mnames)) decl :: HS.ModuleName -> HS.ImportDecl decl m = HS.ImportDecl m True Nothing mnames :: TCM [ModuleName] mnames = Set.elems <$> useTC stImportedModules uniq :: [HS.ModuleName] -> [HS.ModuleName] uniq = List.map head . List.group . List.sort -------------------------------------------------- -- Main compiling clauses -------------------------------------------------- definition :: GHCModuleEnv -> IsMain -> Definition -> TCM [HS.Decl] -- ignore irrelevant definitions {- Andreas, 2012-10-02: Invariant no longer holds definition kit (Defn NonStrict _ _ _ _ _ _ _ _) = __IMPOSSIBLE__ -} definition _env _isMain Defn{defArgInfo = info, defName = q} | not $ usableModality info = do reportSDoc "compile.ghc.definition" 10 $ "Not compiling" <+> prettyTCM q <> "." return [] definition env isMain def@Defn{defName = q, defType = ty, theDef = d} = do reportSDoc "compile.ghc.definition" 10 $ vcat [ "Compiling" <+> prettyTCM q <> ":" , nest 2 $ text (show d) ] pragma <- getHaskellPragma q mbool <- getBuiltinName builtinBool mlist <- getBuiltinName builtinList minf <- getBuiltinName builtinInf mflat <- getBuiltinName builtinFlat checkTypeOfMain isMain q def $ do infodecl q <$> case d of _ | Just HsDefn{} <- pragma, Just q == mflat -> genericError "\"COMPILE GHC\" pragmas are not allowed for the FLAT builtin." _ | Just (HsDefn r hs) <- pragma -> setCurrentRange r $ do -- Make sure we have imports for all names mentioned in the type. hsty <- haskellType q ty <- normalise ty sequence_ [ xqual x (HS.Ident "_") | x <- Set.toList (namesIn ty) ] -- Check that the function isn't INLINE (since that will make this -- definition pointless). inline <- (^. funInline) . theDef <$> getConstInfo q when inline $ warning $ UselessInline q return $ fbWithType hsty (fakeExp hs) -- Compiling Bool Datatype{} | Just q == mbool -> do _ <- sequence_ [primTrue, primFalse] -- Just to get the proper error for missing TRUE/FALSE let d = unqhname "d" q Just true <- getBuiltinName builtinTrue Just false <- getBuiltinName builtinFalse cs <- mapM compiledcondecl [false, true] return $ [ compiledTypeSynonym q "Bool" 0 , HS.FunBind [HS.Match d [] (HS.UnGuardedRhs HS.unit_con) emptyBinds] ] ++ cs -- Compiling List Datatype{ dataPars = np } | Just q == mlist -> do _ <- sequence_ [primNil, primCons] -- Just to get the proper error for missing NIL/CONS caseMaybe pragma (return ()) $ \ p -> setCurrentRange p $ warning . GenericWarning =<< do fsep $ pwords "Ignoring GHC pragma for builtin lists; they always compile to Haskell lists." let d = unqhname "d" q t = unqhname "T" q Just nil <- getBuiltinName builtinNil Just cons <- getBuiltinName builtinCons let vars f n = map (f . ihname "a") [0 .. n - 1] cs <- mapM compiledcondecl [nil, cons] return $ [ HS.TypeDecl t (vars HS.UnkindedVar (np - 1)) (HS.FakeType "[]") , HS.FunBind [HS.Match d (vars HS.PVar np) (HS.UnGuardedRhs HS.unit_con) emptyBinds] ] ++ cs -- Compiling Inf _ | Just q == minf -> do _ <- primSharp -- To get a proper error for missing SHARP. Just sharp <- getBuiltinName builtinSharp sharpC <- compiledcondecl sharp let d = unqhname "d" q err = "No term-level implementation of the INFINITY builtin." return $ [ compiledTypeSynonym q "MAlonzo.RTE.Infinity" 2 , HS.FunBind [HS.Match d [HS.PVar (ihname "a" 0)] (HS.UnGuardedRhs (HS.FakeExp ("error " ++ show err))) emptyBinds] , sharpC ] DataOrRecSig{} -> __IMPOSSIBLE__ Axiom{} -> do ar <- typeArity ty return $ [ compiledTypeSynonym q ty ar | Just (HsType r ty) <- [pragma] ] ++ fb axiomErr Primitive{ primName = s } -> fb <$> primBody s Function{} -> function pragma $ functionViaTreeless q Datatype{ dataPars = np, dataIxs = ni, dataClause = cl, dataCons = cs } | Just hsdata@(HsData r ty hsCons) <- pragma -> setCurrentRange r $ do reportSDoc "compile.ghc.definition" 40 $ hsep $ [ "Compiling data type with COMPILE pragma ...", pretty hsdata ] computeErasedConstructorArgs q ccscov <- constructorCoverageCode q (np + ni) cs ty hsCons cds <- mapM compiledcondecl cs let result = concat $ [ tvaldecl q (dataInduction d) (np + ni) [] (Just __IMPOSSIBLE__) , [ compiledTypeSynonym q ty np ] , cds , ccscov ] return result Datatype{ dataPars = np, dataIxs = ni, dataClause = cl, dataCons = cs, dataInduction = ind } -> do computeErasedConstructorArgs q cds <- mapM (flip condecl ind) cs return $ tvaldecl q ind (np + ni) cds cl Constructor{} -> return [] GeneralizableVar{} -> return [] Record{ recPars = np, recClause = cl, recConHead = con, recInduction = ind } -> let -- Non-recursive record types are treated as being -- inductive. inductionKind = fromMaybe Inductive ind in case pragma of Just (HsData r ty hsCons) -> setCurrentRange r $ do let cs = [conName con] computeErasedConstructorArgs q ccscov <- constructorCoverageCode q np cs ty hsCons cds <- mapM compiledcondecl cs return $ tvaldecl q inductionKind np [] (Just __IMPOSSIBLE__) ++ [compiledTypeSynonym q ty np] ++ cds ++ ccscov _ -> do computeErasedConstructorArgs q cd <- condecl (conName con) inductionKind return $ tvaldecl q inductionKind (I.arity ty) [cd] cl AbstractDefn{} -> __IMPOSSIBLE__ where function :: Maybe HaskellPragma -> TCM [HS.Decl] -> TCM [HS.Decl] function mhe fun = do ccls <- mkwhere <$> fun mflat <- getBuiltinName builtinFlat case mhe of Just HsExport{} | Just q == mflat -> genericError "\"COMPILE GHC as\" pragmas are not allowed for the FLAT builtin." Just (HsExport r name) -> do t <- setCurrentRange r $ haskellType q let tsig :: HS.Decl tsig = HS.TypeSig [HS.Ident name] t def :: HS.Decl def = HS.FunBind [HS.Match (HS.Ident name) [] (HS.UnGuardedRhs (hsCoerce $ hsVarUQ $ dname q)) emptyBinds] return ([tsig,def] ++ ccls) _ -> return ccls functionViaTreeless :: QName -> TCM [HS.Decl] functionViaTreeless q = caseMaybeM (toTreeless LazyEvaluation q) (pure []) $ \ treeless -> do used <- getCompiledArgUse q let dostrip = any not used -- Compute the type approximation def <- getConstInfo q (argTypes0, resType) <- hsTelApproximation $ defType def let pars = case theDef def of Function{ funProjection = Just Projection{ projIndex = i } } | i > 0 -> i - 1 _ -> 0 argTypes = drop pars argTypes0 argTypesS = [ t | (t, True) <- zip argTypes (used ++ repeat True) ] e <- if dostrip then closedTerm (stripUnusedArguments used treeless) else closedTerm treeless let (ps, b) = lamView e lamView e = case e of HS.Lambda ps b -> (ps, b) b -> ([], b) tydecl f ts t = HS.TypeSig [f] (foldr HS.TyFun t ts) funbind f ps b = HS.FunBind [HS.Match f ps (HS.UnGuardedRhs b) emptyBinds] tyfunbind f ts t ps b = let ts' = ts ++ (replicate (length ps - length ts) mazAnyType) in [tydecl f ts' t, funbind f ps b] -- The definition of the non-stripped function (ps0, _) <- lamView <$> closedTerm (foldr ($) T.TErased $ replicate (length used) T.TLam) let b0 = foldl HS.App (hsVarUQ $ duname q) [ hsVarUQ x | (~(HS.PVar x), True) <- zip ps0 used ] return $ if dostrip then tyfunbind (dname q) argTypes resType ps0 b0 ++ tyfunbind (duname q) argTypesS resType ps b else tyfunbind (dname q) argTypes resType ps b mkwhere :: [HS.Decl] -> [HS.Decl] mkwhere (HS.FunBind [m0, HS.Match dn ps rhs emptyBinds] : fbs@(_:_)) = [HS.FunBind [m0, HS.Match dn ps rhs bindsAux]] where bindsAux :: Maybe HS.Binds bindsAux = Just $ HS.BDecls fbs mkwhere fbs = fbs fbWithType :: HS.Type -> HS.Exp -> [HS.Decl] fbWithType ty e = [ HS.TypeSig [unqhname "d" q] ty ] ++ fb e fb :: HS.Exp -> [HS.Decl] fb e = [HS.FunBind [HS.Match (unqhname "d" q) [] (HS.UnGuardedRhs $ e) emptyBinds]] axiomErr :: HS.Exp axiomErr = rtmError $ "postulate evaluated: " ++ prettyShow q constructorCoverageCode :: QName -> Int -> [QName] -> HaskellType -> [HaskellCode] -> TCM [HS.Decl] constructorCoverageCode q np cs hsTy hsCons = do checkConstructorCount q cs hsCons ifM (noCheckCover q) (return []) $ do ccs <- List.concat <$> zipWithM checkConstructorType cs hsCons cov <- checkCover q hsTy np cs hsCons return $ ccs ++ cov -- | Environment for naming of local variables. -- Invariant: @reverse ccCxt ++ ccNameSupply@ data CCEnv = CCEnv { _ccNameSupply :: NameSupply -- ^ Supply of fresh names , _ccContext :: CCContext -- ^ Names currently in scope } type NameSupply = [HS.Name] type CCContext = [HS.Name] ccNameSupply :: Lens' NameSupply CCEnv ccNameSupply f e = (\ ns' -> e { _ccNameSupply = ns' }) <$> f (_ccNameSupply e) ccContext :: Lens' CCContext CCEnv ccContext f e = (\ cxt -> e { _ccContext = cxt }) <$> f (_ccContext e) -- | Initial environment for expression generation. initCCEnv :: CCEnv initCCEnv = CCEnv { _ccNameSupply = map (ihname "v") [0..] -- DON'T CHANGE THESE NAMES! , _ccContext = [] } -- | Term variables are de Bruijn indices. lookupIndex :: Int -> CCContext -> HS.Name lookupIndex i xs = fromMaybe __IMPOSSIBLE__ $ xs !!! i type CC = ReaderT CCEnv TCM freshNames :: Int -> ([HS.Name] -> CC a) -> CC a freshNames n _ | n < 0 = __IMPOSSIBLE__ freshNames n cont = do (xs, rest) <- splitAt n <$> view ccNameSupply local (over ccNameSupply (const rest)) $ cont xs -- | Introduce n variables into the context. intros :: Int -> ([HS.Name] -> CC a) -> CC a intros n cont = freshNames n $ \xs -> local (over ccContext (reverse xs ++)) $ cont xs checkConstructorType :: QName -> HaskellCode -> TCM [HS.Decl] checkConstructorType q hs = do ty <- haskellType q return [ HS.TypeSig [unqhname "check" q] ty , HS.FunBind [HS.Match (unqhname "check" q) [] (HS.UnGuardedRhs $ fakeExp hs) emptyBinds] ] checkCover :: QName -> HaskellType -> Nat -> [QName] -> [HaskellCode] -> TCM [HS.Decl] checkCover q ty n cs hsCons = do let tvs = [ "a" ++ show i | i <- [1..n] ] makeClause c hsc = do a <- erasedArity c let pat = HS.PApp (HS.UnQual $ HS.Ident hsc) $ replicate a HS.PWildCard return $ HS.Alt pat (HS.UnGuardedRhs $ HS.unit_con) emptyBinds cs <- zipWithM makeClause cs hsCons let rhs = HS.Case (HS.Var $ HS.UnQual $ HS.Ident "x") cs return [ HS.TypeSig [unqhname "cover" q] $ fakeType $ unwords (ty : tvs) ++ " -> ()" , HS.FunBind [HS.Match (unqhname "cover" q) [HS.PVar $ HS.Ident "x"] (HS.UnGuardedRhs rhs) emptyBinds] ] closedTerm :: T.TTerm -> TCM HS.Exp closedTerm v = do v <- addCoercions v term v `runReaderT` initCCEnv -- Translate case on bool to if mkIf :: T.TTerm -> CC T.TTerm mkIf t@(TCase e _ d [TACon c1 0 b1, TACon c2 0 b2]) | T.isUnreachable d = do mTrue <- lift $ getBuiltinName builtinTrue mFalse <- lift $ getBuiltinName builtinFalse let isTrue c = Just c == mTrue isFalse c = Just c == mFalse if | isTrue c1, isFalse c2 -> return $ T.tIfThenElse (TCoerce $ TVar e) b1 b2 | isTrue c2, isFalse c1 -> return $ T.tIfThenElse (TCoerce $ TVar e) b2 b1 | otherwise -> return t mkIf t = return t -- | Extract Agda term to Haskell expression. -- Erased arguments are extracted as @()@. -- Types are extracted as @()@. term :: T.TTerm -> CC HS.Exp term tm0 = mkIf tm0 >>= \ tm0 -> case tm0 of T.TVar i -> do x <- lookupIndex i <$> view ccContext return $ hsVarUQ x T.TApp (T.TPrim T.PIf) [c, x, y] -> HS.If <$> term c <*> term x <*> term y T.TApp t ts | Just (coe, f) <- coerceView t -> do used <- lift $ getCompiledArgUse f isCompiled <- lift $ isJust <$> getHaskellPragma f -- #2248: no unused argument pruning for COMPILE'd functions let given = length ts needed = length used missing = drop given used if not isCompiled && any not used then if any not missing then term (etaExpand (needed - given) tm0) else do f <- lift $ coe . HS.Var <$> xhqn "du" f -- used stripped function f `apps` [ t | (t, True) <- zip ts $ used ++ repeat True ] else do t' <- term (T.TDef f) coe t' `apps` ts where coerceView (T.TCoerce (T.TDef f)) = Just (hsCoerce, f) coerceView (T.TDef f) = Just (id, f) coerceView _ = Nothing T.TApp (T.TCon c) ts -> do -- Note that constructors are never coerced (ar, _) <- lift $ conArityAndPars c erased <- lift $ getErasedConArgs c let missing = drop (length ts) erased notErased = not case all notErased missing of False -> term $ etaExpand (length missing) tm0 True -> do f <- lift $ HS.Con <$> conhqn c f `apps` [ t | (t, False) <- zip ts erased ] T.TApp t ts -> do t' <- term t t' `apps` ts T.TLam at -> do (nm:_) <- view ccNameSupply intros 1 $ \ [x] -> hsLambda [HS.PVar x] <$> term at T.TLet t1 t2 -> do t1' <- term t1 intros 1 $ \[x] -> do t2' <- term t2 return $ hsLet x t1' t2' T.TCase sc ct def alts -> do sc' <- term (T.TVar sc) alts' <- traverse (alt sc) alts def' <- term def let defAlt = HS.Alt HS.PWildCard (HS.UnGuardedRhs def') emptyBinds return $ HS.Case (hsCoerce sc') (alts' ++ [defAlt]) T.TLit l -> return $ literal l T.TDef q -> do HS.Var <$> (lift $ xhqn "d" q) T.TCon q -> term (T.TApp (T.TCon q) []) T.TPrim p -> return $ compilePrim p T.TUnit -> return HS.unit_con T.TSort -> return HS.unit_con T.TCoerce e -> hsCoerce <$> term e T.TErased -> return $ hsVarUQ $ HS.Ident mazErasedName T.TError e -> return $ case e of T.TUnreachable -> rtmUnreachableError where apps = foldM (\ h a -> HS.App h <$> term a) etaExpand n t = foldr (const T.TLam) (T.mkTApp (raise n t) [T.TVar i | i <- [n - 1, n - 2..0]]) (replicate n ()) hsCoerce :: HS.Exp -> HS.Exp hsCoerce t = HS.App mazCoerce t compilePrim :: T.TPrim -> HS.Exp compilePrim s = HS.Var $ hsName $ treelessPrimName s alt :: Int -> T.TAlt -> CC HS.Alt alt sc a = do case a of T.TACon {T.aCon = c} -> do intros (T.aArity a) $ \ xs -> do erased <- lift $ getErasedConArgs c nil <- lift $ getBuiltinName builtinNil cons <- lift $ getBuiltinName builtinCons hConNm <- if | Just c == nil -> return $ HS.UnQual $ HS.Ident "[]" | Just c == cons -> return $ HS.UnQual $ HS.Symbol ":" | otherwise -> lift $ conhqn c mkAlt (HS.PApp hConNm $ map HS.PVar [ x | (x, False) <- zip xs erased ]) T.TAGuard g b -> do g <- term g b <- term b return $ HS.Alt HS.PWildCard (HS.GuardedRhss [HS.GuardedRhs [HS.Qualifier g] b]) emptyBinds T.TALit { T.aLit = LitQName _ q } -> mkAlt (litqnamepat q) T.TALit { T.aLit = l@LitFloat{}, T.aBody = b } -> mkGuarded (treelessPrimName T.PEqF) (literal l) b T.TALit { T.aLit = LitString _ s , T.aBody = b } -> mkGuarded "(==)" (litString s) b T.TALit {} -> mkAlt (HS.PLit $ hslit $ T.aLit a) where mkGuarded eq lit b = do b <- term b let varName = HS.Ident "l" -- only used locally in the guard pv = HS.PVar varName v = hsVarUQ varName guard = HS.Var (HS.UnQual (HS.Ident eq)) `HS.App` v `HS.App` lit return $ HS.Alt pv (HS.GuardedRhss [HS.GuardedRhs [HS.Qualifier guard] b]) emptyBinds mkAlt :: HS.Pat -> CC HS.Alt mkAlt pat = do body' <- term $ T.aBody a return $ HS.Alt pat (HS.UnGuardedRhs body') emptyBinds literal :: Literal -> HS.Exp literal l = case l of LitNat _ _ -> typed "Integer" LitWord64 _ _ -> typed "MAlonzo.RTE.Word64" LitFloat _ x -> floatExp x "Double" LitQName _ x -> litqname x LitString _ s -> litString s _ -> l' where l' = HS.Lit $ hslit l typed = HS.ExpTypeSig l' . HS.TyCon . rtmQual -- ASR (2016-09-14): See Issue #2169. -- Ulf, 2016-09-28: and #2218. floatExp :: Double -> String -> HS.Exp floatExp x s | isNegativeZero x = rte "negativeZero" | isNegativeInf x = rte "negativeInfinity" | isInfinite x = rte "positiveInfinity" | isNegativeNaN x = rte "negativeNaN" | isNaN x = rte "positiveNaN" | otherwise = typed s rte = HS.Var . HS.Qual mazRTE . HS.Ident isNegativeInf x = isInfinite x && x < 0.0 isNegativeNaN x = isNaN x && not (identicalIEEE x (0.0 / 0.0)) hslit :: Literal -> HS.Literal hslit l = case l of LitNat _ x -> HS.Int x LitWord64 _ x -> HS.Int (fromIntegral x) LitFloat _ x -> HS.Frac (toRational x) LitChar _ x -> HS.Char x LitQName _ x -> __IMPOSSIBLE__ LitString _ _ -> __IMPOSSIBLE__ LitMeta{} -> __IMPOSSIBLE__ litString :: String -> HS.Exp litString s = HS.Var (HS.Qual (HS.ModuleName "Data.Text") (HS.Ident "pack")) `HS.App` (HS.Lit $ HS.String s) litqname :: QName -> HS.Exp litqname x = rteCon "QName" `apps` [ hsTypedInt n , hsTypedInt m , HS.Lit $ HS.String $ prettyShow x , rteCon "Fixity" `apps` [ litAssoc (fixityAssoc fx) , litPrec (fixityLevel fx) ] ] where apps = foldl HS.App rteCon name = HS.Con $ HS.Qual mazRTE $ HS.Ident name NameId n m = nameId $ qnameName x fx = theFixity $ nameFixity $ qnameName x litAssoc NonAssoc = rteCon "NonAssoc" litAssoc LeftAssoc = rteCon "LeftAssoc" litAssoc RightAssoc = rteCon "RightAssoc" litPrec Unrelated = rteCon "Unrelated" litPrec (Related l) = rteCon "Related" `HS.App` hsTypedInt l litqnamepat :: QName -> HS.Pat litqnamepat x = HS.PApp (HS.Qual mazRTE $ HS.Ident "QName") [ HS.PLit (HS.Int $ fromIntegral n) , HS.PLit (HS.Int $ fromIntegral m) , HS.PWildCard, HS.PWildCard ] where NameId n m = nameId $ qnameName x erasedArity :: QName -> TCM Nat erasedArity q = do (ar, _) <- conArityAndPars q erased <- length . filter id <$> getErasedConArgs q return (ar - erased) condecl :: QName -> Induction -> TCM HS.ConDecl condecl q _ind = do def <- getConstInfo q let Constructor{ conPars = np, conErased = erased } = theDef def (argTypes0, _) <- hsTelApproximation (defType def) let argTypes = [ (Just HS.Lazy, t) -- Currently all constructors are lazy. | (t, False) <- zip (drop np argTypes0) (erased ++ repeat False) ] return $ HS.ConDecl (unqhname "C" q) argTypes compiledcondecl :: QName -> TCM HS.Decl compiledcondecl q = do ar <- erasedArity q hsCon <- fromMaybe __IMPOSSIBLE__ <$> getHaskellConstructor q let patVars = map (HS.PVar . ihname "a") [0 .. ar - 1] return $ HS.PatSyn (HS.PApp (HS.UnQual $ unqhname "C" q) patVars) (HS.PApp (hsName hsCon) patVars) compiledTypeSynonym :: QName -> String -> Nat -> HS.Decl compiledTypeSynonym q hsT arity = HS.TypeDecl (unqhname "T" q) (map HS.UnkindedVar vs) (foldl HS.TyApp (HS.FakeType hsT) $ map HS.TyVar vs) where vs = [ ihname "a" i | i <- [0 .. arity - 1]] tvaldecl :: QName -> Induction -- ^ Is the type inductive or coinductive? -> Nat -> [HS.ConDecl] -> Maybe Clause -> [HS.Decl] tvaldecl q ind npar cds cl = HS.FunBind [HS.Match vn pvs (HS.UnGuardedRhs HS.unit_con) emptyBinds] : maybe [HS.DataDecl kind tn [] cds' []] (const []) cl where (tn, vn) = (unqhname "T" q, unqhname "d" q) pvs = [ HS.PVar $ ihname "a" i | i <- [0 .. npar - 1]] -- Inductive data types consisting of a single constructor with a -- single argument are translated into newtypes. (kind, cds') = case (ind, cds) of (Inductive, [HS.ConDecl c [(_, t)]]) -> (HS.NewType, [HS.ConDecl c [(Nothing, t)]]) -- The strictness annotations are removed for newtype -- constructors. _ -> (HS.DataType, cds) infodecl :: QName -> [HS.Decl] -> [HS.Decl] infodecl _ [] = [] infodecl q ds = fakeD (unqhname "name" q) (haskellStringLiteral $ prettyShow q) : ds -------------------------------------------------- -- Writing out a haskell module -------------------------------------------------- copyRTEModules :: TCM () copyRTEModules = do dataDir <- lift getDataDir let srcDir = dataDir "MAlonzo" "src" (lift . copyDirContent srcDir) =<< compileDir writeModule :: HS.Module -> TCM () writeModule (HS.Module m ps imp ds) = do -- Note that GHC assumes that sources use ASCII or UTF-8. out <- outFile m liftIO $ UTF8.writeFile out $ (++ "\n") $ prettyPrint $ HS.Module m (p : ps) imp ds where p = HS.LanguagePragma $ List.map HS.Ident $ [ "EmptyDataDecls" , "EmptyCase" , "ExistentialQuantification" , "ScopedTypeVariables" , "NoMonomorphismRestriction" , "Rank2Types" , "PatternSynonyms" ] outFile' :: Pretty a => a -> TCM (FilePath, FilePath) outFile' m = do mdir <- compileDir let (fdir, fn) = splitFileName $ repldot pathSeparator $ prettyPrint m let dir = mdir fdir fp = dir replaceExtension fn "hs" liftIO $ createDirectoryIfMissing True dir return (mdir, fp) where repldot c = List.map $ \ c' -> if c' == '.' then c else c' outFile :: HS.ModuleName -> TCM FilePath outFile m = snd <$> outFile' m outFile_ :: TCM FilePath outFile_ = outFile =<< curHsMod callGHC :: GHCOptions -> IsMain -> Map ModuleName IsMain -> TCM () callGHC opts modIsMain mods = do mdir <- compileDir hsmod <- prettyPrint <$> curHsMod agdaMod <- curMName let outputName = case mnameToList agdaMod of [] -> __IMPOSSIBLE__ ms -> last ms (mdir, fp) <- outFile' =<< curHsMod let ghcopts = optGhcFlags opts let modIsReallyMain = fromMaybe __IMPOSSIBLE__ $ Map.lookup agdaMod mods isMain = mappend modIsMain modIsReallyMain -- both need to be IsMain -- Warn if no main function and not --no-main when (modIsMain /= isMain) $ genericWarning =<< fsep (pwords "No main function defined in" ++ [prettyTCM agdaMod <> "."] ++ pwords "Use --no-main to suppress this warning.") let overridableArgs = [ "-O"] ++ (if isMain == IsMain then ["-o", mdir show (nameConcrete outputName)] else []) ++ [ "-Werror"] otherArgs = [ "-i" ++ mdir] ++ (if isMain == IsMain then ["-main-is", hsmod] else []) ++ [ fp , "--make" , "-fwarn-incomplete-patterns" , "-fno-warn-overlapping-patterns" ] args = overridableArgs ++ ghcopts ++ otherArgs compiler = "ghc" -- Note: Some versions of GHC use stderr for progress reports. For -- those versions of GHC we don't print any progress information -- unless an error is encountered. let doCall = optGhcCallGhc opts callCompiler doCall compiler args Agda-2.6.0.1/src/full/Agda/Compiler/MAlonzo/Pragmas.hs0000644000000000000000000001761413466402171020361 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.MAlonzo.Pragmas where import Control.Monad import Data.Maybe import Data.Char import qualified Data.List as List import Data.Traversable (traverse) import Data.Map (Map) import qualified Data.Map as Map import Agda.Syntax.Position import Agda.Syntax.Abstract.Name import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Primitive import Agda.Utils.Lens import Agda.Utils.Parser.ReadP import Agda.Utils.Pretty hiding (char) import Agda.Utils.String ( ltrim ) import Agda.Utils.Three import Agda.Compiler.Common import Agda.Utils.Impossible #include "undefined.h" type HaskellCode = String type HaskellType = String -- | GHC backend translation pragmas. data HaskellPragma = HsDefn Range HaskellCode -- ^ @COMPILE GHC x = @ | HsType Range HaskellType -- ^ @COMPILE GHC X = type @ | HsData Range HaskellType [HaskellCode] -- ^ @COMPILE GHC X = data D (c₁ | ... | cₙ) | HsExport Range HaskellCode -- ^ @COMPILE GHC x as f@ deriving (Show, Eq) instance HasRange HaskellPragma where getRange (HsDefn r _) = r getRange (HsType r _) = r getRange (HsData r _ _) = r getRange (HsExport r _) = r instance Pretty HaskellPragma where pretty = \case HsDefn _r hsCode -> equals <+> text hsCode HsType _r hsType -> equals <+> text hsType HsData _r hsType hsCons -> hsep $ [ equals, "data", text hsType , parens $ hsep $ map text $ List.intersperse "|" hsCons ] HsExport _r hsCode -> "as" <+> text hsCode -- Syntax for Haskell pragmas: -- HsDefn CODE "= CODE" -- HsType TYPE "= type TYPE" -- HsData NAME CONS "= data NAME (CON₁ | .. | CONₙ)" -- HsExport NAME "as NAME" parsePragma :: CompilerPragma -> Either String HaskellPragma parsePragma (CompilerPragma r s) = case parse pragmaP s of [] -> Left $ "Failed to parse GHC pragma '" ++ s ++ "'" [p] -> Right p ps -> Left $ "Ambiguous parse of pragma '" ++ s ++ "':\n" ++ unlines (map show ps) -- shouldn't happen where pragmaP :: ReadP Char HaskellPragma pragmaP = choice [ exportP, typeP, dataP, defnP ] whitespace = many1 (satisfy isSpace) wordsP [] = return () wordsP (w:ws) = skipSpaces *> string w *> wordsP ws barP = skipSpaces *> char '|' -- quite liberal isIdent c = isAlphaNum c || elem c ("_.':[]" :: String) isOp c = not $ isSpace c || elem c ("()" :: String) hsIdent = fst <$> gather (choice [ string "()" , many1 (satisfy isIdent) , between (char '(') (char ')') (many1 (satisfy isOp)) ]) hsCode = many1 get -- very liberal paren = between (skipSpaces *> char '(') (skipSpaces *> char ')') notTypeOrData = do s <- look guard $ not $ any (`List.isPrefixOf` s) ["type", "data"] exportP = HsExport r <$ wordsP ["as"] <* whitespace <*> hsIdent <* skipSpaces typeP = HsType r <$ wordsP ["=", "type"] <* whitespace <*> hsCode dataP = HsData r <$ wordsP ["=", "data"] <* whitespace <*> hsIdent <*> paren (sepBy (skipSpaces *> hsIdent) barP) <* skipSpaces defnP = HsDefn r <$ wordsP ["="] <* whitespace <* notTypeOrData <*> hsCode parseHaskellPragma :: CompilerPragma -> TCM HaskellPragma parseHaskellPragma p = setCurrentRange p $ case parsePragma p of Left err -> genericError err Right p -> return p getHaskellPragma :: QName -> TCM (Maybe HaskellPragma) getHaskellPragma q = do pragma <- traverse parseHaskellPragma =<< getUniqueCompilerPragma ghcBackendName q def <- getConstInfo q setCurrentRange pragma $ pragma <$ sanityCheckPragma def pragma sanityCheckPragma :: Definition -> Maybe HaskellPragma -> TCM () sanityCheckPragma _ Nothing = return () sanityCheckPragma def (Just HsDefn{}) = case theDef def of Axiom{} -> return () Function{} -> return () AbstractDefn{} -> __IMPOSSIBLE__ Datatype{} -> recOrDataErr "data" Record{} -> recOrDataErr "record" _ -> typeError $ GenericError "Haskell definitions can only be given for postulates and functions." where recOrDataErr which = typeError $ GenericDocError $ sep [ text $ "Bad COMPILE GHC pragma for " ++ which ++ " type. Use" , "{-# COMPILE GHC = data ( | .. | ) #-}" ] sanityCheckPragma def (Just HsData{}) = case theDef def of Datatype{} -> return () Record{} -> return () _ -> typeError $ GenericError "Haskell data types can only be given for data or record types." sanityCheckPragma def (Just HsType{}) = case theDef def of Axiom{} -> return () Datatype{} -> do -- We use HsType pragmas for Nat, Int and Bool nat <- getBuiltinName builtinNat int <- getBuiltinName builtinInteger bool <- getBuiltinName builtinBool unless (Just (defName def) `elem` [nat, int, bool]) err _ -> err where err = typeError $ GenericError "Haskell types can only be given for postulates." sanityCheckPragma def (Just HsExport{}) = case theDef def of Function{} -> return () _ -> typeError $ GenericError "Only functions can be exported to Haskell using {-# COMPILE GHC as #-}" -- TODO: cache this to avoid parsing the pragma for every constructor -- occurrence! getHaskellConstructor :: QName -> TCM (Maybe HaskellCode) getHaskellConstructor c = do c <- canonicalName c cDef <- theDef <$> getConstInfo c true <- getBuiltinName builtinTrue false <- getBuiltinName builtinFalse nil <- getBuiltinName builtinNil cons <- getBuiltinName builtinCons sharp <- getBuiltinName builtinSharp case cDef of _ | Just c == true -> return $ Just "True" | Just c == false -> return $ Just "False" | Just c == nil -> return $ Just "[]" | Just c == cons -> return $ Just "(:)" | Just c == sharp -> return $ Just "MAlonzo.RTE.Sharp" Constructor{conData = d} -> do mp <- getHaskellPragma d case mp of Just (HsData _ _ hsCons) -> do cons <- defConstructors . theDef <$> getConstInfo d return $ Just $ fromMaybe __IMPOSSIBLE__ $ lookup c $ zip cons hsCons _ -> return Nothing _ -> return Nothing -- | Get content of @FOREIGN GHC@ pragmas, sorted by 'KindOfForeignCode': -- file header pragmas, import statements, rest. foreignHaskell :: TCM ([String], [String], [String]) foreignHaskell = partitionByKindOfForeignCode classifyForeign . map getCode . fromMaybe [] . Map.lookup ghcBackendName . iForeignCode <$> curIF where getCode (ForeignCode _ code) = code -- | Classify @FOREIGN@ Haskell code. data KindOfForeignCode = ForeignFileHeaderPragma -- ^ A pragma that must appear before the module header. | ForeignImport -- ^ An import statement. Must appear right after the module header. | ForeignOther -- ^ The rest. To appear after the import statements. -- | Classify a @FOREIGN GHC@ declaration. classifyForeign :: String -> KindOfForeignCode classifyForeign s0 = case ltrim s0 of s | List.isPrefixOf "import " s -> ForeignImport s | List.isPrefixOf "{-#" s -> classifyPragma $ drop 3 s _ -> ForeignOther -- | Classify a Haskell pragma into whether it is a file header pragma or not. classifyPragma :: String -> KindOfForeignCode classifyPragma s0 = case ltrim s0 of s | any (`List.isPrefixOf` s) fileHeaderPragmas -> ForeignFileHeaderPragma _ -> ForeignOther where fileHeaderPragmas = [ "LANGUAGE" , "OPTIONS_GHC" , "INCLUDE" ] -- | Partition a list by 'KindOfForeignCode' attribute. partitionByKindOfForeignCode :: (a -> KindOfForeignCode) -> [a] -> ([a], [a], [a]) partitionByKindOfForeignCode f = partition3 $ toThree . f where toThree = \case ForeignFileHeaderPragma -> One ForeignImport -> Two ForeignOther -> Three Agda-2.6.0.1/src/full/Agda/Compiler/JS/0000755000000000000000000000000013466402171015357 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Compiler/JS/Pretty.hs0000644000000000000000000001154613466402171017211 0ustar0000000000000000module Agda.Compiler.JS.Pretty where import Prelude hiding ( null ) import Data.List ( intercalate ) import Data.Set ( Set, toList, singleton, insert, member ) import Data.Map ( Map, toAscList, empty, null ) import Text.Regex.TDFA (makeRegex, matchTest, Regex) import Agda.Syntax.Common ( Nat ) import Agda.Utils.Hash import Agda.Compiler.JS.Syntax hiding (exports) -- Pretty-print a lambda-calculus expression as ECMAScript. -- Since ECMAScript is C-like rather than Haskell-like, it's easier to -- do the pretty-printing directly than use the Pretty library, which -- assumes Haskell-like indentation. br :: Int -> String br i = "\n" ++ take (2*i) (repeat ' ') unescape :: Char -> String unescape '"' = "\\\"" unescape '\\' = "\\\\" unescape '\n' = "\\n" unescape '\r' = "\\r" unescape '\x2028' = "\\u2028" unescape '\x2029' = "\\u2029" unescape c = [c] unescapes :: String -> String unescapes s = concat (map unescape s) -- pretty n i e pretty-prints e, under n levels of de Bruijn binding, -- with i levels of indentation. class Pretty a where pretty :: Nat -> Int -> a -> String instance (Pretty a, Pretty b) => Pretty (a,b) where pretty n i (x,y) = pretty n i x ++ ": " ++ pretty n (i+1) y -- Pretty-print collections class Pretties a where pretties :: Nat -> Int -> a -> [String] instance Pretty a => Pretties [a] where pretties n i = map (pretty n i) instance (Pretty a, Pretty b) => Pretties (Map a b) where pretties n i o = pretties n i (toAscList o) -- Pretty print identifiers instance Pretty LocalId where pretty n i (LocalId x) = "x" ++ show (n - x - 1) instance Pretty GlobalId where pretty n i (GlobalId m) = variableName $ intercalate "_" m instance Pretty MemberId where pretty n i (MemberId s) = "\"" ++ unescapes s ++ "\"" -- Pretty print expressions instance Pretty Exp where pretty n i (Self) = "exports" pretty n i (Local x) = pretty n i x pretty n i (Global m) = pretty n i m pretty n i (Undefined) = "undefined" pretty n i (String s) = "\"" ++ unescapes s ++ "\"" pretty n i (Char c) = "\"" ++ unescape c ++ "\"" pretty n i (Integer x) = "agdaRTS.primIntegerFromString(\"" ++ show x ++ "\")" pretty n i (Double x) = show x pretty n i (Lambda x e) = "function (" ++ intercalate ", " (pretties (n+x) i (map LocalId [x-1, x-2 .. 0])) ++ ") " ++ block (n+x) i e pretty n i (Object o) | null o = "{}" pretty n i (Object o) | otherwise = "{" ++ br (i+1) ++ intercalate ("," ++ br (i+1)) (pretties n i o) ++ br i ++ "}" pretty n i (Apply f es) = pretty n i f ++ "(" ++ intercalate ", " (pretties n i es) ++ ")" pretty n i (Lookup e l) = pretty n i e ++ "[" ++ pretty n i l ++ "]" pretty n i (If e f g) = "(" ++ pretty n i e ++ "? " ++ pretty n i f ++ ": " ++ pretty n i g ++ ")" pretty n i (PreOp op e) = "(" ++ op ++ " " ++ pretty n i e ++ ")" pretty n i (BinOp e op f) = "(" ++ pretty n i e ++ " " ++ op ++ " " ++ pretty n i f ++ ")" pretty n i (Const c) = c pretty n i (PlainJS js) = "(" ++ js ++ ")" block :: Nat -> Int -> Exp -> String block n i (If e f g) = "{" ++ br (i+1) ++ block' n (i+1) (If e f g) ++ br i ++ "}" block n i e = "{" ++ br (i+1) ++ "return " ++ pretty n (i+1) e ++ ";" ++ br i ++ "}" block' :: Nat -> Int -> Exp -> String block' n i (If e f g) = "if (" ++ pretty n i e ++ ") " ++ block n i f ++ " else " ++ block' n i g block' n i e = block n i e modname :: GlobalId -> String modname (GlobalId ms) = "\"" ++ intercalate "." ms ++ "\"" exports :: Nat -> Int -> Set [MemberId] -> [Export] -> String exports n i lss [] = "" exports n i lss (Export ls e : es) | member (init ls) lss = "exports[" ++ intercalate "][" (pretties n i ls) ++ "] = " ++ pretty n (i+1) e ++ ";" ++ br i ++ exports n i (insert ls lss) es exports n i lss (Export ls e : es) | otherwise = exports n i lss (Export (init ls) (Object empty) : Export ls e : es) instance Pretty Module where pretty n i (Module m es ex) = imports ++ br i ++ exports n i (singleton []) es ++ br i ++ maybe "" (pretty n i) ex where js = toList (globals es) imports = unlines $ ["var agdaRTS = require(\"agda-rts\");"] ++ ["var " ++ pretty n (i+1) e ++ " = require(" ++ modname e ++ ");" | e <- js] variableName :: String -> String variableName s = if isValidJSIdent s then "z_" ++ s else "h_" ++ show (hashString s) -- | Check if a string is a valid JS identifier. The check ignores keywords -- as we prepend z_ to our identifiers. The check -- is conservative and may not admit all valid JS identifiers. isValidJSIdent :: String -> Bool isValidJSIdent s = matchTest regex s where regex :: Regex regex = makeRegex ("^[a-zA-Z_$][0-9a-zA-Z_$]*$" :: String) Agda-2.6.0.1/src/full/Agda/Compiler/JS/Substitution.hs0000644000000000000000000001001713466402171020426 0ustar0000000000000000module Agda.Compiler.JS.Substitution where import Prelude hiding ( map, lookup ) import Data.Map ( empty, unionWith, singleton, findWithDefault ) import qualified Data.Map as Map import Data.List ( genericIndex ) import qualified Data.List as List import Agda.Syntax.Common ( Nat ) import Agda.Compiler.JS.Syntax ( Exp(Self,Undefined,Local,Lambda,Object,Apply,Lookup,If,BinOp,PreOp), MemberId, LocalId(LocalId) ) import Agda.Utils.Function ( iterate' ) -- Map for expressions map :: Nat -> (Nat -> LocalId -> Exp) -> Exp -> Exp map m f (Local i) = f m i map m f (Lambda i e) = Lambda i (map (m + i) f e) map m f (Object o) = Object (Map.map (map m f) o) map m f (Apply e es) = Apply (map m f e) (List.map (map m f) es) map m f (Lookup e l) = Lookup (map m f e) l map m f (If e e' e'') = If (map m f e) (map m f e') (map m f e'') map m f (PreOp op e) = PreOp op (map m f e) map m f (BinOp e op e') = BinOp (map m f e) op (map m f e') map m f e = e -- Shifting shift :: Nat -> Exp -> Exp shift = shiftFrom 0 shiftFrom :: Nat -> Nat -> Exp -> Exp shiftFrom m 0 e = e shiftFrom m n e = map m (shifter n) e shifter :: Nat -> Nat -> LocalId -> Exp shifter n m (LocalId i) | i < m = Local (LocalId i) shifter n m (LocalId i) | otherwise = Local (LocalId (i + n)) -- Substitution subst :: Nat -> [Exp] -> Exp -> Exp subst 0 es e = e subst n es e = map 0 (substituter n es) e substituter :: Nat -> [Exp] -> Nat -> LocalId -> Exp substituter n es m (LocalId i) | i < m = Local (LocalId i) substituter n es m (LocalId i) | (i - m) < n = shift m (genericIndex (es ++ repeat Undefined) (n - (i + 1 - m))) substituter n es m (LocalId i) | otherwise = Local (LocalId (i - n)) -- A variant on substitution which performs beta-reduction map' :: Nat -> (Nat -> LocalId -> Exp) -> Exp -> Exp map' m f (Local i) = f m i map' m f (Lambda i e) = Lambda i (map' (m + i) f e) map' m f (Object o) = Object (Map.map (map' m f) o) map' m f (Apply e es) = apply (map' m f e) (List.map (map' m f) es) map' m f (Lookup e l) = lookup (map' m f e) l map' m f (If e e' e'') = If (map' m f e) (map' m f e') (map' m f e'') map' m f (PreOp op e) = PreOp op (map' m f e) map' m f (BinOp e op e') = BinOp (map' m f e) op (map' m f e') map' m f e = e subst' :: Nat -> [Exp] -> Exp -> Exp subst' 0 es e = e subst' n es e = map' 0 (substituter n es) e -- Beta-reducing application and field access apply :: Exp -> [Exp] -> Exp apply (Lambda i e) es = subst' i es e apply e es = Apply e es lookup :: Exp -> MemberId -> Exp lookup (Object o) l = findWithDefault Undefined l o lookup e l = Lookup e l -- Replace any top-level occurrences of self -- (needed because JS is a cbv language, so any top-level -- recursions would evaluate before the module has been defined, -- e.g. exports = { x: 1, y: exports.x } results in an exception, -- as exports is undefined at the point that exports.x is evaluated), self :: Exp -> Exp -> Exp self e (Self) = e self e (Object o) = Object (Map.map (self e) o) self e (Apply f es) = case (self e f) of (Lambda n g) -> self e (subst' n es g) g -> Apply g (List.map (self e) es) self e (Lookup f l) = lookup (self e f) l self e (If f g h) = If (self e f) (self e g) (self e h) self e (BinOp f op g) = BinOp (self e f) op (self e g) self e (PreOp op f) = PreOp op (self e f) self e f = f -- Find the fixed point of an expression, with no top-level occurrences -- of self. fix :: Exp -> Exp fix f = e where e = self e f -- Some helper functions curriedApply :: Exp -> [Exp] -> Exp curriedApply = foldl (\ f e -> apply f [e]) curriedLambda :: Nat -> Exp -> Exp curriedLambda n = iterate' n (Lambda 1) emp :: Exp emp = Object (empty) union :: Exp -> Exp -> Exp union (Object o) (Object p) = Object (unionWith union o p) union e f = e vine :: [MemberId] -> Exp -> Exp vine ls e = foldr (\ l e -> Object (singleton l e)) e ls object :: [([MemberId],Exp)] -> Exp object = foldr (\ (ls,e) -> (union (vine ls e))) emp Agda-2.6.0.1/src/full/Agda/Compiler/JS/Syntax.hs0000644000000000000000000000567613466402171017217 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} module Agda.Compiler.JS.Syntax where import Data.Map ( Map ) import qualified Data.Map as Map import Data.Set ( Set, empty, singleton, union ) import Agda.Syntax.Common ( Nat ) -- An untyped lambda calculus with records, -- and a special self-binder for recursive declarations data Exp = Self | Local LocalId | Global GlobalId | Undefined | String String | Char Char | Integer Integer | Double Double | Lambda Nat Exp | Object (Map MemberId Exp) | Apply Exp [Exp] | Lookup Exp MemberId | If Exp Exp Exp | BinOp Exp String Exp | PreOp String Exp | Const String | PlainJS String -- ^ Arbitrary JS code. deriving Show -- Local identifiers are named by De Bruijn indices. -- Global identifiers are named by string lists. -- Object members are named by strings. newtype LocalId = LocalId Nat deriving (Eq, Ord, Show) newtype GlobalId = GlobalId [String] deriving (Eq, Ord, Show) newtype MemberId = MemberId String deriving (Eq, Ord, Show) -- The top-level compilation unit is a module, which names -- the GId of its exports, and a list of definitions data Export = Export { expName :: [MemberId], defn :: Exp } deriving Show data Module = Module { modName :: GlobalId, exports :: [Export], postscript :: Maybe Exp } deriving Show -- Note that modules are allowed to be recursive, via the Self expression, -- which is bound to the exported module. -- Top-level uses of the form exports.l1....lN. class Uses a where uses :: a -> Set [MemberId] instance Uses a => Uses [a] where uses = foldr (union . uses) empty instance Uses a => Uses (Map k a) where uses = Map.foldr (union . uses) empty instance Uses Exp where uses (Object o) = Map.foldr (union . uses) empty o uses (Apply e es) = foldr (union . uses) (uses e) es uses (Lookup e l) = uses' e [l] where uses' Self ls = singleton ls uses' (Lookup e l) ls = uses' e (l : ls) uses' e ls = uses e uses (If e f g) = uses e `union` uses f `union` uses g uses (BinOp e op f) = uses e `union` uses f uses (PreOp op e) = uses e uses e = empty instance Uses Export where uses (Export _ e) = uses e -- All global ids class Globals a where globals :: a -> Set GlobalId instance Globals a => Globals [a] where globals = foldr (union . globals) empty instance Globals a => Globals (Map k a) where globals = Map.foldr (union . globals) empty instance Globals Exp where globals (Global i) = singleton i globals (Lambda n e) = globals e globals (Object o) = globals o globals (Apply e es) = globals e `union` globals es globals (Lookup e l) = globals e globals (If e f g) = globals e `union` globals f `union` globals g globals (BinOp e op f) = globals e `union` globals f globals (PreOp op e) = globals e globals _ = empty instance Globals Export where globals (Export _ e) = globals e instance Globals Module where globals (Module m es _) = globals es Agda-2.6.0.1/src/full/Agda/Compiler/JS/Compiler.hs0000644000000000000000000004517413466402171017500 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Compiler.JS.Compiler where import Prelude hiding ( null, writeFile ) import Control.Monad.Reader ( liftIO ) import Control.Monad.Trans import Data.Char ( isSpace ) import Data.List ( intercalate, genericLength, partition ) import Data.Maybe ( isJust ) import Data.Set ( Set, null, insert, difference, delete ) import Data.Traversable (traverse) import Data.Map ( fromList, elems ) import qualified Data.Set as Set import qualified Data.Map as Map import System.Directory ( createDirectoryIfMissing ) import System.FilePath ( splitFileName, () ) import Agda.Interaction.FindFile ( findFile, findInterfaceFile ) import Agda.Interaction.Imports ( isNewerThan ) import Agda.Interaction.Options ( optCompileDir ) import Agda.Syntax.Common ( Nat, unArg, namedArg, NameId(..) ) import Agda.Syntax.Concrete.Name ( projectRoot , isNoName ) import Agda.Syntax.Abstract.Name ( ModuleName(MName), QName, mnameToConcrete, mnameToList, qnameName, qnameModule, isInModule, nameId ) import Agda.Syntax.Internal ( Name, Args, Type, conName, toTopLevelModuleName, arity, unEl, unAbs, nameFixity ) import Agda.Syntax.Position import Agda.Syntax.Literal ( Literal(..) ) import Agda.Syntax.Fixity import qualified Agda.Syntax.Treeless as T import Agda.TypeChecking.Substitute ( absBody ) import Agda.TypeChecking.Level ( reallyUnLevelView ) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.Debug ( reportSLn ) import Agda.TypeChecking.Monad.Options ( setCommandLineOptions ) import Agda.TypeChecking.Reduce ( instantiateFull, normalise ) import Agda.TypeChecking.Substitute (TelV(..)) import Agda.TypeChecking.Telescope import Agda.TypeChecking.Pretty import Agda.Utils.FileName ( filePath ) import Agda.Utils.Function ( iterate' ) import Agda.Utils.Maybe import Agda.Utils.Monad ( (<$>), (<*>), ifM ) import Agda.Utils.Pretty (prettyShow) import qualified Agda.Utils.Pretty as P import Agda.Utils.IO.Directory import Agda.Utils.IO.UTF8 ( writeFile ) import qualified Agda.Utils.HashMap as HMap import Agda.Compiler.Common import Agda.Compiler.ToTreeless import Agda.Compiler.Treeless.EliminateDefaults import Agda.Compiler.Treeless.EliminateLiteralPatterns import Agda.Compiler.Treeless.GuardsToPrims import Agda.Compiler.Backend (Backend(..), Backend'(..), Recompile(..)) import Agda.Compiler.JS.Syntax ( Exp(Self,Local,Global,Undefined,String,Char,Integer,Double,Lambda,Object,Apply,Lookup,If,BinOp,PlainJS), LocalId(LocalId), GlobalId(GlobalId), MemberId(MemberId), Export(Export), Module(Module), modName, expName, uses ) import Agda.Compiler.JS.Substitution ( curriedLambda, curriedApply, emp, subst, apply ) import qualified Agda.Compiler.JS.Pretty as JSPretty import Agda.Interaction.Options import Paths_Agda #include "undefined.h" import Agda.Utils.Impossible ( Impossible(Impossible), throwImpossible ) -------------------------------------------------- -- Entry point into the compiler -------------------------------------------------- jsBackend :: Backend jsBackend = Backend jsBackend' jsBackend' :: Backend' JSOptions JSOptions JSModuleEnv () (Maybe Export) jsBackend' = Backend' { backendName = jsBackendName , backendVersion = Nothing , options = defaultJSOptions , commandLineFlags = jsCommandLineFlags , isEnabled = optJSCompile , preCompile = jsPreCompile , postCompile = jsPostCompile , preModule = jsPreModule , postModule = jsPostModule , compileDef = jsCompileDef , scopeCheckingSuffices = False } --- Options --- data JSOptions = JSOptions { optJSCompile :: Bool } defaultJSOptions :: JSOptions defaultJSOptions = JSOptions { optJSCompile = False } jsCommandLineFlags :: [OptDescr (Flag JSOptions)] jsCommandLineFlags = [ Option [] ["js"] (NoArg enable) "compile program using the JS backend" ] where enable o = pure o{ optJSCompile = True } --- Top-level compilation --- jsPreCompile :: JSOptions -> TCM JSOptions jsPreCompile opts = return opts jsPostCompile :: JSOptions -> IsMain -> a -> TCM () jsPostCompile _ _ _ = copyRTEModules --- Module compilation --- type JSModuleEnv = Maybe CoinductionKit jsPreModule :: JSOptions -> ModuleName -> FilePath -> TCM (Recompile JSModuleEnv ()) jsPreModule _ m ifile = ifM uptodate noComp yesComp where uptodate = liftIO =<< isNewerThan <$> outFile_ <*> pure ifile noComp = do reportSLn "compile.js" 2 . (++ " : no compilation is needed.") . prettyShow =<< curMName return $ Skip () yesComp = do m <- prettyShow <$> curMName out <- outFile_ reportSLn "compile.js" 1 $ repl [m, ifile, out] "Compiling <<0>> in <<1>> to <<2>>" Recompile <$> coinductionKit jsPostModule :: JSOptions -> JSModuleEnv -> IsMain -> ModuleName -> [Maybe Export] -> TCM () jsPostModule _ _ isMain _ defs = do m <- jsMod <$> curMName is <- map (jsMod . fst) . iImportedModules <$> curIF let es = catMaybes defs writeModule $ Module m (reorder es) main where main = case isMain of IsMain -> Just $ Apply (Lookup Self $ MemberId "main") [Lambda 1 emp] NotMain -> Nothing jsCompileDef :: JSOptions -> JSModuleEnv -> IsMain -> Definition -> TCM (Maybe Export) jsCompileDef _ kit _isMain def = definition kit (defName def, def) -------------------------------------------------- -- Naming -------------------------------------------------- prefix :: [Char] prefix = "jAgda" jsMod :: ModuleName -> GlobalId jsMod m = GlobalId (prefix : map prettyShow (mnameToList m)) jsFileName :: GlobalId -> String jsFileName (GlobalId ms) = intercalate "." ms ++ ".js" jsMember :: Name -> MemberId jsMember n -- Anonymous fields are used for where clauses, -- and they're all given the concrete name "_", -- so we disambiguate them using their name id. | isNoName n = MemberId ("_" ++ show (nameId n)) | otherwise = MemberId $ prettyShow n -- Rather annoyingly, the anonymous construtor of a record R in module M -- is given the name M.recCon, but a named constructor C -- is given the name M.R.C, sigh. This causes a lot of hoop-jumping -- in the map from Agda names to JS names, which we patch by renaming -- anonymous constructors to M.R.record. global' :: QName -> TCM (Exp,[MemberId]) global' q = do i <- iModuleName <$> curIF modNm <- topLevelModuleName (qnameModule q) let qms = mnameToList $ qnameModule q nm = map jsMember (drop (length $ mnameToList modNm) qms ++ [qnameName q]) if modNm == i then return (Self, nm) else return (Global (jsMod modNm), nm) global :: QName -> TCM (Exp,[MemberId]) global q = do d <- getConstInfo q case d of Defn { theDef = Constructor { conData = p } } -> do e <- getConstInfo p case e of Defn { theDef = Record { recNamedCon = False } } -> do (m,ls) <- global' p return (m, ls ++ [MemberId "record"]) _ -> global' (defName d) _ -> global' (defName d) -- Reorder a list of exports to ensure def-before-use. -- Note that this can diverge in the case when there is no such reordering. -- Only top-level values are evaluated before definitions are added to the -- module, so we put those last, ordered in dependency order. There can't be -- any recursion between top-level values (unless termination checking has been -- disabled and someone's written a non-sensical program), so reordering will -- terminate. reorder :: [Export] -> [Export] reorder es = datas ++ funs ++ reorder' (Set.fromList $ map expName $ datas ++ funs) vals where (vs, funs) = partition isTopLevelValue es (datas, vals) = partition isEmptyObject vs reorder' :: Set [MemberId] -> [Export] -> [Export] reorder' defs [] = [] reorder' defs (e : es) = let us = uses e `difference` defs in case null us of True -> e : (reorder' (insert (expName e) defs) es) False -> reorder' defs (insertAfter us e es) isTopLevelValue :: Export -> Bool isTopLevelValue (Export _ e) = case e of Object m | flatName `Map.member` m -> False Lambda{} -> False _ -> True isEmptyObject :: Export -> Bool isEmptyObject (Export _ e) = case e of Object m -> Map.null m Lambda{} -> True _ -> False insertAfter :: Set [MemberId] -> Export -> [Export] -> [Export] insertAfter us e [] = [e] insertAfter us e (f:fs) | null us = e : f : fs insertAfter us e (f:fs) | otherwise = f : insertAfter (delete (expName f) us) e fs -------------------------------------------------- -- Main compiling clauses -------------------------------------------------- curModule :: IsMain -> TCM Module curModule isMain = do kit <- coinductionKit m <- (jsMod <$> curMName) is <- map jsMod <$> (map fst . iImportedModules <$> curIF) es <- catMaybes <$> (mapM (definition kit) =<< (sortDefs <$> curDefs)) return $ Module m (reorder es) main where main = case isMain of IsMain -> Just $ Apply (Lookup Self $ MemberId "main") [Lambda 1 emp] NotMain -> Nothing definition :: Maybe CoinductionKit -> (QName,Definition) -> TCM (Maybe Export) definition kit (q,d) = do reportSDoc "compile.js" 10 $ "compiling def:" <+> prettyTCM q (_,ls) <- global q d <- instantiateFull d definition' kit q d (defType d) ls -- | Ensure that there is at most one pragma for a name. checkCompilerPragmas :: QName -> TCM () checkCompilerPragmas q = caseMaybeM (getUniqueCompilerPragma jsBackendName q) (return ()) $ \ (CompilerPragma r s) -> setCurrentRange r $ case words s of "=" : _ -> return () _ -> genericDocError $ P.sep [ "Badly formed COMPILE JS pragma. Expected", "{-# COMPILE JS = #-}" ] defJSDef :: Definition -> Maybe String defJSDef def = case defCompilerPragmas jsBackendName def of [CompilerPragma _ s] -> Just (dropEquals s) [] -> Nothing _:_:_ -> __IMPOSSIBLE__ where dropEquals = dropWhile $ \ c -> isSpace c || c == '=' definition' :: Maybe CoinductionKit -> QName -> Definition -> Type -> [MemberId] -> TCM (Maybe Export) definition' kit q d t ls = do checkCompilerPragmas q case theDef d of -- coinduction Constructor{} | Just q == (nameOfSharp <$> kit) -> do return Nothing Function{} | Just q == (nameOfFlat <$> kit) -> do ret $ Lambda 1 $ Apply (Lookup (local 0) flatName) [] DataOrRecSig{} -> __IMPOSSIBLE__ Axiom | Just e <- defJSDef d -> plainJS e Axiom | otherwise -> ret Undefined GeneralizableVar{} -> return Nothing Function{} | Just e <- defJSDef d -> plainJS e Function{} | otherwise -> do reportSDoc "compile.js" 5 $ "compiling fun:" <+> prettyTCM q caseMaybeM (toTreeless T.EagerEvaluation q) (pure Nothing) $ \ treeless -> do funBody <- eliminateCaseDefaults =<< eliminateLiteralPatterns (convertGuards treeless) reportSDoc "compile.js" 30 $ " compiled treeless fun:" <+> pretty funBody funBody' <- compileTerm funBody reportSDoc "compile.js" 30 $ " compiled JS fun:" <+> (text . show) funBody' return $ Just $ Export ls funBody' Primitive{primName = p} | p `Set.member` primitives -> plainJS $ "agdaRTS." ++ p Primitive{} | Just e <- defJSDef d -> plainJS e Primitive{} | otherwise -> ret Undefined Datatype{} -> ret emp Record{} -> return Nothing Constructor{} | Just e <- defJSDef d -> plainJS e Constructor{conData = p, conPars = nc} | otherwise -> do np <- return (arity t - nc) d <- getConstInfo p case theDef d of Record { recFields = flds } -> ret (curriedLambda np (Object (fromList ( (last ls , Lambda 1 (Apply (Lookup (Local (LocalId 0)) (last ls)) [ Local (LocalId (np - i)) | i <- [0 .. np-1] ])) : (zip [ jsMember (qnameName (unArg fld)) | fld <- flds ] [ Local (LocalId (np - i)) | i <- [1 .. np] ]))))) _ -> ret (curriedLambda (np + 1) (Apply (Lookup (Local (LocalId 0)) (last ls)) [ Local (LocalId (np - i)) | i <- [0 .. np-1] ])) AbstractDefn{} -> __IMPOSSIBLE__ where ret = return . Just . Export ls plainJS = return . Just . Export ls . PlainJS compileTerm :: T.TTerm -> TCM Exp compileTerm t = do kit <- coinductionKit compileTerm' kit t compileTerm' :: Maybe CoinductionKit -> T.TTerm -> TCM Exp compileTerm' kit t = go t where go :: T.TTerm -> TCM Exp go t = case t of T.TVar x -> return $ Local $ LocalId x T.TDef q -> do d <- getConstInfo q case theDef d of -- Datatypes and records are erased Datatype {} -> return (String "*") Record {} -> return (String "*") _ -> qname q T.TApp (T.TCon q) [x] | Just q == (nameOfSharp <$> kit) -> do x <- go x let evalThunk = unlines [ "function() {" , " delete this.flat;" , " var result = this.__flat_helper();" , " delete this.__flat_helper;" , " this.flat = function() { return result; };" , " return result;" , "}" ] return $ Object $ Map.fromList [(flatName, PlainJS evalThunk) ,(MemberId "__flat_helper", Lambda 0 x)] T.TApp t xs -> curriedApply <$> go t <*> mapM go xs T.TLam t -> Lambda 1 <$> go t -- TODO This is not a lazy let, but it should be... T.TLet t e -> apply <$> (Lambda 1 <$> go e) <*> traverse go [t] T.TLit l -> return $ literal l T.TCon q -> do d <- getConstInfo q qname q T.TCase sc ct def alts | T.CTData dt <- T.caseType ct -> do dt <- getConstInfo dt alts' <- traverse compileAlt alts let obj = Object $ Map.fromList alts' case (theDef dt, defJSDef dt) of (_, Just e) -> do return $ apply (PlainJS e) [Local (LocalId sc), obj] (Record{}, _) -> do memId <- visitorName $ recCon $ theDef dt return $ apply (Lookup (Local $ LocalId sc) memId) [obj] (Datatype{}, _) -> do return $ curriedApply (Local (LocalId sc)) [obj] _ -> __IMPOSSIBLE__ T.TCase _ _ _ _ -> __IMPOSSIBLE__ T.TPrim p -> return $ compilePrim p T.TUnit -> unit T.TSort -> unit T.TErased -> unit T.TError T.TUnreachable -> return Undefined T.TCoerce t -> go t unit = return $ Integer 0 compilePrim :: T.TPrim -> Exp compilePrim p = case p of T.PIf -> curriedLambda 3 $ If (local 2) (local 1) (local 0) T.PEqI -> binOp "agdaRTS.uprimIntegerEqual" T.PEqF -> binOp "agdaRTS.uprimFloatEquality" T.PEqQ -> binOp "agdaRTS.uprimQNameEquality" T.PEqS -> primEq T.PEqC -> primEq T.PGeq -> binOp "agdaRTS.uprimIntegerGreaterOrEqualThan" T.PLt -> binOp "agdaRTS.uprimIntegerLessThan" T.PAdd -> binOp "agdaRTS.uprimIntegerPlus" T.PSub -> binOp "agdaRTS.uprimIntegerMinus" T.PMul -> binOp "agdaRTS.uprimIntegerMultiply" T.PRem -> binOp "agdaRTS.uprimIntegerRem" T.PQuot -> binOp "agdaRTS.uprimIntegerQuot" T.PAdd64 -> binOp "agdaRTS.uprimWord64Plus" T.PSub64 -> binOp "agdaRTS.uprimWord64Minus" T.PMul64 -> binOp "agdaRTS.uprimWord64Multiply" T.PRem64 -> binOp "agdaRTS.uprimIntegerRem" -- -| T.PQuot64 -> binOp "agdaRTS.uprimIntegerQuot" -- > These can use the integer functions T.PEq64 -> binOp "agdaRTS.uprimIntegerEqual" -- | T.PLt64 -> binOp "agdaRTS.uprimIntegerLessThan" -- -| T.PITo64 -> unOp "agdaRTS.primWord64FromNat" T.P64ToI -> unOp "agdaRTS.primWord64ToNat" T.PSeq -> binOp "agdaRTS.primSeq" where binOp js = curriedLambda 2 $ apply (PlainJS js) [local 1, local 0] unOp js = curriedLambda 1 $ apply (PlainJS js) [local 0] primEq = curriedLambda 2 $ BinOp (local 1) "===" (local 0) compileAlt :: T.TAlt -> TCM (MemberId, Exp) compileAlt a = case a of T.TACon con ar body -> do memId <- visitorName con body <- Lambda ar <$> compileTerm body return (memId, body) _ -> __IMPOSSIBLE__ visitorName :: QName -> TCM MemberId visitorName q = do (m,ls) <- global q; return (last ls) flatName :: MemberId flatName = MemberId "flat" local :: Nat -> Exp local = Local . LocalId qname :: QName -> TCM Exp qname q = do (e,ls) <- global q return (foldl Lookup e ls) literal :: Literal -> Exp literal l = case l of (LitNat _ x) -> Integer x (LitWord64 _ x) -> Integer (fromIntegral x) (LitFloat _ x) -> Double x (LitString _ x) -> String x (LitChar _ x) -> Char x (LitQName _ x) -> litqname x LitMeta{} -> __IMPOSSIBLE__ litqname :: QName -> Exp litqname q = Object $ Map.fromList [ (mem "id", Integer $ fromIntegral n) , (mem "moduleId", Integer $ fromIntegral m) , (mem "name", String $ prettyShow q) , (mem "fixity", litfixity fx)] where mem = MemberId NameId n m = nameId $ qnameName q fx = theFixity $ nameFixity $ qnameName q litfixity :: Fixity -> Exp litfixity fx = Object $ Map.fromList [ (mem "assoc", litAssoc $ fixityAssoc fx) , (mem "prec", litPrec $ fixityLevel fx)] -- TODO this will probably not work well together with the necessary FFI bindings litAssoc NonAssoc = String "non-assoc" litAssoc LeftAssoc = String "left-assoc" litAssoc RightAssoc = String "right-assoc" litPrec Unrelated = String "unrelated" litPrec (Related l) = Integer l -------------------------------------------------- -- Writing out an ECMAScript module -------------------------------------------------- writeModule :: Module -> TCM () writeModule m = do out <- outFile (modName m) liftIO (writeFile out (JSPretty.pretty 0 0 m)) outFile :: GlobalId -> TCM FilePath outFile m = do mdir <- compileDir let (fdir, fn) = splitFileName (jsFileName m) let dir = mdir fdir fp = dir fn liftIO $ createDirectoryIfMissing True dir return fp outFile_ :: TCM FilePath outFile_ = do m <- curMName outFile (jsMod m) copyRTEModules :: TCM () copyRTEModules = do dataDir <- lift getDataDir let srcDir = dataDir "JS" (lift . copyDirContent srcDir) =<< compileDir -- | Primitives implemented in the JS Agda RTS. primitives :: Set String primitives = Set.fromList [ "primExp" , "primFloatDiv" , "primFloatEquality" , "primFloatLess" , "primFloatNumericalEquality" , "primFloatNumericalLess" , "primFloatNegate" , "primFloatMinus" , "primFloatPlus" , "primFloatSqrt" , "primFloatTimes" , "primNatMinus" , "primShowFloat" , "primShowInteger" , "primSin" , "primCos" , "primTan" , "primASin" , "primACos" , "primATan" , "primATan2" , "primShowQName" , "primQNameEquality" , "primQNameLess" , "primQNameFixity" , "primWord64ToNat" , "primWord64FromNat" ] Agda-2.6.0.1/src/full/Agda/Termination/0000755000000000000000000000000013466402171015562 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Termination/TermCheck.hs0000644000000000000000000014733013466402171017773 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE NondecreasingIndentation #-} {- Checking for Structural recursion Authors: Andreas Abel, Nils Anders Danielsson, Ulf Norell, Karl Mehltretter and others Created: 2007-05-28 Source : TypeCheck.Rules.Decl -} module Agda.Termination.TermCheck ( termDecl , termMutual , Result ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Applicative hiding (empty) import Control.Monad.Reader import Control.Monad.State import Data.Foldable (toList) import qualified Data.List as List import Data.Monoid hiding ((<>)) import qualified Data.Set as Set import Data.Traversable (Traversable, traverse) import Agda.Syntax.Abstract (IsProjP(..), AllNames(..)) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern as I import Agda.Syntax.Internal.Generic import qualified Agda.Syntax.Info as Info import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Translation.InternalToAbstract ( reifyPatterns ) import Agda.Termination.CutOff import Agda.Termination.Monad import Agda.Termination.CallGraph hiding (toList) import qualified Agda.Termination.CallGraph as CallGraph import Agda.Termination.CallMatrix hiding (toList) import Agda.Termination.Order as Order import qualified Agda.Termination.SparseMatrix as Matrix import Agda.Termination.Termination (endos, idempotent) import qualified Agda.Termination.Termination as Term import Agda.Termination.RecCheck import Agda.Termination.Inlining import Agda.TypeChecking.Datatypes import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Functions import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records -- (isRecordConstructor, isInductiveRecord) import Agda.TypeChecking.Reduce (reduce, normalise, instantiate, instantiateFull) import Agda.TypeChecking.SizedTypes import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import qualified Agda.Benchmarking as Benchmark import Agda.TypeChecking.Monad.Benchmark (billTo, billPureTo) import Agda.Interaction.Options import Agda.Utils.Either import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Size import Agda.Utils.Maybe import Agda.Utils.Monad -- (mapM', forM', ifM, or2M, and2M) import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Singleton import qualified Agda.Utils.VarSet as VarSet #include "undefined.h" import Agda.Utils.Impossible -- | Call graph with call info for composed calls. type Calls = CallGraph CallPath -- | The result of termination checking a module. -- Must be a 'Monoid' and have 'Singleton'. type Result = [TerminationError] -- | Entry point: Termination check a single declaration. -- -- Precondition: 'envMutualBlock' must be set correctly. termDecl :: A.Declaration -> TCM Result termDecl d = inTopContext $ termDecl' d -- | Termination check a single declaration -- (without necessarily ignoring @abstract@). termDecl' :: A.Declaration -> TCM Result termDecl' d = case d of A.Axiom {} -> return mempty A.Field {} -> return mempty A.Primitive {} -> return mempty A.Mutual i ds -> termMutual $ getNames ds A.Section _ _ _ ds -> termDecls ds -- section structure can be ignored as we are termination checking -- definitions lifted to the top-level A.Apply {} -> return mempty A.Import {} -> return mempty A.Pragma {} -> return mempty A.Open {} -> return mempty A.PatternSynDef {} -> return mempty A.Generalize {} -> return mempty -- open, pattern synonym and generalize defs are just artifacts from the concrete syntax A.ScopedDecl scope ds -> {- withScope_ scope $ -} termDecls ds -- scope is irrelevant as we are termination checking Syntax.Internal A.RecSig{} -> return mempty A.RecDef _ r _ _ _ _ _ _ ds -> termDecls ds -- These should all be wrapped in mutual blocks A.FunDef{} -> __IMPOSSIBLE__ A.DataSig{} -> __IMPOSSIBLE__ A.DataDef{} -> __IMPOSSIBLE__ A.UnquoteDecl{} -> __IMPOSSIBLE__ A.UnquoteDef{} -> __IMPOSSIBLE__ where termDecls ds = concat <$> mapM termDecl' ds unscopeDefs = concatMap unscopeDef unscopeDef (A.ScopedDecl _ ds) = unscopeDefs ds unscopeDef d = [d] -- The mutual names mentioned in the abstract syntax -- for symbols that need to be termination-checked. getNames = concatMap getName getName (A.FunDef i x delayed cs) = [x] getName (A.RecDef _ _ _ _ _ _ _ _ ds) = getNames ds getName (A.Mutual _ ds) = getNames ds getName (A.Section _ _ _ ds) = getNames ds getName (A.ScopedDecl _ ds) = getNames ds getName (A.UnquoteDecl _ _ xs _) = xs getName (A.UnquoteDef _ xs _) = xs getName _ = [] -- | Entry point: Termination check the current mutual block. termMutual :: [QName] -- ^ The function names defined in this block on top-level. -- (For error-reporting only.) -> TCM Result termMutual names0 = ifNotM (optTerminationCheck <$> pragmaOptions) (return mempty) $ {-else-} inTopContext $ do -- Get set of mutually defined names from the TCM. -- This includes local and auxiliary functions introduced -- during type-checking. mid <- fromMaybe __IMPOSSIBLE__ <$> asksTC envMutualBlock mutualBlock <- lookupMutualBlock mid let allNames = filter (not . isAbsurdLambdaName) $ Set.elems $ mutualNames mutualBlock names = if null names0 then allNames else names0 i = mutualInfo mutualBlock -- Andreas, 2014-03-26 -- Keeping recursion check after experiments on the standard lib. -- Seems still to save 1s. -- skip = return False -- No need to term-check if the declarations are acyclic! skip = not <$> do -- Andreas, 2016-10-01 issue #2231 -- Recursivity checker has to see through abstract definitions! ignoreAbstractMode $ do billTo [Benchmark.Termination, Benchmark.RecCheck] $ recursive allNames -- -- Andreas, 2017-03-24, use positivity info to skip non-recursive functions -- skip = ignoreAbstractMode $ allM allNames $ \ x -> do -- null <$> getMutual x -- PROBLEMS with test/Succeed/AbstractCoinduction.agda -- We set the range to avoid panics when printing error messages. setCurrentRange i $ do -- The following debug statement is part of a test case for Issue -- #3590. reportSLn "term.mutual.id" 40 $ "Termination checking mutual block " ++ show mid reportSLn "term.mutual" 10 $ "Termination checking " ++ prettyShow allNames -- NO_TERMINATION_CHECK if (Info.mutualTermCheck i `elem` [ NoTerminationCheck, Terminating ]) then do reportSLn "term.warn.yes" 10 $ "Skipping termination check for " ++ prettyShow names forM_ allNames $ \ q -> setTerminates q True -- considered terminating! return mempty -- NON_TERMINATING else if (Info.mutualTermCheck i == NonTerminating) then do reportSLn "term.warn.yes" 10 $ "Considering as non-terminating: " ++ prettyShow names forM_ allNames $ \ q -> setTerminates q False return mempty -- Trivially terminating (non-recursive) else ifM skip (do reportSLn "term.warn.yes" 10 $ "Trivially terminating: " ++ prettyShow names forM_ allNames $ \ q -> setTerminates q True return mempty) $ {- else -} do -- Set the mutual names in the termination environment. let setNames e = e { terMutual = allNames , terUserNames = names } runTerm cont = runTerDefault $ do cutoff <- terGetCutOff reportSLn "term.top" 10 $ "Termination checking " ++ prettyShow names ++ " with cutoff=" ++ show cutoff ++ "..." terLocal setNames cont -- New check currently only makes a difference for copatterns. -- Since it is slow, only invoke it if -- any of the definitions uses copatterns. res <- ifM (orM $ map usesCopatterns allNames) -- Then: New check, one after another. (runTerm $ forM' allNames $ termFunction) -- Else: Old check, all at once. (runTerm $ termMutual') -- Record result of termination check in signature. -- If there are some termination errors, we collect them in -- the state and mark the definition as non-terminating so -- that it does not get unfolded let terminates = null res forM_ allNames $ \ q -> setTerminates q terminates return res -- | @termMutual'@ checks all names of the current mutual block, -- henceforth called @allNames@, for termination. -- -- @allNames@ is taken from 'Internal' syntax, it contains also -- the definitions created by the type checker (e.g., with-functions). termMutual' :: TerM Result termMutual' = do -- collect all recursive calls in the block allNames <- terGetMutual let collect = forM' allNames termDef -- first try to termination check ignoring the dot patterns calls1 <- collect reportCalls "no " calls1 cutoff <- terGetCutOff let ?cutoff = cutoff r <- billToTerGraph $ Term.terminates calls1 r <- case r of r@Right{} -> return r Left{} -> do -- Try again, but include the dot patterns this time. calls2 <- terSetUseDotPatterns True $ collect reportCalls "" calls2 billToTerGraph $ Term.terminates calls2 -- @names@ is taken from the 'Abstract' syntax, so it contains only -- the names the user has declared. This is for error reporting. names <- terGetUserNames case r of Left calls -> return $ singleton $ terminationError names $ callInfos calls Right{} -> do liftTCM $ reportSLn "term.warn.yes" 2 $ prettyShow (names) ++ " does termination check" return mempty -- | Smart constructor for 'TerminationError'. -- Removes 'termErrFunctions' that are not mentioned in 'termErrCalls'. terminationError :: [QName] -> [CallInfo] -> TerminationError terminationError names calls = TerminationError names' calls where names' = names `List.intersect` toList (allNames calls) billToTerGraph :: a -> TerM a billToTerGraph a = liftTCM $ billPureTo [Benchmark.Termination, Benchmark.Graph] a -- | @reportCalls@ for debug printing. -- -- Replays the call graph completion for debugging. reportCalls :: String -> Calls -> TerM () reportCalls no calls = do cutoff <- terGetCutOff let ?cutoff = cutoff -- We work in TCM exclusively. liftTCM $ do reportS "term.lex" 20 $ unlines [ "Calls (" ++ no ++ "dot patterns): " ++ prettyShow calls ] -- Print the whole completion phase. verboseS "term.matrices" 40 $ do let header s = unlines [ replicate n '=' , replicate k '=' ++ s ++ replicate k' '=' , replicate n '=' ] where n = 70 r = n - length s k = r `div` 2 k' = r - k let report s cs = reportSDoc "term.matrices" 40 $ vcat [ text $ header s , nest 2 $ pretty cs ] cs0 = calls step cs = do let (new, cs') = completionStep cs0 cs report " New call matrices " new return $ if null new then Left () else Right cs' report " Initial call matrices " cs0 trampolineM step cs0 -- Print the result of completion. let calls' = CallGraph.complete calls idems = filter idempotent $ endos $ CallGraph.toList calls' -- TODO -- reportSDoc "term.behaviours" 20 $ vcat -- [ text $ "Recursion behaviours (" ++ no ++ "dot patterns):" -- , nest 2 $ return $ Term.prettyBehaviour calls' -- ] reportSDoc "term.matrices" 30 $ vcat [ text $ "Idempotent call matrices (" ++ no ++ "dot patterns):\n" , nest 2 $ vcat $ punctuate "\n" $ map pretty idems ] -- reportSDoc "term.matrices" 30 $ vcat -- [ text $ "Other call matrices (" ++ no ++ "dot patterns):" -- , nest 2 $ pretty $ CallGraph.fromList others -- ] return () -- | @termFunction name@ checks @name@ for termination. termFunction :: QName -> TerM Result termFunction name = do -- Function @name@ is henceforth referred to by its @index@ -- in the list of @allNames@ of the mutual block. allNames <- terGetMutual let index = fromMaybe __IMPOSSIBLE__ $ List.elemIndex name allNames -- Retrieve the target type of the function to check. target <- liftTCM $ do typeEndsInDef =<< typeOfConst name reportTarget target terSetTarget target $ do -- Collect the recursive calls in the block which (transitively) -- involve @name@, -- taking the target of @name@ into account for computing guardedness. let collect = (`trampolineM` (Set.singleton index, mempty, mempty)) $ \ (todo, done, calls) -> do if null todo then return $ Left calls else do -- Extract calls originating from indices in @todo@. new <- forM' todo $ \ i -> termDef $ fromMaybe __IMPOSSIBLE__ $ allNames !!! i -- Mark those functions as processed and add the calls to the result. let done' = done `mappend` todo calls' = new `mappend` calls -- Compute the new todo list: todo' = CallGraph.targetNodes new Set.\\ done' -- Jump the trampoline. return $ Right (todo', done', calls') -- First try to termination check ignoring the dot patterns calls1 <- terSetUseDotPatterns False $ collect reportCalls "no " calls1 r <- do cutoff <- terGetCutOff let ?cutoff = cutoff r <- billToTerGraph $ Term.terminatesFilter (== index) calls1 case r of Right () -> return $ Right () Left{} -> do -- Try again, but include the dot patterns this time. calls2 <- terSetUseDotPatterns True $ collect reportCalls "" calls2 billToTerGraph $ mapLeft callInfos $ Term.terminatesFilter (== index) calls2 names <- terGetUserNames case r of Left calls -> return $ singleton $ terminationError ([name] `List.intersect` names) calls Right () -> do liftTCM $ reportSLn "term.warn.yes" 2 $ prettyShow name ++ " does termination check" return mempty where reportTarget r = liftTCM $ reportSLn "term.target" 20 $ " target type " ++ caseMaybe r "not recognized" (\ q -> "ends in " ++ prettyShow q) -- | To process the target type. typeEndsInDef :: MonadTCM tcm => Type -> tcm (Maybe QName) typeEndsInDef t = liftTCM $ do TelV _ core <- telViewPath t case unEl core of Def d vs -> return $ Just d _ -> return Nothing -- | Termination check a definition by pattern matching. -- -- TODO: Refactor! -- As this function may be called twice, -- once disregarding dot patterns, -- the second time regarding dot patterns, -- it is better if we separated bare call extraction -- from computing the change in structural order. -- Only the latter depends on the choice whether we -- consider dot patterns or not. termDef :: QName -> TerM Calls termDef name = terSetCurrent name $ inConcreteOrAbstractMode name $ \ def -> do -- Retrieve definition let t = defType def liftTCM $ reportSDoc "term.def.fun" 5 $ sep [ "termination checking type of" <+> prettyTCM name , nest 2 $ ":" <+> prettyTCM t ] termType t `mappend` do liftTCM $ reportSDoc "term.def.fun" 5 $ sep [ "termination checking body of" <+> prettyTCM name , nest 2 $ ":" <+> prettyTCM t ] -- If --without-K, we disregard all arguments (and result) -- which are not of data or record type. withoutKEnabled <- liftTCM withoutKOption applyWhen withoutKEnabled (setMasks t) $ do -- If the result should be disregarded, set all calls to unguarded. applyWhenM terGetMaskResult terUnguarded $ do case theDef def of Function{ funClauses = cls, funDelayed = delayed } -> terSetDelayed delayed $ forM' cls $ \ cl -> do if hasDefP (namedClausePats cl) -- generated hcomp clause, should be safe. -- TODO find proper strategy. then return empty else termClause cl _ -> return empty where hasDefP :: [NamedArg DeBruijnPattern] -> Bool hasDefP ps = getAny $ flip foldPattern ps $ \ (x :: DeBruijnPattern) -> case x of DefP{} -> Any True _ -> Any False -- | Collect calls in type signature @f : (x1:A1)...(xn:An) -> B@. -- It is treated as if there were the additional function clauses. -- @@ -- f = A1 -- f x1 = A2 -- f x1 x2 = A3 -- ... -- f x1 ... xn = B -- @@ termType :: Type -> TerM Calls termType = return mempty -- termType = loop 0 -- Andreas, 2019-04-10 deactivate for backwards-compatibility in 2.6.0 #1556 where loop n t = do ps <- mkPats n reportSDoc "term.type" 60 $ vcat [ text $ "termType " ++ show n ++ " with " ++ show (length ps) ++ " patterns" , nest 2 $ "looking at type " <+> prettyTCM t ] tel <- getContextTelescope -- Andreas, 2018-11-15, issue #3394, forgotten initialization of terSizeDepth terSetPatterns ps $ terSetSizeDepth tel $ do ifNotPiType t {-then-} extract {-else-} $ \ dom absB -> do extract dom `mappend` underAbstractionAbs dom absB (loop $! n + 1) -- create n variable patterns mkPats n = zipWith mkPat (downFrom n) <$> getContextNames mkPat i x = notMasked $ VarP PatOSystem $ DBPatVar (prettyShow x) i -- | Mask arguments and result for termination checking -- according to type of function. -- Only arguments of types ending in data/record or Size are counted in. setMasks :: Type -> TerM a -> TerM a setMasks t cont = do (ds, d) <- liftTCM $ do TelV tel core <- telViewPath t -- Check argument types ds <- forM (telToList tel) $ \ t -> do TelV _ t <- telViewPath $ snd $ unDom t d <- (isNothing <$> isDataOrRecord (unEl t)) `or2M` (isJust <$> isSizeType t) when d $ reportSDoc "term.mask" 20 $ do "argument type " <+> prettyTCM t <+> " is not data or record type, ignoring structural descent for --without-K" return d -- Check result types d <- isNothing <.> isDataOrRecord . unEl $ core when d $ reportSLn "term.mask" 20 $ "result type is not data or record type, ignoring guardedness for --without-K" return (ds, d) terSetMaskArgs (ds ++ repeat True) $ terSetMaskResult d $ cont -- | Is the current target type among the given ones? targetElem :: [Target] -> TerM Bool targetElem ds = maybe False (`elem` ds) <$> terGetTarget {- -- | The target type of the considered recursive definition. data Target = Set -- ^ Constructing a Set (only meaningful with 'guardingTypeConstructors'). | Data QName -- ^ Constructing a coinductive or mixed type (could be data or record). deriving (Eq, Show) -- | Check wether a 'Target" corresponds to the current one. matchingTarget :: DBPConf -> Target -> TCM Bool matchingTarget conf t = maybe (return True) (match t) (currentTarget conf) where match Set Set = return True match (Data d) (Data d') = mutuallyRecursive d d' match _ _ = return False -} -- | Convert a term (from a dot pattern) to a DeBruijn pattern. -- -- The term is first normalized and stripped of all non-coinductive projections. termToDBP :: Term -> TerM DeBruijnPattern termToDBP t = ifNotM terGetUseDotPatterns (return unusedVar) $ {- else -} do termToPattern =<< do liftTCM $ stripAllProjections =<< normalise t -- | Convert a term (from a dot pattern) to a pattern for the purposes of the termination checker. -- -- @SIZESUC@ is treated as a constructor. class TermToPattern a b where termToPattern :: a -> TerM b default termToPattern :: (TermToPattern a' b', Traversable f, a ~ f a', b ~ f b') => a -> TerM b termToPattern = traverse termToPattern instance TermToPattern a b => TermToPattern [a] [b] where instance TermToPattern a b => TermToPattern (Arg a) (Arg b) where instance TermToPattern a b => TermToPattern (Named c a) (Named c b) where -- OVERLAPPING -- instance TermToPattern a b => TermToPattern a (Named c b) where -- termToPattern t = unnamed <$> termToPattern t instance TermToPattern Term DeBruijnPattern where termToPattern t = (liftTCM $ constructorForm t) >>= \case -- Constructors. Con c _ args -> ConP c noConPatternInfo . map (fmap unnamed) <$> termToPattern (fromMaybe __IMPOSSIBLE__ $ allApplyElims args) Def s [Apply arg] -> do suc <- terGetSizeSuc if Just s == suc then ConP (ConHead s Inductive []) noConPatternInfo . map (fmap unnamed) <$> termToPattern [arg] else return $ dotP t DontCare t -> termToPattern t -- OR: __IMPOSSIBLE__ -- removed by stripAllProjections -- Leaves. Var i [] -> varP . (`DBPatVar` i) . prettyShow <$> nameOfBV i Lit l -> return $ LitP l Dummy s -> __IMPOSSIBLE_VERBOSE__ s t -> return $ dotP t -- | Masks all non-data/record type patterns if --without-K. -- See issue #1023. maskNonDataArgs :: [DeBruijnPattern] -> TerM [Masked DeBruijnPattern] maskNonDataArgs ps = zipWith mask ps <$> terGetMaskArgs where mask p@ProjP{} _ = Masked False p mask p d = Masked d p -- | Extract recursive calls from one clause. termClause :: Clause -> TerM Calls termClause clause = do -- If with-function inlining is disallowed (e.g. --without-K), -- we check the original clause. let fallback = termClause' clause ifNotM (terGetInlineWithFunctions) fallback $ {- else -} do -- Otherwise, we will do inlining, hence, can skip with-generated functions. name <- terGetCurrent ifM (isJust <$> isWithFunction name) (return mempty) $ {- else -} do -- With inlining, the termination check for all subordinated -- with-functions is included in the parent function. (liftTCM $ inlineWithClauses name clause) >>= \case Nothing -> fallback Just cls -> terSetHaveInlinedWith $ mapM' termClause' cls termClause' :: Clause -> TerM Calls termClause' clause = do Clause{ clauseTel = tel, namedClausePats = ps, clauseBody = body } <- etaExpandClause clause liftTCM $ reportSDoc "term.check.clause" 25 $ vcat [ "termClause" , nest 2 $ "tel =" <+> prettyTCM tel , nest 2 $ "ps =" <+> do addContext tel $ prettyTCMPatternList ps ] forM' body $ \ v -> addContext tel $ do -- TODO: combine the following two traversals, avoid full normalisation. -- Parse dot patterns as patterns as far as possible. ps <- postTraversePatternM parseDotP ps -- Blank out coconstructors. ps <- preTraversePatternM stripCoCon ps -- Mask non-data arguments. mdbpats <- maskNonDataArgs $ map namedArg ps terSetPatterns mdbpats $ do terSetSizeDepth tel $ do reportBody v extract v where parseDotP = \case DotP o t -> termToDBP t p -> return p stripCoCon p = case p of ConP (ConHead c _ _) _ _ -> do ifM ((Just c ==) <$> terGetSizeSuc) (return p) $ {- else -} do whatInduction c >>= \case Inductive -> return p CoInductive -> return unusedVar _ -> return p reportBody :: Term -> TerM () reportBody v = verboseS "term.check.clause" 6 $ do f <- terGetCurrent delayed <- terGetDelayed pats <- terGetPatterns liftTCM $ reportSDoc "term.check.clause" 6 $ do sep [ text ("termination checking " ++ (if delayed == Delayed then "delayed " else "") ++ "clause of") <+> prettyTCM f , nest 2 $ "lhs:" <+> sep (map prettyTCM pats) , nest 2 $ "rhs:" <+> prettyTCM v ] -- | Extract recursive calls from expressions. class ExtractCalls a where extract :: a -> TerM Calls instance ExtractCalls a => ExtractCalls (Abs a) where extract (NoAbs _ a) = extract a extract (Abs x a) = addContext x $ terRaise $ extract a instance ExtractCalls a => ExtractCalls (Arg a) where extract = extract . unArg instance ExtractCalls a => ExtractCalls (Dom a) where extract = extract . unDom instance ExtractCalls a => ExtractCalls (Elim' a) where extract Proj{} = return empty extract (Apply a) = extract $ unArg a extract (IApply x y a) = extract (x,(y,a)) -- TODO Andrea: conservative instance ExtractCalls a => ExtractCalls [a] where extract = mapM' extract instance (ExtractCalls a, ExtractCalls b) => ExtractCalls (a,b) where extract (a, b) = CallGraph.union <$> extract a <*> extract b -- | Sorts can contain arbitrary terms of type @Level@, -- so look for recursive calls also in sorts. -- Ideally, 'Sort' would not be its own datatype but just -- a subgrammar of 'Term', then we would not need this boilerplate. instance ExtractCalls Sort where extract s = do liftTCM $ do reportSDoc "term.sort" 20 $ "extracting calls from sort" <+> prettyTCM s reportSDoc "term.sort" 50 $ text ("s = " ++ show s) case s of Inf -> return empty SizeUniv -> return empty Type t -> terUnguarded $ extract t -- no guarded levels Prop t -> terUnguarded $ extract t PiSort s1 s2 -> extract (s1, s2) UnivSort s -> extract s MetaS x es -> return empty DefS d es -> return empty DummyS{} -> return empty -- | Extract recursive calls from a type. instance ExtractCalls Type where extract (El s t) = extract (s, t) -- | Extract recursive calls from a constructor application. constructor :: QName -- ^ Constructor name. -> Induction -- ^ Should the constructor be treated as inductive or coinductive? -> [(Arg Term, Bool)] -- ^ All the arguments, -- and for every argument a boolean which is 'True' iff the -- argument should be viewed as preserving guardedness. -> TerM Calls constructor c ind args = do cutoff <- terGetCutOff let ?cutoff = cutoff forM' args $ \ (arg, preserves) -> do let g' = case (preserves, ind) of (True, Inductive) -> id (True, CoInductive) -> (Order.lt .*.) (False, _) -> const Order.unknown terModifyGuarded g' $ extract arg -- | Extract calls from with function application. withFunction :: QName -> Elims -> TerM Calls withFunction g es = do v <- liftTCM $ -- billTo [Benchmark.Termination, Benchmark.With] $ -- 0ms expandWithFunctionCall g es liftTCM $ reportSDoc "term.with.call" 30 $ "termination checking expanded with-function call:" <+> prettyTCM v extract v -- | Handles function applications @g es@. function :: QName -> Elims -> TerM Calls function g es0 = ifM (terGetInlineWithFunctions `and2M` do isJust <$> isWithFunction g) (withFunction g es0) $ {-else, no with function-} do f <- terGetCurrent names <- terGetMutual guarded <- terGetGuarded -- let gArgs = Def g es0 liftTCM $ reportSDoc "term.function" 30 $ "termination checking function call " <+> prettyTCM (Def g es0) -- First, look for calls in the arguments of the call gArgs. -- We have to reduce constructors in case they're reexported. -- Andreas, Issue 1530: constructors have to be reduced deep inside terms, -- thus, we need to use traverseTermM. let (reduceCon :: Term -> TCM Term) = traverseTermM $ \ t -> case t of Con c ci vs -> (`applyE` vs) <$> reduce (Con c ci []) -- make sure we don't reduce the arguments _ -> return t -- Reduce constructors only when this call is actually a recursive one. -- es <- liftTCM $ billTo [Benchmark.Termination, Benchmark.Reduce] $ forM es $ -- etaContract <=< traverse reduceCon <=< instantiateFull -- If the function is a projection but not for a coinductive record, -- then preserve guardedness for its principal argument. isProj <- isProjectionButNotCoinductive g let unguards = repeat Order.unknown let guards = applyWhen isProj (guarded :) unguards -- Collect calls in the arguments of this call. let args = map unArg $ argsFromElims es0 calls <- forM' (zip guards args) $ \ (guard, a) -> do terSetGuarded guard $ extract a -- Then, consider call gArgs itself. liftTCM $ reportSDoc "term.found.call" 20 $ sep [ "found call from" <+> prettyTCM f , nest 2 $ "to" <+> prettyTCM g ] -- insert this call into the call list case List.elemIndex g names of -- call leads outside the mutual block and can be ignored Nothing -> return calls -- call is to one of the mutally recursive functions Just gInd -> do delayed <- terGetDelayed -- Andreas, 2017-02-14, issue #2458: -- If we have inlined with-functions, we could be illtyped, -- hence, do not reduce anything. -- Andreas, 2017-06-20 issue #2613: -- We still need to reduce constructors, even when with-inlining happened. es <- -- ifM terGetHaveInlinedWith (return es0) {-else-} $ liftTCM $ forM es0 $ -- 2017-09-09, re issue #2732 -- The eta-contraction here does not seem necessary to make structural order -- comparison not having to worry about eta. -- Maybe we thought an eta redex could come from a meta instantiation. -- However, eta-contraction is already performed by instantiateFull. -- See test/Succeed/Issue2732-termination.agda. -- etaContract <=< traverse reduceCon <=< instantiateFull -- 2017-05-16, issue #2403: Argument normalization is too expensive, -- even if we only expand non-recursive functions. -- Argument normalization TURNED OFF. -- liftTCM $ billTo [Benchmark.Termination, Benchmark.Reduce] $ do -- -- Andreas, 2017-01-13, issue #2403, normalize arguments for the structural ordering. -- -- Andreas, 2017-03-25, issue #2495, restrict this to non-recursive functions -- -- otherwise, the termination checking may run forever. -- reportSLn "term.reduce" 90 $ "normalizing call arguments" -- modifyAllowedReductions (List.\\ [UnconfirmedReductions,RecursiveReductions]) $ -- forM es0 $ \ e -> do -- reportSDoc "term.reduce" 95 $ "normalizing " <+> prettyTCM e -- etaContract =<< normalise e -- Compute the call matrix. -- Andreas, 2014-03-26 only 6% of termination time for library test -- spent on call matrix generation (nrows, ncols, matrix) <- billTo [Benchmark.Termination, Benchmark.Compare] $ compareArgs es -- only a delayed definition can be guarded let ifDelayed o | Order.decreasing o && delayed == NotDelayed = Order.le | otherwise = o liftTCM $ reportSLn "term.guardedness" 20 $ "composing with guardedness " ++ prettyShow guarded ++ " counting as " ++ prettyShow (ifDelayed guarded) cutoff <- terGetCutOff let ?cutoff = cutoff let matrix' = composeGuardedness (ifDelayed guarded) matrix -- Andreas, 2013-04-26 FORBIDDINGLY expensive! -- This PrettyTCM QName cost 50% of the termination time for std-lib!! -- gPretty <-liftTCM $ billTo [Benchmark.Termination, Benchmark.Level] $ -- render <$> prettyTCM g -- Andreas, 2013-05-19 as pointed out by Andrea Vezzosi, -- printing the call eagerly is forbiddingly expensive. -- So we build a closure such that we can print the call -- whenever we really need to. -- This saves 30s (12%) on the std-lib! -- Andreas, 2015-01-21 Issue 1410: Go to the module where g is defined -- otherwise its free variables with be prepended to the call -- in the error message. doc <- liftTCM $ withCurrentModule (qnameModule g) $ buildClosure $ Def g $ reverse $ dropWhile ((Inserted ==) . getOrigin) $ reverse es0 -- Andreas, 2018-07-22, issue #3136 -- Dropping only inserted arguments at the end, since -- dropping arguments in the middle might make the printer crash. -- Def g $ filter ((/= Inserted) . getOrigin) es0 -- Andreas, 2017-01-05, issue #2376 -- Remove arguments inserted by etaExpandClause. let src = fromMaybe __IMPOSSIBLE__ $ List.elemIndex f names tgt = gInd cm = makeCM ncols nrows matrix' info = CallPath [CallInfo { callInfoTarget = g , callInfoRange = getRange g , callInfoCall = doc }] verboseS "term.kept.call" 5 $ do pats <- terGetPatterns reportSDoc "term.kept.call" 5 $ vcat [ "kept call from" <+> text (prettyShow f) <+> hsep (map prettyTCM pats) , nest 2 $ "to" <+> text (prettyShow g) <+> hsep (map (parens . prettyTCM) args) , nest 2 $ "call matrix (with guardedness): " , nest 2 $ pretty cm ] return $ CallGraph.insert src tgt cm info calls -- | Extract recursive calls from a term. instance ExtractCalls Term where extract t = do liftTCM $ reportSDoc "term.check.term" 50 $ do "looking for calls in" <+> prettyTCM t -- Instantiate top-level MetaVar. t <- liftTCM $ instantiate t case t of -- Constructed value. Con ConHead{conName = c} _ es -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- A constructor preserves the guardedness of all its arguments. let argsg = zip args $ repeat True -- If we encounter a coinductive record constructor -- in a type mutual with the current target -- then we count it as guarding. ind <- ifM ((Just c ==) <$> terGetSharp) (return CoInductive) $ do caseMaybeM (liftTCM $ isRecordConstructor c) (return Inductive) $ \ (q, def) -> do reportSLn "term.check.term" 50 $ "constructor " ++ prettyShow c ++ " has record type " ++ prettyShow q (\ b -> if b then CoInductive else Inductive) <$> andM [ return $ recInduction def == Just CoInductive , targetElem . fromMaybe __IMPOSSIBLE__ $ recMutual def ] constructor c ind argsg -- Function, data, or record type. Def g es -> function g es -- Abstraction. Preserves guardedness. Lam h b -> extract b -- Neutral term. Destroys guardedness. Var i es -> terUnguarded $ extract es -- Dependent function space. Destroys guardedness. Pi a (Abs x b) -> terUnguarded $ CallGraph.union <$> extract a <*> do a <- maskSizeLt a -- OR: just do not add a to the context! addContext (x, a) $ terRaise $ extract b -- Non-dependent function space. Destroys guardedness. Pi a (NoAbs _ b) -> terUnguarded $ CallGraph.union <$> extract a <*> extract b -- Literal. Lit l -> return empty -- Sort. Sort s -> extract s -- Unsolved metas are not considered termination problems, there -- will be a warning for them anyway. MetaV x args -> return empty -- Erased and not-yet-erased proof. DontCare t -> extract t -- Level. Level l -> -- billTo [Benchmark.Termination, Benchmark.Level] $ do -- Andreas, 2014-03-26 Benchmark discontinued, < 0.3% spent on levels. extract l -- Dummy. Dummy{} -> return empty -- | Extract recursive calls from level expressions. deriving instance ExtractCalls Level instance ExtractCalls PlusLevel where extract (ClosedLevel n) = return $ mempty extract (Plus n l) = extract l instance ExtractCalls LevelAtom where extract (MetaLevel x es) = extract es extract (BlockedLevel x t) = extract t extract (NeutralLevel _ t) = extract t extract (UnreducedLevel t) = extract t -- | Rewrite type @tel -> Size< u@ to @tel -> Size@. maskSizeLt :: MonadTCM tcm => Dom Type -> tcm (Dom Type) maskSizeLt !dom = liftTCM $ do let a = unDom dom (msize, msizelt) <- getBuiltinSize case (msize, msizelt) of (_ , Nothing) -> return dom (Nothing, _) -> __IMPOSSIBLE__ (Just size, Just sizelt) -> do TelV tel c <- telView a case a of El s (Def d [v]) | d == sizelt -> return $ (abstract tel $ El s $ Def size []) <$ dom _ -> return dom {- | @compareArgs es@ Compare the list of de Bruijn patterns (=parameters) @pats@ with a list of arguments @es@ and create a call maxtrix with |es| rows and |pats| columns. The guardedness is the number of projection patterns in @pats@ minus the number of projections in @es@. -} compareArgs :: [Elim] -> TerM (Int, Int, [[Order]]) compareArgs es = do pats <- terGetPatterns liftTCM $ reportSDoc "term.compareArgs" 90 $ vcat [ text $ "comparing " ++ show (length es) ++ " args to " ++ show (length pats) ++ " patterns" ] -- apats <- annotatePatsWithUseSizeLt pats -- reportSDoc "term.compare" 20 $ -- "annotated patterns = " <+> sep (map prettyTCM apats) -- matrix <- forM es $ \ e -> forM apats $ \ (b, p) -> terSetUseSizeLt b $ compareElim e p matrix <- withUsableVars pats $ forM es $ \ e -> forM pats $ \ p -> compareElim e p -- Count the number of coinductive projection(pattern)s in caller and callee. -- Only recursive coinductive projections are eligible (Issue 1209). projsCaller <- length <$> do filterM (isCoinductiveProjection True) $ mapMaybe (fmap (headAmbQ . snd) . isProjP . getMasked) pats projsCallee <- length <$> do filterM (isCoinductiveProjection True) $ mapMaybe (fmap snd . isProjElim) es cutoff <- terGetCutOff let ?cutoff = cutoff useGuardedness <- liftTCM guardednessOption let guardedness = if useGuardedness then decr True $ projsCaller - projsCallee else Order.Unknown liftTCM $ reportSDoc "term.guardedness" 30 $ sep [ "compareArgs:" , nest 2 $ text $ "projsCaller = " ++ prettyShow projsCaller , nest 2 $ text $ "projsCallee = " ++ prettyShow projsCallee , nest 2 $ text $ "guardedness of call: " ++ prettyShow guardedness ] return $ addGuardedness guardedness (size es, size pats, matrix) -- | Traverse patterns from left to right. -- When we come to a projection pattern, -- switch usage of SIZELT constraints: -- on, if coinductive, -- off, if inductive. -- -- UNUSED annotatePatsWithUseSizeLt :: [DeBruijnPattern] -> TerM [(Bool,DeBruijnPattern)] annotatePatsWithUseSizeLt = loop where loop [] = return [] loop (p@(ProjP _ q) : pats) = ((False,p) :) <$> do projUseSizeLt q $ loop pats loop (p : pats) = (\ b ps -> (b,p) : ps) <$> terGetUseSizeLt <*> loop pats -- | @compareElim e dbpat@ compareElim :: Elim -> Masked DeBruijnPattern -> TerM Order compareElim e p = do liftTCM $ do reportSDoc "term.compare" 30 $ sep [ "compareElim" , nest 2 $ "e = " <> prettyTCM e , nest 2 $ "p = " <> prettyTCM p ] reportSDoc "term.compare" 50 $ sep [ nest 2 $ text $ "e = " ++ show e , nest 2 $ text $ "p = " ++ show p ] case (e, getMasked p) of (Proj _ d, ProjP _ d') -> do d <- getOriginalProjection d d' <- getOriginalProjection d' o <- compareProj d d' reportSDoc "term.compare" 30 $ sep [ text $ "comparing callee projection " ++ prettyShow d , text $ "against caller projection " ++ prettyShow d' , text $ "yields order " ++ prettyShow o ] return o (Proj{}, _) -> return Order.unknown (Apply{}, ProjP{}) -> return Order.unknown (Apply arg, _) -> compareTerm (unArg arg) p -- TODO Andrea: making sense? (IApply{}, ProjP{}) -> return Order.unknown (IApply _ _ arg, _) -> compareTerm arg p -- | In dependent records, the types of later fields may depend on the -- values of earlier fields. Thus when defining an inhabitant of a -- dependent record type such as Σ by copattern matching, -- a recursive call eliminated by an earlier projection (proj₁) might -- occur in the definition at a later projection (proj₂). -- Thus, earlier projections are considered "smaller" when -- comparing copattern spines. This is an ok approximation -- of the actual dependency order. -- See issues 906, 942. compareProj :: MonadTCM tcm => QName -> QName -> tcm Order compareProj d d' | d == d' = return Order.le | otherwise = liftTCM $ do -- different projections mr <- getRecordOfField d mr' <- getRecordOfField d' case (mr, mr') of (Just r, Just r') | r == r' -> do -- of same record def <- theDef <$> getConstInfo r case def of Record{ recFields = fs } -> do fs <- return $ map unArg fs case (List.find (d==) fs, List.find (d'==) fs) of (Just i, Just i') -- earlier field is smaller | i < i' -> return Order.lt | i == i' -> do __IMPOSSIBLE__ | otherwise -> return Order.unknown _ -> __IMPOSSIBLE__ _ -> __IMPOSSIBLE__ _ -> return Order.unknown -- | 'makeCM' turns the result of 'compareArgs' into a proper call matrix makeCM :: Int -> Int -> [[Order]] -> CallMatrix makeCM ncols nrows matrix = CallMatrix $ Matrix.fromLists (Matrix.Size nrows ncols) matrix -- | 'addGuardedness' adds guardedness flag in the upper left corner -- (0,0). addGuardedness :: Order -> (Int, Int, [[Order]]) -> (Int, Int, [[Order]]) addGuardedness o (nrows, ncols, m) = (nrows + 1, ncols + 1, (o : replicate ncols Order.unknown) : map (Order.unknown :) m) -- | Compose something with the upper-left corner of a call matrix composeGuardedness :: (?cutoff :: CutOff) => Order -> [[Order]] -> [[Order]] composeGuardedness o ((corner : row) : rows) = ((o .*. corner) : row) : rows composeGuardedness _ _ = __IMPOSSIBLE__ -- | Stripping off a record constructor is not counted as decrease, in -- contrast to a data constructor. -- A record constructor increases/decreases by 0, a data constructor by 1. offsetFromConstructor :: MonadTCM tcm => QName -> tcm Int offsetFromConstructor c = maybe 1 (const 0) <$> do liftTCM $ isRecordConstructor c -- | Compute the proper subpatterns of a 'DeBruijnPattern'. subPatterns :: DeBruijnPattern -> [DeBruijnPattern] subPatterns = foldPattern $ \case ConP _ _ ps -> map namedArg ps DefP _ _ ps -> map namedArg ps -- TODO check semantics VarP _ _ -> mempty LitP _ -> mempty DotP _ _ -> mempty ProjP _ _ -> mempty IApplyP{} -> mempty compareTerm :: Term -> Masked DeBruijnPattern -> TerM Order compareTerm t p = do -- reportSDoc "term.compare" 25 $ -- " comparing term " <+> prettyTCM t <+> -- " to pattern " <+> prettyTCM p t <- liftTCM $ stripAllProjections t o <- compareTerm' t p liftTCM $ reportSDoc "term.compare" 25 $ " comparing term " <+> prettyTCM t <+> " to pattern " <+> prettyTCM p <+> text (" results in " ++ prettyShow o) return o -- | Remove all non-coinductive projections from an algebraic term -- (not going under binders). -- Also, remove 'DontCare's. -- class StripAllProjections a where stripAllProjections :: a -> TCM a instance StripAllProjections a => StripAllProjections (Arg a) where stripAllProjections = traverse stripAllProjections instance StripAllProjections Elims where stripAllProjections es = case es of [] -> return [] (Apply a : es) -> do (:) <$> (Apply <$> stripAllProjections a) <*> stripAllProjections es (IApply x y a : es) -> do -- TODO Andrea: are we doind extra work? (:) <$> (IApply <$> stripAllProjections x <*> stripAllProjections y <*> stripAllProjections a) <*> stripAllProjections es (Proj o p : es) -> do isP <- isProjectionButNotCoinductive p applyUnless isP (Proj o p :) <$> stripAllProjections es instance StripAllProjections Args where stripAllProjections = mapM stripAllProjections instance StripAllProjections Term where stripAllProjections t = do case t of Var i es -> Var i <$> stripAllProjections es Con c ci ts -> do -- Andreas, 2019-02-23, re #2613. This is apparently not necessary: -- c <- fromRightM (\ err -> return c) $ getConForm (conName c) Con c ci <$> stripAllProjections ts Def d es -> Def d <$> stripAllProjections es DontCare t -> stripAllProjections t _ -> return t -- | Normalize outermost constructor name in a pattern. reduceConPattern :: DeBruijnPattern -> TCM DeBruijnPattern reduceConPattern = \case ConP c i ps -> fromRightM (\ err -> return c) (getConForm (conName c)) <&> \ c' -> ConP c' i ps p -> return p -- | @compareTerm' t dbpat@ compareTerm' :: Term -> Masked DeBruijnPattern -> TerM Order compareTerm' v mp@(Masked m p) = do suc <- terGetSizeSuc cutoff <- terGetCutOff let ?cutoff = cutoff v <- liftTCM (instantiate v) p <- liftTCM $ reduceConPattern p case (v, p) of -- Andreas, 2013-11-20 do not drop projections, -- in any case not coinductive ones!: (Var i es, _) | Just{} <- allApplyElims es -> compareVar i mp (DontCare t, _) -> compareTerm' t mp -- Andreas, 2014-09-22, issue 1281: -- For metas, termination checking should be optimistic. -- If there is any instance of the meta making termination -- checking succeed, then we should not fail. -- Thus, we assume the meta will be instantiated with the -- deepest variable in @p@. -- For sized types, the depth is maximally -- the number of SIZELT hypotheses one can have in a context. (MetaV{}, p) -> Order.decr True . max (if m then 0 else patternDepth p) . pred <$> terAsks _terSizeDepth -- Successor on both sides cancel each other. -- We ignore the mask for sizes. (Def s [Apply t], ConP s' _ [p]) | s == conName s' && Just s == suc -> compareTerm' (unArg t) (notMasked $ namedArg p) -- Register also size increase. (Def s [Apply t], p) | Just s == suc -> -- Andreas, 2012-10-19 do not cut off here increase 1 <$> compareTerm' (unArg t) mp -- In all cases that do not concern sizes, -- we cannot continue if pattern is masked. _ | m -> return Order.unknown (Lit l, LitP l') | l == l' -> return Order.le | otherwise -> return Order.unknown (Lit l, _) -> do v <- liftTCM $ constructorForm v case v of Lit{} -> return Order.unknown v -> compareTerm' v mp -- Andreas, 2011-04-19 give subterm priority over matrix order (Con{}, ConP c _ ps) | any (isSubTerm v . namedArg) ps -> decr True <$> offsetFromConstructor (conName c) (Con c _ es, ConP c' _ ps) | conName c == conName c'-> let ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es in compareConArgs ts ps (Con _ _ [], _) -> return Order.le -- new case for counting constructors / projections -- register also increase (Con c _ es, _) -> do let ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es increase <$> offsetFromConstructor (conName c) <*> (infimum <$> mapM (\ t -> compareTerm' (unArg t) mp) ts) (t, p) -> return $ subTerm t p -- | @subTerm@ computes a size difference (Order) subTerm :: (?cutoff :: CutOff) => Term -> DeBruijnPattern -> Order subTerm t p = if equal t p then Order.le else properSubTerm t p where equal (Con c _ es) (ConP c' _ ps) = let ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es in and $ (conName c == conName c') : (length ts == length ps) : zipWith (\ t p -> equal (unArg t) (namedArg p)) ts ps equal (Var i []) (VarP _ x) = i == dbPatVarIndex x equal (Lit l) (LitP l') = l == l' -- Terms. -- Checking for identity here is very fragile. -- However, we cannot do much more, as we are not allowed to normalize t. -- (It might diverge, and we are just in the process of termination checking.) equal t (DotP _ t') = t == t' equal _ _ = False properSubTerm t (ConP _ _ ps) = setUsability True $ decrease 1 $ supremum $ map (subTerm t . namedArg) ps properSubTerm _ _ = Order.unknown isSubTerm :: (?cutoff :: CutOff) => Term -> DeBruijnPattern -> Bool isSubTerm t p = nonIncreasing $ subTerm t p compareConArgs :: Args -> [NamedArg DeBruijnPattern] -> TerM Order compareConArgs ts ps = do cutoff <- terGetCutOff let ?cutoff = cutoff -- we may assume |ps| >= |ts|, otherwise c ps would be of functional type -- which is impossible case (length ts, length ps) of (0,0) -> return Order.le -- c <= c (0,1) -> return Order.unknown -- c not<= c x (1,0) -> __IMPOSSIBLE__ (1,1) -> compareTerm' (unArg (head ts)) (notMasked $ namedArg $ head ps) (_,_) -> foldl (Order..*.) Order.le <$> zipWithM compareTerm' (map unArg ts) (map (notMasked . namedArg) ps) -- corresponds to taking the size, not the height -- allows examples like (x, y) < (Succ x, y) {- version which does an "order matrix" -- Andreas, 2013-02-18 disabled because it is unclear -- how to scale idempotency test to matrix-shaped orders (need thinking/researcH) -- Trigges issue 787. (_,_) -> do -- build "call matrix" m <- mapM (\t -> mapM (compareTerm' suc (unArg t)) ps) ts let m2 = makeCM (length ps) (length ts) m return $ Order.orderMat (Order.mat m2) -} {- version which takes height -- if null ts then Order.Le -- else Order.infimum (zipWith compareTerm' (map unArg ts) ps) -} compareVar :: Nat -> Masked DeBruijnPattern -> TerM Order compareVar i (Masked m p) = do suc <- terGetSizeSuc cutoff <- terGetCutOff let ?cutoff = cutoff let no = return Order.unknown case p of ProjP{} -> no IApplyP _ _ _ x -> compareVarVar i (Masked m x) LitP{} -> no DotP{} -> no VarP _ x -> compareVarVar i (Masked m x) ConP s _ [p] | Just (conName s) == suc -> setUsability True . decrease 1 <$> compareVar i (notMasked $ namedArg p) ConP c _ ps -> if m then no else setUsability True <$> do decrease <$> offsetFromConstructor (conName c) <*> (Order.supremum <$> mapM (compareVar i . notMasked . namedArg) ps) DefP _ c ps -> if m then no else setUsability True <$> do decrease <$> offsetFromConstructor c <*> (Order.supremum <$> mapM (compareVar i . notMasked . namedArg) ps) -- This should be fine for c == hcomp -- | Compare two variables. -- -- The first variable comes from a term, the second from a pattern. compareVarVar :: Nat -> Masked DBPatVar -> TerM Order compareVarVar i (Masked m x@(DBPatVar _ j)) | i == j = if not m then return Order.le else liftTCM $ -- If j is a size, we ignore the mask. ifM (isJust <$> do isSizeType =<< reduce =<< typeOfBV j) {- then -} (return Order.le) {- else -} (return Order.unknown) | otherwise = do -- record usability of variable u <- (i `VarSet.member`) <$> terGetUsableVars -- Andreas, 2017-07-26, issue #2331. -- The usability logic is refuted by bounded size quantification in terms. -- Thus, it is switched off (the infrastructure remains in place for now). if not u then return Order.unknown else do -- Only if usable: res <- isBounded i case res of BoundedNo -> return Order.unknown BoundedLt v -> setUsability u . decrease 1 <$> compareTerm' v (Masked m $ varP x) Agda-2.6.0.1/src/full/Agda/Termination/SparseMatrix.hs0000644000000000000000000003627413466402171020554 0ustar0000000000000000{-# LANGUAGE CPP #-} {- | Sparse matrices. We assume the matrices to be very sparse, so we just implement them as sorted association lists. Most operations are linear in the number of non-zero elements. An exception is transposition, which needs to sort the association list again; it has the complexity of sorting: @n log n@ where @n@ is the number of non-zero elements. Another exception is matrix multiplication, of course. -} module Agda.Termination.SparseMatrix ( -- * Basic data types Matrix(Matrix) , unM -- , matrixInvariant -- Moved to the internal test-suite , Size(..) , MIx (..) -- * Generating and creating matrices , fromLists , fromIndexList , toLists -- , Agda.Termination.Matrix.zipWith -- , matrix -- Moved to the internal test-suite -- * Combining and querying matrices , size , square , isEmpty , isSingleton , zipMatrices , add , intersectWith , interAssocWith , mul , transpose , Diagonal(..) , toSparseRows , supSize , zipAssocWith -- * Modifying matrices , addRow , addColumn ) where import Data.Array import Data.Function import qualified Data.List as List import Data.Maybe import Data.Monoid import Data.Foldable (Foldable) import qualified Data.Foldable as Fold import Data.Traversable (Traversable) import qualified Text.PrettyPrint.Boxes as Boxes import Agda.Termination.Semiring (HasZero(..), Semiring) import qualified Agda.Termination.Semiring as Semiring import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.PartialOrd import Agda.Utils.Pretty hiding (isEmpty) import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- * Basic data types ------------------------------------------------------------------------ -- | Size of a matrix. data Size i = Size { rows :: i -- ^ Number of rows, @>= 0@. , cols :: i -- ^ Number of columns, @>= 0@. } deriving (Eq, Ord, Show) -- | Type of matrix indices (row, column). data MIx i = MIx { row :: i -- ^ Row index, @1 <= row <= rows@. , col :: i -- ^ Column index @1 <= col <= cols@. } deriving (Eq, Ord, Show, Ix) -- | Convert a 'Size' to a set of bounds suitable for use with -- the matrices in this module. toBounds :: Num i => Size i -> (MIx i, MIx i) toBounds sz = (MIx { row = 1, col = 1 }, MIx { row = rows sz, col = cols sz }) -- | Type of matrices, parameterised on the type of values. -- -- Sparse matrices are implemented as an ordered association list, -- mapping coordinates to values. data Matrix i b = Matrix { size :: Size i -- ^ Dimensions of the matrix. , unM :: [(MIx i, b)] -- ^ Association of indices to values. } deriving (Eq, Ord, Functor, Foldable, Traversable) ------------------------------------------------------------------------ -- * Operations and query on matrix size. ------------------------------------------------------------------------ -- | 'True' iff the matrix is square. square :: Ix i => Matrix i b -> Bool square m = rows (size m) == cols (size m) -- | Returns 'True' iff the matrix is empty. isEmpty :: (Num i, Ix i) => Matrix i b -> Bool isEmpty m = rows sz <= 0 || cols sz <= 0 where sz = size m -- | Compute the matrix size of the union of two matrices. supSize :: Ord i => Matrix i a -> Matrix i b -> Size i supSize (Matrix (Size r1 c1) _) (Matrix (Size r2 c2) _) = Size (max r1 r2) (max c1 c2) -- | Compute the matrix size of the intersection of two matrices. infSize :: Ord i => Matrix i a -> Matrix i b -> Size i infSize (Matrix (Size r1 c1) _) (Matrix (Size r2 c2) _) = Size (min r1 r2) (min c1 c2) ------------------------------------------------------------------------ -- * Creating matrices and converting to lists. ------------------------------------------------------------------------ -- | Constructs a matrix from a list of @(index, value)@-pairs. -- @O(n)@ where @n@ is size of the list. -- -- Precondition: indices are unique. fromIndexList :: (Ord i, HasZero b) => Size i -> [(MIx i, b)] -> Matrix i b fromIndexList sz = Matrix sz . List.sortBy (compare `on` fst) . filter ((zeroElement /=) . snd) -- | @'fromLists' sz rs@ constructs a matrix from a list of lists of -- values (a list of rows). -- @O(size)@ where @size = rows × cols@. -- -- Precondition: -- @'length' rs '==' 'rows' sz@ and -- @'all' (('cols' sz '==') . 'length') rs@. fromLists :: (Ord i, Num i, Enum i, HasZero b) => Size i -> [[b]] -> Matrix i b fromLists sz bs = fromIndexList sz $ zip ([ MIx i j | i <- [1..rows sz] , j <- [1..cols sz]]) (concat bs) -- | Converts a sparse matrix to a sparse list of rows. -- @O(n)@ where @n@ is the number of non-zero entries of the matrix. -- -- Only non-empty rows are generated. -- toSparseRows :: (Eq i) => Matrix i b -> [(i,[(i,b)])] toSparseRows (Matrix _ []) = [] toSparseRows (Matrix _ ((MIx i j, b) : m)) = aux i [(j,b)] m where aux i' [] [] = [] aux i' row [] = [(i', reverse row)] aux i' row ((MIx i j, b) : m) | i' == i = aux i' ((j,b):row) m | otherwise = (i', reverse row) : aux i [(j,b)] m -- | Turn a sparse vector into a vector by inserting a fixed element -- at the missing positions. -- @O(size)@ where @size@ is the dimension of the vector. blowUpSparseVec :: (Integral i) => b -> i -> [(i,b)] -> [b] blowUpSparseVec zero n l = aux 1 l where aux i [] = List.genericReplicate (n + 1 - i) zero aux i l@((j,b):l') | i > j || i > n = __IMPOSSIBLE__ | i == j = b : aux (i + 1) l' | otherwise = zero : aux (i + 1) l -- Older implementation without replicate. blowUpSparseVec' :: (Ord i, Num i, Enum i) => b -> i -> [(i,b)] -> [b] blowUpSparseVec' zero n l = aux 1 l where aux i [] | i > n = [] | otherwise = zero : aux (i+1) [] aux i ((j,b):l) | i <= n && j == i = b : aux (succ i) l aux i ((j,b):l) | i <= n && j >= i = zero : aux (succ i) ((j,b):l) aux i l = __IMPOSSIBLE__ -- error $ "blowUpSparseVec (n = " ++ show n ++ ") aux i=" ++ show i ++ " j=" ++ show (fst (head l)) ++ " length l = " ++ show (length l) -- | Converts a matrix to a list of row lists. -- @O(size)@ where @size = rows × cols@. toLists :: (Integral i, HasZero b) => Matrix i b -> [[b]] toLists m@(Matrix size@(Size nrows ncols) _) = blowUpSparseVec emptyRow nrows $ map (mapSnd (blowUpSparseVec zeroElement ncols)) $ toSparseRows m where emptyRow = List.genericReplicate ncols zeroElement ------------------------------------------------------------------------ -- * Combining and querying matrices ------------------------------------------------------------------------ -- | Returns 'Just b' iff it is a 1x1 matrix with just one entry 'b'. -- @O(1)@. isSingleton :: (Eq i, Num i, HasZero b) => Matrix i b -> Maybe b isSingleton (Matrix (Size 1 1) [(_,b)]) = Just b isSingleton (Matrix (Size 1 1) [] ) = Just zeroElement isSingleton (Matrix (Size 1 1) _ ) = __IMPOSSIBLE__ isSingleton _ = Nothing -- | @'diagonal' m@ extracts the diagonal of @m@. -- -- For non-square matrices, the length of the diagonal is -- the minimum of the dimensions of the matrix. class Diagonal m e | m -> e where diagonal :: m -> [e] -- | Diagonal of sparse matrix. -- -- @O(n)@ where @n@ is the number of non-zero elements in the matrix. instance (Integral i, HasZero b) => Diagonal (Matrix i b) b where diagonal (Matrix (Size r c) m) = blowUpSparseVec zeroElement (min r c) $ mapMaybe (\ ((MIx i j), b) -> if i==j then Just (i,b) else Nothing) m -- | Transposable things. class Transpose a where transpose :: a -> a -- | Size of transposed matrix. instance Transpose (Size i) where transpose (Size n m) = Size m n -- | Transposing coordinates. instance Transpose (MIx i) where transpose (MIx i j) = MIx j i -- | Matrix transposition. -- -- @O(n log n)@ where @n@ is the number of non-zero elements in the matrix. instance Ord i => Transpose (Matrix i b) where transpose (Matrix size m) = Matrix (transpose size) $ List.sortBy (compare `on` fst) $ map (mapFst transpose) m -- | General pointwise combination function for association lists. -- @O(n1 + n2)@ where @ni@ is the number of non-zero element in matrix @i@. -- -- In @zipAssocWith fs gs f g h l l'@, -- -- @fs@ is possibly more efficient version of -- @'mapMaybe' (\ (i, a) -> (i,) <$> f a)@, and same for @gs@ and @g@. zipAssocWith :: (Ord i) => ([(i,a)] -> [(i,c)]) -- ^ Only left map remaining. -> ([(i,b)] -> [(i,c)]) -- ^ Only right map remaining. -> (a -> Maybe c) -- ^ Element only present in left map. -> (b -> Maybe c) -- ^ Element only present in right map. -> (a -> b -> Maybe c) -- ^ Element present in both maps. -> [(i,a)] -> [(i,b)] -> [(i,c)] zipAssocWith fs gs f g h = merge where merge m1 [] = mapMaybe (\ (i, a) -> (i,) <$> f a) m1 merge [] m2 = mapMaybe (\ (i, b) -> (i,) <$> g b) m2 merge m1@((i,a):m1') m2@((j,b):m2') = case compare i j of LT -> mcons ((i,) <$> f a) $ merge m1' m2 GT -> mcons ((j,) <$> g b) $ merge m1 m2' EQ -> mcons ((i,) <$> h a b) $ merge m1' m2' -- | Instance of 'zipAssocWith' which keeps longer assoc lists. -- @O(n1 + n2)@. unionAssocWith :: (Ord i) => (a -> Maybe c) -- ^ Element only present in left map. -> (b -> Maybe c) -- ^ Element only present in right map. -> (a -> b -> Maybe c) -- ^ Element present in both maps. -> [(i,a)] -> [(i,b)] -> [(i,c)] unionAssocWith f g h = zipAssocWith (map_ f) (map_ g) f g h where map_ f = mapMaybe (\ (i, a) -> (i,) <$> f a) -- | General pointwise combination function for sparse matrices. -- @O(n1 + n2)@. zipMatrices :: forall a b c i . (Ord i) => (a -> c) -- ^ Element only present in left matrix. -> (b -> c) -- ^ Element only present in right matrix. -> (a -> b -> c) -- ^ Element present in both matrices. -> (c -> Bool) -- ^ Result counts as zero? -> Matrix i a -> Matrix i b -> Matrix i c zipMatrices f g h zero m1 m2 = Matrix (supSize m1 m2) $ unionAssocWith (drop0 . f) (drop0 . g) (\ a -> drop0 . h a) (unM m1) (unM m2) where drop0 = filterMaybe (not . zero) -- | @'add' (+) m1 m2@ adds @m1@ and @m2@, using @(+)@ to add values. -- @O(n1 + n2)@. -- -- Returns a matrix of size @'supSize' m1 m2@. add :: (Ord i, HasZero a) => (a -> a -> a) -> Matrix i a -> Matrix i a -> Matrix i a add plus = zipMatrices id id plus (== zeroElement) -- | @'intersectWith' f m1 m2@ build the pointwise conjunction @m1@ and @m2@. -- Uses @f@ to combine non-zero values. -- @O(n1 + n2)@. -- -- Returns a matrix of size @infSize m1 m2@. intersectWith :: (Ord i) => (a -> a -> a) -> Matrix i a -> Matrix i a -> Matrix i a intersectWith f m1 m2 = Matrix (infSize m1 m2) $ interAssocWith f (unM m1) (unM m2) -- | Association list intersection. -- @O(n1 + n2)@. -- -- @interAssocWith f l l' = { (i, f a b) | (i,a) ∈ l and (i,b) ∈ l' }@ -- -- Used to combine sparse matrices, it might introduce zero elements -- if @f@ can return zero for non-zero arguments. interAssocWith :: (Ord i) => (a -> a -> a) -> [(i,a)] -> [(i,a)] -> [(i,a)] interAssocWith f [] m = [] interAssocWith f l [] = [] interAssocWith f l@((i,a):l') m@((j,b):m') | i < j = interAssocWith f l' m | i > j = interAssocWith f l m' | otherwise = (i, f a b) : interAssocWith f l' m' -- | @'mul' semiring m1 m2@ multiplies matrices @m1@ and @m2@. -- Uses the operations of the semiring @semiring@ to perform the -- multiplication. -- -- @O(n1 + n2 log n2 + Σ(i <= r1) Σ(j <= c2) d(i,j))@ where -- @r1@ is the number of non-empty rows in @m1@ and -- @c2@ is the number of non-empty columns in @m2@ and -- @d(i,j)@ is the bigger one of the following two quantifies: -- the length of sparse row @i@ in @m1@ and -- the length of sparse column @j@ in @m2@. -- -- Given dimensions @m1 : r1 × c1@ and @m2 : r2 × c2@, -- a matrix of size @r1 × c2@ is returned. -- It is not necessary that @c1 == r2@, the matrices are implicitly -- patched with zeros to match up for multiplication. -- For sparse matrices, this patching is a no-op. mul :: (Ix i, Eq a) => Semiring a -> Matrix i a -> Matrix i a -> Matrix i a mul semiring m1 m2 = Matrix (Size { rows = rows (size m1), cols = cols (size m2) }) $ [ (MIx i j, b) | (i,v) <- toSparseRows m1 , (j,w) <- toSparseRows $ transpose m2 , let b = inner v w , b /= zero ] where zero = Semiring.zero semiring plus = Semiring.add semiring times = Semiring.mul semiring inner v w = List.foldl' plus zero $ map snd $ interAssocWith times v w -- | Pointwise comparison. -- Only matrices with the same dimension are comparable. instance (Ord i, PartialOrd a) => PartialOrd (Matrix i a) where comparable m n | size m /= size n = POAny | otherwise = Fold.fold $ zipMatrices onlym onlyn both trivial m n where -- If an element is only in @m@, then its 'Unknown' in @n@ -- so it gotten better at best, in any case, not worse. onlym o = POGT -- If an element is only in @n@, then its 'Unknown' in @m@ -- so we have strictly less information. onlyn o = POLT both = comparable -- The zero element of the result sparse matrix is the -- neutral element of the monoid. trivial = (==mempty) ------------------------------------------------------------------------ -- Modifying matrices -- | @'addColumn' x m@ adds a new column to @m@, after the columns -- already existing in the matrix. All elements in the new column get -- set to @x@. addColumn :: (Num i, HasZero b) => b -> Matrix i b -> Matrix i b addColumn x m | x == zeroElement = m { size = (size m) { cols = cols (size m) + 1 }} | otherwise = __IMPOSSIBLE__ -- | @'addRow' x m@ adds a new row to @m@, after the rows already -- existing in the matrix. All elements in the new row get set to @x@. addRow :: (Num i, HasZero b) => b -> Matrix i b -> Matrix i b addRow x m | x == zeroElement = m { size = (size m) { rows = rows (size m) + 1 }} | otherwise = __IMPOSSIBLE__ ------------------------------------------------------------------------ -- * Printing ------------------------------------------------------------------------ instance (Integral i, HasZero b, Show i, Show b) => Show (Matrix i b) where showsPrec _ m = showString "Agda.Termination.SparseMatrix.fromLists " . shows (size m) . showString " " . shows (toLists m) instance (Integral i, HasZero b, Pretty b) => Pretty (Matrix i b) where -- pretty = vcat . map (hsep . map pretty) . toLists pretty = vcat . map text . lines . Boxes.render . Boxes.hsep 1 Boxes.right . map ( Boxes.vcat Boxes.right . map ( Boxes.alignHoriz Boxes.right 4 . Boxes.text . render . pretty ) ) . toLists . transpose -- ADAPTED FROM: -- http://www.tedreed.info/programming/2012/06/02/how-to-use-textprettyprintboxes/ -- print_table :: [[String]] -> IO () -- print_table rows = printBox $ hsep 2 left (map (vcat left . map text) (transpose rows)) Agda-2.6.0.1/src/full/Agda/Termination/CallMatrix.hs0000644000000000000000000001545213466402171020165 0ustar0000000000000000-- {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImplicitParams #-} module Agda.Termination.CallMatrix where -- module Agda.Termination.CallMatrix -- ( CallMatrix'(..), CallMatrix -- , callMatrix -- , CallComb(..) -- , tests -- ) where import Data.Semigroup import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Agda.Termination.CutOff import Agda.Termination.Order as Order import Agda.Termination.SparseMatrix as Matrix import Agda.Termination.Semiring (HasZero(..)) import Agda.Utils.Favorites (Favorites) import qualified Agda.Utils.Favorites as Fav import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.PartialOrd import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Singleton ------------------------------------------------------------------------ -- * Call matrices ------------------------------------------------------------------------ -- | Call matrix indices = function argument indices. -- -- Machine integer 'Int' is sufficient, since we cannot index more arguments -- than we have addresses on our machine. type ArgumentIndex = Int -- | Call matrices. -- -- A call matrix for a call @f --> g@ has dimensions @ar(g) × ar(f)@. -- -- Each column corresponds to one formal argument of caller @f@. -- Each row corresponds to one argument in the call to @g@. -- -- In the presence of dot patterns, a call argument can be related -- to /several/ different formal arguments of @f@. -- -- See e.g. @test/succeed/DotPatternTermination.agda@: -- -- @ -- data D : Nat -> Set where -- cz : D zero -- c1 : forall n -> D n -> D (suc n) -- c2 : forall n -> D n -> D n -- -- f : forall n -> D n -> Nat -- f .zero cz = zero -- f .(suc n) (c1 n d) = f n (c2 n d) -- f n (c2 .n d) = f n d -- @ -- -- Call matrices (without guardedness) are -- -- @ -- -1 -1 n < suc n and n < c1 n d -- ? = c2 n d <= c1 n d -- -- = -1 n <= n and n < c2 n d -- ? -1 d < c2 n d -- @ -- -- Here is a part of the original documentation for call matrices -- (kept for historical reasons): -- -- This datatype encodes information about a single recursive -- function application. The columns of the call matrix stand for -- 'source' function arguments (patterns). The rows of the matrix stand for -- 'target' function arguments. Element @(i, j)@ in the matrix should -- be computed as follows: -- -- * 'Order.lt' (less than) if the @j@-th argument to the 'target' -- function is structurally strictly smaller than the @i@-th -- pattern. -- -- * 'Order.le' (less than or equal) if the @j@-th argument to the -- 'target' function is structurally smaller than the @i@-th -- pattern. -- -- * 'Order.unknown' otherwise. newtype CallMatrix' a = CallMatrix { mat :: Matrix ArgumentIndex a } deriving (Eq, Ord, Show, Functor, Foldable, Traversable, PartialOrd) type CallMatrix = CallMatrix' Order deriving instance NotWorse CallMatrix instance HasZero a => Diagonal (CallMatrix' a) a where diagonal = diagonal . mat -- | Call matrix multiplication and call combination. class CallComb a where (>*<) :: (?cutoff :: CutOff) => a -> a -> a -- | Call matrix multiplication. -- -- @f --(m1)--> g --(m2)--> h@ is combined to @f --(m2 `mul` m1)--> h@ -- -- Note the reversed order of multiplication: -- The matrix @c1@ of the second call @g-->h@ in the sequence -- @f-->g-->h@ is multiplied with the matrix @c2@ of the first call. -- -- Preconditions: -- @m1@ has dimensions @ar(g) × ar(f)@. -- @m2@ has dimensions @ar(h) × ar(g)@. -- -- Postcondition: -- @m1 >*< m2@ has dimensions @ar(h) × ar(f)@. instance CallComb CallMatrix where CallMatrix m1 >*< CallMatrix m2 = CallMatrix $ mul orderSemiring m2 m1 {- UNUSED, BUT DON'T REMOVE! -- | Call matrix addition = minimum = pick worst information. addCallMatrices :: (?cutoff :: CutOff) => CallMatrix -> CallMatrix -> CallMatrix addCallMatrices cm1 cm2 = CallMatrix $ add (Semiring.add orderSemiring) (mat cm1) (mat cm2) -} ------------------------------------------------------------------------ -- * Call matrix augmented with path information. ------------------------------------------------------------------------ -- | Call matrix augmented with path information. data CallMatrixAug cinfo = CallMatrixAug { augCallMatrix :: CallMatrix -- ^ The matrix of the (composed call). , augCallInfo :: cinfo -- ^ Meta info, like call path. } deriving (Eq, Show) instance Diagonal (CallMatrixAug cinfo) Order where diagonal = diagonal . augCallMatrix instance PartialOrd (CallMatrixAug cinfo) where comparable m m' = comparable (augCallMatrix m) (augCallMatrix m') instance NotWorse (CallMatrixAug cinfo) where c1 `notWorse` c2 = augCallMatrix c1 `notWorse` augCallMatrix c2 -- | Augmented call matrix multiplication. instance Monoid cinfo => CallComb (CallMatrixAug cinfo) where CallMatrixAug m1 p1 >*< CallMatrixAug m2 p2 = CallMatrixAug (m1 >*< m2) (mappend p1 p2) -- | Non-augmented call matrix. noAug :: Monoid cinfo => CallMatrix -> CallMatrixAug cinfo noAug m = CallMatrixAug m mempty ------------------------------------------------------------------------ -- * Sets of incomparable call matrices augmented with path information. ------------------------------------------------------------------------ -- | Sets of incomparable call matrices augmented with path information. -- Use overloaded 'null', 'empty', 'singleton', 'mappend'. newtype CMSet cinfo = CMSet { cmSet :: Favorites (CallMatrixAug cinfo) } deriving ( Show, Semigroup, Monoid, Null, Singleton (CallMatrixAug cinfo) ) -- | Call matrix set product is the Cartesian product. instance Monoid cinfo => CallComb (CMSet cinfo) where CMSet as >*< CMSet bs = CMSet $ Fav.fromList $ [ a >*< b | a <- Fav.toList as, b <- Fav.toList bs ] -- | Insert into a call matrix set. insert :: CallMatrixAug cinfo -> CMSet cinfo -> CMSet cinfo insert a (CMSet as) = CMSet $ Fav.insert a as -- | Union two call matrix sets. union :: CMSet cinfo -> CMSet cinfo -> CMSet cinfo union = mappend -- union (CMSet as) (CMSet bs) = CMSet $ Fav.union as bs -- | Convert into a list of augmented call matrices. toList :: CMSet cinfo -> [CallMatrixAug cinfo] toList (CMSet as) = Fav.toList as ------------------------------------------------------------------------ -- * Printing ------------------------------------------------------------------------ instance Pretty CallMatrix where pretty (CallMatrix m) = pretty m instance Pretty cinfo => Pretty (CallMatrixAug cinfo) where pretty (CallMatrixAug m cinfo) = pretty cinfo $$ pretty m instance Pretty cinfo => Pretty (CMSet cinfo) where pretty = vcat . punctuate newLine . map pretty . toList where newLine = "\n" Agda-2.6.0.1/src/full/Agda/Termination/RecCheck.hs0000644000000000000000000000451713466402171017574 0ustar0000000000000000{-# LANGUAGE CPP #-} {- Checking for recursion: - We detect truly (co)recursive definitions by computing the dependency graph and checking for cycles. - This is inexpensive and let us skip the termination check when there's no (co)recursion Original contribution by Andrea Vezzosi (sanzhiyan). This implementation by Andreas. -} module Agda.Termination.RecCheck ( recursive , anyDefs ) where import Control.Applicative import Data.Graph import Data.List (nub) import qualified Data.Map as Map import qualified Data.IntMap as IntMap import Agda.Syntax.Internal import Agda.Syntax.Internal.Defs import Agda.TypeChecking.Monad import Agda.Utils.Pretty (prettyShow) #include "undefined.h" import Agda.Utils.Impossible recursive :: [QName] -> TCM Bool recursive names = do graph <- zip names <$> mapM (\ d -> nub <$> recDef names d) names reportSLn "rec.graph" 20 $ show graph return $ cyclic graph -- | A graph is cyclic if it has any strongly connected component. cyclic :: [(QName, [QName])] -> Bool cyclic g = or [ True | CyclicSCC _ <- stronglyConnComp g' ] where g' = map (\ (n, ns) -> ((), n, ns)) g -- | @recDef names name@ returns all definitions from @names@ -- that are used in the type and body of @name@. recDef :: [QName] -> QName -> TCM [QName] recDef names name = do -- Retrieve definition def <- getConstInfo name -- Get names in type ns1 <- anyDefs names (defType def) -- Get names in body ns2 <- case theDef def of Function{ funClauses = cls } -> anyDefs names cls _ -> return [] reportSLn "rec.graph" 20 $ unlines [ "recDef " ++ prettyShow name , " names in the type: " ++ show ns1 , " names in the def: " ++ show ns2 ] return $ ns1 `mappend` ns2 -- | @anysDef names a@ returns all definitions from @names@ -- that are used in @a@. anyDefs :: GetDefs a => [QName] -> a -> TCM [QName] anyDefs names a = do -- Prepare function to lookup metas outside of TCM st <- getMetaStore let lookup (MetaId x) = case mvInstantiation <$> IntMap.lookup x st of Just (InstV _ v) -> Just v -- TODO: ignoring the lambdas might be bad? _ -> Nothing -- we collect only those used definitions that are in @names@ emb d = if d `elem` names then [d] else [] -- get all the Defs that are in names return $ getDefs' lookup emb a Agda-2.6.0.1/src/full/Agda/Termination/Semiring.hs0000644000000000000000000000246713466402171017704 0ustar0000000000000000-- | Semirings. module Agda.Termination.Semiring ( HasZero(..) , Semiring(..) , integerSemiring , intSemiring , boolSemiring ) where import Data.Monoid -- | @HasZero@ is needed for sparse matrices, to tell which is the element -- that does not have to be stored. -- It is a cut-down version of @SemiRing@ which is definable -- without the implicit @?cutoff@. class Eq a => HasZero a where zeroElement :: a -- | Semirings. data Semiring a = Semiring { add :: a -> a -> a -- ^ Addition. , mul :: a -> a -> a -- ^ Multiplication. , zero :: a -- ^ Zero. -- The one is never used in matrix multiplication -- , one :: a -- ^ One. } ------------------------------------------------------------------------ -- Specific semirings -- | The standard semiring on 'Integer's. instance HasZero Integer where zeroElement = 0 integerSemiring :: Semiring Integer integerSemiring = Semiring { add = (+), mul = (*), zero = 0 } -- , one = 1 } -- | The standard semiring on 'Int's. instance HasZero Int where zeroElement = 0 intSemiring :: Semiring Int intSemiring = Semiring { add = (+), mul = (*), zero = 0 } -- , one = 1 } -- | The standard semiring on 'Bool's. boolSemiring :: Semiring Bool boolSemiring = Semiring { add = (||), mul = (&&), zero = False } --, one = True } Agda-2.6.0.1/src/full/Agda/Termination/Inlining.hs0000644000000000000000000002526613466402171017700 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} -- Author: Ulf Norell -- Created: 2013-11-09 {-| This module defines an inlining transformation on clauses that's run before termination checking. The purpose is to improve termination checking of with clauses (issue 59). The transformation inlines generated with-functions expanding the clauses of the parent function in such a way that termination checking the expanded clauses guarantees termination of the original function, while allowing more terminating functions to be accepted. It does in no way pretend to preserve the semantics of the original function. Roughly, the source program > f ps with as > {f ps₁i qsi = bi} is represented internally as > f ps = f-aux xs as where xs = vars(ps) > {f-aux ps₂i qsi = bi} where ps₁i = ps[ps₂i/xs] The inlining transformation turns this into > {f ps = aj} for aj ∈ as > {f ps₁i qsi = bi} The first set of clauses, called 'withExprClauses', ensure that we don't forget any recursive calls in @as@. The second set of clauses, henceforth called 'inlinedClauses', are the surface-level clauses the user sees (and probably reasons about). The reason this works is that there is a single call site for each with-function. Note that the lhss of the inlined clauses are not type-correct, neither with the type of @f@ (since there are additional patterns @qsi@) nor with the type of @f-aux@ (since there are the surface-level patterns @ps₁i@ instead of the actual patterns @ps₂i@). -} module Agda.Termination.Inlining ( inlineWithClauses , isWithFunction , expandWithFunctionCall ) where import Control.Monad.State import qualified Data.List as List import Data.Maybe import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.DisplayForm import Agda.TypeChecking.Telescope import Agda.Utils.List (downFrom) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Size import Agda.Utils.Impossible #include "undefined.h" -- | Returns 'Nothing' if no inlining happened, otherwise, the new clauses. inlineWithClauses :: QName -> Clause -> TCM (Maybe [Clause]) inlineWithClauses f cl = inTopContext $ do -- Clauses are relative to the empty context, so we operate @inTopContext@. let noInline = return Nothing -- The de Bruijn indices of @body@ are relative to the @clauseTel cl@. body <- fmap stripDontCare <$> instantiate (clauseBody cl) case body of Just (Def wf els) -> do isWith <- isWithFunction wf reportSDoc "term.with.inline" 20 $ sep [ "inlineWithClauses: isWithFunction =" , maybe "" prettyTCM isWith ] caseMaybe isWith noInline $ \ f' -> do if f /= f' then noInline else do -- The clause body is a with-function call @wf args@. -- @f@ is the function the with-function belongs to. let args = fromMaybe __IMPOSSIBLE__ . allApplyElims $ els reportSDoc "term.with.inline" 70 $ sep [ "Found with (raw):", nest 2 $ text $ show cl ] reportSDoc "term.with.inline" 20 $ sep [ "Found with:", nest 2 $ prettyTCM $ QNamed f cl ] t <- defType <$> getConstInfo wf cs1 <- withExprClauses cl t args reportSDoc "term.with.inline" 70 $ vcat $ "withExprClauses (raw)" : map (nest 2 . text . show) cs1 reportSDoc "term.with.inline" 20 $ vcat $ "withExprClauses" : map (nest 2 . prettyTCM . QNamed f) cs1 cs2 <- inlinedClauses f cl t wf reportSDoc "term.with.inline" 70 $ vcat $ "inlinedClauses (raw)" : map (nest 2 . text . show) cs2 reportSDoc "term.with.inline" 20 $ vcat $ "inlinedClauses" : map (nest 2 . prettyTCM . QNamed f) cs2 return $ Just $ cs1 ++ cs2 Just d -> do reportSLn "term.with.inline" 20 $ "inlineWithClauses: clause body is not a Def" reportSDoc "term.with.inline" 70 $ sep [ "inlineWithClauses: clause body is not a Def but " , (text . show) d ] noInline Nothing -> do reportSLn "term.with.inline" 20 $ "inlineWithClauses: no clause body" noInline -- | Returns the original clause if no inlining happened, otherwise, -- the new clauses. inlineWithClauses' :: QName -> Clause -> TCM [Clause] inlineWithClauses' f cl = fromMaybe [cl] <$> inlineWithClauses f cl -- | @withExprClauses cl t as@ generates a clause containing a fake -- call to with-expression @a@ for each @a@ in @as@ that is not -- a variable (and thus cannot contain a recursive call). -- -- Andreas, 2013-11-11: I guess "not a variable" could be generalized -- to "not containing a call to a mutually defined function". -- -- Note that the @as@ stem from the *unraised* clause body of @cl@ -- and thus can be simply 'fmap'ped back there (under all the 'Bind' -- abstractions). -- -- Precondition: we are 'inTopContext'. withExprClauses :: Clause -> Type -> Args -> TCM [Clause] withExprClauses cl t args = {- addContext (clauseTel cl) $ -} loop t args where -- Note: for the following code, it does not matter which context we are in. -- Restore the @addContext (clauseTel cl)@ if that should become necessary -- (like when debug printing @args@ etc). loop t [] = return [] loop t (a:as) = case unArg a of Var i [] -> rest -- TODO: smarter criterion when to skip withExprClause v -> (cl { clauseBody = Just v , clauseType = Just $ defaultArg dom } :) <$> rest where rest = loop (piApply t [a]) as dom = case unEl t of -- The type is the generated with-function type so we know it Pi a _ -> unDom a -- doesn't contain anything funny _ -> __IMPOSSIBLE__ -- | @inlinedClauses f cl t wf@ inlines the clauses of with-function @wf@ -- of type @t@ into the clause @cl@. The original function name is @f@. -- -- Precondition: we are 'inTopContext'. inlinedClauses :: QName -> Clause -> Type -> QName -> TCM [Clause] inlinedClauses f cl t wf = do -- @wf@ might define a with-function itself, so we first construct -- the with-inlined clauses @wcs@ of @wf@ recursively. wcs <- concat <$> (mapM (inlineWithClauses' wf) =<< defClauses <$> getConstInfo wf) reportSDoc "term.with.inline" 30 $ vcat $ "With-clauses to inline" : map (nest 2 . prettyTCM . QNamed wf) wcs mapM (inline f cl t wf) wcs -- | The actual work horse. -- @inline f pcl t wf wcl@ inlines with-clause @wcl@ of with-function @wf@ -- (of type @t@) into parent clause @pcl@ (original function being @f@). inline :: QName -> Clause -> Type -> QName -> Clause -> TCM Clause inline f pcl t wf wcl = inTopContext $ addContext (clauseTel wcl) $ do -- The tricky part here is to get the variables to line up properly. The -- order of the arguments to the with-function is not the same as the order -- of the arguments to the parent function. Fortunately we have already -- figured out how to turn an application of the with-function into an -- application of the parent function in the display form. reportSDoc "term.with.inline" 70 $ "inlining (raw) =" <+> text (show wcl) Just disp <- displayForm wf $ clauseElims wcl reportSDoc "term.with.inline" 70 $ "display form (raw) =" <+> text (show disp) reportSDoc "term.with.inline" 40 $ "display form =" <+> prettyTCM disp (pats, perm) <- dispToPats disp -- Jesper, 2016-07-28: Since the with-clause and the inlined clause both -- have the same clause telescope and the clause body is now relative to the -- clause telescope, there is no more need to change the clause body. return wcl { namedClausePats = numberPatVars __IMPOSSIBLE__ perm pats } where numVars = size (clauseTel wcl) dispToPats :: DisplayTerm -> TCM ([NamedArg Pattern], Permutation) dispToPats (DWithApp (DDef _ es) ws zs) = do let es' = es ++ map (Apply . defaultArg) ws ++ map (fmap DTerm) zs (ps, (j, ren)) <- (`runStateT` (0, [])) $ mapM (traverse dtermToPat) es' let perm = Perm j (map snd $ List.sort ren) return (map ePatToPat ps, perm) dispToPats t = __IMPOSSIBLE__ bindVar i = do (j, is) <- get let i' = numVars - i - 1 case lookup i' is of Nothing -> True <$ put (j + 1, (i', j) : is) Just{} -> False <$ put (j + 1, is) skip = modify $ \(j, is) -> (j + 1, is) ePatToPat :: Elim' Pattern -> NamedArg Pattern ePatToPat (Apply p) = fmap unnamed p ePatToPat (IApply x y p) = defaultNamedArg p ePatToPat (Proj o d) = defaultNamedArg $ ProjP o d dtermToPat :: DisplayTerm -> StateT (Int, [(Int, Int)]) TCM Pattern dtermToPat v = case v of DWithApp{} -> __IMPOSSIBLE__ -- I believe DCon c ci vs -> ConP c (toConPatternInfo ci) . map (fmap unnamed) <$> mapM (traverse dtermToPat) vs DDef d es -> do ifM (return (null es) `and2M` do isJust <$> lift (isProjection d)) {-then-} (return $ ProjP ProjPrefix d) {-else-} (dotP (dtermToTerm v) <$ skip) DDot v -> dotP v <$ skip DTerm (Var i []) -> ifM (bindVar i) (varP . nameToPatVarName <$> lift (nameOfBV i)) (pure $ dotP (Var i [])) DTerm (Con c ci vs) -> ConP c (toConPatternInfo ci) . map (fmap unnamed) <$> mapM (traverse (dtermToPat . DTerm)) (fromMaybe __IMPOSSIBLE__ $ allApplyElims vs) DTerm v -> dotP v <$ skip isWithFunction :: MonadTCM tcm => QName -> tcm (Maybe QName) isWithFunction x = liftTCM $ do def <- getConstInfo x return $ case theDef def of Function{ funWith = w } -> w _ -> Nothing expandWithFunctionCall :: QName -> Elims -> TCM Term expandWithFunctionCall f es = do as <- displayFormArities f case as of [a] | length es >= a -> do Just disp <- displayForm f es return $ dtermToTerm disp -- We might get an underapplied with function application (issue1598), in -- which case we have to eta expand. The resulting term is only used for -- termination checking, so we don't have to worry about getting hiding -- information right. -- Andreas, 2016-07-20 let's pray that there no copatterns needed... [a] -> do let pad = a - length es es' = raise pad es ++ map (Apply . defaultArg . var) (downFrom pad) Just disp <- displayForm f es' let info = setOrigin Inserted defaultArgInfo return $ foldr (\_ -> Lam info . Abs "") (dtermToTerm disp) (replicate pad ()) _ -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/Termination/Termination.hs0000644000000000000000000000621513466402171020413 0ustar0000000000000000{-# LANGUAGE ImplicitParams #-} -- | Termination checker, based on -- \"A Predicative Analysis of Structural Recursion\" by -- Andreas Abel and Thorsten Altenkirch (JFP'01), -- and -- \"The Size-Change Principle for Program Termination\" by -- Chin Soon Lee, Neil Jones, and Amir Ben-Amram (POPL'01). module Agda.Termination.Termination ( terminates , terminatesFilter , endos , idempotent ) where import Agda.Termination.CutOff import Agda.Termination.CallGraph import Agda.Termination.CallMatrix hiding (toList) import qualified Agda.Termination.CallMatrix as CMSet import Agda.Termination.Order import Agda.Termination.SparseMatrix import Agda.Utils.Either import Agda.Utils.List import Agda.Utils.Maybe import Data.Monoid -- | TODO: This comment seems to be partly out of date. -- -- @'terminates' cs@ checks if the functions represented by @cs@ -- terminate. The call graph @cs@ should have one entry ('Call') per -- recursive function application. -- -- @'Right' perms@ is returned if the functions are size-change terminating. -- -- If termination can not be established, then @'Left' problems@ is -- returned instead. Here @problems@ contains an -- indication of why termination cannot be established. See 'lexOrder' -- for further details. -- -- Note that this function assumes that all data types are strictly -- positive. -- -- The termination criterion is taken from Jones et al. -- In the completed call graph, each idempotent call-matrix -- from a function to itself must have a decreasing argument. -- Idempotency is wrt. matrix multiplication. -- -- This criterion is strictly more liberal than searching for a -- lexicographic order (and easier to implement, but harder to justify). terminates :: (Monoid cinfo, ?cutoff :: CutOff) => CallGraph cinfo -> Either cinfo () terminates cs = checkIdems $ endos $ toList $ complete cs terminatesFilter :: (Monoid cinfo, ?cutoff :: CutOff) => (Node -> Bool) -> CallGraph cinfo -> Either cinfo () terminatesFilter f cs = checkIdems $ endos $ filter f' $ toList $ complete cs where f' c = f (source c) && f (target c) endos :: [Call cinfo] -> [CallMatrixAug cinfo] endos cs = [ m | c <- cs, source c == target c , m <- CMSet.toList $ callMatrixSet c ] checkIdems :: (?cutoff :: CutOff) => [CallMatrixAug cinfo] -> Either cinfo () checkIdems calls = caseMaybe (headMaybe offending) (Right ()) $ Left . augCallInfo where -- Every idempotent call must have decrease, otherwise it offends us. offending = filter (not . hasDecrease) $ filter idempotent calls checkIdem :: (?cutoff :: CutOff) => CallMatrixAug cinfo -> Bool checkIdem c = if idempotent c then hasDecrease c else True -- | A call @c@ is idempotent if it is an endo (@'source' == 'target'@) -- of order 1. -- (Endo-calls of higher orders are e.g. argument permutations). -- We can test idempotency by self-composition. -- Self-composition @c >*< c@ should not make any parameter-argument relation -- worse. idempotent :: (?cutoff :: CutOff) => CallMatrixAug cinfo -> Bool idempotent (CallMatrixAug m _) = (m >*< m) `notWorse` m hasDecrease :: CallMatrixAug cinfo -> Bool hasDecrease = any isDecr . diagonal Agda-2.6.0.1/src/full/Agda/Termination/CallGraph.hs0000644000000000000000000001737513466402171017770 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImplicitParams #-} -- | Call graphs and related concepts, more or less as defined in -- \"A Predicative Analysis of Structural Recursion\" by -- Andreas Abel and Thorsten Altenkirch. -- Originally copied from Agda1 sources. module Agda.Termination.CallGraph ( -- * Calls Node , Call, mkCall, mkCall', source, target, callMatrixSet , (>*<) -- * Call graphs , CallGraph(..) , targetNodes , fromList , toList , union , insert , complete, completionStep -- , prettyBehaviour ) where import Prelude hiding (null) import qualified Data.List as List import Data.Semigroup import Data.Set (Set) import Agda.Termination.CallMatrix (CallMatrix, CallMatrixAug(..), CMSet(..), CallComb(..)) import qualified Agda.Termination.CallMatrix as CMSet import Agda.Termination.CutOff import Agda.Termination.SparseMatrix as Matrix import Agda.Utils.Favorites (Favorites) import qualified Agda.Utils.Favorites as Fav import Agda.Utils.Graph.AdjacencyMap.Unidirectional (Edge(..),Graph(..)) import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as Graph import Agda.Utils.Function import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.PartialOrd import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Singleton import Agda.Utils.Tuple ------------------------------------------------------------------------ -- Calls -- | Call graph nodes. -- -- Machine integer 'Int' is sufficient, since we cannot index more than -- we have addresses on our machine. type Node = Int -- | Calls are edges in the call graph. -- It can be labelled with several call matrices if there -- are several pathes from one function to another. type Call cinfo = Edge Node (CMSet cinfo) callMatrixSet :: Call cinfo -> CMSet cinfo callMatrixSet = label -- | Make a call with a single matrix. mkCall :: Node -> Node -> CallMatrix -> cinfo -> Call cinfo mkCall s t m cinfo = Edge s t $ singleton $ CallMatrixAug m cinfo -- | Make a call with empty @cinfo@. mkCall' :: Monoid cinfo => Node -> Node -> CallMatrix -> Call cinfo mkCall' s t m = mkCall s t m mempty ------------------------------------------------------------------------ -- Call graphs -- | A call graph is a set of calls. Every call also has some -- associated meta information, which should be 'Monoid'al so that the -- meta information for different calls can be combined when the calls -- are combined. newtype CallGraph cinfo = CallGraph { theCallGraph :: Graph Node (CMSet cinfo) } deriving (Show) -- | Returns all the nodes with incoming edges. Somewhat expensive. @O(e)@. targetNodes :: CallGraph cinfo -> Set Node targetNodes = Graph.targetNodes . theCallGraph -- | Converts a call graph to a list of calls with associated meta -- information. toList :: CallGraph cinfo -> [Call cinfo] toList = Graph.edges . theCallGraph -- | Converts a list of calls with associated meta information to a -- call graph. fromList :: [Call cinfo] -> CallGraph cinfo fromList = CallGraph . Graph.fromEdgesWith CMSet.union -- | 'null' checks whether the call graph is completely disconnected. instance Null (CallGraph cinfo) where empty = CallGraph Graph.empty null = List.all (null . label) . toList -- | Takes the union of two call graphs. union :: CallGraph cinfo -> CallGraph cinfo -> CallGraph cinfo union (CallGraph cs1) (CallGraph cs2) = CallGraph $ Graph.unionWith CMSet.union cs1 cs2 -- | 'CallGraph' is a monoid under 'union'. instance Semigroup (CallGraph cinfo) where (<>) = union instance Monoid (CallGraph cinfo) where mempty = empty mappend = (<>) -- | Inserts a call into a call graph. insert :: Node -> Node -> CallMatrix -> cinfo -> CallGraph cinfo -> CallGraph cinfo insert s t cm cinfo = CallGraph . Graph.insertEdgeWith CMSet.union e . theCallGraph where e = mkCall s t cm cinfo -- * Combination of a new thing with an old thing -- returning a really new things and updated old things. type CombineNewOldT a = a -> a -> (a, a) class CombineNewOld a where combineNewOld :: CombineNewOldT a instance PartialOrd a => CombineNewOld (Favorites a) where combineNewOld new old = (new', Fav.unionCompared (new', old')) where (new', old') = Fav.compareFavorites new old deriving instance CombineNewOld (CMSet cinfo) instance (Monoid a, CombineNewOld a, Ord n) => CombineNewOld (Graph n a) where combineNewOld new old = Graph.unzip $ Graph.unionWith comb new' old' where new' = (,mempty) <$> new old' = (mempty,) <$> old comb (new1,old1) (new2,old2) -- TODO: ensure old1 is null = mapFst (new2 `mappend`) $ combineNewOld new1 old2 -- -- | old1 == mempty = mapFst (new2 `mappend`) $ combineNewOld new1 old2 -- -- | otherwise = __IMPOSSIBLE__ -- Filter unlabelled edges from the resulting new graph. -- filt = Graph.filterEdges (not . null) -- | Call graph combination. -- -- Application of '>*<' to all pairs @(c1,c2)@ -- for which @'source' c1 = 'target' c2@.) -- GHC supports implicit-parameter constraints in instance declarations -- only from 7.4. To maintain compatibility with 7.2, we skip this instance: -- KEEP: -- instance (Monoid cinfo, ?cutoff :: CutOff) => CombineNewOld (CallGraph cinfo) where -- combineNewOld (CallGraph new) (CallGraph old) = CallGraph -*- CallGraph $ combineNewOld comb old -- -- combined calls: -- where comb = Graph.composeWith (>*<) CMSet.union new old -- Non-overloaded version: combineNewOldCallGraph :: (Monoid cinfo, ?cutoff :: CutOff) => CombineNewOldT (CallGraph cinfo) combineNewOldCallGraph (CallGraph new) (CallGraph old) = CallGraph -*- CallGraph $ combineNewOld comb old -- combined calls: where comb = Graph.composeWith (>*<) CMSet.union new old -- | Call graph comparison. -- A graph @cs'@ is ``worse'' than @cs@ if it has a new edge (call) -- or a call got worse, which means that one of its elements -- that was better or equal to 'Le' moved a step towards 'Un'. -- -- A call graph is complete if combining it with itself does not make it -- any worse. This is sound because of monotonicity: By combining a graph -- with itself, it can only get worse, but if it does not get worse after -- one such step, it gets never any worse. -- | @'complete' cs@ completes the call graph @cs@. A call graph is -- complete if it contains all indirect calls; if @f -> g@ and @g -> -- h@ are present in the graph, then @f -> h@ should also be present. complete :: (?cutoff :: CutOff) => Monoid cinfo => CallGraph cinfo -> CallGraph cinfo complete cs = repeatWhile (mapFst (not . null) . completionStep cs) cs completionStep :: (?cutoff :: CutOff) => Monoid cinfo => CallGraph cinfo -> CallGraph cinfo -> (CallGraph cinfo, CallGraph cinfo) completionStep gOrig gThis = combineNewOldCallGraph gOrig gThis ------------------------------------------------------------------------ -- * Printing ------------------------------------------------------------------------ -- | Displays the recursion behaviour corresponding to a call graph. instance Pretty cinfo => Pretty (CallGraph cinfo) where pretty = vcat . map prettyCall . toList where prettyCall e = if null (callMatrixSet e) then empty else align 20 $ [ ("Source:", text $ show $ source e) , ("Target:", text $ show $ target e) , ("Matrix:", pretty $ callMatrixSet e) ] -- -- | Displays the recursion behaviour corresponding to a call graph. -- prettyBehaviour :: Show cinfo => CallGraph cinfo -> Doc -- prettyBehaviour = vcat . map prettyCall . filter toSelf . toList -- where -- toSelf c = source c == target c -- prettyCall e = vcat $ map text -- [ "Function: " ++ show (source e) -- -- , "Behaviour: " ++ show (diagonal $ mat $ cm c) -- TODO -- -- , "Meta info: " ++ show cinfo -- ] Agda-2.6.0.1/src/full/Agda/Termination/Order.hs0000644000000000000000000002660213466402171017177 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ImplicitParams #-} -- | An Abstract domain of relative sizes, i.e., differences -- between size of formal function parameter and function argument -- in recursive call; used in the termination checker. module Agda.Termination.Order ( -- * Structural orderings Order(..), decr , increase, decrease, setUsability , (.*.) , supremum, infimum , orderSemiring , le, lt, unknown, orderMat, collapseO , nonIncreasing, decreasing, isDecr , NotWorse(..) , isOrder ) where import qualified Data.Foldable as Fold import qualified Data.List as List import Agda.Termination.CutOff import Agda.Termination.SparseMatrix as Matrix import Agda.Termination.Semiring (HasZero(..), Semiring) import qualified Agda.Termination.Semiring as Semiring import Agda.Utils.PartialOrd import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- Structural orderings -- | In the paper referred to above, there is an order R with -- @'Unknown' '<=' 'Le' '<=' 'Lt'@. -- -- This is generalized to @'Unknown' '<=' 'Decr k'@ where -- @Decr 1@ replaces @Lt@ and @Decr 0@ replaces @Le@. -- A negative decrease means an increase. The generalization -- allows the termination checker to record an increase by 1 which -- can be compensated by a following decrease by 2 which results in -- an overall decrease. -- -- However, the termination checker of the paper itself terminates because -- there are only finitely many different call-matrices. To maintain -- termination of the terminator we set a @cutoff@ point which determines -- how high the termination checker can count. This value should be -- set by a global or file-wise option. -- -- See 'Call' for more information. -- -- TODO: document orders which are call-matrices themselves. data Order = Decr !Bool {-# UNPACK #-} !Int -- ^ Decrease of callee argument wrt. caller parameter. -- -- The @Bool@ indicates whether the decrease (if any) is usable. -- In any chain, there needs to be one usable decrease. -- Unusable decreases come from SIZELT constraints which are -- not in inductive pattern match or a coinductive copattern match. -- See issue #2331. -- -- UPDATE: Andreas, 2017-07-26: -- Feature #2331 is unsound due to size quantification in terms. -- While the infrastructure for usable/unusable decrease remains in -- place, no unusable decreases are generated by TermCheck. | Unknown -- ^ No relation, infinite increase, or increase beyond termination depth. | Mat {-# UNPACK #-} !(Matrix Int Order) -- ^ Matrix-shaped order, currently UNUSED. deriving (Eq, Ord, Show) -- instance Show Order where -- show (Decr u k) = if u then show (- k) else "(" ++ show (-k) ++ ")" -- show Unknown = "." -- show (Mat m) = "Mat " ++ show m instance HasZero Order where zeroElement = Unknown -- | Information order: 'Unknown' is least information. -- The more we decrease, the more information we have. -- -- When having comparable call-matrices, we keep the lesser one. -- Call graph completion works toward losing the good calls, -- tending towards Unknown (the least information). instance PartialOrd Order where comparable o o' = case (o, o') of (Unknown, Unknown) -> POEQ (Unknown, _ ) -> POLT (_ , Unknown) -> POGT (Decr u k, Decr u' l) -> comparableBool u u' `orPO` comparableOrd k l -- Matrix-shaped orders are no longer supported (Mat{} , _ ) -> __IMPOSSIBLE__ (_ , Mat{} ) -> __IMPOSSIBLE__ where comparableBool = curry $ \case (False, True) -> POLT (True, False) -> POGT _ -> POEQ -- | A partial order, aimed at deciding whether a call graph gets -- worse during the completion. -- class NotWorse a where notWorse :: a -> a -> Bool -- | It does not get worse then ``increase''. -- If we are still decreasing, it can get worse: less decreasing. instance NotWorse Order where o `notWorse` Unknown = True -- we are unboundedly increasing Unknown `notWorse` Decr _ k = k < 0 -- we are increasing Decr u l `notWorse` Decr u' k = k < 0 -- we are increasing or || l >= k && (u || not u') -- we are decreasing, but not less, and not less usable -- Matrix-shaped orders are no longer supported Mat m `notWorse` o = __IMPOSSIBLE__ o `notWorse` Mat m = __IMPOSSIBLE__ {- Mat m `notWorse` Mat n = m `notWorse` n -- matrices are compared pointwise o `notWorse` Mat n = o `notWorse` collapse n -- or collapsed (sound?) Mat m `notWorse` o = collapse m `notWorse` o -} -- | We assume the matrices have the same dimension. instance (Ord i, HasZero o, NotWorse o) => NotWorse (Matrix i o) where m `notWorse` n | size m /= size n = __IMPOSSIBLE__ | otherwise = Fold.and $ zipMatrices onlym onlyn both trivial m n where -- If an element is only in @m@, then its 'Unknown' in @n@ -- so it gotten better at best, in any case, not worse. onlym o = True -- @== o `notWorse` Unknown@ onlyn o = zeroElement `notWorse` o both = notWorse trivial = id -- @True@ counts as zero as it is neutral for @and@ -- | Raw increase which does not cut off. increase :: Int -> Order -> Order increase i o = case o of Unknown -> Unknown Decr u k -> Decr u $ k - i -- TODO: should we set u to False if k - i < 0 ? Mat m -> Mat $ fmap (increase i) m -- | Raw decrease which does not cut off. decrease :: Int -> Order -> Order decrease i o = increase (-i) o setUsability :: Bool -> Order -> Order setUsability u o = case o of Decr _ k -> Decr u k Unknown -> o Mat{} -> o -- | Smart constructor for @Decr k :: Order@ which cuts off too big values. -- -- Possible values for @k@: @- ?cutoff '<=' k '<=' ?cutoff + 1@. decr :: (?cutoff :: CutOff) => Bool -> Int -> Order decr u k = case ?cutoff of CutOff c | k < -c -> Unknown | k > c -> Decr u $ c + 1 _ -> Decr u k -- | Smart constructor for matrix shaped orders, avoiding empty and singleton matrices. orderMat :: Matrix Int Order -> Order orderMat m | Matrix.isEmpty m = le -- 0x0 Matrix = neutral element | Just o <- isSingleton m = o -- 1x1 Matrix | otherwise = Mat m -- nxn Matrix withinCutOff :: (?cutoff :: CutOff) => Int -> Bool withinCutOff k = case ?cutoff of DontCutOff -> True CutOff c -> k >= -c && k <= c + 1 isOrder :: (?cutoff :: CutOff) => Order -> Bool isOrder (Decr _ k) = withinCutOff k isOrder Unknown = True isOrder (Mat m) = False -- TODO: extend to matrices -- | @le@, @lt@, @decreasing@, @unknown@: for backwards compatibility, and for external use. le :: Order le = Decr False 0 -- | Usable decrease. lt :: Order lt = Decr True 1 unknown :: Order unknown = Unknown nonIncreasing :: Order -> Bool nonIncreasing (Decr _ k) = k >= 0 nonIncreasing _ = False -- | Decreasing and usable? decreasing :: Order -> Bool decreasing (Decr u k) = u && k > 0 decreasing _ = False -- | Matrix-shaped order is decreasing if any diagonal element is decreasing. isDecr :: Order -> Bool isDecr (Mat m) = any isDecr $ diagonal m isDecr o = decreasing o instance Pretty Order where pretty (Decr u 0) = "=" pretty (Decr u k) = mparens (not u) $ text $ show (0 - k) pretty Unknown = "?" pretty (Mat m) = "Mat" <+> pretty m -- | Multiplication of 'Order's. -- (Corresponds to sequential composition.) -- I think this funny pattern matching is because overlapping patterns -- are producing a warning and thus an error (strict compilation settings) (.*.) :: (?cutoff :: CutOff) => Order -> Order -> Order Unknown .*. _ = Unknown (Mat m) .*. Unknown = Unknown (Decr _ k) .*. Unknown = Unknown (Decr u k) .*. (Decr u' l) = decr (u || u') (k + l) -- if one is usable, so is the composition (Decr _ 0) .*. (Mat m) = Mat m (Decr u k) .*. (Mat m) = (Decr u k) .*. (collapse m) (Mat m1) .*. (Mat m2) | okM m1 m2 = Mat $ mul orderSemiring m1 m2 | otherwise = (collapse m1) .*. (collapse m2) (Mat m) .*. (Decr _ 0) = Mat m (Mat m) .*. (Decr u k) = (collapse m) .*. (Decr u k) -- | collapse @m@ -- -- We assume that @m@ codes a permutation: each row has at most one column -- that is not @Unknown@. -- -- To collapse a matrix into a single value, we take the best value of -- each column and multiply them. That means if one column is all @Unknown@, -- i.e., no argument relates to that parameter, then the collapsed value -- is also @Unknown@. -- -- This makes order multiplication associative. collapse :: (?cutoff :: CutOff) => Matrix Int Order -> Order collapse m = case toLists $ Matrix.transpose m of [] -> __IMPOSSIBLE__ -- This can never happen if order matrices are generated by the smart constructor m' -> foldl1 (.*.) $ map (foldl1 maxO) m' collapseO :: (?cutoff :: CutOff) => Order -> Order collapseO (Mat m) = collapse m collapseO o = o -- | Can two matrices be multplied together? okM :: Matrix Int Order -> Matrix Int Order -> Bool okM m1 m2 = (rows $ size m2) == (cols $ size m1) -- | The supremum of a (possibly empty) list of 'Order's. -- More information (i.e., more decrease) is bigger. -- 'Unknown' is no information, thus, smallest. supremum :: (?cutoff :: CutOff) => [Order] -> Order supremum = foldr maxO Unknown -- | @('Order', 'maxO', '.*.')@ forms a semiring, -- with 'Unknown' as zero and 'Le' as one. maxO :: (?cutoff :: CutOff) => Order -> Order -> Order maxO o1 o2 = case (o1,o2) of -- NOTE: strictly speaking the maximum does not exists -- which is better, an unusable decrease by 2 or a usable decrease by 1? -- We give the usable information priority if it is a decrease. (Decr False _, Decr True l) | l > 0 -> o2 (Decr True k, Decr False _) | k > 0 -> o1 (Decr u k, Decr u' l) -> if l > k then o2 else o1 (Unknown, _) -> o2 (_, Unknown) -> o1 (Mat m1, Mat m2) -> Mat (Matrix.add maxO m1 m2) (Mat m, _) -> maxO (collapse m) o2 (_, Mat m) -> maxO o1 (collapse m) -- | The infimum of a (non empty) list of 'Order's. -- Gets the worst information. -- 'Unknown' is the least element, thus, dominant. infimum :: (?cutoff :: CutOff) => [Order] -> Order infimum (o:l) = List.foldl' minO o l infimum [] = __IMPOSSIBLE__ -- | Pick the worst information. minO :: (?cutoff :: CutOff) => Order -> Order -> Order minO o1 o2 = case (o1,o2) of (Unknown, _) -> Unknown (_, Unknown) -> Unknown -- different usability: -- We pick the unusable one if it is not a decrease or -- decreases not more than the usable one. (Decr False k, Decr True l) -> if k <= 0 || k <= l then o1 else o2 (Decr True k, Decr False l) -> if l <= 0 || l <= k then o2 else o1 -- same usability: (Decr u k, Decr _ l) -> Decr u (min k l) (Mat m1, Mat m2) | size m1 == size m2 -> Mat $ Matrix.intersectWith minO m1 m2 | otherwise -> minO (collapse m1) (collapse m2) (Mat m1, _) -> minO (collapse m1) o2 (_, Mat m2) -> minO o1 (collapse m2) -- | We use a record for semiring instead of a type class -- since implicit arguments cannot occur in instance constraints, -- like @instance (?cutoff :: Int) => SemiRing Order@. orderSemiring :: (?cutoff :: CutOff) => Semiring Order orderSemiring = Semiring.Semiring { Semiring.add = maxO , Semiring.mul = (.*.) , Semiring.zero = Unknown -- , Semiring.one = Le } Agda-2.6.0.1/src/full/Agda/Termination/Monad.hs0000644000000000000000000005400313466402171017156 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | The monad for the termination checker. -- -- The termination monad @TerM@ is an extension of -- the type checking monad 'TCM' by an environment -- with information needed by the termination checker. module Agda.Termination.Monad where import Prelude hiding (null) import Control.Applicative hiding (empty) #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.Reader import Control.Monad.State import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Data.Monoid ( Monoid(..) ) import Data.Semigroup ( Semigroup(..) ) import Agda.Interaction.Options import Agda.Syntax.Abstract (IsProjP(..), AllNames) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Literal import Agda.Syntax.Position (noRange) import Agda.Termination.CutOff import Agda.Termination.Order (Order,le,unknown) import Agda.Termination.RecCheck (anyDefs) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Benchmark import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Monoid import Agda.Utils.Null import Agda.Utils.Pretty (Pretty, prettyShow) import qualified Agda.Utils.Pretty as P import Agda.Utils.VarSet (VarSet) import qualified Agda.Utils.VarSet as VarSet #include "undefined.h" import Agda.Utils.Impossible -- | The mutual block we are checking. -- -- The functions are numbered according to their order of appearance -- in this list. type MutualNames = [QName] -- | The target of the function we are checking. type Target = QName -- | The current guardedness level. type Guarded = Order -- | The termination environment. data TerEnv = TerEnv -- First part: options, configuration. { terUseDotPatterns :: Bool -- ^ Are we mining dot patterns to find evindence of structal descent? , terInlineWithFunctions :: Bool -- ^ Do we inline with functions to enhance termination checking of with? , terSizeSuc :: Maybe QName -- ^ The name of size successor, if any. , terSharp :: Maybe QName -- ^ The name of the delay constructor (sharp), if any. , terCutOff :: CutOff -- ^ Depth at which to cut off the structural order. -- Second part: accumulated info during descent into decls./term. , terCurrent :: QName -- ^ The name of the function we are currently checking. , terMutual :: MutualNames -- ^ The names of the functions in the mutual block we are checking. -- This includes the internally generated functions -- (with, extendedlambda, coinduction). , terUserNames :: [QName] -- ^ The list of name actually appearing in the file (abstract syntax). -- Excludes the internally generated functions. , terHaveInlinedWith :: Bool -- ^ Does the actual clause result from with-inlining? -- (If yes, it may be ill-typed.) , terTarget :: Maybe Target -- ^ Target type of the function we are currently termination checking. -- Only the constructors of 'Target' are considered guarding. , terDelayed :: Delayed -- ^ Are we checking a delayed definition? , terMaskArgs :: [Bool] -- ^ Only consider the 'notMasked' 'False' arguments for establishing termination. -- See issue #1023. , terMaskResult :: Bool -- ^ Only consider guardedness if 'False' (not masked). , _terSizeDepth :: Int -- lazy by intention! -- ^ How many @SIZELT@ relations do we have in the context -- (= clause telescope). Used to approximate termination -- for metas in call args. , terPatterns :: MaskedDeBruijnPatterns -- ^ The patterns of the clause we are checking. , terPatternsRaise :: !Int -- ^ Number of additional binders we have gone under -- (and consequently need to raise the patterns to compare to terms). -- Updated during call graph extraction, hence strict. , terGuarded :: !Guarded -- ^ The current guardedness status. Changes as we go deeper into the term. -- Updated during call graph extraction, hence strict. , terUseSizeLt :: Bool -- ^ When extracting usable size variables during construction of the call -- matrix, can we take the variable for use with SIZELT constraints from the context? -- Yes, if we are under an inductive constructor. -- No, if we are under a record constructor. -- (See issue #1015). , terUsableVars :: VarSet -- ^ Pattern variables that can be compared to argument variables using SIZELT. } -- | An empty termination environment. -- -- Values are set to a safe default meaning that with these -- initial values the termination checker will not miss -- termination errors it would have seen with better settings -- of these values. -- -- Values that do not have a safe default are set to -- @IMPOSSIBLE@. -- Note: Do not write @__IMPOSSIBLE__@ in the haddock comment above -- since it will be expanded by the CPP, leading to a haddock parse error. defaultTerEnv :: TerEnv defaultTerEnv = TerEnv { terUseDotPatterns = False -- must be False initially! , terInlineWithFunctions = True , terSizeSuc = Nothing , terSharp = Nothing , terCutOff = defaultCutOff , terUserNames = __IMPOSSIBLE__ -- needs to be set! , terMutual = __IMPOSSIBLE__ -- needs to be set! , terCurrent = __IMPOSSIBLE__ -- needs to be set! , terHaveInlinedWith = False , terTarget = Nothing , terDelayed = NotDelayed , terMaskArgs = repeat False -- use all arguments (mask none) , terMaskResult = False -- use result (do not mask) , _terSizeDepth = __IMPOSSIBLE__ -- needs to be set! , terPatterns = __IMPOSSIBLE__ -- needs to be set! , terPatternsRaise = 0 , terGuarded = le -- not initially guarded , terUseSizeLt = False -- initially, not under data constructor , terUsableVars = VarSet.empty } -- | Termination monad service class. class (Functor m, Monad m) => MonadTer m where terAsk :: m TerEnv terLocal :: (TerEnv -> TerEnv) -> m a -> m a terAsks :: (TerEnv -> a) -> m a terAsks f = f <$> terAsk -- | Termination monad. newtype TerM a = TerM { terM :: ReaderT TerEnv TCM a } deriving ( Functor , Applicative , Monad #if __GLASGOW_HASKELL__ >= 800 , Fail.MonadFail #endif , MonadError TCErr , MonadBench Phase , HasOptions , MonadDebug , HasConstInfo , MonadIO , MonadTCEnv , MonadTCState , MonadTCM , ReadTCState , MonadReduce ) instance MonadTer TerM where terAsk = TerM $ ask terLocal f = TerM . local f . terM -- | Generic run method for termination monad. runTer :: TerEnv -> TerM a -> TCM a runTer tenv (TerM m) = runReaderT m tenv -- | Run TerM computation in default environment (created from options). runTerDefault :: TerM a -> TCM a runTerDefault cont = do -- Assemble then initial configuration of the termination environment. cutoff <- optTerminationDepth <$> pragmaOptions -- Get the name of size suc (if sized types are enabled) suc <- sizeSucName -- The name of sharp (if available). sharp <- fmap nameOfSharp <$> coinductionKit -- Andreas, 2014-08-28 -- We do not inline with functions if --without-K. inlineWithFunctions <- not <$> withoutKOption let tenv = defaultTerEnv { terInlineWithFunctions = inlineWithFunctions , terSizeSuc = suc , terSharp = sharp , terCutOff = cutoff } runTer tenv cont -- -- * Termination monad is a 'MonadTCM'. -- instance MonadError TCErr TerM where -- throwError = liftTCM . throwError -- catchError m handler = TerM $ ReaderT $ \ tenv -> do -- runTer tenv m `catchError` (\ err -> runTer tenv $ handler err) instance Semigroup m => Semigroup (TerM m) where (<>) = liftA2 (<>) instance (Semigroup m, Monoid m) => Monoid (TerM m) where mempty = pure mempty mappend = (<>) mconcat = mconcat <.> sequence -- * Modifiers and accessors for the termination environment in the monad. terGetInlineWithFunctions :: TerM Bool terGetInlineWithFunctions = terAsks terInlineWithFunctions terGetUseDotPatterns :: TerM Bool terGetUseDotPatterns = terAsks terUseDotPatterns terSetUseDotPatterns :: Bool -> TerM a -> TerM a terSetUseDotPatterns b = terLocal $ \ e -> e { terUseDotPatterns = b } terGetSizeSuc :: TerM (Maybe QName) terGetSizeSuc = terAsks terSizeSuc terGetCurrent :: TerM QName terGetCurrent = terAsks terCurrent terSetCurrent :: QName -> TerM a -> TerM a terSetCurrent q = terLocal $ \ e -> e { terCurrent = q } terGetSharp :: TerM (Maybe QName) terGetSharp = terAsks terSharp terGetCutOff :: TerM CutOff terGetCutOff = terAsks terCutOff terGetMutual :: TerM MutualNames terGetMutual = terAsks terMutual terGetUserNames :: TerM [QName] terGetUserNames = terAsks terUserNames terGetTarget :: TerM (Maybe Target) terGetTarget = terAsks terTarget terSetTarget :: Maybe Target -> TerM a -> TerM a terSetTarget t = terLocal $ \ e -> e { terTarget = t } terGetHaveInlinedWith :: TerM Bool terGetHaveInlinedWith = terAsks terHaveInlinedWith terSetHaveInlinedWith :: TerM a -> TerM a terSetHaveInlinedWith = terLocal $ \ e -> e { terHaveInlinedWith = True } terGetDelayed :: TerM Delayed terGetDelayed = terAsks terDelayed terSetDelayed :: Delayed -> TerM a -> TerM a terSetDelayed b = terLocal $ \ e -> e { terDelayed = b } terGetMaskArgs :: TerM [Bool] terGetMaskArgs = terAsks terMaskArgs terSetMaskArgs :: [Bool] -> TerM a -> TerM a terSetMaskArgs b = terLocal $ \ e -> e { terMaskArgs = b } terGetMaskResult :: TerM Bool terGetMaskResult = terAsks terMaskResult terSetMaskResult :: Bool -> TerM a -> TerM a terSetMaskResult b = terLocal $ \ e -> e { terMaskResult = b } terGetPatterns :: TerM (MaskedDeBruijnPatterns) terGetPatterns = do n <- terAsks terPatternsRaise mps <- terAsks terPatterns return $ if n == 0 then mps else map (fmap (raise n)) mps terSetPatterns :: MaskedDeBruijnPatterns -> TerM a -> TerM a terSetPatterns ps = terLocal $ \ e -> e { terPatterns = ps } terRaise :: TerM a -> TerM a terRaise = terLocal $ \ e -> e { terPatternsRaise = terPatternsRaise e + 1 } terGetGuarded :: TerM Guarded terGetGuarded = terAsks terGuarded terModifyGuarded :: (Order -> Order) -> TerM a -> TerM a terModifyGuarded f = terLocal $ \ e -> e { terGuarded = f $ terGuarded e } terSetGuarded :: Order -> TerM a -> TerM a terSetGuarded = terModifyGuarded . const terUnguarded :: TerM a -> TerM a terUnguarded = terSetGuarded unknown -- | Lens for '_terSizeDepth'. terSizeDepth :: Lens' Int TerEnv terSizeDepth f e = f (_terSizeDepth e) <&> \ i -> e { _terSizeDepth = i } -- | Lens for 'terUsableVars'. terGetUsableVars :: TerM VarSet terGetUsableVars = terAsks terUsableVars terModifyUsableVars :: (VarSet -> VarSet) -> TerM a -> TerM a terModifyUsableVars f = terLocal $ \ e -> e { terUsableVars = f $ terUsableVars e } terSetUsableVars :: VarSet -> TerM a -> TerM a terSetUsableVars = terModifyUsableVars . const -- | Lens for 'terUseSizeLt'. terGetUseSizeLt :: TerM Bool terGetUseSizeLt = terAsks terUseSizeLt terModifyUseSizeLt :: (Bool -> Bool) -> TerM a -> TerM a terModifyUseSizeLt f = terLocal $ \ e -> e { terUseSizeLt = f $ terUseSizeLt e } terSetUseSizeLt :: Bool -> TerM a -> TerM a terSetUseSizeLt = terModifyUseSizeLt . const -- | Compute usable vars from patterns and run subcomputation. withUsableVars :: UsableSizeVars a => a -> TerM b -> TerM b withUsableVars pats m = do vars <- usableSizeVars pats reportSLn "term.size" 70 $ "usableSizeVars = " ++ show vars reportSDoc "term.size" 20 $ if null vars then "no usuable size vars" else "the size variables amoung these variables are usable: " <+> sep (map (prettyTCM . var) $ VarSet.toList vars) terSetUsableVars vars $ m -- | Set 'terUseSizeLt' when going under constructor @c@. conUseSizeLt :: QName -> TerM a -> TerM a conUseSizeLt c m = do caseMaybeM (liftTCM $ isRecordConstructor c) (terSetUseSizeLt True m) (const $ terSetUseSizeLt False m) -- | Set 'terUseSizeLt' for arguments following projection @q@. -- We disregard j TerM a -> TerM a projUseSizeLt q m = do co <- isCoinductiveProjection False q reportSLn "term.size" 20 $ applyUnless co ("not " ++) $ "using SIZELT vars after projection " ++ prettyShow q terSetUseSizeLt co m -- | For termination checking purposes flat should not be considered a -- projection. That is, it flat doesn't preserve either structural order -- or guardedness like other projections do. -- Andreas, 2012-06-09: the same applies to projections of recursive records. isProjectionButNotCoinductive :: MonadTCM tcm => QName -> tcm Bool isProjectionButNotCoinductive qn = liftTCM $ do b <- isProjectionButNotCoinductive' qn reportSDoc "term.proj" 60 $ do "identifier" <+> prettyTCM qn <+> do text $ if b then "is an inductive projection" else "is either not a projection or coinductive" return b where isProjectionButNotCoinductive' qn = do flat <- fmap nameOfFlat <$> coinductionKit if Just qn == flat then return False else do mp <- isProjection qn case mp of Just Projection{ projProper = Just{}, projFromType = t } -> isInductiveRecord (unArg t) _ -> return False -- | Check whether a projection belongs to a coinductive record -- and is actually recursive. -- E.g. -- @ -- isCoinductiveProjection (Stream.head) = return False -- -- isCoinductiveProjection (Stream.tail) = return True -- @ isCoinductiveProjection :: MonadTCM tcm => Bool -> QName -> tcm Bool isCoinductiveProjection mustBeRecursive q = liftTCM $ do reportSLn "term.guardedness" 40 $ "checking isCoinductiveProjection " ++ prettyShow q flat <- fmap nameOfFlat <$> coinductionKit -- yes for ♭ if Just q == flat then return True else do pdef <- getConstInfo q case isProjection_ (theDef pdef) of Just Projection{ projProper = Just{}, projFromType = Arg _ r, projIndex = n } -> caseMaybeM (isRecord r) __IMPOSSIBLE__ $ \ rdef -> do -- no for inductive or non-recursive record if recInduction rdef /= Just CoInductive then return False else do reportSLn "term.guardedness" 40 $ prettyShow q ++ " is coinductive; record type is " ++ prettyShow r if not mustBeRecursive then return True else do reportSLn "term.guardedness" 40 $ prettyShow q ++ " must be recursive" if not (safeRecRecursive rdef) then return False else do reportSLn "term.guardedness" 40 $ prettyShow q ++ " has been declared recursive, doing actual check now..." -- TODO: the following test for recursiveness of a projection should be cached. -- E.g., it could be stored in the @Projection@ component. -- Now check if type of field mentions mutually recursive symbol. -- Get the type of the field by dropping record parameters and record argument. let TelV tel core = telView' (defType pdef) (pars, tel') = splitAt n $ telToList tel mut = fromMaybe __IMPOSSIBLE__ $ recMutual rdef -- Check if any recursive symbols appear in the record type. -- Q (2014-07-01): Should we normalize the type? -- A (2017-01-13): Yes, since we also normalize during positivity check? -- See issue #1899. reportSDoc "term.guardedness" 40 $ inTopContext $ sep [ "looking for recursive occurrences of" , sep (map prettyTCM mut) , "in" , addContext pars $ prettyTCM (telFromList tel') , "and" , addContext tel $ prettyTCM core ] when (null mut) __IMPOSSIBLE__ names <- anyDefs mut =<< normalise (map (snd . unDom) tel', core) reportSDoc "term.guardedness" 40 $ "found" <+> if null names then "none" else sep (map prettyTCM names) return $ not $ null names _ -> do reportSLn "term.guardedness" 40 $ prettyShow q ++ " is not a proper projection" return False where -- Andreas, 2018-02-24, issue #2975, example: -- @ -- record R : Set where -- coinductive -- field force : R -- r : R -- force r = r -- @ -- The termination checker expects the positivity checker to have run on the -- record declaration R to know whether R is recursive. -- However, here, because the awkward processing of record declarations (see #434), -- that has not happened. To avoid crashing (as in Agda 2.5.3), -- we rather give the possibly wrong answer here, -- restoring the behavior of Agda 2.5.2. TODO: fix record declaration checking. safeRecRecursive :: Defn -> Bool safeRecRecursive (Record { recMutual = Just qs }) = not $ null qs safeRecRecursive _ = False -- * De Bruijn pattern stuff -- | How long is the path to the deepest atomic pattern? patternDepth :: forall a. Pattern' a -> Int patternDepth = getMaxNat . foldrPattern depth where depth :: Pattern' a -> MaxNat -> MaxNat depth ConP{} = succ -- add 1 to the maximum of the depth of the subpatterns depth _ = id -- atomic pattern (leaf) has depth 0 -- | A dummy pattern used to mask a pattern that cannot be used -- for structural descent. unusedVar :: DeBruijnPattern unusedVar = LitP (LitString noRange "term.unused.pat.var") -- | Extract variables from 'DeBruijnPattern's that could witness a decrease -- via a SIZELT constraint. -- -- These variables must be under an inductive constructor (with no record -- constructor in the way), or after a coinductive projection (with no -- inductive one in the way). class UsableSizeVars a where usableSizeVars :: a -> TerM VarSet instance UsableSizeVars DeBruijnPattern where usableSizeVars = foldrPattern $ \case VarP _ x -> const $ ifM terGetUseSizeLt (return $ VarSet.singleton $ dbPatVarIndex x) $ {-else-} return mempty ConP c _ _ -> conUseSizeLt $ conName c LitP{} -> none DotP{} -> none ProjP{} -> none IApplyP{} -> none DefP{} -> none where none _ = return mempty instance UsableSizeVars [DeBruijnPattern] where usableSizeVars ps = case ps of [] -> return mempty (ProjP _ q : ps) -> projUseSizeLt q $ usableSizeVars ps (p : ps) -> mappend <$> usableSizeVars p <*> usableSizeVars ps instance UsableSizeVars (Masked DeBruijnPattern) where usableSizeVars (Masked m p) = (`foldrPattern` p) $ \case VarP _ x -> const $ ifM terGetUseSizeLt (return $ VarSet.singleton $ dbPatVarIndex x) $ {-else-} return mempty ConP c _ _ -> if m then none else conUseSizeLt $ conName c LitP{} -> none DotP{} -> none ProjP{} -> none IApplyP{} -> none DefP{} -> none where none _ = return mempty instance UsableSizeVars MaskedDeBruijnPatterns where usableSizeVars ps = case ps of [] -> return mempty (Masked _ (ProjP _ q) : ps) -> projUseSizeLt q $ usableSizeVars ps (p : ps) -> mappend <$> usableSizeVars p <*> usableSizeVars ps -- * Masked patterns (which are not eligible for structural descent, only for size descent) -- See issue #1023. type MaskedDeBruijnPatterns = [Masked DeBruijnPattern] data Masked a = Masked { getMask :: Bool -- ^ True if thing not eligible for structural descent. , getMasked :: a -- ^ Thing. } deriving (Eq, Ord, Show, Functor, Foldable, Traversable) masked :: a -> Masked a masked = Masked True notMasked :: a -> Masked a notMasked = Masked False instance Decoration Masked where traverseF f (Masked m a) = Masked m <$> f a -- | Print masked things in double parentheses. instance PrettyTCM a => PrettyTCM (Masked a) where prettyTCM (Masked m a) = applyWhen m (parens . parens) $ prettyTCM a -- * Call pathes -- | The call information is stored as free monoid -- over 'CallInfo'. As long as we never look at it, -- only accumulate it, it does not matter whether we use -- 'Set', (nub) list, or 'Tree'. -- Internally, due to lazyness, it is anyway a binary tree of -- 'mappend' nodes and singleton leafs. -- Since we define no order on 'CallInfo' (expensive), -- we cannot use a 'Set' or nub list. -- Performance-wise, I could not see a difference between Set and list. newtype CallPath = CallPath { callInfos :: [CallInfo] } deriving (Show, Semigroup, Monoid, AllNames) -- | Only show intermediate nodes. (Drop last 'CallInfo'). instance Pretty CallPath where pretty (CallPath cis0) = if null cis then empty else P.hsep (map (\ ci -> arrow P.<+> P.pretty ci) cis) P.<+> arrow where cis = init cis0 arrow = "-->" -- * Size depth estimation -- | A very crude way of estimating the @SIZELT@ chains -- @i > j > k@ in context. Returns 3 in this case. -- Overapproximates. -- TODO: more precise analysis, constructing a tree -- of relations between size variables. terSetSizeDepth :: Telescope -> TerM a -> TerM a terSetSizeDepth tel cont = do n <- liftTCM $ sum <$> do forM (telToList tel) $ \ dom -> do a <- reduce $ snd $ unDom dom ifM (isJust <$> isSizeType a) (return 1) {- else -} $ case unEl a of MetaV{} -> return 1 _ -> return 0 terLocal (set terSizeDepth n) cont Agda-2.6.0.1/src/full/Agda/Termination/CutOff.hs0000644000000000000000000000111513466402171017302 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Defines 'CutOff' type which is used in "Agda.Interaction.Options". -- This module's purpose is to eliminate the dependency of -- "Agda.TypeChecking.Monad.Base" on the termination checker and -- everything it imports. module Agda.Termination.CutOff where -- | Cut off structural order comparison at some depth in termination checker? data CutOff = CutOff Int -- ^ @c >= 0@ means: record decrease up to including @c+1@. | DontCutOff deriving (Eq , Ord) instance Show CutOff where show (CutOff k) = show k show DontCutOff = "∞" -- That's it! Agda-2.6.0.1/src/full/Agda/Utils/0000755000000000000000000000000013466402171014371 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/BiMap.hs0000644000000000000000000000417113466402171015720 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Finite bijections (implemented as a pair of tree maps). module Agda.Utils.BiMap where import Prelude hiding (lookup, unzip) import Control.Applicative ((<*>)) import Data.Function import Data.Functor import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Tuple -- | Finite bijective map from @a@ to @b@. There, and back again. data BiMap a b = BiMap { biMapThere :: Map a b , biMapBack :: Map b a } -- | Lookup. O(log n). lookup :: Ord a => a -> BiMap a b -> Maybe b lookup a = Map.lookup a . biMapThere -- | Inverse lookup. O(log n). invLookup :: Ord b => b -> BiMap a b -> Maybe a invLookup b = Map.lookup b . biMapBack -- | Empty bimap. O(1). empty :: BiMap a b empty = BiMap Map.empty Map.empty -- | Singleton bimap. O(1). singleton :: a -> b -> BiMap a b singleton a b = BiMap (Map.singleton a b) (Map.singleton b a) -- | Insert. Overwrites existing value if present. O(Map.insert). insert :: (Ord a, Ord b) => a -> b -> BiMap a b -> BiMap a b insert a b (BiMap t u) = BiMap (Map.insert a b t) (Map.insert b a u) -- | Left-biased Union. O(Map.union). union :: (Ord a, Ord b) => BiMap a b -> BiMap a b -> BiMap a b union (BiMap t1 b1) (BiMap t2 b2) = BiMap (Map.union t1 t2) (Map.union b1 b2) -- | Construct from a list of pairs. -- -- Does not check for actual bijectivity of constructed finite map. O(n log n) fromList :: (Ord a, Ord b) => [(a,b)] -> BiMap a b fromList = List.foldl' (flip (uncurry insert)) empty -- | Turn into list, sorted ascendingly by first value. O(Map.toList) toList :: BiMap a b -> [(a,b)] toList = Map.toAscList . biMapThere ------------------------------------------------------------------------ -- Instances ------------------------------------------------------------------------ instance (Ord a, Ord b) => Eq (BiMap a b) where (==) = (==) `on` biMapThere instance (Ord a, Ord b) => Ord (BiMap a b) where compare = compare `on` biMapThere instance (Show a, Show b) => Show (BiMap a b) where show bimap = "Agda.Utils.BiMap.fromList " ++ show (toList bimap) Agda-2.6.0.1/src/full/Agda/Utils/Maybe.hs0000644000000000000000000000663513466402171015774 0ustar0000000000000000-- | Extend 'Data.Maybe' by common operations for the 'Maybe' type. -- -- Note: since this module is usually imported unqualified, -- we do not use short names, but all names contain 'Maybe', -- 'Just', or 'Nothing. module Agda.Utils.Maybe ( module Agda.Utils.Maybe , module Data.Maybe ) where import Control.Monad import Control.Monad.Trans.Maybe import Data.Maybe import Data.Functor -- * Conversion. -- | Retain object when tag is 'True'. boolToMaybe :: Bool -> a -> Maybe a boolToMaybe b x = if b then Just x else Nothing -- * Collection operations. -- | @unionWith@ for collections of size <= 1. unionMaybeWith :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a unionMaybeWith f Nothing mb = mb unionMaybeWith f ma Nothing = ma unionMaybeWith f (Just a) (Just b) = Just $ f a b -- | Unzipping a list of length <= 1. unzipMaybe :: Maybe (a,b) -> (Maybe a, Maybe b) unzipMaybe Nothing = (Nothing, Nothing) unzipMaybe (Just (a,b)) = (Just a, Just b) -- | Filtering a singleton list. -- -- @filterMaybe p a = 'listToMaybe' ('filter' p [a])@ filterMaybe :: (a -> Bool) -> a -> Maybe a filterMaybe p a | p a = Just a | otherwise = Nothing -- * Conditionals and loops. -- | Version of 'mapMaybe' with different argument ordering. forMaybe :: [a] -> (a -> Maybe b) -> [b] forMaybe = flip mapMaybe -- | Version of 'maybe' with different argument ordering. -- Often, we want to case on a 'Maybe', do something interesting -- in the 'Just' case, but only a default action in the 'Nothing' -- case. Then, the argument ordering of @caseMaybe@ is preferable. -- -- @caseMaybe m d f = flip (maybe d) m f@ caseMaybe :: Maybe a -> b -> (a -> b) -> b caseMaybe m d f = maybe d f m -- | 'caseMaybe' with flipped branches. ifJust :: Maybe a -> (a -> b) -> b -> b ifJust m f d = maybe d f m -- * Monads and Maybe. -- | Monadic version of 'maybe'. maybeM :: Monad m => m b -> (a -> m b) -> m (Maybe a) -> m b maybeM n j mm = maybe n j =<< mm -- | Monadic version of 'fromMaybe'. fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a fromMaybeM m mm = maybeM m return mm -- | Monadic version of 'caseMaybe'. -- That is, 'maybeM' with a different argument ordering. caseMaybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b caseMaybeM mm d f = maybeM d f mm -- | 'caseMaybeM' with flipped branches. ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m b ifJustM mm = flip (caseMaybeM mm) -- | A more telling name for 'Traversable.forM_' for the 'Maybe' collection type. -- Or: 'caseMaybe' without the 'Nothing' case. whenJust :: Monad m => Maybe a -> (a -> m ()) -> m () whenJust m k = caseMaybe m (return ()) k -- | 'caseMaybe' without the 'Just' case. whenNothing :: Monad m => Maybe a -> m () -> m () whenNothing m d = caseMaybe m d (\_ -> return ()) -- | 'caseMaybeM' without the 'Nothing' case. whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m () whenJustM c m = c >>= (`whenJust` m) -- | 'caseMaybeM' without the 'Just' case. whenNothingM :: Monad m => m (Maybe a) -> m () -> m () whenNothingM mm d = mm >>= (`whenNothing` d) -- | Lazy version of @allJust <.> sequence@. -- (@allJust = mapM@ for the @Maybe@ monad.) -- Only executes monadic effect while @isJust@. allJustM :: Monad m => [m (Maybe a)] -> m (Maybe [a]) allJustM = runMaybeT . mapM MaybeT -- allJustM [] = return $ Just [] -- allJustM (mm : mms) = caseMaybeM mm (return Nothing) $ \ a -> -- fmap (a:) <$> allJust mms Agda-2.6.0.1/src/full/Agda/Utils/Trie.hs0000644000000000000000000001325613466402171015637 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Strict tries (based on "Data.Map.Strict" and "Agda.Utils.Maybe.Strict"). module Agda.Utils.Trie ( Trie(..) , empty, singleton, everyPrefix, insert, insertWith, union, unionWith , adjust, delete , toList, toAscList, toListOrderedBy , lookup, member, lookupPath, lookupTrie , mapSubTries, filter , valueAt ) where import Prelude hiding (null, lookup, filter) import qualified Prelude import Control.Monad import Data.Function import Data.Functor import Data.Foldable (Foldable) import qualified Data.Maybe as Lazy import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Monoid import qualified Data.List as List import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Null import Agda.Utils.Lens -- | Finite map from @[k]@ to @v@. -- -- With the strict 'Maybe' type, 'Trie' is also strict in 'v'. data Trie k v = Trie !(Strict.Maybe v) !(Map k (Trie k v)) deriving ( Show , Eq , Functor , Foldable ) -- | Empty trie. instance Null (Trie k v) where empty = Trie Strict.Nothing Map.empty null (Trie v t) = null v && null t -- | Helper function used to implement 'singleton' and 'everyPrefix'. singletonOrEveryPrefix :: Bool -> [k] -> v -> Trie k v singletonOrEveryPrefix _ [] !v = Trie (Strict.Just v) Map.empty singletonOrEveryPrefix everyPrefix (x : xs) !v = Trie (if everyPrefix then Strict.Just v else Strict.Nothing) (Map.singleton x (singletonOrEveryPrefix everyPrefix xs v)) -- | Singleton trie. singleton :: [k] -> v -> Trie k v singleton = singletonOrEveryPrefix False -- | @everyPrefix k v@ is a trie where every prefix of @k@ (including -- @k@ itself) is mapped to @v@. everyPrefix :: [k] -> v -> Trie k v everyPrefix = singletonOrEveryPrefix True -- | Left biased union. -- -- @union = unionWith (\ new old -> new)@. union :: (Ord k) => Trie k v -> Trie k v -> Trie k v union = unionWith const -- | Pointwise union with merge function for values. unionWith :: (Ord k) => (v -> v -> v) -> Trie k v -> Trie k v -> Trie k v unionWith f (Trie v ss) (Trie w ts) = Trie (Strict.unionMaybeWith f v w) (Map.unionWith (unionWith f) ss ts) -- | Insert. Overwrites existing value if present. -- -- @insert = insertWith (\ new old -> new)@ insert :: (Ord k) => [k] -> v -> Trie k v -> Trie k v insert k v t = union (singleton k v) t -- | Insert with function merging new value with old value. insertWith :: (Ord k) => (v -> v -> v) -> [k] -> v -> Trie k v -> Trie k v insertWith f k v t = unionWith f (singleton k v) t -- | Delete value at key, but leave subtree intact. delete :: Ord k => [k] -> Trie k v -> Trie k v delete path = adjust path (const Strict.Nothing) -- | Adjust value at key, leave subtree intact. adjust :: Ord k => [k] -> (Strict.Maybe v -> Strict.Maybe v) -> Trie k v -> Trie k v adjust path f t@(Trie v ts) = case path of -- case: found the value we want to adjust: adjust it! [] -> Trie (f v) ts -- case: found the subtrie matching the first key: adjust recursively k : ks | Just s <- Map.lookup k ts -> Trie v $ Map.insert k (adjust ks f s) ts -- case: subtrie not found: leave trie untouched _ -> t -- | Convert to ascending list. toList :: Ord k => Trie k v -> [([k],v)] toList = toAscList -- | Convert to ascending list. toAscList :: Ord k => Trie k v -> [([k],v)] toAscList (Trie mv ts) = Strict.maybeToList (([],) <$> mv) ++ [ (k:ks, v) | (k, t) <- Map.toAscList ts , (ks, v) <- toAscList t ] -- | Convert to list where nodes at the same level are ordered according to the -- given ordering. toListOrderedBy :: Ord k => (v -> v -> Ordering) -> Trie k v -> [([k], v)] toListOrderedBy cmp (Trie mv ts) = Strict.maybeToList (([],) <$> mv) ++ [ (k : ks, v) | (k, t) <- List.sortBy (cmp' `on` val . snd) $ Map.toAscList ts, (ks, v) <- toListOrderedBy cmp t ] where cmp' Strict.Nothing Strict.Just{} = LT cmp' Strict.Just{} Strict.Nothing = GT cmp' Strict.Nothing Strict.Nothing = EQ cmp' (Strict.Just x) (Strict.Just y) = cmp x y val (Trie mv _) = mv -- | Create new values based on the entire subtrie. Almost, but not quite -- comonad extend. mapSubTries :: Ord k => (Trie k u -> Maybe v) -> Trie k u -> Trie k v mapSubTries f t@(Trie mv ts) = Trie (Strict.toStrict (f t)) (fmap (mapSubTries f) ts) -- | Returns the value associated with the given key, if any. lookup :: Ord k => [k] -> Trie k v -> Maybe v lookup [] (Trie v _) = Strict.toLazy v lookup (k : ks) (Trie _ ts) = case Map.lookup k ts of Nothing -> Nothing Just t -> lookup ks t -- | Is the given key present in the trie? member :: Ord k => [k] -> Trie k v -> Bool member ks t = Lazy.isJust (lookup ks t) -- | Collect all values along a given path. lookupPath :: Ord k => [k] -> Trie k v -> [v] lookupPath xs (Trie v cs) = case xs of [] -> Strict.maybeToList v x : xs -> Strict.maybeToList v ++ maybe [] (lookupPath xs) (Map.lookup x cs) -- | Get the subtrie rooted at the given key. lookupTrie :: Ord k => [k] -> Trie k v -> Trie k v lookupTrie [] t = t lookupTrie (k : ks) (Trie _ cs) = maybe empty (lookupTrie ks) (Map.lookup k cs) -- | Filter a trie. filter :: Ord k => (v -> Bool) -> Trie k v -> Trie k v filter p (Trie mv ts) = Trie mv' (Map.filter (not . null) $ filter p <$> ts) where mv' = case mv of Strict.Just v | p v -> mv _ -> Strict.Nothing -- | Key lens. valueAt :: Ord k => [k] -> Lens' (Maybe v) (Trie k v) valueAt path f t = f (lookup path t) <&> \ case Nothing -> delete path t Just v -> insert path v t Agda-2.6.0.1/src/full/Agda/Utils/Cluster.hs0000644000000000000000000000303013466402171016342 0ustar0000000000000000 -- | Create clusters of non-overlapping things. module Agda.Utils.Cluster ( C , cluster , cluster' ) where import Control.Monad -- An imperative union-find library: import Data.Equivalence.Monad (runEquivM, equateAll, classDesc) import Data.Char import Data.Functor import qualified Data.IntMap as IntMap import Data.Semigroup import Agda.Utils.Functor import Agda.Utils.NonemptyList import Agda.Utils.Singleton -- | Characteristic identifiers. type C = Int -- | Given a function @f :: a -> NonemptyList C@ which returns a non-empty list of -- characteristics @C@ of @a@, partition a list of @a@s into groups -- such that each element in a group shares at least one characteristic -- with at least one other element of the group. cluster :: (a -> NonemptyList C) -> [a] -> [NonemptyList a] cluster f as = cluster' $ map (\ a -> (a, f a)) as -- | Partition a list of @a@s paired with a non-empty list of -- characteristics @C@ into groups -- such that each element in a group shares at least one characteristic -- with at least one other element of the group. cluster' :: [(a, NonemptyList C)] -> [NonemptyList a] cluster' acs = runEquivM id const $ do -- Construct the equivalence classes of characteristics. forM_ acs $ \ (_, c :! cs) -> equateAll $ c:cs -- Pair each element with its class. cas <- forM acs $ \ (a, c :! _) -> classDesc c <&> \ k -> IntMap.singleton k (singleton a) -- Create a map from class to elements. let m = IntMap.unionsWith (<>) cas -- Return the values of the map return $ IntMap.elems m Agda-2.6.0.1/src/full/Agda/Utils/Singleton.hs0000644000000000000000000000444113466402171016672 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- {-# LANGUAGE TypeFamilies #-} -- | Constructing singleton collections. module Agda.Utils.Singleton where import Data.Monoid (Endo(..)) import Data.Hashable (Hashable) import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Map (Map) import qualified Data.Map as Map import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Data.Set (Set) import qualified Data.Set as Set import Agda.Utils.NonemptyList (NonemptyList((:!))) class Singleton el coll | coll -> el where singleton :: el -> coll instance Singleton a (Maybe a) where singleton = Just instance Singleton a [a] where singleton = (:[]) instance Singleton a ([a] -> [a]) where singleton = (:) instance Singleton a (Endo [a]) where singleton = Endo . (:) instance Singleton a (NonemptyList a) where singleton = (:! []) instance Singleton a (Seq a) where singleton = Seq.singleton instance Singleton a (Set a) where singleton = Set.singleton instance Singleton Int IntSet where singleton = IntSet.singleton instance Singleton (k ,a) (Map k a) where singleton = uncurry Map.singleton instance Singleton (Int,a) (IntMap a) where singleton = uncurry IntMap.singleton instance Hashable a => Singleton a (HashSet a) where singleton = HashSet.singleton instance Hashable k => Singleton (k,a) (HashMap k a) where singleton = uncurry HashMap.singleton -- Testing newtype-deriving: -- newtype Wrap c = Wrap c -- deriving (Singleton k) -- Succeeds -- Type family version: -- class Singleton c where -- type Elem c -- singleton :: Elem c -> c -- instance Singleton [a] where -- type Elem [a] = a -- singleton = (:[]) -- instance Singleton (Maybe a) where -- type Elem (Maybe a) = a -- singleton = Just -- instance Singleton (Set a) where -- type Elem (Set a) = a -- singleton = Set.singleton -- instance Singleton (Map k a) where -- type Elem (Map k a) = (k,a) -- singleton = uncurry Map.singleton -- newtype Wrap a = Wrap a -- deriving (Singleton) -- Fails Agda-2.6.0.1/src/full/Agda/Utils/String.hs0000644000000000000000000000625413466402171016202 0ustar0000000000000000module Agda.Utils.String where import Data.Char import qualified Data.List as List import Numeric import Agda.Utils.List import Data.IORef import Agda.Interaction.Options.IORefs (unicodeOrAscii, UnicodeOrAscii(..)) import qualified System.IO.Unsafe as UNSAFE -- | 'quote' adds double quotes around the string, replaces newline -- characters with @\n@, and escapes double quotes and backslashes -- within the string. This is different from the behaviour of 'show': -- -- @ -- \> 'putStrLn' $ 'show' \"\\x2200\" -- \"\\8704\" -- \> 'putStrLn' $ 'quote' \"\\x2200\" -- \"∀\" -- @ -- -- (The code examples above have been tested using version 4.2.0.0 of -- the base library.) quote :: String -> String quote s = "\"" ++ concatMap escape s ++ "\"" where escape c | c == '\n' = "\\n" | c `elem` escapeChars = ['\\', c] | otherwise = [c] escapeChars :: String escapeChars = "\"\\" -- | Turns the string into a Haskell string literal, avoiding escape -- codes. haskellStringLiteral :: String -> String haskellStringLiteral s = "\"" ++ concatMap escape s ++ "\"" where escape c | c == '\n' = "\\n" | c == '"' = "\\\"" | c == '\\' = "\\\\" | ok c = [c] | otherwise = [c] ok c = case generalCategory c of UppercaseLetter -> True LowercaseLetter -> True TitlecaseLetter -> True _ -> isSymbol c || isPunctuation c -- | Adds hyphens around the given string -- -- >>> putStrLn $ delimiter "Title" -- ———— Title ————————————————————————————————————————————————— delimiter :: String -> String delimiter s = concat [ replicate 4 '\x2014' , " ", s, " " , replicate (54 - length s) '\x2014' ] -- | Shows a non-negative integer using the characters ₀-₉ instead of -- 0-9 unless the user explicitly asked us to not use any unicode characters. showIndex :: (Show i, Integral i) => i -> String showIndex n = let opt = UNSAFE.unsafePerformIO (readIORef unicodeOrAscii) in case opt of UnicodeOk -> showIntAtBase 10 (\i -> toEnum (i + fromEnum '\x2080')) n "" AsciiOnly -> show n -- | Adds a final newline if there is not already one. addFinalNewLine :: String -> String addFinalNewLine "" = "\n" addFinalNewLine s | last s == '\n' = s | otherwise = s ++ "\n" -- | Indents every line the given number of steps. indent :: Integral i => i -> String -> String indent i = unlines . map (List.genericReplicate i ' ' ++) . lines newtype Str = Str { unStr :: String } deriving Eq instance Show Str where show = unStr -- | Show a number using comma to separate powers of 1,000. showThousandSep :: Show a => a -> String showThousandSep = reverse . List.intercalate "," . chop 3 . reverse . show -- | Remove leading whitespace. ltrim :: String -> String ltrim = dropWhile isSpace -- | Remove trailing whitespace. rtrim :: String -> String rtrim = List.dropWhileEnd isSpace -- | Remove leading and trailing whitesapce. trim :: String -> String trim = rtrim . ltrim Agda-2.6.0.1/src/full/Agda/Utils/POMonoid.hs0000644000000000000000000000160513466402171016413 0ustar0000000000000000-- | Partially ordered monoids. module Agda.Utils.POMonoid where import Data.Semigroup import Data.Monoid import Agda.Utils.PartialOrd -- | Partially ordered semigroup. -- -- Law: composition must be monotone. -- -- @ -- related x POLE x' && related y POLE y' ==> -- related (x <> y) POLE (x' <> y') -- @ class (PartialOrd a, Semigroup a) => POSemigroup a where -- | Partially ordered monoid. -- -- Law: composition must be monotone. -- -- @ -- related x POLE x' && related y POLE y' ==> -- related (x <> y) POLE (x' <> y') -- @ class (PartialOrd a, Monoid a) => POMonoid a where -- | Completing POMonoids with inverses to form a Galois connection. -- -- Law: composition and inverse composition form a Galois connection. -- -- @ -- related (inverseCompose p x) POLE y <==> related x POLE (p <> y) -- @ class POMonoid a => LeftClosedPOMonoid a where inverseCompose :: a -> a -> a Agda-2.6.0.1/src/full/Agda/Utils/AssocList.hs0000644000000000000000000000467213466402171016642 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Additional functions for association lists. module Agda.Utils.AssocList where import Prelude hiding (lookup) import qualified Data.List as List import Data.Function import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | A finite map, represented as a set of pairs. -- -- Invariant: at most one value per key. type AssocList k v = [(k,v)] -- | O(n). -- Reexport 'List.lookup'. lookup :: Eq k => k -> AssocList k v -> Maybe v lookup = List.lookup -- | O(n). -- Get the domain (list of keys) of the finite map. keys :: AssocList k v -> [k] keys = map fst -- | O(1). -- Add a new binding. -- Assumes the binding is not yet in the list. insert :: k -> v -> AssocList k v -> AssocList k v insert k v = ((k,v) :) -- | O(n). -- Update the value at a key. -- The key must be in the domain of the finite map. -- Otherwise, an internal error is raised. update :: Eq k => k -> v -> AssocList k v -> AssocList k v update k v = updateAt k $ const v -- | O(n). -- Delete a binding. -- The key must be in the domain of the finite map. -- Otherwise, an internal error is raised. delete :: Eq k => k -> AssocList k v -> AssocList k v delete k = List.deleteBy ((==) `on` fst) (k, __IMPOSSIBLE__) -- | O(n). -- Update the value at a key with a certain function. -- The key must be in the domain of the finite map. -- Otherwise, an internal error is raised. updateAt :: Eq k => k -> (v -> v) -> AssocList k v -> AssocList k v updateAt k f = loop where loop [] = __IMPOSSIBLE__ loop (p@(k',v) : ps) | k == k' = (k, f v) : ps | otherwise = p : loop ps -- | O(n). -- Map over an association list, preserving the order. mapWithKey :: (k -> v -> v) -> AssocList k v -> AssocList k v mapWithKey f = map $ \ (k,v) -> (k, f k v) -- | O(n). -- If called with a effect-producing function, violation of the invariant -- could matter here (duplicating effects). mapWithKeyM :: Applicative m => (k -> v -> m v) -> AssocList k v -> m (AssocList k v) mapWithKeyM f = mapM $ \ (k,v) -> (k,) <$> f k v where -- mapM is applicative! mapM g [] = pure [] mapM g (x : xs) = (:) <$> g x <*> mapM g xs -- | O(n). -- Named in analogy to 'Data.Map.mapKeysMonotonic'. -- To preserve the invariant, it is sufficient that the key -- transformation is injective (rather than monotonic). mapKeysMonotonic :: (k -> k') -> AssocList k v -> AssocList k' v mapKeysMonotonic f = map $ mapFst f Agda-2.6.0.1/src/full/Agda/Utils/IO.hs0000644000000000000000000000075213466402171015240 0ustar0000000000000000-- | Auxiliary functions for the IO monad. module Agda.Utils.IO where import Control.Exception import Control.Monad.Writer -- | Catch 'IOException's. -- class CatchIO m where catchIO :: m a -> (IOException -> m a) -> m a -- | Alias of 'catch' for the IO monad. -- instance CatchIO IO where catchIO = catch -- | Upon exception, the written output is lost. -- instance CatchIO m => CatchIO (WriterT w m) where catchIO m h = WriterT $ runWriterT m `catchIO` \ e -> runWriterT (h e) Agda-2.6.0.1/src/full/Agda/Utils/Impossible.hs0000644000000000000000000000347113466402171017040 0ustar0000000000000000------------------------------------------------------------------------ -- | An interface for reporting \"impossible\" errors ------------------------------------------------------------------------ {-# LANGUAGE DeriveDataTypeable #-} module Agda.Utils.Impossible where import Control.Exception as E -- | \"Impossible\" errors, annotated with a file name and a line -- number corresponding to the source code location of the error. data Impossible = Impossible String Integer -- ^ We reached a program point which should be unreachable. | Unreachable String Integer -- ^ @Impossible@ with a different error message. -- Used when we reach a program point which can in principle -- be reached, but not for a certain run. | ImpMissingDefinitions [String] String -- ^ We reached a program point without all the required -- primitives or BUILTIN to proceed forward. -- @MissingDefinitions needed forthis@ instance Show Impossible where show (Impossible file line) = unlines [ "An internal error has occurred. Please report this as a bug." , "Location of the error: " ++ file ++ ":" ++ show line ] show (Unreachable file line) = unlines [ "We reached a program point we did not want to reach." , "Location of the error: " ++ file ++ ":" ++ show line ] show (ImpMissingDefinitions needed forthis) = unlines [ "The following builtins or primitives need to be bound to use " ++ forthis ++ ":"] ++ unwords needed instance Exception Impossible -- | Abort by throwing an \"impossible\" error. You should not use -- this function directly. Instead use the macro in @undefined.h@. throwImpossible :: Impossible -> a throwImpossible = throw -- | Catch an \"impossible\" error, if possible. catchImpossible :: IO a -> (Impossible -> IO a) -> IO a catchImpossible = E.catch Agda-2.6.0.1/src/full/Agda/Utils/Null.hs0000644000000000000000000000571213466402171015644 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE CPP #-} -- | Overloaded @null@ and @empty@ for collections and sequences. module Agda.Utils.Null where import Prelude hiding (null) import Control.Monad import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as ByteString import Data.Function import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Data.Set (Set) import qualified Data.Set as Set import Text.PrettyPrint (Doc, render) import Agda.Utils.Bag (Bag) import qualified Agda.Utils.Bag as Bag class Null a where empty :: a null :: a -> Bool -- ^ Satisfying @null empty == True@. default null :: Eq a => a -> Bool null = (== empty) instance Null () where empty = () null _ = True instance (Null a, Null b) => Null (a,b) where empty = (empty, empty) null (a,b) = null a && null b instance Null ByteString where empty = ByteString.empty null = ByteString.null instance Null [a] where empty = [] null = List.null instance Null (Bag a) where empty = Bag.empty null = Bag.null instance Null (IntMap a) where empty = IntMap.empty null = IntMap.null instance Null IntSet where empty = IntSet.empty null = IntSet.null instance Null (Map k a) where empty = Map.empty null = Map.null instance Null (HashMap k a) where empty = HashMap.empty null = HashMap.null instance Null (HashSet a) where empty = HashSet.empty null = HashSet.null instance Null (Seq a) where empty = Seq.empty null = Seq.null instance Null (Set a) where empty = Set.empty null = Set.null -- | A 'Maybe' is 'null' when it corresponds to the empty list. instance Null (Maybe a) where empty = Nothing null Nothing = True null (Just a) = False instance Null Doc where empty = mempty null = (== mempty) -- * Testing for null. ifNull :: (Null a) => a -> b -> (a -> b) -> b ifNull a b k = if null a then b else k a ifNotNull :: (Null a) => a -> (a -> b) -> b -> b ifNotNull a k b = ifNull a b k ifNullM :: (Monad m, Null a) => m a -> m b -> (a -> m b) -> m b ifNullM ma mb k = ma >>= \ a -> ifNull a mb k ifNotNullM :: (Monad m, Null a) => m a -> (a -> m b) -> m b -> m b ifNotNullM ma k mb = ifNullM ma mb k whenNull :: (Monad m, Null a) => a -> m () -> m () whenNull = when . null unlessNull :: (Monad m, Null a) => a -> (a -> m ()) -> m () unlessNull a k = unless (null a) $ k a whenNullM :: (Monad m, Null a) => m a -> m () -> m () whenNullM ma k = ma >>= (`whenNull` k) unlessNullM :: (Monad m, Null a) => m a -> (a -> m ()) -> m () unlessNullM ma k = ma >>= (`unlessNull` k) Agda-2.6.0.1/src/full/Agda/Utils/IndexedList.hs0000644000000000000000000000450113466402171017141 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} module Agda.Utils.IndexedList where import Agda.Utils.Lens -- | Existential wrapper for indexed types. data Some :: (k -> *) -> * where Some :: f i -> Some f -- | Unpacking a wrapped value. withSome :: Some b -> (forall i. b i -> a) -> a withSome (Some x) f = f x -- | Lists indexed by a type-level list. A value of type @All p [x₁..xₙ]@ is a -- sequence of values of types @p x₁@, .., @p xₙ@. data All :: (x -> *) -> [x] -> * where Nil :: All p '[] Cons :: p x -> All p xs -> All p (x ': xs) -- | Constructing an indexed list from a plain list. makeAll :: (a -> Some b) -> [a] -> Some (All b) makeAll f [] = Some Nil makeAll f (x : xs) = case (f x, makeAll f xs) of (Some y, Some ys) -> Some (Cons y ys) -- | Turning an indexed list back into a plain list. forgetAll :: (forall x. b x -> a) -> All b xs -> [a] forgetAll f Nil = [] forgetAll f (Cons x xs) = f x : forgetAll f xs -- | An index into a type-level list. data Index :: [x] -> x -> * where Zero :: Index (x ': xs) x Suc :: Index xs x -> Index (y ': xs) x -- | Indices are just natural numbers. forgetIndex :: Index xs x -> Int forgetIndex Zero = 0 forgetIndex (Suc i) = 1 + forgetIndex i -- | Mapping over an indexed list. mapWithIndex :: (forall x. Index xs x -> p x -> q x) -> All p xs -> All q xs mapWithIndex f Nil = Nil mapWithIndex f (Cons p ps) = Cons (f Zero p) $ mapWithIndex (f . Suc) ps -- | If you have an index you can get a lens for the given element. lIndex :: Index xs x -> Lens' (p x) (All p xs) lIndex Zero f (Cons x xs) = f x <&> \ x -> Cons x xs lIndex (Suc i) f (Cons x xs) = lIndex i f xs <&> \ xs -> Cons x xs #if __GLASGOW_HASKELL__ < 800 lIndex _ _ Nil = error "-fwarn-incomplete-pattern deficiency" #endif -- | Looking up an element in an indexed list. lookupIndex :: All p xs -> Index xs x -> p x lookupIndex = flip ix where -- -Wincomplete-patterns fails for the other argument order! ix :: Index xs x -> All p xs -> p x ix Zero (Cons x xs) = x ix (Suc i) (Cons x xs) = ix i xs #if __GLASGOW_HASKELL__ < 800 ix _ Nil = error "-fwarn-incomplete-pattern deficiency" #endif -- | All indices into an indexed list. allIndices :: All p xs -> All (Index xs) xs allIndices = mapWithIndex const Agda-2.6.0.1/src/full/Agda/Utils/TypeLits.hs0000644000000000000000000000137213466402171016505 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} -- | Type level literals, inspired by GHC.TypeLits. module Agda.Utils.TypeLits where -- | Singleton for type level booleans. data SBool (b :: Bool) where STrue :: SBool 'True SFalse :: SBool 'False eraseSBool :: SBool b -> Bool eraseSBool b = case b of STrue -> True SFalse -> False -- | A known boolean is one we can obtain a singleton for. -- Concrete values are trivially known. class KnownBool (b :: Bool) where boolSing :: SBool b instance KnownBool 'True where boolSing = STrue instance KnownBool 'False where boolSing = SFalse boolVal :: forall proxy b. KnownBool b => proxy b -> Bool boolVal _ = eraseSBool (boolSing :: SBool b) Agda-2.6.0.1/src/full/Agda/Utils/Pretty.hs0000644000000000000000000000665113466402171016224 0ustar0000000000000000{-# LANGUAGE CPP #-} {-| Pretty printing functions. -} module Agda.Utils.Pretty ( module Agda.Utils.Pretty , module Text.PrettyPrint ) where import Data.Int ( Int32 ) import Data.Data (Data(..)) import qualified Data.Map as Map #if __GLASGOW_HASKELL__ < 800 import qualified Data.Semigroup as S #endif import qualified Text.PrettyPrint as P import Text.PrettyPrint hiding (TextDetails(Str), empty) import Agda.Utils.NonemptyList #include "undefined.h" import Agda.Utils.Impossible #if __GLASGOW_HASKELL__ < 800 -- ASR (2019-03-27). I used @(<>)@ from the monoid instance because I -- cannot hide this instance. instance S.Semigroup Doc where (<>) = (<>) #endif -- * Pretty class -- | While 'Show' is for rendering data in Haskell syntax, -- 'Pretty' is for displaying data to the world, i.e., the -- user and the environment. -- -- Atomic data has no inner document structure, so just -- implement 'pretty' as @pretty a = text $ ... a ...@. class Pretty a where pretty :: a -> Doc prettyPrec :: Int -> a -> Doc prettyList :: [a] -> Doc pretty = prettyPrec 0 prettyPrec = const pretty prettyList = brackets . prettyList_ -- | Use instead of 'show' when printing to world. prettyShow :: Pretty a => a -> String prettyShow = render . pretty -- * Pretty instances instance Pretty Bool where pretty = text . show instance Pretty Int where pretty = text . show instance Pretty Int32 where pretty = text . show instance Pretty Integer where pretty = text . show instance Pretty Char where pretty c = text [c] prettyList = text instance Pretty Doc where pretty = id instance Pretty () where pretty _ = P.empty instance Pretty a => Pretty (Maybe a) where prettyPrec p Nothing = "Nothing" prettyPrec p (Just x) = mparens (p > 0) $ "Just" <+> prettyPrec 10 x instance Pretty a => Pretty [a] where pretty = prettyList instance Pretty a => Pretty (NonemptyList a) where pretty = prettyList . toList -- * 'Doc' utilities pwords :: String -> [Doc] pwords = map text . words fwords :: String -> Doc fwords = fsep . pwords -- | Comma separated list, without the brackets. prettyList_ :: Pretty a => [a] -> Doc prettyList_ = fsep . punctuate comma . map pretty -- ASR (2016-12-13): In pretty >= 1.1.2.0 the below function 'mparens' -- is called 'maybeParens'. I didn't use that name due to the issue -- https://github.com/haskell/pretty/issues/40. -- | Apply 'parens' to 'Doc' if boolean is true. mparens :: Bool -> Doc -> Doc mparens True = parens mparens False = id -- | @align max rows@ lays out the elements of @rows@ in two columns, -- with the second components aligned. The alignment column of the -- second components is at most @max@ characters to the right of the -- left-most column. -- -- Precondition: @max > 0@. align :: Int -> [(String, Doc)] -> Doc align max rows = vcat $ map (\(s, d) -> text s $$ nest (maxLen + 1) d) $ rows where maxLen = maximum $ 0 : filter (< max) (map (length . fst) rows) -- | Handles strings with newlines properly (preserving indentation) multiLineText :: String -> Doc multiLineText = vcat . map text . lines -- cheating because you shouldn't be digging this far anyway instance Data Doc where gunfold _ _ _ = __IMPOSSIBLE__ toConstr = __IMPOSSIBLE__ dataTypeOf = __IMPOSSIBLE__ infixl 6 -- | @a b = hang a 2 b@ () :: Doc -> Doc -> Doc a b = hang a 2 b -- | @pshow = text . pretty@ pshow :: Show a => a -> Doc pshow = text . show Agda-2.6.0.1/src/full/Agda/Utils/Empty.hs0000644000000000000000000000212613466402171016024 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -- | An empty type with some useful instances. module Agda.Utils.Empty where import Control.Exception (evaluate) import Data.Functor ((<$)) import Data.Data (Data) import Agda.Utils.Impossible #include "undefined.h" data Empty deriving instance Data Empty instance Eq Empty where _ == _ = True instance Ord Empty where compare _ _ = EQ instance Show Empty where showsPrec p _ = showParen (p > 9) $ showString "error \"Agda.Utils.Empty.Empty\"" absurd :: Empty -> a absurd e = seq e __IMPOSSIBLE__ -- | @toImpossible e@ extracts the @Impossible@ value raised via -- @__IMPOSSIBLE__@ to create the element @e@ of type @Empty@. -- It proceeds by evaluating @e@ to weak head normal form and -- catching the exception. -- We are forced to wrap things in a @Maybe@ because of -- @catchImpossible@'s type. toImpossible :: Empty -> IO Impossible toImpossible e = do s <- catchImpossible (Nothing <$ evaluate e) (return . Just) case s of Just i -> return i Nothing -> absurd e -- this should never happen Agda-2.6.0.1/src/full/Agda/Utils/TypeLevel.hs0000644000000000000000000001120213466402171016632 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ScopedTypeVariables #-} -- We need undecidable instances for the definition of @Foldr@, -- and @Domains@ and @CoDomain@ using @If@ for instance. {-# LANGUAGE UndecidableInstances #-} module Agda.Utils.TypeLevel where import Data.Proxy import GHC.Exts (Constraint) ------------------------------------------------------------------ -- CONSTRAINTS ------------------------------------------------------------------ -- | @All p as@ ensures that the constraint @p@ is satisfied by -- all the 'types' in @as@. -- (Types is between scare-quotes here because the code is -- actually kind polymorphic) type family All (p :: k -> Constraint) (as :: [k]) :: Constraint where All p '[] = () All p (a ': as) = (p a, All p as) ------------------------------------------------------------------ -- FUNCTIONS -- Type-level and Kind polymorphic versions of usual value-level -- functions. ------------------------------------------------------------------ -- | On Booleans type family If (b :: Bool) (l :: k) (r :: k) :: k where If 'True l r = l If 'False l r = r -- | On Lists type family Foldr (c :: k -> l -> l) (n :: l) (as :: [k]) :: l where Foldr c n '[] = n Foldr c n (a ': as) = c a (Foldr c n as) -- | Version of @Foldr@ taking a defunctionalised argument so -- that we can use partially applied functions. type family Foldr' (c :: Function k (Function l l -> *) -> *) (n :: l) (as :: [k]) :: l where Foldr' c n '[] = n Foldr' c n (a ': as) = Apply (Apply c a) (Foldr' c n as) type family Map (f :: Function k l -> *) (as :: [k]) :: [l] where Map f as = Foldr' (ConsMap0 f) '[] as data ConsMap0 :: (Function k l -> *) -> Function k (Function [l] [l] -> *) -> * data ConsMap1 :: (Function k l -> *) -> k -> Function [l] [l] -> * type instance Apply (ConsMap0 f) a = ConsMap1 f a type instance Apply (ConsMap1 f a) tl = Apply f a ': tl type family Constant (b :: l) (as :: [k]) :: [l] where Constant b as = Map (Constant1 b) as ------------------------------------------------------------------ -- TYPE FORMERS ------------------------------------------------------------------ -- | @Arrows [a1,..,an] r@ corresponds to @a1 -> .. -> an -> r@ -- | @Products [a1,..,an]@ corresponds to @(a1, (..,( an, ())..))@ type Arrows (as :: [*]) (r :: *) = Foldr (->) r as type Products (as :: [*]) = Foldr (,) () as -- | @IsBase t@ is @'True@ whenever @t@ is *not* a function space. type family IsBase (t :: *) :: Bool where IsBase (a -> t) = 'False IsBase a = 'True -- | Using @IsBase@ we can define notions of @Domains@ and @CoDomains@ -- which *reduce* under positive information @IsBase t ~ 'True@ even -- though the shape of @t@ is not formally exposed type family Domains (t :: *) :: [*] where Domains t = If (IsBase t) '[] (Domains' t) type family Domains' (t :: *) :: [*] where Domains' (a -> t) = a ': Domains t type family CoDomain (t :: *) :: * where CoDomain t = If (IsBase t) t (CoDomain' t) type family CoDomain' (t :: *) :: * where CoDomain' (a -> t) = CoDomain t ------------------------------------------------------------------ -- TYPECLASS MAGIC ------------------------------------------------------------------ -- | @Currying as b@ witnesses the isomorphism between @Arrows as b@ -- and @Products as -> b@. It is defined as a type class rather -- than by recursion on a singleton for @as@ so all of that these -- conversions are inlined at compile time for concrete arguments. class Currying as b where uncurrys :: Proxy as -> Proxy b -> Arrows as b -> Products as -> b currys :: Proxy as -> Proxy b -> (Products as -> b) -> Arrows as b instance Currying '[] b where uncurrys _ _ f = \ () -> f currys _ _ f = f () instance Currying as b => Currying (a ': as) b where uncurrys _ p f = uncurry $ uncurrys (Proxy :: Proxy as) p . f currys _ p f = currys (Proxy :: Proxy as) p . curry f ------------------------------------------------------------------ -- DEFUNCTIONALISATION -- Cf. Eisenberg and Stolarek's paper: -- Promoting Functions to Type Families in Haskell ------------------------------------------------------------------ data Function :: * -> * -> * data Constant0 :: Function a (Function b a -> *) -> * data Constant1 :: * -> Function b a -> * type family Apply (t :: Function k l -> *) (u :: k) :: l type instance Apply Constant0 a = Constant1 a type instance Apply (Constant1 a) b = a Agda-2.6.0.1/src/full/Agda/Utils/Favorites.hs0000644000000000000000000001121213466402171016664 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Maintaining a list of favorites of some partially ordered type. -- Only the best elements are kept. -- -- To avoid name clashes, import this module qualified, as in -- @ -- import Agda.Utils.Favorites (Favorites) -- import qualified Agda.Utils.Favorites as Fav -- @ module Agda.Utils.Favorites where import Prelude hiding ( null ) import Data.Foldable (Foldable) import Data.Functor import Data.Semigroup import qualified Data.List as List import qualified Data.Set as Set import Agda.Utils.Null import Agda.Utils.PartialOrd import Agda.Utils.Singleton import Agda.Utils.Tuple -- | A list of incomparable favorites. newtype Favorites a = Favorites { toList :: [a] } deriving (Foldable, Show, Null, Singleton a) -- | Equality checking is a bit expensive, since we need to sort! -- Maybe use a 'Set' of favorites in the first place? instance Ord a => Eq (Favorites a) where as == bs = Set.fromList (toList as) == Set.fromList (toList bs) -- | Result of comparing a candidate with the current favorites. data CompareResult a = Dominates { dominated :: [a], notDominated :: [a] } -- ^ Great, you are dominating a possibly (empty list of favorites) -- but there is also a rest that is not dominated. -- If @null dominated@, then @notDominated@ is necessarily the -- complete list of favorites. | IsDominated { dominator :: a } -- ^ Sorry, but you are dominated by that favorite. -- | Gosh, got some pretty @a@ here, compare with my current favorites! -- Discard it if there is already one that is better or equal. -- (Skewed conservatively: faithful to the old favorites.) -- If there is no match for it, add it, and -- dispose of all that are worse than @a@. -- -- We require a partial ordering. Less is better! (Maybe paradoxically.) compareWithFavorites :: PartialOrd a => a -> Favorites a -> CompareResult a compareWithFavorites a favs = loop $ toList favs where loop [] = Dominates [] [] loop as@(b : bs) = case comparable a b of POLT -> dominates b $ loop bs -- @a@ is a new favorite, bye-bye, @b@ POLE -> dominates b $ loop bs -- ditto POEQ -> IsDominated b -- @b@ is as least as good as @a@, bye-bye, @a@ POGE -> IsDominated b -- ditto POGT -> IsDominated b -- ditto POAny -> doesnotd b $ loop bs -- don't know, compare with my other favorites -- add an outperformed favorite dominates b (Dominates bs as) = Dominates (b : bs) as dominates b r@IsDominated{} = r -- add an uncomparable favorite doesnotd b (Dominates as bs) = Dominates as (b : bs) doesnotd b r@IsDominated{} = r -- | Compare a new set of favorites to an old one and discard -- the new favorites that are dominated by the old ones -- and vice verse. -- (Skewed conservatively: faithful to the old favorites.) -- -- @compareFavorites new old = (new', old')@ compareFavorites :: PartialOrd a => Favorites a -> Favorites a -> (Favorites a, Favorites a) compareFavorites new old = mapFst Favorites $ loop (toList new) old where loop [] old = ([], old) loop (a : new) old = case compareWithFavorites a old of -- Better: Discard all @old@ ones that @a@ dominates and keep @a@ Dominates _ old -> mapFst (a:) $ loop new (Favorites old) -- Not better: Discard @a@ IsDominated{} -> loop new old unionCompared :: (Favorites a, Favorites a) -> Favorites a unionCompared (Favorites new, Favorites old) = Favorites $ new ++ old -- | After comparing, do the actual insertion. insertCompared :: a -> Favorites a -> CompareResult a -> Favorites a insertCompared a _ (Dominates _ as) = Favorites (a : as) insertCompared _ l IsDominated{} = l -- | Compare, then insert accordingly. -- @insert a l = insertCompared a l (compareWithFavorites a l)@ insert :: PartialOrd a => a -> Favorites a -> Favorites a insert a l = insertCompared a l (compareWithFavorites a l) -- | Insert all the favorites from the first list into the second. union :: PartialOrd a => Favorites a -> Favorites a -> Favorites a union (Favorites as) bs = List.foldr insert bs as -- | Construct favorites from elements of a partial order. -- The result depends on the order of the list if it -- contains equal elements, since earlier seen elements -- are favored over later seen equals. -- The first element of the list is seen first. fromList :: PartialOrd a => [a] -> Favorites a fromList = List.foldl' (flip insert) empty -- | 'Favorites' forms a 'Monoid' under 'empty' and 'union. instance PartialOrd a => Semigroup (Favorites a) where (<>) = union instance PartialOrd a => Monoid (Favorites a) where mempty = empty mappend = (<>) Agda-2.6.0.1/src/full/Agda/Utils/Lens.hs0000644000000000000000000000613713466402171015635 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} -- | A cut-down implementation of lenses, with names taken from -- Edward Kmett's lens package. module Agda.Utils.Lens ( module Agda.Utils.Lens , (<&>) -- reexported from Agda.Utils.Functor ) where import Control.Applicative ( Const(Const), getConst ) import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Data.Map (Map) import qualified Data.Map as Map import Data.Functor.Identity import Agda.Utils.Functor ((<&>)) -- * Type-preserving lenses. -- | Van Laarhoven style homogeneous lenses. -- Mnemoic: "Lens inner outer". type Lens' i o = forall f. Functor f => (i -> f i) -> o -> f o type LensGet i o = o -> i type LensSet i o = i -> o -> o type LensMap i o = (i -> i) -> o -> o -- * Some simple lenses. lFst :: Lens' a (a, b) lFst f (x, y) = (, y) <$> f x lSnd :: Lens' b (a, b) lSnd f (x, y) = (x,) <$> f y -- * Elementary lens operations. infixl 8 ^. -- | Get inner part @i@ of structure @o@ as designated by @Lens' i o@. (^.) :: o -> Lens' i o -> i o ^. l = getConst $ l Const o -- | Set inner part @i@ of structure @o@ as designated by @Lens' i o@. set :: Lens' i o -> LensSet i o set l = over l . const -- | Modify inner part @i@ of structure @o@ using a function @i -> i@. over :: Lens' i o -> LensMap i o over l f o = runIdentity $ l (Identity . f) o -- * State accessors and modifiers using 'StateT'. -- | Focus on a part of the state for a stateful computation. focus :: Monad m => Lens' i o -> StateT i m a -> StateT o m a focus l m = StateT $ \ o -> do (a, i) <- runStateT m (o ^. l) return (a, set l i o) -- * State accessors and modifiers using 'MonadState'. -- | Read a part of the state. use :: MonadState o m => Lens' i o -> m i use l = do !x <- gets (^. l) return x infix 4 .= -- | Write a part of the state. (.=) :: MonadState o m => Lens' i o -> i -> m () l .= i = modify $ set l i infix 4 %= -- | Modify a part of the state. (%=) :: MonadState o m => Lens' i o -> (i -> i) -> m () l %= f = modify $ over l f infix 4 %== -- | Modify a part of the state monadically. (%==) :: MonadState o m => Lens' i o -> (i -> m i) -> m () l %== f = put =<< l f =<< get infix 4 %%= -- | Modify a part of the state monadically, and return some result. (%%=) :: MonadState o m => Lens' i o -> (i -> m (i, r)) -> m r l %%= f = do o <- get (o', r) <- runWriterT $ l (WriterT . f) o put o' return r -- | Modify a part of the state locally. locallyState :: MonadState o m => Lens' i o -> (i -> i) -> m r -> m r locallyState l f k = do old <- use l l %= f x <- k l .= old return x -- * Read-only state accessors and modifiers. -- | Ask for part of read-only state. view :: MonadReader o m => Lens' i o -> m i view l = asks (^. l) -- | Modify a part of the state in a subcomputation. locally :: MonadReader o m => Lens' i o -> (i -> i) -> m a -> m a locally l = local . over l locally' :: ((o -> o) -> m a -> m a) -> Lens' i o -> (i -> i) -> m a -> m a locally' local l = local . over l key :: Ord k => k -> Lens' (Maybe v) (Map k v) key k f m = f (Map.lookup k m) <&> \ v -> Map.alter (const v) k m Agda-2.6.0.1/src/full/Agda/Utils/ListT.hs0000644000000000000000000001164113466402171015767 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- Due to limitations of funct.dep. -- | @ListT@ done right, -- see https://www.haskell.org/haskellwiki/ListT_done_right_alternative -- -- There is also the @list-t@ package on hackage (Nikita Volkov) -- but it again depends on other packages we do not use yet, -- so we rather implement the few bits we need afresh. module Agda.Utils.ListT where import Control.Applicative ( Alternative((<|>), empty) ) import Control.Monad import Control.Monad.Reader import Control.Monad.State import Data.Semigroup import Agda.Utils.Maybe -- | Lazy monadic computation of a list of results. newtype ListT m a = ListT { runListT :: m (Maybe (a, ListT m a)) } deriving (Functor) -- | Boilerplate function to lift 'MonadReader' through the 'ListT' transformer. mapListT :: (m (Maybe (a, ListT m a)) -> n (Maybe (b, ListT n b))) -> ListT m a -> ListT n b mapListT f = ListT . f . runListT -- * List operations -- | The empty lazy list. nilListT :: Monad m => ListT m a nilListT = ListT $ return Nothing -- | Consing a value to a lazy list. consListT :: Monad m => a -> ListT m a -> ListT m a consListT a l = ListT $ return $ Just (a, l) -- | Singleton lazy list. sgListT :: Monad m => a -> ListT m a sgListT a = consListT a nilListT -- | Case distinction over lazy list. caseListT :: Monad m => ListT m a -> m b -> (a -> ListT m a -> m b) -> m b caseListT l nil cons = caseMaybeM (runListT l) nil $ uncurry cons -- | Folding a lazy list, effects left-to-right. foldListT :: Monad m => (a -> m b -> m b) -> m b -> ListT m a -> m b foldListT cons nil = loop where loop l = caseListT l nil $ \ a l' -> cons a $ loop l' -- | The join operation of the @ListT m@ monad. concatListT :: Monad m => ListT m (ListT m a) -> ListT m a concatListT = ListT . foldListT append (return Nothing) where append l = runListT . mappend l . ListT -- * Monadic list operations. -- | We can ``run'' a computation of a 'ListT' as it is monadic itself. runMListT :: Monad m => m (ListT m a) -> ListT m a runMListT ml = ListT $ runListT =<< ml -- | Monadic cons. consMListT :: Monad m => m a -> ListT m a -> ListT m a consMListT ma l = ListT $ (Just . (,l)) `liftM` ma -- consMListT ma l = runMListT $ liftM (`consListT` l) ma -- simplification: -- consMListT ma l = ListT $ runListT =<< liftM (`consListT` l) ma -- consMListT ma l = ListT $ runListT =<< (`consListT` l) <$> ma -- consMListT ma l = ListT $ runListT =<< do a <- ma; return $ a `consListT` l -- consMListT ma l = ListT $ do a <- ma; runListT =<< do return $ a `consListT` l -- consMListT ma l = ListT $ do a <- ma; runListT $ a `consListT` l -- consMListT ma l = ListT $ do a <- ma; runListT $ ListT $ return $ Just (a, l) -- consMListT ma l = ListT $ do a <- ma; return $ Just (a, l) -- consMListT ma l = ListT $ Just . (,l) <$> ma -- | Monadic singleton. sgMListT :: Monad m => m a -> ListT m a sgMListT ma = consMListT ma nilListT -- | Extending a monadic function to 'ListT'. mapMListT :: Monad m => (a -> m b) -> ListT m a -> ListT m b mapMListT f (ListT ml) = ListT $ do caseMaybeM ml (return Nothing) $ \ (a, as) -> do b <- f a return $ Just (b , mapMListT f as) -- | Alternative implementation using 'foldListT'. mapMListT_alt :: Monad m => (a -> m b) -> ListT m a -> ListT m b mapMListT_alt f = runMListT . foldListT cons (return nilListT) where cons a ml = consMListT (f a) <$> ml -- | Change from one monad to another liftListT :: (Monad m, Monad m') => (forall a. m a -> m' a) -> ListT m a -> ListT m' a liftListT lift xs = runMListT $ caseMaybeM (lift $ runListT xs) (return nilListT) $ \(x,xs) -> return $ consListT x $ liftListT lift xs -- Instances instance Monad m => Semigroup (ListT m a) where l1 <> l2 = ListT $ foldListT cons (runListT l2) l1 where cons a = runListT . consListT a . ListT instance Monad m => Monoid (ListT m a) where mempty = nilListT mappend = (<>) instance (Functor m, Applicative m, Monad m) => Alternative (ListT m) where empty = mempty (<|>) = mappend instance (Functor m, Applicative m, Monad m) => MonadPlus (ListT m) where mzero = mempty mplus = mappend instance (Functor m, Applicative m, Monad m) => Applicative (ListT m) where pure = sgListT (<*>) = ap -- Another Applicative, but not the canonical one. -- l1 <*> l2 = ListT $ loop <$> runListT l1 <*> runListT l2 -- where -- loop (Just (f, l1')) (Just (a, l2')) = Just (f a, l1' <*> l2') -- loop _ _ = Nothing instance (Functor m, Applicative m, Monad m) => Monad (ListT m) where return = pure l >>= k = concatListT $ k <$> l instance MonadTrans ListT where lift = sgMListT instance (Applicative m, MonadIO m) => MonadIO (ListT m) where liftIO = lift . liftIO instance (Applicative m, MonadReader r m) => MonadReader r (ListT m) where ask = lift ask local f = ListT . local f . runListT instance (Applicative m, MonadState s m) => MonadState s (ListT m) where get = lift get put = lift . put Agda-2.6.0.1/src/full/Agda/Utils/Either.hs0000644000000000000000000000606113466402171016150 0ustar0000000000000000------------------------------------------------------------------------ -- | Utilities for the 'Either' type. ------------------------------------------------------------------------ module Agda.Utils.Either where -- | Loop while we have an exception. whileLeft :: Monad m => (a -> Either b c) -> (a -> b -> m a) -> (a -> c -> m d) -> a -> m d whileLeft test left right = loop where loop a = case test a of Left b -> loop =<< left a b Right c -> right a c -- | Monadic version of 'either' with a different argument ordering. caseEitherM :: Monad m => m (Either a b) -> (a -> m c) -> (b -> m c) -> m c caseEitherM mm f g = either f g =<< mm -- | 'Either' is a bifunctor. mapEither :: (a -> c) -> (b -> d) -> Either a b -> Either c d mapEither f g = either (Left . f) (Right . g) -- | 'Either _ b' is a functor. mapLeft :: (a -> c) -> Either a b -> Either c b mapLeft f = mapEither f id -- | 'Either a' is a functor. mapRight :: (b -> d) -> Either a b -> Either a d mapRight = mapEither id -- | 'Either' is bitraversable. traverseEither :: Functor f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) traverseEither f g = either (fmap Left . f) (fmap Right . g) -- | Returns 'True' iff the argument is @'Right' x@ for some @x@. -- -- Note: from @base >= 4.7.0.0@ already present in @Data.Either@. isRight :: Either a b -> Bool isRight (Right _) = True isRight (Left _) = False -- | Returns 'True' iff the argument is @'Left' x@ for some @x@. -- -- Note: from @base >= 4.7.0.0@ already present in @Data.Either@. isLeft :: Either a b -> Bool isLeft (Right _) = False isLeft (Left _) = True -- | Analogue of 'Data.Maybe.fromMaybe'. fromLeft :: (b -> a) -> Either a b -> a fromLeft = either id -- | Analogue of 'Data.Maybe.fromMaybe'. fromRight :: (a -> b) -> Either a b -> b fromRight f = either f id -- | Analogue of 'Agda.Utils.Maybe.fromMaybeM'. fromLeftM :: Monad m => (b -> m a) -> m (Either a b) -> m a fromLeftM f m = either return f =<< m -- | Analogue of 'Agda.Utils.Maybe.fromMaybeM'. fromRightM :: Monad m => (a -> m b) -> m (Either a b) -> m b fromRightM f m = either f return =<< m -- | Safe projection from 'Left'. -- -- > maybeLeft (Left a) = Just a -- > maybeLeft Right{} = Nothing -- maybeLeft :: Either a b -> Maybe a maybeLeft = either Just (const Nothing) -- | Safe projection from 'Right'. -- -- > maybeRight (Right b) = Just b -- > maybeRight Left{} = Nothing -- maybeRight :: Either a b -> Maybe b maybeRight = either (const Nothing) Just -- | Returns @'Just' input_with_tags_stripped@ if all elements are -- to the 'Left', and otherwise 'Nothing'. allLeft :: [Either a b] -> Maybe [a] allLeft = mapM maybeLeft -- | Returns @'Just' input_with_tags_stripped@ if all elements are -- to the right, and otherwise 'Nothing'. -- -- @ -- allRight xs == -- if all isRight xs then -- Just (map (\(Right x) -> x) xs) -- else -- Nothing -- @ allRight :: [Either a b] -> Maybe [b] allRight = mapM maybeRight -- | Convert 'Maybe' to @'Either' ()@. maybeToEither :: Maybe a -> Either () a maybeToEither = maybe (Left ()) Right Agda-2.6.0.1/src/full/Agda/Utils/Geniplate.hs0000644000000000000000000000317413466402171016642 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} -- | Utilities related to Geniplate. module Agda.Utils.Geniplate ( instanceUniverseBiT' , instanceTransformBiMT' , dontDescendInto ) where import Data.Generics.Geniplate import Data.Map (Map) import qualified Language.Haskell.TH as TH import qualified Agda.Syntax.Abstract.Name as A import qualified Agda.Syntax.Concrete.Name as C import qualified Agda.Syntax.Position as P import qualified Agda.Syntax.Scope.Base as S import qualified Agda.Utils.FileName as F import qualified Agda.Utils.Maybe.Strict as MS -- | Types which Geniplate should not descend into. dontDescendInto :: [TH.TypeQ] dontDescendInto = [ [t| String |] , [t| A.QName |] , [t| A.Name |] , [t| C.Name |] , [t| S.ScopeInfo |] , [t| Map A.QName A.QName |] , [t| Map A.ModuleName A.ModuleName |] , [t| [(A.QName, A.QName)] |] , [t| [(A.ModuleName, A.ModuleName)] |] , [t| A.AmbiguousQName |] , [t| P.Range' (MS.Maybe F.AbsolutePath) |] ] -- | A localised instance of 'instanceUniverseBiT'. The generated -- 'universeBi' functions neither descend into the types in -- 'dontDescendInto', nor into the types in the list argument. instanceUniverseBiT' :: [TH.TypeQ] -> TH.TypeQ -> TH.Q [TH.Dec] instanceUniverseBiT' ts p = instanceUniverseBiT (ts ++ dontDescendInto) p -- | A localised instance of 'instanceTransformBiMT'. The generated -- 'transformBiM' functions neither descend into the types in -- 'dontDescendInto', nor into the types in the list argument. instanceTransformBiMT' :: [TH.TypeQ] -> TH.TypeQ -> TH.TypeQ -> TH.Q [TH.Dec] instanceTransformBiMT' ts p = instanceTransformBiMT (ts ++ dontDescendInto) p Agda-2.6.0.1/src/full/Agda/Utils/Warshall.hs0000644000000000000000000003427113466402171016511 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} {- | Construct a graph from constraints @ x + n <= y becomes x ---(-n)---> y x <= n + y becomes x ---(+n)---> y @ the default edge (= no edge) is labelled with infinity. Building the graph involves keeping track of the node names. We do this in a finite map, assigning consecutive numbers to nodes. -} module Agda.Utils.Warshall where import Control.Monad.State import Data.Maybe import Data.Array import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Agda.Syntax.Common (Nat) import Agda.Utils.SemiRing type Matrix a = Array (Int,Int) a -- assuming a square matrix warshall :: SemiRing a => Matrix a -> Matrix a warshall a0 = loop r a0 where b@((r,c),(r',c')) = bounds a0 -- assuming r == c and r' == c' loop k a | k <= r' = loop (k+1) (array b [ ((i,j), (a!(i,j)) `oplus` ((a!(i,k)) `otimes` (a!(k,j)))) | i <- [r..r'], j <- [c..c'] ]) | otherwise = a type AdjList node edge = Map node [(node, edge)] -- | Warshall's algorithm on a graph represented as an adjacency list. warshallG :: (SemiRing edge, Ord node) => AdjList node edge -> AdjList node edge warshallG g = fromMatrix $ warshall m where nodes = zip (List.nub $ Map.keys g ++ map fst (concat $ Map.elems g)) [0..] len = length nodes b = ((0,0), (len - 1,len - 1)) edge i j = do es <- Map.lookup i g foldr oplus Nothing [ Just v | (j', v) <- es, j == j' ] m = array b [ ((n, m), edge i j) | (i, n) <- nodes, (j, m) <- nodes ] fromMatrix matrix = Map.fromList $ do (i, n) <- nodes let es = [ (fst (nodes !! m), e) | m <- [0..len - 1] , Just e <- [matrix ! (n, m)] ] return (i, es) -- | Edge weight in the graph, forming a semi ring. data Weight = Finite Int | Infinite deriving (Eq) inc :: Weight -> Int -> Weight inc Infinite n = Infinite inc (Finite k) n = Finite (k + n) instance Show Weight where show (Finite i) = show i show Infinite = "." instance Ord Weight where a <= Infinite = True Infinite <= b = False Finite a <= Finite b = a <= b instance SemiRing Weight where ozero = Infinite oone = Finite 0 oplus = min otimes Infinite _ = Infinite otimes _ Infinite = Infinite otimes (Finite a) (Finite b) = Finite (a + b) -- constraints --------------------------------------------------- -- | Nodes of the graph are either -- - flexible variables (with identifiers drawn from @Int@), -- - rigid variables (also identified by @Int@s), or -- - constants (like 0, infinity, or anything between). data Node = Rigid Rigid | Flex FlexId deriving (Eq, Ord) data Rigid = RConst Weight | RVar RigidId deriving (Eq, Ord, Show) type NodeId = Int type RigidId = Int type FlexId = Int type Scope = RigidId -> Bool -- ^ Which rigid variables a flex may be instatiated to. instance Show Node where show (Flex i) = "?" ++ show i show (Rigid (RVar i)) = "v" ++ show i show (Rigid (RConst Infinite)) = "#" show (Rigid (RConst (Finite n))) = show n infinite :: Rigid -> Bool infinite (RConst Infinite) = True infinite _ = False -- | @isBelow r w r'@ -- checks, if @r@ and @r'@ are connected by @w@ (meaning @w@ not infinite), -- whether @r + w <= r'@. -- Precondition: not the same rigid variable. isBelow :: Rigid -> Weight -> Rigid -> Bool isBelow _ Infinite _ = True isBelow _ n (RConst Infinite) = True isBelow (RConst (Finite i)) (Finite n) (RConst (Finite j)) = i + n <= j isBelow _ _ _ = False -- rigid variables are not related -- | A constraint is an edge in the graph. data Constraint = NewFlex FlexId Scope | Arc Node Int Node -- ^ For @Arc v1 k v2@ at least one of @v1@ or @v2@ is a @MetaV@ (Flex), -- the other a @MetaV@ or a @Var@ (Rigid). -- If @k <= 0@ this means @suc^(-k) v1 <= v2@ -- otherwise @v1 <= suc^k v3@. instance Show Constraint where show (NewFlex i s) = "SizeMeta(?" ++ show i ++ ")" show (Arc v1 k v2) | k == 0 = show v1 ++ "<=" ++ show v2 | k < 0 = show v1 ++ "+" ++ show (-k) ++ "<=" ++ show v2 | otherwise = show v1 ++ "<=" ++ show v2 ++ "+" ++ show k type Constraints = [Constraint] emptyConstraints :: Constraints emptyConstraints = [] -- graph (matrix) ------------------------------------------------ data Graph = Graph { flexScope :: Map FlexId Scope -- ^ Scope for each flexible var. , nodeMap :: Map Node NodeId -- ^ Node labels to node numbers. , intMap :: Map NodeId Node -- ^ Node numbers to node labels. , nextNode :: NodeId -- ^ Number of nodes @n@. , graph :: NodeId -> NodeId -> Weight -- ^ The edges (restrict to @[0..n[@). } -- | The empty graph: no nodes, edges are all undefined (infinity weight). initGraph :: Graph initGraph = Graph Map.empty Map.empty Map.empty 0 (\ x y -> Infinite) -- | The Graph Monad, for constructing a graph iteratively. type GM = State Graph -- | Add a size meta node. addFlex :: FlexId -> Scope -> GM () addFlex x scope = do modify $ \ st -> st { flexScope = Map.insert x scope (flexScope st) } _ <- addNode (Flex x) return () -- | Lookup identifier of a node. -- If not present, it is added first. addNode :: Node -> GM Int addNode n = do st <- get case Map.lookup n (nodeMap st) of Just i -> return i Nothing -> do let i = nextNode st put $ st { nodeMap = Map.insert n i (nodeMap st) , intMap = Map.insert i n (intMap st) , nextNode = i + 1 } return i -- | @addEdge n1 k n2@ -- improves the weight of egde @n1->n2@ to be at most @k@. -- Also adds nodes if not yet present. addEdge :: Node -> Int -> Node -> GM () addEdge n1 k n2 = do i1 <- addNode n1 i2 <- addNode n2 st <- get let graph' x y = if (x,y) == (i1,i2) then Finite k `oplus` (graph st) x y else graph st x y put $ st { graph = graph' } addConstraint :: Constraint -> GM () addConstraint (NewFlex x scope) = addFlex x scope addConstraint (Arc n1 k n2) = addEdge n1 k n2 buildGraph :: Constraints -> Graph buildGraph cs = execState (mapM_ addConstraint cs) initGraph mkMatrix :: Int -> (Int -> Int -> Weight) -> Matrix Weight mkMatrix n g = array ((0,0),(n-1,n-1)) [ ((i,j), g i j) | i <- [0..n-1], j <- [0..n-1]] -- displaying matrices with row and column labels -------------------- -- | A matrix with row descriptions in @b@ and column descriptions in @c@. data LegendMatrix a b c = LegendMatrix { matrix :: Matrix a , rowdescr :: Int -> b , coldescr :: Int -> c } instance (Show a, Show b, Show c) => Show (LegendMatrix a b c) where show (LegendMatrix m rd cd) = -- first show column description let ((r,c),(r',c')) = bounds m in foldr (\ j s -> "\t" ++ show (cd j) ++ s) "" [c .. c'] ++ -- then output rows foldr (\ i s -> "\n" ++ show (rd i) ++ foldr (\ j t -> "\t" ++ show (m!(i,j)) ++ t) (s) [c .. c']) "" [r .. r'] -- solving the constraints ------------------------------------------- -- | A solution assigns to each flexible variable a size expression -- which is either a constant or a @v + n@ for a rigid variable @v@. type Solution = Map Int SizeExpr emptySolution :: Solution emptySolution = Map.empty extendSolution :: Solution -> Int -> SizeExpr -> Solution extendSolution subst k v = Map.insert k v subst data SizeExpr = SizeVar RigidId Int -- ^ e.g. x + 5 | SizeConst Weight -- ^ a number or infinity instance Show SizeExpr where show (SizeVar n 0) = show (Rigid (RVar n)) show (SizeVar n k) = show (Rigid (RVar n)) ++ "+" ++ show k show (SizeConst w) = show w -- | @sizeRigid r n@ returns the size expression corresponding to @r + n@ sizeRigid :: Rigid -> Int -> SizeExpr sizeRigid (RConst k) n = SizeConst (inc k n) sizeRigid (RVar i) n = SizeVar i n {- apply :: SizeExpr -> Solution -> SizeExpr apply e@(SizeExpr (Rigid _) _) phi = e apply e@(SizeExpr (Flex x) i) phi = case Map.lookup x phi of Nothing -> e Just (SizeExpr v j) -> SizeExpr v (i + j) after :: Solution -> Solution -> Solution after psi phi = Map.map (\ e -> e `apply` phi) psi -} {- compute solution a solution CANNOT exist if v < v for a rigid variable v -- Andreas, 2012-09-19 OUTDATED are: -- v <= v' for rigid variables v,v' -- x < v for a flexible variable x and a rigid variable v thus, for each flexible x, only one of the following cases is possible r+n <= x+m <= infty for a unique rigid r (meaning r --(m-n)--> x) x <= r+n for a unique rigid r (meaning x --(n)--> r) we are looking for the least values for flexible variables that solve the constraints. Algorithm while flexible variables and rigid rows left find a rigid variable row i for all flexible columns j if i --n--> j with n<=0 (meaning i+n <= j) then j = i + n while flexible variables j left search the row j for entry i if j --n--> i with n >= 0 (meaning j <= i + n) then j = i + n -} solve :: Constraints -> Maybe Solution solve cs = -- trace (show cs) $ -- trace (show lm0) $ -- trace (show lm) $ -- trace (show d) $ let solution = if solvable then loop1 flexs rigids emptySolution else Nothing in -- trace (show solution) $ solution where -- compute the graph and its transitive closure m gr = buildGraph cs n = nextNode gr -- number of nodes m0 = mkMatrix n (graph gr) m = warshall m0 -- tracing only: build output version of transitive graph legend i = fromJust $ Map.lookup i (intMap gr) -- trace only lm0 = LegendMatrix m0 legend legend -- trace only lm = LegendMatrix m legend legend -- trace only -- compute the sets of flexible and rigid node numbers ns = Map.keys (nodeMap gr) -- a set of flexible variables flexs = List.foldl' (\ l -> \case (Flex i ) -> i : l (Rigid _) -> l) [] ns -- a set of rigid variables rigids = List.foldl' (\ l -> \case (Flex _ ) -> l (Rigid i) -> i : l) [] ns -- rigid matrix indices rInds = List.foldl' (\ l r -> let Just i = Map.lookup (Rigid r) (nodeMap gr) in i : l) [] rigids -- check whether there is a solution -- d = [ m!(i,i) | i <- [0 .. (n-1)] ] -- diagonal -- a rigid variable might not be less than it self, so no -.. on the -- rigid part of the diagonal solvable = all (\ x -> x >= Finite 0) [ m!(i,i) | i <- rInds ] && True {- Andreas, 2012-09-19 We now can have constraints between rigid variables, like i < j. Thus we skip the following two test. However, a solution must be checked for consistency with the constraints on rigid vars. -- a rigid variable might not be bounded below by infinity or -- bounded above by a constant -- it might not be related to another rigid variable all (\ (r, r') -> r == r' || let Just row = (Map.lookup (Rigid r) (nodeMap gr)) Just col = (Map.lookup (Rigid r') (nodeMap gr)) edge = m!(row,col) in isBelow r edge r' ) [ (r,r') | r <- rigids, r' <- rigids ] && -- a flexible variable might not be strictly below a rigid variable all (\ (x, v) -> let Just row = (Map.lookup (Flex x) (nodeMap gr)) Just col = (Map.lookup (Rigid (RVar v)) (nodeMap gr)) edge = m!(row,col) in edge >= Finite 0) [ (x,v) | x <- flexs, (RVar v) <- rigids ] -} inScope :: FlexId -> Rigid -> Bool inScope x (RConst _) = True inScope x (RVar v) = scope v where Just scope = Map.lookup x (flexScope gr) {- loop1 while flexible variables and rigid rows left find a rigid variable row i for all flexible columns j if i --n--> j with n<=0 (meaning i + n <= j) then j = i + n -} loop1 :: [FlexId] -> [Rigid] -> Solution -> Maybe Solution loop1 [] rgds subst = Just subst loop1 flxs [] subst = loop2 flxs subst loop1 flxs (r:rgds) subst = let row = fromJust $ Map.lookup (Rigid r) (nodeMap gr) (flxs',subst') = List.foldl' (\ (flx,sub) f -> let col = fromJust $ Map.lookup (Flex f) (nodeMap gr) in case (inScope f r, m!(row,col)) of -- Finite z | z <= 0 -> (True, Finite z) -> let trunc z | z >= 0 = 0 | otherwise = -z in (flx, extendSolution sub f (sizeRigid r (trunc z))) _ -> (f : flx, sub) ) ([], subst) flxs in loop1 flxs' rgds subst' {- loop2 while flexible variables j left search the row j for entry i if j --n--> i with n >= 0 (meaning j <= i + n) then j = i -} loop2 :: [FlexId] -> Solution -> Maybe Solution loop2 [] subst = Just subst loop2 (f:flxs) subst = loop3 0 subst where row = fromJust $ Map.lookup (Flex f) (nodeMap gr) loop3 col subst | col >= n = -- default to infinity loop2 flxs (extendSolution subst f (SizeConst Infinite)) loop3 col subst = case Map.lookup col (intMap gr) of Just (Rigid r) | not (infinite r) -> case (inScope f r, m!(row,col)) of (True, Finite z) | z >= 0 -> loop2 flxs (extendSolution subst f (sizeRigid r z)) (_, Infinite) -> loop3 (col+1) subst _ -> -- trace ("unusable rigid: " ++ show r ++ " for flex " ++ show f) Nothing -- NOT: loop3 (col+1) subst _ -> loop3 (col+1) subst Agda-2.6.0.1/src/full/Agda/Utils/WithDefault.hs0000644000000000000000000000253713466402171017154 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} -- | Potentially uninitialised Booleans -- The initial motivation for this small library is to be able to distinguish -- between a boolean option with a default value and an option which has been -- set to what happens to be the default value. In one case the default can be -- overriden (e.g. --cubical implies --without-K) while in the other case the -- user has made a mistake which they need to fix. module Agda.Utils.WithDefault where import Agda.Utils.TypeLits -- We don't want to have to remember for each flag whether its default value -- is True or False. So we bake it into the representation: the flag's type -- will mention its default value as a phantom parameter. data WithDefault (b :: Bool) = Default | Value Bool deriving (Eq, Show) -- The main mode of operation of these flags, apart from setting them explicitly, -- is to toggle them one way or the other if they hadn't been already. setDefault :: Bool -> WithDefault b -> WithDefault b setDefault b t = case t of Default -> Value b _ -> t -- Provided that the default value is a known boolean (in practice we only use -- True or False), we can collapse a potentially uninitialised value to a boolean. collapseDefault :: KnownBool b => WithDefault b -> Bool collapseDefault w = case w of Default -> boolVal w Value b -> b Agda-2.6.0.1/src/full/Agda/Utils/Three.hs0000644000000000000000000000275613466402171016006 0ustar0000000000000000-- | Tools for 3-way partitioning. module Agda.Utils.Three where -- | Enum type with 3 elements. -- data Three = One | Two | Three deriving (Eq, Ord, Show, Bounded, Enum) -- | Partition a list into 3 groups. -- -- Preserves the relative order or elements. -- partition3 :: (a -> Three) -> [a] -> ([a], [a], [a]) partition3 f = loop where loop [] = ([], [], []) loop (x:xs) = case f x of One -> (x:as, bs, cs) Two -> (as, x:bs, cs) Three -> (as, bs, x:cs) where (as, bs, cs) = loop xs -- | Disjoint sum of three. -- data Either3 a b c = In1 a | In2 b | In3 c deriving (Eq, Ord, Show) -- | Partition a list into 3 groups. -- -- Preserves the relative order or elements. -- partitionEithers3 :: [Either3 a b c] -> ([a], [b], [c]) partitionEithers3 = \case [] -> ([], [], []) (x:xs) -> case x of In1 a -> (a:as, bs, cs) In2 b -> (as, b:bs, cs) In3 c -> (as, bs, c:cs) where (as, bs, cs) = partitionEithers3 xs mapEither3M :: Applicative m => (a -> m (Either3 b c d)) -> [a] -> m ([b], [c], [d]) mapEither3M f xs = partitionEithers3 <$> traverse f xs -- mapEither3M f = \case -- [] -> return ([], [], []) -- (x:xs) -> liftA2 (flip prepend) (f x) (mapEither3M f xs) -- where -- prepend (as, bs, cs) = \case -- In1 b -> (b:bs, cs, ds) -- In2 c -> (bs, c:cs, ds) -- In3 d -> (bs, cs, d:ds) forEither3M :: Applicative m => [a] -> (a -> m (Either3 b c d)) -> m ([b], [c], [d]) forEither3M = flip mapEither3M Agda-2.6.0.1/src/full/Agda/Utils/Update.hs0000644000000000000000000001024713466402171016153 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.Utils.Update ( Change , MonadChange(..) , runChange , Updater , sharing , runUpdater , dirty , ifDirty , Updater1(..) , Updater2(..) ) where import Control.Monad.Identity import Control.Monad.Trans import Control.Monad.Writer.Strict import Data.Traversable (Traversable(..), traverse) import Agda.Utils.Tuple -- * Change monad. -- | The class of change monads. class Monad m => MonadChange m where tellDirty :: m () -- ^ Mark computation as having changed something. listenDirty :: m a -> m (a, Bool) -- | The @ChangeT@ monad transformer. newtype ChangeT m a = ChangeT { fromChangeT :: WriterT Any m a } deriving (Functor, Applicative, Monad, MonadTrans) instance Monad m => MonadChange (ChangeT m) where tellDirty = ChangeT $ tell $ Any True listenDirty m = ChangeT $ do (a, Any dirty) <- listen (fromChangeT m) return (a, dirty) -- | A mock change monad. instance MonadChange Identity where tellDirty = Identity () listenDirty (Identity a) = Identity (a, True) -- * Pure endo function and updater type EndoFun a = a -> a type Updater a = a -> Change a -- BEGIN REAL STUFF -- | The @Change@ monad. newtype Change a = Change { fromChange :: Writer Any a } deriving (Functor, Applicative, Monad) instance MonadChange Change where tellDirty = Change $ tell $ Any True listenDirty m = Change $ do (a, Any dirty) <- listen (fromChange m) return (a, dirty) -- | Run a 'Change' computation, returning result plus change flag. runChange :: Change a -> (a, Bool) runChange = mapSnd getAny . runWriter . fromChange -- | Blindly run an updater. runUpdater :: Updater a -> a -> (a, Bool) runUpdater f a = runChange $ f a -- | Mark a computation as dirty. dirty :: Updater a dirty a = do tellDirty return a {-# SPECIALIZE ifDirty :: Change a -> (a -> Change b) -> (a -> Change b) -> Change b #-} {-# SPECIALIZE ifDirty :: Identity a -> (a -> Identity b) -> (a -> Identity b) -> Identity b #-} ifDirty :: MonadChange m => m a -> (a -> m b) -> (a -> m b) -> m b ifDirty m f g = do (a, dirty) <- listenDirty m if dirty then f a else g a -- * Proper updater (Q-combinators) -- | Replace result of updating with original input if nothing has changed. sharing :: Updater a -> Updater a sharing f a = do (a', changed) <- listenDirty $ f a return $ if changed then a' else a -- | Eval an updater (using 'sharing'). evalUpdater :: Updater a -> EndoFun a evalUpdater f a = fst $ runWriter $ fromChange $ sharing f a -- END REAL STUFF -- * Updater transformer classes -- ** Unary (functors) -- | Like 'Functor', but preserving sharing. class Traversable f => Updater1 f where updater1 :: Updater a -> Updater (f a) updates1 :: Updater a -> Updater (f a) -- ^ @= sharing . updater1@ update1 :: Updater a -> EndoFun (f a) updater1 = traverse updates1 f = sharing $ updater1 f update1 f = evalUpdater $ updater1 f instance Updater1 Maybe where instance Updater1 [] where updater1 f [] = return [] updater1 f (x : xs) = (:) <$> f x <*> updates1 f xs -- ** Binary (bifunctors) -- | Like 'Bifunctor', but preserving sharing. class Updater2 f where updater2 :: Updater a -> Updater b -> Updater (f a b) updates2 :: Updater a -> Updater b -> Updater (f a b) update2 :: Updater a -> Updater b -> EndoFun (f a b) updates2 f1 f2 = sharing $ updater2 f1 f2 update2 f1 f2 = evalUpdater $ updater2 f1 f2 instance Updater2 (,) where updater2 f1 f2 (a,b) = (,) <$> sharing f1 a <*> sharing f2 b instance Updater2 Either where updater2 f1 f2 (Left a) = Left <$> f1 a updater2 f1 f2 (Right b) = Right <$> f2 b {-- BEGIN MOCK -- * Mock updater type Change = Identity -- | Replace result of updating with original input if nothing has changed. {-# INLINE sharing #-} sharing :: Updater a -> Updater a sharing f a = f a -- | Run an updater. {-# INLINE evalUpdater #-} evalUpdater :: Updater a -> EndoFun a evalUpdater f a = runIdentity (f a) -- | Mark a computation as dirty. {-# INLINE dirty #-} dirty :: Updater a dirty = Identity {-# INLINE ifDirty #-} ifDirty :: Identity a -> (a -> Identity b) -> (a -> Identity b) -> Identity b ifDirty m f g = m >>= f -- END MOCK -} Agda-2.6.0.1/src/full/Agda/Utils/Tuple.hs0000644000000000000000000000327213466402171016022 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.Utils.Tuple where import Data.Foldable import Data.Traversable infix 2 -*- infix 3 /\ -- backslashes at EOL interact badly with CPP... -- | Bifunctoriality for pairs. (-*-) :: (a -> c) -> (b -> d) -> (a,b) -> (c,d) (f -*- g) ~(x,y) = (f x, g y) -- | @mapFst f = f -*- id@ mapFst :: (a -> c) -> (a,b) -> (c,b) mapFst f ~(x,y) = (f x, y) -- | @mapSnd g = id -*- g@ mapSnd :: (b -> d) -> (a,b) -> (a,d) mapSnd g ~(x,y) = (x, g y) -- | Lifted pairing. (/\) :: (a -> b) -> (a -> c) -> a -> (b,c) (f /\ g) x = (f x, g x) -- | Swap. (Only in Data.Tuple from base-4.3) swap :: (a,b) -> (b,a) swap ~(a,b) = (b,a) -- * Triple (stolen from Data.Tuple.HT) {-# INLINE fst3 #-} fst3 :: (a,b,c) -> a fst3 ~(x,_,_) = x {-# INLINE snd3 #-} snd3 :: (a,b,c) -> b snd3 ~(_,x,_) = x {-# INLINE thd3 #-} thd3 :: (a,b,c) -> c thd3 ~(_,_,x) = x {-# INLINE uncurry3 #-} uncurry3 :: (a -> b -> c -> d) -> (a,b,c) -> d uncurry3 f ~(x,y,z) = f x y z {-# INLINE uncurry4 #-} uncurry4 :: (a -> b -> c -> d -> e) -> (a,b,c,d) -> e uncurry4 f ~(w,x,y,z) = f w x y z -- | Monadic version of '-*-'. mapPairM :: (Applicative m) => (a -> m c) -> (b -> m d) -> (a,b) -> m (c,d) mapPairM f g ~(a,b) = (,) <$> f a <*> g b -- | Monadic 'mapFst'. mapFstM :: (Applicative m) => (a -> m c) -> (a,b) -> m (c,b) mapFstM f ~(a,b) = (,b) <$> f a -- | Monadic 'mapSnd'. mapSndM :: (Applicative m) => (b -> m d) -> (a,b) -> m (a,d) mapSndM f ~(a,b) = (a,) <$> f b newtype List2 a = List2 { list2 :: (a,a) } deriving (Eq, Functor, Foldable, Traversable) instance Applicative List2 where pure a = List2 (a,a) (List2 (f,f')) <*> (List2 (a,a')) = List2 (f a, f' a') Agda-2.6.0.1/src/full/Agda/Utils/Hash.hs0000644000000000000000000000215213466402171015610 0ustar0000000000000000 {-| Instead of checking time-stamps we compute a hash of the module source and store it in the interface file. This module contains the functions to do that. -} module Agda.Utils.Hash where import Data.ByteString as B import Data.Word import qualified Data.Hash as H import qualified Data.List as L import Data.Digest.Murmur64 import qualified Data.Text.Encoding as T import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import Agda.Utils.FileName import Agda.Utils.IO.UTF8 (readTextFile) type Hash = Word64 hashByteString :: ByteString -> Hash hashByteString = H.asWord64 . B.foldl' (\h b -> H.combine h (H.hashWord8 b)) (H.hashWord8 0) hashTextFile :: AbsolutePath -> IO Hash hashTextFile file = do s <- readTextFile (filePath file) return $ hashText s -- | Hashes a piece of 'Text'. hashText :: Text -> Hash hashText = hashByteString . T.encodeUtf8 . T.toStrict combineHashes :: [Hash] -> Hash combineHashes hs = H.asWord64 $ L.foldl' H.combine (H.hashWord8 0) $ L.map H.hash hs -- | Hashing a module name for unique identifiers. hashString :: String -> Word64 hashString = asWord64 . hash64 Agda-2.6.0.1/src/full/Agda/Utils/Bag.hs0000644000000000000000000001176513466402171015430 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | A simple overlay over Data.Map to manage unordered sets with duplicates. module Agda.Utils.Bag where import Prelude hiding (null, map) import Control.Applicative hiding (empty) import Text.Show.Functions () import Data.Foldable (Foldable(foldMap)) import Data.Functor.Identity import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Semigroup import qualified Data.Set as Set import Data.Traversable import Agda.Utils.Functor #include "undefined.h" import Agda.Utils.Impossible -- | A set with duplicates. -- Faithfully stores elements which are equal with regard to (==). newtype Bag a = Bag { bag :: Map a [a] -- ^ The list contains all occurrences of @a@ (not just the duplicates!). -- Hence, the invariant: the list is never empty. } deriving (Eq, Ord) -- The list contains all occurrences of @a@ (not just the duplicates!). -- Hence the invariant: the list is never empty. -- -- This is slightly wasteful, but much easier to implement -- in terms of @Map@ as the alternative, which is to store -- only the duplicates in the list. -- See, e.g., implementation of 'union' which would be impossible -- to do in the other representation. We would need a -- 'Map.unionWithKey' that passes us *both* keys. -- But Map works under the assumption that Eq for keys is identity, -- it does not honor information in keys that goes beyond Ord. ------------------------------------------------------------------------ -- * Query ------------------------------------------------------------------------ -- | Is the bag empty? null :: Bag a -> Bool null = Map.null . bag -- | Number of elements in the bag. Duplicates count. O(n). size :: Bag a -> Int size = getSum . foldMap (Sum . length) . bag -- | @(bag ! a)@ finds all elements equal to @a@. O(log n). -- Total function, returns @[]@ if none are. (!) :: Ord a => Bag a -> a -> [a] Bag b ! a = Map.findWithDefault [] a b -- | O(log n). member :: Ord a => a -> Bag a -> Bool member a = not . notMember a -- | O(log n). notMember :: Ord a => a -> Bag a -> Bool notMember a b = List.null (b ! a) -- | Return the multiplicity of the given element. O(log n + count _ _). count :: Ord a => a -> Bag a -> Int count a b = length (b ! a) ------------------------------------------------------------------------ -- * Construction ------------------------------------------------------------------------ -- | O(1) empty :: Bag a empty = Bag $ Map.empty -- | O(1) singleton :: a -> Bag a singleton a = Bag $ Map.singleton a [a] union :: Ord a => Bag a -> Bag a -> Bag a union (Bag b) (Bag c) = Bag $ Map.unionWith (++) b c unions :: Ord a => [Bag a] -> Bag a unions = Bag . Map.unionsWith (++) . List.map bag -- | @insert a b = union b (singleton a)@ insert :: Ord a => a -> Bag a -> Bag a insert a = Bag . Map.insertWith (++) a [a] . bag -- | @fromList = unions . map singleton@ fromList :: Ord a => [a] -> Bag a fromList = Bag . Map.fromListWith (++) . List.map (\ a -> (a,[a])) ------------------------------------------------------------------------ -- * Destruction ------------------------------------------------------------------------ -- | Returns the elements of the bag, grouped by equality (==). groups :: Bag a -> [[a]] groups = Map.elems . bag -- | Returns the bag, with duplicates. toList :: Bag a -> [a] toList = concat . groups -- | Returns the bag without duplicates. keys :: Bag a -> [a] keys = Map.keys . bag -- Works because of the invariant! -- keys = catMaybes . map headMaybe . Map.elems . bag -- -- Map.keys does not work, as zero copies @(a,[])@ -- -- should count as not present in the bag. -- | Returns the bag, with duplicates. elems :: Bag a -> [a] elems = toList toAscList :: Bag a -> [a] toAscList = toList ------------------------------------------------------------------------ -- * Traversal ------------------------------------------------------------------------ map :: Ord b => (a -> b) -> Bag a -> Bag b map f = Bag . Map.fromListWith (++) . List.map ff . Map.elems . bag where ff (a : as) = (b, b : List.map f as) where b = f a ff [] = __IMPOSSIBLE__ traverse' :: forall a b m . (Applicative m, Ord b) => (a -> m b) -> Bag a -> m (Bag b) traverse' f = (Bag . Map.fromListWith (++)) <.> traverse trav . Map.elems . bag where trav :: [a] -> m (b, [b]) trav (a : as) = (\ b bs -> (b, b:bs)) <$> f a <*> traverse f as trav [] = __IMPOSSIBLE__ ------------------------------------------------------------------------ -- Instances ------------------------------------------------------------------------ instance Show a => Show (Bag a) where showsPrec _ (Bag b) = ("Agda.Utils.Bag.Bag (" ++) . showsPrec 0 b . (')':) instance Ord a => Semigroup (Bag a) where (<>) = union instance Ord a => Monoid (Bag a) where mempty = empty mappend = (<>) mconcat = unions instance Foldable Bag where foldMap f = foldMap f . toList -- not a Functor (only works for 'Ord'ered types) -- not Traversable (only works for 'Ord'ered types) Agda-2.6.0.1/src/full/Agda/Utils/Memo.hs0000644000000000000000000000315713466402171015630 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Utils.Memo where import Control.Monad.State import System.IO.Unsafe import Data.IORef import qualified Data.Map as Map import qualified Agda.Utils.HashMap as HMap import Data.Hashable import Agda.Utils.Lens -- Simple memoisation in a state monad -- | Simple, non-reentrant memoisation. memo :: MonadState s m => Lens' (Maybe a) s -> m a -> m a memo tbl compute = do mv <- use tbl case mv of Just x -> return x Nothing -> do x <- compute x <$ (tbl .= Just x) -- | Recursive memoisation, second argument is the value you get -- on recursive calls. memoRec :: MonadState s m => Lens' (Maybe a) s -> a -> m a -> m a memoRec tbl ih compute = do mv <- use tbl case mv of Just x -> return x Nothing -> do tbl .= Just ih x <- compute x <$ (tbl .= Just x) {-# NOINLINE memoUnsafe #-} memoUnsafe :: Ord a => (a -> b) -> (a -> b) memoUnsafe f = unsafePerformIO $ do tbl <- newIORef Map.empty return (unsafePerformIO . f' tbl) where f' tbl x = do m <- readIORef tbl case Map.lookup x m of Just y -> return y Nothing -> do let y = f x writeIORef tbl (Map.insert x y m) return y {-# NOINLINE memoUnsafeH #-} memoUnsafeH :: (Eq a, Hashable a) => (a -> b) -> (a -> b) memoUnsafeH f = unsafePerformIO $ do tbl <- newIORef HMap.empty return (unsafePerformIO . f' tbl) where f' tbl x = do m <- readIORef tbl case HMap.lookup x m of Just y -> return y Nothing -> do let y = f x writeIORef tbl (HMap.insert x y m) return y Agda-2.6.0.1/src/full/Agda/Utils/Float.hs0000644000000000000000000000153613466402171015777 0ustar0000000000000000-- | Logically consistent comparison of floating point numbers. module Agda.Utils.Float where import Numeric.IEEE ( IEEE(identicalIEEE) ) floatEq :: Double -> Double -> Bool floatEq x y = identicalIEEE x y || (isNaN x && isNaN y) floatLt :: Double -> Double -> Bool floatLt x y = case compareFloat x y of LT -> True _ -> False where -- Also implemented in the GHC backend compareFloat :: Double -> Double -> Ordering compareFloat x y | identicalIEEE x y = EQ | isNegInf x = LT | isNegInf y = GT | isNaN x && isNaN y = EQ | isNaN x = LT | isNaN y = GT | otherwise = compare (x, isNegZero y) (y, isNegZero x) isNegInf z = z < 0 && isInfinite z isNegZero z = identicalIEEE z (-0.0) Agda-2.6.0.1/src/full/Agda/Utils/Time.hs0000644000000000000000000000263013466402171015624 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- To avoid warning on derived Integral instance for CPUTime. {-# OPTIONS_GHC -fno-warn-identities #-} -- | Time-related utilities. module Agda.Utils.Time ( ClockTime , getClockTime , getCPUTime , measureTime , CPUTime(..) , fromMilliseconds ) where import Control.Monad.Trans import qualified System.CPUTime as CPU import Data.Functor import qualified Data.Time import Agda.Utils.Pretty import Agda.Utils.String -- | Timestamps. type ClockTime = Data.Time.UTCTime -- | The current time. getClockTime :: IO ClockTime getClockTime = Data.Time.getCurrentTime -- | CPU time in pico (10^-12) seconds. newtype CPUTime = CPUTime Integer deriving (Eq, Show, Ord, Num, Real, Enum, Integral) fromMilliseconds :: Integer -> CPUTime fromMilliseconds n = CPUTime (n * 1000000000) -- | Print CPU time in milli (10^-3) seconds. instance Pretty CPUTime where pretty (CPUTime ps) = text $ showThousandSep (div ps 1000000000) ++ "ms" {-# SPECIALIZE getCPUTime :: IO CPUTime #-} getCPUTime :: MonadIO m => m CPUTime getCPUTime = liftIO $ CPUTime <$> CPU.getCPUTime -- | Measure the time of a computation. -- Of course, does not work with exceptions. measureTime :: MonadIO m => m a -> m (a, CPUTime) measureTime m = do start <- liftIO $ getCPUTime x <- m stop <- liftIO $ getCPUTime return (x, stop - start) Agda-2.6.0.1/src/full/Agda/Utils/Size.hs0000644000000000000000000000325413466402171015643 0ustar0000000000000000-- | Collection size. -- -- For 'TermSize' see "Agda.Syntax.Internal". module Agda.Utils.Size ( Sized(..) , SizedThing(..) , sizeThing ) where import Prelude hiding (null) import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Sequence (Seq) import qualified Data.Sequence as Seq import qualified Data.List as List import Agda.Utils.Null -- | The size of a collection (i.e., its length). class Sized a where size :: a -> Int instance Sized [a] where size = List.genericLength instance Sized (IntMap a) where size = IntMap.size instance Sized IntSet where size = IntSet.size instance Sized (Map k a) where size = Map.size instance Sized (Set a) where size = Set.size instance Sized (HashMap k a) where size = HashMap.size instance Sized (HashSet a) where size = HashSet.size instance Sized (Seq a) where size = Seq.length -- | Thing decorated with its size. -- The thing should fit into main memory, thus, the size is an @Int@. data SizedThing a = SizedThing { theSize :: !Int , sizedThing :: a } -- | Cache the size of an object. sizeThing :: Sized a => a -> SizedThing a sizeThing a = SizedThing (size a) a -- | Return the cached size. instance Sized (SizedThing a) where size = theSize instance Null a => Null (SizedThing a) where empty = SizedThing 0 empty null = null . sizedThing Agda-2.6.0.1/src/full/Agda/Utils/Zipper.hs0000644000000000000000000000343513466402171016203 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} module Agda.Utils.Zipper where import Data.Traversable (Traversable) class Zipper z where type Carrier z type Element z firstHole :: Carrier z -> Maybe (Element z, z) plugHole :: Element z -> z -> Carrier z nextHole :: Element z -> z -> Either (Carrier z) (Element z, z) data ListZipper a = ListZip [a] [a] deriving (Eq, Ord, Show, Functor, Foldable, Traversable) instance Zipper (ListZipper a) where type Carrier (ListZipper a) = [a] type Element (ListZipper a) = a firstHole (x : xs) = Just (x, ListZip [] xs) firstHole [] = Nothing plugHole x (ListZip ys zs) = reverse ys ++ x : zs nextHole x (ListZip ys []) = Left (reverse (x : ys)) nextHole x (ListZip ys (z : zs)) = Right (z, ListZip (x : ys) zs) data ComposeZipper f g = ComposeZip f g instance (Zipper f, Zipper g, Element f ~ Carrier g) => Zipper (ComposeZipper f g) where type Carrier (ComposeZipper f g) = Carrier f type Element (ComposeZipper f g) = Element g firstHole c1 = do (c2, z1) <- firstHole c1 go c2 z1 where go c2 z1 = case firstHole c2 of Nothing -> case nextHole c2 z1 of Left{} -> Nothing Right (c2', z1') -> go c2' z1' Just (x, z2) -> Just (x, ComposeZip z1 z2) plugHole x (ComposeZip z1 z2) = plugHole (plugHole x z2) z1 nextHole x (ComposeZip z1 z2) = case nextHole x z2 of Right (y, z2') -> Right (y, ComposeZip z1 z2') Left c2 -> go c2 z1 where go c2 z1 = case nextHole c2 z1 of Right (c2', z1') -> case firstHole c2' of Nothing -> go c2' z1' Just (x, z2') -> Right (x, ComposeZip z1' z2') Left c1 -> Left c1 Agda-2.6.0.1/src/full/Agda/Utils/FileName.hs0000644000000000000000000000641513466402171016413 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| Operations on file names. -} module Agda.Utils.FileName ( AbsolutePath(AbsolutePath) , filePath , mkAbsolute , absolute , (===) , doesFileExistCaseSensitive , rootPath ) where import System.Directory import System.FilePath #ifdef mingw32_HOST_OS import Control.Exception (bracket) import System.Win32 (findFirstFile, findClose, getFindDataFileName) #endif import Data.Text (Text) import qualified Data.Text as Text import Data.Function import Data.Hashable (Hashable) import Data.Data (Data) import Agda.Utils.Monad import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- | Paths which are known to be absolute. -- -- Note that the 'Eq' and 'Ord' instances do not check if different -- paths point to the same files or directories. newtype AbsolutePath = AbsolutePath { byteStringPath :: Text } deriving (Eq, Ord, Data, Hashable) -- | Extract the 'AbsolutePath' to be used as 'FilePath'. filePath :: AbsolutePath -> FilePath filePath = Text.unpack . byteStringPath -- TODO: 'Show' should output Haskell-parseable representations. -- The following instance is deprecated, and Pretty should be used -- instead. Later, simply derive Show for this type. instance Show AbsolutePath where show = filePath instance Pretty AbsolutePath where pretty = text . filePath -- | Constructs 'AbsolutePath's. -- -- Precondition: The path must be absolute and valid. mkAbsolute :: FilePath -> AbsolutePath mkAbsolute f | isAbsolute f = AbsolutePath $ Text.pack $ dropTrailingPathSeparator $ normalise f | otherwise = __IMPOSSIBLE__ rootPath :: FilePath #ifdef mingw32_HOST_OS rootPath = joinDrive "C:" [pathSeparator] #else rootPath = [pathSeparator] #endif -- | maps @/bla/bla/bla/foo.bar.xxx@ to @foo.bar@. rootName :: AbsolutePath -> String rootName = dropExtension . snd . splitFileName . filePath -- | Makes the path absolute. -- -- This function may raise an @\_\_IMPOSSIBLE\_\_@ error if -- 'canonicalizePath' does not return an absolute path. absolute :: FilePath -> IO AbsolutePath absolute f = mkAbsolute <$> do -- canonicalizePath sometimes truncates paths pointing to -- non-existing files/directories. ex <- doesFileExist f .||. doesDirectoryExist f if ex then canonicalizePath f else do cwd <- getCurrentDirectory return (cwd f) where m1 .||. m2 = do b1 <- m1 if b1 then return True else m2 -- | Tries to establish if the two file paths point to the same file -- (or directory). infix 4 === (===) :: AbsolutePath -> AbsolutePath -> Bool (===) = equalFilePath `on` filePath -- | Case-sensitive 'doesFileExist' for Windows. -- -- This is case-sensitive only on the file name part, not on the directory part. -- (Ideally, path components coming from module name components should be -- checked case-sensitively and the other path components should be checked -- case insensitively.) doesFileExistCaseSensitive :: FilePath -> IO Bool #ifdef mingw32_HOST_OS doesFileExistCaseSensitive f = do doesFileExist f `and2M` do bracket (findFirstFile f) (findClose . fst) $ fmap (takeFileName f ==) . getFindDataFileName . snd #else doesFileExistCaseSensitive f = doesFileExist f #endif Agda-2.6.0.1/src/full/Agda/Utils/Function.hs0000644000000000000000000001014113466402171016507 0ustar0000000000000000 module Agda.Utils.Function where -- | Repeat a state transition @f :: a -> (b, a)@ with output @b@ -- while condition @cond@ on the output is true. -- Return all intermediate results and the final result -- where @cond@ is @False@. -- -- Postconditions (when it terminates): -- @fst (last (iterWhile cond f a)) == False@. -- @all fst (init (interWhile cond f a))@. iterWhile :: (b -> Bool) -> (a -> (b, a)) -> a -> [(b,a)] iterWhile cond f = loop where loop a = r : if cond b then loop a' else [] where r@(b, a') = f a -- | Repeat something while a condition on some state is true. -- Return the last state (including the changes of the last -- transition, even if the condition became false then). repeatWhile :: (a -> (Bool, a)) -> a -> a repeatWhile f = loop where loop a = if again then loop a' else a' where (again, a') = f a -- | Monadic version of 'repeatWhile'. repeatWhileM :: (Monad m) => (a -> m (Bool, a)) -> a -> m a repeatWhileM f = loop where loop a = do (again, a') <- f a if again then loop a' else return a' -- | A version of the trampoline function. -- -- The usual function iterates @f :: a -> Maybe a@ as long -- as @Just{}@ is returned, and returns the last value of @a@ -- upon @Nothing@. -- -- @usualTrampoline f = trampolineWhile $ \ a -> maybe (False,a) (True,) (f a)@. -- -- @trampolineWhile@ is very similar to @repeatWhile@, only that -- it discards the state on which the condition went @False@, -- and returns the last state on which the condition was @True@. trampolineWhile :: (a -> (Bool, a)) -> a -> a trampolineWhile f = repeatWhile $ \ a -> let (again, a') = f a in (again,) $ if again then a' else a -- | Monadic version of 'trampolineWhile'. trampolineWhileM :: (Monad m) => (a -> m (Bool, a)) -> a -> m a trampolineWhileM f = repeatWhileM $ \ a -> do (again, a') <- f a return $ (again,) $ if again then a' else a -- | More general trampoline, which allows some final computation -- from iteration state @a@ into result type @b@. trampoline :: (a -> Either b a) -> a -> b trampoline f = loop where loop a = either id loop $ f a -- | Monadic version of 'trampoline'. trampolineM :: Monad m => (a -> m (Either b a)) -> a -> m b trampolineM f = loop where loop a = either return loop =<< f a -- | Iteration to fixed-point. -- -- @iterateUntil r f a0@ iterates endofunction @f@, starting with @a0@, -- until @r@ relates its result to its input, i.e., @f a `r` a@. -- -- This is the generic pattern behind saturation algorithms. -- -- If @f@ is monotone with regard to @r@, -- meaning @a `r` b@ implies @f a `r` f b@, -- and @f@-chains starting with @a0@ are finite -- then iteration is guaranteed to terminate. -- -- A typical instance will work on sets, and @r@ could be set inclusion, -- and @a0@ the empty set, and @f@ the step function of a saturation algorithm. iterateUntil :: (a -> a -> Bool) -> (a -> a) -> a -> a iterateUntil r f = loop where loop a = if r a' a then a' else loop a' where a' = f a -- | Monadic version of 'iterateUntil'. iterateUntilM :: Monad m => (a -> a -> Bool) -> (a -> m a) -> a -> m a iterateUntilM r f = loop where loop a = do a' <- f a if r a' a then return a' else loop a' -- | @'iterate'' n f x@ applies @f@ to @x@ @n@ times and returns the -- result. -- -- The applications are calculated strictly. iterate' :: Integral i => i -> (a -> a) -> a -> a iterate' 0 f x = x iterate' n f x | n > 0 = iterate' (n - 1) f $! f x | otherwise = error "iterate': Negative input." -- * Iteration over Booleans. -- | @applyWhen b f a@ applies @f@ to @a@ when @b@. applyWhen :: Bool -> (a -> a) -> a -> a applyWhen b f = if b then f else id -- | @applyUnless b f a@ applies @f@ to @a@ unless @b@. applyUnless :: Bool -> (a -> a) -> a -> a applyUnless b f = if b then id else f -- | Monadic version of @applyWhen@ applyWhenM :: (Monad m) => m Bool -> (m a -> m a) -> m a -> m a applyWhenM mb f x = mb >>= \ b -> applyWhen b f x -- | Monadic version of @applyUnless@ applyUnlessM :: (Monad m) => m Bool -> (m a -> m a) -> m a -> m a applyUnlessM mb f x = mb >>= \ b -> applyUnless b f x Agda-2.6.0.1/src/full/Agda/Utils/SemiRing.hs0000644000000000000000000000156113466402171016445 0ustar0000000000000000module Agda.Utils.SemiRing where -- | Semirings (). class SemiRing a where ozero :: a oone :: a oplus :: a -> a -> a otimes :: a -> a -> a instance SemiRing () where ozero = () oone = () oplus _ _ = () otimes _ _ = () instance SemiRing a => SemiRing (Maybe a) where ozero = Nothing oone = Just oone oplus Nothing y = y oplus x Nothing = x oplus (Just x) (Just y) = Just (oplus x y) otimes Nothing _ = Nothing otimes _ Nothing = Nothing otimes (Just x) (Just y) = Just (otimes x y) -- | Star semirings -- (). class SemiRing a => StarSemiRing a where ostar :: a -> a instance StarSemiRing () where ostar _ = () instance StarSemiRing a => StarSemiRing (Maybe a) where ostar Nothing = oone ostar (Just x) = Just (ostar x) Agda-2.6.0.1/src/full/Agda/Utils/Functor.hs0000644000000000000000000000505513466402171016352 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Utilities for functors. module Agda.Utils.Functor ( module Agda.Utils.Functor , (<$>) -- from Data.Functor , ($>) -- from Data.Functor #if MIN_VERSION_base(4,11,0) , (<&>) -- from Data.Functor #endif ) where import Control.Applicative ( Const(Const), getConst ) import Data.Functor import Data.Functor.Identity import Data.Functor.Compose import Data.Functor.Classes infixr 9 <.> -- | Composition: pure function after functorial (monadic) function. (<.>) :: Functor m => (b -> c) -> (a -> m b) -> a -> m c (f <.> g) a = f <$> g a -- | The true pure @for@ loop. -- 'Data.Traversable.for' is a misnomer, it should be @forA@. for :: Functor m => m a -> (a -> b) -> m b for = flip fmap #if !MIN_VERSION_base(4,11,0) infixl 1 <&> -- | Infix version of 'for'. (<&>) :: Functor m => m a -> (a -> b) -> m b (<&>) = for #endif -- | A decoration is a functor that is traversable into any functor. -- -- The 'Functor' superclass is given because of the limitations -- of the Haskell class system. -- @traverseF@ actually implies functoriality. -- -- Minimal complete definition: @traverseF@ or @distributeF@. class Functor t => Decoration t where -- | @traverseF@ is the defining property. traverseF :: Functor m => (a -> m b) -> t a -> m (t b) traverseF f = distributeF . fmap f -- | Decorations commute into any functor. distributeF :: (Functor m) => t (m a) -> m (t a) distributeF = traverseF id -- | Any decoration is traversable with @traverse = traverseF@. -- Just like any 'Traversable' is a functor, so is -- any decoration, given by just @traverseF@, a functor. dmap :: Decoration t => (a -> b) -> t a -> t b dmap f = runIdentity . traverseF (Identity . f) -- | Any decoration is a lens. @set@ is a special case of @dmap@. dget :: Decoration t => t a -> a dget = getConst . traverseF Const -- | The identity functor is a decoration. instance Decoration Identity where traverseF f (Identity x) = Identity <$> f x -- | Decorations compose. (Thus, they form a category.) instance (Decoration d, Decoration t) => Decoration (Compose d t) where -- traverseF . traverseF :: Functor m => (a -> m b) -> d (t a) -> m (d (t a)) traverseF f (Compose x) = Compose <$> traverseF (traverseF f) x -- Not a decoration are: -- -- * The constant functor. -- * Maybe. Can only be traversed into pointed functors. -- * Other disjoint sum types, like lists etc. -- (Can only be traversed into Applicative.) -- | A typical decoration is pairing with some stuff. instance Decoration ((,) a) where traverseF f (a, x) = (a,) <$> f x Agda-2.6.0.1/src/full/Agda/Utils/VarSet.hs0000644000000000000000000000226513466402171016136 0ustar0000000000000000 -- | Var field implementation of sets of (small) natural numbers. module Agda.Utils.VarSet ( VarSet , union, unions, member, empty, delete, singleton , fromList, toList, toDescList , isSubsetOf, IntSet.null , intersection, difference , Agda.Utils.VarSet.subtract ) where import Data.IntSet as IntSet type VarSet = IntSet subtract :: Int -> VarSet -> VarSet subtract n = IntSet.map (Prelude.subtract n) {- import Data.Bits type VarSet = Integer type Var = Integer union :: VarSet -> VarSet -> VarSet union = (.|.) member :: Var -> VarSet -> Bool member b s = testVar s (fromIntegral b) empty :: VarSet empty = 0 delete :: Var -> VarSet -> VarSet delete b s = clearVar s (fromIntegral b) singleton :: Var -> VarSet singleton = bit subtract :: Int -> VarSet -> VarSet subtract n s = shiftR s n fromList :: [Var] -> VarSet fromList = foldr (union . singleton . fromIntegral) empty isSubsetOf :: VarSet -> VarSet -> Bool isSubsetOf s1 s2 = 0 == (s1 .&. complement s2) toList :: VarSet -> [Var] toList s = loop 0 s where loop i 0 = [] loop i n | testVar n 0 = fromIntegral i : (loop $! i + 1) (shiftR n 1) | otherwise = (loop $! i + 1) (shiftR n 1) -} Agda-2.6.0.1/src/full/Agda/Utils/Monoid.hs0000644000000000000000000000071513466402171016155 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | More monoids. module Agda.Utils.Monoid where import Data.Semigroup (Semigroup(..)) import Data.Monoid (Monoid(..)) -- | Maximum of on-negative (small) natural numbers. newtype MaxNat = MaxNat { getMaxNat :: Int } deriving (Num, Eq, Ord, Show, Enum) instance Semigroup MaxNat where (<>) = max instance Monoid MaxNat where mempty = 0 mappend = (<>) mconcat [] = 0 mconcat ms = maximum ms Agda-2.6.0.1/src/full/Agda/Utils/List.hs0000644000000000000000000003513613466402171015650 0ustar0000000000000000{-# LANGUAGE ScopedTypeVariables #-} -- | Utility functions for lists. module Agda.Utils.List where import Control.Arrow (first) import Data.Functor ((<$>)) import Data.Function import qualified Data.List as List import Data.Maybe import qualified Data.Map as Map import qualified Data.Set as Set import Text.Show.Functions () import qualified Agda.Utils.Bag as Bag import Agda.Utils.Tuple -- | Append a single element at the end. -- Time: O(length); use only on small lists. snoc :: [a] -> a -> [a] snoc xs x = xs ++ [x] -- | Case distinction for lists, with list first. -- Cf. 'Agda.Utils.Null.ifNull'. caseList :: [a] -> b -> (a -> [a] -> b) -> b caseList xs n c = listCase n c xs -- | Case distinction for lists, with list first. -- Cf. 'Agda.Utils.Null.ifNull'. caseListM :: Monad m => m [a] -> m b -> (a -> [a] -> m b) -> m b caseListM mxs n c = listCase n c =<< mxs -- | Case distinction for lists, with list last. listCase :: b -> (a -> [a] -> b) -> [a] -> b listCase n c [] = n listCase n c (x:xs) = c x xs -- | Head function (safe). headMaybe :: [a] -> Maybe a headMaybe = listToMaybe -- | Head function (safe). Returns a default value on empty lists. -- -- > headWithDefault 42 [] = 42 -- > headWithDefault 42 [1,2,3] = 1 headWithDefault :: a -> [a] -> a headWithDefault def = fromMaybe def . headMaybe -- | Tail function (safe). tailMaybe :: [a] -> Maybe [a] tailMaybe = fmap snd . uncons -- | Tail function (safe). Returns a default list on empty lists. tailWithDefault :: [a] -> [a] -> [a] tailWithDefault def = fromMaybe def . tailMaybe -- | Last element (safe). lastMaybe :: [a] -> Maybe a lastMaybe [] = Nothing lastMaybe xs = Just $ last xs -- | Last two elements (safe). last2 :: [a] -> Maybe (a, a) last2 (x : y : xs) = Just $ loop x y xs where loop x y [] = (x, y) loop x y (z:xs) = loop y z xs last2 _ = Nothing -- | Drop from the end of a list. -- @dropEnd n = reverse . drop n . reverse@ -- (Forces the whole list even for @n==0@.) dropEnd :: forall a. Int -> [a] -> [a] dropEnd n = snd . foldr f (n, []) where f :: a -> (Int, [a]) -> (Int, [a]) f x (n, xs) | n <= 0 = (0, x:xs) | otherwise = (n-1, xs) -- | Opposite of cons @(:)@, safe. uncons :: [a] -> Maybe (a, [a]) uncons [] = Nothing uncons (x:xs) = Just (x,xs) -- | Maybe cons. @mcons ma as = maybeToList ma ++ as@ mcons :: Maybe a -> [a] -> [a] mcons ma as = maybe as (:as) ma -- | 'init' and 'last' in one go, safe. initLast :: [a] -> Maybe ([a],a) initLast [] = Nothing initLast (a:as) = Just $ loop a as where loop a [] = ([], a) loop a (b : bs) = mapFst (a:) $ loop b bs -- | init, safe. initMaybe :: [a] -> Maybe [a] initMaybe = fmap fst . initLast -- | Lookup function (partially safe). (!!!) :: [a] -> Int -> Maybe a [] !!! _ = Nothing (x : _) !!! 0 = Just x (_ : xs) !!! n = xs !!! (n - 1) -- | Lookup function with default value for index out of range. -- The name is chosen akin to 'Data.List.genericIndex'. indexWithDefault :: a -> [a] -> Int -> a indexWithDefault a [] _ = a indexWithDefault a (x : _) 0 = x indexWithDefault a (_ : xs) n = indexWithDefault a xs (n - 1) -- | Find an element satisfying a predicate and return it with its index. -- TODO: more efficient implementation!? findWithIndex :: (a -> Bool) -> [a] -> Maybe (a, Int) findWithIndex p as = headMaybe $ filter (p . fst) $ zip as [0..] -- | downFrom n = [n-1,..1,0] downFrom :: Integral a => a -> [a] downFrom n | n <= 0 = [] | otherwise = let n' = n-1 in n' : downFrom n' -- | Update the first element of a list, if it exists. updateHead :: (a -> a) -> [a] -> [a] updateHead f [] = [] updateHead f (a : as) = f a : as -- | Update the last element of a list, if it exists. updateLast :: (a -> a) -> [a] -> [a] updateLast f [] = [] updateLast f [a] = [f a] updateLast f (a : as@(_ : _)) = a : updateLast f as -- | Update nth element of a list, if it exists. -- Precondition: the index is >= 0. updateAt :: Int -> (a -> a) -> [a] -> [a] updateAt _ f [] = [] updateAt 0 f (a : as) = f a : as updateAt n f (a : as) = a : updateAt (n-1) f as -- | A generalized version of @partition@. -- (Cf. @mapMaybe@ vs. @filter@). mapEither :: (a -> Either b c) -> [a] -> ([b],[c]) {-# INLINE mapEither #-} mapEither f xs = foldr (deal f) ([],[]) xs deal :: (a -> Either b c) -> a -> ([b],[c]) -> ([b],[c]) deal f a ~(bs,cs) = case f a of Left b -> (b:bs, cs) Right c -> (bs, c:cs) -- | Split off the largest suffix whose elements satisfy a predicate. -- -- @spanEnd p xs = (ys, zs)@ -- where @xs = ys ++ zs@ -- and @all p zs@ -- and @maybe True (not . p) (lastMaybe yz)@. spanEnd :: forall a. (a -> Bool) -> [a] -> ([a], [a]) spanEnd p = snd . foldr f (True, ([], [])) where f :: a -> (Bool, ([a], [a])) -> (Bool, ([a], [a])) f x (b', (xs, ys)) = (b, if b then (xs, x:ys) else (x:xs, ys)) where b = b' && p x -- | A generalized version of @takeWhile@. -- (Cf. @mapMaybe@ vs. @filter@). takeWhileJust :: (a -> Maybe b) -> [a] -> [b] takeWhileJust p = loop where loop (a : as) | Just b <- p a = b : loop as loop _ = [] -- | A generalized version of @span@. spanJust :: (a -> Maybe b) -> [a] -> ([b], [a]) spanJust p = loop where loop (a : as) | Just b <- p a = mapFst (b :) $ loop as loop as = ([], as) -- | Partition a list into 'Nothing's and 'Just's. -- @'mapMaybe' f = snd . partitionMaybe f@. partitionMaybe :: (a -> Maybe b) -> [a] -> ([a], [b]) partitionMaybe f = loop where loop [] = ([], []) loop (a : as) = case f a of Nothing -> mapFst (a :) $ loop as Just b -> mapSnd (b :) $ loop as -- | Like 'filter', but additionally return the last partition -- of the list where the predicate is @False@ everywhere. filterAndRest :: (a -> Bool) -> [a] -> ([a],[a]) filterAndRest p = mapMaybeAndRest $ \ a -> if p a then Just a else Nothing -- | Like 'mapMaybe', but additionally return the last partition -- of the list where the function always returns @Nothing@. mapMaybeAndRest :: (a -> Maybe b) -> [a] -> ([b],[a]) mapMaybeAndRest f = loop [] where loop acc = \case [] -> ([], reverse acc) x:xs | Just y <- f x -> first (y:) $ loop [] xs | otherwise -> loop (x:acc) xs -- | Drops from both lists simultaneously until one list is empty. dropCommon :: [a] -> [b] -> ([a],[b]) dropCommon (x : xs) (y : ys) = dropCommon xs ys dropCommon xs ys = (xs, ys) -- | Sublist relation. isSublistOf :: Eq a => [a] -> [a] -> Bool isSublistOf [] ys = True isSublistOf (x : xs) ys = case dropWhile (x /=) ys of [] -> False (_:ys) -> isSublistOf xs ys type Prefix a = [a] type Suffix a = [a] -- | Check if a list has a given prefix. If so, return the list -- minus the prefix. stripPrefixBy :: (a -> a -> Bool) -> Prefix a -> [a] -> Maybe (Suffix a) stripPrefixBy eq = loop where loop [] rest = Just rest loop (_:_) [] = Nothing loop (p:pat) (r:rest) | eq p r = loop pat rest | otherwise = Nothing -- | @stripSuffix suf xs = Just pre@ iff @xs = pre ++ suf@. stripSuffix :: Eq a => Suffix a -> [a] -> Maybe (Prefix a) stripSuffix [] = Just stripSuffix s = stripReversedSuffix (reverse s) type ReversedSuffix a = [a] -- | @stripReversedSuffix rsuf xs = Just pre@ iff @xs = pre ++ reverse suf@. stripReversedSuffix :: forall a. Eq a => ReversedSuffix a -> [a] -> Maybe (Prefix a) stripReversedSuffix rs = final . foldr step (SSSStrip rs) where -- Step of the automaton (reading input from right to left). step :: a -> StrSufSt a -> StrSufSt a step x = \case SSSMismatch -> SSSMismatch SSSResult xs -> SSSResult (x:xs) SSSStrip [] -> SSSResult [x] SSSStrip (y:ys) | x == y -> SSSStrip ys | otherwise -> SSSMismatch -- Output of the automaton. final :: StrSufSt a -> Maybe (Prefix a) final = \case SSSResult xs -> Just xs SSSStrip [] -> Just [] _ -> Nothing -- We have not stripped the whole suffix or encountered a mismatch. -- | Internal state for stripping suffix. data StrSufSt a = SSSMismatch -- ^ Error. | SSSStrip (ReversedSuffix a) -- ^ "Negative string" to remove from end. List may be empty. | SSSResult [a] -- ^ "Positive string" (result). Non-empty list. -- | Split a list into sublists. Generalisation of the prelude function -- @words@. -- -- > words xs == wordsBy isSpace xs wordsBy :: (a -> Bool) -> [a] -> [[a]] wordsBy p xs = yesP xs where yesP xs = noP (dropWhile p xs) noP [] = [] noP xs = ys : yesP zs where (ys,zs) = break p xs -- | Chop up a list in chunks of a given length. chop :: Int -> [a] -> [[a]] chop _ [] = [] chop n xs = ys : chop n zs where (ys,zs) = splitAt n xs -- | Chop a list at the positions when the predicate holds. Contrary to -- 'wordsBy', consecutive separator elements will result in an empty segment -- in the result. -- > intercalate [x] (chopWhen (== x) xs) == xs chopWhen :: (a -> Bool) -> [a] -> [[a]] chopWhen p [] = [] chopWhen p xs = case break p xs of (w, []) -> [w] (w, [_]) -> [w, []] (w, _ : ys) -> w : chopWhen p ys -- | All ways of removing one element from a list. holes :: [a] -> [(a, [a])] holes [] = [] holes (x:xs) = (x, xs) : map (id -*- (x:)) (holes xs) -- | Check whether a list is sorted. -- -- Assumes that the 'Ord' instance implements a partial order. sorted :: Ord a => [a] -> Bool sorted [] = True sorted xs = and $ zipWith (<=) xs (tail xs) -- | Check whether all elements in a list are distinct from each -- other. Assumes that the 'Eq' instance stands for an equivalence -- relation. distinct :: Eq a => [a] -> Bool distinct [] = True distinct (x:xs) = x `notElem` xs && distinct xs -- | An optimised version of 'distinct'. -- -- Precondition: The list's length must fit in an 'Int'. fastDistinct :: Ord a => [a] -> Bool fastDistinct xs = Set.size (Set.fromList xs) == length xs -- | Checks if all the elements in the list are equal. Assumes that -- the 'Eq' instance stands for an equivalence relation. allEqual :: Eq a => [a] -> Bool allEqual [] = True allEqual (x : xs) = all (== x) xs -- | Returns an (arbitrary) representative for each list element -- that occurs more than once. duplicates :: Ord a => [a] -> [a] duplicates = mapMaybe dup . Bag.groups . Bag.fromList where dup (a : _ : _) = Just a dup _ = Nothing -- | A variant of 'List.groupBy' which applies the predicate to consecutive -- pairs. groupBy' :: (a -> a -> Bool) -> [a] -> [[a]] groupBy' _ [] = [] groupBy' p xxs@(x : xs) = grp x $ zipWith (\x y -> (p x y, y)) xxs xs where grp x ys = (x : map snd xs) : tail where (xs, rest) = span fst ys tail = case rest of [] -> [] ((_, z) : zs) -> grp z zs -- | @'groupOn' f = 'groupBy' (('==') \`on\` f) '.' 'List.sortBy' ('compare' \`on\` f)@. groupOn :: Ord b => (a -> b) -> [a] -> [[a]] groupOn f = List.groupBy ((==) `on` f) . List.sortBy (compare `on` f) -- | @splitExactlyAt n xs = Just (ys, zs)@ iff @xs = ys ++ zs@ -- and @genericLength ys = n@. splitExactlyAt :: Integral n => n -> [a] -> Maybe ([a], [a]) splitExactlyAt 0 xs = return ([], xs) splitExactlyAt n [] = Nothing splitExactlyAt n (x : xs) = mapFst (x :) <$> splitExactlyAt (n-1) xs -- | A generalised variant of 'elemIndex'. genericElemIndex :: (Eq a, Integral i) => a -> [a] -> Maybe i genericElemIndex x xs = listToMaybe $ map fst $ filter snd $ zip [0..] $ map (== x) xs -- | Requires both lists to have the same length. -- -- Otherwise, @Nothing@ is returned. zipWith' :: (a -> b -> c) -> [a] -> [b] -> Maybe [c] zipWith' f = loop where loop [] [] = Just [] loop (x : xs) (y : ys) = (f x y :) <$> loop xs ys loop [] (_ : _) = Nothing loop (_ : _) [] = Nothing -- | Like 'zipWith' but keep the rest of the second list as-is -- (in case the second list is longer). -- -- @ -- zipWithKeepRest f as bs == zipWith f as bs ++ drop (length as) bs -- @ zipWithKeepRest :: (a -> b -> b) -> [a] -> [b] -> [b] zipWithKeepRest f = loop where loop [] bs = bs loop as [] = [] loop (a : as) (b : bs) = f a b : loop as bs -- -- UNUSED; a better type would be -- -- zipWithTails :: (a -> b -> c) -> [a] -> [b] -> ([c], Either [a] [b]) -- -- | Like zipWith, but returns the leftover elements of the input lists. -- zipWithTails :: (a -> b -> c) -> [a] -> [b] -> ([c], [a] , [b]) -- zipWithTails f xs [] = ([], xs, []) -- zipWithTails f [] ys = ([], [] , ys) -- zipWithTails f (x : xs) (y : ys) = (f x y : zs , as , bs) -- where (zs , as , bs) = zipWithTails f xs ys -- | Efficient variant of 'nubBy' for finite lists. -- -- Specification: -- -- > nubOn f xs == 'nubBy' ((==) `'on'` f) xs. nubOn :: Ord b => (a -> b) -> [a] -> [a] nubOn tag = map snd . List.sortBy (compare `on` fst) . map (snd . head) . List.groupBy ((==) `on` fst) . List.sortBy (compare `on` fst) . map (\p@(_, x) -> (tag x, p)) . zip [1..] -- | Efficient variant of 'nubBy' for finite lists. -- -- Specification: For each list @xs@ there is a list @ys@ which is a -- permutation of @xs@ such that -- -- > uniqOn f xs == 'nubBy' ((==) `'on'` f) ys. -- -- Furthermore -- -- > List.sortBy (compare `on` f) (uniqOn f xs) == uniqOn f xs. uniqOn :: Ord b => (a -> b) -> [a] -> [a] uniqOn key = Map.elems . Map.fromList . map (\ a -> (key a, a)) -- | Compute the common suffix of two lists. commonSuffix :: Eq a => [a] -> [a] -> [a] commonSuffix xs ys = reverse $ (commonPrefix `on` reverse) xs ys -- | Compute the common prefix of two lists. commonPrefix :: Eq a => [a] -> [a] -> [a] commonPrefix [] _ = [] commonPrefix _ [] = [] commonPrefix (x:xs) (y:ys) | x == y = x : commonPrefix xs ys | otherwise = [] editDistanceSpec :: Eq a => [a] -> [a] -> Int editDistanceSpec [] ys = length ys editDistanceSpec xs [] = length xs editDistanceSpec (x : xs) (y : ys) | x == y = editDistanceSpec xs ys | otherwise = 1 + minimum [ editDistanceSpec (x : xs) ys , editDistanceSpec xs (y : ys) , editDistanceSpec xs ys ] editDistance :: Eq a => [a] -> [a] -> Int editDistance xs ys = editD 0 0 where xss = List.tails xs yss = List.tails ys tbl = Map.fromList [ ((i, j), editD' i j) | i <- [0..length xss - 1], j <- [0..length yss - 1] ] editD i j = tbl Map.! (i, j) editD' i j = case (xss !! i, yss !! j) of ([], ys) -> length ys (xs, []) -> length xs (x : xs, y : ys) | x == y -> editD (i + 1) (j + 1) | otherwise -> 1 + minimum [ editD (i + 1) j, editD i (j + 1), editD (i + 1) (j + 1) ] Agda-2.6.0.1/src/full/Agda/Utils/Monad.hs0000644000000000000000000002057513466402171015774 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Utils.Monad ( module Agda.Utils.Monad , when, unless, MonadPlus(..) , (<$>), (<*>) , (<$) ) where import Prelude hiding (concat) import Control.Monad hiding (mapM, forM) #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.Identity ( Identity ) import Control.Monad.State import Control.Monad.Writer import Data.Traversable as Trav hiding (for, sequence) import Data.Foldable as Fold import Data.Maybe import Agda.Utils.Either import Agda.Utils.Except ( Error(strMsg) , MonadError(catchError, throwError) ) import Agda.Utils.List import Agda.Utils.Null (ifNotNullM) #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- #if __GLASGOW_HASKELL__ >= 800 instance Fail.MonadFail Identity where fail = error #endif --------------------------------------------------------------------------- -- | Binary bind. (==<<) :: Monad m => (a -> b -> m c) -> (m a, m b) -> m c k ==<< (ma, mb) = ma >>= \ a -> k a =<< mb -- Conditionals and monads ------------------------------------------------ whenM :: Monad m => m Bool -> m () -> m () whenM c m = c >>= (`when` m) unlessM :: Monad m => m Bool -> m () -> m () unlessM c m = c >>= (`unless` m) -- | Monadic guard. guardM :: (Monad m, MonadPlus m) => m Bool -> m () guardM c = guard =<< c -- | Monadic if-then-else. ifM :: Monad m => m Bool -> m a -> m a -> m a ifM c m m' = do b <- c if b then m else m' -- | @ifNotM mc = ifM (not <$> mc)@ ifNotM :: Monad m => m Bool -> m a -> m a -> m a ifNotM c = flip $ ifM c -- | Lazy monadic conjunction. and2M :: Monad m => m Bool -> m Bool -> m Bool and2M ma mb = ifM ma mb (return False) andM :: (Foldable f, Monad m) => f (m Bool) -> m Bool andM = Fold.foldl and2M (return True) allM :: (Functor f, Foldable f, Monad m) => f a -> (a -> m Bool) -> m Bool allM xs f = andM $ fmap f xs -- | Lazy monadic disjunction. or2M :: Monad m => m Bool -> m Bool -> m Bool or2M ma mb = ifM ma (return True) mb orM :: (Foldable f, Monad m) => f (m Bool) -> m Bool orM = Fold.foldl or2M (return False) anyM :: (Functor f, Foldable f, Monad m) => f a -> (a -> m Bool) -> m Bool anyM xs f = orM $ fmap f xs -- | Lazy monadic disjunction with @Either@ truth values. -- Returns the last error message if all fail. altM1 :: Monad m => (a -> m (Either err b)) -> [a] -> m (Either err b) altM1 f [] = __IMPOSSIBLE__ altM1 f [a] = f a altM1 f (a : as) = either (const $ altM1 f as) (return . Right) =<< f a -- | Lazy monadic disjunction with accumulation of errors in a monoid. -- Errors are discarded if we succeed. orEitherM :: (Monoid e, Monad m, Functor m) => [m (Either e b)] -> m (Either e b) orEitherM [] = return $ Left mempty orEitherM (m : ms) = caseEitherM m (\e -> mapLeft (e `mappend`) <$> orEitherM ms) (return . Right) -- Loops gathering results in a Monoid ------------------------------------ -- | Generalized version of @mapM_ :: Monad m => (a -> m ()) -> [a] -> m ()@ -- Executes effects and collects results in left-to-right order. -- Works best with left-associative monoids. -- -- Note that there is an alternative -- -- @mapM' f t = foldr mappend mempty <$> mapM f t@ -- -- that collects results in right-to-left order -- (effects still left-to-right). -- It might be preferable for right associative monoids. mapM' :: (Foldable t, Monad m, Monoid b) => (a -> m b) -> t a -> m b mapM' f = Fold.foldl (\ mb a -> liftM2 mappend mb (f a)) (return mempty) -- | Generalized version of @forM_ :: Monad m => [a] -> (a -> m ()) -> m ()@ forM' :: (Foldable t, Monad m, Monoid b) => t a -> (a -> m b) -> m b forM' = flip mapM' -- Variations of Traversable mapMM :: (Traversable t, Monad m) => (a -> m b) -> m (t a) -> m (t b) mapMM f mxs = Trav.mapM f =<< mxs forMM :: (Traversable t, Monad m) => m (t a) -> (a -> m b) -> m (t b) forMM = flip mapMM -- Continuation monad ----------------------------------------------------- -- Andreas, 2017-04-11, issue #2543 -- The terribly useful thread function is now UNUSED. [Sadistic laughter :)] -- -- type Cont r a = (a -> r) -> r -- -- -- | 'Control.Monad.mapM' for the continuation monad. Terribly useful. -- thread :: (a -> Cont r b) -> [a] -> Cont r [b] -- thread f [] ret = ret [] -- thread f (x:xs) ret = -- f x $ \y -> thread f xs $ \ys -> ret (y:ys) -- Lists and monads ------------------------------------------------------- -- | A monadic version of @'mapMaybe' :: (a -> Maybe b) -> [a] -> [b]@. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b] mapMaybeM f xs = catMaybes <$> Trav.mapM f xs -- | The @for@ version of 'mapMaybeM'. forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b] forMaybeM = flip mapMaybeM -- | A monadic version of @'dropWhile' :: (a -> Bool) -> [a] -> [a]@. dropWhileM :: Monad m => (a -> m Bool) -> [a] -> m [a] dropWhileM p [] = return [] dropWhileM p (x : xs) = ifM (p x) (dropWhileM p xs) (return (x : xs)) -- | A monadic version of @'dropWhileEnd' :: (a -> Bool) -> [a] -> m [a]@. -- Effects happen starting at the end of the list until @p@ becomes false. dropWhileEndM :: Monad m => (a -> m Bool) -> [a] -> m [a] dropWhileEndM p [] = return [] dropWhileEndM p (x : xs) = ifNotNullM (dropWhileEndM p xs) (return . (x:)) $ {-else-} ifM (p x) (return []) (return [x]) -- | A ``monadic'' version of @'partition' :: (a -> Bool) -> [a] -> ([a],[a]) partitionM :: (Functor m, Applicative m) => (a -> m Bool) -> [a] -> m ([a],[a]) partitionM f [] = pure ([], []) partitionM f (x:xs) = (\ b (l, r) -> if b then (x:l, r) else (l, x:r)) <$> f x <*> partitionM f xs -- MonadPlus ----------------------------------------------------------------- -- | Translates 'Maybe' to 'MonadPlus'. fromMaybeMP :: MonadPlus m => Maybe a -> m a fromMaybeMP = maybe mzero return -- | Generalises the 'catMaybes' function from lists to an arbitrary -- 'MonadPlus'. catMaybesMP :: MonadPlus m => m (Maybe a) -> m a catMaybesMP = (>>= fromMaybeMP) -- Error monad ------------------------------------------------------------ -- | Finally for the 'Error' class. Errors in the finally part take -- precedence over prior errors. finally :: MonadError e m => m a -> m () -> m a first `finally` after = do r <- catchError (liftM Right first) (return . Left) after case r of Left e -> throwError e Right r -> return r -- | Try a computation, return 'Nothing' if an 'Error' occurs. tryMaybe :: (MonadError e m, Functor m) => m a -> m (Maybe a) tryMaybe m = (Just <$> m) `catchError` \ _ -> return Nothing -- State monad ------------------------------------------------------------ -- | Bracket without failure. Typically used to preserve state. bracket_ :: Monad m => m a -- ^ Acquires resource. Run first. -> (a -> m ()) -- ^ Releases resource. Run last. -> m b -- ^ Computes result. Run in-between. -> m b bracket_ acquire release compute = do resource <- acquire result <- compute release resource return result -- | Restore state after computation. localState :: MonadState s m => m a -> m a localState = bracket_ get put -- Read ------------------------------------------------------------------- readM :: (Error e, MonadError e m, Read a) => String -> m a readM s = case reads s of [(x,"")] -> return x _ -> throwError $ strMsg $ "readM: parse error string " ++ s -- RETIRED STUFF ---------------------------------------------------------- {- RETIRED, ASR, 09 September 2014. Not used. -- | Bracket for the 'Error' class. -- bracket :: (Error e, MonadError e m) -- => m a -- ^ Acquires resource. Run first. -- -> (a -> m c) -- ^ Releases resource. Run last. -- -> (a -> m b) -- ^ Computes result. Run in-between. -- -> m b -- bracket acquire release compute = do -- resource <- acquire -- compute resource `finally` release resource -} {- RETIRED, Andreas, 2012-04-30. Not used. concatMapM :: Applicative m => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = concat <$> traverse f xs -- | Depending on the monad you have to look at the result for -- the force to be effective. For the 'IO' monad you do. forceM :: Monad m => [a] -> m () forceM xs = do () <- length xs `seq` return () return () commuteM :: (Traversable f, Applicative m) => f (m a) -> m (f a) commuteM = traverse id -} Agda-2.6.0.1/src/full/Agda/Utils/HashMap.hs0000644000000000000000000000066513466402171016255 0ustar0000000000000000module Agda.Utils.HashMap ( module HashMap ) where import Data.HashMap.Strict as HashMap -- ASR (20 January 2016) Issue 1779: I removed the @mapMaybe@ and -- @alter@ functions because them currently aren't used and -- them were added in unordered-containers 0.2.6.0. -- mapMaybe :: (a -> Maybe b) -> HashMap k a -> HashMap k b -- alter :: (Eq k, Hashable k) => -- (Maybe a -> Maybe a) -> k -> HashMap k a -> HashMap k a Agda-2.6.0.1/src/full/Agda/Utils/Map.hs0000644000000000000000000000326113466402171015444 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Utils.Map where import Prelude hiding (map, lookup, mapM) import Data.Map as Map import Data.Traversable import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- * Monadic map operations --------------------------------------------------------------------------- data EitherOrBoth a b = L a | B a b | R b -- | Not very efficient (goes via a list), but it'll do. unionWithM :: (Ord k, Monad m) => (a -> a -> m a) -> Map k a -> Map k a -> m (Map k a) unionWithM f m1 m2 = fromList <$> mapM combine (toList m) where m = unionWith both (map L m1) (map R m2) both (L a) (R b) = B a b both _ _ = __IMPOSSIBLE__ combine (k, B a b) = (,) k <$> f a b combine (k, L a) = return (k, a) combine (k, R b) = return (k, b) insertWithKeyM :: (Ord k, Monad m) => (k -> a -> a -> m a) -> k -> a -> Map k a -> m (Map k a) insertWithKeyM clash k x m = case lookup k m of Just y -> do z <- clash k x y return $ insert k z m Nothing -> return $ insert k x m -- * Non-monadic map operations --------------------------------------------------------------------------- -- | Big conjunction over a map. allWithKey :: (k -> a -> Bool) -> Map k a -> Bool allWithKey f = Map.foldrWithKey (\ k a b -> f k a && b) True -- | Filter a map based on the keys. filterKeys :: (k -> Bool) -> Map k a -> Map k a filterKeys p = filterWithKey (const . p) -- | Unzip a map. unzip :: Map k (a, b) -> (Map k a, Map k b) unzip m = (Map.map fst m, Map.map snd m) unzip3 :: Map k (a, b, c) -> (Map k a, Map k b, Map k c) unzip3 m = (Map.map fst3 m, Map.map snd3 m, Map.map thd3 m) Agda-2.6.0.1/src/full/Agda/Utils/Except.hs0000644000000000000000000000174413466402171016163 0ustar0000000000000000 ------------------------------------------------------------------------------ -- | Wrapper for Control.Monad.Except from the mtl library (>= 2.2.1) ------------------------------------------------------------------------------ module Agda.Utils.Except ( Error(noMsg, strMsg) , ExceptT , mapExceptT , mkExceptT , MonadError(catchError, throwError) , runExceptT ) where import Control.Monad.Except ------------------------------------------------------------------------ -- | We cannot define data constructors synonymous, so we define the -- @mkExceptT@ function to be used instead of the data constructor -- @ExceptT@. mkExceptT :: m (Either e a) -> ExceptT e m a mkExceptT = ExceptT -- | Error class for backward compatibility (from -- Control.Monad.Trans.Error in transformers 0.3.0.0). class Error a where noMsg :: a strMsg :: String -> a noMsg = strMsg "" strMsg _ = noMsg -- | A string can be thrown as an error. instance Error String where strMsg = id Agda-2.6.0.1/src/full/Agda/Utils/NonemptyList.hs0000644000000000000000000000451713466402171017401 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} -- | Nonempty lists. module Agda.Utils.NonemptyList where import Control.Monad import Data.Data (Data) import Data.Foldable (Foldable) -- The toList method of Foldable may do something stupid, -- like traversing the list just to build a list again. import Data.Traversable (Traversable) import Data.Maybe import Data.Semigroup import qualified Data.List as List infixr 5 :! data NonemptyList a = (:!) { headNe :: a, tailNe :: [a] } deriving (Eq, Ord, Functor, Foldable, Traversable, Data) instance Semigroup (NonemptyList a) where (x :! xs) <> (y :! ys) = x :! xs ++ y : ys instance Applicative NonemptyList where pure x = x :! [] (<*>) = ap instance Monad NonemptyList where return = pure (x :! xs) >>= f = foldr1 (<>) (f x : map f xs) instance Show a => Show (NonemptyList a) where showsPrec _ = showList . toList -- | Implementing conversion to list manually, since @Foldable.toList@ -- might recurse over the tail and, thus, destroy sharing. toList :: NonemptyList a -> [a] toList (x :! xs) = x : xs -- | Converting a list (safe). fromList :: [a] -> Maybe (NonemptyList a) fromList [] = Nothing fromList (x : xs) = Just $ x :! xs -- | Prepending an element. consNe :: a -> NonemptyList a -> NonemptyList a consNe x (y :! zs) = x :! (y : zs) -- | Returns the union of the argument lists seen as sets. The order of the -- elements in the result is not specified. Precondition: arguments contain -- no duplicates. unionNe :: Eq a => NonemptyList a -> NonemptyList a -> NonemptyList a unionNe (x :! xs) (y :! ys) = z :! zs where z : zs = List.union (x : xs) (y : ys) -- | Zip two nonempty lists. zipWithNe :: (a -> b -> c) -> NonemptyList a -> NonemptyList b -> NonemptyList c zipWithNe f (x :! xs) (y :! ys) = f x y :! zipWith f xs ys -- | Zip two nonempty lists. zipNe :: NonemptyList a -> NonemptyList b -> NonemptyList (a, b) zipNe = zipWithNe (,) -- | Case on a list, getting a nonempty list in the cons case. caseListNe :: [a] -> b -> (NonemptyList a -> b) -> b caseListNe [] e ne = e caseListNe (x : xs) e ne = ne (x :! xs) -- | Case on a list, with list last. listCaseNe :: b -> (NonemptyList a -> b) -> [a] -> b listCaseNe e ne xs = caseListNe xs e ne -- | Check if an element is present in a list. elemNe :: Eq a => a -> NonemptyList a -> Bool elemNe y (x :! xs) = elem y (x : xs) Agda-2.6.0.1/src/full/Agda/Utils/IORef.hs0000644000000000000000000000054513466402171015675 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Utilities for Data.IORef. module Agda.Utils.IORef ( module Data.IORef , module Agda.Utils.IORef ) where import Data.IORef -- | Read 'IORef', modify it strictly, and return old value. readModifyIORef' :: IORef a -> (a -> a) -> IO a readModifyIORef' ref f = do x <- readIORef ref writeIORef ref $! f x return x Agda-2.6.0.1/src/full/Agda/Utils/AffineHole.hs0000644000000000000000000000134313466402171016726 0ustar0000000000000000{-# LANGUAGE DeriveFunctor #-} -- | Contexts with at most one hole. module Agda.Utils.AffineHole where import Control.Applicative data AffineHole r a = ZeroHoles a -- ^ A constant term. | OneHole (r -> a) -- ^ A term with one hole. | ManyHoles -- ^ A term with many holes (error value). deriving (Functor) instance Applicative (AffineHole r) where pure = ZeroHoles ZeroHoles f <*> ZeroHoles a = ZeroHoles $ f a ZeroHoles f <*> OneHole g = OneHole $ f . g OneHole h <*> ZeroHoles a = OneHole (`h` a) _ <*> _ = ManyHoles -- NB: @AffineHole r@ is not a monad. -- @ -- OneHole (h :: r -> a) >>= (k :: a -> AffineHole r b) = _ :: AffineHole r b -- @ -- We are lacking an @r@ to make use of @h@. Agda-2.6.0.1/src/full/Agda/Utils/Benchmark.hs0000644000000000000000000001555013466402171016625 0ustar0000000000000000{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UndecidableInstances #-} -- | Tools for benchmarking and accumulating results. -- Nothing Agda-specific in here. module Agda.Utils.Benchmark where import Prelude hiding (null) import qualified Control.Exception as E (evaluate) import Control.Monad.Reader import Control.Monad.State import Data.Foldable (foldMap) import Data.Functor import Data.Function import qualified Data.List as List import Data.Monoid import Data.Maybe import qualified Text.PrettyPrint.Boxes as Boxes import Agda.Utils.Null import Agda.Utils.Monad hiding (finally) import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Pretty import Agda.Utils.Time import Agda.Utils.Trie (Trie) import qualified Agda.Utils.Trie as Trie -- * Benchmark trie -- | Account we can bill computation time to. type Account a = [a] -- | Record when we started billing the current account. type CurrentAccount a = Strict.Maybe (Account a, CPUTime) type Timings a = Trie a CPUTime data BenchmarkOn a = BenchmarkOff | BenchmarkOn | BenchmarkSome (Account a -> Bool) isBenchmarkOn :: Account a -> BenchmarkOn a -> Bool isBenchmarkOn _ BenchmarkOff = False isBenchmarkOn _ BenchmarkOn = True isBenchmarkOn a (BenchmarkSome p) = p a -- | Benchmark structure is a trie, mapping accounts (phases and subphases) -- to CPU time spent on their performance. data Benchmark a = Benchmark { benchmarkOn :: !(BenchmarkOn a) -- ^ Are we benchmarking at all? , currentAccount :: !(CurrentAccount a) -- ^ What are we billing to currently? , timings :: !(Timings a) -- ^ The accounts and their accumulated timing bill. } -- | Initial benchmark structure (empty). instance Null (Benchmark a) where empty = Benchmark { benchmarkOn = BenchmarkOff , currentAccount = Strict.Nothing , timings = empty } null = null . timings -- | Semantic editor combinator. mapBenchmarkOn :: (BenchmarkOn a -> BenchmarkOn a) -> Benchmark a -> Benchmark a mapBenchmarkOn f b = b { benchmarkOn = f $ benchmarkOn b } -- | Semantic editor combinator. mapCurrentAccount :: (CurrentAccount a -> CurrentAccount a) -> Benchmark a -> Benchmark a mapCurrentAccount f b = b { currentAccount = f (currentAccount b) } -- | Semantic editor combinator. mapTimings :: (Timings a -> Timings a) -> Benchmark a -> Benchmark a mapTimings f b = b { timings = f (timings b) } -- | Add to specified CPU time account. addCPUTime :: Ord a => Account a -> CPUTime -> Benchmark a -> Benchmark a addCPUTime acc t = mapTimings (Trie.insertWith (+) acc t) -- | Print benchmark as three-column table with totals. instance (Ord a, Pretty a) => Pretty (Benchmark a) where pretty b = text $ Boxes.render table where trie = timings b (accounts, times0) = unzip $ Trie.toListOrderedBy (flip compare `on` snd) $ Trie.filter ((> fromMilliseconds 10) . snd) $ Trie.mapSubTries (Just . aggr) trie times = map fst times0 aggr t = (fromMaybe 0 $ Trie.lookup [] t, getSum $ foldMap Sum t) aggrTimes = do (a, (t, aggrT)) <- zip accounts times0 return $ if t == aggrT || null a then "" else Boxes.text $ "(" ++ prettyShow aggrT ++ ")" -- Generate a table. table = Boxes.hsep 1 Boxes.left [col1, col2, col3] -- First column: Accounts. col1 = Boxes.vcat Boxes.left $ map Boxes.text $ "Total" : map showAccount accounts -- Second column: Times. col2 = Boxes.vcat Boxes.right $ map (Boxes.text . prettyShow) $ sum times : times -- Thid column: Aggregate times. col3 = Boxes.vcat Boxes.right $ "" : aggrTimes showAccount [] = "Miscellaneous" showAccount ks = List.intercalate "." $ map prettyShow ks -- * Benchmarking monad. -- | Monad with access to benchmarking data. class (Ord a, Functor m, MonadIO m) => MonadBench a m | m -> a where getBenchmark :: m (Benchmark a) getsBenchmark :: (Benchmark a -> c) -> m c getsBenchmark f = f <$> getBenchmark putBenchmark :: Benchmark a -> m () putBenchmark b = modifyBenchmark $ const b modifyBenchmark :: (Benchmark a -> Benchmark a) -> m () modifyBenchmark f = do b <- getBenchmark putBenchmark $! f b -- | We need to be able to terminate benchmarking in case of an exception. finally :: m b -> m c -> m b -- needs UndecidableInstances because of weakness of FunctionalDependencies instance MonadBench a m => MonadBench a (ReaderT r m) where getBenchmark = lift $ getBenchmark putBenchmark = lift . putBenchmark modifyBenchmark = lift . modifyBenchmark finally m f = ReaderT $ \ r -> finally (m `runReaderT` r) (f `runReaderT` r) instance MonadBench a m => MonadBench a (StateT r m) where getBenchmark = lift $ getBenchmark putBenchmark = lift . putBenchmark modifyBenchmark = lift . modifyBenchmark finally m f = StateT $ \s -> finally (m `runStateT` s) (f `runStateT` s) -- | Turn benchmarking on/off. setBenchmarking :: MonadBench a m => BenchmarkOn a -> m () setBenchmarking b = modifyBenchmark $ mapBenchmarkOn $ const b -- | Bill current account with time up to now. -- Switch to new account. -- Return old account (if any). switchBenchmarking :: MonadBench a m => Strict.Maybe (Account a) -- ^ Maybe new account. -> m (Strict.Maybe (Account a)) -- ^ Maybe old account. switchBenchmarking newAccount = do now <- liftIO $ getCPUTime -- Stop and bill current benchmarking. oldAccount <- getsBenchmark currentAccount Strict.whenJust oldAccount $ \ (acc, start) -> modifyBenchmark $ addCPUTime acc $ now - start -- Switch to new account. modifyBenchmark $ mapCurrentAccount $ const $ (, now) <$> newAccount return $ fst <$> oldAccount -- | Resets the account and the timing information. reset :: MonadBench a m => m () reset = modifyBenchmark $ mapCurrentAccount (const Strict.Nothing) . mapTimings (const Trie.empty) -- | Bill a computation to a specific account. -- Works even if the computation is aborted by an exception. billTo :: MonadBench a m => Account a -> m c -> m c billTo account m = ifNotM (isBenchmarkOn account <$> getsBenchmark benchmarkOn) m $ do -- Switch to new account. old <- switchBenchmarking $ Strict.Just account -- Compute and switch back to old account. (liftIO . E.evaluate =<< m) `finally` switchBenchmarking old -- | Bill a CPS function to an account. Can't handle exceptions. billToCPS :: MonadBench a m => Account a -> ((b -> m c) -> m c) -> (b -> m c) -> m c billToCPS account f k = ifNotM (isBenchmarkOn account <$> getsBenchmark benchmarkOn) (f k) $ do -- Switch to new account. old <- switchBenchmarking $ Strict.Just account f $ \ x -> x `seq` do _ <- switchBenchmarking old k x -- | Bill a pure computation to a specific account. billPureTo :: MonadBench a m => Account a -> c -> m c billPureTo account = billTo account . return Agda-2.6.0.1/src/full/Agda/Utils/Pointer.hs0000644000000000000000000000434313466402171016351 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} module Agda.Utils.Pointer ( Ptr, newPtr, derefPtr, setPtr , updatePtr, updatePtrM ) where import Control.DeepSeq import Control.Concurrent.MVar import Data.Foldable import Data.Function import Data.Hashable import Data.IORef import Data.Traversable import System.IO.Unsafe import Data.Data (Data (..)) import Data.Typeable (Typeable) #include "undefined.h" import Agda.Utils.Impossible data Ptr a = Ptr { ptrTag :: !Integer , ptrRef :: !(IORef a) } deriving Data -- cheating because you shouldn't be digging this far anyway instance Typeable a => Data (IORef a) where gunfold _ _ _ = __IMPOSSIBLE__ toConstr = __IMPOSSIBLE__ dataTypeOf = __IMPOSSIBLE__ {-# NOINLINE freshVar #-} freshVar :: MVar Integer freshVar = unsafePerformIO $ newMVar 0 fresh :: IO Integer fresh = do x <- takeMVar freshVar putMVar freshVar $! x + 1 return x {-# NOINLINE newPtr #-} newPtr :: a -> Ptr a newPtr x = unsafePerformIO $ do i <- fresh Ptr i <$> newIORef x derefPtr :: Ptr a -> a derefPtr p = unsafePerformIO $ readIORef $ ptrRef p {-# NOINLINE updatePtr #-} updatePtr :: (a -> a) -> Ptr a -> Ptr a updatePtr f p = unsafePerformIO $ p <$ modifyIORef (ptrRef p) f setPtr :: a -> Ptr a -> Ptr a setPtr !x = updatePtr (const x) -- | If @f a@ contains many copies of @a@ they will all be the same pointer in -- the result. If the function is well-behaved (i.e. preserves the implicit -- equivalence, this shouldn't matter). updatePtrM :: Functor f => (a -> f a) -> Ptr a -> f (Ptr a) updatePtrM f p = flip setPtr p <$> f (derefPtr p) instance Show a => Show (Ptr a) where show p = "#" ++ show (ptrTag p) ++ "{" ++ show (derefPtr p) ++ "}" instance Functor Ptr where fmap f = newPtr . f . derefPtr instance Foldable Ptr where foldMap f = f . derefPtr instance Traversable Ptr where traverse f p = newPtr <$> f (derefPtr p) instance Eq (Ptr a) where (==) = (==) `on` ptrTag instance Ord (Ptr a) where compare = compare `on` ptrTag instance Hashable (Ptr a) where hashWithSalt salt = (hashWithSalt salt) . ptrTag instance NFData (Ptr a) where rnf x = seq x () Agda-2.6.0.1/src/full/Agda/Utils/Suffix.hs0000644000000000000000000000552113466402171016174 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Utils.Suffix where import Data.Char import Agda.Utils.Function #include "undefined.h" import Agda.Utils.Impossible import Data.IORef import qualified System.IO.Unsafe as UNSAFE import Agda.Interaction.Options.IORefs ------------------------------------------------------------------------ -- Subscript digits -- | Are we allowed to use unicode supscript characters? subscriptAllowed :: UnicodeOrAscii subscriptAllowed = UNSAFE.unsafePerformIO (readIORef unicodeOrAscii) -- | Is the character one of the subscripts @'₀'@-@'₉'@? isSubscriptDigit :: Char -> Bool isSubscriptDigit c = case subscriptAllowed of UnicodeOk -> '₀' <= c && c <= '₉' AsciiOnly -> '0' <= c && c <= '9' -- | Converts @'0'@-@'9'@ to @'₀'@-@'₉'@ unless the user doesn't want us -- to use unicode characters -- -- Precondition: The digit needs to be in range. toSubscriptDigit :: Char -> Char toSubscriptDigit d | isDigit d = case subscriptAllowed of UnicodeOk -> toEnum (fromEnum '₀' + (fromEnum d - fromEnum '0')) AsciiOnly -> d | otherwise = __IMPOSSIBLE__ -- | Converts @'₀'@-@'₉'@ to @'0'@-@'9'@. -- -- Precondition: The digit needs to be in range. fromSubscriptDigit :: Char -> Char fromSubscriptDigit d | isSubscriptDigit d = case subscriptAllowed of UnicodeOk -> toEnum (fromEnum '0' + (fromEnum d - fromEnum '₀')) AsciiOnly -> d | otherwise = __IMPOSSIBLE__ ------------------------------------------------------------------------ -- Suffices -- | Classification of identifier variants. data Suffix = NoSuffix | Prime Int -- ^ Identifier ends in @Int@ many primes. | Index Int -- ^ Identifier ends in number @Int@ (ordinary digits). | Subscript Int -- ^ Identifier ends in number @Int@ (subscript digits). -- | Increase the suffix by one. If no suffix yet, put a subscript @1@. nextSuffix :: Suffix -> Suffix nextSuffix NoSuffix = Subscript 1 nextSuffix (Prime i) = Prime $ i + 1 nextSuffix (Index i) = Index $ i + 1 nextSuffix (Subscript i) = Subscript $ i + 1 -- | Parse suffix. suffixView :: String -> (String, Suffix) suffixView s | (ps@(_:_), s') <- span (=='\'') rs = (reverse s', Prime $ length ps) | (ns@(_:_), s') <- span isDigit rs = (reverse s', Index $ read $ reverse ns) | (ns@(_:_), s') <- span isSubscriptDigit rs = (reverse s', Subscript $ read $ map fromSubscriptDigit $ reverse ns) | otherwise = (s, NoSuffix) where rs = reverse s -- | Print suffix. addSuffix :: String -> Suffix -> String addSuffix s NoSuffix = s addSuffix s (Prime n) = s ++ replicate n '\'' addSuffix s (Index i) = s ++ show i addSuffix s (Subscript i) = s ++ map toSubscriptDigit (show i) Agda-2.6.0.1/src/full/Agda/Utils/PartialOrd.hs0000644000000000000000000001770513466402171017000 0ustar0000000000000000 module Agda.Utils.PartialOrd where import Data.Functor import Data.Maybe import Data.Semigroup import Data.Set (Set) import qualified Data.Set as Set -- import Agda.Utils.List -- | The result of comparing two things (of the same type). data PartialOrdering = POLT -- ^ Less than. | POLE -- ^ Less or equal than. | POEQ -- ^ Equal | POGE -- ^ Greater or equal. | POGT -- ^ Greater than. | POAny -- ^ No information (incomparable). deriving (Eq, Show, Enum, Bounded) -- | Comparing the information content of two elements of -- 'PartialOrdering'. More precise information is smaller. -- -- Includes equality: @x `leqPO` x == True@. leqPO :: PartialOrdering -> PartialOrdering -> Bool leqPO _ POAny = True leqPO POLT POLT = True leqPO POLT POLE = True leqPO POLE POLE = True leqPO POEQ POLE = True leqPO POEQ POEQ = True leqPO POEQ POGE = True leqPO POGE POGE = True leqPO POGT POGT = True leqPO POGT POGE = True leqPO _ _ = False -- | Opposites. -- -- @related a po b@ iff @related b (oppPO po) a@. oppPO :: PartialOrdering -> PartialOrdering oppPO POLT = POGT oppPO POLE = POGE oppPO POEQ = POEQ oppPO POGE = POLE oppPO POGT = POLT oppPO POAny = POAny -- | Combining two pieces of information (picking the least information). -- Used for the dominance ordering on tuples. -- -- @orPO@ is associative, commutative, and idempotent. -- @orPO@ has dominant element @POAny@, but no neutral element. orPO :: PartialOrdering -> PartialOrdering -> PartialOrdering orPO POAny _ = POAny -- Shortcut if no information on first. orPO POLT POLT = POLT -- idempotent orPO POLT POLE = POLE orPO POLT POEQ = POLE orPO POLE POLT = POLE orPO POLE POLE = POLE -- idempotent orPO POLE POEQ = POLE orPO POEQ POLT = POLE orPO POEQ POLE = POLE orPO POEQ POEQ = POEQ -- idempotent orPO POEQ POGE = POGE orPO POEQ POGT = POGE orPO POGE POEQ = POGE orPO POGE POGE = POGE -- idempotent orPO POGE POGT = POGE orPO POGT POEQ = POGE orPO POGT POGE = POGE orPO POGT POGT = POGT -- idempotent orPO _ _ = POAny -- | Chains (transitivity) @x R y S z@. -- -- @seqPO@ is associative, commutative, and idempotent. -- @seqPO@ has dominant element @POAny@ and neutral element (unit) @POEQ@. seqPO :: PartialOrdering -> PartialOrdering -> PartialOrdering seqPO POAny _ = POAny -- Shortcut if no information on first. seqPO POEQ p = p -- No need to look at second if first is neutral. seqPO POLT POLT = POLT -- idempotent seqPO POLT POLE = POLT seqPO POLT POEQ = POLT -- unit seqPO POLE POLT = POLT seqPO POLE POLE = POLE -- idempotent seqPO POLE POEQ = POLE -- unit seqPO POGE POEQ = POGE -- unit seqPO POGE POGE = POGE -- idempotent seqPO POGE POGT = POGT seqPO POGT POEQ = POGT -- unit seqPO POGT POGE = POGT seqPO POGT POGT = POGT -- idempotent seqPO _ _ = POAny -- | Partial ordering forms a monoid under sequencing. instance Semigroup PartialOrdering where (<>) = seqPO instance Monoid PartialOrdering where mempty = POEQ mappend = (<>) -- | Embed 'Ordering'. fromOrdering :: Ordering -> PartialOrdering fromOrdering LT = POLT fromOrdering EQ = POEQ fromOrdering GT = POGT -- | Represent a non-empty disjunction of 'Ordering's as 'PartialOrdering'. fromOrderings :: [Ordering] -> PartialOrdering fromOrderings = foldr1 orPO . map fromOrdering -- | A 'PartialOrdering' information is a disjunction of 'Ordering' informations. toOrderings :: PartialOrdering -> [Ordering] toOrderings POLT = [LT] toOrderings POLE = [LT, EQ] toOrderings POEQ = [EQ] toOrderings POGE = [EQ, GT] toOrderings POGT = [GT] toOrderings POAny = [LT, EQ, GT] -- * Comparison with partial result type Comparable a = a -> a -> PartialOrdering -- | Decidable partial orderings. class PartialOrd a where comparable :: Comparable a -- | Any 'Ord' is a 'PartialOrd'. comparableOrd :: Ord a => Comparable a comparableOrd x y = fromOrdering $ compare x y -- | Are two elements related in a specific way? -- -- @related a o b@ holds iff @comparable a b@ is contained in @o@. related :: PartialOrd a => a -> PartialOrdering -> a -> Bool related a o b = comparable a b `leqPO` o -- * Totally ordered types. instance PartialOrd Int where comparable = comparableOrd instance PartialOrd Integer where comparable = comparableOrd -- * Generic partially ordered types. instance PartialOrd () where comparable _ _ = POEQ -- | 'Nothing' and @'Just' _@ are unrelated. -- -- Partial ordering for @Maybe a@ is the same as for @Either () a@. instance PartialOrd a => PartialOrd (Maybe a) where comparable mx my = case (mx, my) of (Nothing, Nothing) -> POEQ (Nothing, Just{} ) -> POAny (Just{} , Nothing) -> POAny (Just x , Just y ) -> comparable x y -- | Partial ordering for disjoint sums: @Left _@ and @Right _@ are unrelated. instance (PartialOrd a, PartialOrd b) => PartialOrd (Either a b) where comparable mx my = case (mx, my) of (Left x, Left y) -> comparable x y (Left _, Right _) -> POAny (Right _, Left _) -> POAny (Right x, Right y) -> comparable x y -- | Pointwise partial ordering for tuples. -- -- @related (x1,x2) o (y1,y2)@ iff @related x1 o x2@ and @related y1 o y2@. instance (PartialOrd a, PartialOrd b) => PartialOrd (a, b) where comparable (x1, x2) (y1, y2) = comparable x1 y1 `orPO` comparable x2 y2 -- | Pointwise comparison wrapper. newtype Pointwise a = Pointwise { pointwise :: a } deriving (Eq, Show, Functor) -- | The pointwise ordering for lists of the same length. -- -- There are other partial orderings for lists, -- e.g., prefix, sublist, subset, lexicographic, simultaneous order. instance PartialOrd a => PartialOrd (Pointwise [a]) where comparable (Pointwise xs) (Pointwise ys) = loop Nothing xs ys -- We need an accumulator since @orPO@ does not have a neutral element. where loop mo [] [] = fromMaybe POEQ mo loop _ [] ys = POAny loop _ xs [] = POAny loop mo (x:xs) (y:ys) = let o = comparable x y in case maybe o (orPO o) mo of POAny -> POAny o -> loop (Just o) xs ys -- | Inclusion comparison wrapper. newtype Inclusion a = Inclusion { inclusion :: a } deriving (Eq, Ord, Show, Functor) -- | Sublist for ordered lists. instance (Ord a) => PartialOrd (Inclusion [a]) where comparable (Inclusion xs) (Inclusion ys) = merge POEQ xs ys where -- We use an accumulator in order to short-cut computation -- once we know the lists are incomparable. merge' POAny xs ys = POAny merge' o xs ys = merge o xs ys merge o [] [] = o merge o [] ys = mappend o POLT merge o xs [] = mappend o POGT merge o xs@(x:xs') ys@(y:ys') = case compare x y of -- xs has an element that ys does not have => POGT LT -> merge' (mappend o POGT) xs' ys -- equal elements can be cancelled EQ -> merge o xs' ys' -- ys has an element that xs does not have => POLT GT -> merge' (mappend o POLT) xs ys' -- | Sets are partially ordered by inclusion. instance Ord a => PartialOrd (Inclusion (Set a)) where comparable s t = comparable (Set.toAscList <$> s) (Set.toAscList <$> t) -- * PartialOrdering is itself partially ordered! -- | Less is ``less general'' (i.e., more precise). instance PartialOrd PartialOrdering where -- working our way down: POAny is top comparable POAny POAny = POEQ comparable POAny _ = POGT comparable _ POAny = POLT -- next are the fuzzy notions POLE and POGE comparable POLE POLE = POEQ comparable POLE POLT = POGT comparable POLE POEQ = POGT comparable POGE POGE = POEQ comparable POGE POGT = POGT comparable POGE POEQ = POGT -- lowest are the precise notions POLT POEQ POGT comparable POLT POLT = POEQ comparable POLT POLE = POLT comparable POEQ POEQ = POEQ comparable POEQ POLE = POLT comparable POEQ POGE = POLT comparable POGT POGT = POEQ comparable POGT POGE = POLT -- anything horizontal is not comparable comparable _ _ = POAny Agda-2.6.0.1/src/full/Agda/Utils/Environment.hs0000644000000000000000000000256213466402171017236 0ustar0000000000000000 -- | Expand environment variables in strings module Agda.Utils.Environment ( expandEnvironmentVariables ) where import Data.Char import Data.Maybe import System.Environment import System.Directory ( getHomeDirectory ) expandEnvironmentVariables :: String -> IO String expandEnvironmentVariables s = do env <- getEnvironment home <- getHomeDirectory return $ expandVars home env s expandVars :: String -> [(String, String)] -> String -> String expandVars home env s = concatMap repl $ tokens s where repl Home = home ++ "/" repl (Var x) = fromMaybe "" $ lookup x env repl (Str s) = s data Token = Home | Var String | Str String deriving (Eq, Show) tokens :: String -> [Token] tokens s = case s of '~' : '/' : s -> Home : tokens' s '\\' : '~' : s -> cons '~' $ tokens' s _ -> tokens' s where tokens' :: String -> [Token] tokens' s = case s of '$' : '$' : s -> cons '$' $ tokens' s '$' : s@(c : _) | c == '_' || isAlpha c -> Var x : tokens' s' where (x, s') = span (\ c -> c == '_' || isAlphaNum c) s '$' : '{' : s -> case break (== '}') s of (x, '}' : s) -> Var x : tokens' s _ -> [Str $ "${" ++ s] -- abort on unterminated '{' c : s -> cons c $ tokens' s "" -> [] cons c (Str s : ts) = Str (c : s) : ts cons c ts = Str [c] : ts Agda-2.6.0.1/src/full/Agda/Utils/Permutation.hs0000644000000000000000000002104313466402171017234 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} module Agda.Utils.Permutation where import Prelude hiding (drop, null) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import qualified Data.List as List import Data.Maybe import Data.Array import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Data.Data (Data) import Agda.Syntax.Position (KillRange(..)) import Agda.Utils.Functor import Agda.Utils.List ((!!!)) import Agda.Utils.Null import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Partial permutations. Examples: -- -- @permute [1,2,0] [x0,x1,x2] = [x1,x2,x0]@ (proper permutation). -- -- @permute [1,0] [x0,x1,x2] = [x1,x0]@ (partial permuation). -- -- @permute [1,0,1,2] [x0,x1,x2] = [x1,x0,x1,x2]@ (not a permutation because not invertible). -- -- Agda typing would be: -- @Perm : {m : Nat}(n : Nat) -> Vec (Fin n) m -> Permutation@ -- @m@ is the 'size' of the permutation. data Permutation = Perm { permRange :: Int, permPicks :: [Int] } deriving (Eq, Data) instance Show Permutation where show (Perm n xs) = showx [0..n - 1] ++ " -> " ++ showx xs where showx = showList "," (\ i -> "x" ++ show i) showList :: String -> (a -> String) -> [a] -> String showList sep f [] = "" showList sep f [e] = f e showList sep f (e:es) = f e ++ sep ++ showList sep f es instance Sized Permutation where size (Perm _ xs) = size xs instance Null Permutation where empty = Perm 0 [] null (Perm _ picks) = null picks instance KillRange Permutation where killRange = id -- | @permute [1,2,0] [x0,x1,x2] = [x1,x2,x0]@ -- More precisely, @permute indices list = sublist@, generates @sublist@ -- from @list@ by picking the elements of list as indicated by @indices@. -- @permute [1,3,0] [x0,x1,x2,x3] = [x1,x3,x0]@ -- -- Agda typing: -- @permute (Perm {m} n is) : Vec A m -> Vec A n@ permute :: Permutation -> [a] -> [a] permute p xs = map (fromMaybe __IMPOSSIBLE__) (safePermute p xs) safePermute :: Permutation -> [a] -> [Maybe a] safePermute (Perm _ is) xs = map (xs !!!!) is where xs !!!! n | n < 0 = Nothing | otherwise = xs !!! n -- | Invert a Permutation on a partial finite int map. -- @inversePermute perm f = f'@ -- such that @permute perm f' = f@ -- -- Example, with map represented as @[Maybe a]@: -- @ -- f = [Nothing, Just a, Just b ] -- perm = Perm 4 [3,0,2] -- f' = [ Just a , Nothing , Just b , Nothing ] -- @ -- Zipping @perm@ with @f@ gives @[(0,a),(2,b)]@, after compression -- with @catMaybes@. This is an @IntMap@ which can easily -- written out into a substitution again. class InversePermute a b where inversePermute :: Permutation -> a -> b instance InversePermute [Maybe a] [(Int,a)] where inversePermute (Perm n is) = catMaybes . zipWith (\ i ma -> (i,) <$> ma) is instance InversePermute [Maybe a] (IntMap a) where inversePermute p = IntMap.fromList . inversePermute p instance InversePermute [Maybe a] [Maybe a] where inversePermute p@(Perm n _) = tabulate . inversePermute p where tabulate m = for [0..n-1] $ \ i -> IntMap.lookup i m instance InversePermute (Int -> a) [Maybe a] where inversePermute (Perm n xs) f = for [0..n-1] $ \ x -> f <$> List.findIndex (x ==) xs -- | Identity permutation. idP :: Int -> Permutation idP n = Perm n [0..n - 1] -- | Restrict a permutation to work on @n@ elements, discarding picks @>=n@. takeP :: Int -> Permutation -> Permutation takeP n (Perm m xs) = Perm n $ filter (< n) xs -- | Pick the elements that are not picked by the permutation. droppedP :: Permutation -> Permutation droppedP (Perm n xs) = Perm n $ [0..n-1] List.\\ xs -- | @liftP k@ takes a @Perm {m} n@ to a @Perm {m+k} (n+k)@. -- Analogous to 'Agda.TypeChecking.Substitution.liftS', -- but Permutations operate on de Bruijn LEVELS, not indices. liftP :: Int -> Permutation -> Permutation liftP n (Perm m xs) = Perm (n + m) $ xs ++ [m..m+n-1] -- liftP n (Perm m xs) = Perm (n + m) $ [0..n-1] ++ map (n+) xs -- WRONG, works for indices, but not for levels -- | @permute (compose p1 p2) == permute p1 . permute p2@ composeP :: Permutation -> Permutation -> Permutation composeP p1 (Perm n xs) = Perm n $ permute p1 xs {- proof: permute (compose (Perm xs) (Perm ys)) zs == permute (Perm (permute (Perm xs) ys)) zs == map (zs !!) (permute (Perm xs) ys) == map (zs !!) (map (ys !!) xs) == map (zs !! . ys !!) xs == map (\x -> zs !! (ys !! x)) xs == map (\x -> map (zs !!) ys !! x) xs {- map f xs !! n == f (xs !! n) -} == map (map (zs !!) ys !!) xs == permute (Perm xs) (permute (Perm ys) zs) -} -- | @invertP err p@ is the inverse of @p@ where defined, -- otherwise defaults to @err@. -- @composeP p (invertP err p) == p@ invertP :: Int -> Permutation -> Permutation invertP err p@(Perm n xs) = Perm (size xs) $ elems tmpArray where tmpArray = accumArray (flip const) err (0, n-1) $ zip xs [0..] -- | Turn a possible non-surjective permutation into a surjective permutation. compactP :: Permutation -> Permutation compactP (Perm n xs) = Perm m $ map adjust xs where m = List.genericLength xs missing = [0..n - 1] List.\\ xs holesBelow k = List.genericLength $ filter (< k) missing adjust k = k - holesBelow k -- | @permute (reverseP p) xs == -- reverse $ permute p $ reverse xs@ -- -- Example: -- @ -- permute (reverseP (Perm 4 [1,3,0])) [x0,x1,x2,x3] -- == permute (Perm 4 $ map (3-) [0,3,1]) [x0,x1,x2,x3] -- == permute (Perm 4 [3,0,2]) [x0,x1,x2,x3] -- == [x3,x0,x2] -- == reverse [x2,x0,x3] -- == reverse $ permute (Perm 4 [1,3,0]) [x3,x2,x1,x0] -- == reverse $ permute (Perm 4 [1,3,0]) $ reverse [x0,x1,x2,x3] -- @ -- -- With @reverseP@, you can convert a permutation on de Bruijn indices -- to one on de Bruijn levels, and vice versa. reverseP :: Permutation -> Permutation reverseP (Perm n xs) = Perm n $ map ((n - 1) -) $ reverse xs -- = flipP $ Perm n $ reverse xs -- | @permPicks (flipP p) = permute p (downFrom (permRange p))@ -- or -- @permute (flipP (Perm n xs)) [0..n-1] = permute (Perm n xs) (downFrom n)@ -- -- Can be use to turn a permutation from (de Bruijn) levels to levels -- to one from levels to indices. -- -- See 'Agda.Syntax.Internal.Patterns.numberPatVars'. flipP :: Permutation -> Permutation flipP (Perm n xs) = Perm n $ map (n - 1 -) xs -- | @expandP i n π@ in the domain of @π@ replace the /i/th element by /n/ elements. expandP :: Int -> Int -> Permutation -> Permutation expandP i n (Perm m xs) = Perm (m + n - 1) $ concatMap expand xs where expand j | j == i = [i..i + n - 1] | j < i = [j] | otherwise = [j + n - 1] -- | Stable topologic sort. The first argument decides whether its first -- argument is an immediate parent to its second argument. topoSort :: (a -> a -> Bool) -> [a] -> Maybe Permutation topoSort parent xs = fmap (Perm (size xs)) $ topo g where nodes = zip [0..] xs g = [ (n, parents x) | (n, x) <- nodes ] parents x = [ n | (n, y) <- nodes, parent y x ] topo :: Eq node => [(node, [node])] -> Maybe [node] topo [] = return [] topo g = case xs of [] -> fail "cycle detected" x : _ -> do ys <- topo $ remove x g return $ x : ys where xs = [ x | (x, []) <- g ] remove x g = [ (y, filter (/= x) ys) | (y, ys) <- g, x /= y ] ------------------------------------------------------------------------ -- * Drop (apply) and undrop (abstract) ------------------------------------------------------------------------ -- | Delayed dropping which allows undropping. data Drop a = Drop { dropN :: Int -- ^ Non-negative number of things to drop. , dropFrom :: a -- ^ Where to drop from. } deriving (Eq, Ord, Show, Data, Functor, Foldable, Traversable) instance KillRange a => KillRange (Drop a) where killRange = fmap killRange -- | Things that support delayed dropping. class DoDrop a where doDrop :: Drop a -> a -- ^ Perform the dropping. dropMore :: Int -> Drop a -> Drop a -- ^ Drop more. dropMore n (Drop m xs) = Drop (m + n) xs unDrop :: Int -> Drop a -> Drop a -- ^ Pick up dropped stuff. unDrop n (Drop m xs) | n <= m = Drop (m - n) xs | otherwise = __IMPOSSIBLE__ instance DoDrop [a] where doDrop (Drop m xs) = List.drop m xs instance DoDrop Permutation where doDrop (Drop k (Perm n xs)) = Perm (n + m) $ [0..m-1] ++ map (+ m) (List.drop k xs) where m = -k unDrop m = dropMore (-m) -- allow picking up more than dropped Agda-2.6.0.1/src/full/Agda/Utils/Char.hs0000644000000000000000000000340113466402171015600 0ustar0000000000000000module Agda.Utils.Char where import Data.Char -- | Convert a character in @'0'..'9'@ into the corresponding digit @0..9@. decDigit :: Char -> Int decDigit c = ord c - ord '0' -- | Convert a character in @'0'..'9','A'..'F','a'..'f'@ -- into the corresponding digit @0..15@. hexDigit :: Char -> Int hexDigit c | isDigit c = decDigit c | otherwise = ord (toLower c) - ord 'a' + 10 -- | Convert a character in @'0'..'7'@ into the corresponding digit @0..7@. octDigit :: Char -> Int octDigit = decDigit ------------------------------------------------------------------------ -- * Unicode exploration ------------------------------------------------------------------------ -- | Unicode characters are divided into letters, numbers, marks, -- punctuation, symbols, separators (including spaces) and others -- (including control characters). -- -- These are the tests that 'Data.Char' offers: data UnicodeTest = IsControl | IsSpace | IsLower | IsUpper | IsAlpha | IsAlphaNum | IsPrint | IsDigit | IsOctDigit | IsHexDigit | IsLetter | IsMark | IsNumber | IsPunctuation | IsSymbol | IsSeparator deriving (Eq, Ord, Show) -- | Test names paired with their implementation. unicodeTests :: [(UnicodeTest, Char -> Bool)] unicodeTests = [ (IsControl, isControl), (IsSpace, isSpace) , (IsLower, isLower), (IsUpper, isUpper), (IsAlpha, isAlpha) , (IsAlphaNum, isAlphaNum) , (IsPrint, isPrint) , (IsDigit, isDigit), (IsOctDigit, isOctDigit), (IsHexDigit, isHexDigit) , (IsLetter, isLetter), (IsMark, isMark) , (IsNumber, isNumber), (IsPunctuation, isPunctuation), (IsSymbol, isSymbol) , (IsSeparator, isSeparator) ] -- | Find out which tests a character satisfies. testChar :: Char -> [UnicodeTest] testChar c = map fst $ filter (($ c) . snd) unicodeTests Agda-2.6.0.1/src/full/Agda/Utils/Graph/0000755000000000000000000000000013466402171015432 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Graph/TopSort.hs0000644000000000000000000000250613466402171017403 0ustar0000000000000000{-# language ViewPatterns #-} module Agda.Utils.Graph.TopSort ( topSort ) where import Data.List import Data.Maybe import Data.Function import qualified Data.Set as Set import qualified Data.Map as Map import Control.Arrow mergeBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] mergeBy _ [] xs = xs mergeBy _ xs [] = xs mergeBy f (x:xs) (y:ys) | f x y = x: mergeBy f xs (y:ys) | otherwise = y: mergeBy f (x:xs) ys -- | topoligical sort with smallest-numbered available vertex first -- | input: nodes, edges -- | output is Nothing if the graph is not a DAG topSort :: Ord n => [n] -> [(n, n)] -> Maybe [n] topSort nodes edges = mergeBy (<) nodes' <$> g m is where g m [] | Map.null m = Just [] | otherwise = Nothing g m ((n, Set.toList -> cs): ns) = (n:) <$> g m' (mergeBy ((<) `on` fst) ns [(c, s) | c<-cs, (0, s) <- maybeToList $ Map.lookup c m']) where m' = foldr (Map.adjust $ first (+(-1))) (Map.delete n m) cs is = map (second snd) . filter ((==0) . fst . snd) $ Map.toList m nodes' = Set.toList $ Set.fromList nodes `Set.difference` Set.fromList (concatMap (\(a,b)->[a,b]) edges) m = foldr f mempty $ nub edges f (b, a) = Map.alter (Just . maybe (1, mempty) (first (+1))) b . Map.alter (Just . maybe (0, Set.singleton b) (second $ Set.insert b)) a Agda-2.6.0.1/src/full/Agda/Utils/Graph/AdjacencyMap/0000755000000000000000000000000013466402171017751 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Graph/AdjacencyMap/Unidirectional.hs0000644000000000000000000006613713466402171023273 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Directed graphs (can of course simulate undirected graphs). -- -- Represented as adjacency maps in direction from source to target. -- -- Each source node maps to an adjacency map of outgoing edges, -- which is a map from target nodes to edges. -- -- Listed time complexities are for the worst case (and possibly -- amortised), with /n/ standing for the number of nodes in the -- graph and /e/ standing for the number of edges. Comparisons, -- predicates etc. are assumed to take constant time (unless -- otherwise stated). module Agda.Utils.Graph.AdjacencyMap.Unidirectional ( -- * Graphs and edges Graph(..) , invariant , Edge(..) -- * Queries , lookup , edges , neighbours, neighboursMap , edgesFrom , edgesTo , diagonal , nodes, sourceNodes, targetNodes, isolatedNodes , Nodes(..), computeNodes , discrete , acyclic -- * Construction , fromNodes, fromNodeSet , fromEdges, fromEdgesWith , empty , singleton , insert, insertWith , insertEdge, insertEdgeWith , union, unionWith , unions, unionsWith -- * Transformation , mapWithEdge , transposeEdge, transpose , clean , removeNode, removeNodes , removeEdge , filterEdges , unzip , composeWith -- * Strongly connected components , sccs' , sccs , DAG(..) , dagInvariant , oppositeDAG , reachable , sccDAG' , sccDAG -- * Reachability , reachableFrom, reachableFromSet , walkSatisfying -- * Transitive closure , gaussJordanFloydWarshallMcNaughtonYamada , gaussJordanFloydWarshallMcNaughtonYamadaReference , complete, completeIter ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), lookup, null, unzip ) #else import Prelude hiding ( lookup, null, unzip ) #endif import Control.Applicative hiding (empty) import Control.Monad import qualified Data.Array.IArray as Array import qualified Data.Edison.Seq.BankersQueue as BQ import qualified Data.Edison.Seq.SimpleQueue as SQ import Data.Function import qualified Data.Graph as Graph import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import qualified Data.IntSet as IntSet import qualified Data.List as List import qualified Data.Map.Strict as Map import Data.Map.Strict (Map) import qualified Data.Maybe as Maybe import Data.Maybe (maybeToList, fromMaybe) import qualified Data.Set as Set import Data.Set (Set) import qualified Data.Tree as Tree import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List (headMaybe) import Agda.Utils.Null (Null(null)) import qualified Agda.Utils.Null as Null import Agda.Utils.Pretty import Agda.Utils.SemiRing import Agda.Utils.Singleton (Singleton) import qualified Agda.Utils.Singleton as Singleton import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- Graphs and edges -- | @Graph n e@ is a type of directed graphs with nodes in @n@ and -- edges in @e@. -- -- At most one edge is allowed between any two nodes. Multigraphs -- can be simulated by letting the edge type @e@ be a collection -- type. -- -- The graphs are represented as adjacency maps (adjacency lists, -- but using finite maps instead of arrays and lists). This makes it -- possible to compute a node's outgoing edges in logarithmic time -- (/O(log n)/). However, computing the incoming edges may be more -- expensive. -- -- Note that neither the number of nodes nor the number of edges may -- exceed @'maxBound' :: 'Int'@. newtype Graph n e = Graph { graph :: Map n (Map n e) -- ^ Forward edges. } deriving Eq -- The Functor instance for strict maps is the one for lazy maps, so a -- custom Functor instance using strict map functions is used here. instance Functor (Graph n) where fmap f = Graph . Map.map (Map.map f) . graph -- | Internal invariant. invariant :: Ord n => Graph n e -> Bool invariant g = -- Every target node must be present in the graph as a source node, -- possibly without outgoing edges. Set.isSubsetOf (targetNodes g) (nodes g) instance (Ord n, Pretty n, Pretty e) => Pretty (Graph n e) where pretty g = vcat (concat $ map pretty' (Set.toAscList (nodes g))) where pretty' n = case edgesFrom g [n] of [] -> [pretty n] es -> map pretty es instance (Ord n, Show n, Show e) => Show (Graph n e) where showsPrec _ g = showString "union (fromEdges " . shows (edges g) . showString ") (fromNodes " . shows (Set.toList (isolatedNodes g)) . showString ")" -- | Edges. data Edge n e = Edge { source :: n -- ^ Outgoing node. , target :: n -- ^ Incoming node. , label :: e -- ^ Edge label (weight). } deriving (Eq, Ord, Functor, Show) instance (Pretty n, Pretty e) => Pretty (Edge n e) where pretty (Edge s t e) = pretty s <+> "--(" <> pretty e <> ")-->" <+> pretty t ------------------------------------------------------------------------ -- Queries -- | If there is an edge from @s@ to @t@, then @lookup s t g@ is -- @'Just' e@, where @e@ is the edge's label. /O(log n)/. lookup :: Ord n => n -> n -> Graph n e -> Maybe e lookup s t (Graph g) = Map.lookup t =<< Map.lookup s g -- | The graph's edges. /O(n + e)/. edges :: Graph n e -> [Edge n e] edges (Graph g) = [ Edge s t e | (s, tes) <- Map.assocs g , (t, e) <- Map.assocs tes ] -- | @neighbours u g@ consists of all nodes @v@ for which there is an -- edge from @u@ to @v@ in @g@, along with the corresponding edge -- labels. /O(log n + |@neighbours u g@|)/. neighbours :: Ord n => n -> Graph n e -> [(n, e)] neighbours s = Map.toList . neighboursMap s -- | @neighboursMap u g@ consists of all nodes @v@ for which there is -- an edge from @u@ to @v@ in @g@, along with the corresponding edge -- labels. /O(log n)/. neighboursMap :: Ord n => n -> Graph n e -> Map n e neighboursMap s (Graph g) = fromMaybe Map.empty $ Map.lookup s g -- | @edgesFrom g ns@ is a list containing all edges originating in -- the given nodes (i.e., all outgoing edges for the given nodes). If -- @ns@ does not contain duplicates, then the resulting list does not -- contain duplicates. /O(|@ns@| log |@n@| + |@edgesFrom g ns@|)/. edgesFrom :: Ord n => Graph n e -> [n] -> [Edge n e] edgesFrom (Graph g) ss = [ Edge s t e | s <- ss , m <- maybeToList $ Map.lookup s g , (t, e) <- Map.assocs m ] -- | @edgesTo g ns@ is a list containing all edges ending in the given -- nodes (i.e., all incoming edges for the given nodes). If @ns@ does -- not contain duplicates, then the resulting list does not contain -- duplicates. /O(|@ns@| n log n)/. edgesTo :: Ord n => Graph n e -> [n] -> [Edge n e] edgesTo (Graph g) ts = [ Edge s t e | (s, m) <- Map.assocs g , t <- ts , e <- maybeToList $ Map.lookup t m ] -- | All self-loops. /O(n log n)/. diagonal :: Ord n => Graph n e -> [Edge n e] diagonal (Graph g) = [ Edge s s e | (s, m) <- Map.assocs g , e <- maybeToList $ Map.lookup s m ] -- | All nodes. /O(n)/. nodes :: Graph n e -> Set n nodes = Map.keysSet . graph -- | Nodes with outgoing edges. /O(n)/. sourceNodes :: Graph n e -> Set n sourceNodes = Map.keysSet . Map.filter (not . Map.null) . graph -- | Nodes with incoming edges. /O(n + e log n)/. targetNodes :: Ord n => Graph n e -> Set n targetNodes = Set.fromList . map target . edges -- | Various kinds of nodes. data Nodes n = Nodes { srcNodes :: Set n -- ^ Nodes with outgoing edges. , tgtNodes :: Set n -- ^ Nodes with incoming edges. , allNodes :: Set n -- ^ All nodes, with or without edges. } -- | Constructs a 'Nodes' structure. /O(n + e log n)/. computeNodes :: Ord n => Graph n e -> Nodes n computeNodes g = Nodes { srcNodes = Set.filter (not . null . flip neighbours g) ns , tgtNodes = targetNodes g , allNodes = ns } where ns = nodes g -- | Nodes without incoming or outgoing edges. /O(n + e log n)/. isolatedNodes :: Ord n => Graph n e -> Set n isolatedNodes g = Set.difference (allNodes ns) (Set.union (srcNodes ns) (tgtNodes ns)) where ns = computeNodes g -- | Checks whether the graph is discrete (containing no edges other -- than 'null' edges). /O(n + e)/. discrete :: Null e => Graph n e -> Bool discrete = all' (all' null) . graph where all' p = List.all p . Map.elems -- | Returns @True@ iff the graph is acyclic. acyclic :: Ord n => Graph n e -> Bool acyclic = all isAcyclic . sccs' where isAcyclic Graph.AcyclicSCC{} = True isAcyclic Graph.CyclicSCC{} = False ------------------------------------------------------------------------ -- Construction -- | Constructs a completely disconnected graph containing the given -- nodes. /O(n log n)/. fromNodes :: Ord n => [n] -> Graph n e fromNodes ns = Graph $ Map.fromList $ map (, Map.empty) ns -- | Constructs a completely disconnected graph containing the given -- nodes. /O(n)/. fromNodeSet :: Ord n => Set n -> Graph n e fromNodeSet ns = Graph $ Map.fromSet (\_ -> Map.empty) ns -- | @fromEdges es@ is a graph containing the edges in @es@, with the -- caveat that later edges overwrite earlier edges. /O(|@es@| log n)/. fromEdges :: Ord n => [Edge n e] -> Graph n e fromEdges = fromEdgesWith $ \ new old -> new -- | @fromEdgesWith f es@ is a graph containing the edges in @es@. -- Later edges are combined with earlier edges using the supplied -- function. /O(|@es@| log n)/. fromEdgesWith :: Ord n => (e -> e -> e) -> [Edge n e] -> Graph n e fromEdgesWith f = List.foldl' (flip (insertEdgeWith f)) empty -- | Empty graph (no nodes, no edges). /O(1)/. empty :: Graph n e empty = Graph Map.empty -- | A graph with two nodes and a single connecting edge. /O(1)/. singleton :: Ord n => n -> n -> e -> Graph n e singleton s t e = insert s t e empty -- | Inserts an edge into the graph. /O(log n)/. insert :: Ord n => n -> n -> e -> Graph n e -> Graph n e insert = insertWith $ \ new old -> new -- | Inserts an edge into the graph. /O(log n)/. insertEdge :: Ord n => Edge n e -> Graph n e -> Graph n e insertEdge (Edge s t e) = insert s t e -- | @insertWith f s t new@ inserts an edge from @s@ to @t@ into the -- graph. If there is already an edge from @s@ to @t@ with label @old@, -- then this edge gets replaced by an edge with label @f new old@, and -- otherwise the edge's label is @new@. /O(log n)/. insertWith :: Ord n => (e -> e -> e) -> n -> n -> e -> Graph n e -> Graph n e insertWith f s t e (Graph g) = Graph (Map.alter (Just . insNode) t $ Map.alter (Just . insEdge) s g) where insEdge Nothing = Map.singleton t e insEdge (Just m) = Map.insertWith f t e m insNode Nothing = Map.empty insNode (Just m) = m -- | A variant of 'insertWith'. /O(log n)/. insertEdgeWith :: Ord n => (e -> e -> e) -> Edge n e -> Graph n e -> Graph n e insertEdgeWith f (Edge s t e) = insertWith f s t e -- | Left-biased union. -- -- Time complexity: See 'unionWith'. union :: Ord n => Graph n e -> Graph n e -> Graph n e union = unionWith $ \ left right -> left -- | Union. The function is used to combine edge labels for edges that -- occur in both graphs (labels from the first graph are given as the -- first argument to the function). -- -- Time complexity: /O(n₁ log (n₂/n₁ + 1) + e₁ log e₂/, where /n₁/ is -- the number of nodes in the graph with the smallest number of nodes -- and /n₂/ is the number of nodes in the other graph, and /e₁/ is the -- number of edges in the graph with the smallest number of edges and -- /e₂/ is the number of edges in the other graph. -- -- Less complicated time complexity: /O((n + e) log n/ (where /n/ and -- /e/ refer to the resulting graph). unionWith :: Ord n => (e -> e -> e) -> Graph n e -> Graph n e -> Graph n e unionWith f (Graph g) (Graph g') = Graph $ Map.unionWith (Map.unionWith f) g g' -- | Union. /O((n + e) log n/ (where /n/ and /e/ refer to the -- resulting graph). unions :: Ord n => [Graph n e] -> Graph n e unions = unionsWith $ \ left right -> left -- | Union. The function is used to combine edge labels for edges that -- occur in several graphs. /O((n + e) log n/ (where /n/ and /e/ refer -- to the resulting graph). unionsWith :: Ord n => (e -> e -> e) -> [Graph n e] -> Graph n e unionsWith f = List.foldl' (unionWith f) empty ------------------------------------------------------------------------ -- Transformation -- | A variant of 'fmap' that provides extra information to the -- function argument. /O(n + e)/. mapWithEdge :: (Edge n e -> e') -> Graph n e -> Graph n e' mapWithEdge f (Graph g) = Graph $ flip Map.mapWithKey g $ \ s m -> flip Map.mapWithKey m $ \ t e -> f (Edge s t e) -- | Reverses an edge. /O(1)/. transposeEdge :: Edge n e -> Edge n e transposeEdge (Edge s t e) = Edge t s e -- | The opposite graph (with all edges reversed). /O((n + e) log n)/. transpose :: Ord n => Graph n e -> Graph n e transpose g = fromEdges (map transposeEdge (edges g)) `union` fromNodeSet (isolatedNodes g) -- | Removes 'null' edges. /O(n + e)/. clean :: Null e => Graph n e -> Graph n e clean = Graph . Map.map (Map.filter (not . null)) . graph -- | @removeNodes ns g@ removes the nodes in @ns@ (and all -- corresponding edges) from @g@. /O((n + e) log |@ns@|)/. removeNodes :: Ord n => Set n -> Graph n e -> Graph n e removeNodes ns (Graph g) = Graph (Map.mapMaybeWithKey remSrc g) where remSrc s m | Set.member s ns = Nothing | otherwise = Just (Map.filterWithKey (\t _ -> not (Set.member t ns)) m) -- | @removeNode n g@ removes the node @n@ (and all corresponding -- edges) from @g@. /O(n + e)/. removeNode :: Ord n => n -> Graph n e -> Graph n e removeNode = removeNodes . Set.singleton -- | @removeEdge s t g@ removes the edge going from @s@ to @t@, if any. -- /O(log n)/. removeEdge :: Ord n => n -> n -> Graph n e -> Graph n e removeEdge s t (Graph g) = Graph $ Map.adjust (Map.delete t) s g -- | Keep only the edges that satisfy the predicate. /O(n + e)/. filterEdges :: (Edge n e -> Bool) -> Graph n e -> Graph n e filterEdges f = Graph . Map.mapWithKey (\s -> Map.filterWithKey (\t l -> f (Edge { source = s, target = t, label = l }))) . graph -- | Unzips the graph. /O(n + e)/. -- This is a naive implementation that uses fmap. unzip :: Graph n (e, e') -> (Graph n e, Graph n e') unzip g = (fst <$> g, snd <$> g) -- | @composeWith times plus g g'@ finds all edges -- @s --c_i--> t_i --d_i--> u@ and constructs the -- result graph from @edge(s,u) = sum_i (c_i times d_i)@. -- -- Complexity: For each edge @s --> t@ in @g@ we look up -- all edges starting with @t@ in @g'@. -- -- Precondition: The two graphs must have exactly the same nodes. composeWith :: Ord n => (c -> d -> e) -> (e -> e -> e) -> Graph n c -> Graph n d -> Graph n e composeWith times plus (Graph g) (Graph g') = Graph (Map.map comp g) where comp m = Map.fromListWith plus [ (u, c `times` d) | (t, c) <- Map.assocs m , m' <- maybeToList (Map.lookup t g') , (u, d) <- Map.assocs m' ] ------------------------------------------------------------------------ -- Strongly connected components -- | The graph's strongly connected components, in reverse topological -- order. sccs' :: Ord n => Graph n e -> [Graph.SCC n] sccs' g = Graph.stronglyConnComp [ (n, n, map target (edgesFrom g [n])) | n <- Set.toList (nodes g) ] -- | The graph's strongly connected components, in reverse topological -- order. sccs :: Ord n => Graph n e -> [[n]] sccs = map Graph.flattenSCC . sccs' -- | SCC DAGs. -- -- The maps map SCC indices to and from SCCs/nodes. data DAG n = DAG { dagGraph :: Graph.Graph , dagComponentMap :: IntMap (Graph.SCC n) , dagNodeMap :: Map n Int } -- | 'DAG' invariant. dagInvariant :: Ord n => DAG n -> Bool dagInvariant g = Set.fromList (concatMap Graph.flattenSCC (IntMap.elems (dagComponentMap g))) == Map.keysSet (dagNodeMap g) && IntSet.fromList (Map.elems (dagNodeMap g)) == IntMap.keysSet (dagComponentMap g) && and [ n `elem` Graph.flattenSCC (dagComponentMap g IntMap.! (dagNodeMap g Map.! n)) | n <- Map.keys (dagNodeMap g) ] && and [ dagNodeMap g Map.! n == i | i <- Graph.vertices (dagGraph g) , n <- Graph.flattenSCC (dagComponentMap g IntMap.! i) ] && IntSet.fromList (Graph.vertices (dagGraph g)) == IntMap.keysSet (dagComponentMap g) && all isAcyclic (Graph.scc (dagGraph g)) where isAcyclic (Tree.Node r []) = not (r `elem` (dagGraph g Array.! r)) isAcyclic _ = False -- | The opposite DAG. oppositeDAG :: DAG n -> DAG n oppositeDAG g = g { dagGraph = Graph.transposeG (dagGraph g) } -- | The nodes reachable from the given SCC. reachable :: Ord n => DAG n -> Graph.SCC n -> [n] reachable g scc = case scc of Graph.AcyclicSCC n -> List.delete n (reachable' n) Graph.CyclicSCC (n : _) -> reachable' n Graph.CyclicSCC [] -> __IMPOSSIBLE__ where lookup' g k = case IntMap.lookup k g of Nothing -> __IMPOSSIBLE__ Just x -> x lookup'' g k = case Map.lookup k g of Nothing -> __IMPOSSIBLE__ Just x -> x reachable' n = concatMap (Graph.flattenSCC . lookup' (dagComponentMap g)) $ Graph.reachable (dagGraph g) (lookup'' (dagNodeMap g) n) -- | Constructs a DAG containing the graph's strongly connected -- components. sccDAG' :: forall n e. Ord n => Graph n e -> [Graph.SCC n] -- ^ The graph's strongly connected components. -> DAG n sccDAG' g sccs = DAG theDAG componentMap secondNodeMap where components :: [(Int, Graph.SCC n)] components = zip [1..] sccs firstNodeMap :: Map n Int firstNodeMap = Map.fromList [ (n, i) | (i, c) <- components , n <- Graph.flattenSCC c ] targets :: Int -> [n] -> [Int] targets i ns = IntSet.toList $ IntSet.fromList [ j | e <- edgesFrom g ns , let j = case Map.lookup (target e) firstNodeMap of Nothing -> __IMPOSSIBLE__ Just j -> j , j /= i ] (theDAG, _, toVertex) = Graph.graphFromEdges [ (i, i, targets i (Graph.flattenSCC c)) | (i, c) <- components ] convertInt :: Int -> Graph.Vertex convertInt i = case toVertex i of Nothing -> __IMPOSSIBLE__ Just i -> i componentMap :: IntMap (Graph.SCC n) componentMap = IntMap.fromList (map (mapFst convertInt) components) secondNodeMap :: Map n Int secondNodeMap = Map.map convertInt firstNodeMap -- | Constructs a DAG containing the graph's strongly connected -- components. sccDAG :: Ord n => Graph n e -> DAG n sccDAG g = sccDAG' g (sccs' g) ------------------------------------------------------------------------ -- Reachability -- | @reachableFrom g n@ is a map containing all nodes reachable from -- @n@ in @g@. For each node a simple path to the node is given, along -- with its length (the number of edges). The paths are as short as -- possible (in terms of the number of edges). -- -- Precondition: @n@ must be a node in @g@. The number of nodes in the -- graph must not be larger than @'maxBound' :: 'Int'@. -- -- Amortised time complexity (assuming that comparisons take constant -- time): /O(e log n)/, if the lists are not inspected. Inspection of -- a prefix of a list is linear in the length of the prefix. reachableFrom :: Ord n => Graph n e -> n -> Map n (Int, [Edge n e]) reachableFrom g n = reachableFromInternal g (Set.singleton n) -- | @reachableFromSet g ns@ is a set containing all nodes reachable -- from @ns@ in @g@. -- -- Precondition: Every node in @ns@ must be a node in @g@. The number -- of nodes in the graph must not be larger than @'maxBound' :: -- 'Int'@. -- -- Amortised time complexity (assuming that comparisons take constant -- time): /O((|@ns@| + e) log n)/. reachableFromSet :: Ord n => Graph n e -> Set n -> Set n reachableFromSet g ns = Map.keysSet (reachableFromInternal g ns) -- | Used to implement 'reachableFrom' and 'reachableFromSet'. reachableFromInternal :: Ord n => Graph n e -> Set n -> Map n (Int, [Edge n e]) reachableFromInternal g ns = bfs (SQ.fromList (map (, BQ.empty) (Set.toList ns))) Map.empty where bfs !q !map = case SQ.lview q of Nothing -> map Just ((u, p), q) -> if u `Map.member` map then bfs q map else bfs (foldr SQ.rcons q [ (v, BQ.rcons (Edge u v e) p) | (v, e) <- neighbours u g ]) (let n = BQ.size p in n `seq` Map.insert u (n, BQ.toList p) map) -- | @walkSatisfying every some g from to@ determines if there is a -- walk from @from@ to @to@ in @g@, in which every edge satisfies the -- predicate @every@, and some edge satisfies the predicate @some@. If -- there are several such walks, then a shortest one (in terms of the -- number of edges) is returned. -- -- Precondition: @from@ and @to@ must be nodes in @g@. The number of -- nodes in the graph must not be larger than @'maxBound' :: 'Int'@. -- -- Amortised time complexity (assuming that comparisons and the -- predicates take constant time to compute): /O(n + e log n)/. walkSatisfying :: Ord n => (Edge n e -> Bool) -> (Edge n e -> Bool) -> Graph n e -> n -> n -> Maybe [Edge n e] walkSatisfying every some g from to = case [ (l1 + l2, p1 ++ [e] ++ map transposeEdge (reverse p2)) | e <- everyEdges , some e , (l1, p1) <- maybeToList (Map.lookup (source e) fromReaches) , (l2, p2) <- maybeToList (Map.lookup (target e) reachesTo) ] of [] -> Nothing ess -> Just $ snd $ List.minimumBy (compare `on` fst) ess where everyEdges = [ e | e <- edges g, every e ] fromReaches = reachableFrom (fromEdges everyEdges) from reachesTo = reachableFrom (fromEdges (map transposeEdge everyEdges)) to ------------------------------------------------------------------------ -- Transitive closure -- | Transitive closure ported from "Agda.Termination.CallGraph". -- -- Relatively efficient, see Issue 1560. complete :: (Eq e, Null e, SemiRing e, Ord n) => Graph n e -> Graph n e complete g = repeatWhile (mapFst (not . discrete) . combineNewOld' g) g where combineNewOld' new old = unzip $ unionWith comb new' old' where -- The following procedure allows us to check if anything new happened: -- Pair the composed graphs with an empty graph. -- The empty graph will remain empty. We only need it due to the typing -- of Map.unionWith. new' = (,Null.empty) <$> composeWith otimes oplus new old -- Pair an empty graph with the old graph. old' = (Null.empty,) <$> old -- Combine the pairs. -- Update 'old' with 'new'. This will be the new 'old'. No new 'new' if no change. comb (new, _) (_, old) = (if x == old then Null.empty else x, x) where x = old `oplus` new -- | Version of 'complete' that produces a list of intermediate results -- paired to the left with a difference that lead to the new intermediat result. -- -- The last element in the list is the transitive closure, paired with the empty graph. -- -- @complete g = snd $ last $ completeIter g@ completeIter :: (Eq e, Null e, SemiRing e, Ord n) => Graph n e -> [(Graph n e, Graph n e)] completeIter g = iterWhile (not . discrete) (combineNewOld' g) g where combineNewOld' new old = unzip $ unionWith comb new' old' where -- The following procedure allows us to check if anything new happened: -- Pair the composed graphs with an empty graph. -- The empty graph will remain empty. We only need it due to the typing -- of Map.unionWith. new' = (,Null.empty) <$> composeWith otimes oplus new old -- Pair an empty graph with the old graph. old' = (Null.empty,) <$> old -- Combine the pairs. -- Update 'old' with 'new'. This will be the new 'old'. No new 'new' if no change. comb (new, _) (_, old) = (if x == old then Null.empty else x, x) where x = old `oplus` new -- | Computes the transitive closure of the graph. -- -- Uses the Gauss-Jordan-Floyd-Warshall-McNaughton-Yamada algorithm -- (as described by Russell O'Connor in \"A Very General Method of -- Computing Shortest Paths\" -- ), implemented using -- matrices. -- -- The resulting graph does not contain any zero edges. -- -- This algorithm should be seen as a reference implementation. In -- practice 'gaussJordanFloydWarshallMcNaughtonYamada' is likely to be -- more efficient. gaussJordanFloydWarshallMcNaughtonYamadaReference :: forall n e. (Ord n, Eq e, StarSemiRing e) => Graph n e -> Graph n e gaussJordanFloydWarshallMcNaughtonYamadaReference g = toGraph (foldr step initialMatrix nodeIndices) where indicesAndNodes = zip [1..] $ Set.toList $ nodes g nodeMap = Map.fromList $ map swap indicesAndNodes indexMap = Map.fromList indicesAndNodes noNodes = Map.size nodeMap nodeIndices = [1 .. noNodes] matrixBounds = ((1, 1), (noNodes, noNodes)) initialMatrix :: Array.Array (Int, Int) e initialMatrix = Array.accumArray oplus ozero matrixBounds [ ((nodeMap Map.! source e, nodeMap Map.! target e), label e) | e <- edges g ] rightStrictPair i !e = (i , e) step k !m = Array.array matrixBounds [ rightStrictPair (i, j) (oplus (m Array.! (i, j)) (otimes (m Array.! (i, k)) (otimes (ostar (m Array.! (k, k))) (m Array.! (k, j))))) | i <- nodeIndices, j <- nodeIndices ] toGraph m = fromEdges [ Edge (indexMap Map.! i) (indexMap Map.! j) e | ((i, j), e) <- Array.assocs m , e /= ozero ] `union` fromNodeSet (nodes g) -- | Computes the transitive closure of the graph. -- -- Uses the Gauss-Jordan-Floyd-Warshall-McNaughton-Yamada algorithm -- (as described by Russell O'Connor in \"A Very General Method of -- Computing Shortest Paths\" -- ), implemented using -- 'Graph', and with some shortcuts: -- -- * Zero edge differences are not added to the graph, thus avoiding -- some zero edges. -- -- * Strongly connected components are used to avoid computing some -- zero edges. -- -- The graph's strongly connected components (in reverse topological -- order) are returned along with the transitive closure. gaussJordanFloydWarshallMcNaughtonYamada :: forall n e. (Ord n, Eq e, StarSemiRing e) => Graph n e -> (Graph n e, [Graph.SCC n]) gaussJordanFloydWarshallMcNaughtonYamada g = (loop components g, components) where components = sccs' g forwardDAG = sccDAG' g components reverseDAG = oppositeDAG forwardDAG loop :: [Graph.SCC n] -> Graph n e -> Graph n e loop [] !g = g loop (scc : sccs) g = loop sccs (foldr step g (Graph.flattenSCC scc)) where -- All nodes that are reachable from the SCC. canBeReached = reachable forwardDAG scc -- All nodes that can reach the SCC. canReach = reachable reverseDAG scc step :: n -> Graph n e -> Graph n e step k !g = foldr (insertEdgeWith oplus) g [ Edge i j e | i <- canReach , j <- canBeReached , let e = otimes (lookup' i k) (starTimes (lookup' k j)) , e /= ozero ] where starTimes = otimes (ostar (lookup' k k)) lookup' s t = case lookup s t g of Nothing -> ozero Just e -> e Agda-2.6.0.1/src/full/Agda/Utils/IO/0000755000000000000000000000000013466402171014700 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/IO/UTF8.hs0000644000000000000000000000410013466402171015755 0ustar0000000000000000-- | Text IO using the UTF8 character encoding. module Agda.Utils.IO.UTF8 ( readTextFile , Agda.Utils.IO.UTF8.hPutStr , Agda.Utils.IO.UTF8.writeFile , writeTextToFile ) where import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.IO as T import qualified System.IO as IO -- | Converts many character sequences which may be interpreted as -- line or paragraph separators into '\n'. -- -- Note that '\r\n' is assumed to have already been converted to '\n'. convertLineEndings :: Text -> Text convertLineEndings = T.map convert where -- ASCII: convert '\x000D' = '\n' -- CR (Carriage return) convert '\x000C' = '\n' -- FF (Form feed) -- Unicode: convert '\x0085' = '\n' -- NEXT LINE convert '\x2028' = '\n' -- LINE SEPARATOR convert '\x2029' = '\n' -- PARAGRAPH SEPARATOR -- Not a line ending (or '\x000A'): convert c = c -- | Reads a UTF8-encoded text file and converts many character -- sequences which may be interpreted as line or paragraph separators -- into '\n'. readTextFile :: FilePath -> IO Text readTextFile file = convertLineEndings <$> do h <- IO.openFile file IO.ReadMode IO.hSetNewlineMode h $ IO.NewlineMode { IO.inputNL = IO.CRLF, IO.outputNL = IO.LF } IO.hSetEncoding h IO.utf8 T.hGetContents h -- | Writes UTF8-encoded text to the handle, which should be opened -- for writing and in text mode. The native convention for line -- endings is used. -- -- The handle's text encoding is not necessarily preserved, it is -- changed to UTF8. hPutStr :: IO.Handle -> String -> IO () hPutStr h s = do IO.hSetEncoding h IO.utf8 IO.hPutStr h s -- | Writes a UTF8-encoded text file. The native convention for line -- endings is used. writeFile :: FilePath -> String -> IO () writeFile file s = IO.withFile file IO.WriteMode $ \h -> do hPutStr h s -- | Writes a UTF8-encoded text file. The native convention for line -- endings is used. writeTextToFile :: FilePath -> Text -> IO () writeTextToFile file s = IO.withFile file IO.WriteMode $ \h -> do IO.hSetEncoding h IO.utf8 T.hPutStr h s Agda-2.6.0.1/src/full/Agda/Utils/IO/Directory.hs0000644000000000000000000000403213466402171017177 0ustar0000000000000000module Agda.Utils.IO.Directory ( copyDirContent ) where import Control.Monad import Control.Monad.Writer import System.Directory import System.FilePath import Data.ByteString as BS import Paths_Agda import Agda.Utils.Functor -- | @copyDirContent src dest@ recursively copies directory @src@ onto @dest@. -- -- First, a to-do list of copy actions is created. -- Then, the to-do list is carried out. -- -- This avoids copying files we have just created again, which can happen -- if @src@ and @dest@ are not disjoint. -- (See issue #2705.) -- copyDirContent :: FilePath -> FilePath -> IO () copyDirContent src dest = mapM_ performAction =<< do (`appEndo` []) <$> execWriterT (copyDirContentDryRun src dest) -- | Action to be carried out for copying a directory recursively. -- data CopyDirAction = MkDir FilePath -- ^ Create directory if missing. | CopyFile FilePath FilePath -- ^ Copy file if changed. -- | Perform scheduled 'CopyDirAction'. -- performAction :: CopyDirAction -> IO () performAction = \case MkDir d -> createDirectoryIfMissing True d CopyFile src dest -> copyIfChanged src dest -- | @copyDirContentDryRun src dest@ creates a to-do list -- for recursively copying directory @src@ onto @dest@. -- copyDirContentDryRun :: FilePath -> FilePath -> WriterT (Endo [CopyDirAction]) IO () copyDirContentDryRun src dest = do tell $ Endo (MkDir dest :) chlds <- lift $ getDirectoryContents src forM_ chlds $ \ x -> do isDir <- lift $ doesDirectoryExist (src x) case isDir of _ | x == "." || x == ".." -> return () True -> copyDirContentDryRun (src x) (dest x) False -> tell $ Endo (CopyFile (src x) (dest x) :) -- | @copyIfChanged src dst@ makes sure that @dst@ exists -- and has the same content as @dst@. -- copyIfChanged :: FilePath -> FilePath -> IO () copyIfChanged src dst = do exist <- doesFileExist dst if not exist then copyFile src dst else do new <- BS.readFile src old <- BS.readFile dst unless (old == new) $ copyFile src dst Agda-2.6.0.1/src/full/Agda/Utils/IO/TempFile.hs0000644000000000000000000000114213466402171016737 0ustar0000000000000000-- | Common syntax highlighting functions for Emacs and JSON module Agda.Utils.IO.TempFile ( writeToTempFile ) where import qualified Agda.Utils.IO.UTF8 as UTF8 import qualified Control.Exception as E import qualified System.Directory as D import qualified System.IO as IO -- | Creates a temporary file, writes some stuff, and returns the filepath writeToTempFile :: String -> IO FilePath writeToTempFile content = do dir <- D.getTemporaryDirectory E.bracket (IO.openTempFile dir "agda2-mode") (IO.hClose . snd) $ \ (filepath, handle) -> do UTF8.hPutStr handle content return filepath Agda-2.6.0.1/src/full/Agda/Utils/IO/Binary.hs0000644000000000000000000000056213466402171016463 0ustar0000000000000000-- | Binary IO. module Agda.Utils.IO.Binary ( readBinaryFile' ) where import System.IO import Data.ByteString.Lazy as BS -- | Returns a close function for the file together with the contents. readBinaryFile' :: FilePath -> IO (ByteString, IO ()) readBinaryFile' file = do h <- openBinaryFile file ReadMode s <- BS.hGetContents h return (s, hClose h) Agda-2.6.0.1/src/full/Agda/Utils/Haskell/0000755000000000000000000000000013466402171015754 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Haskell/Syntax.hs0000644000000000000000000000466413466402171017610 0ustar0000000000000000-- | ASTs for subset of GHC Haskell syntax. module Agda.Utils.Haskell.Syntax where -- * Modules data Module = Module ModuleName [ModulePragma] [ImportDecl] [Decl] data ModulePragma = LanguagePragma [Name] | OtherPragma String -- ^ Unstructured pragma (Andreas, 2017-08-23, issue #2712). data ImportDecl = ImportDecl { importModule :: ModuleName , importQualified :: Bool , importSpecs :: Maybe (Bool, [ImportSpec]) } data ImportSpec = IVar Name -- * Declarations data Decl = TypeDecl Name [TyVarBind] Type | DataDecl DataOrNew Name [TyVarBind] [ConDecl] [Deriving] | TypeSig [Name] Type | FunBind [Match] | PatSyn Pat Pat | FakeDecl String deriving (Eq) data DataOrNew = DataType | NewType deriving (Eq) data ConDecl = ConDecl Name [(Maybe Strictness, Type)] deriving (Eq) data Strictness = Lazy | Strict deriving (Eq) type Deriving = (QName, [Type]) data Binds = BDecls [Decl] deriving (Eq) data Rhs = UnGuardedRhs Exp | GuardedRhss [GuardedRhs] deriving (Eq) data GuardedRhs = GuardedRhs [Stmt] Exp deriving (Eq) data Match = Match Name [Pat] Rhs (Maybe Binds) deriving (Eq) -- * Expressions data Type = TyForall [TyVarBind] Type | TyFun Type Type | TyCon QName | TyVar Name | TyApp Type Type | FakeType String deriving (Eq) data Pat = PVar Name | PLit Literal | PAsPat Name Pat | PWildCard | PBangPat Pat | PApp QName [Pat] | PatTypeSig Pat Type | PIrrPat Pat deriving (Eq) data Stmt = Qualifier Exp | Generator Pat Exp deriving (Eq) data Exp = Var QName | Con QName | Lit Literal | InfixApp Exp QOp Exp | App Exp Exp | Lambda [Pat] Exp | Let Binds Exp | If Exp Exp Exp | Case Exp [Alt] | ExpTypeSig Exp Type | NegApp Exp | FakeExp String deriving (Eq) data Alt = Alt Pat Rhs (Maybe Binds) deriving (Eq) data Literal = Int Integer | Frac Rational | Char Char | String String deriving (Eq) -- * Names data ModuleName = ModuleName String deriving (Eq, Ord) data QName = Qual ModuleName Name | UnQual Name deriving (Eq) data Name = Ident String | Symbol String deriving (Eq) data QOp = QVarOp QName deriving (Eq) data TyVarBind = UnkindedVar Name deriving (Eq) unit_con :: Exp unit_con = Con (UnQual (Ident "()")) Agda-2.6.0.1/src/full/Agda/Utils/Parser/0000755000000000000000000000000013466402171015625 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Parser/MemoisedCPS.hs0000644000000000000000000002456613466402171020306 0ustar0000000000000000------------------------------------------------------------------------ -- | Parser combinators with support for left recursion, following -- Johnson\'s \"Memoization in Top-Down Parsing\". -- -- This implementation is based on an implementation due to Atkey -- (attached to an edlambda-members mailing list message from -- 2011-02-15 titled \'Slides for \"Introduction to Parser -- Combinators\"\'). -- -- Note that non-memoised left recursion is not guaranteed to work. -- -- The code contains an important deviation from Johnson\'s paper: the -- check for subsumed results is not included. This means that one can -- get the same result multiple times when parsing using ambiguous -- grammars. As an example, parsing the empty string using @S ∷= ε | -- ε@ succeeds twice. This change also means that parsing fails to -- terminate for some cyclic grammars that would otherwise be handled -- successfully, such as @S ∷= S | ε@. However, the library is not -- intended to handle infinitely ambiguous grammars. (It is unclear to -- the author of this module whether the change leads to more -- non-termination for grammars that are not cyclic.) {-# LANGUAGE CPP #-} module Agda.Utils.Parser.MemoisedCPS ( ParserClass(..) , sat, token, tok, doc , DocP, bindP, choiceP, seqP, starP, atomP , Parser , ParserWithGrammar ) where import Control.Applicative ( Alternative((<|>), empty, many, some) ) import Control.Monad (ap, liftM2) import Control.Monad.State.Strict (State, evalState, runState, get, put, modify') import Data.Array import Data.Hashable import qualified Data.HashMap.Strict as Map import Data.HashMap.Strict (HashMap) import qualified Data.HashSet as Set import Data.HashSet (HashSet) import qualified Data.IntMap.Strict as IntMap import Data.IntMap.Strict (IntMap) import qualified Data.List as List import Data.Maybe import Text.PrettyPrint.HughesPJ hiding (empty) import qualified Text.PrettyPrint.HughesPJ as PP import Agda.Utils.Pretty ( mparens ) #include "undefined.h" import Agda.Utils.Impossible -- | Positions. type Pos = Int -- | State monad used by the parser. type M k r tok b = State (IntMap (HashMap k (Value k r tok b))) -- | Continuations. type Cont k r tok b a = Pos -> a -> M k r tok b [b] -- | Memoised values. data Value k r tok b = Value { results :: !(IntMap [r]) , continuations :: [Cont k r tok b r] } -- | The parser type. -- -- The parameters of the type @Parser k r tok a@ have the following -- meanings: -- -- [@k@] Type used for memoisation keys. -- -- [@r@] The type of memoised values. (Yes, all memoised values have -- to have the same type.) -- -- [@tok@] The token type. -- -- [@a@] The result type. newtype Parser k r tok a = P { unP :: forall b. Array Pos tok -> Pos -> Cont k r tok b a -> M k r tok b [b] } instance Monad (Parser k r tok) where return = pure P p >>= f = P $ \input i k -> p input i $ \j x -> unP (f x) input j k instance Functor (Parser k r tok) where fmap f (P p) = P $ \input i k -> p input i $ \i -> k i . f instance Applicative (Parser k r tok) where pure x = P $ \_ i k -> k i x P p1 <*> P p2 = P $ \input i k -> p1 input i $ \i f -> p2 input i $ \i x -> k i (f x) instance Alternative (Parser k r tok) where empty = P $ \_ _ _ -> return [] P p1 <|> P p2 = P $ \input i k -> liftM2 (++) (p1 input i k) (p2 input i k) class (Functor p, Applicative p, Alternative p, Monad p) => ParserClass p k r tok | p -> k, p -> r, p -> tok where -- | Runs the parser. parse :: p a -> [tok] -> [a] -- | Tries to print the parser, or returns 'PP.empty', depending on -- the implementation. This function might not terminate. grammar :: Show k => p a -> Doc -- | Parses a token satisfying the given predicate. The computed -- value is returned. sat' :: (tok -> Maybe a) -> p a -- | Uses the given function to modify the printed representation -- (if any) of the given parser. annotate :: (DocP -> DocP) -> p a -> p a -- | Memoises the given parser. -- -- Every memoised parser must be annotated with a /unique/ key. -- (Parametrised parsers must use distinct keys for distinct -- inputs.) memoise :: (Eq k, Hashable k, Show k) => k -> p r -> p r -- | Memoises the given parser, but only if printing, not if -- parsing. -- -- Every memoised parser must be annotated with a /unique/ key. -- (Parametrised parsers must use distinct keys for distinct -- inputs.) memoiseIfPrinting :: (Eq k, Hashable k, Show k) => k -> p r -> p r -- | Uses the given document as the printed representation of the -- given parser. The document's precedence is taken to be 'atomP'. doc :: ParserClass p k r tok => Doc -> p a -> p a doc d = annotate (\_ -> (d, atomP)) -- | Parses a token satisfying the given predicate. sat :: ParserClass p k r tok => (tok -> Bool) -> p tok sat p = sat' (\t -> if p t then Just t else Nothing) -- | Parses a single token. token :: ParserClass p k r tok => p tok token = doc "·" (sat' Just) -- | Parses a given token. tok :: (ParserClass p k r tok, Eq tok, Show tok) => tok -> p tok tok t = doc (text (show t)) (sat (t ==)) instance ParserClass (Parser k r tok) k r tok where parse p toks = flip evalState IntMap.empty $ unP p (listArray (0, n - 1) toks) 0 $ \j x -> if j == n then return [x] else return [] where n = List.genericLength toks grammar _ = PP.empty sat' p = P $ \input i k -> if inRange (bounds input) i then case p (input ! i) of Nothing -> return [] Just x -> (k $! (i + 1)) $! x else return [] annotate _ p = p memoiseIfPrinting _ p = p memoise key p = P $ \input i k -> do let alter j zero f m = IntMap.alter (Just . f . fromMaybe zero) j m lookupTable = fmap (\m -> Map.lookup key =<< IntMap.lookup i m) get insertTable v = modify' $ alter i Map.empty (Map.insert key v) v <- lookupTable case v of Nothing -> do insertTable (Value IntMap.empty [k]) unP p input i $ \j r -> do ~(Just (Value rs ks)) <- lookupTable insertTable (Value (alter j [] (r :) rs) ks) concat <$> mapM (\k -> k j r) ks -- See note [Reverse ks?]. Just (Value rs ks) -> do insertTable (Value rs (k : ks)) concat . concat <$> mapM (\(i, rs) -> mapM (k i) rs) (IntMap.toList rs) -- [Reverse ks?] -- -- If ks were reversed, then the code would be productive for some -- infinitely ambiguous grammars, including S ∷= S | ε. However, in -- some cases the results would not be fair (some valid results would -- never be returned). -- | An extended parser type, with some support for printing parsers. data ParserWithGrammar k r tok a = PG (Bool -> Either (Parser k r tok a) (Docs k)) -- ^ Invariant: If the boolean is 'True', then the result must be -- @'Left' something@, and if the boolean is 'False', then the -- result must be @'Right' something@. -- | Documents paired with precedence levels. type DocP = (Doc, Int) -- | Precedence of @>>=@. bindP :: Int bindP = 10 -- | Precedence of @<|>@. choiceP :: Int choiceP = 20 -- | Precedence of @<*>@. seqP :: Int seqP = 30 -- | Precedence of @⋆@ and @+@. starP :: Int starP = 40 -- | Precedence of atoms. atomP :: Int atomP = 50 -- | The extended parser type computes one top-level document, plus -- one document per encountered memoisation key. -- -- 'Nothing' is used to mark that a given memoisation key has been -- seen, but that no corresponding document has yet been stored. type Docs k = State (HashMap k (Maybe DocP)) DocP -- | A smart constructor. pg :: Parser k r tok a -> Docs k -> ParserWithGrammar k r tok a pg p d = PG $ \b -> if b then Left p else Right d -- | Extracts the parser. parser :: ParserWithGrammar k r tok a -> Parser k r tok a parser (PG p) = either id __IMPOSSIBLE__ (p True) -- | Extracts the documents. docs :: ParserWithGrammar k r tok a -> Docs k docs (PG p) = either __IMPOSSIBLE__ id (p False) instance Monad (ParserWithGrammar k r tok) where return = pure p >>= f = pg (parser p >>= parser . f) ((\(d, p) -> (mparens (p < bindP) d <+> ">>= ?", bindP)) <$> docs p) instance Functor (ParserWithGrammar k r tok) where fmap f p = pg (fmap f (parser p)) (docs p) instance Applicative (ParserWithGrammar k r tok) where pure x = pg (pure x) (return ("ε", atomP)) p1 <*> p2 = pg (parser p1 <*> parser p2) (liftM2 (\(d1, p1) (d2, p2) -> (sep [ mparens (p1 < seqP) d1 , mparens (p2 < seqP) d2 ], seqP)) (docs p1) (docs p2)) -- | A helper function. starDocs :: String -> ParserWithGrammar k r tok a -> Docs k starDocs s p = (\(d, p) -> (mparens (p < starP) d <+> text s, starP)) <$> docs p instance Alternative (ParserWithGrammar k r tok) where empty = pg empty (return ("∅", atomP)) p1 <|> p2 = pg (parser p1 <|> parser p2) (liftM2 (\(d1, p1) (d2, p2) -> (sep [ mparens (p1 < choiceP) d1 , "|" , mparens (p2 < choiceP) d2 ], choiceP)) (docs p1) (docs p2)) many p = pg (many (parser p)) (starDocs "⋆" p) some p = pg (some (parser p)) (starDocs "+" p) -- | Pretty-prints a memoisation key. prettyKey :: Show k => k -> DocP prettyKey key = (text ("<" ++ show key ++ ">"), atomP) -- | A helper function. memoiseDocs :: (Eq k, Hashable k, Show k) => k -> ParserWithGrammar k r tok r -> Docs k memoiseDocs key p = do r <- Map.lookup key <$> get case r of Just _ -> return () Nothing -> do modify' (Map.insert key Nothing) d <- docs p modify' (Map.insert key (Just d)) return (prettyKey key) instance ParserClass (ParserWithGrammar k r tok) k r tok where parse p = parse (parser p) sat' p = pg (sat' p) (return ("", atomP)) annotate f p = pg (parser p) (f <$> docs p) memoise key p = pg (memoise key (parser p)) (memoiseDocs key p) memoiseIfPrinting key p = pg (parser p) (memoiseDocs key p) grammar p = d $+$ nest 2 (foldr1 ($+$) $ "where" : map (\(k, d) -> fst (prettyKey k) <+> "∷=" <+> maybe __IMPOSSIBLE__ fst d) (Map.toList ds)) where ((d, _), ds) = runState (docs p) Map.empty Agda-2.6.0.1/src/full/Agda/Utils/Parser/ReadP.hs0000644000000000000000000004015013466402171017154 0ustar0000000000000000{-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | -- This is a modified version of the ReadP module from the standard libraries. -- The changes are: -- 1) ReadP is parameterised over the token type (hard-wired to 'Char' in the library). -- 2) Added the functions 'parse' and 'parse'' which run parsers. -- 3) Removed Read instances. -- Module : "Text.ParserCombinators.ReadP" -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability : non-portable (local universal quantification) -- -- This is a library of parser combinators, originally written by Koen Claessen. -- It parses all alternatives in parallel, so it never keeps hold of -- the beginning of the input string, a common source of space leaks with -- other parsers. The '(+++)' choice combinator is genuinely commutative; -- it makes no difference which branch is \"shorter\". ----------------------------------------------------------------------------- module Agda.Utils.Parser.ReadP ( -- * The 'ReadP' type ReadP, -- :: * -> *; instance Functor, Monad, MonadPlus -- * Primitive operations get, -- :: ReadP Char look, -- :: ReadP String (+++), -- :: ReadP a -> ReadP a -> ReadP a (<++), -- :: ReadP a -> ReadP a -> ReadP a gather, -- :: ReadP a -> ReadP (String, a) -- * Parse parse, -- :: ReadP tok a -> [tok] -> [a] parse', -- :: ReadP tok a -> [tok] -> Either a [tok] -- * Other operations pfail, -- :: ReadP a satisfy, -- :: (Char -> Bool) -> ReadP Char char, -- :: Char -> ReadP Char string, -- :: String -> ReadP String munch, -- :: (Char -> Bool) -> ReadP String munch1, -- :: (Char -> Bool) -> ReadP String skipSpaces, -- :: ReadP () choice, -- :: [ReadP a] -> ReadP a count, -- :: Int -> ReadP a -> ReadP [a] between, -- :: ReadP open -> ReadP close -> ReadP a -> ReadP a option, -- :: a -> ReadP a -> ReadP a optional, -- :: ReadP a -> ReadP () many, -- :: ReadP a -> ReadP [a] many1, -- :: ReadP a -> ReadP [a] skipMany, -- :: ReadP a -> ReadP () skipMany1, -- :: ReadP a -> ReadP () sepBy, -- :: ReadP a -> ReadP sep -> ReadP [a] sepBy1, -- :: ReadP a -> ReadP sep -> ReadP [a] endBy, -- :: ReadP a -> ReadP sep -> ReadP [a] endBy1, -- :: ReadP a -> ReadP sep -> ReadP [a] chainr, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a chainl, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a chainl1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a chainr1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a manyTill, -- :: ReadP a -> ReadP end -> ReadP [a] -- * Properties -- $properties ) where import Control.Applicative (Applicative(..),Alternative(empty,(<|>))) import Control.Monad import GHC.Exts import Data.Char infixr 5 +++, <++ -- --------------------------------------------------------------------------- -- The P type -- is representation type -- should be kept abstract data P t a = Get (t -> P t a) | Look ([t] -> P t a) | Fail | Result a (P t a) | Final [(a,[t])] -- invariant: list is non-empty! deriving (Functor) -- Monad, MonadPlus instance Applicative (P t) where pure x = Result x Fail (<*>) = ap instance Monad (P t) where return = pure (Get f) >>= k = Get (\c -> f c >>= k) (Look f) >>= k = Look (\s -> f s >>= k) Fail >>= k = Fail (Result x p) >>= k = k x `mplus` (p >>= k) (Final r) >>= k = final [ys' | (x,s) <- r, ys' <- run (k x) s] fail _ = Fail instance Alternative (P t) where empty = mzero (<|>) = mplus instance MonadPlus (P t) where mzero = Fail -- most common case: two gets are combined Get f1 `mplus` Get f2 = Get (\c -> f1 c `mplus` f2 c) -- results are delivered as soon as possible Result x p `mplus` q = Result x (p `mplus` q) p `mplus` Result x q = Result x (p `mplus` q) -- fail disappears Fail `mplus` p = p p `mplus` Fail = p -- two finals are combined -- final + look becomes one look and one final (=optimization) -- final + sthg else becomes one look and one final Final r `mplus` Final t = Final (r ++ t) Final r `mplus` Look f = Look (\s -> Final (r ++ run (f s) s)) Final r `mplus` p = Look (\s -> Final (r ++ run p s)) Look f `mplus` Final r = Look (\s -> Final (run (f s) s ++ r)) p `mplus` Final r = Look (\s -> Final (run p s ++ r)) -- two looks are combined (=optimization) -- look + sthg else floats upwards Look f `mplus` Look g = Look (\s -> f s `mplus` g s) Look f `mplus` p = Look (\s -> f s `mplus` p) p `mplus` Look f = Look (\s -> p `mplus` f s) -- --------------------------------------------------------------------------- -- The ReadP type newtype ReadP t a = R (forall b . (a -> P t b) -> P t b) -- Functor, Monad, MonadPlus instance Functor (ReadP t) where fmap h (R f) = R (\k -> f (k . h)) instance Applicative (ReadP t) where pure x = R (\k -> k x) (<*>) = ap instance Monad (ReadP t) where return = pure fail _ = R (\_ -> Fail) R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k)) instance Alternative (ReadP t) where empty = mzero (<|>) = mplus instance MonadPlus (ReadP t) where mzero = pfail mplus = (+++) -- --------------------------------------------------------------------------- -- Operations over P final :: [(a,[t])] -> P t a -- Maintains invariant for Final constructor final [] = Fail final r = Final r run :: P t a -> [t] -> [(a,[t])] run (Get f) (c:s) = run (f c) s run (Look f) s = run (f s) s run (Result x p) s = (x,s) : run p s run (Final r) _ = r run _ _ = [] -- --------------------------------------------------------------------------- -- Operations over ReadP -- | Run a parser on a list of tokens. Returns the list of complete matches. parse :: ReadP t a -> [t] -> [a] parse p ts = case complete p of R f -> map fst $ run (f return) ts get :: ReadP t t -- ^ Consumes and returns the next character. -- Fails if there is no input left. get = R Get look :: ReadP t [t] -- ^ Look-ahead: returns the part of the input that is left, without -- consuming it. look = R Look pfail :: ReadP t a -- ^ Always fails. pfail = R (\_ -> Fail) (+++) :: ReadP t a -> ReadP t a -> ReadP t a -- ^ Symmetric choice. R f1 +++ R f2 = R (\k -> f1 k `mplus` f2 k) (<++) :: ReadP t a -> ReadP t a -> ReadP t a -- ^ Local, exclusive, left-biased choice: If left parser -- locally produces any result at all, then right parser is -- not used. R f <++ q = do s <- look probe (f return) s 0# where probe (Get f) (c:s) n = probe (f c) s (n+#1#) probe (Look f) s n = probe (f s) s n probe p@(Result _ _) _ n = discard n >> R (p >>=) probe (Final r) _ _ = R (Final r >>=) probe _ _ _ = q discard 0# = return () discard n = get >> discard (n-#1#) gather :: ReadP t a -> ReadP t ([t], a) -- ^ Transforms a parser into one that does the same, but -- in addition returns the exact characters read. -- IMPORTANT NOTE: 'gather' gives a runtime error if its first argument -- is built using any occurrences of readS_to_P. gather (R m) = R (\k -> gath id (m (\a -> return (\s -> k (s,a))))) where gath l (Get f) = Get (\c -> gath (l.(c:)) (f c)) gath l Fail = Fail gath l (Look f) = Look (\s -> gath l (f s)) gath l (Result k p) = k (l []) `mplus` gath l p gath l (Final r) = error "do not use readS_to_P in gather!" -- --------------------------------------------------------------------------- -- Derived operations satisfy :: (t -> Bool) -> ReadP t t -- ^ Consumes and returns the next character, if it satisfies the -- specified predicate. satisfy p = do c <- get; if p c then return c else pfail char :: Eq t => t-> ReadP t t -- ^ Parses and returns the specified character. char c = satisfy (c ==) string :: Eq t => [t] -> ReadP t [t] -- ^ Parses and returns the specified string. string this = do s <- look; scan this s where scan [] _ = do return this scan (x:xs) (y:ys) | x == y = do _ <- get; scan xs ys scan _ _ = do pfail eof :: ReadP tok () eof = do ts <- look unless (null ts) pfail complete :: ReadP tok a -> ReadP tok a complete p = do x <- p eof return x munch :: (t -> Bool) -> ReadP t [t] -- ^ Parses the first zero or more characters satisfying the predicate. munch p = do s <- look scan s where scan (c:cs) | p c = do _ <- get; s <- scan cs; return (c:s) scan _ = do return [] munch1 :: (t -> Bool) -> ReadP t [t] -- ^ Parses the first one or more characters satisfying the predicate. munch1 p = do c <- get if p c then do s <- munch p; return (c:s) else pfail choice :: [ReadP t a] -> ReadP t a -- ^ Combines all parsers in the specified list. choice [] = pfail choice [p] = p choice (p:ps) = p +++ choice ps skipSpaces :: ReadP Char () -- ^ Skips all whitespace. skipSpaces = do s <- look skip s where skip (c:s) | isSpace c = do _ <- get; skip s skip _ = do return () count :: Int -> ReadP t a -> ReadP t [a] -- ^ @count n p@ parses @n@ occurrences of @p@ in sequence. A list of -- results is returned. count n p = sequence (replicate n p) between :: ReadP t open -> ReadP t close -> ReadP t a -> ReadP t a -- ^ @between open close p@ parses @open@, followed by @p@ and finally -- @close@. Only the value of @p@ is returned. between open close p = do _ <- open x <- p _ <- close return x option :: a -> ReadP t a -> ReadP t a -- ^ @option x p@ will either parse @p@ or return @x@ without consuming -- any input. option x p = p +++ return x optional :: ReadP t a -> ReadP t () -- ^ @optional p@ optionally parses @p@ and always returns @()@. optional p = (p >> return ()) +++ return () many :: ReadP t a -> ReadP t [a] -- ^ Parses zero or more occurrences of the given parser. many p = return [] +++ many1 p many1 :: ReadP t a -> ReadP t [a] -- ^ Parses one or more occurrences of the given parser. many1 p = liftM2 (:) p (many p) skipMany :: ReadP t a -> ReadP t () -- ^ Like 'many', but discards the result. skipMany p = many p >> return () skipMany1 :: ReadP t a -> ReadP t () -- ^ Like 'many1', but discards the result. skipMany1 p = p >> skipMany p sepBy :: ReadP t a -> ReadP t sep -> ReadP t [a] -- ^ @sepBy p sep@ parses zero or more occurrences of @p@, separated by @sep@. -- Returns a list of values returned by @p@. sepBy p sep = sepBy1 p sep +++ return [] sepBy1 :: ReadP t a -> ReadP t sep -> ReadP t [a] -- ^ @sepBy1 p sep@ parses one or more occurrences of @p@, separated by @sep@. -- Returns a list of values returned by @p@. sepBy1 p sep = liftM2 (:) p (many (sep >> p)) endBy :: ReadP t a -> ReadP t sep -> ReadP t [a] -- ^ @endBy p sep@ parses zero or more occurrences of @p@, separated and ended -- by @sep@. endBy p sep = many (do x <- p ; _ <- sep ; return x) endBy1 :: ReadP t a -> ReadP t sep -> ReadP t [a] -- ^ @endBy p sep@ parses one or more occurrences of @p@, separated and ended -- by @sep@. endBy1 p sep = many1 (do x <- p ; _ <- sep ; return x) chainr :: ReadP t a -> ReadP t (a -> a -> a) -> a -> ReadP t a -- ^ @chainr p op x@ parses zero or more occurrences of @p@, separated by @op@. -- Returns a value produced by a /right/ associative application of all -- functions returned by @op@. If there are no occurrences of @p@, @x@ is -- returned. chainr p op x = chainr1 p op +++ return x chainl :: ReadP t a -> ReadP t (a -> a -> a) -> a -> ReadP t a -- ^ @chainl p op x@ parses zero or more occurrences of @p@, separated by @op@. -- Returns a value produced by a /left/ associative application of all -- functions returned by @op@. If there are no occurrences of @p@, @x@ is -- returned. chainl p op x = chainl1 p op +++ return x chainr1 :: ReadP t a -> ReadP t (a -> a -> a) -> ReadP t a -- ^ Like 'chainr', but parses one or more occurrences of @p@. chainr1 p op = scan where scan = p >>= rest rest x = do f <- op y <- scan return (f x y) +++ return x chainl1 :: ReadP t a -> ReadP t (a -> a -> a) -> ReadP t a -- ^ Like 'chainl', but parses one or more occurrences of @p@. chainl1 p op = p >>= rest where rest x = do f <- op y <- p rest (f x y) +++ return x manyTill :: ReadP t a -> ReadP t end -> ReadP t [a] -- ^ @manyTill p end@ parses zero or more occurrences of @p@, until @end@ -- succeeds. Returns a list of values returned by @p@. manyTill p end = scan where scan = (end >> return []) <++ (liftM2 (:) p scan) -- --------------------------------------------------------------------------- -- Converting between ReadP and Read readP_to_S :: ReadP Char a -> ReadS a -- ^ Converts a parser into a Haskell ReadS-style function. -- This is the main way in which you can \"run\" a 'ReadP' parser: -- the expanded type is -- @ readP_to_S :: ReadP a -> String -> [(a,String)] @ readP_to_S (R f) = run (f return) readS_to_P :: ReadS a -> ReadP Char a -- ^ Converts a Haskell ReadS-style function into a parser. -- Warning: This introduces local backtracking in the resulting -- parser, and therefore a possible inefficiency. readS_to_P r = R (\k -> Look (\s -> final [bs'' | (a,s') <- r s, bs'' <- run (k a) s'])) -- --------------------------------------------------------------------------- -- A variant on parse which returns either a result, or the unparseable text. run' :: P t a -> [t] -> Either a [t] run' (Get f) (c:s) = run' (f c) s run' (Look f) s = run' (f s) s run' (Result x _) _ = Left x run' (Final ((x,_):_)) _ = Left x run' _ s = Right s parse' :: ReadP t a -> [t] -> Either a [t] parse' p ts = case complete p of R f -> run' (f return) ts -- --------------------------------------------------------------------------- -- QuickCheck properties that hold for the combinators {- $properties The following are QuickCheck specifications of what the combinators do. These can be seen as formal specifications of the behavior of the combinators. We use bags to give semantics to the combinators. > type Bag a = [a] Equality on bags does not care about the order of elements. > (=~) :: Ord a => Bag a -> Bag a -> Bool > xs =~ ys = sort xs == sort ys A special equality operator to avoid unresolved overloading when testing the properties. > (=~.) :: Bag (Int,String) -> Bag (Int,String) -> Bool > (=~.) = (=~) Here follow the properties: > prop_Get_Nil = > readP_to_S get [] =~ [] > > prop_Get_Cons c s = > readP_to_S get (c:s) =~ [(c,s)] > > prop_Look s = > readP_to_S look s =~ [(s,s)] > > prop_Fail s = > readP_to_S pfail s =~. [] > > prop_Return x s = > readP_to_S (return x) s =~. [(x,s)] > > prop_Bind p k s = > readP_to_S (p >>= k) s =~. > [ ys'' > | (x,s') <- readP_to_S p s > , ys'' <- readP_to_S (k (x::Int)) s' > ] > > prop_Plus p q s = > readP_to_S (p +++ q) s =~. > (readP_to_S p s ++ readP_to_S q s) > > prop_LeftPlus p q s = > readP_to_S (p <++ q) s =~. > (readP_to_S p s +<+ readP_to_S q s) > where > [] +<+ ys = ys > xs +<+ _ = xs > > prop_Gather s = > forAll readPWithoutReadS $ \p -> > readP_to_S (gather p) s =~ > [ ((pre,x::Int),s') > | (x,s') <- readP_to_S p s > , let pre = take (length s - length s') s > ] > > prop_String_Yes this s = > readP_to_S (string this) (this ++ s) =~ > [(this,s)] > > prop_String_Maybe this s = > readP_to_S (string this) s =~ > [(this, drop (length this) s) | this `isPrefixOf` s] > > prop_Munch p s = > readP_to_S (munch p) s =~ > [(takeWhile p s, dropWhile p s)] > > prop_Munch1 p s = > readP_to_S (munch1 p) s =~ > [(res,s') | let (res,s') = (takeWhile p s, dropWhile p s), not (null res)] > > prop_Choice ps s = > readP_to_S (choice ps) s =~. > readP_to_S (foldr (+++) pfail ps) s > > prop_ReadS r s = > readP_to_S (readS_to_P r) s =~. r s -} Agda-2.6.0.1/src/full/Agda/Utils/IntSet/0000755000000000000000000000000013466402171015577 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/IntSet/Infinite.hs0000644000000000000000000001261213466402171017702 0ustar0000000000000000-- | Possibly infinite sets of integers (but with finitely many consecutive -- segments). Used for checking guard coverage in int/nat cases in the -- treeless compiler. module Agda.Utils.IntSet.Infinite ( IntSet , empty, full, below, above, singleton , difference, member, toFiniteList , invariant ) where import Control.Arrow (first, second) import Data.Semigroup hiding (All(..)) import Data.List import Data.Set (Set) import qualified Data.Set as Set -- | Represents a set of integers. -- Invariants: -- - All cannot be the argument to `Below` or `Above` -- - at most one 'IntsBelow' -- - at most one 'IntsAbove' -- - if `Below lo` and `Below hi`, then `lo < hi` -- - if `Below lo .. (Some xs)` then `all (> lo) xs` -- - if `Above hi .. (Some xs)` then `all (< hi - 1) xs` data IntSet = All | Some (Set Integer) | Below Integer IntSet -- exclusive | Above Integer IntSet -- inclusive deriving (Show) instance Eq IntSet where r == r' = norm r == norm r' where norm All = Nothing norm (Some xs) = Just (Nothing, Nothing, xs) norm (Below lo r) = do (_, hi, xs) <- norm r; return (Just lo, hi, xs) norm (Above hi r) = do (lo, _, xs) <- norm r; return (lo, Just hi, xs) below' :: Integer -> IntSet -> IntSet below' _ All = All below' lo r@(Some xs) | elem lo xs = below' (lo + 1) r | otherwise = Below lo $ Some $ Set.filter (>= lo) xs below' lo r0@(Below lo' r) | lo' >= lo = r0 | otherwise = below' lo r below' lo (Above hi r) | hi <= lo = All | otherwise = Above hi $ below' lo r above' :: Integer -> IntSet -> IntSet above' _ All = All above' hi r@(Some xs) | elem (hi - 1) xs = above' (hi - 1) r | otherwise = Above hi $ Some $ Set.filter (< hi) xs above' hi r0@(Above hi' r) | hi' <= hi = r0 | otherwise = above' hi r above' hi (Below lo r) | hi <= lo = All | otherwise = Below lo $ above' hi r some' :: Set Integer -> IntSet -> IntSet some' xs r | null xs = r some' xs (Some ys) = Some (Set.union xs ys) some' _ All = All some' xs (Below lo r) | elem lo xs = some' xs (Below (lo + 1) r) | otherwise = below' lo $ some' (Set.filter (>= lo) xs) r some' xs (Above hi r) | elem (hi - 1) xs = some' xs (Above (hi - 1) r) | otherwise = above' hi $ some' (Set.filter (< hi) xs) r difference :: IntSet -> IntSet -> IntSet difference r All = empty difference r (Some xs) = subtractSome r xs difference r (Below lo r') = difference (subtractBelow r lo) r' difference r (Above hi r') = difference (subtractAbove r hi) r' subtractSome :: IntSet -> Set Integer -> IntSet subtractSome r xs | null xs = r subtractSome All xs = below lo <> above hi <> Some (Set.fromList [lo..hi - 1] `Set.difference` xs) where lo = minimum xs hi = maximum xs + 1 subtractSome (Some ys) xs = Some (Set.difference ys xs) subtractSome (Below lo r) xs = Below (min lo lo') $ subtractSome (Some (Set.fromList [lo'..lo - 1]) <> r) xs where lo' = minimum xs subtractSome (Above hi r) xs = Above (max hi hi') $ subtractSome (Some (Set.fromList [hi..hi' - 1]) <> r) xs where hi' = maximum xs + 1 subtractBelow :: IntSet -> Integer -> IntSet subtractBelow All lo = above lo subtractBelow (Below lo' r) lo = some' (Set.fromList [lo..lo' - 1]) (subtractBelow r lo) subtractBelow (Above hi r) lo = Above (max hi lo) (subtractBelow r lo) subtractBelow (Some xs) lo = Some $ Set.filter (>= lo) xs subtractAbove :: IntSet -> Integer -> IntSet subtractAbove All hi = below hi subtractAbove (Above hi' r) hi = some' (Set.fromList [hi'..hi - 1]) (subtractAbove r hi) subtractAbove (Below lo r) hi = Below (min lo hi) (subtractAbove r hi) subtractAbove (Some xs) hi = Some $ Set.filter (< hi) xs instance Semigroup IntSet where Below lo r <> r' = below' lo (r <> r') Above hi r <> r' = above' hi (r <> r') Some xs <> r' = some' xs r' All <> _ = All instance Monoid IntSet where mempty = empty mappend = (<>) -- | Membership member :: Integer -> IntSet -> Bool member _ All = True member x (Some xs) = Set.member x xs member x (Below lo s) = x < lo || member x s member x (Above hi s) = x >= hi || member x s -- | All integers `< n` below :: Integer -> IntSet below lo = Below lo empty -- | All integers `>= n` above :: Integer -> IntSet above hi = Above hi empty -- | A single integer. singleton :: Integer -> IntSet singleton x = fromList [x] -- | From a list of integers. fromList :: [Integer] -> IntSet fromList xs = Some (Set.fromList xs) -- | No integers. empty :: IntSet empty = Some Set.empty -- | All integers. full :: IntSet full = All -- | If finite, return the list of elements. toFiniteList :: IntSet -> Maybe [Integer] toFiniteList (Some xs) = Just $ Set.toList xs toFiniteList All = Nothing toFiniteList Above{} = Nothing toFiniteList Below{} = Nothing -- | Invariant. invariant :: IntSet -> Bool invariant xs = case xs of All -> True Some{} -> True Below lo ys -> invariant ys && invBelow lo ys Above hi ys -> invariant ys && invAbove hi ys where invBelow lo All = False invBelow lo (Some xs) = all (> lo) xs invBelow lo Below{} = False invBelow lo (Above hi r) = lo < hi && invBelow lo r invAbove hi All = False invAbove hi (Some xs) = all (< hi - 1) xs invAbove hi Above{} = False invAbove hi (Below lo r) = lo < hi && invAbove hi r Agda-2.6.0.1/src/full/Agda/Utils/Maybe/0000755000000000000000000000000013466402171015426 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Maybe/Strict.hs0000644000000000000000000001235513466402171017240 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | A strict version of the 'Maybe' type. -- -- Import qualified, as in -- @ -- import qualified Agda.Utils.Maybe.Strict as Strict -- @ -- -- Copyright : (c) 2006-2007 Roman Leshchinskiy -- (c) 2013 Simon Meier -- License : BSD-style (see the file LICENSE) -- -- Copyright : (c) 2014 Andreas Abel module Agda.Utils.Maybe.Strict ( module Data.Strict.Maybe , module Agda.Utils.Maybe.Strict ) where -- The following code is copied from -- http://hackage.haskell.org/package/strict-base-types-0.3.0/docs/src/Data-Maybe-Strict.html import Prelude hiding (Maybe (..), maybe, null) import qualified Prelude as Lazy import Control.Applicative (pure, (<$>)) import Control.DeepSeq (NFData (..)) import Data.Binary (Binary (..)) import Data.Data (Data (..)) import Data.Monoid (Monoid, mempty, mappend) import Data.Semigroup (Semigroup, (<>)) import Data.Foldable (Foldable (..)) import Data.Traversable (Traversable (..)) import Data.Strict.Maybe (Maybe (Nothing, Just), fromJust, fromMaybe, isJust, isNothing, maybe) import GHC.Generics (Generic (..)) import Agda.Utils.Null toStrict :: Lazy.Maybe a -> Maybe a toStrict Lazy.Nothing = Nothing toStrict (Lazy.Just x) = Just x toLazy :: Maybe a -> Lazy.Maybe a toLazy Nothing = Lazy.Nothing toLazy (Just x) = Lazy.Just x deriving instance Data a => Data (Maybe a) deriving instance Generic (Maybe a) instance Null (Maybe a) where empty = Nothing null = isNothing -- The monoid instance was fixed in strict-base-types 0.5.0. See -- Issue 1805. instance Semigroup a => Semigroup (Maybe a) where Nothing <> m = m m <> Nothing = m Just x1 <> Just x2 = Just (x1 <> x2) instance Semigroup a => Monoid (Maybe a) where mempty = Nothing mappend = (<>) instance Foldable Maybe where foldMap _ Nothing = mempty foldMap f (Just x) = f x instance Traversable Maybe where traverse _ Nothing = pure Nothing traverse f (Just x) = Just <$> f x instance NFData a => NFData (Maybe a) where rnf = rnf . toLazy instance Binary a => Binary (Maybe a) where put = put . toLazy get = toStrict <$> get -- | Analogous to 'Lazy.listToMaybe' in "Data.Maybe". listToMaybe :: [a] -> Maybe a listToMaybe [] = Nothing listToMaybe (a:_) = Just a -- | Analogous to 'Lazy.maybeToList' in "Data.Maybe". maybeToList :: Maybe a -> [a] maybeToList Nothing = [] maybeToList (Just x) = [x] -- | Analogous to 'Lazy.catMaybes' in "Data.Maybe". catMaybes :: [Maybe a] -> [a] catMaybes ls = [x | Just x <- ls] -- | Analogous to 'Lazy.mapMaybe' in "Data.Maybe". mapMaybe :: (a -> Maybe b) -> [a] -> [b] mapMaybe _ [] = [] mapMaybe f (x:xs) = case f x of Nothing -> rs Just r -> r:rs where rs = mapMaybe f xs -- The remaining code is a copy of Agda.Utils.Maybe -- * Collection operations. -- | @unionWith@ for collections of size <= 1. unionMaybeWith :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a unionMaybeWith f Nothing mb = mb unionMaybeWith f ma Nothing = ma unionMaybeWith f (Just a) (Just b) = Just $ f a b -- | Unzipping a list of length <= 1. unzipMaybe :: Maybe (a,b) -> (Maybe a, Maybe b) unzipMaybe Nothing = (Nothing, Nothing) unzipMaybe (Just (a,b)) = (Just a, Just b) -- | Filtering a singleton list. -- -- @filterMaybe p a = 'listToMaybe' ('filter' p [a])@ filterMaybe :: (a -> Bool) -> a -> Maybe a filterMaybe p a | p a = Just a | otherwise = Nothing -- * Conditionals and loops. -- | Version of 'mapMaybe' with different argument ordering. forMaybe :: [a] -> (a -> Maybe b) -> [b] forMaybe = flip mapMaybe -- | Version of 'maybe' with different argument ordering. -- Often, we want to case on a 'Maybe', do something interesting -- in the 'Just' case, but only a default action in the 'Nothing' -- case. Then, the argument ordering of @caseMaybe@ is preferable. -- -- @caseMaybe m err f = flip (maybe err) m f@ caseMaybe :: Maybe a -> b -> (a -> b) -> b caseMaybe m err f = maybe err f m -- * Monads and Maybe. -- | Monadic version of 'maybe'. maybeM :: Monad m => m b -> (a -> m b) -> m (Maybe a) -> m b maybeM n j mm = maybe n j =<< mm -- | Monadic version of 'fromMaybe'. fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a fromMaybeM m mm = maybeM m return mm -- | Monadic version of 'caseMaybe'. -- That is, 'maybeM' with a different argument ordering. caseMaybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b caseMaybeM mm err f = maybeM err f mm -- | 'caseMaybeM' with flipped branches. ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m b ifJustM mm = flip (caseMaybeM mm) -- | A more telling name for 'Traversable.forM' for the 'Maybe' collection type. -- Or: 'caseMaybe' without the 'Nothing' case. whenJust :: Monad m => Maybe a -> (a -> m ()) -> m () whenJust m k = caseMaybe m (return ()) k -- | 'caseMaybeM' without the 'Nothing' case. whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m () whenJustM c m = c >>= (`whenJust` m) Agda-2.6.0.1/src/full/Agda/Utils/Lens/0000755000000000000000000000000013466402171015272 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Utils/Lens/Examples.hs0000644000000000000000000000071013466402171017402 0ustar0000000000000000-- | Examples how to use "Agda.Utils.Lens". module Agda.Utils.Lens.Examples where import Agda.Utils.Functor import Agda.Utils.Lens data Record a b = Record { field1 :: a , field2 :: b } -- | (View source:) This is how you implement a lens for a record field. lensField1 :: Lens' a (Record a b) lensField1 f r = f (field1 r) <&> \ a -> r { field1 = a } lensField2 :: Lens' b (Record a b) lensField2 f r = f (field2 r) <&> \ b -> r { field2 = b } Agda-2.6.0.1/src/full/Agda/TypeChecking/0000755000000000000000000000000013466402171015646 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Names.hs0000644000000000000000000001147613466402171017256 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} {-| EDSL to construct terms without touching De Bruijn indices. e.g. if given t, u :: Term, Γ ⊢ t, u : A, we can build "λ f. f t u" like this: runNames [] $ do -- @open@ binds @t@ and @u@ to computations that know how to weaken themselves in -- an extended context [t,u] <- mapM open [t,u] -- @lam@ gives the illusion of HOAS by providing f as a computation -- It also extends the internal context with the name "f", so that -- @t@ and @u@ will get weakened in the body. -- Then we finish the job using the (<@>) combinator from Agda.TypeChecking.Primitive lam "f" $ \ f -> f <@> t <@> u -} module Agda.TypeChecking.Names where import Control.Monad import Control.Applicative #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.Identity import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans import Data.Char import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Data.List import Data.Traversable (traverse) import Data.Monoid (mempty) import Agda.Interaction.Options import Agda.Syntax.Position import Agda.Syntax.Common hiding (Nat) import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic (TermLike(..)) import Agda.Syntax.Literal import Agda.Syntax.Concrete.Pretty () import Agda.TypeChecking.Monad hiding (getConstInfo, typeOfConst) import qualified Agda.TypeChecking.Monad as TCM import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Errors import Agda.TypeChecking.Level import Agda.TypeChecking.Quote (QuotingKit, quoteTermWithKit, quoteTypeWithKit, quoteClauseWithKit, quotingKit) import Agda.TypeChecking.Pretty () -- instances only import Agda.TypeChecking.Free import Agda.Utils.Monad import Agda.Utils.Pretty (pretty) import Agda.Utils.Maybe #include "undefined.h" import Agda.Utils.Impossible import Debug.Trace instance HasBuiltins m => HasBuiltins (NamesT m) where getBuiltinThing b = lift $ getBuiltinThing b newtype NamesT m a = NamesT { unName :: ReaderT Names m a } deriving ( Functor , Applicative , Monad #if __GLASGOW_HASKELL__ >= 800 , Fail.MonadFail #endif , MonadTrans , MonadState s , MonadIO , HasOptions , MonadDebug , MonadTCEnv , MonadTCState , MonadTCM , ReadTCState , MonadReduce ) -- deriving instance MonadState s m => MonadState s (NamesT m) type Names = [String] runNamesT :: Names -> NamesT m a -> m a runNamesT n m = runReaderT (unName m) n runNames :: Names -> NamesT Identity a -> a runNames n m = runIdentity (runNamesT n m) currentCxt :: Monad m => NamesT m Names currentCxt = NamesT ask cxtSubst :: Monad m => Names -> NamesT m (Substitution' a) cxtSubst ctx = do ctx' <- currentCxt if (ctx `isSuffixOf` ctx') then return $ raiseS (genericLength ctx' - genericLength ctx) else fail $ "thing out of context (" ++ show ctx ++ " is not a sub context of " ++ show ctx' ++ ")" inCxt :: (Monad m, Subst t a) => Names -> a -> NamesT m a inCxt ctx a = do sigma <- cxtSubst ctx return $ applySubst sigma a -- closed terms cl' :: Applicative m => a -> NamesT m a cl' = pure cl :: Monad m => m a -> NamesT m a cl = lift open :: (Monad m, Subst t a) => a -> NamesT m (NamesT m a) open a = do ctx <- NamesT ask pure $ inCxt ctx a bind' :: (Monad m, Subst t' b, DeBruijn b, Subst t a, Free a) => ArgName -> (NamesT m b -> NamesT m a) -> NamesT m a bind' n f = do cxt <- NamesT ask (NamesT . local (n:) . unName $ f (inCxt (n:cxt) (deBruijnVar 0))) bind :: ( Monad m , Subst t' b , DeBruijn b , Subst t a , Free a ) => ArgName -> (NamesT m b -> NamesT m a) -> NamesT m (Abs a) bind n f = Abs n <$> bind' n f glam :: Monad m => ArgInfo -> ArgName -> (NamesT m Term -> NamesT m Term) -> NamesT m Term glam info n f = Lam info <$> bind n f glamN :: (Functor m, Monad m) => [Arg ArgName] -> (NamesT m Args -> NamesT m Term) -> NamesT m Term glamN [] f = f $ pure [] glamN (Arg i n:ns) f = glam i n $ \ x -> glamN ns (\ xs -> f ((:) <$> (Arg i <$> x) <*> xs)) lam :: Monad m => ArgName -> (NamesT m Term -> NamesT m Term) -> NamesT m Term lam n f = glam defaultArgInfo n f ilam :: Monad m => ArgName -> (NamesT m Term -> NamesT m Term) -> NamesT m Term ilam n f = glam (setRelevance Irrelevant defaultArgInfo) n f Agda-2.6.0.1/src/full/Agda/TypeChecking/With.hs0000644000000000000000000007610613466402171017127 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.With where import Control.Arrow ((&&&), (***), first, second) import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.Writer (WriterT, runWriterT, tell) import Data.Either import qualified Data.List as List import Data.Maybe import Data.Monoid import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Concrete.Pattern (IsWithP(..)) import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern as A import Agda.Syntax.Abstract.Views import Agda.Syntax.Info import Agda.Syntax.Position import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Reduce import Agda.TypeChecking.Datatypes import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Free import Agda.TypeChecking.Patterns.Abstract import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.ReconstructParameters import Agda.TypeChecking.Rules.Term import Agda.TypeChecking.Abstract import Agda.TypeChecking.Rules.LHS.Implicit import Agda.TypeChecking.Rules.LHS.Problem (ProblemEq(..)) import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null (empty) import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Split pattern variables according to with-expressions. -- Input: -- -- [@Δ@] context of types and with-arguments. -- -- [@Δ ⊢ t@] type of rhs. -- -- [@Δ ⊢ as@] types of with arguments. -- -- [@Δ ⊢ vs@] with arguments. -- -- -- Output: -- -- [@Δ₁@] part of context needed for with arguments and their types. -- -- [@Δ₂@] part of context not needed for with arguments and their types. -- -- [@π@] permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'. -- -- [@Δ₁Δ₂ ⊢ t'@] type of rhs under @π@ -- -- [@Δ₁ ⊢ as'@] types of with-arguments depending only on @Δ₁@. -- -- [@Δ₁ ⊢ vs'@] with-arguments under @π@. splitTelForWith -- Input: :: Telescope -- ^ __@Δ@__ context of types and with-arguments. -> Type -- ^ __@Δ ⊢ t@__ type of rhs. -> [EqualityView] -- ^ __@Δ ⊢ as@__ types of with arguments. -> [Term] -- ^ __@Δ ⊢ vs@__ with arguments. -- Output: -> ( Telescope -- @Δ₁@ part of context needed for with arguments and their types. , Telescope -- @Δ₂@ part of context not needed for with arguments and their types. , Permutation -- @π@ permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'. , Type -- @Δ₁Δ₂ ⊢ t'@ type of rhs under @π@ , [EqualityView] -- @Δ₁ ⊢ as'@ types of with- and rewrite-arguments depending only on @Δ₁@. , [Term] -- @Δ₁ ⊢ vs'@ with- and rewrite-arguments under @π@. ) -- ^ (__@Δ₁@__,__@Δ₂@__,__@π@__,__@t'@__,__@as'@__,__@vs'@__) where -- -- [@Δ₁@] part of context needed for with arguments and their types. -- -- [@Δ₂@] part of context not needed for with arguments and their types. -- -- [@π@] permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'. -- -- [@Δ₁Δ₂ ⊢ t'@] type of rhs under @π@ -- -- [@Δ₁ ⊢ as'@] types with with-arguments depending only on @Δ₁@. -- -- [@Δ₁ ⊢ vs'@] with-arguments under @π@. splitTelForWith delta t as vs = let -- Andreas, 2016-01-27, unfixing issue 1692 -- Due to public protests, we do not rewrite in the types of rewrite -- expressions. -- Otherwise, we cannot rewrite twice after another with the same equation -- as it turns into a reflexive equation in the first rewrite. -- Thus we include the fvs of the rewrite terms in Δ₁. rewriteTerms = map snd $ filter (isEqualityType . fst) $ zip as vs -- Split the telescope into the part needed to type the with arguments -- and all the other stuff. fv = allFreeVars (as, vs) SplitTel delta1 delta2 perm = splitTelescope fv delta -- Δ₁Δ₂ ⊢ π : Δ pi = renaming __IMPOSSIBLE__ (reverseP perm) -- Δ₁ ⊢ ρ : Δ₁Δ₂ (We know that as does not depend on Δ₂.) rho = strengthenS __IMPOSSIBLE__ $ size delta2 -- Δ₁ ⊢ ρ ∘ π : Δ rhopi = composeS rho pi -- We need Δ₁Δ₂ ⊢ t' t' = applySubst pi t -- and Δ₁ ⊢ as' as' = applySubst rhopi as -- and Δ₁ ⊢ vs' : as' vs' = applySubst rhopi vs in (delta1, delta2, perm, t', as', vs') -- | Abstract with-expressions @vs@ to generate type for with-helper function. -- -- Each @EqualityType@, coming from a @rewrite@, will turn into 2 abstractions. withFunctionType :: Telescope -- ^ @Δ₁@ context for types of with types. -> [Term] -- ^ @Δ₁,Δ₂ ⊢ vs : raise Δ₂ as@ with and rewrite-expressions. -> [EqualityView] -- ^ @Δ₁ ⊢ as@ types of with and rewrite-expressions. -> Telescope -- ^ @Δ₁ ⊢ Δ₂@ context extension to type with-expressions. -> Type -- ^ @Δ₁,Δ₂ ⊢ b@ type of rhs. -> TCM (Type, Nat) -- ^ @Δ₁ → wtel → Δ₂′ → b′@ such that -- @[vs/wtel]wtel = as@ and -- @[vs/wtel]Δ₂′ = Δ₂@ and -- @[vs/wtel]b′ = b@. -- Plus the final number of with-arguments. withFunctionType delta1 vs as delta2 b = addContext delta1 $ do reportSLn "tc.with.abstract" 20 $ "preparing for with-abstraction" -- Normalize and η-contract the type @b@ of the rhs and the types @delta2@ -- of the pattern variables not mentioned in @vs : as@. let dbg n s x = reportSDoc "tc.with.abstract" n $ nest 2 $ text (s ++ " =") <+> prettyTCM x let d2b = telePi_ delta2 b dbg 30 "Δ₂ → B" d2b d2b <- normalise d2b dbg 30 "normal Δ₂ → B" d2b d2b <- etaContract d2b dbg 30 "eta-contracted Δ₂ → B" d2b vs <- etaContract =<< normalise vs as <- etaContract =<< normalise as -- do we need this? let piAbstractVs [] b = return b piAbstractVs (va : vas) b = piAbstract va =<< piAbstractVs vas b -- wd2db = wtel → [vs : as] (Δ₂ → B) wd2b <- piAbstractVs (zip vs as) d2b dbg 30 "wΓ → Δ₂ → B" wd2b return (telePi_ delta1 wd2b, countWithArgs as) countWithArgs :: [EqualityView] -> Nat countWithArgs = sum . map countArgs where countArgs OtherType{} = 1 countArgs EqualityType{} = 2 -- | From a list of @with@ and @rewrite@ expressions and their types, -- compute the list of final @with@ expressions (after expanding the @rewrite@s). withArguments :: [Term] -> [EqualityView] -> [Term] withArguments vs as = concat $ for (zip vs as) $ \case (v, OtherType a) -> [v] (prf, eqt@(EqualityType s _eq _pars _t v _v')) -> [unArg v, prf] -- | Compute the clauses for the with-function given the original patterns. buildWithFunction :: [Name] -- ^ Names of the module parameters of the parent function. -> QName -- ^ Name of the parent function. -> QName -- ^ Name of the with-function. -> Type -- ^ Types of the parent function. -> Telescope -- ^ Context of parent patterns. -> [NamedArg DeBruijnPattern] -- ^ Parent patterns. -> Nat -- ^ Number of module parameters in parent patterns -> Substitution -- ^ Substitution from parent lhs to with function lhs -> Permutation -- ^ Final permutation. -> Nat -- ^ Number of needed vars. -> Nat -- ^ Number of with expressions. -> [A.SpineClause] -- ^ With-clauses. -> TCM [A.SpineClause] -- ^ With-clauses flattened wrt. parent patterns. buildWithFunction cxtNames f aux t delta qs npars withSub perm n1 n cs = mapM buildWithClause cs where -- Nested with-functions will iterate this function once for each parent clause. buildWithClause (A.Clause (A.SpineLHS i _ allPs) inheritedPats rhs wh catchall) = do let (ps, wps) = splitOffTrailingWithPatterns allPs (wps0, wps1) = splitAt n wps ps0 = map (updateNamedArg fromWithP) wps0 where fromWithP (A.WithP _ p) = p fromWithP _ = __IMPOSSIBLE__ reportSDoc "tc.with" 50 $ "inheritedPats:" <+> vcat [ prettyA p <+> "=" <+> prettyTCM v <+> ":" <+> prettyTCM a | A.ProblemEq p v a <- inheritedPats ] (strippedPats, ps') <- stripWithClausePatterns cxtNames f aux t delta qs npars perm ps reportSDoc "tc.with" 50 $ hang "strippedPats:" 2 $ vcat [ prettyA p <+> "==" <+> prettyTCM v <+> (":" <+> prettyTCM t) | A.ProblemEq p v t <- strippedPats ] rhs <- buildRHS strippedPats rhs let (ps1, ps2) = splitAt n1 ps' let result = A.Clause (A.SpineLHS i aux $ ps1 ++ ps0 ++ ps2 ++ wps1) (inheritedPats ++ strippedPats) rhs wh catchall reportSDoc "tc.with" 20 $ vcat [ "buildWithClause returns" <+> prettyA result ] return result buildRHS _ rhs@A.RHS{} = return rhs buildRHS _ rhs@A.AbsurdRHS = return rhs buildRHS _ (A.WithRHS q es cs) = A.WithRHS q es <$> mapM ((A.spineToLhs . permuteNamedDots) <.> buildWithClause . A.lhsToSpine) cs buildRHS strippedPats1 (A.RewriteRHS qes strippedPats2 rhs wh) = flip (A.RewriteRHS qes (applySubst withSub $ strippedPats1 ++ strippedPats2)) wh <$> buildRHS [] rhs -- The stripped patterns computed by buildWithClause lives in the context -- of the top with-clause (of the current call to buildWithFunction). When -- we recurse we expect inherited patterns to live in the context -- of the innermost parent clause. Note that this makes them live in the -- context of the with-function arguments before any pattern matching. We -- need to update again once the with-clause patterns have been checked. -- This happens in Rules.Def.checkClause before calling checkRHS. permuteNamedDots :: A.SpineClause -> A.SpineClause permuteNamedDots (A.Clause lhs strippedPats rhs wh catchall) = A.Clause lhs (applySubst withSub strippedPats) rhs wh catchall -- The arguments of @stripWithClausePatterns@ are documented -- at its type signature. -- The following is duplicate information, but may help reading the examples below. -- -- [@Δ@] context bound by lhs of original function. -- [@f@] name of @with@-function. -- [@t@] type of the original function. -- [@qs@] internal patterns for original function. -- [@np@] number of module parameters in @qs@ -- [@π@] permutation taking @vars(qs)@ to @support(Δ)@. -- [@ps@] patterns in with clause (eliminating type @t@). -- [@ps'@] patterns for with function (presumably of type @Δ@). {-| @stripWithClausePatterns cxtNames parent f t Δ qs np π ps = ps'@ Example: @ record Stream (A : Set) : Set where coinductive constructor delay field force : A × Stream A record SEq (s t : Stream A) : Set where coinductive field ~force : let a , as = force s b , bs = force t in a ≡ b × SEq as bs test : (s : Nat × Stream Nat) (t : Stream Nat) → SEq (delay s) t → SEq t (delay s) ~force (test (a , as) t p) with force t ~force (test (suc n , as) t p) | b , bs = ? @ With function: @ f : (t : Stream Nat) (w : Nat × Stream Nat) (a : Nat) (as : Stream Nat) (p : SEq (delay (a , as)) t) → (fst w ≡ a) × SEq (snd w) as Δ = t a as p -- reorder to bring with-relevant (= needed) vars first π = a as t p → Δ qs = (a , as) t p ~force ps = (suc n , as) t p ~force ps' = (suc n) as t p @ Resulting with-function clause is: @ f t (b , bs) (suc n) as t p @ Note: stripWithClausePatterns factors __@ps@__ through __@qs@__, thus @ ps = qs[ps'] @ where @[..]@ is to be understood as substitution. The projection patterns have vanished from __@ps'@__ (as they are already in __@qs@__). -} stripWithClausePatterns :: [Name] -- ^ __@cxtNames@__ names of the module parameters of the parent function -> QName -- ^ __@parent@__ name of the parent function. -> QName -- ^ __@f@__ name of with-function. -> Type -- ^ __@t@__ top-level type of the original function. -> Telescope -- ^ __@Δ@__ context of patterns of parent function. -> [NamedArg DeBruijnPattern] -- ^ __@qs@__ internal patterns for original function. -> Nat -- ^ __@npars@__ number of module parameters in @qs@. -> Permutation -- ^ __@π@__ permutation taking @vars(qs)@ to @support(Δ)@. -> [NamedArg A.Pattern] -- ^ __@ps@__ patterns in with clause (eliminating type @t@). -> TCM ([A.ProblemEq], [NamedArg A.Pattern]) -- ^ __@ps'@__ patterns for with function (presumably of type @Δ@). stripWithClausePatterns cxtNames parent f t delta qs npars perm ps = do -- Andreas, 2014-03-05 expand away pattern synoyms (issue 1074) ps <- expandPatternSynonyms ps -- Ulf, 2016-11-16 Issue 2303: We need the module parameter -- instantiations from qs, so we make sure -- that t is the top-level type of the parent function and add patterns for -- the module parameters to ps before stripping. let paramPat i _ = A.VarP $ A.BindName $ indexWithDefault __IMPOSSIBLE__ cxtNames i ps' = zipWith (fmap . fmap . paramPat) [0..] (take npars qs) ++ ps psi <- insertImplicitPatternsT ExpandLast ps' t reportSDoc "tc.with.strip" 10 $ vcat [ "stripping patterns" , nest 2 $ "t = " <+> prettyTCM t , nest 2 $ "ps = " <+> fsep (punctuate comma $ map prettyA ps) , nest 2 $ "ps' = " <+> fsep (punctuate comma $ map prettyA ps') , nest 2 $ "psi = " <+> fsep (punctuate comma $ map prettyA psi) , nest 2 $ "qs = " <+> fsep (punctuate comma $ map (prettyTCM . namedArg) qs) , nest 2 $ "perm= " <+> text (show perm) ] -- Andreas, 2015-11-09 Issue 1710: self starts with parent-function, not with-function! (ps', strippedPats) <- runWriterT $ strip (Def parent []) t psi qs reportSDoc "tc.with.strip" 50 $ nest 2 $ "strippedPats:" <+> vcat [ prettyA p <+> "=" <+> prettyTCM v <+> ":" <+> prettyTCM a | A.ProblemEq p v a <- strippedPats ] let psp = permute perm ps' reportSDoc "tc.with.strip" 10 $ vcat [ nest 2 $ "ps' = " <+> fsep (punctuate comma $ map prettyA ps') , nest 2 $ "psp = " <+> fsep (punctuate comma $ map prettyA $ psp) ] return (strippedPats, psp) where strip :: Term -- ^ Self. -> Type -- ^ The type to be eliminated. -> [NamedArg A.Pattern] -- ^ With-clause patterns. -> [NamedArg DeBruijnPattern] -- ^ Parent-clause patterns with de Bruijn indices relative to Δ. -> WriterT [ProblemEq] TCM [NamedArg A.Pattern] -- ^ With-clause patterns decomposed by parent-clause patterns. -- Also outputs named dot patterns from the parent clause that -- we need to add let-bindings for. -- Case: out of with-clause patterns. strip self t [] qs@(_ : _) = do reportSDoc "tc.with.strip" 15 $ vcat [ "strip (out of A.Patterns)" , nest 2 $ "qs =" <+> fsep (punctuate comma $ map (prettyTCM . namedArg) qs) , nest 2 $ "self=" <+> prettyTCM self , nest 2 $ "t =" <+> prettyTCM t ] -- Andreas, 2015-06-11, issue 1551: -- As the type t develops, we need to insert more implicit patterns, -- due to copatterns / flexible arity. ps <- liftTCM $ insertImplicitPatternsT ExpandLast [] t if null ps then typeError $ GenericError $ "Too few arguments given in with-clause" else strip self t ps qs -- Case: out of parent-clause patterns. -- This is only ok if all remaining with-clause patterns -- are implicit patterns (we inserted too many). strip _ _ ps [] = do let implicit (A.WildP{}) = True implicit (A.ConP ci _ _) = patOrigin ci == ConOSystem implicit _ = False unless (all (implicit . namedArg) ps) $ typeError $ GenericError $ "Too many arguments given in with-clause" return [] -- Case: both parent-clause pattern and with-clause pattern present. -- Make sure they match, and decompose into subpatterns. strip self t (p0 : ps) qs@(q : _) | A.AsP _ x p <- namedArg p0 = do (a, _) <- mustBePi t let v = patternToTerm (namedArg q) tell [ProblemEq (A.VarP x) v a] strip self t (fmap (p <$) p0 : ps) qs strip self t ps0@(p0 : ps) qs0@(q : qs) = do p <- liftTCM $ (traverse . traverse) expandLitPattern p0 reportSDoc "tc.with.strip" 15 $ vcat [ "strip" , nest 2 $ "ps0 =" <+> fsep (punctuate comma $ map prettyA ps0) , nest 2 $ "exp =" <+> prettyA p , nest 2 $ "qs0 =" <+> fsep (punctuate comma $ map (prettyTCM . namedArg) qs0) , nest 2 $ "self=" <+> prettyTCM self , nest 2 $ "t =" <+> prettyTCM t ] case namedArg q of ProjP o d -> case A.isProjP p of Just (o', AmbQ ds) -> do -- Andreas, 2016-12-28, issue #2360: -- We disambiguate the projection in the with clause -- to the projection in the parent clause. d <- liftTCM $ getOriginalProjection d found <- anyM ds ((d ==) <.> (liftTCM . getOriginalProjection)) -- We assume here that neither @o@ nor @o'@ can be @ProjSystem@. if o /= o' then liftTCM $ mismatchOrigin o o' else do if not found then mismatch else do (self1, t1, ps) <- liftTCM $ do t <- reduce t (_, self1, t1) <- fromMaybe __IMPOSSIBLE__ <$> projectTyped self t o d -- Andreas, 2016-01-21, issue #1791 -- The type of a field might start with hidden quantifiers. -- So we may have to insert more implicit patterns here. ps <- insertImplicitPatternsT ExpandLast ps t1 return (self1, t1, ps) strip self1 t1 ps qs Nothing -> mismatch -- If a variable pattern in the parent clause was written as a dot -- pattern by the user both in the parent clause and the with clause, -- we can strip the dot from the with clause. VarP PatODot x | A.DotP _ u <- namedArg p , A.Var y <- unScope u -> (setNamedArg p (A.VarP $ A.BindName y) :) <$> recurse (var (dbPatVarIndex x)) VarP _ x -> (p :) <$> recurse (var (dbPatVarIndex x)) IApplyP{} -> typeError $ GenericError $ "with clauses not supported in the presence of Path patterns" -- TODO maybe we can support them now? DefP{} -> typeError $ GenericError $ "with clauses not supported in the presence of hcomp patterns" -- TODO this should actually be impossible DotP o v -> do (a, _) <- mustBePi t tell [ProblemEq (namedArg p) v a] (makeImplicitP p :) <$> recurse v q'@(ConP c ci qs') -> do reportSDoc "tc.with.strip" 60 $ "parent pattern is constructor " <+> prettyTCM c (a, b) <- mustBePi t -- The type of the current pattern is a datatype. Def d es <- liftTCM $ normalise (unEl $ unDom a) let us = fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- Get the original constructor and field names. c <- either __IMPOSSIBLE__ (`withRangeOf` c) <$> do liftTCM $ getConForm $ conName c case namedArg p of -- Andreas, 2015-07-07 Issue 1606. -- Agda sometimes changes a record of dot patterns into a dot pattern, -- so the user should be allowed to do likewise. -- Jesper, 2017-11-16. This is now also allowed for data constructors. A.DotP r e -> do tell [ProblemEq (A.DotP r e) (patternToTerm q') a] let ps' = map (unnamed (A.WildP empty) <$) qs' stripConP d us b c ConOCon qs' ps' -- Andreas, 2016-12-29, issue #2363. -- Allow _ to stand for the corresponding parent pattern. A.WildP{} -> do -- Andreas, 2017-10-13, issue #2803: -- Delete the name, since it can confuse insertImplicitPattern. let ps' = map (unnamed (A.WildP empty) <$) qs' stripConP d us b c ConOCon qs' ps' -- Jesper, 2018-05-13, issue #2998. -- We also allow turning a constructor pattern into a variable. -- In general this is not type-safe since the types of some variables -- in the constructor pattern may have changed, so we have to -- re-check these solutions when checking the with clause (see LHS.hs) A.VarP x -> do tell [ProblemEq (A.VarP x) (patternToTerm q') a] let ps' = map (unnamed (A.WildP empty) <$) qs' stripConP d us b c ConOCon qs' ps' A.ConP _ (A.AmbQ cs') ps' -> do -- Check whether the with-clause constructor can be (possibly trivially) -- disambiguated to be equal to the parent-clause constructor. -- Andreas, 2017-08-13, herein, ignore abstract constructors. cs' <- liftTCM $ do snd . partitionEithers <$> mapM getConForm (toList cs') unless (elem c cs') mismatch -- Strip the subpatterns ps' and then continue. stripConP d us b c ConOCon qs' ps' A.RecP _ fs -> caseMaybeM (liftTCM $ isRecord d) mismatch $ \ def -> do ps' <- liftTCM $ insertMissingFields d (const $ A.WildP empty) fs (recordFieldNames def) stripConP d us b c ConORec qs' ps' p@(A.PatternSynP pi' c' ps') -> do reportSDoc "impossible" 10 $ "stripWithClausePatterns: encountered pattern synonym " <+> prettyA p __IMPOSSIBLE__ p -> do reportSDoc "tc.with.strip" 60 $ text $ "with clause pattern is " ++ show p mismatch LitP lit -> case namedArg p of A.LitP lit' | lit == lit' -> recurse $ Lit lit A.WildP{} -> recurse $ Lit lit p@(A.PatternSynP pi' c' [ps']) -> do reportSDoc "impossible" 10 $ "stripWithClausePatterns: encountered pattern synonym " <+> prettyA p __IMPOSSIBLE__ _ -> mismatch where recurse v = do caseMaybeM (liftTCM $ isPath t) (return ()) $ \ _ -> typeError $ GenericError $ "With-clauses currently not supported under Path abstraction." t' <- piApplyM t v strip (self `apply1` v) t' ps qs mismatch = addContext delta $ typeError $ WithClausePatternMismatch (namedArg p0) q mismatchOrigin o o' = addContext delta . typeError . GenericDocError =<< fsep [ "With clause pattern" , prettyA p0 , "is not an instance of its parent pattern" , P.fsep <$> prettyTCMPatterns [q] , text $ "since the parent pattern is " ++ prettyProjOrigin o ++ " and the with clause pattern is " ++ prettyProjOrigin o' ] prettyProjOrigin ProjPrefix = "a prefix projection" prettyProjOrigin ProjPostfix = "a postfix projection" prettyProjOrigin ProjSystem = __IMPOSSIBLE__ -- | Make an ImplicitP, keeping arg. info. makeImplicitP :: NamedArg A.Pattern -> NamedArg A.Pattern makeImplicitP = updateNamedArg $ const $ A.WildP patNoRange -- case I.ConP / A.ConP stripConP :: QName -- ^ Data type name of this constructor pattern. -> [Arg Term] -- ^ Data type arguments of this constructor pattern. -> Abs Type -- ^ Type the remaining patterns eliminate. -> ConHead -- ^ Constructor of this pattern. -> ConInfo -- ^ Constructor info of this pattern (constructor/record). -> [NamedArg DeBruijnPattern] -- ^ Argument patterns (parent clause). -> [NamedArg A.Pattern] -- ^ Argument patterns (with clause). -> WriterT [ProblemEq] TCM [NamedArg A.Pattern] -- ^ Stripped patterns. stripConP d us b c ci qs' ps' = do -- Get the type and number of parameters of the constructor. Defn {defType = ct, theDef = Constructor{conPars = np}} <- getConInfo c -- Compute the argument telescope for the constructor let ct' = ct `piApply` take np us TelV tel' _ <- liftTCM $ telViewPath ct' -- (TelV tel' _, _boundary) <- liftTCM $ telViewPathBoundaryP ct' reportSDoc "tc.with.strip" 20 $ vcat [ "ct = " <+> prettyTCM ct , "ct' = " <+> prettyTCM ct' , "np = " <+> text (show np) , "us = " <+> prettyList (map prettyTCM us) , "us' = " <+> prettyList (map prettyTCM $ take np us) ] -- TODO Andrea: preserve IApplyP patterns in v, see _boundary? -- Compute the new type let v = Con c ci [ Apply $ Arg info (var i) | (i, Arg info _) <- zip (downFrom $ size qs') qs' ] t' = tel' `abstract` absApp (raise (size tel') b) v self' = tel' `abstract` apply1 (raise (size tel') self) v -- Issue 1546 reportSDoc "tc.with.strip" 15 $ sep [ "inserting implicit" , nest 2 $ prettyList $ map prettyA (ps' ++ ps) , nest 2 $ ":" <+> prettyTCM t' ] -- Insert implicit patterns (just for the constructor arguments) psi' <- liftTCM $ insertImplicitPatterns ExpandLast ps' tel' unless (size psi' == size tel') $ typeError $ WrongNumberOfConstructorArguments (conName c) (size tel') (size psi') -- Andreas, Ulf, 2016-06-01, Ulf's variant at issue #679 -- Since instantiating the type with a constructor pattern -- can reveal more hidden arguments, we need to insert them here. psi <- liftTCM $ insertImplicitPatternsT ExpandLast (psi' ++ ps) t' -- Keep going strip self' t' psi (qs' ++ qs) -- | Construct the display form for a with function. It will display -- applications of the with function as applications to the original function. -- For instance, -- -- @ -- aux a b c -- @ -- -- as -- -- @ -- f (suc a) (suc b) | c -- @ withDisplayForm :: QName -- ^ The name of parent function. -> QName -- ^ The name of the @with@-function. -> Telescope -- ^ __@Δ₁@__ The arguments of the @with@ function before the @with@ expressions. -> Telescope -- ^ __@Δ₂@__ The arguments of the @with@ function after the @with@ expressions. -> Nat -- ^ __@n@__ The number of @with@ expressions. -> [NamedArg DeBruijnPattern] -- ^ __@qs@__ The parent patterns. -> Permutation -- ^ __@perm@__ Permutation to split into needed and unneeded vars. -> Permutation -- ^ __@lhsPerm@__ Permutation reordering the variables in parent patterns. -> TCM DisplayForm withDisplayForm f aux delta1 delta2 n qs perm@(Perm m _) lhsPerm = do -- Compute the arity of the display form. let arity0 = n + size delta1 + size delta2 -- The currently free variables have to be added to the front. topArgs <- raise arity0 <$> getContextArgs let top = length topArgs arity = arity0 + top -- Build the rhs of the display form. wild <- freshNoName_ <&> \ x -> Def (qualify_ x) [] let -- Convert the parent patterns to terms. tqs0 = patsToElims qs -- Build a substitution to replace the parent pattern vars -- by the pattern vars of the with-function. (ys0, ys1) = splitAt (size delta1) $ permute perm $ downFrom m ys = reverse (map Just ys0 ++ replicate n Nothing ++ map Just ys1) ++ map (Just . (m +)) [0..top-1] rho = sub top ys wild tqs = applySubst rho tqs0 -- Build the arguments to the with function. es = map (Apply . fmap DTerm) topArgs ++ tqs withArgs = map var $ take n $ downFrom $ size delta2 + n dt = DWithApp (DDef f es) (map DTerm withArgs) [] -- Build the lhs of the display form and finish. -- @var 0@ is the pattern variable (hole). let display = Display arity (replicate arity $ Apply $ defaultArg $ var 0) dt -- Debug printing. let addFullCtx = addContext delta1 . flip (foldr addContext) (for [1..n] $ \ i -> "w" ++ show i) . addContext delta2 reportSDoc "tc.with.display" 20 $ vcat [ "withDisplayForm" , nest 2 $ vcat [ "f =" <+> text (prettyShow f) , "aux =" <+> text (prettyShow aux) , "delta1 =" <+> prettyTCM delta1 , "delta2 =" <+> do addContext delta1 $ prettyTCM delta2 , "n =" <+> text (show n) , "perm =" <+> text (show perm) , "top =" <+> do addFullCtx $ prettyTCM topArgs , "qs =" <+> prettyList (map pretty qs) , "qsToTm =" <+> prettyTCM tqs0 -- ctx would be permuted form of delta1 ++ delta2 , "ys =" <+> text (show ys) , "rho =" <+> text (prettyShow rho) , "qs[rho]=" <+> do addFullCtx $ prettyTCM tqs , "dt =" <+> do addFullCtx $ prettyTCM dt ] ] reportSDoc "tc.with.display" 70 $ nest 2 $ vcat [ "raw =" <+> text (show display) ] return display where -- Ulf, 2014-02-19: We need to rename the module parameters as well! (issue1035) -- sub top ys wild = map term [0 .. m - 1] ++# raiseS (length qs) -- Andreas, 2015-10-28: Yes, but properly! (Issue 1407) sub top ys wild = parallelS $ map term [0 .. m + top - 1] where term i = maybe wild var $ List.findIndex (Just i ==) ys -- Andreas, 2014-12-05 refactored using numberPatVars -- Andreas, 2013-02-28 modeled after Coverage/Match/buildMPatterns patsToElims :: [NamedArg DeBruijnPattern] -> [I.Elim' DisplayTerm] patsToElims = map $ toElim . fmap namedThing where toElim :: Arg DeBruijnPattern -> I.Elim' DisplayTerm toElim (Arg ai p) = case p of ProjP o d -> I.Proj o d p -> I.Apply $ Arg ai $ toTerm p toTerms :: [NamedArg DeBruijnPattern] -> [Arg DisplayTerm] toTerms = map $ fmap $ toTerm . namedThing toTerm :: DeBruijnPattern -> DisplayTerm toTerm p = case p of IApplyP o _ _ x -> DTerm $ var $ dbPatVarIndex x -- TODO, should be an Elim' DisplayTerm ? ProjP _ d -> DDef d [] -- WRONG. TODO: convert spine to non-spine ... DDef d . defaultArg VarP PatODot x -> DDot $ var $ dbPatVarIndex x VarP o x -> DTerm $ var $ dbPatVarIndex x DotP PatOVar{} t@(Var i []) -> DTerm t DotP o t -> DDot $ t ConP c cpi ps -> DCon c (fromConPatternInfo cpi) $ toTerms ps LitP l -> DTerm $ Lit l DefP o q ps -> DDef q $ map Apply $ toTerms ps Agda-2.6.0.1/src/full/Agda/TypeChecking/CheckInternal.hs0000644000000000000000000004257213466402171020726 0ustar0000000000000000{-# LANGUAGE CPP #-} -- Initially authored by Andreas, 2013-10-22. -- | A bidirectional type checker for internal syntax. -- -- Performs checking on unreduced terms. -- With the exception that projection-like function applications -- have to be reduced since they break bidirectionality. module Agda.TypeChecking.CheckInternal ( checkType , checkType' , checkSort , checkInternal , checkInternal' , Action(..), defaultAction, eraseUnusedAction , infer , inferSort , shouldBeSort ) where import Control.Arrow ((&&&), (***), first, second) import Control.Monad import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Conversion import Agda.TypeChecking.Datatypes -- (getConType, getFullyAppliedConType) import Agda.TypeChecking.Level import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive import Agda.TypeChecking.ProjectionLike (elimView) import Agda.TypeChecking.Records (getDefType) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Sort import Agda.TypeChecking.Telescope import Agda.Utils.Functor (($>)) import Agda.Utils.Monad import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- * Bidirectional rechecker -- -- | Entry point for e.g. checking WithFunctionType. -- checkType :: Type -> TCM () -- checkType t = -- dontAssignMetas $ ignoreSorts $ -- checkInternal (unEl t) (sort Inf) -- | Entry point for e.g. checking WithFunctionType. checkType :: Type -> TCM () checkType t = void $ checkType' t -- | Check a type and infer its sort. -- -- Necessary because of PTS rule @(SizeUniv, Set i, Set i)@ -- but @SizeUniv@ is not included in any @Set i@. -- -- This algorithm follows -- Abel, Coquand, Dybjer, MPC 08, -- Verifying a Semantic βη-Conversion Test for Martin-Löf Type Theory -- checkType' :: Type -> TCM Sort checkType' t = do reportSDoc "tc.check.internal" 20 $ sep [ "checking internal type " , prettyTCM t ] v <- elimView True $ unEl t -- bring projection-like funs in post-fix form case v of Pi a b -> do s1 <- checkType' $ unDom a s2 <- (b $>) <$> do let goInside = case b of Abs{} -> addContext (absName b, a) NoAbs{} -> id goInside $ checkType' $ unAbs b inferPiSort s1 s2 Sort s -> do _ <- checkSort defaultAction s inferUnivSort s Var i es -> do a <- typeOfBV i checkTypeSpine a (Var i []) es Def f es -> do -- not a projection-like fun a <- defType <$> getConstInfo f checkTypeSpine a (Def f []) es MetaV x es -> do -- we assume meta instantiations to be well-typed a <- metaType x checkTypeSpine a (MetaV x []) es v@Lam{} -> typeError $ InvalidType v v@Con{} -> typeError $ InvalidType v v@Lit{} -> typeError $ InvalidType v v@Level{} -> typeError $ InvalidType v DontCare v -> checkType' $ t $> v Dummy s -> __IMPOSSIBLE_VERBOSE__ s checkTypeSpine :: Type -> Term -> Elims -> TCM Sort checkTypeSpine a self es = shouldBeSort =<< do snd <$> inferSpine a self es -- | 'checkInternal' traverses the whole 'Term', and we can use this -- traversal to modify the term. data Action = Action { preAction :: Type -> Term -> TCM Term -- ^ Called on each subterm before the checker runs. , postAction :: Type -> Term -> TCM Term -- ^ Called on each subterm after the type checking. , relevanceAction :: Relevance -> Relevance -> Relevance -- ^ Called for each @ArgInfo@. -- The first 'Relevance' is from the type, -- the second from the term. } -- | The default action is to not change the 'Term' at all. defaultAction :: Action defaultAction = Action { preAction = \ _ -> return , postAction = \ _ -> return , relevanceAction = \ _ -> id } eraseUnusedAction :: Action eraseUnusedAction = defaultAction { postAction = eraseUnused } where eraseUnused :: Type -> Term -> TCM Term eraseUnused t v = case v of Def f es -> do pols <- getPolarity f return $ Def f $ eraseIfNonvariant pols es _ -> return v eraseIfNonvariant :: [Polarity] -> Elims -> Elims eraseIfNonvariant [] es = es eraseIfNonvariant pols [] = [] eraseIfNonvariant (Nonvariant : pols) (e : es) = (fmap DontCare e) : eraseIfNonvariant pols es eraseIfNonvariant (_ : pols) (e : es) = e : eraseIfNonvariant pols es -- | Entry point for term checking. checkInternal :: Term -> Type -> TCM () checkInternal v t = void $ checkInternal' defaultAction v t checkInternal' :: Action -> Term -> Type -> TCM Term checkInternal' action v t = do reportSDoc "tc.check.internal" 20 $ sep [ "checking internal " , nest 2 $ sep [ prettyTCM v <+> ":" , nest 2 $ prettyTCM t ] ] -- Bring projection-like funs in post-fix form, -- even lone ones (True). v <- elimView True =<< preAction action t v postAction action t =<< case v of Var i es -> do a <- typeOfBV i checkSpine action a (Var i []) es t Def f es -> do -- f is not projection(-like)! a <- defType <$> getConstInfo f checkSpine action a (Def f []) es t MetaV x es -> do -- we assume meta instantiations to be well-typed a <- metaType x checkSpine action a (MetaV x []) es t Con c ci vs -> do -- We need to fully apply the constructor to make getConType work! fullyApplyCon c vs t $ \ _d _dt _pars a vs' tel t -> do Con c ci vs2 <- checkSpine action a (Con c ci []) vs' t -- Strip away the extra arguments return $ applySubst (strengthenS __IMPOSSIBLE__ (size tel)) $ Con c ci $ take (length vs) vs2 Lit l -> Lit l <$ ((`subtype` t) =<< litType l) Lam ai vb -> do (a, b) <- maybe (shouldBePi t) return =<< isPath t ai <- checkArgInfo action ai $ domInfo a addContext (suggest vb b, a) $ do Lam ai . Abs (absName vb) <$> checkInternal' action (absBody vb) (absBody b) Pi a b -> do s <- shouldBeSort t when (s == SizeUniv) $ typeError $ FunctionTypeInSizeUniv v let st = sort s sa = getSort a sb = getSort (unAbs b) mkDom v = El sa v <$ a mkRng v = fmap (v <$) b -- Preserve NoAbs goInside = case b of Abs{} -> addContext (absName b, a) NoAbs{} -> id a <- mkDom <$> checkInternal' action (unEl $ unDom a) (sort sa) -- TODO: checkPTS sa sb s goInside $ Pi a . mkRng <$> checkInternal' action (unEl $ unAbs b) (sort sb) Sort s -> do s <- checkSort action s Sort s <$ ((sortFitsIn s) =<< shouldBeSort t) -- sortFitsIn ensures @s /= Inf@ Level l -> do l <- checkLevel action l Level l <$ ((`subtype` t) =<< levelType) DontCare v -> DontCare <$> checkInternal' action v t Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Make sure a constructor is fully applied -- and infer the type of the constructor. -- Raises a type error if the constructor does not belong to the given type. fullyApplyCon :: ConHead -- ^ Constructor. -> Elims -- ^ Constructor arguments. -> Type -- ^ Type of the constructor application. -> (QName -> Type -> Args -> Type -> Elims -> Telescope -> Type -> TCM a) -- ^ Name of the data/record type, -- type of the data/record type, -- reconstructed parameters, -- type of the constructor (applied to parameters), -- full application arguments, -- types of missing arguments (already added to context), -- type of the full application. -> TCM a fullyApplyCon c vs t0 ret = do TelV tel t <- telView t0 -- The type of the constructor application may still be a function -- type. In this case, we introduce the domains @tel@ into the context -- and apply the constructor to these fresh variables. addContext tel $ do getFullyAppliedConType c t >>= \case Nothing -> typeError $ DoesNotConstructAnElementOf (conName c) t Just ((d, dt, pars), a) -> ret d dt pars a (raise (size tel) vs ++ map Apply (teleArgs tel)) tel t checkSpine :: Action -> Type -- ^ Type of the head @self@. -> Term -- ^ The head @self@. -> Elims -- ^ The eliminations @es@. -> Type -- ^ Expected type of the application @self es@. -> TCM Term -- ^ The application after modification by the @Action@. checkSpine action a self es t = do reportSDoc "tc.check.internal" 20 $ sep [ "checking spine " , nest 2 $ sep [ parens (sep [ prettyTCM self <+> ":" , nest 2 $ prettyTCM a ]) , nest 4 $ prettyTCM es <+> ":" , nest 2 $ prettyTCM t ] ] ((v, v'), t') <- inferSpine' action a self self es t' <- reduce t' v' <$ coerceSize subtype v t' t checkArgs :: Action -> Type -- ^ Type of the head. -> Term -- ^ The head. -> Args -- ^ The arguments. -> Type -- ^ Expected type of the application. -> TCM Term -- ^ The application after modification by the @Action@. checkArgs action a self vs t = checkSpine action a self (map Apply vs) t -- | @checkArgInfo actual expected@. -- -- The @expected@ 'ArgInfo' comes from the type. -- The @actual@ 'ArgInfo' comes from the term and can be updated -- by an action. checkArgInfo :: Action -> ArgInfo -> ArgInfo -> TCM ArgInfo checkArgInfo action ai ai' = do checkHiding (getHiding ai) (getHiding ai') r <- checkRelevance action (getRelevance ai) (getRelevance ai') return $ setRelevance r ai checkHiding :: Hiding -> Hiding -> TCM () checkHiding h h' = unless (sameHiding h h') $ typeError $ HidingMismatch h h' -- | @checkRelevance action term type@. -- -- The @term@ 'Relevance' can be updated by the @action@. checkRelevance :: Action -> Relevance -> Relevance -> TCM Relevance checkRelevance action r r' = do unless (r == r') $ typeError $ RelevanceMismatch r r' return $ relevanceAction action r' r -- Argument order for actions: @type@ @term@ -- | Infer type of a neutral term. infer :: Term -> TCM Type infer v = do case v of Var i es -> do a <- typeOfBV i snd <$> inferSpine a (Var i []) es Def f (Apply a : es) -> inferDef' f a es -- possibly proj.like Def f es -> inferDef f es -- not a projection-like fun MetaV x es -> do -- we assume meta instantiations to be well-typed a <- metaType x snd <$> inferSpine a (MetaV x []) es _ -> __IMPOSSIBLE__ -- | Infer ordinary function application. inferDef :: QName -> Elims -> TCM Type inferDef f es = do a <- defType <$> getConstInfo f snd <$> inferSpine a (Def f []) es -- | Infer possibly projection-like function application inferDef' :: QName -> Arg Term -> Elims -> TCM Type inferDef' f a es = do isProj <- isProjection f case isProj of Just Projection{ projIndex = n } | n > 0 -> do let self = unArg a b <- infer self snd <$> inferSpine b self (Proj ProjSystem f : es) _ -> inferDef f (Apply a : es) -- | @inferSpine t self es@ checks that spine @es@ eliminates -- value @self@ of type @t@ and returns the remaining type -- (target of elimination) and the final self (has that type). inferSpine :: Type -> Term -> Elims -> TCM (Term, Type) inferSpine a v es = first fst <$> inferSpine' defaultAction a v v es -- | Returns both the real term (first) and the transformed term (second). The -- transformed term is not necessarily a valid term, so it must not be used -- in types. inferSpine' :: Action -> Type -> Term -> Term -> Elims -> TCM ((Term, Term), Type) inferSpine' action t self self' [] = return ((self, self'), t) inferSpine' action t self self' (e : es) = do reportSDoc "tc.infer.internal" 30 $ sep [ "inferSpine': " , "type t = " <+> prettyTCM t , "self = " <+> prettyTCM self , "self' = " <+> prettyTCM self' , "eliminated by e = " <+> prettyTCM e ] case e of IApply x y r -> do (a, b) <- shouldBePath t r' <- checkInternal' action r (unDom a) izero <- primIZero ione <- primIOne x' <- checkInternal' action x (b `absApp` izero) y' <- checkInternal' action y (b `absApp` ione) inferSpine' action (b `absApp` r) (self `applyE` [e]) (self' `applyE` [IApply x' y' r']) es Apply (Arg ai v) -> do (a, b) <- shouldBePi t ai <- checkArgInfo action ai $ domInfo a v' <- checkInternal' action v $ unDom a inferSpine' action (b `absApp` v) (self `applyE` [e]) (self' `applyE` [Apply (Arg ai v')]) es -- case: projection or projection-like Proj o f -> do (a, b) <- shouldBePi =<< shouldBeProjectible t f u <- applyDef o f (argFromDom a $> self) u' <- applyDef o f (argFromDom a $> self') inferSpine' action (b `absApp` self) u u' es -- | Type should either be a record type of a type eligible for -- the principal argument of projection-like functions. shouldBeProjectible :: Type -> QName -> TCM Type -- shouldBeProjectible t f = maybe failure return =<< projectionType t f shouldBeProjectible t f = maybe failure return =<< getDefType f =<< reduce t where failure = typeError $ ShouldBeRecordType t -- TODO: more accurate error that makes sense also for proj.-like funs. shouldBePath :: Type -> TCM (Dom Type, Abs Type) shouldBePath t = do m <- isPath t case m of Just p -> return p Nothing -> typeError $ ShouldBePath t shouldBePi :: Type -> TCM (Dom Type, Abs Type) shouldBePi t = ifPiType t (\ a b -> return (a, b)) $ const $ typeError $ ShouldBePi t -- | Result is in reduced form. shouldBeSort :: Type -> TCM Sort shouldBeSort t = ifIsSort t return (typeError $ ShouldBeASort t) ifIsSort :: Type -> (Sort -> TCM a) -> TCM a -> TCM a ifIsSort t yes no = do t <- reduce t case unEl t of Sort s -> yes s _ -> no -- | Check if sort is well-formed. checkSort :: Action -> Sort -> TCM Sort checkSort action s = case s of Type l -> Type <$> checkLevel action l Prop l -> Prop <$> checkLevel action l Inf -> return Inf SizeUniv -> return SizeUniv PiSort a b -> do a <- checkSort action a addContext (absName b, defaultDom (sort a) :: Dom Type) $ do PiSort a . Abs (absName b) <$> checkSort action (absBody b) UnivSort s -> UnivSort <$> checkSort action s MetaS x es -> do -- we assume sort meta instantiations to be well-formed a <- metaType x let self = Sort $ MetaS x [] ((_,v),_) <- inferSpine' action a self self es case v of Sort s -> return s MetaV x es -> return $ MetaS x es Def d es -> return $ DefS d es _ -> __IMPOSSIBLE__ DefS d es -> do a <- defType <$> getConstInfo d let self = Sort $ DefS d [] ((_,v),_) <- inferSpine' action a self self es case v of Sort s -> return s MetaV x es -> return $ MetaS x es Def d es -> return $ DefS d es _ -> __IMPOSSIBLE__ DummyS s -> __IMPOSSIBLE_VERBOSE__ s -- | Check if level is well-formed. checkLevel :: Action -> Level -> TCM Level checkLevel action (Max ls) = Max <$> mapM checkPlusLevel ls where checkPlusLevel l@ClosedLevel{} = return l checkPlusLevel (Plus k l) = Plus k <$> checkLevelAtom l checkLevelAtom l = do lvl <- levelType UnreducedLevel <$> case l of MetaLevel x es -> checkInternal' action (MetaV x es) lvl BlockedLevel _ v -> checkInternal' action v lvl NeutralLevel _ v -> checkInternal' action v lvl UnreducedLevel v -> checkInternal' action v lvl -- | Type of a term or sort meta. metaType :: MetaId -> TCM Type metaType x = jMetaType . mvJudgement <$> lookupMeta x -- | Universe subsumption and type equality (subtyping for sizes, resp.). subtype :: Type -> Type -> TCM () subtype t1 t2 = do ifIsSort t1 (\ s1 -> (s1 `leqSort`) =<< shouldBeSort t2) $ do -- Andreas, 2017-03-09, issue #2493 -- Only check subtyping, do not solve any metas! dontAssignMetas $ leqType t1 t2 -- | Compute the sort of a type. inferSort :: Term -> TCM Sort inferSort t = case t of Var i es -> do a <- typeOfBV i (_, s) <- eliminate (Var i []) a es shouldBeSort s Def f es -> do -- f is not projection(-like)! a <- defType <$> getConstInfo f (_, s) <- eliminate (Def f []) a es shouldBeSort s MetaV x es -> do a <- metaType x (_, s) <- eliminate (MetaV x []) a es shouldBeSort s Pi a b -> inferPiSort (getSort a) (getSort <$> b) Sort s -> inferUnivSort s Con{} -> __IMPOSSIBLE__ Lit{} -> __IMPOSSIBLE__ Lam{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | @eliminate t self es@ eliminates value @self@ of type @t@ by spine @es@ -- and returns the remaining value and its type. eliminate :: Term -> Type -> Elims -> TCM (Term, Type) eliminate self t [] = return (self, t) eliminate self t (e : es) = case e of Apply (Arg _ v) -> ifNotPiType t __IMPOSSIBLE__ {-else-} $ \ _ b -> eliminate (self `applyE` [e]) (b `absApp` v) es IApply _ _ v -> do (_, b) <- shouldBePath t eliminate (self `applyE` [e]) (b `absApp` v) es -- case: projection or projection-like Proj o f -> do (Dom{domInfo = ai}, b) <- shouldBePi =<< shouldBeProjectible t f u <- applyDef o f $ Arg ai self eliminate u (b `absApp` self) es Agda-2.6.0.1/src/full/Agda/TypeChecking/Errors.hs-boot0000644000000000000000000000060313466402171020416 0ustar0000000000000000module Agda.TypeChecking.Errors where import Agda.TypeChecking.Monad.Base import Agda.Syntax.Position import Agda.Utils.Pretty -- Misplaced SPECIALISE pragma: -- {-# SPECIALIZE prettyError :: TCErr -> TCM String #-} prettyError :: MonadTCM tcm => TCErr -> tcm String prettyWarning :: MonadTCM tcm => Warning -> tcm Doc sayWhen :: Range -> Maybe (Closure Call) -> TCM Doc -> TCM Doc Agda-2.6.0.1/src/full/Agda/TypeChecking/CheckInternal.hs-boot0000644000000000000000000000066213466402171021661 0ustar0000000000000000module Agda.TypeChecking.CheckInternal where import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base (TCM) data Action defaultAction :: Action eraseUnusedAction :: Action checkType :: Type -> TCM () checkType' :: Type -> TCM Sort checkSort :: Action -> Sort -> TCM Sort checkInternal :: Term -> Type -> TCM () checkInternal' :: Action -> Term -> Type -> TCM Term infer :: Term -> TCM Type shouldBeSort :: Type -> TCM Sort Agda-2.6.0.1/src/full/Agda/TypeChecking/Primitive.hs0000644000000000000000000025633613466402171020171 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE NondecreasingIndentation #-} -- ASR (2017-04-10). TODO: Is this option required by the final -- version of GHC 8.2.1 (it was required by the RC 1)? #if __GLASGOW_HASKELL__ >= 802 {-# OPTIONS -Wno-simplifiable-class-constraints #-} #endif {-| Primitive functions, such as addition on builtin integers. -} module Agda.TypeChecking.Primitive where import Control.Monad import Control.Monad.Reader (asks) import Control.Monad.Trans (lift) import Data.Char import Data.Either (partitionEithers) import Data.List (nub) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe import Data.Monoid import Data.Traversable (traverse) import Data.Monoid (mempty) import Data.Word import Agda.Interaction.Options import qualified Agda.Interaction.Options.Lenses as Lens import Agda.Syntax.Position import Agda.Syntax.Common hiding (Nat) import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic (TermLike(..)) import Agda.Syntax.Literal import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Fixity import Agda.TypeChecking.Monad hiding (getConstInfo, typeOfConst) import qualified Agda.TypeChecking.Monad as TCM import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad as Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Errors import Agda.TypeChecking.Functions import Agda.TypeChecking.Level import Agda.TypeChecking.Quote (QuotingKit, quoteTermWithKit, quoteTypeWithKit, quoteClauseWithKit, quotingKit) import Agda.TypeChecking.Pretty () -- instances only import Agda.TypeChecking.Names import Agda.TypeChecking.Warnings import Agda.Utils.Float import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty (pretty, prettyShow) import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.String ( Str(Str), unStr ) import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible import Debug.Trace ------------------------------------------------------------------------ -- * Builtin Sigma ------------------------------------------------------------------------ data SigmaKit = SigmaKit { sigmaName :: QName , sigmaCon :: ConHead , sigmaFst :: QName , sigmaSnd :: QName } deriving (Eq,Show) getSigmaKit :: (HasBuiltins m, HasConstInfo m) => m (Maybe SigmaKit) getSigmaKit = do ms <- getBuiltinName' builtinSigma case ms of Nothing -> return Nothing Just sigma -> do def <- theDef <$> getConstInfo sigma case def of Record { recFields = [fst,snd], recConHead = con } -> do return . Just $ SigmaKit { sigmaName = sigma , sigmaCon = con , sigmaFst = unArg fst , sigmaSnd = unArg snd } _ -> __IMPOSSIBLE__ --------------------------------------------------------------------------- -- * Primitive functions --------------------------------------------------------------------------- data PrimitiveImpl = PrimImpl Type PrimFun -- Haskell type to Agda type newtype Nat = Nat { unNat :: Integer } deriving (Eq, Ord, Num, Enum, Real) -- In GHC > 7.8 deriving Integral causes an unnecessary toInteger -- warning. instance Integral Nat where toInteger = unNat quotRem (Nat a) (Nat b) = (Nat q, Nat r) where (q, r) = quotRem a b instance TermLike Nat where traverseTermM _ = pure foldTerm _ = mempty instance Show Nat where show = show . toInteger newtype Lvl = Lvl { unLvl :: Integer } deriving (Eq, Ord) instance Show Lvl where show = show . unLvl class PrimType a where primType :: a -> TCM Type instance (PrimType a, PrimType b) => PrimTerm (a -> b) where primTerm _ = unEl <$> (primType (undefined :: a) --> primType (undefined :: b)) instance PrimTerm a => PrimType a where primType _ = el $ primTerm (undefined :: a) class PrimTerm a where primTerm :: a -> TCM Term instance PrimTerm Integer where primTerm _ = primInteger instance PrimTerm Word64 where primTerm _ = primWord64 instance PrimTerm Bool where primTerm _ = primBool instance PrimTerm Char where primTerm _ = primChar instance PrimTerm Double where primTerm _ = primFloat instance PrimTerm Str where primTerm _ = primString instance PrimTerm Nat where primTerm _ = primNat instance PrimTerm Lvl where primTerm _ = primLevel instance PrimTerm QName where primTerm _ = primQName instance PrimTerm MetaId where primTerm _ = primAgdaMeta instance PrimTerm Type where primTerm _ = primAgdaTerm instance PrimTerm Fixity' where primTerm _ = primFixity instance PrimTerm a => PrimTerm [a] where primTerm _ = list (primTerm (undefined :: a)) instance PrimTerm a => PrimTerm (IO a) where primTerm _ = io (primTerm (undefined :: a)) -- From Agda term to Haskell value class ToTerm a where toTerm :: TCM (a -> Term) toTermR :: TCM (a -> ReduceM Term) toTermR = (pure .) <$> toTerm instance ToTerm Nat where toTerm = return $ Lit . LitNat noRange . toInteger instance ToTerm Word64 where toTerm = return $ Lit . LitWord64 noRange instance ToTerm Lvl where toTerm = return $ Level . Max . (:[]) . ClosedLevel . unLvl instance ToTerm Double where toTerm = return $ Lit . LitFloat noRange instance ToTerm Char where toTerm = return $ Lit . LitChar noRange instance ToTerm Str where toTerm = return $ Lit . LitString noRange . unStr instance ToTerm QName where toTerm = return $ Lit . LitQName noRange instance ToTerm MetaId where toTerm = do file <- getCurrentPath return $ Lit . LitMeta noRange file instance ToTerm Integer where toTerm = do pos <- primIntegerPos negsuc <- primIntegerNegSuc fromNat <- toTerm :: TCM (Nat -> Term) let intToTerm = fromNat . fromIntegral :: Integer -> Term let fromInt n | n >= 0 = apply pos [defaultArg $ intToTerm n] | otherwise = apply negsuc [defaultArg $ intToTerm (-n - 1)] return fromInt instance ToTerm Bool where toTerm = do true <- primTrue false <- primFalse return $ \b -> if b then true else false instance ToTerm Term where toTerm = do kit <- quotingKit; runReduceF (quoteTermWithKit kit) toTermR = do kit <- quotingKit; return (quoteTermWithKit kit) instance ToTerm Type where toTerm = do kit <- quotingKit; runReduceF (quoteTypeWithKit kit) toTermR = do kit <- quotingKit; return (quoteTypeWithKit kit) instance ToTerm ArgInfo where toTerm = do info <- primArgArgInfo vis <- primVisible hid <- primHidden ins <- primInstance rel <- primRelevant irr <- primIrrelevant return $ \ i -> info `applys` [ case getHiding i of NotHidden -> vis Hidden -> hid Instance{} -> ins , case getRelevance i of Relevant -> rel Irrelevant -> irr NonStrict -> rel ] instance ToTerm Fixity' where toTerm = (. theFixity) <$> toTerm instance ToTerm Fixity where toTerm = do lToTm <- toTerm aToTm <- toTerm fixity <- primFixityFixity return $ \ Fixity{fixityAssoc = a, fixityLevel = l} -> fixity `apply` [defaultArg (aToTm a), defaultArg (lToTm l)] instance ToTerm Associativity where toTerm = do lassoc <- primAssocLeft rassoc <- primAssocRight nassoc <- primAssocNon return $ \ a -> case a of NonAssoc -> nassoc LeftAssoc -> lassoc RightAssoc -> rassoc instance ToTerm PrecedenceLevel where toTerm = do (iToTm :: Integer -> Term) <- toTerm related <- primPrecRelated unrelated <- primPrecUnrelated return $ \ p -> case p of Unrelated -> unrelated Related n -> related `apply` [defaultArg $ iToTm n] -- | @buildList A ts@ builds a list of type @List A@. Assumes that the terms -- @ts@ all have type @A@. buildList :: TCM ([Term] -> Term) buildList = do nil' <- primNil cons' <- primCons let nil = nil' cons x xs = cons' `applys` [x, xs] return $ foldr cons nil instance ToTerm a => ToTerm [a] where toTerm = do mkList <- buildList fromA <- toTerm return $ mkList . map fromA -- From Haskell value to Agda term type FromTermFunction a = Arg Term -> ReduceM (Reduced (MaybeReduced (Arg Term)) a) class FromTerm a where fromTerm :: TCM (FromTermFunction a) instance FromTerm Integer where fromTerm = do Con pos _ [] <- primIntegerPos Con negsuc _ [] <- primIntegerNegSuc toNat <- fromTerm :: TCM (FromTermFunction Nat) return $ \ v -> do b <- reduceB' v let v' = ignoreBlocking b arg = (<$ v') case unArg (ignoreBlocking b) of Con c ci [Apply u] | c == pos -> redBind (toNat u) (\ u' -> notReduced $ arg $ Con c ci [Apply $ ignoreReduced u']) $ \ n -> redReturn $ fromIntegral n | c == negsuc -> redBind (toNat u) (\ u' -> notReduced $ arg $ Con c ci [Apply $ ignoreReduced u']) $ \ n -> redReturn $ fromIntegral $ -n - 1 _ -> return $ NoReduction (reduced b) instance FromTerm Nat where fromTerm = fromLiteral $ \l -> case l of LitNat _ n -> Just $ fromInteger n _ -> Nothing instance FromTerm Word64 where fromTerm = fromLiteral $ \ case LitWord64 _ n -> Just n _ -> Nothing instance FromTerm Lvl where fromTerm = fromReducedTerm $ \l -> case l of Level (Max [ClosedLevel n]) -> Just $ Lvl n _ -> Nothing instance FromTerm Double where fromTerm = fromLiteral $ \l -> case l of LitFloat _ x -> Just x _ -> Nothing instance FromTerm Char where fromTerm = fromLiteral $ \l -> case l of LitChar _ c -> Just c _ -> Nothing instance FromTerm Str where fromTerm = fromLiteral $ \l -> case l of LitString _ s -> Just $ Str s _ -> Nothing instance FromTerm QName where fromTerm = fromLiteral $ \l -> case l of LitQName _ x -> Just x _ -> Nothing instance FromTerm MetaId where fromTerm = fromLiteral $ \l -> case l of LitMeta _ _ x -> Just x _ -> Nothing instance FromTerm Bool where fromTerm = do true <- primTrue false <- primFalse fromReducedTerm $ \t -> case t of _ | t =?= true -> Just True | t =?= false -> Just False | otherwise -> Nothing where a =?= b = a === b Def x [] === Def y [] = x == y Con x _ [] === Con y _ [] = x == y Var n [] === Var m [] = n == m _ === _ = False instance (ToTerm a, FromTerm a) => FromTerm [a] where fromTerm = do nil' <- primNil cons' <- primCons nil <- isCon nil' cons <- isCon cons' toA <- fromTerm fromA <- toTerm return $ mkList nil cons toA fromA where isCon (Lam _ b) = isCon $ absBody b isCon (Con c _ _)= return c isCon v = __IMPOSSIBLE__ mkList nil cons toA fromA t = do b <- reduceB' t let t = ignoreBlocking b let arg = (<$ t) case unArg t of Con c ci [] | c == nil -> return $ YesReduction NoSimplification [] Con c ci es | c == cons, Just [x,xs] <- allApplyElims es -> redBind (toA x) (\x' -> notReduced $ arg $ Con c ci (map Apply [ignoreReduced x',xs])) $ \y -> redBind (mkList nil cons toA fromA xs) (fmap $ \xs' -> arg $ Con c ci (map Apply [defaultArg $ fromA y, xs'])) $ \ys -> redReturn (y : ys) _ -> return $ NoReduction (reduced b) -- | Conceptually: @redBind m f k = either (return . Left . f) k =<< m@ redBind :: ReduceM (Reduced a a') -> (a -> b) -> (a' -> ReduceM (Reduced b b')) -> ReduceM (Reduced b b') redBind ma f k = do r <- ma case r of NoReduction x -> return $ NoReduction $ f x YesReduction _ y -> k y redReturn :: a -> ReduceM (Reduced a' a) redReturn = return . YesReduction YesSimplification fromReducedTerm :: (Term -> Maybe a) -> TCM (FromTermFunction a) fromReducedTerm f = return $ \t -> do b <- reduceB' t case f $ unArg (ignoreBlocking b) of Just x -> return $ YesReduction NoSimplification x Nothing -> return $ NoReduction (reduced b) fromLiteral :: (Literal -> Maybe a) -> TCM (FromTermFunction a) fromLiteral f = fromReducedTerm $ \t -> case t of Lit lit -> f lit _ -> Nothing requireCubical :: TCM () requireCubical = do cubical <- optCubical <$> pragmaOptions unless cubical $ typeError $ GenericError "Missing option --cubical" primINeg' :: TCM PrimitiveImpl primINeg' = do requireCubical t <- elInf primInterval --> elInf primInterval return $ PrimImpl t $ primFun __IMPOSSIBLE__ 1 $ \ ts -> do case ts of [x] -> do unview <- intervalUnview' view <- intervalView' sx <- reduceB' x ix <- intervalView (unArg $ ignoreBlocking sx) let ineg :: Arg Term -> Arg Term ineg = fmap (unview . f . view) f ix = case ix of IZero -> IOne IOne -> IZero IMin x y -> IMax (ineg x) (ineg y) IMax x y -> IMin (ineg x) (ineg y) INeg x -> OTerm (unArg x) OTerm t -> INeg (Arg defaultArgInfo t) case ix of OTerm t -> return $ NoReduction [reduced sx] _ -> redReturn (unview $ f ix) _ -> __IMPOSSIBLE__ primDepIMin' :: TCM PrimitiveImpl primDepIMin' = do requireCubical t <- runNamesT [] $ nPi' "φ" (elInf $ cl primInterval) $ \ φ -> (pPi' "o" φ $ \ o -> elInf $ cl primInterval) --> elInf (cl primInterval) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 2 $ \ ts -> do case ts of [x,y] -> do sx <- reduceB' x ix <- intervalView (unArg $ ignoreBlocking sx) itisone <- getTerm "primDepIMin" builtinItIsOne case ix of IZero -> redReturn =<< intervalUnview IZero IOne -> redReturn =<< (pure (unArg y) <@> pure itisone) _ -> do sy <- reduceB' y iy <- intervalView =<< reduce' =<< (pure (unArg $ ignoreBlocking sy) <@> pure itisone) case iy of IZero -> redReturn =<< intervalUnview IZero IOne -> redReturn (unArg $ ignoreBlocking sx) _ -> return $ NoReduction [reduced sx, reduced sy] _ -> __IMPOSSIBLE__ primIBin :: IntervalView -> IntervalView -> TCM PrimitiveImpl primIBin unit absorber = do requireCubical t <- elInf primInterval --> elInf primInterval --> elInf primInterval return $ PrimImpl t $ primFun __IMPOSSIBLE__ 2 $ \ ts -> do case ts of [x,y] -> do sx <- reduceB' x ix <- intervalView (unArg $ ignoreBlocking sx) case ix of ix | ix ==% absorber -> redReturn =<< intervalUnview absorber ix | ix ==% unit -> return $ YesReduction YesSimplification (unArg y) _ -> do sy <- reduceB' y iy <- intervalView (unArg $ ignoreBlocking sy) case iy of iy | iy ==% absorber -> redReturn =<< intervalUnview absorber iy | iy ==% unit -> return $ YesReduction YesSimplification (unArg x) _ -> return $ NoReduction [reduced sx,reduced sy] _ -> __IMPOSSIBLE__ where (==%) IZero IZero = True (==%) IOne IOne = True (==%) _ _ = False primIMin' :: TCM PrimitiveImpl primIMin' = primIBin IOne IZero primIMax' :: TCM PrimitiveImpl primIMax' = primIBin IZero IOne imax :: HasBuiltins m => m Term -> m Term -> m Term imax x y = do x' <- x y' <- y intervalUnview (IMax (argN x') (argN y')) imin :: HasBuiltins m => m Term -> m Term -> m Term imin x y = do x' <- x y' <- y intervalUnview (IMin (argN x') (argN y')) -- ∀ {a}{c}{A : Set a}{x : A}(C : ∀ y → Id x y → Set c) → C x (conid i1 (\ i → x)) → ∀ {y} (p : Id x y) → C y p primIdJ :: TCM PrimitiveImpl primIdJ = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "c" (el $ cl primLevel) $ \ c -> hPi' "A" (sort . tmSort <$> a) $ \ bA -> hPi' "x" (el' a bA) $ \ x -> nPi' "C" (nPi' "y" (el' a bA) $ \ y -> (el' a $ cl primId <#> a <#> bA <@> x <@> y) --> (sort . tmSort <$> c)) $ \ bC -> (el' c $ bC <@> x <@> (cl primConId <#> a <#> bA <#> x <#> x <@> cl primIOne <@> lam "i" (\ _ -> x))) --> (hPi' "y" (el' a bA) $ \ y -> nPi' "p" (el' a $ cl primId <#> a <#> bA <@> x <@> y) $ \ p -> el' c $ bC <@> y <@> p) conidn <- getBuiltinName builtinConId conid <- primConId -- TODO make a kit return $ PrimImpl t $ primFun __IMPOSSIBLE__ 8 $ \ ts -> do unview <- intervalUnview' let imax x y = do x' <- x; y' <- y; pure $ unview (IMax (argN x') (argN y')) imin x y = do x' <- x; y' <- y; pure $ unview (IMin (argN x') (argN y')) ineg x = unview . INeg . argN <$> x mcomp <- getTerm' "primComp" case ts of [la,lc,a,x,c,d,y,eq] -> do seq <- reduceB' eq case unArg $ ignoreBlocking $ seq of (Def q [Apply la,Apply a,Apply x,Apply y,Apply phi,Apply p]) | Just q == conidn, Just comp <- mcomp -> do redReturn $ runNames [] $ do [lc,c,d,la,a,x,y,phi,p] <- mapM (open . unArg) [lc,c,d,la,a,x,y,phi,p] let w i = do [x,y,p,i] <- sequence [x,y,p,i] pure $ p `applyE` [IApply x y i] pure comp <#> (lam "i" $ \ _ -> lc) <@> (lam "i" $ \ i -> c <@> (w i) <@> (pure conid <#> la <#> a <#> x <#> (w i) <@> (phi `imax` ineg i) <@> (lam "j" $ \ j -> w $ imin i j))) <@> phi <@> (lam "i" $ \ _ -> nolam <$> d) -- TODO block <@> d _ -> return $ NoReduction $ map notReduced [la,lc,a,x,c,d,y] ++ [reduced seq] _ -> __IMPOSSIBLE__ primIdElim' :: TCM PrimitiveImpl primIdElim' = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "c" (el $ cl primLevel) $ \ c -> hPi' "A" (sort . tmSort <$> a) $ \ bA -> hPi' "x" (el' a bA) $ \ x -> nPi' "C" (nPi' "y" (el' a bA) $ \ y -> (el' a $ cl primId <#> a <#> bA <@> x <@> y) --> (sort . tmSort <$> c)) $ \ bC -> (nPi' "φ" (elInf $ cl primInterval) $ \ phi -> nPi' "y" (elInf $ cl primSub <#> a <@> bA <@> phi <@> (lam "o" $ const x)) $ \ y -> let pathxy = (cl primPath <#> a <@> bA <@> x <@> oucy) oucy = (cl primSubOut <#> a <#> bA <#> phi <#> (lam "o" $ const x) <@> y) reflx = (lam "o" $ \ _ -> lam "i" $ \ _ -> x) -- TODO Andrea, should block on o in nPi' "w" (elInf $ cl primSub <#> a <@> pathxy <@> phi <@> reflx) $ \ w -> let oucw = (cl primSubOut <#> a <#> pathxy <#> phi <#> reflx <@> w) in el' c $ bC <@> oucy <@> (cl primConId <#> a <#> bA <#> x <#> oucy <@> phi <@> oucw)) --> (hPi' "y" (el' a bA) $ \ y -> nPi' "p" (el' a $ cl primId <#> a <#> bA <@> x <@> y) $ \ p -> el' c $ bC <@> y <@> p) conid <- primConId sin <- primSubIn path <- primPath return $ PrimImpl t $ primFun __IMPOSSIBLE__ 8 $ \ ts -> do case ts of [a,c,bA,x,bC,f,y,p] -> do sp <- reduceB' p case unArg $ ignoreBlocking sp of Def q [Apply _a, Apply _bA, Apply _x, Apply _y, Apply phi , Apply w] -> do y' <- return $ sin `apply` [a,bA ,phi,argN $ unArg y] w' <- return $ sin `apply` [a,argN $ path `apply` [a,bA,x,y],phi,argN $ unArg w] redReturn $ unArg f `apply` [phi, defaultArg y', defaultArg w'] _ -> return $ NoReduction $ map notReduced [a,c,bA,x,bC,f,y] ++ [reduced sp] _ -> __IMPOSSIBLE__ primPOr :: TCM PrimitiveImpl primPOr = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> nPi' "i" (elInf $ cl primInterval) $ \ i -> nPi' "j" (elInf $ cl primInterval) $ \ j -> hPi' "A" (pPi' "o" (imax i j) $ \o -> el' (cl primLevelSuc <@> a) (Sort . tmSort <$> a)) $ \ bA -> ((pPi' "i1" i $ \ i1 -> el' a $ bA <..> (cl primIsOne1 <@> i <@> j <@> i1))) --> ((pPi' "j1" j $ \ j1 -> el' a $ bA <..> (cl primIsOne2 <@> i <@> j <@> j1))) --> (pPi' "o" (imax i j) $ \ o -> el' a $ bA <..> o) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 6 $ \ ts -> do case ts of [l,i,j,a,u,v] -> do si <- reduceB' i vi <- intervalView $ unArg $ ignoreBlocking si case vi of IOne -> redReturn (unArg u) IZero -> redReturn (unArg v) _ -> do sj <- reduceB' j vj <- intervalView $ unArg $ ignoreBlocking sj case vj of IOne -> redReturn (unArg v) IZero -> redReturn (unArg u) _ -> return $ NoReduction [notReduced l,reduced si,reduced sj,notReduced a,notReduced u,notReduced v] _ -> __IMPOSSIBLE__ primPartial' :: TCM PrimitiveImpl primPartial' = do requireCubical t <- runNamesT [] $ (hPi' "a" (el $ cl primLevel) $ \ a -> nPi' "φ" (elInf (cl primInterval)) $ \ _ -> nPi' "A" (sort . tmSort <$> a) $ \ bA -> return (sort $ Inf)) isOne <- primIsOne return $ PrimImpl t $ primFun __IMPOSSIBLE__ 3 $ \ ts -> do case ts of [l,phi,a] -> do (El s (Pi d b)) <- runNamesT [] $ do [l,a,phi] <- mapM (open . unArg) [l,a,phi] (elInf $ pure isOne <@> phi) --> el' l a redReturn $ Pi (setRelevance Irrelevant $ d { domFinite = True }) b _ -> __IMPOSSIBLE__ primPartialP' :: TCM PrimitiveImpl primPartialP' = do requireCubical t <- runNamesT [] $ (hPi' "a" (el $ cl primLevel) $ \ a -> nPi' "φ" (elInf (cl primInterval)) $ \ phi -> nPi' "A" (pPi' "o" phi $ \ _ -> el' (cl primLevelSuc <@> a) (Sort . tmSort <$> a)) $ \ bA -> return (sort $ Inf)) let toFinitePi :: Type -> Term toFinitePi (El _ (Pi d b)) = Pi (setRelevance Irrelevant $ d { domFinite = True }) b toFinitePi _ = __IMPOSSIBLE__ v <- runNamesT [] $ lam "a" $ \ l -> lam "φ" $ \ phi -> lam "A" $ \ a -> toFinitePi <$> nPi' "p" (elInf $ cl primIsOne <@> phi) (\ p -> el' l (a <@> p)) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 0 $ \ _ -> redReturn v primSubOut' :: TCM PrimitiveImpl primSubOut' = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "A" (el' (cl primLevelSuc <@> a) (Sort . tmSort <$> a)) $ \ bA -> hPi' "φ" (elInf $ cl primInterval) $ \ phi -> hPi' "u" (elInf $ cl primPartial <#> a <@> phi <@> bA) $ \ u -> elInf (cl primSub <#> a <@> bA <@> phi <@> u) --> el' (Sort . tmSort <$> a) bA return $ PrimImpl t $ primFun __IMPOSSIBLE__ 5 $ \ ts -> do case ts of [a,bA,phi,u,x] -> do view <- intervalView' sphi <- reduceB' phi case view $ unArg $ ignoreBlocking sphi of IOne -> redReturn =<< (return (unArg u) <..> (getTerm builtinSubOut builtinItIsOne)) _ -> do sx <- reduceB' x mSubIn <- getBuiltinName' builtinSubIn case unArg $ ignoreBlocking $ sx of Def q [_,_,_, Apply t] | Just q == mSubIn -> redReturn (unArg t) _ -> return $ NoReduction $ map notReduced [a,bA] ++ [reduced sphi, notReduced u, reduced sx] _ -> __IMPOSSIBLE__ primIdFace' :: TCM PrimitiveImpl primIdFace' = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "A" (sort . tmSort <$> a) $ \ bA -> hPi' "x" (el' a bA) $ \ x -> hPi' "y" (el' a bA) $ \ y -> (el' a $ cl primId <#> a <#> bA <@> x <@> y) --> elInf (cl primInterval) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 5 $ \ ts -> do case ts of [l,bA,x,y,t] -> do st <- reduceB' t mConId <- getName' builtinConId case unArg (ignoreBlocking st) of Def q [_,_,_,_, Apply phi,_] | Just q == mConId -> redReturn (unArg phi) _ -> return $ NoReduction $ map notReduced [l,bA,x,y] ++ [reduced st] _ -> __IMPOSSIBLE__ primIdPath' :: TCM PrimitiveImpl primIdPath' = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "A" (sort . tmSort <$> a) $ \ bA -> hPi' "x" (el' a bA) $ \ x -> hPi' "y" (el' a bA) $ \ y -> (el' a $ cl primId <#> a <#> bA <@> x <@> y) --> (el' a $ cl primPath <#> a <#> bA <@> x <@> y) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 5 $ \ ts -> do case ts of [l,bA,x,y,t] -> do st <- reduceB' t mConId <- getName' builtinConId case unArg (ignoreBlocking st) of Def q [_,_,_,_,_,Apply w] | Just q == mConId -> redReturn (unArg w) _ -> return $ NoReduction $ map notReduced [l,bA,x,y] ++ [reduced st] _ -> __IMPOSSIBLE__ primTrans' :: TCM PrimitiveImpl primTrans' = do requireCubical t <- runNamesT [] $ hPi' "a" (elInf (cl primInterval) --> (el $ cl primLevel)) $ \ a -> nPi' "A" (nPi' "i" (elInf (cl primInterval)) $ \ i -> (sort . tmSort <$> (a <@> i))) $ \ bA -> nPi' "φ" (elInf $ cl primInterval) $ \ phi -> (el' (a <@> cl primIZero) (bA <@> cl primIZero) --> el' (a <@> cl primIOne) (bA <@> cl primIOne)) return $ PrimImpl t $ PrimFun __IMPOSSIBLE__ 4 $ \ ts nelims -> do primTransHComp DoTransp ts nelims primHComp' :: TCM PrimitiveImpl primHComp' = do requireCubical t <- runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "A" (sort . tmSort <$> a) $ \ bA -> hPi' "φ" (elInf $ cl primInterval) $ \ phi -> (nPi' "i" (elInf $ cl primInterval) $ \ i -> pPi' "o" phi $ \ _ -> el' a bA) --> (el' a bA --> el' a bA) return $ PrimImpl t $ PrimFun __IMPOSSIBLE__ 5 $ \ ts nelims -> do primTransHComp DoHComp ts nelims data TranspOrHComp = DoTransp | DoHComp deriving (Eq,Show) cmdToName :: TranspOrHComp -> String cmdToName DoTransp = builtinTrans cmdToName DoHComp = builtinHComp data FamilyOrNot a = IsFam {famThing :: a} | IsNot {famThing :: a} deriving (Eq,Show,Functor,Foldable,Traversable) instance Reduce a => Reduce (FamilyOrNot a) where reduceB' x = traverse id <$> traverse reduceB' x reduce' x = traverse reduce' x primTransHComp :: TranspOrHComp -> [Arg Term] -> Int -> ReduceM (Reduced MaybeReducedArgs Term) primTransHComp cmd ts nelims = do (l,bA,phi,u,u0) <- case (cmd,ts) of (DoTransp, [l,bA,phi, u0]) -> do -- u <- runNamesT [] $ do -- u0 <- open $ unArg u0 -- defaultArg <$> (ilam "o" $ \ _ -> u0) return $ (IsFam l,IsFam bA,phi,Nothing,u0) (DoHComp, [l,bA,phi,u,u0]) -> do -- [l,bA] <- runNamesT [] $ do -- forM [l,bA] $ \ a -> do -- let info = argInfo a -- a <- open $ unArg a -- Arg info <$> (lam "i" $ \ _ -> a) return $ (IsNot l,IsNot bA,phi,Just u,u0) _ -> __IMPOSSIBLE__ sphi <- reduceB' phi vphi <- intervalView $ unArg $ ignoreBlocking sphi let clP s = getTerm (cmdToName cmd) s -- WORK case vphi of IOne -> redReturn =<< case u of -- cmd == DoComp Just u -> runNamesT [] $ do u <- open (unArg u) u <@> clP builtinIOne <..> clP builtinItIsOne -- cmd == DoTransp Nothing -> return $ unArg u0 _ -> do let fallback' sc = do u' <- case u of -- cmd == DoComp Just u -> (:[]) <$> case vphi of IZero -> fmap (reduced . notBlocked . argN) . runNamesT [] $ do [l,c] <- mapM (open . unArg) [famThing l, ignoreBlocking sc] lam "i" $ \ i -> clP builtinIsOneEmpty <#> l <#> (ilam "o" $ \ _ -> c) _ -> return (notReduced u) -- cmd == DoTransp Nothing -> return [] return $ NoReduction $ [notReduced (famThing l), reduced sc, reduced sphi] ++ u' ++ [notReduced u0] sbA <- reduceB' bA t <- case unArg <$> ignoreBlocking sbA of IsFam (Lam _info t) -> Just . fmap IsFam <$> reduceB' (absBody t) IsFam _ -> return Nothing IsNot t -> return . Just . fmap IsNot $ (t <$ sbA) case t of Nothing -> fallback' (famThing <$> sbA) Just st -> do let fallback = fallback' (fmap famThing $ st *> sbA) t = ignoreBlocking st mGlue <- getPrimitiveName' builtinGlue mId <- getBuiltinName' builtinId pathV <- pathView' case famThing t of MetaV m _ -> fallback' (fmap famThing $ Blocked m () *> sbA) -- absName t instead of "i" Pi a b | nelims > 0 -> maybe fallback redReturn =<< compPi cmd "i" ((a,b) <$ t) (ignoreBlocking sphi) u u0 | otherwise -> fallback Sort (Type l) -> compSort cmd fallback phi u u0 (l <$ t) Def q [Apply la, Apply lb, Apply bA, Apply phi', Apply bT, Apply e] | Just q == mGlue -> do compGlue cmd phi u u0 ((la, lb, bA, phi', bT, e) <$ t) -- Path/PathP d | PathType _ _ _ bA x y <- pathV (El __DUMMY_SORT__ d) -> do if nelims > 0 then compPathP cmd sphi u u0 l ((bA, x, y) <$ t) else fallback Def q [Apply _ , Apply bA , Apply x , Apply y] | Just q == mId -> do maybe fallback return =<< compId cmd sphi u u0 l ((bA, x, y) <$ t) Def q es -> do info <- getConstInfo q let lam_i = Lam defaultArgInfo . Abs "i" case theDef info of r@Record{recComp = kit} | nelims > 0, Just as <- allApplyElims es, DoTransp <- cmd, Just transpR <- nameOfTransp kit -> if recPars r == 0 then redReturn $ unArg u0 else redReturn $ (Def transpR []) `apply` (map (fmap lam_i) as ++ [ignoreBlocking sphi,u0]) | nelims > 0, Just as <- allApplyElims es, DoHComp <- cmd, Just hCompR <- nameOfHComp kit -> redReturn $ (Def hCompR []) `apply` (as ++ [ignoreBlocking sphi,fromMaybe __IMPOSSIBLE__ u,u0]) | Just as <- allApplyElims es, [] <- recFields r -> compData False (recPars r) cmd l (as <$ t) sbA sphi u u0 Datatype{dataPars = pars, dataIxs = ixs, dataPathCons = pcons} | and [null pcons | DoHComp <- [cmd]], Just as <- allApplyElims es -> compData (not $ null $ pcons) (pars+ixs) cmd l (as <$ t) sbA sphi u u0 -- postulates with no arguments do not need to transport. Axiom{} | [] <- es, DoTransp <- cmd -> redReturn $ unArg u0 _ -> fallback _ -> fallback where compSort DoTransp fallback phi Nothing u0 (IsFam l) = do -- TODO should check l is constant redReturn $ unArg u0 compSort DoHComp fallback phi (Just u) u0 (IsNot l) = do let getTermLocal = getTerm (builtinHComp ++ " for Set") checkPrims <- all isJust <$> sequence [getTerm' builtinPathToEquiv, getTerm' builtinGlue] if not checkPrims then fallback else (redReturn =<<) . runNamesT [] $ do p2equiv <- getTermLocal builtinPathToEquiv tGlue <- getTermLocal builtinGlue tINeg <- getTermLocal builtinINeg io <- getTermLocal builtinIOne l <- open $ Level l [phi,e,u0] <- mapM (open . unArg) [phi,u,u0] let ineg r = pure tINeg <@> r pure tGlue <#> l <#> l <@> u0 <#> phi <@> (e <@> pure io) <@> ilam "o" (\ o -> pure p2equiv <#> (lam "i" $ \ i -> l) <@> (ilam "i" $ \ i -> e <@> ineg i <@> o)) compSort _ fallback phi u u0 _ = __IMPOSSIBLE__ compGlue DoHComp psi (Just u) u0 (IsNot (la, lb, bA, phi, bT, e)) = do let getTermLocal = getTerm $ (builtinHComp ++ " for " ++ builtinGlue) tPOr <- getTermLocal "primPOr" tIMax <- getTermLocal builtinIMax tIMin <- getTermLocal builtinIMin tINeg <- getTermLocal builtinINeg tHComp <- getTermLocal builtinHComp tEFun <- getTermLocal builtinEquivFun tglue <- getTermLocal builtin_glue tunglue <- getTermLocal builtin_unglue io <- getTermLocal builtinIOne (redReturn =<<) . runNamesT [] $ do [psi, u, u0] <- mapM (open . unArg) [psi, u, u0] [la, lb, bA, phi, bT, e] <- mapM (open . unArg) [la, lb, bA, phi, bT, e] let hfill la bA phi u u0 i = pure tHComp <#> la <#> bA <#> (pure tIMax <@> phi <@> (pure tINeg <@> i)) <@> (lam "j" $ \ j -> pure tPOr <#> la <@> phi <@> (pure tINeg <@> i) <@> (ilam "o" $ \ a -> bA) <@> (ilam "o" $ \ o -> u <@> (pure tIMin <@> i <@> j) <..> o) <@> (ilam "o" $ \ _ -> u0) ) <@> u0 tf i o = hfill lb (bT <..> o) psi u u0 i unglue g = pure tunglue <#> la <#> lb <#> bA <#> phi <#> bT <#> e <@> g a1 = pure tHComp <#> la <#> bA <#> (pure tIMax <@> psi <@> phi) <@> (lam "i" $ \ i -> pure tPOr <#> la <@> psi <@> phi <@> (ilam "_" $ \ _ -> bA) <@> (ilam "o" $ \ o -> unglue (u <@> i <..> o)) <@> (ilam "o" $ \ o -> pure tEFun <#> lb <#> la <#> (bT <..> o) <#> bA <@> (e <..> o) <@> tf i o) ) <@> (unglue u0) t1 = tf (pure io) pure tglue <#> la <#> lb <#> bA <#> phi <#> bT <#> e <@> (ilam "o" $ \ o -> t1 o) <@> a1 compGlue DoTransp psi Nothing u0 (IsFam (la, lb, bA, phi, bT, e)) = do let getTermLocal = getTerm $ (builtinTrans ++ " for " ++ builtinGlue) tPOr <- getTermLocal "primPOr" tIMax <- getTermLocal builtinIMax tIMin <- getTermLocal builtinIMin tINeg <- getTermLocal builtinINeg tHComp <- getTermLocal builtinHComp tTrans <- getTermLocal builtinTrans tForall <- getTermLocal builtinFaceForall tEFun <- getTermLocal builtinEquivFun tEProof <- getTermLocal builtinEquivProof tglue <- getTermLocal builtin_glue tunglue <- getTermLocal builtin_unglue io <- getTermLocal builtinIOne iz <- getTermLocal builtinIZero tLMax <- getTermLocal builtinLevelMax tPath <- getTermLocal builtinPath kit <- fromMaybe __IMPOSSIBLE__ <$> getSigmaKit (redReturn =<<) . runNamesT [] $ do let ineg j = pure tINeg <@> j imax i j = pure tIMax <@> i <@> j imin i j = pure tIMin <@> i <@> j -- First define a "ghcomp" version of gcomp. Normal comp looks like: -- -- comp^i A [ phi -> u ] u0 = hcomp^i A(1/i) [ phi -> forward A i u ] (forward A 0 u0) -- -- So for "gcomp" we compute: -- -- gcomp^i A [ phi -> u ] u0 = hcomp^i A(1/i) [ phi -> forward A i u, ~ phi -> forward A 0 u0 ] (forward A 0 u0) -- -- The point of this is that gcomp does not produce any empty -- systems (if phi = 0 it will reduce to "forward A 0 u". gcomp <- do let forward la bA r u = pure tTrans <#> (lam "i" $ \ i -> la <@> (i `imax` r)) <@> (lam "i" $ \ i -> bA <@> (i `imax` r)) <@> r <@> u return $ \ la bA phi u u0 -> pure tHComp <#> (la <@> pure io) <#> (bA <@> pure io) <#> imax phi (ineg phi) <@> (lam "i" $ \ i -> pure tPOr <#> (la <@> i) <@> phi <@> ineg phi <@> (ilam "o" $ \ a -> bA <@> i) <@> (ilam "o" $ \ o -> forward la bA i (u <@> i <..> o)) <@> (ilam "o" $ \ o -> forward la bA (pure iz) u0)) <@> forward la bA (pure iz) u0 let transpFill la bA phi u0 i = pure tTrans <#> (ilam "j" $ \ j -> la <@> imin i j) <@> (ilam "j" $ \ j -> bA <@> imin i j) <@> (imax phi (ineg i)) <@> u0 [psi,u0] <- mapM (open . unArg) [psi,u0] glue1 <- do g <- open $ (tglue `apply`) . map (setHiding Hidden) . map (subst 0 io) $ [la, lb, bA, phi, bT, e] return $ \ t a -> g <@> t <@> a unglue0 <- do ug <- open $ (tunglue `apply`) . map (setHiding Hidden) . map (subst 0 iz) $ [la, lb, bA, phi, bT, e] return $ \ a -> ug <@> a [la, lb, bA, phi, bT, e] <- mapM (\ a -> open . runNames [] $ (lam "i" $ const (pure $ unArg a))) [la, lb, bA, phi, bT, e] let tf i o = transpFill lb (lam "i" $ \ i -> bT <@> i <..> o) psi u0 i t1 o = tf (pure io) o a0 = unglue0 u0 -- compute "forall. phi" forallphi = pure tForall <@> phi -- a1 with gcomp a1 = gcomp la bA (imax psi forallphi) (lam "i" $ \ i -> pure tPOr <#> (la <@> i) <@> psi <@> forallphi <@> (ilam "o" $ \ a -> bA <@> i) <@> (ilam "o" $ \ _ -> a0) <@> (ilam "o" $ \ o -> pure tEFun <#> (lb <@> i) <#> (la <@> i) <#> (bT <@> i <..> o) <#> (bA <@> i) <@> (e <@> i <..> o) <@> (tf i o))) a0 max l l' = pure tLMax <@> l <@> l' sigCon x y = pure (Con (sigmaCon kit) ConOSystem []) <@> x <@> y w i o = pure tEFun <#> (lb <@> i) <#> (la <@> i) <#> (bT <@> i <..> o) <#> (bA <@> i) <@> (e <@> i <..> o) fiber la lb bA bB f b = (pure (Def (sigmaName kit) []) <#> la <#> lb <@> bA <@> (lam "a" $ \ a -> pure tPath <#> lb <#> bB <@> (f <@> a) <@> b)) -- We don't have to do anything special for "~ forall. phi" -- here (to implement "ghcomp") as it is taken care off by -- tEProof in t1'alpha below pe o = -- o : [ φ 1 ] pure tPOr <#> max (la <@> pure io) (lb <@> pure io) <@> psi <@> forallphi <@> (ilam "o" $ \ _ -> fiber (lb <@> pure io) (la <@> pure io) (bT <@> (pure io) <..> o) (bA <@> pure io) (w (pure io) o) a1) <@> (ilam "o" $ \ o -> sigCon u0 (lam "_" $ \ _ -> a1)) <@> (ilam "o" $ \ o -> sigCon (t1 o) (lam "_" $ \ _ -> a1)) -- "ghcomp" is implemented in the proof of tEProof -- (see src/data/lib/prim/Agda/Builtin/Cubical/Glue.agda) t1'alpha o = -- o : [ φ 1 ] pure tEProof <#> (lb <@> pure io) <#> (la <@> pure io) <@> (bT <@> pure io <..> o) <@> (bA <@> pure io) <@> (e <@> pure io <..> o) <@> a1 <@> forallphi <@> pe o -- TODO: optimize? t1' o = t1'alpha o <&> (`applyE` [Proj ProjSystem (sigmaFst kit)]) alpha o = t1'alpha o <&> (`applyE` [Proj ProjSystem (sigmaSnd kit)]) a1' = pure tHComp <#> (la <@> pure io) <#> (bA <@> pure io) <#> (imax (phi <@> pure io) psi) <@> (lam "j" $ \ j -> pure tPOr <#> (la <@> pure io) <@> (phi <@> pure io) <@> psi <@> (ilam "o" $ \ _ -> bA <@> pure io) <@> (ilam "o" $ \ o -> alpha o <@@> (w (pure io) o <@> t1' o,a1,j)) <@> (ilam "o" $ \ _ -> a1) ) <@> a1 glue1 (ilam "o" t1') a1' compGlue cmd phi u u0 _ = __IMPOSSIBLE__ compPi :: TranspOrHComp -> ArgName -> FamilyOrNot (Dom Type, Abs Type) -- Γ , i : I -> Arg Term -- Γ -> Maybe (Arg Term) -- Γ -> Arg Term -- Γ -> ReduceM (Maybe Term) compPi cmd t ab phi u u0 = do let getTermLocal = getTerm $ cmdToName cmd ++ " for function types" tTrans <- getTermLocal builtinTrans tHComp <- getTermLocal builtinHComp tINeg <- getTermLocal builtinINeg tIMax <- getTermLocal builtinIMax iz <- getTermLocal builtinIZero let toLevel' t = do s <- reduce $ getSort t case s of (Type l) -> return (Just l) _ -> return Nothing toLevel t = fromMaybe __IMPOSSIBLE__ <$> toLevel' t -- make sure the codomain has a level. caseMaybeM (toLevel' . absBody . snd . famThing $ ab) (return Nothing) $ \ _ -> do runNamesT [] $ do labA <- do let (x,f) = case ab of IsFam (a,_) -> (a, \ a -> runNames [] $ (lam "i" $ const (pure a))) IsNot (a,_) -> (a, id) lx <- toLevel' x caseMaybe lx (return Nothing) $ \ lx -> Just <$> mapM (open . f) [Level lx, unEl . unDom $ x] caseMaybe labA (return Nothing) $ \ [la,bA] -> Just <$> do [phi, u0] <- mapM (open . unArg) [phi, u0] u <- traverse open (unArg <$> u) glam (getArgInfo (fst $ famThing ab)) (absName $ snd $ famThing ab) $ \ u1 -> do case (cmd, ab, u) of (DoHComp, IsNot (a , b), Just u) -> do bT <- (raise 1 b `absApp`) <$> u1 let v = u1 pure tHComp <#> (Level <$> toLevel bT) <#> (pure $ unEl $ bT) <#> phi <@> (lam "i" $ \ i -> ilam "o" $ \ o -> gApply (getHiding a) (u <@> i <..> o) v) <@> (gApply (getHiding a) u0 v) (DoTransp, IsFam (a , b), Nothing) -> do let v i = do let iOrNot j = pure tIMax <@> i <@> (pure tINeg <@> j) pure tTrans <#> (lam "j" $ \ j -> la <@> iOrNot j) <@> (lam "j" $ \ j -> bA <@> iOrNot j) <@> (pure tIMax <@> phi <@> i) <@> u1 -- Γ , u1 : A[i1] , i : I bB v = (consS v $ liftS 1 $ raiseS 1) `applySubst` (absBody b {- Γ , i : I , x : A[i] -}) tLam = Lam defaultArgInfo bT <- bind "i" $ \ i -> bB <$> v i -- Γ , u1 : A[i1] (pure tTrans <#> (tLam <$> traverse (fmap Level . toLevel) bT) <@> (pure . tLam $ unEl <$> bT) <@> phi <@> gApply (getHiding a) u0 (v (pure iz))) (_,_,_) -> __IMPOSSIBLE__ compPathP cmd@DoHComp sphi (Just u) u0 (IsNot l) (IsNot (bA,x,y)) = do let getTermLocal = getTerm $ cmdToName cmd ++ " for path types" tHComp <- getTermLocal builtinHComp tINeg <- getTermLocal builtinINeg tIMax <- getTermLocal builtinIMax tOr <- getTermLocal "primPOr" let ineg j = pure tINeg <@> j imax i j = pure tIMax <@> i <@> j redReturn . runNames [] $ do [l,u,u0] <- mapM (open . unArg) [l,u,u0] phi <- open . unArg . ignoreBlocking $ sphi [bA, x, y] <- mapM (open . unArg) [bA, x, y] lam "j" $ \ j -> pure tHComp <#> l <#> (bA <@> j) <#> (phi `imax` (ineg j `imax` j)) <@> (lam "i'" $ \ i -> let or f1 f2 = pure tOr <#> l <@> f1 <@> f2 <#> (lam "_" $ \ _ -> bA <@> i) in or phi (ineg j `imax` j) <@> (ilam "o" $ \ o -> u <@> i <..> o <@@> (x, y, j)) -- a0 <@@> (x <@> i, y <@> i, j) <@> (or (ineg j) j <@> (ilam "_" $ const x) <@> (ilam "_" $ const y))) <@> (u0 <@@> (x, y, j)) compPathP cmd@DoTransp sphi Nothing u0 (IsFam l) (IsFam (bA,x,y)) = do -- Γ ⊢ l -- Γ, i ⊢ bA, x, y let getTermLocal = getTerm $ cmdToName cmd ++ " for path types" tINeg <- getTermLocal builtinINeg tIMax <- getTermLocal builtinIMax tOr <- getTermLocal "primPOr" iz <- getTermLocal builtinIZero io <- getTermLocal builtinIOne let ineg j = pure tINeg <@> j imax i j = pure tIMax <@> i <@> j comp <- do tHComp <- getTermLocal builtinHComp tTrans <- getTermLocal builtinTrans let forward la bA r u = pure tTrans <#> (lam "i" $ \ i -> la <@> (i `imax` r)) <@> (lam "i" $ \ i -> bA <@> (i `imax` r)) <@> r <@> u return $ \ la bA phi u u0 -> pure tHComp <#> (la <@> pure io) <#> (bA <@> pure io) <#> phi <@> (lam "i" $ \ i -> ilam "o" $ \ o -> forward la bA i (u <@> i <..> o)) <@> forward la bA (pure iz) u0 redReturn . runNames [] $ do [l,u0] <- mapM (open . unArg) [l,u0] phi <- open . unArg . ignoreBlocking $ sphi [bA, x, y] <- mapM (\ a -> open . runNames [] $ (lam "i" $ const (pure $ unArg a))) [bA, x, y] lam "j" $ \ j -> comp l (lam "i" $ \ i -> bA <@> i <@> j) (phi `imax` (ineg j `imax` j)) (lam "i'" $ \ i -> let or f1 f2 = pure tOr <#> l <@> f1 <@> f2 <#> (lam "_" $ \ _ -> bA <@> i <@> j) in or phi (ineg j `imax` j) <@> (ilam "o" $ \ o -> u0 <@@> (x <@> pure iz, y <@> pure iz, j)) <@> (or (ineg j) j <@> (ilam "_" $ const (x <@> i)) <@> (ilam "_" $ const (y <@> i)))) (u0 <@@> (x <@> pure iz, y <@> pure iz, j)) compPathP _ sphi u a0 _ _ = __IMPOSSIBLE__ compId cmd sphi u a0 l bA_x_y = do let getTermLocal = getTerm $ cmdToName cmd ++ " for " ++ builtinId unview <- intervalUnview' mConId <- getBuiltinName' builtinConId let isConId (Def q _) = Just q == mConId isConId _ = False sa0 <- reduceB' a0 -- wasteful to compute b even when cheaper checks might fail b <- case u of Nothing -> return True Just u -> allComponents unview (unArg . ignoreBlocking $ sphi) (unArg u) isConId case mConId of Just conid | isConId (unArg . ignoreBlocking $ sa0) , b -> (Just <$>) . (redReturn =<<) $ do tHComp <- getTermLocal builtinHComp tTrans <- getTermLocal builtinTrans tIMin <- getTermLocal "primDepIMin" tFace <- getTermLocal "primIdFace" tPath <- getTermLocal "primIdPath" tPathType <- getTermLocal builtinPath runNamesT [] $ do let irrInfo = setRelevance Irrelevant defaultArgInfo let io = pure $ unview IOne iz = pure $ unview IZero conId = pure $ Def conid [] l <- case l of IsFam l -> open . unArg $ l IsNot l -> do open (Lam defaultArgInfo $ NoAbs "_" $ unArg l) [p0] <- mapM (open . unArg) [a0] p <- case u of Just u -> do u <- open . unArg $ u return $ \ i o -> u <@> i <..> o Nothing -> do return $ \ i o -> p0 phi <- open . unArg . ignoreBlocking $ sphi [bA, x, y] <- case bA_x_y of IsFam (bA,x,y) -> mapM (\ a -> open . runNames [] $ (lam "i" $ const (pure $ unArg a))) [bA, x, y] IsNot (bA,x,y) -> forM [bA,x,y] $ \ a -> open (Lam defaultArgInfo $ NoAbs "_" $ unArg a) let eval DoTransp l bA phi _ u0 = pure tTrans <#> l <@> bA <@> phi <@> u0 eval DoHComp l bA phi u u0 = pure tHComp <#> (l <@> io) <#> (bA <@> io) <#> phi <@> u <@> u0 conId <#> (l <@> io) <#> (bA <@> io) <#> (x <@> io) <#> (y <@> io) <@> (pure tIMin <@> phi <@> (ilam "o" $ \ o -> pure tFace <#> (l <@> io) <#> (bA <@> io) <#> (x <@> io) <#> (y <@> io) <@> (p io o))) <@> (eval cmd l (lam "i" $ \ i -> pure tPathType <#> (l <@> i) <#> (bA <@> i) <@> (x <@> i) <@> (y <@> i)) phi (lam "i" $ \ i -> ilam "o" $ \ o -> pure tPath <#> (l <@> i) <#> (bA <@> i) <#> (x <@> i) <#> (y <@> i) <@> (p i o) ) (pure tPath <#> (l <@> iz) <#> (bA <@> iz) <#> (x <@> iz) <#> (y <@> iz) <@> p0) ) _ -> return $ Nothing allComponents unview phi u p = do let boolToI b = if b then unview IOne else unview IZero as <- decomposeInterval phi (and <$>) . forM as $ \ (bs,ts) -> do -- OPTIMIZE: stop at the first False let u' = listS (Map.toAscList $ Map.map boolToI bs) `applySubst` u t <- reduce2Lam u' return $! p t where reduce2Lam t = do t <- reduce' t case lam2Abs t of t -> Reduce.underAbstraction_ t $ \ t -> do t <- reduce' t case lam2Abs t of t -> Reduce.underAbstraction_ t reduce' where lam2Abs (Lam _ t) = t lam2Abs t = Abs "y" (raise 1 t `apply` [argN $ var 0]) compData False _ cmd@DoHComp (IsNot l) (IsNot ps) fsc sphi (Just u) a0 = do let getTermLocal = getTerm $ cmdToName cmd ++ " for data types" let sc = famThing <$> fsc tEmpty <- getTermLocal builtinIsOneEmpty constrForm <- do mz <- getTerm' builtinZero ms <- getTerm' builtinSuc return $ \ t -> fromMaybe t (constructorForm' mz ms t) su <- reduceB' u sa0 <- reduceB' a0 view <- intervalView' unview <- intervalUnview' let f = unArg . ignoreBlocking phi = f sphi u = f su a0 = f sa0 noRed = return $ NoReduction [notReduced l,reduced sc, reduced sphi, reduced su', reduced sa0] where su' = case view phi of IZero -> notBlocked $ argN $ runNames [] $ do [l,c] <- mapM (open . unArg) [l,ignoreBlocking sc] lam "i" $ \ i -> pure tEmpty <#> l <#> (ilam "o" $ \ _ -> c) _ -> su sameConHead h u = allComponents unview phi u $ \ t -> case constrForm t of Con h' _ _ -> h == h' _ -> False case constrForm a0 of Con h _ args -> do ifM (not <$> sameConHead h u) noRed $ do Constructor{ conComp = (cm,_) } <- theDef <$> getConstInfo (conName h) case nameOfHComp cm of Just hcompD -> redReturn $ Def hcompD [] `apply` (ps ++ map argN [phi,u,a0]) Nothing -> noRed _ -> noRed compData _ 0 DoTransp (IsFam l) (IsFam ps) fsc sphi Nothing a0 = redReturn $ unArg a0 compData isHIT _ cmd@DoTransp (IsFam l) (IsFam ps) fsc sphi Nothing a0 = do let getTermLocal = getTerm $ cmdToName cmd ++ " for data types" let sc = famThing <$> fsc mhcompName <- getName' builtinHComp constrForm <- do mz <- getTerm' builtinZero ms <- getTerm' builtinSuc return $ \ t -> fromMaybe t (constructorForm' mz ms t) sa0 <- reduceB' a0 let f = unArg . ignoreBlocking phi = f sphi a0 = f sa0 noRed = return $ NoReduction [notReduced l,reduced sc, reduced sphi, reduced sa0] let lam_i = Lam defaultArgInfo . Abs "i" case constrForm a0 of Con h _ args -> do Constructor{ conComp = (cm,_) } <- theDef <$> getConstInfo (conName h) case nameOfTransp cm of Just transpD -> redReturn $ Def transpD [] `apply` (map (fmap lam_i) ps ++ map argN [phi,a0]) Nothing -> noRed Def q es | isHIT, Just q == mhcompName, Just [_l0,_c0,psi,u,u0] <- allApplyElims es -> do let bC = ignoreBlocking sc hcomp <- getTermLocal builtinHComp transp <- getTermLocal builtinTrans io <- getTermLocal builtinIOne iz <- getTermLocal builtinIZero (redReturn =<<) . runNamesT [] $ do [l,bC,phi,psi,u,u0] <- mapM (open . unArg) [l,bC,ignoreBlocking sphi,psi,u,u0] -- hcomp (sc 1) [psi |-> transp sc phi u] (transp sc phi u0) pure hcomp <#> (l <@> pure io) <#> (bC <@> pure io) <#> psi <@> (lam "j" $ \ j -> ilam "o" $ \ o -> pure transp <#> l <@> bC <@> phi <@> (u <@> j <..> o)) <@> (pure transp <#> l <@> bC <@> phi <@> u0) _ -> noRed compData _ _ _ _ _ _ _ _ _ = __IMPOSSIBLE__ compPO = __IMPOSSIBLE__ primComp :: TCM PrimitiveImpl primComp = do requireCubical t <- runNamesT [] $ hPi' "a" (elInf (cl primInterval) --> (el $ cl primLevel)) $ \ a -> nPi' "A" (nPi' "i" (elInf (cl primInterval)) $ \ i -> (sort . tmSort <$> (a <@> i))) $ \ bA -> nPi' "φ" (elInf $ cl primInterval) $ \ phi -> (nPi' "i" (elInf $ cl primInterval) $ \ i -> pPi' "o" phi $ \ _ -> el' (a <@> i) (bA <@> i)) --> (el' (a <@> cl primIZero) (bA <@> cl primIZero) --> el' (a <@> cl primIOne) (bA <@> cl primIOne)) one <- primItIsOne io <- primIOne return $ PrimImpl t $ PrimFun __IMPOSSIBLE__ 5 $ \ ts nelims -> do case ts of [l,c,phi,u,a0] -> do sphi <- reduceB' phi vphi <- intervalView $ unArg $ ignoreBlocking sphi case vphi of IOne -> redReturn (unArg u `apply` [argN io, argN one]) _ -> do let getTermLocal = getTerm $ builtinComp tIMax <- getTermLocal builtinIMax tINeg <- getTermLocal builtinINeg tHComp <- getTermLocal builtinHComp tTrans <- getTermLocal builtinTrans iz <- getTermLocal builtinIZero (redReturn =<<) . runNamesT [] $ do comp <- do let ineg j = pure tINeg <@> j imax i j = pure tIMax <@> i <@> j let forward la bA r u = pure tTrans <#> (lam "i" $ \ i -> la <@> (i `imax` r)) <@> (lam "i" $ \ i -> bA <@> (i `imax` r)) <@> r <@> u return $ \ la bA phi u u0 -> pure tHComp <#> (la <@> pure io) <#> (bA <@> pure io) <#> phi <@> (lam "i" $ \ i -> ilam "o" $ \ o -> forward la bA i (u <@> i <..> o)) <@> forward la bA (pure iz) u0 [l,c,phi,u,a0] <- mapM (open . unArg) [l,c,phi,u,a0] comp l c phi u a0 _ -> __IMPOSSIBLE__ -- lookupS (listS [(x0,t0)..(xn,tn)]) xi = ti, assuming x0 < .. < xn. listS :: [(Int,Term)] -> Substitution listS ((i,t):ts) = singletonS i t `composeS` listS ts listS [] = IdS primGlue' :: TCM PrimitiveImpl primGlue' = do requireCubical -- Glue' : ∀ {l} (A : Set l) → ∀ φ → (T : Partial (Set a) φ) (f : (PartialP φ \ o → (T o) -> A)) -- ([f] : PartialP φ \ o → isEquiv (T o) A (f o)) → Set l t <- runNamesT [] $ (hPi' "la" (el $ cl primLevel) $ \ la -> hPi' "lb" (el $ cl primLevel) $ \ lb -> nPi' "A" (sort . tmSort <$> la) $ \ a -> hPi' "φ" (elInf $ cl primInterval) $ \ φ -> nPi' "T" (pPi' "o" φ $ \ o -> el' (cl primLevelSuc <@> lb) (Sort . tmSort <$> lb)) $ \ t -> (pPi' "o" φ $ \ o -> el' (cl primLevelMax <@> la <@> lb) $ cl primEquiv <#> lb <#> la <@> (t <@> o) <@> a) --> (sort . tmSort <$> lb)) view <- intervalView' one <- primItIsOne return $ PrimImpl t $ primFun __IMPOSSIBLE__ 6 $ \ts -> case ts of [la,lb,a,phi,t,e] -> do sphi <- reduceB' phi case view $ unArg $ ignoreBlocking $ sphi of IOne -> redReturn $ unArg t `apply` [argN one] _ -> return (NoReduction $ map notReduced [la,lb,a] ++ [reduced sphi] ++ map notReduced [t,e]) _ -> __IMPOSSIBLE__ prim_glue' :: TCM PrimitiveImpl prim_glue' = do requireCubical t <- runNamesT [] $ (hPi' "la" (el $ cl primLevel) $ \ la -> hPi' "lb" (el $ cl primLevel) $ \ lb -> hPi' "A" (sort . tmSort <$> la) $ \ a -> hPi' "φ" (elInf $ cl primInterval) $ \ φ -> hPi' "T" (pPi' "o" φ $ \ o -> el' (cl primLevelSuc <@> lb) (Sort . tmSort <$> lb)) $ \ t -> hPi' "e" (pPi' "o" φ $ \ o -> el' (cl primLevelMax <@> la <@> lb) $ cl primEquiv <#> lb <#> la <@> (t <@> o) <@> a) $ \ e -> (pPi' "o" φ $ \ o -> el' lb (t <@> o)) --> (el' la a --> el' lb (cl primGlue <#> la <#> lb <@> a <#> φ <@> t <@> e))) view <- intervalView' one <- primItIsOne return $ PrimImpl t $ primFun __IMPOSSIBLE__ 8 $ \ts -> case ts of [la,lb,bA,phi,bT,e,t,a] -> do sphi <- reduceB' phi case view $ unArg $ ignoreBlocking $ sphi of IOne -> redReturn $ unArg t `apply` [argN one] _ -> return (NoReduction $ map notReduced [la,lb,bA] ++ [reduced sphi] ++ map notReduced [bT,e,t,a]) _ -> __IMPOSSIBLE__ prim_unglue' :: TCM PrimitiveImpl prim_unglue' = do requireCubical t <- runNamesT [] $ (hPi' "la" (el $ cl primLevel) $ \ la -> hPi' "lb" (el $ cl primLevel) $ \ lb -> hPi' "A" (sort . tmSort <$> la) $ \ a -> hPi' "φ" (elInf $ cl primInterval) $ \ φ -> hPi' "T" (pPi' "o" φ $ \ o -> el' (cl primLevelSuc <@> lb) (Sort . tmSort <$> lb)) $ \ t -> hPi' "e" (pPi' "o" φ $ \ o -> el' (cl primLevelMax <@> la <@> lb) $ cl primEquiv <#> lb <#> la <@> (t <@> o) <@> a) $ \ e -> (el' lb (cl primGlue <#> la <#> lb <@> a <#> φ <@> t <@> e)) --> el' la a) view <- intervalView' one <- primItIsOne mglue <- getPrimitiveName' builtin_glue return $ PrimImpl t $ primFun __IMPOSSIBLE__ 7 $ \ts -> case ts of [la,lb,bA,phi,bT,e,b] -> do sphi <- reduceB' phi case view $ unArg $ ignoreBlocking $ sphi of IOne -> do let argOne = setRelevance Irrelevant $ argN one tEFun <- getTerm builtin_unglue builtinEquivFun redReturn $ tEFun `apply` [lb,la,argH $ unArg bT `apply` [argOne],bA, argN $ unArg e `apply` [argOne],b] _ -> do sb <- reduceB' b case unArg $ ignoreBlocking $ sb of Def q [Apply _,Apply _,Apply _,Apply _,Apply _,Apply _,Apply _,Apply a] | Just q == mglue -> redReturn $ unArg a _ -> return (NoReduction $ map notReduced [la,lb,bA] ++ [reduced sphi] ++ map notReduced [bT,e] ++ [reduced sb]) _ -> __IMPOSSIBLE__ -- TODO Andrea: keep reductions that happen under foralls? primFaceForall' :: TCM PrimitiveImpl primFaceForall' = do requireCubical t <- (elInf primInterval --> elInf primInterval) --> elInf primInterval return $ PrimImpl t $ primFun __IMPOSSIBLE__ 1 $ \ts -> case ts of [phi] -> do sphi <- reduceB' phi case unArg $ ignoreBlocking $ sphi of Lam _ t -> do t <- reduce' t case t of NoAbs _ t -> redReturn t Abs _ t -> maybe (return $ NoReduction [reduced sphi]) redReturn =<< toFaceMapsPrim t _ -> return (NoReduction [reduced sphi]) _ -> __IMPOSSIBLE__ where toFaceMapsPrim t = do view <- intervalView' unview <- intervalUnview' us' <- decomposeInterval t fr <- getTerm builtinFaceForall builtinFaceForall let v = view t us = [ map Left (Map.toList bsm) ++ map Right ts | (bsm,ts) <- us' , 0 `Map.notMember` bsm ] fm (i,b) = if b then var (i-1) else unview (INeg (argN (var $ i-1))) ffr t = fr `apply` [argN $ Lam defaultArgInfo $ Abs "i" t] r = Just $ foldr (\ x r -> unview (IMax (argN x) (argN r))) (unview IZero) (map (foldr (\ x r -> unview (IMin (argN (either fm ffr x)) (argN r))) (unview IOne)) us) -- traceSLn "cube.forall" 20 (unlines [show v, show us', show us, show r]) $ return $ case us' of [(m,[_])] | Map.null m -> Nothing v -> r decomposeInterval :: HasBuiltins m => Term -> m [(Map Int Bool,[Term])] decomposeInterval t = do xs <- decomposeInterval' t let isConsistent xs = all (\ xs -> Set.size xs == 1) . Map.elems $ xs -- optimize by not doing generate + filter return [ (Map.map (head . Set.toList) bsm,ts) | (bsm,ts) <- xs , isConsistent bsm ] decomposeInterval' :: HasBuiltins m => Term -> m [(Map Int (Set Bool),[Term])] decomposeInterval' t = do view <- intervalView' unview <- intervalUnview' let f :: IntervalView -> [[Either (Int,Bool) Term]] -- TODO handle primIMinDep -- TODO? handle forall f IZero = mzero f IOne = return [] f (IMin x y) = do xs <- (f . view . unArg) x; ys <- (f . view . unArg) y; return (xs ++ ys) f (IMax x y) = msum $ map (f . view . unArg) [x,y] f (INeg x) = map (either (\ (x,y) -> Left (x,not y)) (Right . unview . INeg . argN)) <$> (f . view . unArg) x f (OTerm (Var i [])) = return [Left (i,True)] f (OTerm t) = return [Right t] v = view t return [ (bsm,ts) | xs <- f v , let (bs,ts) = partitionEithers xs , let bsm = (Map.fromListWith Set.union . map (id -*- Set.singleton)) bs ] -- | @mkPrimInjective@ takes two Set0 @a@ and @b@ and a function @f@ of type -- @a -> b@ and outputs a primitive internalizing the fact that @f@ is injective. mkPrimInjective :: Type -> Type -> QName -> TCM PrimitiveImpl mkPrimInjective a b qn = do -- Define the type eqName <- primEqualityName let lvl0 = Max [] let eq a t u = El (Type lvl0) <$> pure (Def eqName []) <#> pure (Level lvl0) <#> pure (unEl a) <@> t <@> u let f = pure (Def qn []) ty <- nPi "t" (pure a) $ nPi "u" (pure a) $ (eq b (f <@> varM 1) (f <@> varM 0)) --> (eq a ( varM 1) ( varM 0)) -- Get the constructor corresponding to BUILTIN REFL refl <- getRefl -- Implementation: when the equality argument reduces to refl so does the primitive. -- If the user want the primitive to reduce whenever the two values are equal (no -- matter whether the equality is refl), they can combine it with @eraseEquality@. return $ PrimImpl ty $ primFun __IMPOSSIBLE__ 3 $ \ ts -> do let t = fromMaybe __IMPOSSIBLE__ $ headMaybe ts let eq = unArg $ fromMaybe __IMPOSSIBLE__ $ lastMaybe ts eq' <- normalise' eq case eq' of Con{} -> redReturn $ refl t _ -> return $ NoReduction $ map notReduced ts primCharToNatInjective :: TCM PrimitiveImpl primCharToNatInjective = do char <- primType (undefined :: Char) nat <- primType (undefined :: Nat) toNat <- primFunName <$> getPrimitive "primCharToNat" mkPrimInjective char nat toNat primStringToListInjective :: TCM PrimitiveImpl primStringToListInjective = do string <- primType (undefined :: Str) chars <- primType (undefined :: String) toList <- primFunName <$> getPrimitive "primStringToList" mkPrimInjective string chars toList primWord64ToNatInjective :: TCM PrimitiveImpl primWord64ToNatInjective = do word <- primType (undefined :: Word64) nat <- primType (undefined :: Nat) toNat <- primFunName <$> getPrimitive "primWord64ToNat" mkPrimInjective word nat toNat getRefl :: TCM (Arg Term -> Term) getRefl = do -- BUILTIN REFL maybe a constructor with one (the principal) argument or only parameters. -- Get the ArgInfo of the principal argument of refl. con@(Con rf ci []) <- primRefl minfo <- fmap (setOrigin Inserted) <$> getReflArgInfo rf pure $ case minfo of Just ai -> Con rf ci . (:[]) . Apply . setArgInfo ai Nothing -> const con -- | @primEraseEquality : {a : Level} {A : Set a} {x y : A} -> x ≡ y -> x ≡ y@ primEraseEquality :: TCM PrimitiveImpl primEraseEquality = do -- primEraseEquality is incompatible with --without-K -- We raise an error warning if --safe is set and a mere warning otherwise whenM withoutKOption $ ifM (Lens.getSafeMode <$> commandLineOptions) {- then -} (warning SafeFlagWithoutKFlagPrimEraseEquality) {- else -} (warning WithoutKFlagPrimEraseEquality) -- Get the name and type of BUILTIN EQUALITY eq <- primEqualityName eqTy <- defType <$> getConstInfo eq -- E.g. @eqTy = eqTel → Set a@ where @eqTel = {a : Level} {A : Set a} (x y : A)@. TelV eqTel eqCore <- telView eqTy let eqSort = case unEl eqCore of Sort s -> s _ -> __IMPOSSIBLE__ -- Construct the type of primEraseEquality, e.g. -- @{a : Level} {A : Set a} {x y : A} → eq {a} {A} x y -> eq {a} {A} x y@. t <- let xeqy = pure $ El eqSort $ Def eq $ map Apply $ teleArgs eqTel in telePi_ (fmap hide eqTel) <$> (xeqy --> xeqy) -- Get the constructor corresponding to BUILTIN REFL refl <- getRefl -- The implementation of primEraseEquality: return $ PrimImpl t $ primFun __IMPOSSIBLE__ (1 + size eqTel) $ \ ts -> do let (u, v) = fromMaybe __IMPOSSIBLE__ $ last2 =<< initMaybe ts -- Andreas, 2013-07-22. -- Note that we cannot call the conversion checker here, -- because 'reduce' might be called in a context where -- some bound variables do not have a type (just __DUMMY_TYPE__), -- and the conversion checker for eliminations does not -- like this. -- We can only do untyped equality, e.g., by normalisation. (u', v') <- normalise' (u, v) if u' == v' then redReturn $ refl u else return $ NoReduction $ map notReduced ts -- | Get the 'ArgInfo' of the principal argument of BUILTIN REFL. -- -- Returns @Nothing@ for e.g. -- @ -- data Eq {a} {A : Set a} (x : A) : A → Set a where -- refl : Eq x x -- @ -- -- Returns @Just ...@ for e.g. -- @ -- data Eq {a} {A : Set a} : (x y : A) → Set a where -- refl : ∀ x → Eq x x -- @ getReflArgInfo :: ConHead -> TCM (Maybe ArgInfo) getReflArgInfo rf = do def <- getConInfo rf TelV reflTel _ <- telView $ defType def return $ fmap getArgInfo $ headMaybe $ drop (conPars $ theDef def) $ telToList reflTel -- | Used for both @primForce@ and @primForceLemma@. genPrimForce :: TCM Type -> (Term -> Arg Term -> Term) -> TCM PrimitiveImpl genPrimForce b ret = do let varEl s a = El (varSort s) <$> a varT s a = varEl s (varM a) varS s = pure $ sort $ varSort s t <- hPi "a" (el primLevel) $ hPi "b" (el primLevel) $ hPi "A" (varS 1) $ hPi "B" (varT 2 0 --> varS 1) b return $ PrimImpl t $ primFun __IMPOSSIBLE__ 6 $ \ ts -> case ts of [a, b, s, t, u, f] -> do u <- reduceB' u let isWHNF Blocked{} = return False isWHNF (NotBlocked _ u) = case unArg u of Lit{} -> return True Con{} -> return True Lam{} -> return True Pi{} -> return True Sort{} -> return True -- sorts and levels are considered whnf Level{} -> return True DontCare{} -> return True Def q _ -> do def <- theDef <$> getConstInfo q return $ case def of Datatype{} -> True Record{} -> True _ -> False MetaV{} -> return False Var{} -> return False Dummy s -> __IMPOSSIBLE_VERBOSE__ s ifM (isWHNF u) (redReturn $ ret (unArg f) (ignoreBlocking u)) (return $ NoReduction $ map notReduced [a, b, s, t] ++ [reduced u, notReduced f]) _ -> __IMPOSSIBLE__ primForce :: TCM PrimitiveImpl primForce = do let varEl s a = El (varSort s) <$> a varT s a = varEl s (varM a) varS s = pure $ sort $ varSort s genPrimForce (nPi "x" (varT 3 1) $ (nPi "y" (varT 4 2) $ varEl 4 $ varM 2 <@> varM 0) --> varEl 3 (varM 1 <@> varM 0)) $ \ f u -> apply f [u] primForceLemma :: TCM PrimitiveImpl primForceLemma = do let varEl s a = El (varSort s) <$> a varT s a = varEl s (varM a) varS s = pure $ sort $ varSort s refl <- primRefl force <- primFunName <$> getPrimitive "primForce" genPrimForce (nPi "x" (varT 3 1) $ nPi "f" (nPi "y" (varT 4 2) $ varEl 4 $ varM 2 <@> varM 0) $ varEl 4 $ primEquality <#> varM 4 <#> (varM 2 <@> varM 1) <@> (pure (Def force []) <#> varM 5 <#> varM 4 <#> varM 3 <#> varM 2 <@> varM 1 <@> varM 0) <@> (varM 0 <@> varM 1) ) $ \ _ _ -> refl mkPrimLevelZero :: TCM PrimitiveImpl mkPrimLevelZero = do t <- primType (undefined :: Lvl) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 0 $ \_ -> redReturn $ Level $ Max [] mkPrimLevelSuc :: TCM PrimitiveImpl mkPrimLevelSuc = do t <- primType (id :: Lvl -> Lvl) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 1 $ \ ~[a] -> do l <- levelView' $ unArg a redReturn $ Level $ levelSuc l mkPrimLevelMax :: TCM PrimitiveImpl mkPrimLevelMax = do t <- primType (max :: Op Lvl) return $ PrimImpl t $ primFun __IMPOSSIBLE__ 2 $ \ ~[a, b] -> do Max as <- levelView' $ unArg a Max bs <- levelView' $ unArg b redReturn $ Level $ levelMax $ as ++ bs mkPrimSetOmega :: TCM PrimitiveImpl mkPrimSetOmega = do let t = sort $ UnivSort Inf return $ PrimImpl t $ primFun __IMPOSSIBLE__ 0 $ \_ -> redReturn $ Sort Inf mkPrimFun1TCM :: (FromTerm a, ToTerm b, TermLike b) => TCM Type -> (a -> ReduceM b) -> TCM PrimitiveImpl mkPrimFun1TCM mt f = do toA <- fromTerm fromB <- toTermR t <- mt return $ PrimImpl t $ primFun __IMPOSSIBLE__ 1 $ \ts -> case ts of [v] -> redBind (toA v) singleton $ \ x -> do b <- f x case firstMeta b of Just m -> return $ NoReduction [reduced (Blocked m v)] Nothing -> redReturn =<< fromB b _ -> __IMPOSSIBLE__ -- Tying the knot mkPrimFun1 :: (PrimType a, FromTerm a, PrimType b, ToTerm b) => (a -> b) -> TCM PrimitiveImpl mkPrimFun1 f = do toA <- fromTerm fromB <- toTerm t <- primType f return $ PrimImpl t $ primFun __IMPOSSIBLE__ 1 $ \ts -> case ts of [v] -> redBind (toA v) singleton $ \ x -> redReturn $ fromB $ f x _ -> __IMPOSSIBLE__ mkPrimFun2 :: ( PrimType a, FromTerm a, ToTerm a , PrimType b, FromTerm b , PrimType c, ToTerm c ) => (a -> b -> c) -> TCM PrimitiveImpl mkPrimFun2 f = do toA <- fromTerm fromA <- toTerm toB <- fromTerm fromC <- toTerm t <- primType f return $ PrimImpl t $ primFun __IMPOSSIBLE__ 2 $ \ts -> case ts of [v,w] -> redBind (toA v) (\v' -> [v', notReduced w]) $ \x -> redBind (toB w) (\w' -> [ reduced $ notBlocked $ Arg (argInfo v) (fromA x) , w']) $ \y -> redReturn $ fromC $ f x y _ -> __IMPOSSIBLE__ mkPrimFun4 :: ( PrimType a, FromTerm a, ToTerm a , PrimType b, FromTerm b, ToTerm b , PrimType c, FromTerm c, ToTerm c , PrimType d, FromTerm d , PrimType e, ToTerm e ) => (a -> b -> c -> d -> e) -> TCM PrimitiveImpl mkPrimFun4 f = do (toA, fromA) <- (,) <$> fromTerm <*> toTerm (toB, fromB) <- (,) <$> fromTerm <*> toTerm (toC, fromC) <- (,) <$> fromTerm <*> toTerm toD <- fromTerm fromE <- toTerm t <- primType f return $ PrimImpl t $ primFun __IMPOSSIBLE__ 4 $ \ts -> let argFrom fromX a x = reduced $ notBlocked $ Arg (argInfo a) (fromX x) in case ts of [a,b,c,d] -> redBind (toA a) (\a' -> a' : map notReduced [b,c,d]) $ \x -> redBind (toB b) (\b' -> [argFrom fromA a x, b', notReduced c, notReduced d]) $ \y -> redBind (toC c) (\c' -> [ argFrom fromA a x , argFrom fromB b y , c', notReduced d]) $ \z -> redBind (toD d) (\d' -> [ argFrom fromA a x , argFrom fromB b y , argFrom fromC c z , d']) $ \w -> redReturn $ fromE $ f x y z w _ -> __IMPOSSIBLE__ -- Type combinators infixr 4 --> infixr 4 .--> infixr 4 ..--> (-->), (.-->), (..-->) :: Monad tcm => tcm Type -> tcm Type -> tcm Type a --> b = garr id a b a .--> b = garr (const $ Irrelevant) a b a ..--> b = garr (const $ NonStrict) a b garr :: Monad tcm => (Relevance -> Relevance) -> tcm Type -> tcm Type -> tcm Type garr f a b = do a' <- a b' <- b return $ El (funSort (getSort a') (getSort b')) $ Pi (mapRelevance f $ defaultDom a') (NoAbs "_" b') gpi :: (MonadTCM tcm, MonadDebug tcm) => ArgInfo -> String -> tcm Type -> tcm Type -> tcm Type gpi info name a b = do a <- a let dom = defaultNamedArgDom info name a b <- addContext (name, dom) b let y = stringToArgName name return $ El (piSort (getSort a) (Abs y (getSort b))) (Pi dom (Abs y b)) hPi, nPi :: (MonadTCM tcm, MonadDebug tcm) => String -> tcm Type -> tcm Type -> tcm Type hPi = gpi $ setHiding Hidden defaultArgInfo nPi = gpi defaultArgInfo hPi', nPi' :: (MonadTCM tcm, MonadDebug tcm) => String -> NamesT tcm Type -> (NamesT tcm Term -> NamesT tcm Type) -> NamesT tcm Type hPi' s a b = hPi s a (bind' s b) nPi' s a b = nPi s a (bind' s b) pPi' :: (MonadTCM tcm, MonadDebug tcm) => String -> NamesT tcm Term -> (NamesT tcm Term -> NamesT tcm Type) -> NamesT tcm Type pPi' n phi b = toFinitePi <$> nPi' n (elInf $ cl (liftTCM primIsOne) <@> phi) b where toFinitePi :: Type -> Type toFinitePi (El s (Pi d b)) = El s $ Pi (setRelevance Irrelevant $ d { domFinite = True }) b toFinitePi _ = __IMPOSSIBLE__ el' :: Monad m => m Term -> m Term -> m Type el' l a = El <$> (tmSort <$> l) <*> a elInf :: Functor m => m Term -> m Type elInf t = (El Inf <$> t) nolam :: Term -> Term nolam = Lam defaultArgInfo . NoAbs "_" varM :: Monad tcm => Int -> tcm Term varM = return . var infixl 9 <@>, <#> gApply :: Monad tcm => Hiding -> tcm Term -> tcm Term -> tcm Term gApply h a b = gApply' (setHiding h defaultArgInfo) a b gApply' :: Monad tcm => ArgInfo -> tcm Term -> tcm Term -> tcm Term gApply' info a b = do x <- a y <- b return $ x `apply` [Arg info y] (<@>),(<#>),(<..>) :: Monad tcm => tcm Term -> tcm Term -> tcm Term (<@>) = gApply NotHidden (<#>) = gApply Hidden (<..>) = gApply' (setRelevance Irrelevant defaultArgInfo) (<@@>) :: Monad tcm => tcm Term -> (tcm Term,tcm Term,tcm Term) -> tcm Term t <@@> (x,y,r) = do t <- t x <- x y <- y r <- r return $ t `applyE` [IApply x y r] list :: TCM Term -> TCM Term list t = primList <@> t io :: TCM Term -> TCM Term io t = primIO <@> t path :: TCM Term -> TCM Term path t = primPath <@> t el :: Functor tcm => tcm Term -> tcm Type el t = El (mkType 0) <$> t tset :: Monad tcm => tcm Type tset = return $ sort (mkType 0) sSizeUniv :: Sort sSizeUniv = mkType 0 -- Andreas, 2016-04-14 switching off SizeUniv, unfixing issue #1428 -- sSizeUniv = SizeUniv tSizeUniv :: Monad tcm => tcm Type tSizeUniv = tset -- Andreas, 2016-04-14 switching off SizeUniv, unfixing issue #1428 -- tSizeUniv = return $ El sSizeUniv $ Sort sSizeUniv -- Andreas, 2015-03-16 Since equality checking for types -- includes equality checking for sorts, we cannot put -- SizeUniv in Setω. (SizeUniv : Setω) == (_0 : suc _0) -- will first instantiate _0 := Setω, which is wrong. -- tSizeUniv = return $ El Inf $ Sort SizeUniv -- | Abbreviation: @argN = 'Arg' 'defaultArgInfo'@. argN :: e -> Arg e argN = Arg defaultArgInfo domN :: e -> Dom e domN = defaultDom -- | Abbreviation: @argH = 'hide' 'Arg' 'defaultArgInfo'@. argH :: e -> Arg e argH = Arg $ setHiding Hidden defaultArgInfo domH :: e -> Dom e domH = setHiding Hidden . defaultDom --------------------------------------------------------------------------- -- * The actual primitive functions --------------------------------------------------------------------------- type Op a = a -> a -> a type Fun a = a -> a type Rel a = a -> a -> Bool type Pred a = a -> Bool primitiveFunctions :: Map String (TCM PrimitiveImpl) primitiveFunctions = Map.fromList -- Ulf, 2015-10-28: Builtin integers now map to a datatype, and since you -- can define these functions (reasonably) efficiently using the primitive -- functions on natural numbers there's no need for them anymore. Keeping the -- show function around for convenience, and as a test case for a primitive -- function taking an integer. -- -- Integer functions -- [ "primIntegerPlus" |-> mkPrimFun2 ((+) :: Op Integer) -- , "primIntegerMinus" |-> mkPrimFun2 ((-) :: Op Integer) -- , "primIntegerTimes" |-> mkPrimFun2 ((*) :: Op Integer) -- , "primIntegerDiv" |-> mkPrimFun2 (div :: Op Integer) -- partial -- , "primIntegerMod" |-> mkPrimFun2 (mod :: Op Integer) -- partial -- , "primIntegerEquality" |-> mkPrimFun2 ((==) :: Rel Integer) -- , "primIntegerLess" |-> mkPrimFun2 ((<) :: Rel Integer) -- , "primIntegerAbs" |-> mkPrimFun1 (Nat . abs :: Integer -> Nat) -- , "primNatToInteger" |-> mkPrimFun1 (toInteger :: Nat -> Integer) [ "primShowInteger" |-> mkPrimFun1 (Str . show :: Integer -> Str) -- Natural number functions , "primNatPlus" |-> mkPrimFun2 ((+) :: Op Nat) , "primNatMinus" |-> mkPrimFun2 ((\x y -> max 0 (x - y)) :: Op Nat) , "primNatTimes" |-> mkPrimFun2 ((*) :: Op Nat) , "primNatDivSucAux" |-> mkPrimFun4 ((\k m n j -> k + div (max 0 $ n + m - j) (m + 1)) :: Nat -> Nat -> Nat -> Nat -> Nat) , "primNatModSucAux" |-> let aux :: Nat -> Nat -> Nat -> Nat -> Nat aux k m n j | n > j = mod (n - j - 1) (m + 1) | otherwise = k + n in mkPrimFun4 aux , "primNatEquality" |-> mkPrimFun2 ((==) :: Rel Nat) , "primNatLess" |-> mkPrimFun2 ((<) :: Rel Nat) -- Machine words , "primWord64ToNat" |-> mkPrimFun1 (fromIntegral :: Word64 -> Nat) , "primWord64FromNat" |-> mkPrimFun1 (fromIntegral :: Nat -> Word64) , "primWord64ToNatInjective" |-> primWord64ToNatInjective -- Level functions , "primLevelZero" |-> mkPrimLevelZero , "primLevelSuc" |-> mkPrimLevelSuc , "primLevelMax" |-> mkPrimLevelMax -- Sorts , "primSetOmega" |-> mkPrimSetOmega -- Floating point functions , "primNatToFloat" |-> mkPrimFun1 (fromIntegral :: Nat -> Double) , "primFloatPlus" |-> mkPrimFun2 ((+) :: Op Double) , "primFloatMinus" |-> mkPrimFun2 ((-) :: Op Double) , "primFloatTimes" |-> mkPrimFun2 ((*) :: Op Double) , "primFloatNegate" |-> mkPrimFun1 (negate :: Fun Double) , "primFloatDiv" |-> mkPrimFun2 ((/) :: Op Double) -- ASR (2016-09-29). We use bitwise equality for comparing Double -- because Haskell's Eq, which equates 0.0 and -0.0, allows to prove -- a contradiction (see Issue #2169). , "primFloatEquality" |-> mkPrimFun2 (floatEq :: Rel Double) , "primFloatLess" |-> mkPrimFun2 (floatLt :: Rel Double) , "primFloatNumericalEquality" |-> mkPrimFun2 ((==) :: Rel Double) , "primFloatNumericalLess" |-> mkPrimFun2 ((<) :: Rel Double) , "primFloatSqrt" |-> mkPrimFun1 (sqrt :: Double -> Double) , "primRound" |-> mkPrimFun1 (round :: Double -> Integer) , "primFloor" |-> mkPrimFun1 (floor :: Double -> Integer) , "primCeiling" |-> mkPrimFun1 (ceiling :: Double -> Integer) , "primExp" |-> mkPrimFun1 (exp :: Fun Double) , "primLog" |-> mkPrimFun1 (log :: Fun Double) , "primSin" |-> mkPrimFun1 (sin :: Fun Double) , "primCos" |-> mkPrimFun1 (cos :: Fun Double) , "primTan" |-> mkPrimFun1 (tan :: Fun Double) , "primASin" |-> mkPrimFun1 (asin :: Fun Double) , "primACos" |-> mkPrimFun1 (acos :: Fun Double) , "primATan" |-> mkPrimFun1 (atan :: Fun Double) , "primATan2" |-> mkPrimFun2 (atan2 :: Double -> Double -> Double) , "primShowFloat" |-> mkPrimFun1 (Str . show :: Double -> Str) -- Character functions , "primCharEquality" |-> mkPrimFun2 ((==) :: Rel Char) , "primIsLower" |-> mkPrimFun1 isLower , "primIsDigit" |-> mkPrimFun1 isDigit , "primIsAlpha" |-> mkPrimFun1 isAlpha , "primIsSpace" |-> mkPrimFun1 isSpace , "primIsAscii" |-> mkPrimFun1 isAscii , "primIsLatin1" |-> mkPrimFun1 isLatin1 , "primIsPrint" |-> mkPrimFun1 isPrint , "primIsHexDigit" |-> mkPrimFun1 isHexDigit , "primToUpper" |-> mkPrimFun1 toUpper , "primToLower" |-> mkPrimFun1 toLower , "primCharToNat" |-> mkPrimFun1 (fromIntegral . fromEnum :: Char -> Nat) , "primCharToNatInjective" |-> primCharToNatInjective , "primNatToChar" |-> mkPrimFun1 (toEnum . fromIntegral . (`mod` 0x110000) :: Nat -> Char) , "primShowChar" |-> mkPrimFun1 (Str . show . pretty . LitChar noRange) -- String functions , "primStringToList" |-> mkPrimFun1 unStr , "primStringToListInjective" |-> primStringToListInjective , "primStringFromList" |-> mkPrimFun1 Str , "primStringAppend" |-> mkPrimFun2 (\s1 s2 -> Str $ unStr s1 ++ unStr s2) , "primStringEquality" |-> mkPrimFun2 ((==) :: Rel Str) , "primShowString" |-> mkPrimFun1 (Str . show . pretty . LitString noRange . unStr) -- Other stuff , "primEraseEquality" |-> primEraseEquality -- This needs to be force : A → ((x : A) → B x) → B x rather than seq because of call-by-name. , "primForce" |-> primForce , "primForceLemma" |-> primForceLemma , "primQNameEquality" |-> mkPrimFun2 ((==) :: Rel QName) , "primQNameLess" |-> mkPrimFun2 ((<) :: Rel QName) , "primShowQName" |-> mkPrimFun1 (Str . prettyShow :: QName -> Str) , "primQNameFixity" |-> mkPrimFun1 (nameFixity . qnameName) , "primMetaEquality" |-> mkPrimFun2 ((==) :: Rel MetaId) , "primMetaLess" |-> mkPrimFun2 ((<) :: Rel MetaId) , "primShowMeta" |-> mkPrimFun1 (Str . prettyShow :: MetaId -> Str) , "primIMin" |-> primIMin' , "primIMax" |-> primIMax' , "primINeg" |-> primINeg' , "primPOr" |-> primPOr , "primComp" |-> primComp , builtinTrans |-> primTrans' , builtinHComp |-> primHComp' , "primIdJ" |-> primIdJ , "primPartial" |-> primPartial' , "primPartialP" |-> primPartialP' , builtinGlue |-> primGlue' , builtin_glue |-> prim_glue' , builtin_unglue |-> prim_unglue' , builtinFaceForall |-> primFaceForall' , "primDepIMin" |-> primDepIMin' , "primIdFace" |-> primIdFace' , "primIdPath" |-> primIdPath' , builtinIdElim |-> primIdElim' , builtinSubOut |-> primSubOut' ] where (|->) = (,) lookupPrimitiveFunction :: String -> TCM PrimitiveImpl lookupPrimitiveFunction x = fromMaybe (typeError $ NoSuchPrimitiveFunction x) (Map.lookup x primitiveFunctions) lookupPrimitiveFunctionQ :: QName -> TCM (String, PrimitiveImpl) lookupPrimitiveFunctionQ q = do let s = case qnameName q of Name _ x _ _ _ -> prettyShow x PrimImpl t pf <- lookupPrimitiveFunction s return (s, PrimImpl t $ pf { primFunName = q }) getBuiltinName :: String -> TCM (Maybe QName) getBuiltinName b = do caseMaybeM (getBuiltin' b) (return Nothing) (Just <.> getName) where getName v = do v <- reduce v case unSpine $ v of Def x _ -> return x Con x _ _ -> return $ conName x Lam _ b -> getName $ unAbs b _ -> __IMPOSSIBLE__ isBuiltin :: QName -> String -> TCM Bool isBuiltin q b = (Just q ==) <$> getBuiltinName b Agda-2.6.0.1/src/full/Agda/TypeChecking/EtaExpand.hs0000644000000000000000000000232213466402171020052 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Compute eta long normal forms. module Agda.TypeChecking.EtaExpand where import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.Monad import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible -- | Eta-expand a term if its type is a function type or an eta-record type. etaExpandOnce :: Type -> Term -> TCM Term etaExpandOnce a v = reduce a >>= \case El _ (Pi a b) -> return $ Lam ai $ mkAbs (absName b) $ raise 1 v `apply` [ Arg ai $ var 0 ] where ai = domInfo a a -> isEtaRecordType a >>= \case Just (r, pars) -> do def <- theDef <$> getConstInfo r (_, con, ci, args) <- etaExpandRecord_ r pars def v return $ mkCon con ci args Nothing -> return v -- | Eta-expand functions and expressions of eta-record -- type wherever possible. deepEtaExpand :: Term -> Type -> TCM Term deepEtaExpand = checkInternal' etaExpandAction etaExpandAction :: Action etaExpandAction = Action { preAction = etaExpandOnce , postAction = \ _ -> return , relevanceAction = \ _ -> id } Agda-2.6.0.1/src/full/Agda/TypeChecking/Functions.hs0000644000000000000000000000736513466402171020165 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Functions ( etaExpandClause , getDef ) where import Control.Arrow ( first ) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Level import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Impossible import Agda.Utils.Functor ( ($>) ) import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Monad import Agda.Utils.Size #include "undefined.h" -- | Expand a clause to the maximal arity, by inserting variable -- patterns and applying the body to variables. -- Fixes issue #2376. -- Replaces 'introHiddenLambdas'. -- See, e.g., test/Succeed/SizedTypesExtendedLambda.agda. -- This is used instead of special treatment of lambdas -- (which was unsound: Issue #121) etaExpandClause :: MonadTCM tcm => Clause -> tcm Clause etaExpandClause clause = liftTCM $ do case clause of Clause _ _ ctel ps _ Nothing _ _ -> return clause Clause _ _ ctel ps Nothing (Just t) _ _ -> return clause Clause rl rf ctel ps (Just body) (Just t) catchall unreachable -> do -- Get the telescope to expand the clause with. TelV tel0 t' <- telView $ unArg t -- If the rhs has lambdas, harvest the names of the bound variables. let xs = peekLambdas body let ltel = useNames xs $ telToList tel0 let tel = telFromList ltel let n = size tel unless (n == size tel0) __IMPOSSIBLE__ -- useNames should not drop anything -- Join with lhs telescope, extend patterns and apply body. -- NB: no need to raise ctel! let ctel' = telFromList $ telToList ctel ++ ltel ps' = raise n ps ++ teleNamedArgs tel body' = raise n body `apply` teleArgs tel reportSDoc "term.clause.expand" 30 $ inTopContext $ vcat [ "etaExpandClause" , " body = " <+> (addContext ctel' $ prettyTCM body) , " xs = " <+> text (prettyShow xs) , " new tel = " <+> prettyTCM ctel' ] return $ Clause rl rf ctel' ps' (Just body') (Just (t $> t')) catchall unreachable where -- Get all initial lambdas of the body. peekLambdas :: Term -> [Arg ArgName] peekLambdas v = case v of Lam info b -> Arg info (absName b) : peekLambdas (unAbs b) _ -> [] -- Use the names of the first argument, and set the Origin all other -- parts of the telescope to Inserted. -- The first list of arguments is a subset of the telescope. -- Thus, if compared pointwise, if the hiding does not match, -- it means we skipped an element of the telescope. useNames :: [Arg ArgName] -> ListTel -> ListTel useNames [] tel = map (setOrigin Inserted) tel -- Andrea: we can have more Lam's than Pi's, because they might be for Path -- Andreas, 2017-03-24: the following case is not IMPOSSIBLE when positivity checking comes before termination checking, see examples/tactics/ac/AC.agda useNames (_:_) [] = [] useNames (x:xs) (dom:tel) | sameHiding x dom = -- set the ArgName of the dom fmap (first $ const $ unArg x) dom : useNames xs tel | otherwise = setOrigin Inserted dom : useNames (x:xs) tel -- | Get the name of defined symbol of the head normal form of a term. -- Returns 'Nothing' if no such head exists. getDef :: Term -> TCM (Maybe QName) getDef t = reduce t >>= \case Def d _ -> return $ Just d Lam _ v -> underAbstraction_ v getDef Level v -> getDef =<< reallyUnLevelView v DontCare v -> getDef v _ -> return Nothing Agda-2.6.0.1/src/full/Agda/TypeChecking/InstanceArguments.hs0000644000000000000000000006132713466402171021645 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.InstanceArguments ( findInstance , isInstanceConstraint , isConsideringInstance , postponeInstanceConstraints ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Applicative hiding (empty) import Control.Monad.Reader import Control.Monad.State import qualified Data.IntSet as IntSet import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.List as List import Data.Function (on) import Data.Monoid hiding ((<>)) import Agda.Interaction.Options (optOverlappingInstances) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Internal as I import Agda.Syntax.Scope.Base (isNameInScope) import Agda.TypeChecking.Errors () import Agda.TypeChecking.Implicit (implicitArgs) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Records import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Free import {-# SOURCE #-} Agda.TypeChecking.Constraints import {-# SOURCE #-} Agda.TypeChecking.MetaVars import {-# SOURCE #-} Agda.TypeChecking.Conversion import qualified Agda.Benchmarking as Benchmark import Agda.TypeChecking.Monad.Benchmark (billTo) import Agda.Utils.Either import Agda.Utils.Except import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Functor import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Null (empty) #include "undefined.h" import Agda.Utils.Impossible -- | Compute a list of instance candidates. -- 'Nothing' if target type or any context type is a meta, error if -- type is not eligible for instance search. initialInstanceCandidates :: Type -> TCM (Maybe [Candidate]) initialInstanceCandidates t = do (_ , otn) <- getOutputTypeName t case otn of NoOutputTypeName -> typeError $ GenericError $ "Instance search can only be used to find elements in a named type" OutputTypeNameNotYetKnown -> do reportSDoc "tc.instance.cands" 30 $ "Instance type is not yet known. " return Nothing OutputTypeVisiblePi -> typeError $ GenericError $ "Instance search cannot be used to find elements in an explicit function type" OutputTypeVar -> do reportSDoc "tc.instance.cands" 30 $ "Instance type is a variable. " maybeRight <$> runExceptT getContextVars OutputTypeName n -> do reportSDoc "tc.instance.cands" 30 $ "Found instance type head: " <+> prettyTCM n runExceptT getContextVars >>= \case Left b -> return Nothing Right ctxVars -> Just . (ctxVars ++) <$> getScopeDefs n where -- get a list of variables with their type, relative to current context getContextVars :: ExceptT Blocked_ TCM [Candidate] getContextVars = do ctx <- getContext reportSDoc "tc.instance.cands" 40 $ hang "Getting candidates from context" 2 (inTopContext $ prettyTCM $ PrettyContext ctx) -- Context variables with their types lifted to live in the full context let varsAndRaisedTypes = [ (var i, raise (i + 1) t) | (i, t) <- zip [0..] ctx ] vars = [ Candidate x t (isOverlappable info) | (x, Dom{domInfo = info, unDom = (_, t)}) <- varsAndRaisedTypes , isInstance info , usableRelevance info , usableQuantity info ] -- {{}}-fields of variables are also candidates let cxtAndTypes = [ (x, t) | (x, Dom{unDom = (_, t)}) <- varsAndRaisedTypes ] fields <- concat <$> mapM instanceFields (reverse cxtAndTypes) reportSDoc "tc.instance.fields" 30 $ if null fields then "no instance field candidates" else "instance field candidates" $$ do nest 2 $ vcat [ sep [ (if overlap then "overlap" else empty) <+> prettyTCM v <+> ":" , nest 2 $ prettyTCM t ] | Candidate v t overlap <- fields ] -- get let bindings env <- asksTC envLetBindings env <- mapM (getOpen . snd) $ Map.toList env let lets = [ Candidate v t False | (v, Dom{domInfo = info, unDom = t}) <- env , isInstance info , usableRelevance info , usableQuantity info ] return $ vars ++ fields ++ lets etaExpand :: (MonadTCM m, MonadReduce m, HasConstInfo m) => Bool -> Type -> m (Maybe (QName, Args)) etaExpand etaOnce t = isEtaRecordType t >>= \case Nothing | etaOnce -> do isRecordType t >>= \case Nothing -> return Nothing Just (r, vs, _) -> do m <- currentModule -- Are we inside the record module? If so it's safe and desirable -- to eta-expand once (issue #2320). if qnameToList r `List.isPrefixOf` mnameToList m then return (Just (r, vs)) else return Nothing r -> return r instanceFields :: (Term,Type) -> ExceptT Blocked_ TCM [Candidate] instanceFields = instanceFields' True instanceFields' :: Bool -> (Term,Type) -> ExceptT Blocked_ TCM [Candidate] instanceFields' etaOnce (v, t) = ifBlockedType t (\m _ -> throwError $ Blocked m ()) $ \ _ t -> do caseMaybeM (etaExpand etaOnce t) (return []) $ \ (r, pars) -> do (tel, args) <- forceEtaExpandRecord r pars v let types = map unDom $ applySubst (parallelS $ reverse $ map unArg args) (flattenTel tel) fmap concat $ forM (zip args types) $ \ (arg, t) -> ([ Candidate (unArg arg) t (isOverlappable arg) | isInstance arg ] ++) <$> instanceFields' False (unArg arg, t) getScopeDefs :: QName -> TCM [Candidate] getScopeDefs n = do instanceDefs <- getInstanceDefs rel <- asksTC envRelevance let qs = maybe [] Set.toList $ Map.lookup n instanceDefs catMaybes <$> mapM (candidate rel) qs candidate :: Relevance -> QName -> TCM (Maybe Candidate) candidate rel q = ifNotM (isNameInScope q <$> getScope) (return Nothing) $ do -- Andreas, 2012-07-07: -- we try to get the info for q -- while opening a module, q may be in scope but not in the signature -- in this case, we just ignore q (issue 674) flip catchError handle $ do def <- getConstInfo q if not (defRelevance def `moreRelevant` rel) then return Nothing else do -- Andreas, 2017-01-14: instantiateDef is a bit of an overkill -- if we anyway get the freeVarsToApply -- WAS: t <- defType <$> instantiateDef def args <- freeVarsToApply q let t = defType def `piApply` args let v = case theDef def of -- drop parameters if it's a projection function... Function{ funProjection = Just p } -> projDropParsApply p ProjSystem args -- Andreas, 2014-08-19: constructors cannot be declared as -- instances (at least as of now). -- I do not understand why the Constructor case is not impossible. -- Ulf, 2014-08-20: constructors are always instances. Constructor{ conSrcCon = c } -> Con c ConOSystem [] _ -> Def q $ map Apply args return $ Just $ Candidate v t False where -- unbound constant throws an internal error handle (TypeError _ (Closure {clValue = InternalError _})) = return Nothing handle err = throwError err -- | @findInstance m (v,a)s@ tries to instantiate on of the types @a@s -- of the candidate terms @v@s to the type @t@ of the metavariable @m@. -- If successful, meta @m@ is solved with the instantiation of @v@. -- If unsuccessful, the constraint is regenerated, with possibly reduced -- candidate set. -- The list of candidates is equal to @Nothing@ when the type of the meta -- wasn't known when the constraint was generated. In that case, try to find -- its type again. findInstance :: MetaId -> Maybe [Candidate] -> TCM () findInstance m Nothing = do -- Andreas, 2015-02-07: New metas should be created with range of the -- current instance meta, thus, we set the range. mv <- lookupMeta m setCurrentRange mv $ do reportSLn "tc.instance" 20 $ "The type of the FindInstance constraint isn't known, trying to find it again." t <- instantiate =<< getMetaTypeInContext m reportSLn "tc.instance" 70 $ "findInstance 1: t: " ++ prettyShow t -- Issue #2577: If the target is a function type the arguments are -- potential candidates, so we add them to the context to make -- initialInstanceCandidates pick them up. TelV tel t <- telViewUpTo' (-1) notVisible t cands <- addContext tel $ initialInstanceCandidates t case cands of Nothing -> do reportSLn "tc.instance" 20 "Can't figure out target of instance goal. Postponing constraint." addConstraint $ FindInstance m Nothing Nothing Just {} -> findInstance m cands findInstance m (Just cands) = whenJustM (findInstance' m cands) $ (\ (cands, b) -> addConstraint $ FindInstance m b $ Just cands) -- | Result says whether we need to add constraint, and if so, the set of -- remaining candidates and an eventual blocking metavariable. findInstance' :: MetaId -> [Candidate] -> TCM (Maybe ([Candidate], Maybe MetaId)) findInstance' m cands = ifM (isFrozen m) (do reportSLn "tc.instance" 20 "Refusing to solve frozen instance meta." return (Just (cands, Nothing))) $ do ifM isConsideringInstance (do reportSLn "tc.instance" 20 "Postponing possibly recursive instance search." return $ Just (cands, Nothing)) $ billTo [Benchmark.Typing, Benchmark.InstanceSearch] $ do -- Andreas, 2015-02-07: New metas should be created with range of the -- current instance meta, thus, we set the range. mv <- lookupMeta m setCurrentRange mv $ do reportSLn "tc.instance" 15 $ "findInstance 2: constraint: " ++ prettyShow m ++ "; candidates left: " ++ show (length cands) reportSDoc "tc.instance" 60 $ nest 2 $ vcat [ sep [ (if overlap then "overlap" else empty) <+> prettyTCM v <+> ":" , nest 2 $ prettyTCM t ] | Candidate v t overlap <- cands ] reportSDoc "tc.instance" 70 $ "raw" $$ do nest 2 $ vcat [ sep [ (if overlap then "overlap" else empty) <+> pretty v <+> ":" , nest 2 $ pretty t ] | Candidate v t overlap <- cands ] t <- normalise =<< getMetaTypeInContext m reportSLn "tc.instance" 70 $ "findInstance 2: t: " ++ prettyShow t insidePi t $ \ t -> do reportSDoc "tc.instance" 15 $ "findInstance 3: t =" <+> prettyTCM t reportSLn "tc.instance" 70 $ "findInstance 3: t: " ++ prettyShow t mcands <- checkCandidates m t cands debugConstraints case mcands of Just ([(_, err)], []) -> do reportSDoc "tc.instance" 15 $ "findInstance 5: the only viable candidate failed..." throwError err Just (errs, []) -> do if null errs then reportSDoc "tc.instance" 15 $ "findInstance 5: no viable candidate found..." else reportSDoc "tc.instance" 15 $ "findInstance 5: all viable candidates failed..." -- #3676: Sort the candidates based on the size of the range for the errors and -- set the range of the full error to the range of the most precise candidate -- error. let sortedErrs = List.sortBy (compare `on` precision) errs where precision (_, err) = maybe infinity iLength $ rangeToInterval $ getRange err infinity = 1000000000 setCurrentRange (take 1 $ map snd sortedErrs) $ typeError $ InstanceNoCandidate t [ (candidateTerm c, err) | (c, err) <- sortedErrs ] Just (_, [Candidate term t' _]) -> do reportSDoc "tc.instance" 15 $ vcat [ "findInstance 5: solved by instance search using the only candidate" , nest 2 $ prettyTCM term , "of type " <+> prettyTCM t' , "for type" <+> prettyTCM t ] -- If we actually solved the constraints we should wake up any held -- instance constraints, to make sure we don't forget about them. wakeupInstanceConstraints return Nothing -- We’re done _ -> do let cs = maybe cands snd mcands -- keep the current candidates if Nothing reportSDoc "tc.instance" 15 $ text ("findInstance 5: refined candidates: ") <+> prettyTCM (List.map candidateTerm cs) return (Just (cs, Nothing)) -- | Precondition: type is spine reduced and ends in a Def or a Var. insidePi :: Type -> (Type -> TCM a) -> TCM a insidePi t ret = case unEl t of Pi a b -> addContext (absName b, a) $ insidePi (absBody b) ret Def{} -> ret t Var{} -> ret t Sort{} -> __IMPOSSIBLE__ Con{} -> __IMPOSSIBLE__ Lam{} -> __IMPOSSIBLE__ Lit{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ MetaV{} -> __IMPOSSIBLE__ DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Apply the computation to every argument in turn by reseting the state every -- time. Return the list of the arguments giving the result True. -- -- If the resulting list contains exactly one element, then the state is the -- same as the one obtained after running the corresponding computation. In -- all the other cases, the state is reset. -- -- Also returns the candidates that pass type checking but fails constraints, -- so that the error messages can be reported if there are no successful -- candidates. filterResetingState :: MetaId -> [Candidate] -> (Candidate -> TCM YesNoMaybe) -> TCM ([(Candidate, TCErr)], [Candidate]) filterResetingState m cands f = do ctxArgs <- getContextArgs let ctxElims = map Apply ctxArgs tryC c = do ok <- f c v <- instantiateFull (MetaV m ctxElims) a <- instantiateFull =<< (`piApplyM` ctxArgs) =<< getMetaType m return (ok, v, a) result <- mapM (\c -> do bs <- localTCStateSaving (tryC c); return (c, bs)) cands -- Check that there aren't any hard failures case [ err | (_, ((HellNo err, _, _), _)) <- result ] of err : _ -> throwError err [] -> return () let result' = [ (c, v, a, s) | (c, ((r, v, a), s)) <- result, not (isNo r) ] result'' <- dropSameCandidates m result' case result'' of [(c, _, _, s)] -> ([], [c]) <$ putTC s _ -> do let bad = [ (c, err) | (c, ((NoBecause err, _, _), _)) <- result ] good = [ c | (c, _, _, _) <- result'' ] return (bad, good) -- Drop all candidates which are judgmentally equal to the first one. -- This is sufficient to reduce the list to a singleton should all be equal. dropSameCandidates :: MetaId -> [(Candidate, Term, Type, a)] -> TCM [(Candidate, Term, Type, a)] dropSameCandidates m cands0 = verboseBracket "tc.instance" 30 "dropSameCandidates" $ do metas <- getMetaVariableSet -- Does `it` have any metas in the initial meta variable store? let freshMetas = getAny . allMetas (Any . (`IntSet.notMember` metas) . metaId) -- Take overlappable candidates into account let cands = case List.partition (\ (c, _, _, _) -> candidateOverlappable c) cands0 of (cand : _, []) -> [cand] -- only overlappable candidates: pick the first one _ -> cands0 -- otherwise require equality reportSDoc "tc.instance" 50 $ vcat [ "valid candidates:" , nest 2 $ vcat [ if freshMetas (v, a) then "(redacted)" else sep [ prettyTCM v <+> ":", nest 2 $ prettyTCM a ] | (_, v, a, _) <- cands ] ] rel <- getMetaRelevance <$> lookupMeta m case cands of [] -> return cands cvd : _ | isIrrelevant rel -> do reportSLn "tc.instance" 30 "Meta is irrelevant so any candidate will do." return [cvd] (_, MetaV m' _, _, _) : _ | m == m' -> -- We didn't instantiate, so can't compare return cands cvd@(_, v, a, _) : vas -> do if freshMetas (v, a) then return (cvd : vas) else (cvd :) <$> dropWhileM equal vas where equal (_, v', a', _) | freshMetas (v', a') = return False -- If there are fresh metas we can't compare | otherwise = verboseBracket "tc.instance" 30 "comparingCandidates" $ do reportSDoc "tc.instance" 30 $ sep [ prettyTCM v <+> "==", nest 2 $ prettyTCM v' ] localTCState $ dontAssignMetas $ ifNoConstraints_ (equalType a a' >> equalTerm a v v') {- then -} (return True) {- else -} (\ _ -> return False) `catchError` (\ _ -> return False) data YesNoMaybe = Yes | No | NoBecause TCErr | Maybe | HellNo TCErr deriving (Show) isNo :: YesNoMaybe -> Bool isNo No = True isNo NoBecause{} = True isNo HellNo{} = True isNo _ = False -- | Given a meta @m@ of type @t@ and a list of candidates @cands@, -- @checkCandidates m t cands@ returns a refined list of valid candidates and -- candidates that failed some constraints. checkCandidates :: MetaId -> Type -> [Candidate] -> TCM (Maybe ([(Candidate, TCErr)], [Candidate])) checkCandidates m t cands = verboseBracket "tc.instance.candidates" 20 ("checkCandidates " ++ prettyShow m) $ ifM (anyMetaTypes cands) (return Nothing) $ Just <$> do reportSDoc "tc.instance.candidates" 20 $ nest 2 $ "target:" <+> prettyTCM t reportSDoc "tc.instance.candidates" 20 $ nest 2 $ vcat [ "candidates" , vcat [ "-" <+> (if overlap then "overlap" else empty) <+> prettyTCM v <+> ":" <+> prettyTCM t | Candidate v t overlap <- cands ] ] cands' <- filterResetingState m cands (checkCandidateForMeta m t) reportSDoc "tc.instance.candidates" 20 $ nest 2 $ vcat [ "valid candidates" , vcat [ "-" <+> (if overlap then "overlap" else empty) <+> prettyTCM v <+> ":" <+> prettyTCM t | Candidate v t overlap <- snd cands' ] ] return cands' where anyMetaTypes :: [Candidate] -> TCM Bool anyMetaTypes [] = return False anyMetaTypes (Candidate _ a _ : cands) = do a <- instantiate a case unEl a of MetaV{} -> return True _ -> anyMetaTypes cands checkDepth :: Term -> Type -> TCM YesNoMaybe -> TCM YesNoMaybe checkDepth c a k = locallyTC eInstanceDepth succ $ do d <- viewTC eInstanceDepth maxDepth <- maxInstanceSearchDepth when (d > maxDepth) $ typeError $ InstanceSearchDepthExhausted c a maxDepth k checkCandidateForMeta :: MetaId -> Type -> Candidate -> TCM YesNoMaybe checkCandidateForMeta m t (Candidate term t' _) = checkDepth term t' $ do -- Andreas, 2015-02-07: New metas should be created with range of the -- current instance meta, thus, we set the range. mv <- lookupMeta m setCurrentRange mv $ do debugConstraints verboseBracket "tc.instance" 20 ("checkCandidateForMeta " ++ prettyShow m) $ liftTCM $ runCandidateCheck $ do reportSLn "tc.instance" 70 $ " t: " ++ prettyShow t ++ "\n t':" ++ prettyShow t' ++ "\n term: " ++ prettyShow term ++ "." reportSDoc "tc.instance" 20 $ vcat [ "checkCandidateForMeta" , "t =" <+> prettyTCM t , "t' =" <+> prettyTCM t' , "term =" <+> prettyTCM term ] -- Apply hidden and instance arguments (recursive inst. search!). (args, t'') <- implicitArgs (-1) (\h -> notVisible h) t' reportSDoc "tc.instance" 20 $ "instance search: checking" <+> prettyTCM t'' <+> "<=" <+> prettyTCM t reportSDoc "tc.instance" 70 $ vcat [ "instance search: checking (raw)" , nest 4 $ pretty t'' , nest 2 $ "<=" , nest 4 $ pretty t ] v <- (`applyDroppingParameters` args) =<< reduce term reportSDoc "tc.instance" 15 $ vcat [ "instance search: attempting" , nest 2 $ prettyTCM m <+> ":=" <+> prettyTCM v ] reportSDoc "tc.instance" 70 $ nest 2 $ "candidate v = " <+> pretty v -- if constraints remain, we abort, but keep the candidate -- Jesper, 05-12-2014: When we abort, we should add a constraint to -- instantiate the meta at a later time (see issue 1377). ctxElims <- map Apply <$> getContextArgs guardConstraint (ValueCmp CmpEq t'' (MetaV m ctxElims) v) $ leqType t'' t -- make a pass over constraints, to detect cases where some are made -- unsolvable by the assignment, but don't do this for FindInstance's -- to prevent loops. debugConstraints let debugSolution = verboseS "tc.instance" 15 $ do sol <- instantiateFull (MetaV m ctxElims) case sol of MetaV m' _ | m == m' -> reportSDoc "tc.instance" 15 $ sep [ "instance search: maybe solution for" <+> prettyTCM m <> ":" , nest 2 $ prettyTCM v ] _ -> reportSDoc "tc.instance" 15 $ sep [ "instance search: found solution for" <+> prettyTCM m <> ":" , nest 2 $ prettyTCM sol ] do solveAwakeConstraints' True Yes <$ debugSolution `catchError` (return . NoBecause) where runCandidateCheck check = flip catchError handle $ nowConsideringInstance $ ifNoConstraints check (\ r -> case r of Yes -> r <$ debugSuccess NoBecause why -> r <$ debugConstraintFail why _ -> __IMPOSSIBLE__ ) (\ _ r -> case r of Yes -> Maybe <$ debugInconclusive NoBecause why -> r <$ debugConstraintFail why _ -> __IMPOSSIBLE__ ) debugSuccess = reportSLn "tc.instance" 50 "assignment successful" :: TCM () debugInconclusive = reportSLn "tc.instance" 50 "assignment inconclusive" :: TCM () debugConstraintFail why = reportSDoc "tc.instance" 50 $ "candidate failed constraints:" <+> prettyTCM why debugTypeFail err = reportSDoc "tc.instance" 50 $ "candidate failed type check:" <+> prettyTCM err hardFailure :: TCErr -> Bool hardFailure (TypeError _ err) = case clValue err of InstanceSearchDepthExhausted{} -> True _ -> False hardFailure _ = False handle :: TCErr -> TCM YesNoMaybe handle err | hardFailure err = return $ HellNo err | otherwise = No <$ debugTypeFail err isInstanceConstraint :: Constraint -> Bool isInstanceConstraint FindInstance{} = True isInstanceConstraint _ = False isConsideringInstance :: (ReadTCState m, HasOptions m) => m Bool isConsideringInstance = and2M ((^. stConsideringInstance) <$> getTCState) (not . optOverlappingInstances <$> pragmaOptions) nowConsideringInstance :: (MonadTCState m) => m a -> m a nowConsideringInstance = locallyTCState stConsideringInstance $ const True wakeupInstanceConstraints :: TCM () wakeupInstanceConstraints = unlessM isConsideringInstance $ do wakeConstraints (return . isInstance) solveSomeAwakeConstraints isInstance False where isInstance = isInstanceConstraint . clValue . theConstraint postponeInstanceConstraints :: TCM a -> TCM a postponeInstanceConstraints m = nowConsideringInstance m <* wakeupInstanceConstraints -- | To preserve the invariant that a constructor is not applied to its -- parameter arguments, we explicitly check whether function term -- we are applying to arguments is a unapplied constructor. -- In this case we drop the first 'conPars' arguments. -- See Issue670a. -- Andreas, 2013-11-07 Also do this for projections, see Issue670b. applyDroppingParameters :: Term -> Args -> TCM Term applyDroppingParameters t vs = do let fallback = return $ t `apply` vs case t of Con c ci [] -> do def <- theDef <$> getConInfo c case def of Constructor {conPars = n} -> return $ Con c ci (map Apply $ drop n vs) _ -> __IMPOSSIBLE__ Def f [] -> do mp <- isProjection f case mp of Just Projection{projIndex = n} -> do case drop n vs of [] -> return t u : us -> (`apply` us) <$> applyDef ProjPrefix f u _ -> fallback _ -> fallback Agda-2.6.0.1/src/full/Agda/TypeChecking/Quote.hs0000644000000000000000000003145213466402171017304 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Quote where import Control.Arrow ((&&&)) import Control.Monad import Control.Monad.State (runState, get, put) import Control.Monad.Reader (asks) import Control.Monad.Writer (execWriterT, tell) import Control.Monad.Trans (lift) import Data.Char import Data.Maybe (fromMaybe) import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern ( dbPatPerm' ) import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Translation.InternalToAbstract import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.DropArgs import Agda.TypeChecking.Free import Agda.TypeChecking.Level import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Except import Agda.Utils.Impossible import Agda.Utils.Monad ( ifM ) import Agda.Utils.Permutation ( Permutation(Perm), compactP, reverseP ) import Agda.Utils.VarSet (VarSet) import qualified Agda.Utils.VarSet as Set import Agda.Utils.FileName import Agda.Utils.Size #include "undefined.h" data QuotingKit = QuotingKit { quoteTermWithKit :: Term -> ReduceM Term , quoteTypeWithKit :: Type -> ReduceM Term , quoteClauseWithKit :: Clause -> ReduceM Term , quoteDomWithKit :: Dom Type -> ReduceM Term , quoteDefnWithKit :: Definition -> ReduceM Term , quoteListWithKit :: forall a. (a -> ReduceM Term) -> [a] -> ReduceM Term } quotingKit :: TCM QuotingKit quotingKit = do currentFile <- fromMaybe __IMPOSSIBLE__ <$> asksTC envCurrentPath hidden <- primHidden instanceH <- primInstance visible <- primVisible relevant <- primRelevant irrelevant <- primIrrelevant nil <- primNil cons <- primCons abs <- primAbsAbs arg <- primArgArg arginfo <- primArgArgInfo var <- primAgdaTermVar lam <- primAgdaTermLam extlam <- primAgdaTermExtLam def <- primAgdaTermDef con <- primAgdaTermCon pi <- primAgdaTermPi sort <- primAgdaTermSort meta <- primAgdaTermMeta lit <- primAgdaTermLit litNat <- primAgdaLitNat litWord64 <- primAgdaLitNat litFloat <- primAgdaLitFloat litChar <- primAgdaLitChar litString <- primAgdaLitString litQName <- primAgdaLitQName litMeta <- primAgdaLitMeta normalClause <- primAgdaClauseClause absurdClause <- primAgdaClauseAbsurd varP <- primAgdaPatVar conP <- primAgdaPatCon dotP <- primAgdaPatDot litP <- primAgdaPatLit projP <- primAgdaPatProj absurdP <- primAgdaPatAbsurd set <- primAgdaSortSet setLit <- primAgdaSortLit unsupportedSort <- primAgdaSortUnsupported sucLevel <- primLevelSuc lub <- primLevelMax lkit <- requireLevels Con z _ _ <- primZero Con s _ _ <- primSuc unsupported <- primAgdaTermUnsupported agdaDefinitionFunDef <- primAgdaDefinitionFunDef agdaDefinitionDataDef <- primAgdaDefinitionDataDef agdaDefinitionRecordDef <- primAgdaDefinitionRecordDef agdaDefinitionPostulate <- primAgdaDefinitionPostulate agdaDefinitionPrimitive <- primAgdaDefinitionPrimitive agdaDefinitionDataConstructor <- primAgdaDefinitionDataConstructor let (@@) :: Apply a => ReduceM a -> ReduceM Term -> ReduceM a t @@ u = apply <$> t <*> ((:[]) . defaultArg <$> u) (!@) :: Apply a => a -> ReduceM Term -> ReduceM a t !@ u = pure t @@ u (!@!) :: Apply a => a -> Term -> ReduceM a t !@! u = pure t @@ pure u quoteHiding :: Hiding -> ReduceM Term quoteHiding Hidden = pure hidden quoteHiding Instance{} = pure instanceH quoteHiding NotHidden = pure visible quoteRelevance :: Relevance -> ReduceM Term quoteRelevance Relevant = pure relevant quoteRelevance Irrelevant = pure irrelevant quoteRelevance NonStrict = pure relevant -- TODO: quote Quanity quoteArgInfo :: ArgInfo -> ReduceM Term quoteArgInfo (ArgInfo h m _ _) = arginfo !@ quoteHiding h @@ quoteRelevance (getRelevance m) quoteLit :: Literal -> ReduceM Term quoteLit l@LitNat{} = litNat !@! Lit l quoteLit l@LitWord64{} = litWord64 !@! Lit l quoteLit l@LitFloat{} = litFloat !@! Lit l quoteLit l@LitChar{} = litChar !@! Lit l quoteLit l@LitString{} = litString !@! Lit l quoteLit l@LitQName{} = litQName !@! Lit l quoteLit l@LitMeta {} = litMeta !@! Lit l -- We keep no ranges in the quoted term, so the equality on terms -- is only on the structure. quoteSortLevelTerm :: Level -> ReduceM Term quoteSortLevelTerm (Max []) = setLit !@! Lit (LitNat noRange 0) quoteSortLevelTerm (Max [ClosedLevel n]) = setLit !@! Lit (LitNat noRange n) quoteSortLevelTerm l = set !@ quoteTerm (unlevelWithKit lkit l) quoteSort :: Sort -> ReduceM Term quoteSort (Type t) = quoteSortLevelTerm t quoteSort Prop{} = pure unsupportedSort quoteSort Inf = pure unsupportedSort quoteSort SizeUniv = pure unsupportedSort quoteSort PiSort{} = pure unsupportedSort quoteSort UnivSort{} = pure unsupportedSort quoteSort (MetaS x es) = quoteTerm $ MetaV x es quoteSort (DefS d es) = quoteTerm $ Def d es quoteSort (DummyS s) =__IMPOSSIBLE_VERBOSE__ s quoteType :: Type -> ReduceM Term quoteType (El _ t) = quoteTerm t quoteQName :: QName -> ReduceM Term quoteQName x = pure $ Lit $ LitQName noRange x quotePats :: [NamedArg DeBruijnPattern] -> ReduceM Term quotePats ps = list $ map (quoteArg quotePat . fmap namedThing) ps quotePat :: DeBruijnPattern -> ReduceM Term quotePat p | patternOrigin p == Just PatOAbsurd = pure absurdP quotePat (VarP o x) = varP !@! quoteString (dbPatVarName x) quotePat (DotP _ _) = pure dotP quotePat (ConP c _ ps) = conP !@ quoteQName (conName c) @@ quotePats ps quotePat (LitP l) = litP !@ quoteLit l quotePat (ProjP _ x) = projP !@ quoteQName x quotePat (IApplyP o t u x) = pure unsupported quotePat DefP{} = pure unsupported quoteClause :: Clause -> ReduceM Term quoteClause cl@Clause{namedClausePats = ps, clauseBody = body} = case body of Nothing -> absurdClause !@ quotePats ps Just b -> let perm = fromMaybe __IMPOSSIBLE__ $ dbPatPerm' False ps -- Dot patterns don't count (#2203) v = applySubst (renamingR perm) b in normalClause !@ quotePats ps @@ quoteTerm v list :: [ReduceM Term] -> ReduceM Term list [] = pure nil list (a : as) = cons !@ a @@ list as quoteList :: (a -> ReduceM Term) -> [a] -> ReduceM Term quoteList q xs = list (map q xs) quoteDom :: (Type -> ReduceM Term) -> Dom Type -> ReduceM Term quoteDom q (Dom{domInfo = info, unDom = t}) = arg !@ quoteArgInfo info @@ q t quoteAbs :: Subst t a => (a -> ReduceM Term) -> Abs a -> ReduceM Term quoteAbs q (Abs s t) = abs !@! quoteString s @@ q t quoteAbs q (NoAbs s t) = abs !@! quoteString s @@ q (raise 1 t) quoteArg :: (a -> ReduceM Term) -> Arg a -> ReduceM Term quoteArg q (Arg info t) = arg !@ quoteArgInfo info @@ q t quoteArgs :: Args -> ReduceM Term quoteArgs ts = list (map (quoteArg quoteTerm) ts) quoteTerm :: Term -> ReduceM Term quoteTerm v = case unSpine v of Var n es -> let ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es in var !@! Lit (LitNat noRange $ fromIntegral n) @@ quoteArgs ts Lam info t -> lam !@ quoteHiding (getHiding info) @@ quoteAbs quoteTerm t Def x es -> do defn <- getConstInfo x -- #2220: remember to restore dropped parameters let conOrProjPars = defParameters defn ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es qx Function{ funExtLam = Just (ExtLamInfo m _), funClauses = cs } = do -- An extended lambda should not have any extra parameters! unless (null conOrProjPars) __IMPOSSIBLE__ n <- size <$> lookupSection m let (pars, args) = splitAt n ts extlam !@ list (map (quoteClause . (`apply` pars)) cs) @@ list (map (quoteArg quoteTerm) args) qx df@Function{ funCompiled = Just Fail, funClauses = [cl] } = do -- See also corresponding code in InternalToAbstract let n = length (namedClausePats cl) - 1 extlam !@ list [quoteClause $ dropArgs n cl] @@ list (drop n $ map (quoteArg quoteTerm) ts) qx _ = do n <- getDefFreeVars x def !@! quoteName x @@ list (drop n $ conOrProjPars ++ map (quoteArg quoteTerm) ts) qx (theDef defn) Con x ci es | Just ts <- allApplyElims es -> do cDef <- getConstInfo (conName x) n <- getDefFreeVars (conName x) let args = list $ drop n $ defParameters cDef ++ map (quoteArg quoteTerm) ts con !@! quoteConName x @@ args Con x ci es -> pure unsupported Pi t u -> pi !@ quoteDom quoteType t @@ quoteAbs quoteType u Level l -> quoteTerm (unlevelWithKit lkit l) Lit l -> lit !@ quoteLit l Sort s -> sort !@ quoteSort s MetaV x es -> meta !@! quoteMeta currentFile x @@ quoteArgs vs where vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es DontCare{} -> pure unsupported -- could be exposed at some point but we have to take care Dummy s -> __IMPOSSIBLE_VERBOSE__ s defParameters :: Definition -> [ReduceM Term] defParameters def = map par hiding where np = case theDef def of Constructor{ conPars = np } -> np Function{ funProjection = Just p } -> projIndex p - 1 _ -> 0 TelV tel _ = telView' (defType def) hiding = map (getHiding &&& getRelevance) $ take np $ telToList tel par (h, r) = arg !@ (arginfo !@ quoteHiding h @@ quoteRelevance r) @@ pure unsupported quoteDefn :: Definition -> ReduceM Term quoteDefn def = case theDef def of Function{funClauses = cs} -> agdaDefinitionFunDef !@ quoteList quoteClause cs Datatype{dataPars = np, dataCons = cs} -> agdaDefinitionDataDef !@! quoteNat (fromIntegral np) @@ quoteList (pure . quoteName) cs Record{recConHead = c, recFields = fs} -> agdaDefinitionRecordDef !@! quoteName (conName c) @@ quoteList (quoteArg (pure . quoteName)) fs Axiom{} -> pure agdaDefinitionPostulate DataOrRecSig{} -> pure agdaDefinitionPostulate GeneralizableVar{} -> pure agdaDefinitionPostulate -- TODO: reflect generalizable vars AbstractDefn{}-> pure agdaDefinitionPostulate Primitive{primClauses = cs} | not $ null cs -> agdaDefinitionFunDef !@ quoteList quoteClause cs Primitive{} -> pure agdaDefinitionPrimitive Constructor{conData = d} -> agdaDefinitionDataConstructor !@! quoteName d return $ QuotingKit quoteTerm quoteType quoteClause (quoteDom quoteType) quoteDefn quoteList quoteString :: String -> Term quoteString = Lit . LitString noRange quoteName :: QName -> Term quoteName x = Lit (LitQName noRange x) quoteNat :: Integer -> Term quoteNat n | n >= 0 = Lit (LitNat noRange n) | otherwise = __IMPOSSIBLE__ quoteConName :: ConHead -> Term quoteConName = quoteName . conName quoteMeta :: AbsolutePath -> MetaId -> Term quoteMeta file = Lit . LitMeta noRange file quoteTerm :: Term -> TCM Term quoteTerm v = do kit <- quotingKit runReduceM (quoteTermWithKit kit v) quoteType :: Type -> TCM Term quoteType v = do kit <- quotingKit runReduceM (quoteTypeWithKit kit v) quoteDom :: Dom Type -> TCM Term quoteDom v = do kit <- quotingKit runReduceM (quoteDomWithKit kit v) quoteDefn :: Definition -> TCM Term quoteDefn def = do kit <- quotingKit runReduceM (quoteDefnWithKit kit def) quoteList :: [Term] -> TCM Term quoteList xs = do kit <- quotingKit runReduceM (quoteListWithKit kit pure xs) Agda-2.6.0.1/src/full/Agda/TypeChecking/Telescope.hs0000644000000000000000000005616313466402171020140 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Telescope where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad import Data.Foldable (forM_, find) import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import qualified Data.List as List import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Position import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.TypeChecking.Warnings import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.VarSet (VarSet) import qualified Agda.Utils.VarSet as VarSet #include "undefined.h" import Agda.Utils.Impossible -- | Flatten telescope: (Γ : Tel) -> [Type Γ] flattenTel :: Subst t a => Tele (Dom a) -> [Dom a] flattenTel EmptyTel = [] flattenTel (ExtendTel a tel) = raise (size tel + 1) a : flattenTel (absBody tel) {-# SPECIALIZE flattenTel :: Telescope -> [Dom Type] #-} -- | Order a flattened telescope in the correct dependeny order: Γ -> -- Permutation (Γ -> Γ~) -- -- Since @reorderTel tel@ uses free variable analysis of type in @tel@, -- the telescope should be 'normalise'd. reorderTel :: [Dom Type] -> Maybe Permutation reorderTel tel = topoSort comesBefore tel' where tel' = zip (downFrom $ size tel) tel (i, _) `comesBefore` (_, a) = i `freeIn` unEl (unDom a) -- a tiny bit unsafe reorderTel_ :: [Dom Type] -> Permutation reorderTel_ tel = case reorderTel tel of Nothing -> __IMPOSSIBLE__ Just p -> p -- | Unflatten: turns a flattened telescope into a proper telescope. Must be -- properly ordered. unflattenTel :: [ArgName] -> [Dom Type] -> Telescope unflattenTel [] [] = EmptyTel unflattenTel (x : xs) (a : tel) = ExtendTel a' (Abs x tel') where tel' = unflattenTel xs tel a' = applySubst rho a rho = parallelS (replicate (size tel + 1) __IMPOSSIBLE_TERM__) unflattenTel [] (_ : _) = __IMPOSSIBLE__ unflattenTel (_ : _) [] = __IMPOSSIBLE__ -- | Get the suggested names from a telescope teleNames :: Telescope -> [ArgName] teleNames = map (fst . unDom) . telToList teleArgNames :: Telescope -> [Arg ArgName] teleArgNames = map (argFromDom . fmap fst) . telToList teleArgs :: (DeBruijn a) => Tele (Dom t) -> [Arg a] teleArgs tel = [ Arg info (deBruijnVar i) | (i, Dom {domInfo = info, unDom = (n,_)}) <- zip (downFrom $ size l) l ] where l = telToList tel withNamedArgsFromTel :: [a] -> Telescope -> [NamedArg a] xs `withNamedArgsFromTel` tel = [ Arg info (Named (Just $ Ranged noRange $ argNameToString name) x) | (x, Dom {domInfo = info, unDom = (name,_)}) <- zip xs l ] where l = telToList tel teleNamedArgs :: (DeBruijn a) => Telescope -> [NamedArg a] teleNamedArgs tel = [ fmap (deBruijnVar i <$) $ namedArgFromDom dom | (i, dom) <- zip (downFrom $ size l) l ] where l = telToList tel -- | A variant of `teleNamedArgs` which takes the argument names (and the argument info) -- from the first telescope and the variable names from the second telescope. -- -- Precondition: the two telescopes have the same length. tele2NamedArgs :: (DeBruijn a) => Telescope -> Telescope -> [NamedArg a] tele2NamedArgs tel0 tel = [ Arg info (Named (Just $ Ranged noRange $ argNameToString argName) (debruijnNamedVar varName i)) | (i, Dom{domInfo = info, unDom = (argName,_)}, Dom{unDom = (varName,_)}) <- zip3 (downFrom $ size l) l0 l ] where l = telToList tel l0 = telToList tel0 -- | Split the telescope at the specified position. splitTelescopeAt :: Int -> Telescope -> (Telescope,Telescope) splitTelescopeAt n tel | n <= 0 = (EmptyTel, tel) | otherwise = splitTelescopeAt' n tel where splitTelescopeAt' _ EmptyTel = (EmptyTel,EmptyTel) splitTelescopeAt' 1 (ExtendTel a tel) = (ExtendTel a (tel $> EmptyTel), absBody tel) splitTelescopeAt' m (ExtendTel a tel) = (ExtendTel a (tel $> tel'), tel'') where (tel', tel'') = splitTelescopeAt (m - 1) $ absBody tel -- | Permute telescope: permutes or drops the types in the telescope according -- to the given permutation. Assumes that the permutation preserves the -- dependencies in the telescope. -- -- For example (Andreas, 2016-12-18, issue #2344): -- @ -- tel = (A : Set) (X : _18 A) (i : Fin (_m_23 A X)) -- tel (de Bruijn) = 2:Set, 1:_18 @0, 0:Fin(_m_23 @1 @0) -- flattenTel tel = 2:Set, 1:_18 @0, 0:Fin(_m_23 @1 @0) |- [ Set, _18 @2, Fin (_m_23 @2 @1) ] -- perm = 0,1,2 -> 0,1 (picks the first two) -- renaming _ perm = [var 0, var 1, error] -- THE WRONG RENAMING! -- renaming _ (flipP perm) = [error, var 1, var 0] -- The correct renaming! -- apply to flattened tel = ... |- [ Set, _18 @1, Fin (_m_23 @1 @0) ] -- permute perm it = ... |- [ Set, _18 @1 ] -- unflatten (de Bruijn) = 1:Set, 0: _18 @0 -- unflatten = (A : Set) (X : _18 A) -- @ permuteTel :: Permutation -> Telescope -> Telescope permuteTel perm tel = let names = permute perm $ teleNames tel types = permute perm $ renameP __IMPOSSIBLE__ (flipP perm) $ flattenTel tel in unflattenTel names types -- | Recursively computes dependencies of a set of variables in a given -- telescope. Any dependencies outside of the telescope are ignored. varDependencies :: Telescope -> IntSet -> IntSet varDependencies tel = allDependencies IntSet.empty where n = size tel ts = flattenTel tel directDependencies :: Int -> IntSet directDependencies i = allFreeVars $ indexWithDefault __IMPOSSIBLE__ ts (n-1-i) allDependencies :: IntSet -> IntSet -> IntSet allDependencies = IntSet.foldr $ \j soFar -> if j >= n || j `IntSet.member` soFar then soFar else IntSet.insert j $ allDependencies soFar $ directDependencies j -- | A telescope split in two. data SplitTel = SplitTel { firstPart :: Telescope , secondPart :: Telescope , splitPerm :: Permutation -- ^ The permutation takes us from the original telescope to -- @firstPart ++ secondPart@. } -- | Split a telescope into the part that defines the given variables and the -- part that doesn't. -- -- See 'Agda.TypeChecking.Tests.prop_splitTelescope'. splitTelescope :: VarSet -- ^ A set of de Bruijn indices. -> Telescope -- ^ Original telescope. -> SplitTel -- ^ @firstPart@ mentions the given variables, @secondPart@ not. splitTelescope fv tel = SplitTel tel1 tel2 perm where names = teleNames tel ts0 = flattenTel tel n = size tel is = varDependencies tel fv isC = IntSet.fromList [0..(n-1)] `IntSet.difference` is perm = Perm n $ map (n-1-) $ VarSet.toDescList is ++ VarSet.toDescList isC ts1 = renameP __IMPOSSIBLE__ (reverseP perm) (permute perm ts0) tel' = unflattenTel (permute perm names) ts1 m = size is (tel1, tel2) = telFromList -*- telFromList $ splitAt m $ telToList tel' -- | As splitTelescope, but fails if any additional variables or reordering -- would be needed to make the first part well-typed. splitTelescopeExact :: [Int] -- ^ A list of de Bruijn indices -> Telescope -- ^ The telescope to split -> Maybe SplitTel -- ^ @firstPart@ mentions the given variables in the given order, -- @secondPart@ contains all other variables splitTelescopeExact is tel = guard ok $> SplitTel tel1 tel2 perm where names = teleNames tel ts0 = flattenTel tel n = size tel checkDependencies :: IntSet -> [Int] -> Bool checkDependencies soFar [] = True checkDependencies soFar (j:js) = ok && checkDependencies (IntSet.insert j soFar) js where fv' = allFreeVars $ -- newline because of CPP indexWithDefault __IMPOSSIBLE__ ts0 (n-1-j) fv = fv' `IntSet.intersection` IntSet.fromAscList [ 0 .. n-1 ] ok = fv `IntSet.isSubsetOf` soFar ok = all ( [(Int,Term)] -- ^ Γ ⊢ var k_i : A_i ascending order, Γ ⊢ u_i : A_i -> Maybe (Telescope, -- ⊢ Γ' Substitution) -- Γ' ⊢ σ : Γ instantiateTelescopeN tel [] = return (tel, IdS) instantiateTelescopeN tel ((k,t):xs) = do (tel', sigma, _) <- instantiateTelescope tel k t (tel'', sigma') <- instantiateTelescopeN tel' (map (subtract 1 -*- applyPatSubst sigma) xs) return (tel'', applyPatSubst sigma sigma') -- | Try to instantiate one variable in the telescope (given by its de Bruijn -- level) with the given value, returning the new telescope and a -- substitution to the old one. Returns Nothing if the given value depends -- (directly or indirectly) on the variable. instantiateTelescope :: Telescope -- ^ ⊢ Γ -> Int -- ^ Γ ⊢ var k : A -> Term -- ^ Γ ⊢ u : A -> Maybe (Telescope, -- ⊢ Γ' PatternSubstitution, -- Γ' ⊢ σ : Γ Permutation) -- Γ ⊢ flipP ρ : Γ' instantiateTelescope tel k u = guard ok $> (tel', sigma, rho) where names = teleNames tel ts0 = flattenTel tel n = size tel j = n-1-k -- is0 is the part of Γ that is needed to type u is0 = varDependencies tel $ allFreeVars u -- is1 is the rest of Γ (minus the variable we are instantiating) is1 = IntSet.delete j $ IntSet.fromAscList [ 0 .. n-1 ] `IntSet.difference` is0 -- we work on de Bruijn indices, so later parts come first is = IntSet.toAscList is1 ++ IntSet.toAscList is0 -- if u depends on var j, we cannot instantiate ok = not $ j `IntSet.member` is0 perm = Perm n $ is -- works on de Bruijn indices rho = reverseP perm -- works on de Bruijn levels u1 = renameP __IMPOSSIBLE__ perm u -- Γ' ⊢ u1 : A' us = map (\i -> fromMaybe (dotP u1) (deBruijnVar <$> List.findIndex (i ==) is)) [ 0 .. n-1 ] sigma = us ++# raiseS (n-1) ts1 = permute rho $ applyPatSubst sigma ts0 tel' = unflattenTel (permute rho names) ts1 -- | Try to eta-expand one variable in the telescope (given by its de Bruijn -- level) expandTelescopeVar :: Telescope -- Γ = Γ₁(x : D pars)Γ₂ -> Int -- k = size Γ₁ -> Telescope -- Γ₁ ⊢ Δ -> ConHead -- Γ₁ ⊢ c : Δ → D pars -> ( Telescope -- Γ' = Γ₁ΔΓ₂[x ↦ c Δ] , PatternSubstitution) -- Γ' ⊢ ρ : Γ expandTelescopeVar gamma k delta c = (tel', rho) where (ts1,a:ts2) = fromMaybe __IMPOSSIBLE__ $ splitExactlyAt k $ telToList gamma cpi = noConPatternInfo { conPRecord = Just PatOSystem , conPType = Just $ snd <$> argFromDom a , conPLazy = True } cargs = map (setOrigin Inserted) $ teleNamedArgs delta cdelta = ConP c cpi cargs -- Γ₁Δ ⊢ c Δ : D pars rho0 = consS cdelta $ raiseS (size delta) -- Γ₁Δ ⊢ ρ₀ : Γ₁(x : D pars) rho = liftS (size ts2) rho0 -- Γ₁ΔΓ₂ρ₀ ⊢ ρ : Γ₁(x : D pars)Γ₂ gamma1 = telFromList ts1 gamma2' = applyPatSubst rho0 $ telFromList ts2 tel' = gamma1 `abstract` (delta `abstract` gamma2') -- | Gather leading Πs of a type in a telescope. telView :: Type -> TCM TelView telView = telViewUpTo (-1) -- | @telViewUpTo n t@ takes off the first @n@ function types of @t@. -- Takes off all if @n < 0@. telViewUpTo :: Int -> Type -> TCM TelView telViewUpTo n t = telViewUpTo' n (const True) t -- | @telViewUpTo' n p t@ takes off $t$ -- the first @n@ (or arbitrary many if @n < 0@) function domains -- as long as they satify @p@. telViewUpTo' :: Int -> (Dom Type -> Bool) -> Type -> TCM TelView telViewUpTo' 0 p t = return $ TelV EmptyTel t telViewUpTo' n p t = do t <- reduce t case unEl t of Pi a b | p a -> absV a (absName b) <$> telViewUpTo' (n - 1) p (absBody b) _ -> return $ TelV EmptyTel t where absV a x (TelV tel t) = TelV (ExtendTel a (Abs x tel)) t telViewPath :: Type -> TCM TelView telViewPath = telViewUpToPath (-1) -- | @telViewUpToPath n t@ takes off $t$ -- the first @n@ (or arbitrary many if @n < 0@) function domains or Path types. telViewUpToPath :: Int -> Type -> TCM TelView telViewUpToPath 0 t = return $ TelV EmptyTel t telViewUpToPath n t = do vt <- pathViewAsPi $ t case vt of Left (a,b) -> absV a (absName b) <$> telViewUpToPath (n - 1) (absBody b) Right (El _ t) | Pi a b <- t -> absV a (absName b) <$> telViewUpToPath (n - 1) (absBody b) Right t -> return $ TelV EmptyTel t where absV a x (TelV tel t) = TelV (ExtendTel a (Abs x tel)) t -- | [[ (i,(x,y)) ]] = [(i=0) -> x, (i=1) -> y] type Boundary = Boundary' (Term,Term) type Boundary' a = [(Term,a)] -- | Like @telViewUpToPath@ but also returns the @Boundary@ expected -- by the Path types encountered. The boundary terms live in the -- telescope given by the @TelView@. -- Each point of the boundary has the type of the codomain of the Path type it got taken from, see @fullBoundary@. telViewUpToPathBoundary' :: Int -> Type -> TCM (TelView,Boundary) telViewUpToPathBoundary' 0 t = return $ (TelV EmptyTel t,[]) telViewUpToPathBoundary' n t = do vt <- pathViewAsPi' $ t case vt of Left ((a,b),xy) -> addEndPoints xy . absV a (absName b) <$> telViewUpToPathBoundary' (n - 1) (absBody b) Right (El _ t) | Pi a b <- t -> absV a (absName b) <$> telViewUpToPathBoundary' (n - 1) (absBody b) Right t -> return $ (TelV EmptyTel t,[]) where absV a x (TelV tel t, cs) = (TelV (ExtendTel a (Abs x tel)) t, cs) addEndPoints xy (telv@(TelV tel _),cs) = (telv, (var $ size tel - 1, xyInTel):cs) where xyInTel = raise (size tel) xy fullBoundary :: Telescope -> Boundary -> Boundary fullBoundary tel bs = -- tel = Γ -- ΔΓ ⊢ b -- Δ ⊢ a = PiPath Γ bs b -- Δ.Γ ⊢ T is the codomain of the PathP at variable i -- Δ.Γ ⊢ i : I -- Δ.Γ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : T -- Δ.Γ | PiPath Γ bs A ⊢ teleElims tel bs : b let es = teleElims tel bs l = size tel in map (\ (t@(Var i []), xy) -> (t, xy `applyE` (drop (l - i) es))) bs -- | @(TelV Γ b, [(i,t_i,u_i)]) <- telViewUpToPathBoundary n a@ -- Input: Δ ⊢ a -- Output: ΔΓ ⊢ b -- ΔΓ ⊢ i : I -- ΔΓ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : b telViewUpToPathBoundary :: Int -> Type -> TCM (TelView,Boundary) telViewUpToPathBoundary i a = do (telv@(TelV tel b), bs) <- telViewUpToPathBoundary' i a return $ (telv, fullBoundary tel bs) -- | @(TelV Γ b, [(i,t_i,u_i)]) <- telViewUpToPathBoundaryP n a@ -- Input: Δ ⊢ a -- Output: Δ.Γ ⊢ b -- Δ.Γ ⊢ T is the codomain of the PathP at variable i -- Δ.Γ ⊢ i : I -- Δ.Γ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : T -- Useful to reconstruct IApplyP patterns after teleNamedArgs Γ. telViewUpToPathBoundaryP :: Int -> Type -> TCM (TelView,Boundary) telViewUpToPathBoundaryP = telViewUpToPathBoundary' telViewPathBoundaryP :: Type -> TCM (TelView,Boundary) telViewPathBoundaryP = telViewUpToPathBoundaryP (-1) -- | @teleElimsB args bs = es@ -- Input: Δ.Γ ⊢ args : Γ -- Δ.Γ ⊢ T is the codomain of the PathP at variable i -- Δ.Γ ⊢ i : I -- Δ.Γ ⊢ bs = [ (i=0) -> t_i; (i=1) -> u_i ] : T -- Output: Δ.Γ | PiPath Γ bs A ⊢ es : A teleElims :: DeBruijn a => Telescope -> Boundary' (a,a) -> [Elim' a] teleElims tel [] = map Apply $ teleArgs tel teleElims tel boundary = recurse (teleArgs tel) where recurse = fmap updateArg matchVar x = snd <$> flip find boundary (\case (Var i [],_) -> i == x _ -> __IMPOSSIBLE__) updateArg a@(Arg info p) = case deBruijnView p of Just i | Just (t,u) <- matchVar i -> IApply t u p _ -> Apply a pathViewAsPi :: Type -> TCM (Either (Dom Type, Abs Type) Type) pathViewAsPi t = either (Left . fst) Right <$> pathViewAsPi' t pathViewAsPi' :: Type -> TCM (Either ((Dom Type, Abs Type), (Term,Term)) Type) pathViewAsPi' t = do pathViewAsPi'whnf <*> reduce t pathViewAsPi'whnf :: TCM (Type -> Either ((Dom Type, Abs Type), (Term,Term)) Type) pathViewAsPi'whnf = do view <- pathView' minterval <- getBuiltin' builtinInterval return $ \ t -> case view t of PathType s l p a x y | Just interval <- minterval -> let name | Lam _ (Abs n _) <- unArg a = n | otherwise = "i" i = El Inf interval in Left $ ((defaultDom $ i, Abs name $ El (raise 1 s) $ raise 1 (unArg a) `apply` [defaultArg $ var 0]), (unArg x, unArg y)) _ -> Right t -- | returns Left (a,b) in case the type is @Pi a b@ or @PathP b _ _@ -- assumes the type is in whnf. piOrPath :: Type -> TCM (Either (Dom Type, Abs Type) Type) piOrPath t = do t <- pathViewAsPi'whnf <*> pure t case t of Left (p,_) -> return $ Left p Right (El _ (Pi a b)) -> return $ Left (a,b) Right t -> return $ Right t telView'UpToPath :: Int -> Type -> TCM TelView telView'UpToPath 0 t = return $ TelV EmptyTel t telView'UpToPath n t = do vt <- pathViewAsPi'whnf <*> pure t case vt of Left ((a,b),_) -> absV a (absName b) <$> telViewUpToPath (n - 1) (absBody b) Right (El _ t) | Pi a b <- t -> absV a (absName b) <$> telViewUpToPath (n - 1) (absBody b) Right t -> return $ TelV EmptyTel t where absV a x (TelV tel t) = TelV (ExtendTel a (Abs x tel)) t telView'Path :: Type -> TCM TelView telView'Path = telView'UpToPath (-1) isPath :: Type -> TCM (Maybe (Dom Type, Abs Type)) isPath t = either Just (const Nothing) <$> pathViewAsPi t telePatterns :: (DeBruijn a, DeBruijn (Pattern' a)) => Telescope -> Boundary -> [NamedArg (Pattern' a)] telePatterns = telePatterns' teleNamedArgs telePatterns' :: (DeBruijn a, DeBruijn (Pattern' a)) => (forall a. (DeBruijn a) => Telescope -> [NamedArg a]) -> Telescope -> Boundary -> [NamedArg (Pattern' a)] telePatterns' f tel [] = f tel telePatterns' f tel boundary = recurse $ f tel where recurse = (fmap . fmap . fmap) updateVar matchVar x = snd <$> flip find boundary (\case (Var i [],_) -> i == x _ -> __IMPOSSIBLE__) o = PatOSystem updateVar x = case deBruijnView x of Just i | Just (t,u) <- matchVar i -> IApplyP o t u x _ -> VarP o x -- | Decomposing a function type. mustBePi :: MonadReduce m => Type -> m (Dom Type, Abs Type) mustBePi t = ifNotPiType t __IMPOSSIBLE__ $ \ a b -> return (a,b) -- | If the given type is a @Pi@, pass its parts to the first continuation. -- If not (or blocked), pass the reduced type to the second continuation. ifPi :: MonadReduce m => Term -> (Dom Type -> Abs Type -> m a) -> (Term -> m a) -> m a ifPi t yes no = do t <- reduce t case t of Pi a b -> yes a b _ -> no t -- | If the given type is a @Pi@, pass its parts to the first continuation. -- If not (or blocked), pass the reduced type to the second continuation. ifPiType :: MonadReduce m => Type -> (Dom Type -> Abs Type -> m a) -> (Type -> m a) -> m a ifPiType (El s t) yes no = ifPi t yes (no . El s) -- | If the given type is blocked or not a @Pi@, pass it reduced to the first continuation. -- If it is a @Pi@, pass its parts to the second continuation. ifNotPi :: MonadReduce m => Term -> (Term -> m a) -> (Dom Type -> Abs Type -> m a) -> m a ifNotPi = flip . ifPi -- | If the given type is blocked or not a @Pi@, pass it reduced to the first continuation. -- If it is a @Pi@, pass its parts to the second continuation. ifNotPiType :: MonadReduce m => Type -> (Type -> m a) -> (Dom Type -> Abs Type -> m a) -> m a ifNotPiType = flip . ifPiType ifNotPiOrPathType :: (MonadReduce tcm, MonadTCM tcm) => Type -> (Type -> tcm a) -> (Dom Type -> Abs Type -> tcm a) -> tcm a ifNotPiOrPathType t no yes = do ifPiType t yes (\ t -> either (uncurry yes . fst) (const $ no t) =<< (liftTCM pathViewAsPi'whnf <*> pure t)) -- | A safe variant of 'piApply'. class PiApplyM a where piApplyM :: MonadReduce m => Type -> a -> m Type instance PiApplyM Term where piApplyM t v = ifNotPiType t __IMPOSSIBLE__ {-else-} $ \ _ b -> return $ absApp b v instance PiApplyM a => PiApplyM (Arg a) where piApplyM t = piApplyM t . unArg instance PiApplyM a => PiApplyM (Named n a) where piApplyM t = piApplyM t . namedThing instance PiApplyM a => PiApplyM [a] where piApplyM t = foldl (\ mt v -> mt >>= (`piApplyM` v)) (return t) -- | Compute type arity typeArity :: Type -> TCM Nat typeArity t = do TelV tel _ <- telView t return (size tel) --------------------------------------------------------------------------- -- * Instance definitions --------------------------------------------------------------------------- data OutputTypeName = OutputTypeName QName | OutputTypeVar | OutputTypeVisiblePi | OutputTypeNameNotYetKnown | NoOutputTypeName -- | Strips all hidden and instance Pi's and return the argument -- telescope and head definition name, if possible. getOutputTypeName :: Type -> TCM (Telescope, OutputTypeName) getOutputTypeName t = do TelV tel t' <- telViewUpTo' (-1) notVisible t ifBlocked (unEl t') (\ _ _ -> return (tel , OutputTypeNameNotYetKnown)) $ \ _ v -> case v of -- Possible base types: Def n _ -> return (tel , OutputTypeName n) Sort{} -> return (tel , NoOutputTypeName) Var n _ -> return (tel , OutputTypeVar) Pi{} -> return (tel , OutputTypeVisiblePi) -- Not base types: Con{} -> __IMPOSSIBLE__ Lam{} -> __IMPOSSIBLE__ Lit{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ MetaV{} -> __IMPOSSIBLE__ DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Register the definition with the given type as an instance addTypedInstance :: QName -> Type -> TCM () addTypedInstance x t = do (tel , n) <- getOutputTypeName t case n of OutputTypeName n -> addNamedInstance x n OutputTypeNameNotYetKnown -> addUnknownInstance x NoOutputTypeName -> warning $ WrongInstanceDeclaration OutputTypeVar -> warning $ WrongInstanceDeclaration OutputTypeVisiblePi -> warning $ InstanceWithExplicitArg x resolveUnknownInstanceDefs :: TCM () resolveUnknownInstanceDefs = do anonInstanceDefs <- getAnonInstanceDefs clearAnonInstanceDefs forM_ anonInstanceDefs $ \ n -> addTypedInstance n =<< typeOfConst n -- | Try to solve the instance definitions whose type is not yet known, report -- an error if it doesn't work and return the instance table otherwise. getInstanceDefs :: TCM InstanceTable getInstanceDefs = do resolveUnknownInstanceDefs insts <- getAllInstanceDefs unless (null $ snd insts) $ typeError $ GenericError $ "There are instances whose type is still unsolved" return $ fst insts Agda-2.6.0.1/src/full/Agda/TypeChecking/DeadCode.hs0000644000000000000000000000512113466402171017631 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.DeadCode (eliminateDeadCode) where import Control.Monad import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Foldable (foldMap, Foldable) import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Literal import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Internal import Agda.Syntax.Internal.Names import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import qualified Agda.Benchmarking as Bench import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Monad import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Reduce import Agda.Utils.HashMap (HashMap) import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.Impossible #include "undefined.h" -- | Run before serialisation to remove any definitions that are not reachable -- from the public interface to the module. eliminateDeadCode :: DisplayForms -> Signature -> TCM (DisplayForms, Signature) eliminateDeadCode disp sig = Bench.billTo [Bench.DeadCode] $ do patsyn <- getPatternSyns public <- Set.map anameName . publicNames <$> getScope defs <- traverse instantiateFull $ sig ^. sigDefinitions -- #2921: Eliminating definitions with attached COMPILE pragmas results in -- the pragmas not being checked. Simple solution: don't eliminate these. let hasCompilePragma = Set.fromList . HMap.keys . HMap.filter (not . Map.null . defCompiledRep) $ defs let r = reachableFrom (Set.union public hasCompilePragma) patsyn defs dead = Set.fromList (HMap.keys defs) `Set.difference` r valid = Set.null . Set.intersection dead . namesIn defs' = HMap.map ( \ d -> d { defDisplay = filter valid (defDisplay d) } ) $ HMap.filterWithKey (\ x _ -> Set.member x r) defs disp' = HMap.filter (not . null) $ HMap.map (filter valid) disp reportSLn "tc.dead" 10 $ "Removed " ++ show (HMap.size defs - HMap.size defs') ++ " unused definitions." return (disp', set sigDefinitions defs' sig) reachableFrom :: Set QName -> A.PatternSynDefns -> Definitions -> Set QName reachableFrom names psyns defs = follow names (Set.toList names) where follow visited [] = visited follow visited (x : xs) = follow (Set.union visited new) (Set.toList new ++ xs) where new = Set.filter (not . (`Set.member` visited)) $ case HMap.lookup x defs of Nothing -> namesIn (PSyn <$> Map.lookup x psyns) Just d -> namesIn d Agda-2.6.0.1/src/full/Agda/TypeChecking/Telescope.hs-boot0000644000000000000000000000061213466402171021065 0ustar0000000000000000 module Agda.TypeChecking.Telescope where import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Substitute class PiApplyM a where piApplyM :: MonadReduce m => Type -> a -> m Type instance PiApplyM Term where instance PiApplyM a => PiApplyM (Arg a) where instance PiApplyM a => PiApplyM [a] where telView :: Type -> TCM TelView Agda-2.6.0.1/src/full/Agda/TypeChecking/MetaVars.hs0000644000000000000000000015335013466402171017733 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE GADTs #-} module Agda.TypeChecking.MetaVars where import Prelude hiding (null) import Control.Monad.Reader import Data.Function import qualified Data.IntMap as IntMap import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Foldable as Fold import qualified Data.Traversable as Trav import Agda.Interaction.Options import Agda.Syntax.Abstract.Name as A import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.Syntax.Position (killRange) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Reduce import Agda.TypeChecking.Sort import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Constraints import Agda.TypeChecking.Free import Agda.TypeChecking.Level import Agda.TypeChecking.Records import Agda.TypeChecking.Pretty import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.EtaContract import Agda.TypeChecking.SizedTypes (boundedSizeMetaHook, isSizeProblem) import {-# SOURCE #-} Agda.TypeChecking.CheckInternal import {-# SOURCE #-} Agda.TypeChecking.Conversion -- import Agda.TypeChecking.CheckInternal -- import {-# SOURCE #-} Agda.TypeChecking.CheckInternal (checkInternal) import Agda.TypeChecking.MetaVars.Occurs import Agda.Utils.Except ( ExceptT , MonadError(throwError) , runExceptT ) import Agda.Utils.Function import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.Permutation import Agda.Utils.Pretty ( prettyShow, render ) import qualified Agda.Utils.VarSet as Set #include "undefined.h" import Agda.Utils.Impossible -- | Find position of a value in a list. -- Used to change metavar argument indices during assignment. -- -- @reverse@ is necessary because we are directly abstracting over the list. -- findIdx :: Eq a => [a] -> a -> Maybe Int findIdx vs v = List.findIndex (==v) (reverse vs) -- | Check whether a meta variable is a place holder for a blocked term. isBlockedTerm :: MetaId -> TCM Bool isBlockedTerm x = do reportSLn "tc.meta.blocked" 12 $ "is " ++ prettyShow x ++ " a blocked term? " i <- mvInstantiation <$> lookupMeta x let r = case i of BlockedConst{} -> True PostponedTypeCheckingProblem{} -> True InstV{} -> False Open{} -> False OpenInstance{} -> False reportSLn "tc.meta.blocked" 12 $ if r then " yes, because " ++ show i else " no" return r isEtaExpandable :: [MetaKind] -> MetaId -> TCM Bool isEtaExpandable kinds x = do i <- mvInstantiation <$> lookupMeta x return $ case i of Open{} -> True OpenInstance{} -> notElem Records kinds InstV{} -> False BlockedConst{} -> False PostponedTypeCheckingProblem{} -> False -- * Performing the assignment -- | Performing the meta variable assignment. -- -- The instantiation should not be an 'InstV' and the 'MetaId' -- should point to something 'Open' or a 'BlockedConst'. -- Further, the meta variable may not be 'Frozen'. assignTerm :: MetaId -> [Arg ArgName] -> Term -> TCM () assignTerm x tel v = do -- verify (new) invariants whenM (isFrozen x) __IMPOSSIBLE__ assignTerm' x tel v -- | Skip frozen check. Used for eta expanding frozen metas. assignTerm' :: MetaId -> [Arg ArgName] -> Term -> TCM () assignTerm' x tel v = do reportSLn "tc.meta.assign" 70 $ prettyShow x ++ " := " ++ show v ++ "\n in " ++ show tel -- verify (new) invariants whenM (not <$> asksTC envAssignMetas) __IMPOSSIBLE__ verboseS "profile.metas" 10 $ liftTCM $ tickMax "max-open-metas" . (fromIntegral . size) =<< getOpenMetas modifyMetaStore $ ins x $ InstV tel $ killRange v etaExpandListeners x wakeupConstraints x reportSLn "tc.meta.assign" 20 $ "completed assignment of " ++ prettyShow x where ins x i = IntMap.adjust (\ mv -> mv { mvInstantiation = i }) $ metaId x -- * Creating meta variables. -- | Create a sort meta that cannot be instantiated with 'Inf' (Setω). newSortMetaBelowInf :: TCM Sort newSortMetaBelowInf = do x <- newSortMeta hasBiggerSort x return x -- | Create a sort meta that may be instantiated with 'Inf' (Setω). newSortMeta :: TCM Sort newSortMeta = ifM hasUniversePolymorphism (newSortMetaCtx =<< getContextArgs) -- else (no universe polymorphism) $ do i <- createMetaInfo x <- newMeta Instantiable i normalMetaPriority (idP 0) $ IsSort () __DUMMY_TYPE__ return $ MetaS x [] -- | Create a sort meta that may be instantiated with 'Inf' (Setω). newSortMetaCtx :: Args -> TCM Sort newSortMetaCtx vs = do i <- createMetaInfo tel <- getContextTelescope let t = telePi_ tel __DUMMY_TYPE__ x <- newMeta Instantiable i normalMetaPriority (idP $ size tel) $ IsSort () t reportSDoc "tc.meta.new" 50 $ "new sort meta" <+> prettyTCM x <+> ":" <+> prettyTCM t return $ MetaS x $ map Apply vs newTypeMeta :: Sort -> TCM Type newTypeMeta s = El s . snd <$> newValueMeta RunMetaOccursCheck (sort s) newTypeMeta_ :: TCM Type newTypeMeta_ = newTypeMeta =<< (workOnTypes $ newSortMeta) -- TODO: (this could be made work with new uni-poly) -- Andreas, 2011-04-27: If a type meta gets solved, than we do not have to check -- that it has a sort. The sort comes from the solution. -- newTypeMeta_ = newTypeMeta Inf -- | @newInstanceMeta s t cands@ creates a new instance metavariable -- of type the output type of @t@ with name suggestion @s@. newInstanceMeta :: MetaNameSuggestion -> Type -> TCM (MetaId, Term) newInstanceMeta s t = do vs <- getContextArgs ctx <- getContextTelescope newInstanceMetaCtx s (telePi_ ctx t) vs newInstanceMetaCtx :: MetaNameSuggestion -> Type -> Args -> TCM (MetaId, Term) newInstanceMetaCtx s t vs = do reportSDoc "tc.meta.new" 50 $ fsep [ "new instance meta:" , nest 2 $ prettyTCM vs <+> "|-" ] -- Andreas, 2017-10-04, issue #2753: no metaOccurs check for instance metas i0 <- createMetaInfo' DontRunMetaOccursCheck let i = i0 { miNameSuggestion = s } TelV tel _ <- telView t let perm = idP (size tel) x <- newMeta' OpenInstance Instantiable i normalMetaPriority perm (HasType () t) reportSDoc "tc.meta.new" 50 $ fsep [ nest 2 $ pretty x <+> ":" <+> prettyTCM t ] let c = FindInstance x Nothing Nothing -- If we're not already solving instance constraints we should add this -- to the awake constraints to make sure we don't forget about it. If we -- are solving constraints it will get woken up later (see #2690) ifM isSolvingConstraints (addConstraint c) (addAwakeConstraint' c) etaExpandMetaSafe x return (x, MetaV x $ map Apply vs) -- | Create a new value meta with specific dependencies, possibly η-expanding in the process. newNamedValueMeta :: RunMetaOccursCheck -> MetaNameSuggestion -> Type -> TCM (MetaId, Term) newNamedValueMeta b s t = do (x, v) <- newValueMeta b t setMetaNameSuggestion x s return (x, v) -- | Create a new value meta with specific dependencies without η-expanding. newNamedValueMeta' :: RunMetaOccursCheck -> MetaNameSuggestion -> Type -> TCM (MetaId, Term) newNamedValueMeta' b s t = do (x, v) <- newValueMeta' b t setMetaNameSuggestion x s return (x, v) -- | Create a new metavariable, possibly η-expanding in the process. newValueMeta :: RunMetaOccursCheck -> Type -> TCM (MetaId, Term) newValueMeta b t = do vs <- getContextArgs tel <- getContextTelescope newValueMetaCtx Instantiable b t tel (idP $ size tel) vs newValueMetaCtx :: Frozen -> RunMetaOccursCheck -> Type -> Telescope -> Permutation -> Args -> TCM (MetaId, Term) newValueMetaCtx frozen b t tel perm ctx = mapSndM instantiateFull =<< newValueMetaCtx' frozen b t tel perm ctx -- | Create a new value meta without η-expanding. newValueMeta' :: RunMetaOccursCheck -> Type -> TCM (MetaId, Term) newValueMeta' b t = do vs <- getContextArgs tel <- getContextTelescope newValueMetaCtx' Instantiable b t tel (idP $ size tel) vs -- | Create a new value meta with specific dependencies. newValueMetaCtx' :: Frozen -> RunMetaOccursCheck -> Type -> Telescope -> Permutation -> Args -> TCM (MetaId, Term) newValueMetaCtx' frozen b a tel perm vs = do i <- createMetaInfo' b let t = telePi_ tel a x <- newMeta frozen i normalMetaPriority perm (HasType () t) reportSDoc "tc.meta.new" 50 $ fsep [ "new meta:" , nest 2 $ prettyTCM vs <+> "|-" , nest 2 $ pretty x <+> ":" <+> prettyTCM t ] etaExpandMetaSafe x -- Andreas, 2012-09-24: for Metas X : Size< u add constraint X+1 <= u let u = MetaV x $ map Apply vs boundedSizeMetaHook u tel a return (x, u) newTelMeta :: Telescope -> TCM Args newTelMeta tel = newArgsMeta (abstract tel $ __DUMMY_TYPE__) type Condition = Dom Type -> Abs Type -> Bool trueCondition :: Condition trueCondition _ _ = True newArgsMeta :: Type -> TCM Args newArgsMeta = newArgsMeta' trueCondition newArgsMeta' :: Condition -> Type -> TCM Args newArgsMeta' condition t = do args <- getContextArgs tel <- getContextTelescope newArgsMetaCtx' Instantiable condition t tel (idP $ size tel) args newArgsMetaCtx :: Type -> Telescope -> Permutation -> Args -> TCM Args newArgsMetaCtx = newArgsMetaCtx' Instantiable trueCondition newArgsMetaCtx' :: Frozen -> Condition -> Type -> Telescope -> Permutation -> Args -> TCM Args newArgsMetaCtx' frozen condition (El s tm) tel perm ctx = do tm <- reduce tm case tm of Pi dom@(Dom{domInfo = info, unDom = a}) codom | condition dom codom -> do let mod = getModality info -- Issue #3031: It's not enough to applyModalityToContext, since most (all?) -- of the context lives in tel. Don't forget the arguments in ctx. tel' = telFromList . map (mod `inverseApplyModality`) . telToList $ tel ctx' = (map . mapModality) (mod `inverseComposeModality`) ctx (m, u) <- applyModalityToContext info $ newValueMetaCtx frozen RunMetaOccursCheck a tel' perm ctx' setMetaArgInfo m (getArgInfo dom) args <- newArgsMetaCtx' frozen condition (codom `absApp` u) tel perm ctx return $ Arg info u : args _ -> return [] -- | Create a metavariable of record type. This is actually one metavariable -- for each field. newRecordMeta :: QName -> Args -> TCM Term newRecordMeta r pars = do args <- getContextArgs tel <- getContextTelescope newRecordMetaCtx Instantiable r pars tel (idP $ size tel) args newRecordMetaCtx :: Frozen -- ^ Should the meta be created frozen? -> QName -- ^ Name of record type -> Args -- ^ Parameters of record type. -> Telescope -> Permutation -> Args -> TCM Term newRecordMetaCtx frozen r pars tel perm ctx = do ftel <- flip apply pars <$> getRecordFieldTypes r fields <- newArgsMetaCtx' frozen trueCondition (telePi_ ftel __DUMMY_TYPE__) tel perm ctx con <- getRecordConstructor r return $ Con con ConOSystem (map Apply fields) newQuestionMark :: InteractionId -> Type -> TCM (MetaId, Term) newQuestionMark = newQuestionMark' $ newValueMeta' RunMetaOccursCheck newQuestionMark' :: (Type -> TCM (MetaId, Term)) -> InteractionId -> Type -> TCM (MetaId, Term) newQuestionMark' new ii t = do -- Andreas, 2016-07-29, issue 1720-2 -- This is slightly risky, as the same interaction id -- maybe be shared between different contexts. -- Blame goes to the record processing hack, see issue #424 -- and @ConcreteToAbstract.recordConstructorType@. let existing x = (x,) . MetaV x . map Apply <$> getContextArgs flip (caseMaybeM $ lookupInteractionMeta ii) existing $ {-else-} do -- Do not run check for recursive occurrence of meta in definitions, -- because we want to give the recursive solution interactively (Issue 589) (x, m) <- new t connectInteractionPoint ii x return (x, m) -- | Construct a blocked constant if there are constraints. blockTerm :: Type -> TCM Term -> TCM Term blockTerm t blocker = do (pid, v) <- newProblem blocker blockTermOnProblem t v pid blockTermOnProblem :: Type -> Term -> ProblemId -> TCM Term blockTermOnProblem t v pid = -- Andreas, 2012-09-27 do not block on unsolved size constraints ifM (isProblemSolved pid `or2M` isSizeProblem pid) (return v) $ do i <- createMetaInfo es <- map Apply <$> getContextArgs tel <- getContextTelescope x <- newMeta' (BlockedConst $ abstract tel v) Instantiable i lowMetaPriority (idP $ size tel) (HasType () $ telePi_ tel t) -- we don't instantiate blocked terms inTopContext $ addConstraint (Guarded (UnBlock x) pid) reportSDoc "tc.meta.blocked" 20 $ vcat [ "blocked" <+> prettyTCM x <+> ":=" <+> inTopContext (prettyTCM $ abstract tel v) , " by" <+> (prettyTCM =<< getConstraintsForProblem pid) ] inst <- isInstantiatedMeta x case inst of True -> instantiate (MetaV x es) False -> do -- We don't return the blocked term instead create a fresh metavariable -- that we compare against the blocked term once it's unblocked. This way -- blocked terms can be instantiated before they are unblocked, thus making -- constraint solving a bit more robust against instantiation order. -- Andreas, 2015-05-22: DontRunMetaOccursCheck to avoid Issue585-17. (_, v) <- newValueMeta DontRunMetaOccursCheck t i <- liftTCM fresh -- This constraint is woken up when unblocking, so it doesn't need a problem id. cmp <- buildProblemConstraint_ (ValueCmp CmpEq t v (MetaV x es)) listenToMeta (CheckConstraint i cmp) x return v blockTypeOnProblem :: Type -> ProblemId -> TCM Type blockTypeOnProblem (El s a) pid = El s <$> blockTermOnProblem (El Inf $ Sort s) a pid -- | @unblockedTester t@ returns @False@ if @t@ is a meta or a blocked term. -- -- Auxiliary function to create a postponed type checking problem. unblockedTester :: Type -> TCM Bool unblockedTester t = ifBlockedType t (\ m t -> return False) (\ _ t -> return True) -- | Create a postponed type checking problem @e : t@ that waits for type @t@ -- to unblock (become instantiated or its constraints resolved). postponeTypeCheckingProblem_ :: TypeCheckingProblem -> TCM Term postponeTypeCheckingProblem_ p = do postponeTypeCheckingProblem p (unblock p) where unblock (CheckExpr _ _ t) = unblockedTester t unblock (CheckArgs _ _ _ t _ _) = unblockedTester t -- The type of the head of the application. unblock (CheckProjAppToKnownPrincipalArg _ _ _ _ _ _ _ _ t) = unblockedTester t -- The type of the principal argument unblock (CheckLambda _ _ _ t) = unblockedTester t unblock (DoQuoteTerm _ _ _) = __IMPOSSIBLE__ -- also quoteTerm problems -- | Create a postponed type checking problem @e : t@ that waits for conditon -- @unblock@. A new meta is created in the current context that has as -- instantiation the postponed type checking problem. An 'UnBlock' constraint -- is added for this meta, which links to this meta. postponeTypeCheckingProblem :: TypeCheckingProblem -> TCM Bool -> TCM Term postponeTypeCheckingProblem p unblock = do i <- createMetaInfo' DontRunMetaOccursCheck tel <- getContextTelescope cl <- buildClosure p let t = problemType p m <- newMeta' (PostponedTypeCheckingProblem cl unblock) Instantiable i normalMetaPriority (idP (size tel)) $ HasType () $ telePi_ tel t -- Create the meta that we actually return -- Andreas, 2012-03-15 -- This is an alias to the pptc meta, in order to allow pruning (issue 468) -- and instantiation. -- Since this meta's solution comes from user code, we do not need -- to run the extended occurs check (metaOccurs) to exclude -- non-terminating solutions. es <- map Apply <$> getContextArgs (_, v) <- newValueMeta DontRunMetaOccursCheck t cmp <- buildProblemConstraint_ (ValueCmp CmpEq t v (MetaV m es)) i <- liftTCM fresh listenToMeta (CheckConstraint i cmp) m addConstraint (UnBlock m) return v -- | Type of the term that is produced by solving the 'TypeCheckingProblem'. problemType :: TypeCheckingProblem -> Type problemType (CheckExpr _ _ t ) = t problemType (CheckArgs _ _ _ _ t _ ) = t -- The target type of the application. problemType (CheckProjAppToKnownPrincipalArg _ _ _ _ _ t _ _ _) = t -- The target type of the application problemType (CheckLambda _ _ _ t ) = t problemType (DoQuoteTerm _ _ t) = t -- | Eta expand metavariables listening on the current meta. etaExpandListeners :: MetaId -> TCM () etaExpandListeners m = do ls <- getMetaListeners m clearMetaListeners m -- we don't really have to do this mapM_ wakeupListener ls -- | Wake up a meta listener and let it do its thing wakeupListener :: Listener -> TCM () -- Andreas 2010-10-15: do not expand record mvars, lazyness needed for irrelevance wakeupListener (EtaExpand x) = etaExpandMetaSafe x wakeupListener (CheckConstraint _ c) = do reportSDoc "tc.meta.blocked" 20 $ "waking boxed constraint" <+> prettyTCM c addAwakeConstraints [c] solveAwakeConstraints -- | Do safe eta-expansions for meta (@SingletonRecords,Levels@). etaExpandMetaSafe :: MetaId -> TCM () etaExpandMetaSafe = etaExpandMeta [SingletonRecords,Levels] -- | Various kinds of metavariables. data MetaKind = Records -- ^ Meta variables of record type. | SingletonRecords -- ^ Meta variables of \"hereditarily singleton\" record type. | Levels -- ^ Meta variables of level type, if type-in-type is activated. deriving (Eq, Enum, Bounded, Show) -- | All possible metavariable kinds. allMetaKinds :: [MetaKind] allMetaKinds = [minBound .. maxBound] -- | Eta expand a metavariable, if it is of the specified kind. -- Don't do anything if the metavariable is a blocked term. etaExpandMeta :: [MetaKind] -> MetaId -> TCM () etaExpandMeta kinds m = whenM (asksTC envAssignMetas `and2M` isEtaExpandable kinds m) $ do verboseBracket "tc.meta.eta" 20 ("etaExpandMeta " ++ prettyShow m) $ do let waitFor x = do reportSDoc "tc.meta.eta" 20 $ do "postponing eta-expansion of meta variable" <+> prettyTCM m <+> "which is blocked by" <+> prettyTCM x listenToMeta (EtaExpand m) x dontExpand = do reportSDoc "tc.meta.eta" 20 $ do "we do not expand meta variable" <+> prettyTCM m <+> text ("(requested was expansion of " ++ show kinds ++ ")") meta <- lookupMeta m case mvJudgement meta of IsSort{} -> dontExpand HasType _ a -> do reportSDoc "tc.meta.eta" 40 $ sep [ text "considering eta-expansion at type " , prettyTCM a , text " raw: " , pretty a ] TelV tel b <- telView a reportSDoc "tc.meta.eta" 40 $ sep [ text "considering eta-expansion at type" , addContext tel (prettyTCM b) , text "under telescope" , prettyTCM tel ] -- Eta expanding metas with a domFinite will just make sure -- they go unsolved: conversion will compare them at the -- different cases for the domain, so it will not find the -- solution for the whole meta. if any domFinite (flattenTel tel) then dontExpand else do -- if the target type @b@ of @m@ is a meta variable @x@ itself -- (@NonBlocked (MetaV{})@), -- or it is blocked by a meta-variable @x@ (@Blocked@), we cannot -- eta expand now, we have to postpone this. Once @x@ is -- instantiated, we can continue eta-expanding m. This is realized -- by adding @m@ to the listeners of @x@. ifBlocked (unEl b) (\ x _ -> waitFor x) $ \ _ t -> case t of lvl@(Def r es) -> ifM (isEtaRecord r) {- then -} (do let ps = fromMaybe __IMPOSSIBLE__ $ allApplyElims es let expand = do u <- withMetaInfo' meta $ newRecordMetaCtx (mvFrozen meta) r ps tel (idP $ size tel) $ teleArgs tel -- Andreas, 2019-03-18, AIM XXIX, issue #3597 -- When meta is frozen instantiate it with in-turn frozen metas. inTopContext $ do verboseS "tc.meta.eta" 15 $ do du <- prettyTCM u reportSDoc "tc.meta.eta" 15 $ sep [ "eta expanding: " <+> pretty m <+> " --> " , nest 2 $ prettyTCM u ] -- Andreas, 2012-03-29: No need for occurrence check etc. -- we directly assign the solution for the meta -- 2012-05-23: We also bypass the check for frozen. noConstraints $ assignTerm' m (telToArgs tel) u -- should never produce any constraints if Records `elem` kinds then expand else if (SingletonRecords `elem` kinds) then do singleton <- isSingletonRecord r ps case singleton of Left x -> waitFor x Right False -> dontExpand Right True -> expand else dontExpand ) $ {- else -} ifM (andM [ return $ Levels `elem` kinds , typeInType , (Just lvl ==) <$> getBuiltin' builtinLevel ]) (do reportSLn "tc.meta.eta" 20 $ "Expanding level meta to 0 (type-in-type)" -- Andreas, 2012-03-30: No need for occurrence check etc. -- we directly assign the solution for the meta noConstraints $ assignTerm m (telToArgs tel) (Level $ Max []) ) $ {- else -} dontExpand _ -> dontExpand -- | Eta expand blocking metavariables of record type, and reduce the -- blocked thing. etaExpandBlocked :: Reduce t => Blocked t -> TCM (Blocked t) etaExpandBlocked t@NotBlocked{} = return t etaExpandBlocked (Blocked m t) = do etaExpandMeta [Records] m t <- reduceB t case t of Blocked m' _ | m /= m' -> etaExpandBlocked t _ -> return t -- * Solve constraint @x vs = v@. -- | Assign to an open metavar which may not be frozen. -- First check that metavar args are in pattern fragment. -- Then do extended occurs check on given thing. -- -- Assignment is aborted by throwing a @PatternErr@ via a call to -- @patternViolation@. This error is caught by @catchConstraint@ -- during equality checking (@compareAtom@) and leads to -- restoration of the original constraints. assignV :: CompareDirection -> MetaId -> Args -> Term -> TCM () assignV dir x args v = assignWrapper dir x (map Apply args) v $ assign dir x args v assignWrapper :: CompareDirection -> MetaId -> Elims -> Term -> TCM () -> TCM () assignWrapper dir x es v doAssign = do ifNotM (asksTC envAssignMetas) patternViolation $ {- else -} do reportSDoc "tc.meta.assign" 10 $ do "term" <+> prettyTCM (MetaV x es) <+> text (":" ++ show dir) <+> prettyTCM v liftTCM $ nowSolvingConstraints doAssign `finally` solveAwakeConstraints -- | Miller pattern unification: -- -- @assign x vs v@ solves problem @x vs = v@ for meta @x@ -- if @vs@ are distinct variables (linearity check) -- and @v@ depends only on these variables -- and does not contain @x@ itself (occurs check). -- -- This is the basic story, but we have added some features: -- -- 1. Pruning. -- 2. Benign cases of non-linearity. -- 3. @vs@ may contain record patterns. -- -- For a reference to some of these extensions, read -- Andreas Abel and Brigitte Pientka's TLCA 2011 paper. assign :: CompareDirection -> MetaId -> Args -> Term -> TCM () assign dir x args v = do mvar <- lookupMeta x -- information associated with meta x let t = jMetaType $ mvJudgement mvar -- Andreas, 2011-05-20 TODO! -- full normalization (which also happens during occurs check) -- is too expensive! (see Issue 415) -- need to do something cheaper, especially if -- we are dealing with a Miller pattern that can be solved -- immediately! -- Ulf, 2011-08-25 DONE! -- Just instantiating the top-level meta, which is cheaper. The occurs -- check will first try without unfolding any definitions (treating -- arguments to definitions as flexible), if that fails it tries again -- with full unfolding. v <- instantiate v reportSDoc "tc.meta.assign" 45 $ "MetaVars.assign: assigning to " <+> prettyTCM v reportSLn "tc.meta.assign" 75 $ "MetaVars.assign: assigning meta " ++ show x ++ " with args " ++ show args ++ " to " ++ show v case (v, mvJudgement mvar) of (Sort s, HasType{}) -> hasBiggerSort s _ -> return () -- We don't instantiate frozen mvars when (mvFrozen mvar == Frozen) $ do reportSLn "tc.meta.assign" 25 $ "aborting: meta is frozen!" patternViolation -- We never get blocked terms here anymore. TODO: we actually do. why? whenM (isBlockedTerm x) $ do reportSLn "tc.meta.assign" 25 $ "aborting: meta is a blocked term!" patternViolation -- Andreas, 2010-10-15 I want to see whether rhs is blocked reportSLn "tc.meta.assign" 50 $ "MetaVars.assign: I want to see whether rhs is blocked" reportSDoc "tc.meta.assign" 25 $ do v0 <- reduceB v case v0 of Blocked m0 _ -> "r.h.s. blocked on:" <+> prettyTCM m0 NotBlocked{} -> "r.h.s. not blocked" -- Turn the assignment problem @_X args >= SizeLt u@ into -- @_X args = SizeLt (_Y args@ and constraint -- @_Y args >= u@. subtypingForSizeLt dir x mvar t args v $ \ v -> do -- Normalise and eta contract the arguments to the meta. These are -- usually small, and simplifying might let us instantiate more metas. -- MOVED TO expandProjectedVars: -- args <- etaContract =<< normalise args -- Also, try to expand away projected vars in meta args. reportSDoc "tc.meta.assign.proj" 45 $ do cxt <- getContextTelescope vcat [ "context before projection expansion" , nest 2 $ inTopContext $ prettyTCM cxt ] expandProjectedVars args v $ \ args v -> do reportSDoc "tc.meta.assign.proj" 45 $ do cxt <- getContextTelescope vcat [ "context after projection expansion" , nest 2 $ inTopContext $ prettyTCM cxt ] -- If we had the type here we could save the work we put -- into expanding projected variables. -- catchConstraint (ValueCmp CmpEq ? (MetaV m $ map Apply args) v) $ do -- Andreas, 2011-04-21 do the occurs check first -- e.g. _1 x (suc x) = suc (_2 x y) -- even though the lhs is not a pattern, we can prune the y from _2 (relVL, nonstrictVL, irrVL) <- do -- Andreas, 2016-11-03 #2211 attempt to do s.th. for unused if False -- irrelevant $ getMetaRelevance mvar then do reportSDoc "tc.meta.assign" 25 $ "meta is irrelevant or unused" return (Set.toList $ allFreeVars args, empty, empty) else do let vars = allFreeVarsWithOcc args relVL = IntMap.keys $ IntMap.filter isRelevant vars nonstrictVL = IntMap.keys $ IntMap.filter isNonStrict vars -- Andreas, 2011-10-06 only irrelevant vars that are direct -- arguments to the meta, hence, can be abstracted over, may -- appear on the rhs. (test/fail/Issue483b) -- Update 2011-03-27: Also irr. vars under record constructors. let fromIrrVar (Var i []) = return [i] fromIrrVar (Con c _ vs) = ifM (isNothing <$> isRecordConstructor (conName c)) (return []) $ concat <$> mapM (fromIrrVar . {- stripDontCare .-} unArg) (fromMaybe __IMPOSSIBLE__ (allApplyElims vs)) fromIrrVar _ = return [] irrVL <- concat <$> mapM fromIrrVar [ v | Arg info v <- args, isIrrelevant info ] -- irrelevant (getRelevance info) ] return (relVL, nonstrictVL, irrVL) reportSDoc "tc.meta.assign" 20 $ let pr (Var n []) = text (show n) pr (Def c []) = prettyTCM c pr _ = ".." in vcat [ "mvar args:" <+> sep (map (pr . unArg) args) , "fvars lhs (rel):" <+> sep (map (text . show) relVL) , "fvars lhs (nonstrict):" <+> sep (map (text . show) nonstrictVL) , "fvars lhs (irr):" <+> sep (map (text . show) irrVL) ] -- Check that the x doesn't occur in the right hand side. -- Prune mvars on rhs such that they can only depend on lhs vars. -- Herein, distinguish relevant and irrelevant vars, -- since when abstracting irrelevant lhs vars, they may only occur -- irrelevantly on rhs. v <- liftTCM $ occursCheck x (relVL, nonstrictVL, irrVL) v reportSLn "tc.meta.assign" 15 "passed occursCheck" verboseS "tc.meta.assign" 30 $ do let n = termSize v when (n > 200) $ reportSDoc "tc.meta.assign" 30 $ sep [ "size" <+> text (show n) -- , nest 2 $ "type" <+> prettyTCM t , nest 2 $ "term" <+> prettyTCM v ] -- Check linearity of @ids@ -- Andreas, 2010-09-24: Herein, ignore the variables which are not -- free in v -- Ulf, 2011-09-22: we need to respect irrelevant vars as well, otherwise -- we'll build solutions where the irrelevant terms are not valid let fvs = allFreeVars v reportSDoc "tc.meta.assign" 20 $ "fvars rhs:" <+> sep (map (text . show) $ Set.toList fvs) -- Check that the arguments are variables mids <- do res <- runExceptT $ inverseSubst args case res of -- all args are variables Right ids -> do reportSDoc "tc.meta.assign" 50 $ "inverseSubst returns:" <+> sep (map prettyTCM ids) return $ Just ids -- we have proper values as arguments which could be cased on -- here, we cannot prune, since offending vars could be eliminated Left CantInvert -> return Nothing -- we have non-variables, but these are not eliminateable Left NeutralArg -> Just <$> attemptPruning x args fvs -- we have a projected variable which could not be eta-expanded away: -- same as neutral Left ProjectedVar{} -> Just <$> attemptPruning x args fvs case mids of Nothing -> patternViolation -- Ulf 2014-07-13: actually not needed after all: attemptInertRHSImprovement x args v Just ids -> do -- Check linearity ids <- do res <- runExceptT $ checkLinearity {- (`Set.member` fvs) -} ids case res of -- case: linear Right ids -> return ids -- case: non-linear variables that could possibly be pruned Left () -> attemptPruning x args fvs -- Solve. m <- getContextSize assignMeta' m x t (length args) ids v where -- | Try to remove meta arguments from lhs that mention variables not occurring on rhs. attemptPruning :: MetaId -- ^ Meta-variable (lhs) -> Args -- ^ Meta arguments (lhs) -> FVs -- ^ Variables occuring on the rhs -> TCM a attemptPruning x args fvs = do -- non-linear lhs: we cannot solve, but prune killResult <- prune x args $ Set.toList fvs reportSDoc "tc.meta.assign" 10 $ "pruning" <+> prettyTCM x <+> do text $ if killResult `elem` [PrunedSomething,PrunedEverything] then "succeeded" else "failed" patternViolation {- UNUSED -- | When faced with @_X us == D vs@ for an inert D we can solve this by -- @_X xs := D _Ys@ with new constraints @_Yi us == vi@. This is important -- for instance arguments, where knowing the head D might enable progress. attemptInertRHSImprovement :: MetaId -> Args -> Term -> TCM () attemptInertRHSImprovement m args v = do reportSDoc "tc.meta.inert" 30 $ vcat [ "attempting inert rhs improvement" , nest 2 $ sep [ prettyTCM (MetaV m $ map Apply args) <+> "==" , prettyTCM v ] ] -- Check that the right-hand side has the form D vs, for some inert constant D. -- Returns the type of D and a function to build an application of D. (a, mkRHS) <- ensureInert v -- Check that all arguments to the meta are neutral and does not have head D. -- If there are non-neutral arguments there could be solutions to the meta -- that computes over these arguments. If D is an argument to the meta we get -- multiple solutions (for instance: _M Nat == Nat can be solved by both -- _M := \ x -> x and _M := \ x -> Nat). mapM_ (ensureNeutral (mkRHS []) . unArg) args tel <- theTel <$> (telView =<< getMetaType m) -- When attempting shortcut meta solutions, metas aren't necessarily fully -- eta expanded. If this is the case we skip inert improvement. when (length args < size tel) $ do reportSDoc "tc.meta.inert" 30 $ "not fully applied" patternViolation -- Solve the meta with _M := \ xs -> D (_Y1 xs) .. (_Yn xs), for fresh metas -- _Yi. metaArgs <- inTopContext $ addContext tel $ newArgsMeta a let varArgs = map Apply $ reverse $ zipWith (\i a -> var i <$ a) [0..] (reverse args) sol = mkRHS metaArgs argTel = map ("x" <$) args reportSDoc "tc.meta.inert" 30 $ nest 2 $ vcat [ "a =" <+> prettyTCM a , "tel =" <+> prettyTCM tel , "metas =" <+> prettyList (map prettyTCM metaArgs) , "sol =" <+> prettyTCM sol ] assignTerm m argTel sol patternViolation -- throwing a pattern violation here lets the constraint -- machinery worry about restarting the comparison. where ensureInert :: Term -> TCM (Type, Args -> Term) ensureInert v = do let notInert = do reportSDoc "tc.meta.inert" 30 $ nest 2 $ "not inert:" <+> prettyTCM v patternViolation toArgs elims = case allApplyElims elims of Nothing -> do reportSDoc "tc.meta.inert" 30 $ nest 2 $ "can't do projections from inert" patternViolation Just args -> return args case v of Var x elims -> (, Var x . map Apply) <$> typeOfBV x Con c ci args -> notInert -- (, Con c ci) <$> defType <$> getConstInfo (conName c) Def f elims -> do def <- getConstInfo f let good = return (defType def, Def f . map Apply) case theDef def of Axiom{} -> good Datatype{} -> good Record{} -> good Function{} -> notInert Primitive{} -> notInert Constructor{} -> __IMPOSSIBLE__ Pi{} -> notInert -- this is actually inert but improving doesn't buy us anything for Pi Lam{} -> notInert Sort{} -> notInert Lit{} -> notInert Level{} -> notInert MetaV{} -> notInert DontCare{} -> notInert ensureNeutral :: Term -> Term -> TCM () ensureNeutral rhs v = do b <- reduceB v let notNeutral v = do reportSDoc "tc.meta.inert" 30 $ nest 2 $ "not neutral:" <+> prettyTCM v patternViolation checkRHS arg | arg == rhs = do reportSDoc "tc.meta.inert" 30 $ nest 2 $ "argument shares head with RHS:" <+> prettyTCM arg patternViolation | otherwise = return () case b of Blocked{} -> notNeutral v NotBlocked r v -> -- Andrea(s) 2014-12-06 can r be useful? case v of Var x _ -> checkRHS (Var x []) Def f _ -> checkRHS (Def f []) Pi{} -> return () Sort{} -> return () Level{} -> return () Lit{} -> notNeutral v DontCare{} -> notNeutral v MetaV{} -> notNeutral v Con{} -> notNeutral v Lam{} -> notNeutral v -- END UNUSED -} -- | @assignMeta m x t ids u@ solves @x ids = u@ for meta @x@ of type @t@, -- where term @u@ lives in a context of length @m@. -- Precondition: @ids@ is linear. assignMeta :: Int -> MetaId -> Type -> [Int] -> Term -> TCM () assignMeta m x t ids v = do let n = length ids cand = List.sort $ zip ids $ map var $ downFrom n assignMeta' m x t n cand v -- | @assignMeta' m x t ids u@ solves @x = [ids]u@ for meta @x@ of type @t@, -- where term @u@ lives in a context of length @m@, -- and @ids@ is a partial substitution. assignMeta' :: Int -> MetaId -> Type -> Int -> SubstCand -> Term -> TCM () assignMeta' m x t n ids v = do -- we are linear, so we can solve! reportSDoc "tc.meta.assign" 25 $ "preparing to instantiate: " <+> prettyTCM v -- Rename the variables in v to make it suitable for abstraction over ids. v' <- do -- Basically, if -- Γ = a b c d e -- ids = d b e -- then -- v' = (λ a b c d e. v) _ 1 _ 2 0 -- -- Andreas, 2013-10-25 Solve using substitutions: -- Convert assocList @ids@ (which is sorted) into substitution, -- filling in __IMPOSSIBLE__ for the missing terms, e.g. -- [(0,0),(1,2),(3,1)] --> [0, 2, __IMP__, 1, __IMP__] -- ALT 1: O(m * size ids), serves as specification -- let ivs = [fromMaybe __IMPOSSIBLE__ $ lookup i ids | i <- [0..m-1]] -- ALT 2: O(m) let assocToList i l = case l of _ | i >= m -> [] ((j,u) : l) | i == j -> Just u : assocToList (i+1) l _ -> Nothing : assocToList (i+1) l ivs = assocToList 0 ids rho = prependS __IMPOSSIBLE__ ivs $ raiseS n return $ applySubst rho v -- Metas are top-level so we do the assignment at top-level. inTopContext $ do -- Andreas, 2011-04-18 to work with irrelevant parameters -- we need to construct tel' from the type of the meta variable -- (no longer from ids which may not be the complete variable list -- any more) reportSDoc "tc.meta.assign" 15 $ "type of meta =" <+> prettyTCM t reportSDoc "tc.meta.assign" 70 $ "type of meta =" <+> text (show t) (telv@(TelV tel' a),bs) <- telViewUpToPathBoundary n t reportSDoc "tc.meta.assign" 30 $ "tel' =" <+> prettyTCM tel' reportSDoc "tc.meta.assign" 30 $ "#args =" <+> text (show n) -- Andreas, 2013-09-17 (AIM XVIII): if t does not provide enough -- types for the arguments, it might be blocked by a meta; -- then we give up. (Issue 903) when (size tel' < n) patternViolation -- WAS: __IMPOSSIBLE__ -- Perform the assignment (and wake constraints). let vsol = abstract tel' v' -- Andreas, 2013-10-25 double check solution before assigning whenM (optDoubleCheck <$> pragmaOptions) $ noConstraints $ dontAssignMetas $ do m <- lookupMeta x reportSDoc "tc.meta.check" 30 $ "double checking solution" addContext tel' $ case mvJudgement m of HasType{} -> do reportSDoc "tc.meta.check" 30 $ nest 2 $ prettyTCM v' <+> " : " <+> prettyTCM a checkInternal v' a IsSort{} -> void $ do reportSDoc "tc.meta.check" 30 $ nest 2 $ prettyTCM v' <+> " is a sort" checkSort defaultAction =<< shouldBeSort (El __DUMMY_SORT__ v') reportSDoc "tc.meta.assign" 10 $ "solving" <+> prettyTCM x <+> ":=" <+> prettyTCM vsol v' <- blockOnBoundary telv bs v' assignTerm x (telToArgs tel') v' where blockOnBoundary :: TelView -> Boundary -> Term -> TCM Term blockOnBoundary telv [] v = return v blockOnBoundary (TelV tel t) bs v = addContext tel $ blockTerm t $ do neg <- primINeg forM_ bs $ \ (r,(x,y)) -> do equalTermOnFace (neg `apply1` r) t x v equalTermOnFace r t y v return v -- | Turn the assignment problem @_X args <= SizeLt u@ into -- @_X args = SizeLt (_Y args)@ and constraint -- @_Y args <= u@. subtypingForSizeLt :: CompareDirection -- ^ @dir@ -> MetaId -- ^ The meta variable @x@. -> MetaVariable -- ^ Its associated information @mvar <- lookupMeta x@. -> Type -- ^ Its type @t = jMetaType $ mvJudgement mvar@ -> Args -- ^ Its arguments. -> Term -- ^ Its to-be-assigned value @v@, such that @x args `dir` v@. -> (Term -> TCM ()) -- ^ Continuation taking its possibly assigned value. -> TCM () subtypingForSizeLt DirEq x mvar t args v cont = cont v subtypingForSizeLt dir x mvar t args v cont = do let fallback = cont v -- Check whether we have built-ins SIZE and SIZELT (mSize, mSizeLt) <- getBuiltinSize caseMaybe mSize fallback $ \ qSize -> do caseMaybe mSizeLt fallback $ \ qSizeLt -> do -- Check whether v is a SIZELT v <- reduce v case v of Def q [Apply (Arg ai u)] | q == qSizeLt -> do -- Clone the meta into a new size meta @y@. -- To this end, we swap the target of t for Size. TelV tel _ <- telView t let size = sizeType_ qSize t' = telePi tel size y <- newMeta Instantiable (mvInfo mvar) (mvPriority mvar) (mvPermutation mvar) (HasType __IMPOSSIBLE__ t') -- Note: no eta-expansion of new meta possible/necessary. -- Add the size constraint @y args `dir` u@. let yArgs = MetaV y $ map Apply args addConstraint $ dirToCmp (`ValueCmp` size) dir yArgs u -- We continue with the new assignment problem, and install -- an exception handler, since we created a meta and a constraint, -- so we cannot fall back to the original handler. let xArgs = MetaV x $ map Apply args v' = Def qSizeLt [Apply $ Arg ai yArgs] c = dirToCmp (`ValueCmp` sizeUniv) dir xArgs v' catchConstraint c $ cont v' _ -> fallback -- | Eta-expand bound variables like @z@ in @X (fst z)@. expandProjectedVars :: ( Show a, PrettyTCM a, NoProjectedVar a -- , Normalise a, TermLike a, Subst Term a , ReduceAndEtaContract a , PrettyTCM b, Subst Term b ) => a -- ^ Meta variable arguments. -> b -- ^ Right hand side. -> (a -> b -> TCM c) -> TCM c expandProjectedVars args v ret = loop (args, v) where loop (args, v) = do reportSDoc "tc.meta.assign.proj" 45 $ "meta args: " <+> prettyTCM args args <- callByName $ reduceAndEtaContract args -- args <- etaContract =<< normalise args reportSDoc "tc.meta.assign.proj" 45 $ "norm args: " <+> prettyTCM args reportSDoc "tc.meta.assign.proj" 85 $ "norm args: " <+> text (show args) let done = ret args v case noProjectedVar args of Right () -> do reportSDoc "tc.meta.assign.proj" 40 $ "no projected var found in args: " <+> prettyTCM args done Left (ProjVarExc i _) -> etaExpandProjectedVar i (args, v) done loop -- | Eta-expand a de Bruijn index of record type in context and passed term(s). etaExpandProjectedVar :: (PrettyTCM a, Subst Term a) => Int -> a -> TCM c -> (a -> TCM c) -> TCM c etaExpandProjectedVar i v fail succeed = do reportSDoc "tc.meta.assign.proj" 40 $ "trying to expand projected variable" <+> prettyTCM (var i) caseMaybeM (etaExpandBoundVar i) fail $ \ (delta, sigma, tau) -> do reportSDoc "tc.meta.assign.proj" 25 $ "eta-expanding var " <+> prettyTCM (var i) <+> " in terms " <+> prettyTCM v inTopContext $ addContext delta $ succeed $ applySubst tau v -- | Check whether one of the meta args is a projected var. class NoProjectedVar a where noProjectedVar :: a -> Either ProjVarExc () data ProjVarExc = ProjVarExc Int [(ProjOrigin, QName)] instance NoProjectedVar Term where noProjectedVar t = case t of Var i es | qs@(_:_) <- takeWhileJust id $ map isProjElim es -> Left $ ProjVarExc i qs -- Andreas, 2015-09-12 Issue #1316: -- Also look in inductive record constructors Con (ConHead _ Inductive (_:_)) _ es | Just vs <- allApplyElims es -> noProjectedVar vs _ -> return () instance NoProjectedVar a => NoProjectedVar (Arg a) where noProjectedVar = Fold.mapM_ noProjectedVar instance NoProjectedVar a => NoProjectedVar [a] where noProjectedVar = Fold.mapM_ noProjectedVar -- | Normalize just far enough to be able to eta-contract maximally. class (TermLike a, Subst Term a, Reduce a) => ReduceAndEtaContract a where reduceAndEtaContract :: a -> TCM a default reduceAndEtaContract :: (Traversable f, TermLike b, Subst Term b, Reduce b, ReduceAndEtaContract b, f b ~ a) => a -> TCM a reduceAndEtaContract = Trav.mapM reduceAndEtaContract instance ReduceAndEtaContract a => ReduceAndEtaContract [a] where instance ReduceAndEtaContract a => ReduceAndEtaContract (Arg a) where instance ReduceAndEtaContract Term where reduceAndEtaContract u = do reduce u >>= \case -- In case of lambda or record constructor, it makes sense to -- reduce further. Lam ai (Abs x b) -> etaLam ai x =<< reduceAndEtaContract b Con c ci es -> etaCon c ci es $ \ r c ci args -> do args <- reduceAndEtaContract args etaContractRecord r c ci args v -> return v {- UNUSED, BUT KEEP! -- Wrong attempt at expanding bound variables. -- The following code curries meta instead. -- | @etaExpandProjectedVar mvar x t n qs@ -- -- @mvar@ is the meta var info. -- @x@ is the meta variable we are trying to solve for. -- @t@ is its type. -- @n@ is the number of the meta arg we want to curry (starting at 0). -- @qs@ is the projection path along which we curry. -- etaExpandProjectedVar :: MetaVariable -> MetaId -> Type -> Int -> [QName] -> TCM a etaExpandProjectedVar mvar x t n qs = inTopContext $ do (_, uncurry, t') <- curryAt t n let TelV tel a = telView' t' perm = idP (size tel) y <- newMeta (mvInfo mvar) (mvPriority mvar) perm (HasType __IMPOSSIBLE__ t') assignTerm' x (uncurry $ MetaV y []) patternViolation -} {- -- first, strip the leading n domains (which remain unchanged) TelV gamma core <- telViewUpTo n t case unEl core of -- There should be at least one domain left Pi (Dom ai a) b -> do -- Eta-expand @dom@ along @qs@ into a telescope @tel@, computing a substitution. -- For now, we only eta-expand once. -- This might trigger another call to @etaExpandProjectedVar@ later. -- A more efficient version does all the eta-expansions at once here. (r, pars, def) <- fromMaybe __IMPOSSIBLE__ <$> isRecordType a unless (recEtaEquality def) __IMPOSSIBLE__ let tel = recTel def `apply` pars m = size tel v = Con (recConHead def) $ map var $ downFrom m b' = raise m b `absApp` v fs = recFields def vs = zipWith (\ f i -> Var i [Proj f]) fs $ downFrom m -- v = c (n-1) ... 1 0 (tel, u) <- etaExpandAtRecordType a $ var 0 -- TODO: compose argInfo ai with tel. -- Substitute into @b@. -- Abstract over @tel@. -- Abstract over @gamma@. -- Create new meta. -- Solve old meta, using substitution. patternViolation _ -> __IMPOSSIBLE__ -} type FVs = Set.VarSet type SubstCand = [(Int,Term)] -- ^ a possibly non-deterministic substitution -- | Turn non-det substitution into proper substitution, if possible. -- Otherwise, raise the error. checkLinearity :: SubstCand -> ExceptT () TCM SubstCand checkLinearity ids0 = do let ids = List.sortBy (compare `on` fst) ids0 -- see issue 920 let grps = groupOn fst ids concat <$> mapM makeLinear grps where -- | Non-determinism can be healed if type is singleton. [Issue 593] -- (Same as for irrelevance.) makeLinear :: SubstCand -> ExceptT () TCM SubstCand makeLinear [] = __IMPOSSIBLE__ makeLinear grp@[_] = return grp makeLinear (p@(i,t) : _) = ifM ((Right True ==) <$> do isSingletonTypeModuloRelevance =<< typeOfBV i) (return [p]) (throwError ()) -- Intermediate result in the following function type Res = [(Arg Nat, Term)] -- | Exceptions raised when substitution cannot be inverted. data InvertExcept = CantInvert -- ^ Cannot recover. | NeutralArg -- ^ A potentially neutral arg: can't invert, but can try pruning. | ProjectedVar Int [(ProjOrigin, QName)] -- ^ Try to eta-expand var to remove projs. -- | Check that arguments @args@ to a metavar are in pattern fragment. -- Assumes all arguments already in whnf and eta-reduced. -- Parameters are represented as @Var@s so @checkArgs@ really -- checks that all args are @Var@s and returns the "substitution" -- to be applied to the rhs of the equation to solve. -- (If @args@ is considered a substitution, its inverse is returned.) -- -- The returned list might not be ordered. -- Linearity, i.e., whether the substitution is deterministic, -- has to be checked separately. -- inverseSubst :: Args -> ExceptT InvertExcept TCM SubstCand inverseSubst args = map (mapFst unArg) <$> loop (zip args terms) where loop = foldM isVarOrIrrelevant [] terms = map var (downFrom (size args)) failure = do lift $ reportSDoc "tc.meta.assign" 15 $ vcat [ "not all arguments are variables: " <+> prettyTCM args , " aborting assignment" ] throwError CantInvert neutralArg = throwError NeutralArg isVarOrIrrelevant :: Res -> (Arg Term, Term) -> ExceptT InvertExcept TCM Res isVarOrIrrelevant vars (arg, t) = case arg of -- i := x Arg info (Var i []) -> return $ (Arg info i, t) `cons` vars -- π i := x try to eta-expand projection π away! Arg _ (Var i es) | Just qs <- mapM isProjElim es -> throwError $ ProjectedVar i qs -- (i, j) := x becomes [i := fst x, j := snd x] -- Andreas, 2013-09-17 but only if constructor is fully applied Arg info (Con c ci es) -> do let fallback | isIrrelevant info = return vars | otherwise = failure isRC <- lift $ isRecordConstructor $ conName c case isRC of Just (_, Record{ recFields = fs }) | length fs == length es -> do let aux (Arg _ v) (Arg info' f) = (Arg ai v,) $ t `applyE` [Proj ProjSystem f] where ai = ArgInfo { argInfoHiding = min (getHiding info) (getHiding info') , argInfoModality = Modality { modRelevance = max (getRelevance info) (getRelevance info') , modQuantity = max (getQuantity info) (getQuantity info') } , argInfoOrigin = min (getOrigin info) (getOrigin info') , argInfoFreeVariables = unknownFreeVariables } vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es res <- loop $ zipWith aux vs fs return $ res `append` vars | otherwise -> fallback Just _ -> __IMPOSSIBLE__ Nothing -> fallback -- An irrelevant argument which is not an irrefutable pattern is dropped Arg info _ | isIrrelevant info -> return vars -- Andreas, 2013-10-29 -- An irrelevant part can also be marked by a DontCare -- (coming from an irrelevant projection), see Issue 927: Arg _ DontCare{} -> return vars -- Distinguish args that can be eliminated (Con,Lit,Lam,unsure) ==> failure -- from those that can only put somewhere as a whole ==> neutralArg Arg _ Var{} -> neutralArg Arg _ Def{} -> neutralArg -- Note that this Def{} is in normal form and might be prunable. Arg _ Lam{} -> failure Arg _ Lit{} -> failure Arg _ MetaV{} -> failure Arg _ Pi{} -> neutralArg Arg _ Sort{} -> neutralArg Arg _ Level{} -> neutralArg Arg _ (Dummy s) -> __IMPOSSIBLE_VERBOSE__ s -- managing an assoc list where duplicate indizes cannot be irrelevant vars append :: Res -> Res -> Res append res vars = foldr cons vars res -- adding an irrelevant entry only if not present cons :: (Arg Nat, Term) -> Res -> Res cons a@(Arg ai i, t) vars | isIrrelevant ai = applyUnless (any ((i==) . unArg . fst) vars) (a :) vars | otherwise = a : -- adding a relevant entry -- filter out duplicate irrelevants filter (not . (\ a@(Arg info j, t) -> isIrrelevant info && i == j)) vars -- UNUSED -- -- | Used in 'Agda.Interaction.BasicOps.giveExpr'. -- updateMeta :: MetaId -> Term -> TCM () -- updateMeta mI v = do -- mv <- lookupMeta mI -- withMetaInfo' mv $ do -- args <- getContextArgs -- noConstraints $ assignV DirEq mI args v -- | Turn open metas into postulates. -- -- Preconditions: -- -- 1. We are 'inTopContext'. -- -- 2. 'envCurrentModule' is set to the top-level module. -- openMetasToPostulates :: TCM () openMetasToPostulates = do m <- asksTC envCurrentModule -- Go through all open metas. ms <- IntMap.assocs <$> useTC stMetaStore forM_ ms $ \ (x, mv) -> do when (isOpenMeta $ mvInstantiation mv) $ do let t = jMetaType $ mvJudgement mv -- Create a name for the new postulate. let r = clValue $ miClosRange $ mvInfo mv -- s <- render <$> prettyTCM x -- Using _ is a bad idea, as it prints as prefix op let s = "unsolved#meta." ++ show x n <- freshName r s let q = A.QName m n -- Debug. reportSDoc "meta.postulate" 20 $ vcat [ text ("Turning " ++ if isSortMeta_ mv then "sort" else "value" ++ " meta ") <+> prettyTCM (MetaId x) <+> " into postulate." , nest 2 $ vcat [ "Name: " <+> prettyTCM q , "Type: " <+> prettyTCM t ] ] -- Add the new postulate to the signature. addConstant q $ defaultDefn defaultArgInfo q t Axiom -- Solve the meta. let inst = InstV [] $ Def q [] updateMetaVar (MetaId x) $ \ mv0 -> mv0 { mvInstantiation = inst } return () Agda-2.6.0.1/src/full/Agda/TypeChecking/Records.hs-boot0000644000000000000000000000103013466402171020536 0ustar0000000000000000 module Agda.TypeChecking.Records where import Agda.Syntax.Common import Agda.Syntax.Internal import qualified Agda.Syntax.Concrete.Name as C import Agda.TypeChecking.Monad isRecord :: HasConstInfo m => QName -> m (Maybe Defn) isEtaRecord :: HasConstInfo m => QName -> m Bool getRecordFieldNames :: QName -> TCM [Arg C.Name] etaContractRecord :: HasConstInfo m => QName -> ConHead -> ConInfo -> Args -> m Term isGeneratedRecordConstructor :: QName -> TCM Bool isRecordConstructor :: HasConstInfo m => QName -> m (Maybe (QName, Defn)) Agda-2.6.0.1/src/full/Agda/TypeChecking/Injectivity.hs0000644000000000000000000004114613466402171020511 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Injectivity where import Prelude hiding (mapM) import Control.Applicative import Control.Arrow (first, second) import Control.Monad.State hiding (mapM, forM) import Control.Monad.Reader hiding (mapM, forM) import Control.Monad.Trans.Maybe import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set import Data.Maybe import Data.Traversable hiding (for) import Data.Semigroup ((<>)) import qualified Agda.Syntax.Abstract.Name as A import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Primitive import {-# SOURCE #-} Agda.TypeChecking.MetaVars import {-# SOURCE #-} Agda.TypeChecking.Conversion import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.Constraints import Agda.TypeChecking.Polarity import Agda.TypeChecking.Warnings import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Pretty ( prettyShow ) #include "undefined.h" import Agda.Utils.Impossible headSymbol :: Term -> TCM (Maybe TermHead) headSymbol v = do -- ignoreAbstractMode $ do -- Andreas, 2013-02-18 ignoreAbstractMode leads to information leakage v <- constructorForm =<< ignoreBlocking <$> reduceHead v case v of Def f _ -> do let yes = return $ Just $ ConsHead f no = return $ Nothing def <- theDef <$> do ignoreAbstractMode $ getConstInfo f -- Andreas, 2013-02-18 -- if we do not ignoreAbstractMode here, abstract Functions get turned -- into Axioms, but we want to distinguish these. case def of Datatype{} -> yes Record{} -> yes DataOrRecSig{} -> yes Axiom{} -> do reportSLn "tc.inj.axiom" 50 $ "headSymbol: " ++ prettyShow f ++ " is an Axiom." -- Don't treat axioms in the current mutual block -- as constructors (they might have definitions we -- don't know about yet). caseMaybeM (asksTC envMutualBlock) yes $ \ mb -> do fs <- mutualNames <$> lookupMutualBlock mb if Set.member f fs then no else yes Function{} -> no Primitive{} -> no GeneralizableVar{} -> __IMPOSSIBLE__ Constructor{} -> __IMPOSSIBLE__ AbstractDefn{}-> __IMPOSSIBLE__ Con c _ _ -> Just . ConsHead <$> canonicalName (conName c) Sort _ -> return (Just SortHead) Pi _ _ -> return (Just PiHead) Var i [] -> return (Just $ VarHead i) -- Only naked variables. Otherwise substituting a neutral term is not guaranteed to stay neutral. Lit _ -> return Nothing -- TODO: LitHead (for literals with no constructorForm) Lam{} -> return Nothing Var{} -> return Nothing Level{} -> return Nothing MetaV{} -> return Nothing DontCare{} -> return Nothing Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Do a full whnf and treat neutral terms as rigid. Used on the arguments to -- an injective functions and to the right-hand side. headSymbol' :: Term -> TCM (Maybe TermHead) headSymbol' v = do v <- traverse constructorForm =<< reduceB v case v of Blocked{} -> return Nothing NotBlocked _ v -> case v of Def g _ -> return $ Just $ ConsHead g Con c _ _ -> return $ Just $ ConsHead $ conName c Var i _ -> return $ Just (VarHead i) Sort _ -> return $ Just SortHead Pi _ _ -> return $ Just PiHead Lit _ -> return Nothing Lam{} -> return Nothing Level{} -> return Nothing MetaV{} -> return Nothing DontCare{} -> return Nothing Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Does deBruijn variable i correspond to a top-level argument, and if so -- which one (index from the left). topLevelArg :: Clause -> Int -> Maybe TermHead topLevelArg Clause{ namedClausePats = ps } i = case [ n | (n, VarP _ (DBPatVar _ j)) <- zip [0..] $ map namedArg ps, i == j ] of [] -> Nothing [n] -> Just (VarHead n) _:_:_ -> __IMPOSSIBLE__ -- | Join a list of inversion maps. joinHeadMaps :: [InversionMap c] -> InversionMap c joinHeadMaps = Map.unionsWith (<>) -- | Update the heads of an inversion map. updateHeads :: Monad m => (TermHead -> [c] -> m TermHead) -> InversionMap c -> m (InversionMap c) updateHeads f m = joinHeadMaps <$> mapM f' (Map.toList m) where f' (h, c) = (`Map.singleton` c) <$> f h c checkInjectivity :: QName -> [Clause] -> TCM FunctionInverse checkInjectivity f cs | pointless cs = do reportSLn "tc.inj.check.pointless" 20 $ "Injectivity of " ++ prettyShow (A.qnameToConcrete f) ++ " would be pointless." return NotInjective where -- Is it pointless to use injectivity for this function? pointless [] = True pointless (_:_:_) = False pointless [cl] = not $ any (properlyMatching . namedArg) $ namedClausePats cl -- Andreas, 2014-06-12 -- If we only have record patterns, it is also pointless. -- We need at least one proper match. checkInjectivity f cs = fromMaybe NotInjective <.> runMaybeT $ do reportSLn "tc.inj.check" 40 $ "Checking injectivity of " ++ prettyShow f let varToArg :: Clause -> TermHead -> MaybeT TCM TermHead varToArg c (VarHead i) = MaybeT $ return $ topLevelArg c i varToArg _ h = return h -- We don't need to consider absurd clauses let computeHead c@Clause{ clauseBody = Just body } = do h <- varToArg c =<< lift (fromMaybe UnknownHead <$> addContext (clauseTel c) (headSymbol body)) return [Map.singleton h [c]] computeHead _ = return [] hdMap <- joinHeadMaps . concat <$> mapM computeHead cs case Map.lookup UnknownHead hdMap of Just (_:_:_) -> empty -- More than one unknown head: we can't really do anything in that case. _ -> return () reportSLn "tc.inj.check" 20 $ prettyShow f ++ " is potentially injective." reportSDoc "tc.inj.check" 30 $ nest 2 $ vcat $ for (Map.toList hdMap) $ \ (h, uc) -> text (prettyShow h) <+> "-->" <+> case uc of [c] -> prettyTCM $ map namedArg $ namedClausePats c _ -> "(multiple clauses)" return $ Inverse hdMap -- | If a clause is over-applied we can't trust the head (Issue 2944). For -- instance, the clause might be `f ps = u , v` and the actual call `f vs -- .fst`. In this case the head will be the head of `u` rather than `_,_`. checkOverapplication :: Elims -> InversionMap Clause -> TCM (InversionMap Clause) checkOverapplication es = updateHeads overapplied where overapplied :: TermHead -> [Clause] -> TCM TermHead overapplied h cs | all (not . isOverapplied) cs = return h overapplied h cs = ifM (isSuperRigid h) (return h) (return UnknownHead) -- A super-rigid head is one that can't be eliminated. Crucially, this is -- applied after instantiateVars, so VarHeads are really bound variables. isSuperRigid SortHead = return True isSuperRigid PiHead = return True isSuperRigid VarHead{} = return True isSuperRigid UnknownHead = return True -- or False, doesn't matter isSuperRigid (ConsHead q) = do def <- getConstInfo q return $ case theDef def of Axiom{} -> True DataOrRecSig{} -> True AbstractDefn{} -> True Function{} -> False Datatype{} -> True Record{} -> True Constructor{conSrcCon = ConHead{ conFields = fs }} -> null fs -- Record constructors can be eliminated by projections Primitive{} -> False GeneralizableVar{} -> __IMPOSSIBLE__ isOverapplied Clause{ namedClausePats = ps } = length es > length ps -- | Turn variable heads, referring to top-level argument positions, into -- proper heads. These might still be `VarHead`, but in that case they refer to -- deBruijn variables. Checks that the instantiated heads are still rigid and -- distinct. instantiateVarHeads :: QName -> Elims -> InversionMap c -> TCM (Maybe (InversionMap c)) instantiateVarHeads f es m = runMaybeT $ updateHeads (const . instHead) m where instHead :: TermHead -> MaybeT TCM TermHead instHead h@(VarHead i) | Just (Apply arg) <- es !!! i = MaybeT $ headSymbol' (unArg arg) | otherwise = empty -- impossible? instHead h = return h -- | Argument should be in weak head normal form. functionInverse :: Term -> TCM InvView functionInverse v = case v of Def f es -> do inv <- defInverse <$> getConstInfo f case inv of NotInjective -> return NoInv Inverse m -> maybe NoInv (Inv f es) <$> (traverse (checkOverapplication es) =<< instantiateVarHeads f es m) -- NB: Invertible functions are never classified as -- projection-like, so this is fine, we are not -- missing parameters. (Andreas, 2013-11-01) _ -> return NoInv data InvView = Inv QName [Elim] (InversionMap Clause) | NoInv data MaybeAbort = Abort | KeepGoing -- | Precondition: The first argument must be blocked and the second must be -- neutral. useInjectivity :: CompareDirection -> Type -> Term -> Term -> TCM () useInjectivity dir ty blk neu = locallyTC eInjectivityDepth succ $ do inv <- functionInverse blk -- Injectivity might cause non-termination for unsatisfiable constraints -- (#431, #3067). Look at the number of active problems and the injectivity -- depth to detect this. nProblems <- Set.size <$> viewTC eActiveProblems injDepth <- viewTC eInjectivityDepth let depth = max nProblems injDepth maxDepth <- maxInversionDepth case inv of NoInv -> fallback -- not invertible Inv f blkArgs hdMap | depth > maxDepth -> warning (InversionDepthReached f) >> fallback | otherwise -> do reportSDoc "tc.inj.use" 30 $ fsep $ pwords "useInjectivity on" ++ [ prettyTCM blk, prettyTCM cmp, prettyTCM neu, ":", prettyTCM ty ] let canReduceToSelf = Map.member (ConsHead f) hdMap || Map.member UnknownHead hdMap allUnique = all isUnique hdMap isUnique [_] = True isUnique _ = False case neu of -- f us == f vs <=> us == vs -- Crucially, this relies on `f vs` being neutral and only works -- if `f` is not a possible head for `f us`. Def f' neuArgs | f == f', not canReduceToSelf -> do fTy <- defType <$> getConstInfo f reportSDoc "tc.inj.use" 20 $ vcat [ fsep (pwords "comparing application of injective function" ++ [prettyTCM f] ++ pwords "at") , nest 2 $ fsep $ punctuate comma $ map prettyTCM blkArgs , nest 2 $ fsep $ punctuate comma $ map prettyTCM neuArgs , nest 2 $ "and type" <+> prettyTCM fTy ] fs <- getForcedArgs f pol <- getPolarity' cmp f reportSDoc "tc.inj.invert.success" 20 $ hsep ["Successful spine comparison of", prettyTCM f] app (compareElims pol fs fTy (Def f [])) blkArgs neuArgs -- f us == c vs -- Find the clause unique clause `f ps` with head `c` and unify -- us == ps with fresh metas for the pattern variables of ps. -- If there's no such clause we can safely throw an error. _ -> headSymbol' neu >>= \ case Nothing -> do reportSDoc "tc.inj.use" 20 $ fsep $ pwords "no head symbol found for" ++ [prettyTCM neu] ++ pwords ", so not inverting" fallback Just (ConsHead f') | f == f', canReduceToSelf -> do reportSDoc "tc.inj.use" 20 $ fsep $ pwords "head symbol" ++ [prettyTCM f'] ++ pwords "can reduce to self, so not inverting" fallback -- We can't invert in this case, since we can't -- tell the difference between a solution that makes -- the blocked term neutral and one that makes progress. Just hd -> invertFunction cmp blk inv hd fallback err success where err = typeError $ app (\ u v -> UnequalTerms cmp u v ty) blk neu where fallback = addConstraint $ app (ValueCmp cmp ty) blk neu success blk' = app (compareTerm cmp ty) blk' neu (cmp, app) = case dir of DirEq -> (CmpEq, id) DirLeq -> (CmpLeq, id) DirGeq -> (CmpLeq, flip) -- | The second argument should be a blocked application and the third argument -- the inverse of the applied function. invertFunction :: Comparison -> Term -> InvView -> TermHead -> TCM () -> TCM () -> (Term -> TCM ()) -> TCM () invertFunction _ _ NoInv _ fallback _ _ = fallback invertFunction cmp blk (Inv f blkArgs hdMap) hd fallback err success = do fTy <- defType <$> getConstInfo f reportSDoc "tc.inj.use" 20 $ vcat [ "inverting injective function" hsep [prettyTCM f, ":", prettyTCM fTy] , "for" pretty hd , nest 2 $ "args =" <+> prettyList (map prettyTCM blkArgs) ] -- Clauses with unknown heads are also possible candidates case fromMaybe [] $ Map.lookup hd hdMap <> Map.lookup UnknownHead hdMap of [] -> err _:_:_ -> fallback [cl@Clause{ clauseTel = tel }] -> maybeAbort $ do let ps = clausePats cl perm = fromMaybe __IMPOSSIBLE__ $ clausePerm cl -- These are what dot patterns should be instantiated at ms <- map unArg <$> newTelMeta tel reportSDoc "tc.inj.invert" 20 $ vcat [ "meta patterns" <+> prettyList (map prettyTCM ms) , " perm =" <+> text (show perm) , " tel =" <+> prettyTCM tel , " ps =" <+> prettyList (map (text . show) ps) ] -- and this is the order the variables occur in the patterns let msAux = permute (invertP __IMPOSSIBLE__ $ compactP perm) ms let sub = parallelS (reverse ms) margs <- runReaderT (evalStateT (mapM metaElim ps) msAux) sub reportSDoc "tc.inj.invert" 20 $ vcat [ "inversion" , nest 2 $ vcat [ "lhs =" <+> prettyTCM margs , "rhs =" <+> prettyTCM blkArgs , "type =" <+> prettyTCM fTy ] ] -- Since we do not care for the value of non-variant metas here, -- we can treat 'Nonvariant' as 'Invariant'. -- That ensures these metas do not remain unsolved. pol <- purgeNonvariant <$> getPolarity' cmp f fs <- getForcedArgs f -- The clause might not give as many patterns as there -- are arguments (point-free style definitions). let blkArgs' = take (length margs) blkArgs compareElims pol fs fTy (Def f []) margs blkArgs' -- Check that we made progress. r <- runReduceM $ unfoldDefinitionStep False blk f blkArgs case r of YesReduction _ blk' -> do reportSDoc "tc.inj.invert.success" 20 $ hsep ["Successful inversion of", prettyTCM f, "at", pretty hd] KeepGoing <$ success blk' NoReduction{} -> do reportSDoc "tc.inj.invert" 30 $ vcat [ "aborting inversion;" <+> prettyTCM blk , "does not reduce" ] return Abort where maybeAbort m = do (a, s) <- localTCStateSaving m case a of KeepGoing -> putTC s Abort -> fallback nextMeta = do m : ms <- get put ms return m dotP :: Monad m => Term -> StateT [Term] (ReaderT Substitution m) Term dotP v = do sub <- ask return $ applySubst sub v metaElim (Arg _ (ProjP o p)) = lift $ lift $ Proj o <$> getOriginalProjection p metaElim (Arg info p) = Apply . Arg info <$> metaPat p metaArgs args = mapM (traverse $ metaPat . namedThing) args metaPat (DotP _ v) = dotP v metaPat (VarP _ _) = nextMeta metaPat (IApplyP{}) = nextMeta metaPat (ConP c mt args) = Con c (fromConPatternInfo mt) . map Apply <$> metaArgs args metaPat (DefP o q args) = Def q . map Apply <$> metaArgs args metaPat (LitP l) = return $ Lit l metaPat ProjP{} = __IMPOSSIBLE__ forcePiUsingInjectivity :: Type -> TCM Type forcePiUsingInjectivity t = reduceB t >>= \ case Blocked _ blkTy -> do let blk = unEl blkTy inv <- functionInverse blk blkTy <$ invertFunction CmpEq blk inv PiHead fallback err success NotBlocked _ t -> return t where fallback = return () err = typeError (ShouldBePi t) success _ = return () Agda-2.6.0.1/src/full/Agda/TypeChecking/Datatypes.hs0000644000000000000000000002561513466402171020151 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Datatypes where import Control.Monad.Except import Data.Maybe (fromMaybe) import qualified Data.List as List import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (constructorForm) import Agda.TypeChecking.Telescope import Agda.TypeChecking.Substitute import Agda.TypeChecking.Pretty import Agda.Utils.Either import Agda.Utils.Functor import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Constructors --------------------------------------------------------------------------- -- | Get true constructor with record fields. getConHead :: (HasConstInfo m) => QName -> m (Either SigError ConHead) getConHead c = runExceptT $ do def <- ExceptT $ getConstInfo' c case theDef def of Constructor { conSrcCon = c' } -> return c' Record { recConHead = c' } -> return c' _ -> throwError $ SigUnknown $ prettyShow c ++ " is not a constructor" -- | Get true constructor with fields, expanding literals to constructors -- if possible. getConForm :: QName -> TCM (Either SigError ConHead) getConForm c = caseEitherM (getConHead c) (return . Left) $ \ ch -> do Con con _ [] <- constructorForm (Con ch ConOCon []) return $ Right con -- | Augment constructor with record fields (preserve constructor name). -- The true constructor might only surface via 'reduce'. getOrigConHead :: QName -> TCM (Either SigError ConHead) getOrigConHead c = mapRight (setConName c) <$> getConHead c -- | Get the name of the datatype constructed by a given constructor. -- Precondition: The argument must refer to a constructor {-# SPECIALIZE getConstructorData :: QName -> TCM QName #-} getConstructorData :: HasConstInfo m => QName -> m QName getConstructorData c = do def <- getConstInfo c case theDef def of Constructor{conData = d} -> return d _ -> __IMPOSSIBLE__ -- | Is the datatype of this constructor a Higher Inductive Type? -- Precondition: The argument must refer to a constructor of a datatype or record. consOfHIT :: QName -> TCM Bool consOfHIT c = do d <- getConstructorData c def <- theDef <$> getConstInfo d case def of Datatype {dataPathCons = xs} -> return $ not $ null xs Record{} -> return False _ -> __IMPOSSIBLE__ -- | @getConType c t@ computes the constructor parameters from type @t@ -- and returns them plus the instantiated type of constructor @c@. -- This works also if @t@ is a function type ending in a data/record type; -- the term from which @c@ comes need not be fully applied -- -- @Nothing@ if @t@ is not a data/record type or does not have -- a constructor @c@. getConType :: ConHead -- ^ Constructor. -> Type -- ^ Ending in data/record type. -> TCM (Maybe ((QName, Type, Args), Type)) -- ^ @Nothing@ if not ends in data or record type. -- -- @Just ((d, dt, pars), ct)@ otherwise, where -- @d@ is the data or record type name, -- @dt@ is the type of the data or record name, -- @pars@ are the reconstructed parameters, -- @ct@ is the type of the constructor instantiated to the parameters. getConType c t = do reportSDoc "tc.getConType" 30 $ sep $ [ "getConType: constructor " , prettyTCM c , " at type " , prettyTCM t ] TelV tel t <- telView t -- Now @t@ lives under @tel@, we need to remove the dependency on @tel@. -- This will succeed if @t@ is indeed a data/record type that is the -- type of a constructor coming from a term -- (applied to at least the parameters). -- Note: @t@ will have some unbound deBruijn indices if view outside of @tel@. reportSLn "tc.getConType" 35 $ " target type: " ++ prettyShow t applySubst (strengthenS __IMPOSSIBLE__ (size tel)) <$> do addContext tel $ getFullyAppliedConType c t -- Andreas, 2017-08-18, issue #2703: -- The original code -- getFullyAppliedConType c $ applySubst (strengthenS __IMPOSSIBLE__ (size tel)) t -- crashes because substitution into @Def@s is slightly too strict -- (see @defApp@ and @canProject@). -- Strengthening the parameters after the call to @getFullyAppliedConType@ -- does not produce intermediate terms with __IMPOSSIBLE__s and this thus -- robust wrt. strictness/laziness of substitution. -- | @getFullyAppliedConType c t@ computes the constructor parameters -- from data type @t@ and returns them -- plus the instantiated type of constructor @c@. -- -- @Nothing@ if @t@ is not a data/record type or does not have -- a constructor @c@. -- -- Precondition: @t@ is reduced. getFullyAppliedConType :: (HasConstInfo m, MonadReduce m, MonadDebug m) => ConHead -- ^ Constructor. -> Type -- ^ Reduced type of the fully applied constructor. -> m (Maybe ((QName, Type, Args), Type)) -- ^ @Nothing@ if not data or record type. -- -- @Just ((d, dt, pars), ct)@ otherwise, where -- @d@ is the data or record type name, -- @dt@ is the type of the data or record name, -- @pars@ are the reconstructed parameters, -- @ct@ is the type of the constructor instantiated to the parameters. getFullyAppliedConType c t = do reportSLn "tc.getConType" 35 $ List.intercalate " " $ [ "getFullyAppliedConType", prettyShow c, prettyShow t ] c <- fromRight __IMPOSSIBLE__ <$> do getConHead $ conName c case unEl t of -- Note that if we come e.g. from getConType, -- then the non-parameter arguments of @es@ might contain __IMPOSSIBLE__ -- coming from strengthening. (Thus, printing them is not safe.) Def d es -> do reportSLn "tc.getConType" 35 $ List.intercalate " " $ [ "getFullyAppliedConType: case Def", prettyShow d, prettyShow es ] def <- getConstInfo d let cont n = do -- At this point we can be sure that the parameters are well-scoped. let pars = fromMaybe __IMPOSSIBLE__ $ allApplyElims $ take n es Just . ((d, defType def, pars),) <$> do (`piApplyM` pars) . defType =<< getConInfo c case theDef def of Datatype { dataPars = n, dataCons = cs } | conName c `elem` cs -> cont n Record { recPars = n, recConHead = con } | c == con -> cont n _ -> return Nothing _ -> return Nothing data ConstructorInfo = DataCon Nat -- ^ Arity. | RecordCon HasEta [Arg QName] -- ^ List of field names. -- | Return the number of non-parameter arguments to a data constructor, -- or the field names of a record constructor. -- -- For getting just the arity of constructor @c@, -- use @either id size <$> getConstructorArity c@. getConstructorInfo :: QName -> TCM ConstructorInfo getConstructorInfo c = do (theDef <$> getConstInfo c) >>= \case Constructor{ conData = d, conArity = n } -> do (theDef <$> getConstInfo d) >>= \case r@Record{ recFields = fs } -> return $ RecordCon (recEtaEquality r) fs Datatype{} -> return $ DataCon n _ -> __IMPOSSIBLE__ _ -> __IMPOSSIBLE__ --------------------------------------------------------------------------- -- * Data types --------------------------------------------------------------------------- -- | Check if a name refers to a datatype or a record with a named constructor. isDatatype :: QName -> TCM Bool isDatatype d = do def <- getConstInfo d case theDef def of Datatype{} -> return True Record{recNamedCon = namedC} -> return namedC _ -> return False -- | Check if a name refers to a datatype or a record. isDataOrRecordType :: QName -> TCM (Maybe DataOrRecord) isDataOrRecordType d = do def <- getConstInfo d case theDef def of Datatype{} -> return $ Just IsData Record{} -> return $ Just IsRecord _ -> return $ Nothing -- | Precodition: 'Term' is 'reduce'd. isDataOrRecord :: Term -> TCM (Maybe QName) isDataOrRecord v = do case v of Def d _ -> fmap (const d) <$> isDataOrRecordType d _ -> return Nothing getNumberOfParameters :: QName -> TCM (Maybe Nat) getNumberOfParameters d = do def <- getConstInfo d case theDef def of Datatype{ dataPars = n } -> return $ Just n Record{ recPars = n } -> return $ Just n Constructor{ conPars = n } -> return $ Just n _ -> return Nothing -- | Precondition: Name is a data or record type. getConstructors :: QName -> TCM [QName] getConstructors d = fromMaybe __IMPOSSIBLE__ <$> getConstructors' d -- | 'Nothing' if not data or record type name. getConstructors' :: QName -> TCM (Maybe [QName]) getConstructors' d = getConstructors_ . theDef <$> getConstInfo d -- | 'Nothing' if not data or record definition. getConstructors_ :: Defn -> Maybe [QName] getConstructors_ = \case Datatype{dataCons = cs} -> Just cs Record{recConHead = h} -> Just [conName h] _ -> Nothing -- | Precondition: Name is a data or record type. getConHeads :: QName -> TCM [ConHead] getConHeads d = fromMaybe __IMPOSSIBLE__ <$> getConHeads' d -- | 'Nothing' if not data or record type name. getConHeads' :: QName -> TCM (Maybe [ConHead]) getConHeads' d = getConHeads_ . theDef <$> getConstInfo d -- | 'Nothing' if not data or record definition. getConHeads_ :: Defn -> Maybe [ConHead] getConHeads_ = \case Datatype{dataCons = cs} -> Just $ map (\ c -> ConHead c Inductive []) cs Record{recConHead = h} -> Just [h] _ -> Nothing {- UNUSED data DatatypeInfo = DataInfo { datatypeName :: QName , datatypeParTel :: Telescope , datatypePars :: Args , datatypeIxTel :: Telescope , datatypeIxs :: Args } -- | Get the name and parameters from a type if it's a datatype or record type -- with a named constructor. getDatatypeInfo :: Type -> TCM (Maybe DatatypeInfo) getDatatypeInfo t = do t <- reduce t case unEl t of Def d args -> do n <- getDefFreeVars d args <- return $ genericDrop n args def <- instantiateDef =<< getConstInfo d TelV tel _ <- telView (defType def) let npars = case theDef def of Datatype{dataPars = np} -> Just np Record{recPars = np, recNamedCon = True} | genericLength args == np -> Just np | otherwise -> __IMPOSSIBLE__ _ -> Nothing return $ do np <- npars let (pt, it) = genericSplitAt np $ telToList tel parTel = telFromList pt ixTel = telFromList it (ps, is) = genericSplitAt np args return $ DataInfo { datatypeName = d , datatypeParTel = parTel , datatypePars = ps , datatypeIxTel = ixTel , datatypeIxs = is } _ -> return Nothing -} Agda-2.6.0.1/src/full/Agda/TypeChecking/Pretty.hs0000644000000000000000000004275513466402171017506 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- To define <>, we need to add with GHC >= 8.4 -- -- import Prelude hiding ((<>)) -- -- but using that gives warnings and doesn't silence -Wsemigroup in -- some versions of GHC. #if __GLASGOW_HASKELL__ >= 800 && __GLASGOW_HASKELL__ < 804 {-# OPTIONS_GHC -Wno-semigroup #-} #endif module Agda.TypeChecking.Pretty where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Applicative hiding (empty) import Control.Monad import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Internal import Agda.Syntax.Literal import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Translation.ReflectedToAbstract import Agda.Syntax.Translation.AbstractToConcrete import qualified Agda.Syntax.Translation.ReflectedToAbstract as R import qualified Agda.Syntax.Reflected as R import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Reflected as R import qualified Agda.Syntax.Abstract.Pretty as AP import Agda.Syntax.Concrete.Pretty (bracesAndSemicolons) import qualified Agda.Syntax.Concrete.Pretty as CP import qualified Agda.Syntax.Info as A import Agda.Syntax.Scope.Monad (withContextPrecedence) import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (equalityUnview) import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Substitute import Agda.Utils.Graph.AdjacencyMap.Unidirectional (Graph) import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as Graph import Agda.Utils.Maybe import Agda.Utils.Null import Agda.Utils.Permutation (Permutation) import Agda.Utils.Pretty (Pretty, prettyShow) import qualified Agda.Utils.Pretty as P #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Wrappers for pretty printing combinators --------------------------------------------------------------------------- type Doc = P.Doc comma, colon, equals :: TCM Doc comma = return P.comma colon = return P.colon equals = return P.equals pretty :: P.Pretty a => a -> TCM Doc pretty x = return $ P.pretty x prettyA :: (P.Pretty c, ToConcrete a c) => a -> TCM Doc prettyA x = AP.prettyA x prettyAs :: (P.Pretty c, ToConcrete a [c]) => a -> TCM Doc prettyAs x = AP.prettyAs x text :: String -> TCM Doc text s = return $ P.text s multiLineText :: String -> TCM Doc multiLineText s = return $ P.multiLineText s pwords :: String -> [TCM Doc] pwords s = map return $ P.pwords s fwords :: String -> TCM Doc fwords s = return $ P.fwords s sep, fsep, hsep, hcat, vcat :: [TCM Doc] -> TCM Doc sep ds = P.sep <$> sequence ds fsep ds = P.fsep <$> sequence ds hsep ds = P.hsep <$> sequence ds hcat ds = P.hcat <$> sequence ds vcat ds = P.vcat <$> sequence ds hang :: TCM Doc -> Int -> TCM Doc -> TCM Doc hang p n q = P.hang <$> p <*> pure n <*> q infixl 6 <>, <+>, infixl 5 $$, $+$ ($$), ($+$), (<>), (<+>), () :: TCM Doc -> TCM Doc -> TCM Doc d1 $$ d2 = (P.$$) <$> d1 <*> d2 d1 $+$ d2 = (P.$+$) <$> d1 <*> d2 d1 <> d2 = (P.<>) <$> d1 <*> d2 d1 <+> d2 = (P.<+>) <$> d1 <*> d2 d1 d2 = (P.) <$> d1 <*> d2 nest :: Int -> TCM Doc -> TCM Doc nest n d = P.nest n <$> d braces, dbraces, brackets, parens :: TCM Doc -> TCM Doc braces d = P.braces <$> d dbraces d = CP.dbraces <$> d brackets d = P.brackets <$> d parens d = P.parens <$> d pshow :: Show a => a -> TCM Doc pshow = pure . P.pshow -- | Comma-separated list in brackets. prettyList :: [TCM Doc] -> TCM Doc prettyList ds = P.pretty <$> sequence ds -- | 'prettyList' without the brackets. prettyList_ :: [TCM Doc] -> TCM Doc prettyList_ ds = fsep $ punctuate comma ds punctuate :: TCM Doc -> [TCM Doc] -> [TCM Doc] punctuate _ [] = [] punctuate d ds = zipWith (<>) ds (replicate n d ++ [empty]) where n = length ds - 1 --------------------------------------------------------------------------- -- * The PrettyTCM class --------------------------------------------------------------------------- class PrettyTCM a where prettyTCM :: a -> TCM Doc -- | Pretty print with a given context precedence prettyTCMCtx :: PrettyTCM a => Precedence -> a -> TCM Doc prettyTCMCtx p = withContextPrecedence p . prettyTCM instance PrettyTCM Bool where prettyTCM = pretty instance PrettyTCM C.Name where prettyTCM = pretty instance PrettyTCM C.QName where prettyTCM = pretty instance PrettyTCM Comparison where prettyTCM = pretty instance PrettyTCM Literal where prettyTCM = pretty instance PrettyTCM Nat where prettyTCM = pretty instance PrettyTCM ProblemId where prettyTCM = pretty instance PrettyTCM Range where prettyTCM = pretty instance PrettyTCM CheckpointId where prettyTCM = pretty -- instance PrettyTCM Interval where prettyTCM = pretty -- instance PrettyTCM Position where prettyTCM = pretty instance PrettyTCM a => PrettyTCM (Closure a) where prettyTCM cl = enterClosure cl prettyTCM instance PrettyTCM a => PrettyTCM [a] where prettyTCM = prettyList . map prettyTCM instance (PrettyTCM a, PrettyTCM b) => PrettyTCM (a,b) where prettyTCM (a, b) = parens $ prettyTCM a <> comma <> prettyTCM b instance (PrettyTCM a, PrettyTCM b, PrettyTCM c) => PrettyTCM (a,b,c) where prettyTCM (a, b, c) = parens $ prettyTCM a <> comma <> prettyTCM b <> comma <> prettyTCM c instance PrettyTCM Term where prettyTCM = prettyA <=< reify instance PrettyTCM Type where prettyTCM = prettyA <=< reify instance PrettyTCM Sort where prettyTCM = prettyA <=< reify instance PrettyTCM DisplayTerm where prettyTCM = prettyA <=< reify instance PrettyTCM NamedClause where prettyTCM = prettyA <=< reify instance PrettyTCM (QNamed Clause) where prettyTCM = prettyA <=< reify instance PrettyTCM Level where prettyTCM = prettyA <=< reify . Level instance PrettyTCM Permutation where prettyTCM = text . show instance PrettyTCM Polarity where prettyTCM = text . show instance PrettyTCM IsForced where prettyTCM = text . show instance PrettyTCM R.Term where prettyTCM = prettyA <=< toAbstractWithoutImplicit instance (Pretty a, PrettyTCM a, Subst a a) => PrettyTCM (Substitution' a) where prettyTCM IdS = "idS" prettyTCM (Wk m IdS) = "wkS" <+> pretty m prettyTCM (EmptyS _) = "emptyS" prettyTCM rho = prettyTCM u <+> comma <+> prettyTCM rho1 where (rho1, rho2) = splitS 1 rho u = lookupS rho2 0 instance PrettyTCM Clause where prettyTCM cl = do x <- qualify_ <$> freshName_ ("" :: String) prettyTCM (QNamed x cl) instance PrettyTCM a => PrettyTCM (Judgement a) where prettyTCM (HasType a t) = prettyTCM a <+> ":" <+> prettyTCM t prettyTCM (IsSort a t) = "Sort" <+> prettyTCM a <+> ":" <+> prettyTCM t instance PrettyTCM MetaId where prettyTCM x = do mn <- getMetaNameSuggestion x pretty $ NamedMeta mn x instance PrettyTCM a => PrettyTCM (Blocked a) where prettyTCM (Blocked x a) = "[" <+> prettyTCM a <+> "]" <> text (P.prettyShow x) prettyTCM (NotBlocked _ x) = prettyTCM x instance (Reify a e, ToConcrete e c, P.Pretty c) => PrettyTCM (Named_ a) where prettyTCM x = prettyA =<< reify x instance (Reify a e, ToConcrete e c, P.Pretty c) => PrettyTCM (Arg a) where prettyTCM x = prettyA =<< reify x instance (Reify a e, ToConcrete e c, P.Pretty c) => PrettyTCM (Dom a) where prettyTCM x = prettyA =<< reify x instance (PrettyTCM k, PrettyTCM v) => PrettyTCM (Map k v) where prettyTCM m = "Map" <> braces (sep $ punctuate comma [ hang (prettyTCM k <+> "=") 2 (prettyTCM v) | (k, v) <- Map.toList m ]) instance {-# OVERLAPPING #-} PrettyTCM ArgName where prettyTCM = text . P.prettyShow -- instance (Reify a e, ToConcrete e c, P.Pretty c, PrettyTCM a) => PrettyTCM (Elim' a) where instance PrettyTCM Elim where prettyTCM (IApply x y v) = "I$" <+> prettyTCM v prettyTCM (Apply v) = "$" <+> prettyTCM v prettyTCM (Proj _ f)= "." <> prettyTCM f instance PrettyTCM a => PrettyTCM (MaybeReduced a) where prettyTCM = prettyTCM . ignoreReduced instance PrettyTCM EqualityView where prettyTCM v = prettyTCM $ equalityUnview v instance PrettyTCM A.Expr where prettyTCM = prettyA instance PrettyTCM A.TypedBinding where prettyTCM = prettyA instance PrettyTCM Relevance where prettyTCM Irrelevant = "." prettyTCM NonStrict = ".." prettyTCM Relevant = empty instance PrettyTCM ProblemConstraint where prettyTCM (PConstr pids c) | Set.null pids = prettyTCM c | otherwise = prettyList (map prettyTCM $ Set.toList pids) <+> prettyTCM c instance PrettyTCM Constraint where prettyTCM c = case c of ValueCmp cmp ty s t -> prettyCmp (prettyTCM cmp) s t (":" <+> prettyTCMCtx TopCtx ty) ValueCmpOnFace cmp p ty s t -> sep [ prettyTCM p <+> "|" , prettyCmp (prettyTCM cmp) s t ] (":" <+> prettyTCMCtx TopCtx ty) ElimCmp cmps fs t v us vs -> prettyCmp "~~" us vs (":" <+> prettyTCMCtx TopCtx t) LevelCmp cmp a b -> prettyCmp (prettyTCM cmp) a b TypeCmp cmp a b -> prettyCmp (prettyTCM cmp) a b TelCmp a b cmp tela telb -> prettyCmp (prettyTCM cmp) tela telb SortCmp cmp s1 s2 -> prettyCmp (prettyTCM cmp) s1 s2 Guarded c pid -> prettyTCM c (brackets $ "blocked on problem" <+> prettyTCM pid) UnBlock m -> do -- BlockedConst t <- mvInstantiation <$> lookupMeta m mi <- mvInstantiation <$> lookupMeta m case mi of BlockedConst t -> prettyCmp ":=" m t PostponedTypeCheckingProblem cl _ -> enterClosure cl $ \p -> prettyCmp ":=" m p Open{} -> __IMPOSSIBLE__ OpenInstance{} -> __IMPOSSIBLE__ InstV{} -> empty -- Andreas, 2017-01-11, issue #2637: -- The size solver instantiates some metas with infinity -- without cleaning up the UnBlock constraints. -- Thus, this case is not IMPOSSIBLE. -- -- InstV args t -> do -- reportSLn "impossible" 10 $ unlines -- [ "UnBlock meta " ++ show m ++ " surprisingly has InstV instantiation:" -- , show m ++ show args ++ " := " ++ show t -- ] -- __IMPOSSIBLE__ FindInstance m mb mcands -> do t <- getMetaType m sep [ "Resolve instance argument" <+> blk prettyCmp ":" m t , cands ] where blk = case mb of Nothing -> empty Just b -> parens $ "blocked on" <+> pretty b cands = case mcands of Nothing -> "No candidates yet" Just cnds -> hang "Candidates" 2 $ vcat [ hang (overlap c <+> prettyTCM (candidateTerm c) <+> ":") 2 $ prettyTCM (candidateType c) | c <- cnds ] where overlap c | candidateOverlappable c = "overlap" | otherwise = empty IsEmpty r t -> "Is empty:" prettyTCMCtx TopCtx t CheckSizeLtSat t -> "Is not empty type of sizes:" prettyTCMCtx TopCtx t CheckFunDef d i q cs -> do t <- defType <$> getConstInfo q "Check definition of" <+> prettyTCM q <+> ":" <+> prettyTCM t HasBiggerSort a -> "Has bigger sort:" <+> prettyTCM a HasPTSRule a b -> "Has PTS rule:" <+> case b of NoAbs _ b -> prettyTCM (a,b) Abs x b -> "(" <> prettyTCM a <+> "," <+> addContext x (prettyTCM b) <> ")" UnquoteTactic _ v _ _ -> do e <- reify v prettyTCM (A.App A.defaultAppInfo_ (A.Unquote A.exprNoRange) (defaultNamedArg e)) where prettyCmp :: (PrettyTCM a, PrettyTCM b) => TCM Doc -> a -> b -> TCM Doc prettyCmp cmp x y = prettyTCMCtx TopCtx x (cmp <+> prettyTCMCtx TopCtx y) instance PrettyTCM TypeCheckingProblem where prettyTCM (CheckExpr cmp e a) = sep [ prettyA e <+> ":?", prettyTCM a ] prettyTCM (CheckArgs _ _ es t0 t1 _) = sep [ parens $ "_ :" <+> prettyTCM t0 , nest 2 $ prettyList $ map prettyA es , nest 2 $ ":?" <+> prettyTCM t1 ] prettyTCM (CheckProjAppToKnownPrincipalArg cmp e _ _ _ t _ _ _) = prettyTCM (CheckExpr cmp e t) prettyTCM (CheckLambda cmp (Arg ai (xs, mt)) e t) = sep [ return CP.lambda <+> (CP.prettyRelevance ai . CP.prettyHiding ai (if isNothing mt && length xs == 1 then id else P.parens) <$> do fsep $ map prettyTCM xs ++ caseMaybe mt [] (\ a -> [":", prettyTCM a])) <+> return CP.arrow <+> prettyTCM e <+> ":?" , prettyTCM t ] prettyTCM (DoQuoteTerm _ v _) = do e <- reify v prettyTCM (A.App A.defaultAppInfo_ (A.QuoteTerm A.exprNoRange) (defaultNamedArg e)) instance PrettyTCM a => PrettyTCM (WithHiding a) where prettyTCM (WithHiding h a) = CP.prettyHiding h id <$> prettyTCM a instance PrettyTCM Name where prettyTCM x = P.pretty <$> abstractToConcrete_ x instance PrettyTCM QName where prettyTCM x = P.pretty <$> abstractToConcrete_ x instance PrettyTCM ModuleName where prettyTCM x = P.pretty <$> abstractToConcrete_ x instance PrettyTCM ConHead where prettyTCM = prettyTCM . conName instance PrettyTCM Telescope where prettyTCM tel = P.fsep . map P.pretty <$> (do tel <- reify tel runAbsToCon $ bindToConcrete tel return ) newtype PrettyContext = PrettyContext Context instance PrettyTCM PrettyContext where prettyTCM (PrettyContext ctx) = prettyTCM $ telFromList' nameToArgName $ reverse ctx instance PrettyTCM DBPatVar where prettyTCM = prettyTCM . var . dbPatVarIndex instance PrettyTCM a => PrettyTCM (Pattern' a) where prettyTCM (IApplyP _ _ _ x) = prettyTCM x prettyTCM (VarP _ x) = prettyTCM x prettyTCM (DotP _ t) = ".(" <> prettyTCM t <> ")" prettyTCM (DefP o q ps) = parens $ prettyTCM q <+> fsep (map (prettyTCM . namedArg) ps) prettyTCM (ConP c i ps) = (if b then braces else parens) $ prTy $ prettyTCM c <+> fsep (map (prettyTCM . namedArg) ps) where b = maybe False (/= PatOCon) $ conPRecord i showRec :: TCM Doc showRec = sep [ "record" , bracesAndSemicolons <$> zipWithM showField (conFields c) ps ] showField (Arg ai x) p = sep [ prettyTCM (A.qnameName x) <+> "=" , nest 2 $ prettyTCM $ namedArg p ] showCon = parens $ prTy $ prettyTCM c <+> fsep (map (prettyTCM . namedArg) ps) prTy d = d -- caseMaybe (conPType i) d $ \ t -> d <+> ":" <+> prettyTCM t prettyTCM (LitP l) = text (P.prettyShow l) prettyTCM (ProjP _ q) = text ("." ++ P.prettyShow q) -- | Proper pretty printing of patterns: prettyTCMPatterns :: [NamedArg DeBruijnPattern] -> TCM [Doc] prettyTCMPatterns = mapM prettyA <=< reifyPatterns prettyTCMPatternList :: [NamedArg DeBruijnPattern] -> TCM Doc prettyTCMPatternList = prettyList . map prettyA <=< reifyPatterns instance PrettyTCM (Elim' DisplayTerm) where prettyTCM (IApply x y v) = "$" <+> prettyTCM v prettyTCM (Apply v) = "$" <+> prettyTCM (unArg v) prettyTCM (Proj _ f)= "." <> prettyTCM f instance PrettyTCM NLPat where prettyTCM (PVar x bvs) = prettyTCM (Var x (map (Apply . fmap var) bvs)) prettyTCM (PWild) = text $ "_" prettyTCM (PDef f es) = parens $ prettyTCM f <+> fsep (map prettyTCM es) prettyTCM (PLam i u) = parens $ text ("λ " ++ absName u ++ " →") <+> (addContext (absName u) $ prettyTCM $ absBody u) prettyTCM (PPi a b) = parens $ text ("(" ++ absName b ++ " :") <+> prettyTCM (unDom a) <> ") →" <+> (addContext (absName b) $ prettyTCM $ unAbs b) prettyTCM (PBoundVar i []) = prettyTCM (var i) prettyTCM (PBoundVar i es) = parens $ prettyTCM (var i) <+> fsep (map prettyTCM es) prettyTCM (PTerm t) = "." <> parens (prettyTCM t) instance PrettyTCM NLPType where prettyTCM (NLPType PWild a) = prettyTCM a prettyTCM (NLPType l a) = "{" <> prettyTCM l <> "}" <> prettyTCM a instance PrettyTCM (Elim' NLPat) where prettyTCM (IApply x y v) = prettyTCM v prettyTCM (Apply v) = prettyTCM (unArg v) prettyTCM (Proj _ f)= "." <> prettyTCM f instance PrettyTCM (Type' NLPat) where prettyTCM = prettyTCM . unEl instance PrettyTCM RewriteRule where prettyTCM (RewriteRule q gamma f ps rhs b) = fsep [ prettyTCM q , prettyTCM gamma <+> " |- " , addContext gamma $ sep [ prettyTCM (PDef f ps) , " --> " , prettyTCM rhs , " : " , prettyTCM b ] ] instance PrettyTCM Occurrence where prettyTCM occ = text $ "-[" ++ prettyShow occ ++ "]->" -- | Pairing something with a node (for printing only). data WithNode n a = WithNode n a instance PrettyTCM n => PrettyTCM (WithNode n Occurrence) where prettyTCM (WithNode n o) = prettyTCM o <+> prettyTCM n instance (PrettyTCM n, PrettyTCM (WithNode n e)) => PrettyTCM (Graph n e) where prettyTCM g = vcat $ map pr $ Map.assocs $ Graph.graph g where pr (n, es) = sep [ prettyTCM n , nest 2 $ vcat $ map (prettyTCM . uncurry WithNode) $ Map.assocs es ] instance PrettyTCM SplitTag where prettyTCM (SplitCon c) = prettyTCM c prettyTCM (SplitLit l) = prettyTCM l prettyTCM SplitCatchall = return underscore Agda-2.6.0.1/src/full/Agda/TypeChecking/Empty.hs0000644000000000000000000000712413466402171017304 0ustar0000000000000000 module Agda.TypeChecking.Empty where import Control.Monad.Except import Data.Semigroup import Data.Monoid import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Position import Agda.TypeChecking.Monad import Agda.TypeChecking.Coverage import Agda.TypeChecking.Coverage.Match ( fromSplitPatterns ) import Agda.TypeChecking.Constraints import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Either import Agda.Utils.Monad data ErrorNonEmpty = Fail -- ^ Generic failure | FailBecause TCErr -- ^ Failure with informative error | DontKnow -- ^ Emptyness check blocked instance Semigroup ErrorNonEmpty where DontKnow <> _ = DontKnow _ <> DontKnow = DontKnow FailBecause err <> _ = FailBecause err Fail <> err = err instance Monoid ErrorNonEmpty where mempty = Fail mappend = (Data.Semigroup.<>) -- | Ensure that a type is empty. -- This check may be postponed as emptiness constraint. ensureEmptyType :: Range -- ^ Range of the absurd pattern. -> Type -- ^ Type that should be empty (empty data type or iterated product of such). -> TCM () ensureEmptyType r t = caseEitherM (checkEmptyType r t) failure return where failure DontKnow = addConstraint $ IsEmpty r t failure (FailBecause err) = throwError err failure Fail = typeError $ ShouldBeEmpty t [] -- | Check whether a type is empty. isEmptyType :: Type -> TCM Bool isEmptyType ty = isRight <$> checkEmptyType noRange ty -- | Check whether some type in a telescope is empty. isEmptyTel :: Telescope -> TCM Bool isEmptyTel tel = isRight <$> checkEmptyTel noRange tel -- Either the type is possibly non-empty (Left err) or it is really empty -- (Right ()). checkEmptyType :: Range -> Type -> TCM (Either ErrorNonEmpty ()) checkEmptyType range t = do mr <- tryRecordType t case mr of -- If t is blocked or a meta, we cannot decide emptiness now. Postpone. Left (Blocked m t) -> return $ Left DontKnow -- If t is not a record type, try to split Left (NotBlocked nb t) -> do -- from the current context xs:ts, create a pattern list -- xs _ : ts t and try to split on _ (the last variable) tel0 <- getContextTelescope let gamma = telToList tel0 ++ [domFromArg $ defaultArg (underscore, t)] tel = telFromList gamma ps = teleNamedArgs tel dontAssignMetas $ do r <- splitLast Inductive tel ps case r of Left UnificationStuck{} -> return $ Left DontKnow Left _ -> return $ Left Fail Right cov -> do let ps = map (namedArg . last . fromSplitPatterns . scPats) $ splitClauses cov if (null ps) then return (Right ()) else Left . FailBecause <$> do typeError_ $ ShouldBeEmpty t ps -- If t is a record type, see if any of the field types is empty Right (r, pars, def) -> do if recEtaEquality def == NoEta then return $ Left Fail else do void <$> do checkEmptyTel range $ recTel def `apply` pars -- | Check whether one of the types in the given telescope is constructor-less -- and if yes, return its index in the telescope (0 = leftmost). checkEmptyTel :: Range -> Telescope -> TCM (Either ErrorNonEmpty Int) checkEmptyTel r = loop 0 where loop i EmptyTel = return $ Left Fail loop i (ExtendTel dom tel) = orEitherM [ (i <$) <$> checkEmptyType r (unDom dom) , underAbstraction dom tel $ loop (succ i) ] Agda-2.6.0.1/src/full/Agda/TypeChecking/Constraints.hs-boot0000644000000000000000000000120013466402171021443 0ustar0000000000000000module Agda.TypeChecking.Constraints where import Agda.TypeChecking.Monad.Base addConstraint :: Constraint -> TCM () catchConstraint :: Constraint -> TCM () -> TCM () solveConstraint :: Constraint -> TCM () solveAwakeConstraints' :: Bool -> TCM () solveSomeAwakeConstraints :: (ProblemConstraint -> Bool) -> Bool -> TCM () noConstraints :: TCM a -> TCM a ifNoConstraints_ :: TCM () -> TCM a -> (ProblemId -> TCM a) -> TCM a ifNoConstraints :: TCM a -> (a -> TCM b) -> (ProblemId -> a -> TCM b) -> TCM b guardConstraint :: Constraint -> TCM () -> TCM () debugConstraints :: TCM () Agda-2.6.0.1/src/full/Agda/TypeChecking/Records.hs0000644000000000000000000010512313466402171017605 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Records where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Monad import Control.Monad.Reader import Control.Monad.Trans.Maybe import Data.Function import qualified Data.List as List import Data.Maybe import qualified Data.Set as Set import Data.Traversable (traverse) import Agda.Syntax.Common import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Concrete (FieldAssignment'(..), nameFieldA) import Agda.Syntax.Abstract.Name import Agda.Syntax.Internal as I import Agda.Syntax.Position import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad () import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import {-# SOURCE #-} Agda.TypeChecking.ProjectionLike (eligibleForProjectionLike) import Agda.Utils.Either import Agda.Utils.Functor (for, ($>)) import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible mkCon :: ConHead -> ConInfo -> Args -> Term mkCon h info args = Con h info (map Apply args) -- | Order the fields of a record construction. orderFields :: forall a . QName -- ^ Name of record type (for error message). -> (Arg C.Name -> a) -- ^ How to fill a missing field. -> [Arg C.Name] -- ^ Field names of the record type. -> [(C.Name, a)] -- ^ Provided fields with content in the record expression. -> TCM [a] -- ^ Content arranged in official order. orderFields r fill axs fs = do reportSDoc "tc.record" 30 $ vcat [ "orderFields" , " official fields: " <+> sep (map pretty xs) , " provided fields: " <+> sep (map pretty ys) ] unlessNull duplicate $ typeError . DuplicateFields . List.nub unlessNull alien $ typeError . TooManyFields r missing return $ for axs $ \ ax -> fromMaybe (fill ax) $ lookup (unArg ax) fs where xs = map unArg axs -- official fields (accord. record type) ys = map fst fs -- provided fields duplicate = ys List.\\ List.nub ys -- duplicate fields alien = ys List.\\ xs -- spurious fields missing = xs List.\\ ys -- missing fields -- | A record field assignment @record{xs = es}@ might not mention all -- visible fields. @insertMissingFields@ inserts placeholders for -- the missing visible fields and returns the values in order -- of the fields in the record declaration. insertMissingFields :: forall a . QName -- ^ Name of record type (for error reporting). -> (C.Name -> a) -- ^ Function to generate a placeholder for missing visible field. -> [FieldAssignment' a] -- ^ Given fields. -> [Arg C.Name] -- ^ All record field names with 'ArgInfo'. -> TCM [NamedArg a] -- ^ Given fields enriched by placeholders for missing explicit fields. insertMissingFields r placeholder fs axs = do -- Compute the list of given fields, decorated with the ArgInfo from the record def. let arg x e = caseMaybe (List.find ((x ==) . unArg) axs) (defaultNamedArg e) $ \ a -> nameIfHidden a e <$ a givenFields = [ (x, Just $ arg x e) | FieldAssignment x e <- fs ] -- Omitted explicit fields are filled in with placeholders. -- Omitted implicit or instance fields -- are still left out and inserted later by checkArguments_. catMaybes <$> orderFields r fill axs givenFields where fill :: Arg C.Name -> Maybe (NamedArg a) fill ax | visible ax = Just $ setOrigin Inserted $ unnamed . placeholder <$> ax | otherwise = Nothing -- Andreas, 2017-04-13, issue #2494 -- We need to put the field names as argument names for hidden arguments. -- Otherwise, insertImplicit does not do the right thing. nameIfHidden :: Arg C.Name -> c -> Named_ c nameIfHidden ax | visible ax = unnamed | otherwise = named $ Ranged (getRange ax) $ prettyShow $ unArg ax -- | The name of the module corresponding to a record. recordModule :: QName -> ModuleName recordModule = mnameFromList . qnameToList -- | Get the definition for a record. Throws an exception if the name -- does not refer to a record or the record is abstract. getRecordDef :: (MonadTCM m, HasConstInfo m) => QName -> m Defn getRecordDef r = maybe err return =<< isRecord r where err = typeError $ ShouldBeRecordType (El __DUMMY_SORT__ $ Def r []) -- | Get the record name belonging to a field name. getRecordOfField :: QName -> TCM (Maybe QName) getRecordOfField d = caseMaybeM (isProjection d) (return Nothing) $ \ Projection{ projProper = proper, projFromType = r} -> return $ unArg r <$ proper -- if proper then Just (unArg r) else Nothing -- | Get the field names of a record. getRecordFieldNames :: QName -> TCM [Arg C.Name] getRecordFieldNames r = recordFieldNames <$> getRecordDef r recordFieldNames :: Defn -> [Arg C.Name] recordFieldNames = map (fmap (nameConcrete . qnameName)) . recFields -- | Find all records with at least the given fields. findPossibleRecords :: [C.Name] -> TCM [QName] findPossibleRecords fields = do defs <- HMap.elems <$> useTC (stSignature . sigDefinitions) idefs <- HMap.elems <$> useTC (stImports . sigDefinitions) return $ cands defs ++ cands idefs where cands defs = [ defName d | d <- defs, possible d ] possible def = -- Check whether the given fields are contained -- in the fields of record @def@ (if it is a record). case theDef def of Record{ recFields = fs } -> Set.isSubsetOf given $ Set.fromList $ map (nameConcrete . qnameName . unArg) fs _ -> False given = Set.fromList fields -- | Get the field types of a record. getRecordFieldTypes :: QName -> TCM Telescope getRecordFieldTypes r = recTel <$> getRecordDef r -- | Get the field names belonging to a record type. getRecordTypeFields :: Type -- ^ Record type. Need not be reduced. -> TCM [Arg QName] getRecordTypeFields t = do t <- reduce t -- Andreas, 2018-03-03, fix for #2989. case unEl t of Def r _ -> do rDef <- theDef <$> getConstInfo r case rDef of Record { recFields = fields } -> return fields _ -> __IMPOSSIBLE__ _ -> __IMPOSSIBLE__ -- | Returns the given record type's constructor name (with an empty -- range). getRecordConstructor :: QName -> TCM ConHead getRecordConstructor r = killRange <$> recConHead <$> getRecordDef r -- | Check if a name refers to a record. -- If yes, return record definition. {-# SPECIALIZE isRecord :: QName -> TCM (Maybe Defn) #-} {-# SPECIALIZE isRecord :: QName -> ReduceM (Maybe Defn) #-} isRecord :: HasConstInfo m => QName -> m (Maybe Defn) isRecord r = do def <- theDef <$> getConstInfo r return $ case def of Record{} -> Just def _ -> Nothing -- | Reduce a type and check whether it is a record type. -- Succeeds only if type is not blocked by a meta var. -- If yes, return its name, parameters, and definition. isRecordType :: (MonadReduce m, HasConstInfo m) => Type -> m (Maybe (QName, Args, Defn)) isRecordType t = either (const Nothing) Just <$> tryRecordType t -- | Reduce a type and check whether it is a record type. -- Succeeds only if type is not blocked by a meta var. -- If yes, return its name, parameters, and definition. -- If no, return the reduced type (unless it is blocked). tryRecordType :: (MonadReduce m, HasConstInfo m) => Type -> m (Either (Blocked Type) (QName, Args, Defn)) tryRecordType t = ifBlockedType t (\ m a -> return $ Left $ Blocked m a) $ \ nb t -> do let no = return $ Left $ NotBlocked nb t case unEl t of Def r es -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es caseMaybeM (isRecord r) no $ \ def -> return $ Right (r,vs,def) _ -> no -- | Get the original projection info for name. {-# SPECIALIZE origProjection :: QName -> TCM (QName, Definition, Maybe Projection) #-} origProjection :: HasConstInfo m => QName -> m (QName, Definition, Maybe Projection) origProjection f = do def <- getConstInfo f let proj = isProjection_ $ theDef def fallback = return (f, def, proj) caseMaybe proj fallback $ \ p@Projection{ projProper = proper, projOrig = f' } -> if isNothing proper || f == f' then fallback else do def <- getConstInfo f' return (f', def, isProjection_ $ theDef def) -- | @getDefType f t@ computes the type of (possibly projection-(like)) -- function @f@ whose first argument has type @t@. -- The `parameters' for @f@ are extracted from @t@. -- @Nothing@ if @f@ is projection(like) but -- @t@ is not a data/record/axiom type. -- -- Precondition: @t@ is reduced. -- -- See also: 'Agda.TypeChecking.Datatypes.getConType' getDefType :: (HasConstInfo m, MonadReduce m, MonadDebug m) => QName -> Type -> m (Maybe Type) getDefType f t = do -- Andreas, Issue #1973: we need to take the original projection -- since the parameters from the reduced type t are correct for -- the original projection only. -- Due to module application, the given (non-original) projection f -- may expect less parameters, those corresponding to a unreduced -- version of t (which we cannot obtain here). (f, def, mp) <- origProjection f let a = defType def -- if @f@ is not a projection (like) function, @a@ is the correct type fallback = return $ Just a reportSDoc "tc.deftype" 20 $ vcat [ "definition f = " <> prettyTCM f <+> text (" -- raw: " ++ prettyShow f) , "has type a = " <> prettyTCM a , "principal t = " <> prettyTCM t ] caseMaybe mp fallback $ \ (Projection{ projIndex = n }) -> if n <= 0 then fallback else do -- otherwise, we have to instantiate @a@ to the "parameters" of @f@ let npars | n == 0 = __IMPOSSIBLE__ | otherwise = n - 1 reportSLn "tc.deftype" 20 $ "projIndex = " ++ show n -- we get the parameters from type @t@ case unEl t of Def d es -> do -- Andreas, 2013-10-22 -- we need to check this @Def@ is fully reduced. -- If it is stuck due to disabled reductions -- (because of failed termination check), -- we will produce garbage parameters. ifNotM (eligibleForProjectionLike d) failNotElig $ {- else -} do -- now we know it is reduced, we can safely take the parameters let pars = fromMaybe __IMPOSSIBLE__ $ allApplyElims $ take npars es reportSDoc "tc.deftype" 20 $ vcat [ text $ "head d = " ++ prettyShow d , "parameters =" <+> sep (map prettyTCM pars) ] reportSLn "tc.deftype" 60 $ "parameters = " ++ show pars if length pars < npars then failure "does not supply enough parameters" else Just <$> a `piApplyM` pars _ -> failNotDef where failNotElig = failure "is not eligible for projection-likeness" failNotDef = failure "is not a Def." failure reason = do reportSDoc "tc.deftype" 25 $ sep [ "Def. " <+> prettyTCM f <+> " is projection(like)" , "but the type " , prettyTCM t , text $ "of its argument " ++ reason ] return Nothing -- | The analogue of 'piApply'. If @v@ is a value of record type @t@ -- with field @f@, then @projectTyped v t f@ returns the type of @f v@. -- And also the record type (as first result). -- -- Works also for projection-like definitions @f@. -- In this case, the first result is not a record type. -- -- Precondition: @t@ is reduced. -- projectTyped :: Term -- ^ Head (record value). -> Type -- ^ Its type. -> ProjOrigin -> QName -- ^ Projection. -> TCM (Maybe (Dom Type, Term, Type)) projectTyped v t o f = caseMaybeM (getDefType f t) (return Nothing) $ \ tf -> do ifNotPiType tf (const $ return Nothing) {- else -} $ \ dom b -> do u <- applyDef o f (argFromDom dom $> v) return $ Just (dom, u, b `absApp` v) -- | Typing of an elimination. data ElimType = ArgT (Dom Type) -- ^ Type of the argument. | ProjT { projTRec :: Dom Type -- ^ The type of the record which is eliminated. , projTField :: Type -- ^ The type of the field. } instance PrettyTCM ElimType where prettyTCM (ArgT a) = prettyTCM a prettyTCM (ProjT a b) = "." <> parens (prettyTCM a <+> "->" <+> prettyTCM b) -- | Given a head and its type, compute the types of the eliminations. typeElims :: Type -> Term -> Elims -> TCM [ElimType] typeElims a _ [] = return [] typeElims a self (e : es) = do case e of -- Andrea 02/08/2017: when going from patterns to elims we -- generate an Apply elim even for Path types, because we use VarP -- for both, so we have to allow for a Path type here. Apply v -> ifNotPiOrPathType a __IMPOSSIBLE__ {- else -} $ \ a b -> do (ArgT a :) <$> typeElims (absApp b $ unArg v) (self `applyE` [e]) es Proj o f -> do a <- reduce a (dom, self, a) <- fromMaybe __IMPOSSIBLE__ <$> projectTyped self a o f (ProjT dom a :) <$> typeElims a self es IApply{} -> __IMPOSSIBLE__ -- | Check if a name refers to an eta expandable record. {-# SPECIALIZE isEtaRecord :: QName -> TCM Bool #-} {-# SPECIALIZE isEtaRecord :: QName -> ReduceM Bool #-} isEtaRecord :: HasConstInfo m => QName -> m Bool isEtaRecord r = maybe False ((YesEta ==) . recEtaEquality) <$> isRecord r isEtaCon :: HasConstInfo m => QName -> m Bool isEtaCon c = getConstInfo' c >>= \case Left (SigUnknown err) -> __IMPOSSIBLE__ Left SigAbstract -> return False Right def -> case theDef def of Constructor {conData = r} -> isEtaRecord r _ -> return False -- | Check if a name refers to a record which is not coinductive. (Projections are then size-preserving) isInductiveRecord :: QName -> TCM Bool isInductiveRecord r = maybe False (\ d -> recInduction d /= Just CoInductive) <$> isRecord r -- | Check if a type is an eta expandable record and return the record identifier and the parameters. isEtaRecordType :: (HasConstInfo m) => Type -> m (Maybe (QName, Args)) isEtaRecordType a = case unEl a of Def d es -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es ifM (isEtaRecord d) (return $ Just (d, vs)) (return Nothing) _ -> return Nothing -- | Check if a name refers to a record constructor. -- If yes, return record definition. isRecordConstructor :: HasConstInfo m => QName -> m (Maybe (QName, Defn)) isRecordConstructor c = getConstInfo' c >>= \case Left (SigUnknown err) -> __IMPOSSIBLE__ Left SigAbstract -> return Nothing Right def -> case theDef $ def of Constructor{ conData = r } -> fmap (r,) <$> isRecord r _ -> return Nothing -- | Check if a constructor name is the internally generated record constructor. -- -- Works also for abstract constructors. isGeneratedRecordConstructor :: QName -> TCM Bool isGeneratedRecordConstructor c = ignoreAbstractMode $ do caseMaybeM (isRecordConstructor c) (return False) $ \ (_, def) -> case def of Record{ recNamedCon = False } -> return True _ -> return False -- | Turn off eta for unguarded recursive records. -- Projections do not preserve guardedness. unguardedRecord :: QName -> TCM () unguardedRecord q = modifySignature $ updateDefinition q $ updateTheDef $ \case r@Record{} -> r { recEtaEquality' = setEtaEquality (recEtaEquality' r) NoEta } _ -> __IMPOSSIBLE__ -- | Turn on eta for inductive guarded recursive records. -- Projections do not preserve guardedness. recursiveRecord :: QName -> TCM () recursiveRecord q = do ok <- etaEnabled modifySignature $ updateDefinition q $ updateTheDef $ \case r@Record{ recInduction = ind, recEtaEquality' = eta } -> r { recEtaEquality' = eta' } where eta' | ok, eta == Inferred NoEta, ind /= Just CoInductive = Inferred YesEta | otherwise = eta _ -> __IMPOSSIBLE__ -- | Turn on eta for non-recursive record, unless user declared otherwise. nonRecursiveRecord :: QName -> TCM () nonRecursiveRecord q = whenM etaEnabled $ do -- Do nothing if eta is disabled by option. modifySignature $ updateDefinition q $ updateTheDef $ \case r@Record{ recInduction = ind, recEtaEquality' = Inferred NoEta } | ind /= Just CoInductive -> r { recEtaEquality' = Inferred YesEta } r@Record{} -> r _ -> __IMPOSSIBLE__ -- | Check whether record type is marked as recursive. -- -- Precondition: record type identifier exists in signature. isRecursiveRecord :: QName -> TCM Bool isRecursiveRecord q = recRecursive . theDef . fromMaybe __IMPOSSIBLE__ . lookupDefinition q <$> getSignature {- | @etaExpandBoundVar i = (Δ, σ, τ)@ Precondition: The current context is @Γ = Γ₁, x:R pars, Γ₂@ where @|Γ₂| = i@ and @R@ is a eta-expandable record type with constructor @c@ and fields @Γ'@. Postcondition: @Δ = Γ₁, Γ', Γ₂[c Γ']@ and @Γ ⊢ σ : Δ@ and @Δ ⊢ τ : Γ@. -} etaExpandBoundVar :: Int -> TCM (Maybe (Telescope, Substitution, Substitution)) etaExpandBoundVar i = fmap (\ (delta, sigma, tau, _) -> (delta, sigma, tau)) <$> do expandRecordVar i =<< getContextTelescope -- | @expandRecordVar i Γ = (Δ, σ, τ, Γ')@ -- -- Precondition: @Γ = Γ₁, x:R pars, Γ₂@ where -- @|Γ₂| = i@ and @R@ is a eta-expandable record type -- with constructor @c@ and fields @Γ'@. -- -- Postcondition: @Δ = Γ₁, Γ', Γ₂[c Γ']@ and @Γ ⊢ σ : Δ@ and @Δ ⊢ τ : Γ@. expandRecordVar :: Int -> Telescope -> TCM (Maybe (Telescope, Substitution, Substitution, Telescope)) expandRecordVar i gamma0 = do -- Get the context with last variable added last in list. let gamma = telToList gamma0 -- Convert the de Bruijn index i to a de Bruijn level l = size gamma - 1 - i -- Extract type of @i@th de Bruijn index. -- Γ = Γ₁, x:a, Γ₂ let (gamma1, dom@(Dom{domInfo = ai, unDom = (x, a)}) : gamma2) = splitAt l gamma -- This must be a eta-expandable record type. let failure = do reportSDoc "tc.meta.assign.proj" 25 $ "failed to eta-expand variable " <+> pretty x <+> " since its type " <+> prettyTCM a <+> " is not a record type" return Nothing caseMaybeM (isRecordType a) failure $ \ (r, pars, def) -> do if recEtaEquality def == NoEta then return Nothing else Just <$> do -- Get the record fields @Γ₁ ⊢ tel@ (@tel = Γ'@). -- TODO: compose argInfo ai with tel. let tel = recTel def `apply` pars m = size tel fs = recFields def -- Construct the record pattern @Γ₁, Γ' ⊢ u := c ys@. ys = zipWith (\ f i -> f $> var i) fs $ downFrom m u = mkCon (recConHead def) ConOSystem ys -- @Γ₁, Γ' ⊢ τ₀ : Γ₁, x:_@ tau0 = consS u $ raiseS m -- @Γ₁, Γ', Γ₂ ⊢ τ₀ : Γ₁, x:_, Γ₂@ tau = liftS (size gamma2) tau0 -- Fields are in order first-first. zs = for fs $ fmap $ \ f -> Var 0 [Proj ProjSystem f] -- We need to reverse the field sequence to build the substitution. -- @Γ₁, x:_ ⊢ σ₀ : Γ₁, Γ'@ sigma0 = reverse (map unArg zs) ++# raiseS 1 -- @Γ₁, x:_, Γ₂ ⊢ σ₀ : Γ₁, Γ', Γ₂@ sigma = liftS (size gamma2) sigma0 -- Construct @Δ@ as telescope. -- Note @Γ₁, x:_ ⊢ Γ₂@, thus, @Γ₁, Γ' ⊢ [τ₀]Γ₂@ -- Use "f(x)" as variable name for the projection f(x). s = prettyShow x tel' = mapAbsNames (\ f -> stringToArgName $ argNameToString f ++ "(" ++ s ++ ")") tel delta = telFromList $ gamma1 ++ telToList tel' ++ telToList (applySubst tau0 $ telFromList gamma2) -- Andreas, 2017-07-29, issue #2644 -- We cannot substitute directly into a ListTel like gamma2, -- we have to convert it to a telescope first, otherwise we get garbage. return (delta, sigma, tau, tel) -- | Precondition: variable list is ordered descendingly. Can be empty. expandRecordVarsRecursively :: [Int] -> Telescope -> TCM (Telescope, Substitution, Substitution) expandRecordVarsRecursively [] gamma = return (gamma, idS, idS) expandRecordVarsRecursively (i : is) gamma = do caseMaybeM (expandRecordVar i gamma) (expandRecordVarsRecursively is gamma) $ \ (gamma1, sigma1, tau1, tel) -> do -- Γ ⊢ σ₁ : Γ₁ and Γ₁ ⊢ τ₁ : Γ let n = size tel newis = take n $ downFrom $ i + n (gamma2, sigma2, tau2) <- expandRecordVarsRecursively (newis ++ is) gamma1 -- Γ₁ ⊢ σ₂ : Γ₂ and Γ₂ ⊢ τ₂ : Γ₁ return (gamma2, applySubst sigma1 sigma2, applySubst tau2 tau1) -- | @curryAt v (Γ (y : R pars) -> B) n = -- ( \ v -> λ Γ ys → v Γ (c ys) {- curry -} -- , \ v -> λ Γ y → v Γ (p1 y) ... (pm y) {- uncurry -} -- , Γ (ys : As) → B[c ys / y] -- )@ -- -- where @n = size Γ@. curryAt :: Type -> Int -> TCM (Term -> Term, Term -> Term, Type) curryAt t n = do -- first, strip the leading n domains (which remain unchanged) TelV gamma core <- telViewUpTo n t case unEl core of -- There should be at least one domain left Pi (dom@Dom{domInfo = ai, unDom = a}) b -> do -- Eta-expand @dom@ along @qs@ into a telescope @tel@, computing a substitution. -- For now, we only eta-expand once. -- This might trigger another call to @etaExpandProjectedVar@ later. -- A more efficient version does all the eta-expansions at once here. (r, pars, def) <- fromMaybe __IMPOSSIBLE__ <$> isRecordType a when (recEtaEquality def == NoEta) __IMPOSSIBLE__ -- TODO: compose argInfo ai with tel. let tel = recTel def `apply` pars m = size tel fs = recFields def ys = zipWith (\ f i -> f $> var i) fs $ downFrom m u = mkCon (recConHead def) ConOSystem ys b' = raise m b `absApp` u t' = gamma `telePi` (tel `telePi` b') gammai = map domInfo $ telToList gamma xs = reverse $ zipWith (\ ai i -> Arg ai $ var i) gammai [m..] curry v = teleLam gamma $ teleLam tel $ raise (n+m) v `apply` (xs ++ [Arg ai u]) zs = for fs $ fmap $ \ f -> Var 0 [Proj ProjSystem f] atel = sgTel $ (,) (absName b) <$> dom uncurry v = teleLam gamma $ teleLam atel $ raise (n + 1) v `apply` (xs ++ zs) return (curry, uncurry, t') _ -> __IMPOSSIBLE__ {-| @etaExpand r pars u@ computes the eta expansion of record value @u@ at record type @r pars@. The first argument @r@ should be the name of an eta-expandable record type. Given @record R : Set where field x : A; y : B; .z : C@ and @r : R@, @etaExpand R [] r = (tel, [R.x r, R.y r, R.z r])@ where @tel@ is the record telescope instantiated at the parameters @pars@. -} etaExpandRecord :: (MonadTCM m, HasConstInfo m, MonadDebug m) => QName -> Args -> Term -> m (Telescope, Args) etaExpandRecord = etaExpandRecord' False -- | Eta expand a record regardless of whether it's an eta-record or not. forceEtaExpandRecord :: (MonadTCM m, HasConstInfo m, MonadDebug m) => QName -> Args -> Term -> m (Telescope, Args) forceEtaExpandRecord = etaExpandRecord' True etaExpandRecord' :: (MonadTCM m, HasConstInfo m, MonadDebug m) => Bool -> QName -> Args -> Term -> m (Telescope, Args) etaExpandRecord' forceEta r pars u = do def <- getRecordDef r (tel, _, _, args) <- etaExpandRecord'_ forceEta r pars def u return (tel, args) etaExpandRecord_ :: (MonadTCEnv m, HasOptions m, MonadDebug m) => QName -> Args -> Defn -> Term -> m (Telescope, ConHead, ConInfo, Args) etaExpandRecord_ = etaExpandRecord'_ False etaExpandRecord'_ :: (MonadTCEnv m, HasOptions m, MonadDebug m) => Bool -> QName -> Args -> Defn -> Term -> m (Telescope, ConHead, ConInfo, Args) etaExpandRecord'_ forceEta r pars def u = do let Record{ recConHead = con , recFields = xs , recTel = tel } = def tel' = apply tel pars -- Make sure we do not expand non-eta records (unless forced to): unless (recEtaEquality def == YesEta || forceEta) __IMPOSSIBLE__ case u of -- Already expanded. Con con_ ci es -> do let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es when (con /= con_) $ do reportSDoc "impossible" 10 $ vcat [ "etaExpandRecord_: the following two constructors should be identical" , nest 2 $ text $ "con = " ++ prettyShow con , nest 2 $ text $ "con_ = " ++ prettyShow con_ ] __IMPOSSIBLE__ return (tel', con, ci, args) -- Not yet expanded. _ -> do -- Andreas, < 2016-01-18: Note: recFields are always the original projections, -- thus, we can use them in Proj directly. let xs' = for xs $ fmap $ \ x -> u `applyE` [Proj ProjSystem x] reportSDoc "tc.record.eta" 20 $ vcat [ "eta expanding" <+> prettyTCM u <+> ":" <+> prettyTCM r , nest 2 $ vcat [ "tel' =" <+> prettyTCM tel' , "args =" <+> prettyTCM xs' ] ] return (tel', con, ConOSystem, xs') etaExpandAtRecordType :: Type -> Term -> TCM (Telescope, Term) etaExpandAtRecordType t u = do (r, pars, def) <- fromMaybe __IMPOSSIBLE__ <$> isRecordType t (tel, con, ci, args) <- etaExpandRecord_ r pars def u return (tel, mkCon con ci args) -- | The fields should be eta contracted already. -- -- We can eta contract if all fields @f = ...@ are irrelevant -- or all fields @f@ are the projection @f v@ of the same value @v@, -- but we need at least one relevant field to find the value @v@. -- TODO: this can be moved out of TCM. -- Andreas, 2018-01-28: attempted just that, but Auto does not -- put the conFields there (it does not run in TCM). -- If we get rid of Auto, we can do this. (Tests not involving Auto pass.) {-# SPECIALIZE etaContractRecord :: QName -> ConHead -> ConInfo -> Args -> TCM Term #-} {-# SPECIALIZE etaContractRecord :: QName -> ConHead -> ConInfo -> Args -> ReduceM Term #-} etaContractRecord :: HasConstInfo m => QName -> ConHead -> ConInfo -> Args -> m Term etaContractRecord r c ci args = do Just Record{ recFields = xs } <- isRecord r let check :: Arg Term -> Arg QName -> Maybe (Maybe Term) check a ax = do -- @a@ is the constructor argument, @ax@ the corr. record field name -- skip irrelevant record fields by returning DontCare case (getRelevance a, hasElims $ unArg a) of (Irrelevant, _) -> Just Nothing -- if @a@ is the record field name applied to a single argument -- then it passes the check (_, Just (_, [])) -> Nothing -- not a projection (_, Just (h, es)) | Proj _o f <- last es, unArg ax == f -> Just $ Just $ h $ init es _ -> Nothing fallBack = return (mkCon c ci args) case compare (length args) (length xs) of LT -> fallBack -- Not fully applied GT -> __IMPOSSIBLE__ -- Too many arguments. Impossible. EQ -> do case zipWithM check args xs of Just as -> case [ a | Just a <- as ] of (a:as) -> if all (a ==) as then return a else fallBack _ -> fallBack -- just irrelevant terms _ -> fallBack -- a Nothing -- | Is the type a hereditarily singleton record type? May return a -- blocking metavariable. -- -- Precondition: The name should refer to a record type, and the -- arguments should be the parameters to the type. isSingletonRecord :: QName -> Args -> TCM (Either MetaId Bool) isSingletonRecord r ps = mapRight isJust <$> isSingletonRecord' False r ps isSingletonRecordModuloRelevance :: QName -> Args -> TCM (Either MetaId Bool) isSingletonRecordModuloRelevance r ps = mapRight isJust <$> isSingletonRecord' True r ps -- | Return the unique (closed) inhabitant if exists. -- In case of counting irrelevance in, the returned inhabitant -- contains dummy terms. isSingletonRecord' :: Bool -> QName -> Args -> TCM (Either MetaId (Maybe Term)) isSingletonRecord' regardIrrelevance r ps = do reportSLn "tc.meta.eta" 30 $ "Is " ++ prettyShow r ++ " a singleton record type?" def <- getRecordDef r emap (mkCon (recConHead def) ConOSystem) <$> check (recTel def `apply` ps) where check :: Telescope -> TCM (Either MetaId (Maybe [Arg Term])) check tel = do reportSDoc "tc.meta.eta" 30 $ "isSingletonRecord' checking telescope " <+> prettyTCM tel case tel of EmptyTel -> return $ Right $ Just [] ExtendTel dom tel -> ifM (return regardIrrelevance `and2M` isIrrelevantOrPropM dom) {-then-} (underAbstraction dom tel $ \ tel -> emap (Arg (domInfo dom) __DUMMY_TERM__ :) <$> check tel) {-else-} $ do isSing <- isSingletonType' regardIrrelevance $ unDom dom case isSing of Left mid -> return $ Left mid Right Nothing -> return $ Right Nothing Right (Just v) -> underAbstraction dom tel $ \ tel -> emap (Arg (domInfo dom) v :) <$> check tel -- | Check whether a type has a unique inhabitant and return it. -- Can be blocked by a metavar. isSingletonType :: Type -> TCM (Either MetaId (Maybe Term)) isSingletonType = isSingletonType' False -- | Check whether a type has a unique inhabitant (irrelevant parts ignored). -- Can be blocked by a metavar. isSingletonTypeModuloRelevance :: (MonadTCM tcm) => Type -> tcm (Either MetaId Bool) isSingletonTypeModuloRelevance t = liftTCM $ do mapRight isJust <$> isSingletonType' True t isSingletonType' :: Bool -> Type -> TCM (Either MetaId (Maybe Term)) isSingletonType' regardIrrelevance t = do TelV tel t <- telView t ifBlockedType t (\ m _ -> return $ Left m) $ \ _ t -> do res <- isRecordType t case res of Just (r, ps, def) | YesEta <- recEtaEquality def -> do emap (abstract tel) <$> isSingletonRecord' regardIrrelevance r ps _ -> return $ Right Nothing -- | Checks whether the given term (of the given type) is beta-eta-equivalent -- to a variable. Returns just the de Bruijn-index of the variable if it is, -- or nothing otherwise. isEtaVar :: Term -> Type -> TCM (Maybe Int) isEtaVar u a = runMaybeT $ isEtaVarG u a Nothing [] where -- Checks whether the term u (of type a) is beta-eta-equivalent to -- `Var i es`, and returns i if it is. If the argument mi is `Just i'`, -- then i and i' are also required to be equal (else Nothing is returned). isEtaVarG :: Term -> Type -> Maybe Int -> [Elim' Int] -> MaybeT TCM Int isEtaVarG u a mi es = do (u, a) <- liftTCM $ reduce (u, a) liftTCM $ reportSDoc "tc.lhs" 80 $ "isEtaVarG" <+> nest 2 (vcat [ "u = " <+> text (show u) , "a = " <+> prettyTCM a , "mi = " <+> text (show mi) , "es = " <+> prettyList (map (text . show) es) ]) case (u, unEl a) of (Var i' es', _) -> do guard $ mi == (i' <$ mi) b <- liftTCM $ typeOfBV i' areEtaVarElims (var i') b es' es return i' (_, Def d pars) -> do guard =<< do liftTCM $ isEtaRecord d fs <- liftTCM $ map unArg . recFields . theDef <$> getConstInfo d is <- forM fs $ \f -> do let o = ProjSystem (_, _, fa) <- MaybeT $ projectTyped u a o f isEtaVarG (u `applyE` [Proj o f]) fa mi (es ++ [Proj o f]) case (mi, is) of (Just i, _) -> return i (Nothing, []) -> mzero (Nothing, i:is) -> guard (all (==i) is) >> return i (_, Pi dom cod) -> addContext dom $ do let u' = raise 1 u `apply` [argFromDom dom $> var 0] a' = absBody cod mi' = fmap (+1) mi es' = (fmap . fmap) (+1) es ++ [Apply $ argFromDom dom $> 0] (-1+) <$> isEtaVarG u' a' mi' es' _ -> mzero -- `areEtaVarElims u a es es'` checks whether the given elims es (as applied -- to the term u of type a) are beta-eta-equal to either projections or -- variables with de Bruijn indices given by es'. areEtaVarElims :: Term -> Type -> Elims -> [Elim' Int] -> MaybeT TCM () areEtaVarElims u a [] [] = return () areEtaVarElims u a [] (_:_) = mzero areEtaVarElims u a (_:_) [] = mzero areEtaVarElims u a (Proj o f : es) (Proj _ f' : es') = do guard $ f == f' a <- liftTCM $ reduce a (_, _, fa) <- MaybeT $ projectTyped u a o f areEtaVarElims (u `applyE` [Proj o f]) fa es es' -- These two cases can occur only when we're looking at two different -- variables (i.e. one of function type and the other of record type) so -- it's definitely not the variable we're looking for (or someone is playing -- Jedi mind tricks on us) areEtaVarElims u a (Proj{} : _ ) (Apply _ : _ ) = mzero areEtaVarElims u a (Apply _ : _ ) (Proj{} : _ ) = mzero areEtaVarElims u a (Proj{} : _ ) (IApply{} : _ ) = mzero areEtaVarElims u a (IApply{} : _ ) (Proj{} : _ ) = mzero areEtaVarElims u a (Apply _ : _ ) (IApply{} : _ ) = mzero areEtaVarElims u a (IApply{} : _ ) (Apply _ : _ ) = mzero areEtaVarElims u a (IApply{} : _) (IApply{} : _) = __IMPOSSIBLE__ -- TODO Andrea: not actually impossible, should be done like Apply areEtaVarElims u a (Apply v : es) (Apply i : es') = do ifNotPiType a (const mzero) $ \dom cod -> do _ <- isEtaVarG (unArg v) (unDom dom) (Just $ unArg i) [] areEtaVarElims (u `apply` [fmap var i]) (cod `absApp` var (unArg i)) es es' -- | Auxiliary function. emap :: (a -> b) -> Either c (Maybe a) -> Either c (Maybe b) emap = mapRight . fmap -- | Replace projection patterns by the original projections. -- class NormaliseProjP a where normaliseProjP :: HasConstInfo m => a -> m a instance NormaliseProjP Clause where normaliseProjP cl = do ps <- normaliseProjP $ namedClausePats cl return $ cl { namedClausePats = ps } instance NormaliseProjP a => NormaliseProjP [a] where normaliseProjP = traverse normaliseProjP instance NormaliseProjP a => NormaliseProjP (Arg a) where normaliseProjP = traverse normaliseProjP instance NormaliseProjP a => NormaliseProjP (Named_ a) where normaliseProjP = traverse normaliseProjP instance NormaliseProjP (Pattern' x) where normaliseProjP p@VarP{} = return p normaliseProjP p@DotP{} = return p normaliseProjP (ConP c cpi ps) = ConP c cpi <$> normaliseProjP ps normaliseProjP (DefP o q ps) = DefP o q <$> normaliseProjP ps normaliseProjP p@LitP{} = return p normaliseProjP (ProjP o d0) = ProjP o <$> getOriginalProjection d0 normaliseProjP p@IApplyP{} = return p Agda-2.6.0.1/src/full/Agda/TypeChecking/Coverage.hs0000644000000000000000000020442713466402171017746 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-| Coverage checking, case splitting, and splitting for refine tactics. -} module Agda.TypeChecking.Coverage ( SplitClause(..), clauseToSplitClause, fixTarget , Covering(..), splitClauses , coverageCheck , isCovered , splitClauseWithAbsurd , splitLast , splitResult , normaliseProjP ) where import Prelude hiding (null, (!!)) -- do not use partial functions like !! import Control.Arrow (second) import Control.Monad import Control.Monad.Reader import Control.Monad.Trans ( lift ) import Data.Either (lefts) import Data.Foldable (for_) import qualified Data.List as List import Data.Monoid (Any(..)) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Traversable as Trav import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Names import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Primitive.Cubical import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Rules.LHS (checkSortOfSplitVar) import Agda.TypeChecking.Rules.LHS.Problem (allFlexVars) import Agda.TypeChecking.Rules.LHS.Unify import Agda.TypeChecking.Coverage.Match import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Conversion (tryConversion, equalType, equalTermOnFace) import Agda.TypeChecking.Datatypes (getConForm) import {-# SOURCE #-} Agda.TypeChecking.Empty ( checkEmptyTel, isEmptyTel, isEmptyType ) import Agda.TypeChecking.Free import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Patterns.Internal (dotPatternsToPatterns) import Agda.TypeChecking.Pretty import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Records import Agda.TypeChecking.Telescope import Agda.TypeChecking.Telescope.Path import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Warnings import Agda.Interaction.Options import Agda.Utils.Either import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.Lens #include "undefined.h" import Agda.Utils.Impossible data SplitClause = SClause { scTel :: Telescope -- ^ Type of variables in @scPats@. , scPats :: [NamedArg SplitPattern] -- ^ The patterns leading to the currently considered branch of -- the split tree. , scSubst :: Substitution' SplitPattern -- ^ Substitution from 'scTel' to old context. -- Only needed directly after split on variable: -- * To update 'scTarget' -- * To rename other split variables when splitting on -- multiple variables. -- @scSubst@ is not ``transitive'', i.e., does not record -- the substitution from the original context to 'scTel' -- over a series of splits. It is freshly computed -- after each split by 'computeNeighborhood'; also -- 'splitResult', which does not split on a variable, -- should reset it to the identity 'idS', lest it be -- applied to 'scTarget' again, leading to Issue 1294. , scCheckpoints :: Map CheckpointId Substitution -- ^ We need to keep track of the module parameter checkpoints for the -- clause for the purpose of inferring missing instance clauses. , scTarget :: Maybe (Arg Type) -- ^ The type of the rhs, living in context 'scTel'. -- This invariant is broken before calls to 'fixTarget'; -- there, 'scTarget' lives in the old context. -- 'fixTarget' moves 'scTarget' to the new context by applying -- substitution 'scSubst'. } -- | A @Covering@ is the result of splitting a 'SplitClause'. data Covering = Covering { covSplitArg :: Arg Nat -- ^ De Bruijn level (counting dot patterns) of argument we split on. , covSplitClauses :: [(SplitTag, SplitClause)] -- ^ Covering clauses, indexed by constructor/literal these clauses share. } -- | Project the split clauses out of a covering. splitClauses :: Covering -> [SplitClause] splitClauses (Covering _ qcs) = map snd qcs -- | Create a split clause from a clause in internal syntax. Used by make-case. clauseToSplitClause :: Clause -> SplitClause clauseToSplitClause cl = SClause { scTel = clauseTel cl , scPats = toSplitPatterns $ namedClausePats cl , scSubst = idS -- Andreas, 2014-07-15 TODO: Is this ok? , scCheckpoints = Map.empty -- #2996: not __IMPOSSIBLE__ for debug printing , scTarget = clauseType cl } type CoverM = ExceptT SplitError TCM -- | Top-level function for checking pattern coverage. -- -- Effects: -- -- - Marks unreachable clauses as such in the signature. -- -- - Adds missing instances clauses to the signature. -- coverageCheck :: QName -- ^ Name @f@ of definition. -> Type -- ^ Absolute type (including the full parameter telescope). -> [Clause] -- ^ Clauses of @f@. These are the very clauses of @f@ in the signature. -> TCM SplitTree coverageCheck f t cs = do reportSLn "tc.cover.top" 30 $ "entering coverageCheck for " ++ show f reportSDoc "tc.cover.top" 75 $ " of type (raw): " <+> (text . prettyShow) t reportSDoc "tc.cover.top" 45 $ " of type: " <+> prettyTCM t TelV gamma a <- telViewUpTo (-1) t reportSLn "tc.cover.top" 30 $ "coverageCheck: computed telView" let -- n = arity -- xs = variable patterns fitting lgamma n = size gamma xs = map (setOrigin Inserted) $ teleNamedArgs gamma reportSLn "tc.cover.top" 30 $ "coverageCheck: getDefFreeVars" -- The initial module parameter substitutions need to be weakened by the -- number of arguments that aren't module parameters. fv <- getDefFreeVars f reportSLn "tc.cover.top" 30 $ "coverageCheck: getting checkpoints" -- TODO: does this make sense? Why are we weakening by n - fv? checkpoints <- applySubst (raiseS (n - fv)) <$> viewTC eCheckpoints -- construct the initial split clause let sc = SClause gamma xs idS checkpoints $ Just $ defaultArg a reportSDoc "tc.cover.top" 10 $ do let prCl cl = addContext (clauseTel cl) $ prettyTCMPatternList $ namedClausePats cl vcat [ text $ "Coverage checking " ++ prettyShow f ++ " with patterns:" , nest 2 $ vcat $ map prCl cs ] -- used = actually used clauses for cover -- pss = uncovered cases CoverResult splitTree used pss qss noex <- cover f cs sc -- Andreas, 2018-11-12, issue #378: -- some indices in @used@ and @noex@ point outside of @cs@, -- since missing hcomp clauses have been added during the course of @cover@. -- We simply delete theses indices from @noex@. noex <- return $ List.filter (< length cs) $ Set.toList noex reportSDoc "tc.cover.top" 10 $ vcat [ "cover computed!" , text $ "used clauses: " ++ show used , text $ "non-exact clauses: " ++ show noex ] reportSDoc "tc.cover.splittree" 10 $ vcat [ "generated split tree for" <+> prettyTCM f , text $ prettyShow splitTree ] reportSDoc "tc.cover.covering" 10 $ vcat [ text $ "covering patterns for " ++ prettyShow f , nest 2 $ vcat $ map (\cl -> enterClosure cl $ \ cl -> addContext (clauseTel cl) $ prettyTCMPatternList $ namedClausePats cl) qss ] -- Storing the covering clauses so that checkIApplyConfluence_ can -- find them later. -- Andreas, 2019-03-27, only needed when --cubical whenM (optCubical <$> pragmaOptions) $ do modifySignature $ updateDefinition f $ updateTheDef $ updateCovering $ const qss -- filter out the missing clauses that are absurd. pss <- flip filterM pss $ \(tel,ps) -> -- Andreas, 2019-04-13, issue #3692: when adding missing absurd -- clauses, also put the absurd pattern in. caseEitherM (checkEmptyTel noRange tel) (\ _ -> return True) $ \ l -> do -- Now, @l@ is the first type in @tel@ (counting from 0=leftmost) -- which is empty. Turn it into a de Bruijn index @i@. let i = size tel - 1 - l -- Build a substitution mapping this pattern variable to the absurd pattern. let sub = inplaceS i $ absurdP i -- ifNotM (isEmptyTel tel) (return True) $ do -- Jesper, 2018-11-28, Issue #3407: if the clause is absurd, -- add the appropriate absurd clause to the definition. let cl = Clause { clauseLHSRange = noRange , clauseFullRange = noRange , clauseTel = tel , namedClausePats = applySubst sub ps , clauseBody = Nothing , clauseType = Nothing , clauseCatchall = False , clauseUnreachable = Just False } reportSDoc "tc.cover.missing" 20 $ inTopContext $ do sep [ "adding missing absurd clause" , nest 2 $ prettyTCM $ QNamed f cl ] reportSDoc "tc.cover.missing" 80 $ inTopContext $ vcat [ "l = " <+> pretty l , "i = " <+> pretty i , "cl = " <+> pretty (QNamed f cl) ] addClauses f [cl] return False -- report a warning if there are uncovered cases, -- generate a catch-all clause with a metavariable as its body to avoid -- internal errors in the reduction machinery. unless (null pss) $ setCurrentRange cs $ warning $ CoverageIssue f pss -- Andreas, 2017-08-28, issue #2723: -- Mark clauses as reachable or unreachable in the signature. let (is0, cs1) = unzip $ for (zip [0..] cs) $ \ (i, cl) -> let unreachable = i `Set.notMember` used in (boolToMaybe unreachable i, cl { clauseUnreachable = Just unreachable }) -- is = indices of unreachable clauses let is = catMaybes is0 reportSDoc "tc.cover.top" 10 $ vcat [ text $ "unreachable clauses: " ++ if null is then "(none)" else show is ] -- Replace the first clauses by @cs1@. There might be more -- added by @inferMissingClause@. modifyFunClauses f $ \ cs0 -> cs1 ++ drop (length cs1) cs0 -- Warn if there are unreachable clauses and mark them as unreachable. unless (null is) $ do -- Warn about unreachable clauses. let unreached = filter ((Just True ==) . clauseUnreachable) cs1 setCurrentRange (map clauseFullRange unreached) $ warning $ UnreachableClauses f $ map namedClausePats unreached -- report a warning if there are clauses that are not preserved as -- definitional equalities and --exact-split is enabled unless (null noex) $ do let noexclauses = map (indexWithDefault __IMPOSSIBLE__ cs1) noex setCurrentRange (map clauseLHSRange noexclauses) $ warning $ CoverageNoExactSplit f $ noexclauses return splitTree -- | Top-level function for eliminating redundant clauses in the interactive -- case splitter isCovered :: QName -> [Clause] -> SplitClause -> TCM Bool isCovered f cs sc = do CoverResult { coverMissingClauses = missing } <- cover f cs sc return $ null missing data CoverResult = CoverResult { coverSplitTree :: SplitTree , coverUsedClauses :: Set Nat , coverMissingClauses :: [(Telescope, [NamedArg DeBruijnPattern])] , coverPatterns :: [Closure Clause] -- ^ The set of patterns used as cover. -- Entering the closure puts you directly in the right context (and cps) for the RHS. , coverNoExactClauses :: Set Nat } -- | @cover f cs (SClause _ _ ps _) = return (splitTree, used, pss)@. -- checks that the list of clauses @cs@ covers the given split clause. -- Returns the @splitTree@, the @used@ clauses, and missing cases @pss@. -- -- Effect: adds missing instance clauses for @f@ to signature. -- cover :: QName -> [Clause] -> SplitClause -> TCM CoverResult cover f cs sc@(SClause tel ps _ _ target) = updateRelevance $ do reportSDoc "tc.cover.cover" 10 $ inTopContext $ vcat [ "checking coverage of pattern:" , nest 2 $ "tel =" <+> prettyTCM tel , nest 2 $ "ps =" <+> do addContext tel $ prettyTCMPatternList $ fromSplitPatterns ps , nest 2 $ "target =" <+> do addContext tel $ maybe (text "") prettyTCM target , nest 2 $ "target sort =" <+> do addContext tel $ maybe (text "") (prettyTCM . getSort . unArg) target ] match cs ps >>= \case Yes (i,mps) -> do exact <- allM (map snd mps) isTrivialPattern let cl0 = indexWithDefault __IMPOSSIBLE__ cs i let noExactClause = if exact || clauseCatchall (indexWithDefault __IMPOSSIBLE__ cs i) then Set.empty else Set.singleton i reportSLn "tc.cover.cover" 10 $ "pattern covered by clause " ++ show i reportSDoc "tc.cover.cover" 20 $ text "with mps = " <+> do addContext tel $ pretty $ mps cl <- applyCl sc cl0 mps return $ CoverResult (SplittingDone (size tel)) (Set.singleton i) [] [cl] noExactClause No -> do reportSLn "tc.cover" 20 $ "pattern is not covered" -- TODO Andrea: add hcomp clause! case fmap getHiding target of Just h | isInstance h -> do -- Ulf, 2016-10-31: For now we only infer instance clauses. It would -- make sense to do it also for hidden, but since the value of a -- hidden clause is expected to be forced by later clauses, it's too -- late to add it now. If it was inferrable we would have gotten a -- type error before getting to this point. cl <- inferMissingClause f sc return $ CoverResult (SplittingDone (size tel)) Set.empty [] [cl] Set.empty _ -> do let ps' = fromSplitPatterns ps return $ CoverResult (SplittingDone (size tel)) Set.empty [(tel, ps')] [] Set.empty -- We need to split! -- If all clauses have an unsplit copattern, we try that first. Block res bs -> trySplitRes res (null bs) $ do when (null bs) __IMPOSSIBLE__ -- Otherwise, if there are variables to split, we try them -- in the order determined by a split strategy. reportSLn "tc.cover.strategy" 20 $ "blocking vars = " ++ prettyShow bs -- xs is a non-empty lists of blocking variables -- try splitting on one of them xs <- splitStrategy bs tel -- Andreas, 2017-10-08, issue #2594 -- First, try to find split order for complete coverage. -- If this fails, try to at least carry out the splitting to the end. continue xs NoAllowPartialCover $ \ _err -> do continue xs YesAllowPartialCover $ \ err -> do typeError $ SplitError err where applyCl :: SplitClause -> Clause -> [(Nat, SplitPattern)] -> TCM (Closure Clause) applyCl SClause{scTel = tel, scCheckpoints = cps} cl mps = addContext tel $ locallyTC eCheckpoints (const cps) $ checkpoint IdS $ do reportSDoc "tc.cover.applyCl" 40 $ "applyCl" reportSDoc "tc.cover.applyCl" 40 $ "tel =" <+> prettyTCM tel reportSDoc "tc.cover.applyCl" 40 $ "ps =" <+> pretty (namedClausePats cl) reportSDoc "tc.cover.applyCl" 40 $ "mps =" <+> pretty mps reportSDoc "tc.cover.applyCl" 40 $ "s =" <+> pretty s reportSDoc "tc.cover.applyCl" 40 $ "new ps =" <+> pretty (s `applySubst` namedClausePats cl) buildClosure $ Clause { clauseLHSRange = clauseLHSRange cl , clauseFullRange = clauseFullRange cl , clauseTel = tel , namedClausePats = s `applySubst` namedClausePats cl , clauseBody = (s `applyPatSubst`) <$> clauseBody cl , clauseType = (s `applyPatSubst`) <$> clauseType cl , clauseCatchall = clauseCatchall cl , clauseUnreachable = clauseUnreachable cl } where (vs,qs) = unzip mps mps' = zip vs $ map namedArg $ fromSplitPatterns $ map defaultNamedArg qs s = parallelS (for [0..maximum (-1:vs)] $ (\ i -> fromMaybe (deBruijnVar i) (List.lookup i mps'))) updateRelevance :: TCM a -> TCM a updateRelevance cont = -- Don't do anything if there is no target type info. caseMaybe target cont $ \ b -> do -- TODO (2018-10-16): if proofs get erased in the compiler, also wake erased vars! let m = getModality b applyModalityToContext m cont continue :: [BlockingVar] -> AllowPartialCover -> (SplitError -> TCM CoverResult) -> TCM CoverResult continue xs allowPartialCover handle = do r <- altM1 (\ x -> fmap (,x) <$> split Inductive allowPartialCover sc x) xs case r of Left err -> handle err -- If we get the empty covering, we have reached an impossible case -- and are done. Right (Covering n [], _) -> do -- TODO Andrea: I guess an empty pattern is not part of the cover? let qs = [] return $ CoverResult (SplittingDone (size tel)) Set.empty [] qs Set.empty Right (Covering n scs, x) -> do cs <- do let fallback = return cs caseMaybeM (getPrimitiveName' builtinHComp) fallback $ \ comp -> do let isComp = \case SplitCon c -> comp == c _ -> False caseMaybe (List.find (isComp . fst) scs) fallback $ \ (_, newSc) -> do snoc cs <$> createMissingHCompClause f n x sc newSc results <- mapM (cover f cs) (map snd scs) let trees = map coverSplitTree results useds = map coverUsedClauses results psss = map coverMissingClauses results qsss = map coverPatterns results noex = map coverNoExactClauses results -- Jesper, 2016-03-10 We need to remember which variables were -- eta-expanded by the unifier in order to generate a correct split -- tree (see Issue 1872). reportSDoc "tc.cover.split.eta" 60 $ vcat [ "etaRecordSplits" , nest 2 $ vcat [ "n = " <+> text (show n) , "scs = " <+> prettyTCM scs , "ps = " <+> prettyTCMPatternList (fromSplitPatterns ps) ] ] -- TODO Andrea: do something with etaRecordSplits and qsss? let trees' = zipWith (etaRecordSplits (unArg n) ps) scs trees tree = SplitAt n trees' return $ CoverResult tree (Set.unions useds) (concat psss) (concat qsss) (Set.unions noex) -- Try to split result trySplitRes :: BlockedOnResult -- ^ Are we blocked on the result? -> Bool -- ^ Is this the last thing we try? -> TCM CoverResult -- ^ Continuation -> TCM CoverResult -- not blocked on result: try regular splits trySplitRes NotBlockedOnResult finalSplit cont | finalSplit = __IMPOSSIBLE__ -- there must be *some* reason we are blocked | otherwise = cont -- blocked on arguments that are not yet introduced: -- we must split on a variable so that the target type becomes a pi type trySplitRes (BlockedOnApply IsApply) finalSplit cont | finalSplit = __IMPOSSIBLE__ -- already ruled out by lhs checker | otherwise = cont -- ...or it was an IApply pattern, so we might just need to introduce the variable now. trySplitRes (BlockedOnApply IsIApply) finalSplit cont = do caseMaybeM (splitResultPath f sc) fallback $ \ sc -> cover f cs . snd =<< fixTarget sc where fallback | finalSplit = __IMPOSSIBLE__ -- already ruled out by lhs checker? | otherwise = cont -- blocked on result but there are catchalls: -- try regular splits if there are any, or else throw an error, -- this is nicer than continuing and reporting unreachable clauses -- (see issue #2833) trySplitRes (BlockedOnProj True) finalSplit cont | finalSplit = typeError $ SplitError CosplitCatchall | otherwise = cont -- all clauses have an unsplit copattern: try to split trySplitRes (BlockedOnProj False) finalSplit cont = do reportSLn "tc.cover" 20 $ "blocked by projection pattern" -- forM is a monadic map over a Maybe here mcov <- splitResultRecord f sc case mcov of Left err | finalSplit -> typeError $ SplitError err | otherwise -> cont Right (Covering n scs) -> do -- If result splitting was successful, continue coverage checking. (projs, results) <- unzip <$> do mapM (traverseF $ cover f cs <=< (snd <.> fixTarget)) scs -- OR: -- forM scs $ \ (proj, sc') -> (proj,) <$> do -- cover f cs =<< do -- snd <$> fixTarget sc' let trees = map coverSplitTree results useds = map coverUsedClauses results psss = map coverMissingClauses results qsss = map coverPatterns results noex = map coverNoExactClauses results tree = SplitAt n $ zip projs trees return $ CoverResult tree (Set.unions useds) (concat psss) (concat qsss) (Set.unions noex) gatherEtaSplits :: Int -> SplitClause -> [NamedArg SplitPattern] -> [NamedArg SplitPattern] gatherEtaSplits n sc [] | n >= 0 = __IMPOSSIBLE__ -- we should have encountered the main -- split by now already | otherwise = [] gatherEtaSplits n sc (p:ps) = case namedArg p of VarP _ x | n == 0 -> case p' of -- this is the main split VarP _ _ -> p : gatherEtaSplits (-1) sc ps DotP _ _ -> __IMPOSSIBLE__ ConP _ _ qs -> qs ++ gatherEtaSplits (-1) sc ps LitP _ -> gatherEtaSplits (-1) sc ps ProjP{} -> __IMPOSSIBLE__ IApplyP{} -> __IMPOSSIBLE__ DefP _ _ qs -> qs ++ gatherEtaSplits (-1) sc ps -- __IMPOSSIBLE__ -- Andrea: maybe? | otherwise -> updateNamedArg (\ _ -> p') p : gatherEtaSplits (n-1) sc ps where p' = lookupS (scSubst sc) $ splitPatVarIndex x IApplyP{} -> updateNamedArg (applySubst (scSubst sc)) p : gatherEtaSplits (n-1) sc ps DotP _ _ -> p : gatherEtaSplits (n-1) sc ps -- count dot patterns ConP _ _ qs -> gatherEtaSplits n sc (qs ++ ps) DefP _ _ qs -> gatherEtaSplits n sc (qs ++ ps) LitP _ -> gatherEtaSplits n sc ps ProjP{} -> gatherEtaSplits n sc ps addEtaSplits :: Int -> [NamedArg SplitPattern] -> SplitTree -> SplitTree addEtaSplits k [] t = t addEtaSplits k (p:ps) t = case namedArg p of VarP _ _ -> addEtaSplits (k+1) ps t DotP _ _ -> addEtaSplits (k+1) ps t ConP c cpi qs -> SplitAt (p $> k) [(SplitCon (conName c) , addEtaSplits k (qs ++ ps) t)] LitP _ -> __IMPOSSIBLE__ ProjP{} -> __IMPOSSIBLE__ DefP{} -> __IMPOSSIBLE__ -- Andrea: maybe? IApplyP{} -> addEtaSplits (k+1) ps t etaRecordSplits :: Int -> [NamedArg SplitPattern] -> (SplitTag,SplitClause) -> SplitTree -> (SplitTag,SplitTree) etaRecordSplits n ps (q , sc) t = (q , addEtaSplits 0 (gatherEtaSplits n sc ps) t) -- | Append an hcomp clause to the clauses of a function. createMissingHCompClause :: QName -- ^ Function name. -> Arg Nat -- ^ index of hcomp pattern -> BlockingVar -- ^ Blocking var that lead to hcomp split. -> SplitClause -- ^ Clause before the hcomp split -> SplitClause -- ^ Clause to add. -> TCM Clause createMissingHCompClause f n x old_sc (SClause tel ps _sigma' cps (Just t)) = setCurrentRange f $ do reportSDoc "tc.cover.hcomp" 20 $ addContext tel $ text "Trying to create right-hand side of type" <+> prettyTCM t reportSDoc "tc.cover.hcomp" 30 $ addContext tel $ text "ps = " <+> prettyTCMPatternList (fromSplitPatterns ps) reportSDoc "tc.cover.hcomp" 30 $ text "tel = " <+> prettyTCM tel io <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinIOne iz <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinIZero let cannotCreate doc t = do typeError . SplitError $ CannotCreateMissingClause f (tel,fromSplitPatterns ps) doc t let old_ps = patternsToElims $ fromSplitPatterns $ scPats old_sc old_t = fromJust $ scTarget old_sc old_tel = scTel old_sc -- old_tel = Γ(x:H)Δ -- Γ(x:H)Δ ⊢ old_t -- vs = iApplyVars old_ps -- [ α ⇒ b ] = [(i,f old_ps (i=0),f old_ps (i=1)) | i <- vs] -- Γ(x:H)(δ : Δ) ⊢ [ α ⇒ b ] -- Γ(x:H)Δ ⊢ f old_ps : old_t [ α ⇒ b ] -- Γ,φ,u,u0,Δ(x = hcomp φ u u0) ⊢ rhs_we_define : (old_t[ α ⇒ b ])(x = hcomp φ u u0) -- Extra assumption: -- tel = Γ,φ,u,u0,Δ(x = hcomp φ u u0),Δ' -- ps = old_ps[x = hcomp φ u u0],ps' -- with Δ' and ps' introduced by fixTarget. -- So final clause will be: -- tel ⊢ ps ↦ rhs_we_define{wkS ..} ps' getLevel t = do s <- reduce $ getSort t case s of Type l -> pure (Level l) s -> do reportSDoc "tc.cover.hcomp" 20 $ text "getLevel, s = " <+> prettyTCM s typeError . GenericDocError =<< (text "The sort of" <+> prettyTCM t <+> text "should be of the form \"Set l\"") -- Γ ⊢ hdelta = (x : H)(δ : Δ) (gamma,hdelta@(ExtendTel hdom delta)) = splitTelescopeAt (size old_tel - (blockingVarNo x + 1)) old_tel -- Γ,φ,u,u0,Δ(x = hcomp φ u u0) ⊢ (working_tel,_deltaEx) = splitTelescopeAt (size gamma + 3 + size delta) tel -- Γ,φ,u,u0,(x:H)(δ : Δ) ⊢ rhoS : Γ(x:H)(δ : Δ) rhoS = liftS (size hdelta) $ raiseS 3 vs = iApplyVars (scPats old_sc) -- Γ(x:H)(δ : Δ) ⊢ [ α ⇒ b ] = [(i,f old_ps (i=0),f old_ps (i=1)) | i <- vs] alphab <- forM vs $ \ i -> do let -- Γ(x:H)(δ : Δ) ⊢ tm = Def f old_ps -- TODO only reduce IApply _ _ (0/1), as to avoid termination problems (l,r) <- reduce (inplaceS i iz `applySubst` tm, inplaceS i io `applySubst` tm) return $ (var i, (l, r)) cl <- do (ty,rhs) <- addContext working_tel $ do -- Γ(x:H)Δ ⊢ g = f old_ps : old_t [ α ⇒ b ] -- Γ(x:H)(δ : Δ) ⊢ [ α ⇒ b ] -- Γ,φ,u,u0 ⊢ Δf = i.Δ[x = hfill φ u u0 i] -- Γ,φ,u,u0,δ : Δ(x = hcomp φ u u0) ⊢ δ_fill = i.tFillTel (i. Δf[~i]) δ (~ i) : i.Δf[i] -- Γ,φ,u,u0,δ : Δ(x = hcomp φ u u0) ⊢ old_t_fill = i.old_t[x = hfill φ u u0 i, δ_fill[i]] -- Γ,φ,u,u0,δ : Δ(x = hcomp φ u u0) ⊢ comp (\ i. old_t_fill[i]) -- (\ i. [ φ ↦ g[x = hfill φ u u0 i,δ_fill[i]] = g[u i,δ_fill[i]] -- α ↦ b[x = hfill φ u u0 i,δ_fill[i]] -- ]) -- (g[x = u0,δ_fill[0]]) : old_t[x = hcomp φ u u0,δ] runNamesT [] $ do tPOr <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinPOr tIMax <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinIMax tIMin <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinIMin tINeg <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinINeg tHComp <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinHComp tTrans <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinTrans extra_ps <- open $ patternsToElims $ fromSplitPatterns $ drop (length old_ps) ps let ineg j = pure tINeg <@> j imax i j = pure tIMax <@> i <@> j imin i j = pure tIMin <@> i <@> j trFillTel' a b c d = do m <- trFillTel <$> a <*> b <*> c <*> d x <- lift $ runExceptT m case x of Left bad_t -> cannotCreate "Cannot transport with type family:" bad_t Right args -> return args comp <- do let forward la bA r u = pure tTrans <#> (lam "i" $ \ i -> la <@> (i `imax` r)) <@> (lam "i" $ \ i -> bA <@> (i `imax` r)) <@> r <@> u return $ \ la bA phi u u0 -> pure tHComp <#> (la <@> pure io) <#> (bA <@> pure io) <#> phi <@> (lam "i" $ \ i -> ilam "o" $ \ o -> forward la bA i (u <@> i <..> o)) <@> forward la bA (pure iz) u0 let hcomp la bA phi u u0 = pure tHComp <#> la <#> bA <#> phi <@> u <@> u0 hfill la bA phi u u0 i = hcomp la bA (pure tIMax <@> phi <@> (pure tINeg <@> i)) (lam "j" $ \ j -> pure tPOr <#> la <@> phi <@> (pure tINeg <@> i) <#> (ilam "o" $ \ _ -> bA) <@> (ilam "o" $ \ o -> u <@> (pure tIMin <@> i <@> j) <..> o) <@> (ilam "o" $ \ _ -> u0) ) u0 -- Γ,φ,u,u0,(δ : Δ(x = hcomp φ u u0)) ⊢ hcompS : Γ(x:H)(δ : Δ) hcompS <- lift $ do hdom <- pure $ raise 3 hdom let [phi,u,u0] = map (pure . var) [2,1,0] htype = pure $ unEl . unDom $ hdom lvl = getLevel $ unDom hdom hc <- pure tHComp <#> lvl <#> htype <#> phi <@> u <@> u0 return $ liftS (size delta) $ hc `consS` raiseS 3 -- Γ,φ,u,u0,Δ(x = hcomp phi u u0) ⊢ raise 3+|Δ| hdom hdom <- pure $ raise (3+size delta) hdom htype <- open $ unEl . unDom $ hdom lvl <- open =<< (lift . getLevel $ unDom hdom) -- Γ,φ,u,u0,Δ(x = hcomp phi u u0) ⊢ [phi,u,u0] <- mapM (open . raise (size delta) . var) [2,1,0] -- Γ,x,Δ ⊢ f old_ps -- Γ ⊢ abstract hdelta (f old_ps) g <- open $ raise (3+size delta) $ abstract hdelta (Def f old_ps) old_t <- open $ raise (3+size delta) $ abstract hdelta (unArg old_t) let bapp a x = lazyAbsApp <$> a <*> x (delta_fill :: NamesT TCM (Abs Args)) <- (open =<<) $ do -- Γ,φ,u,u0,Δ(x = hcomp phi u u0) ⊢ x.Δ delta <- open $ raise (3+size delta) delta -- Γ,φ,u,u0,Δ(x = hcomp phi u u0) ⊢ i.Δ(x = hfill phi u u0 (~ i)) deltaf <- open =<< bind "i" (\ i -> (delta `bapp` hfill lvl htype phi u u0 (ineg i))) -- Γ,φ,u,u0,Δ(x = hcomp phi u u0) ⊢ Δ(x = hcomp phi u u0) = Δf[0] args <- (open =<<) $ teleArgs <$> (lazyAbsApp <$> deltaf <*> pure iz) bind "i" $ \ i -> addContext ("i" :: String) $ do -- for error messages. -- Γ,φ,u,u0,Δ(x = hcomp phi u u0),(i:I) ⊢ ... : Δ(x = hfill phi u u0 i) trFillTel' deltaf (pure iz) args (ineg i) let apply_delta_fill i f = apply <$> f <*> (delta_fill `bapp` i) call v i = apply_delta_fill i $ g <@> v ty <- do return $ \ i -> do v <- hfill lvl htype phi u u0 i hd <- old_t args <- delta_fill `bapp` i lift $ piApplyM hd $ [Arg (domInfo hdom) v] ++ args ty_level <- do t <- bind "i" ty s <- reduce $ getSort (absBody t) reportSDoc "tc.cover.hcomp" 20 $ text "ty_level, s = " <+> prettyTCM s case s of Type l -> open =<< (lam "i" $ \ _ -> pure $ Level l) _ -> cannotCreate "Cannot compose with type family:" =<< (liftTCM $ buildClosure t) let pOr_ty i phi psi u0 u1 = pure tPOr <#> (ty_level <@> i) <@> phi <@> psi <#> (ilam "o" $ \ _ -> unEl <$> ty i) <@> u0 <@> u1 alpha <- do vars <- mapM (open . applySubst hcompS . fst) alphab return $ foldr imax (pure iz) $ map (\ v -> v `imax` ineg v) vars -- Γ,φ,u,u0,Δ(x = hcomp φ u u0) ⊢ b : (i : I) → [α] -> old_t[x = hfill φ u u0 i,δ_fill[i]] b <- do sides <- forM alphab $ \ (psi,(side0,side1)) -> do psi <- open $ hcompS `applySubst` psi [side0,side1] <- mapM (open . raise (3+size delta) . abstract hdelta) [side0,side1] return $ (ineg psi `imax` psi, \ i -> pOr_ty i (ineg psi) psi (ilam "o" $ \ _ -> apply_delta_fill i $ side0 <@> hfill lvl htype phi u u0 i) (ilam "o" $ \ _ -> apply_delta_fill i $ side1 <@> hfill lvl htype phi u u0 i)) let recurse [] i = __IMPOSSIBLE__ recurse [(psi,u)] i = u i recurse ((psi,u):xs) i = pOr_ty i psi (foldr imax (pure iz) (map fst xs)) (u i) (recurse xs i) return $ recurse sides ((,) <$> ty (pure io) <*>) $ do comp ty_level (lam "i" $ \ i -> unEl <$> ty i) (phi `imax` alpha) (lam "i" $ \ i -> let rhs = (ilam "o" $ \ o -> call (u <@> i <..> o) i) in if null alphab then rhs else pOr_ty i phi alpha rhs (b i) ) (call u0 (pure iz)) reportSDoc "tc.cover.hcomp" 20 $ text "old_tel =" <+> prettyTCM tel let n = size tel - (size gamma + 3 + size delta) reportSDoc "tc.cover.hcomp" 20 $ text "n =" <+> text (show n) (TelV deltaEx t,bs) <- telViewUpToPathBoundary' n ty rhs <- pure $ raise n rhs `applyE` teleElims deltaEx bs cxt <- getContextTelescope reportSDoc "tc.cover.hcomp" 30 $ text "cxt = " <+> prettyTCM cxt reportSDoc "tc.cover.hcomp" 30 $ text "tel = " <+> prettyTCM tel reportSDoc "tc.cover.hcomp" 20 $ addContext tel $ text "t = " <+> prettyTCM t reportSDoc "tc.cover.hcomp" 20 $ addContext tel $ text "rhs = " <+> prettyTCM rhs return $ Clause { clauseLHSRange = noRange , clauseFullRange = noRange , clauseTel = tel , namedClausePats = fromSplitPatterns ps , clauseBody = Just $ rhs , clauseType = Just $ defaultArg t , clauseCatchall = False , clauseUnreachable = Just False -- missing, thus, not unreachable } addClauses f [cl] -- Important: add at the end. return cl createMissingHCompClause _ _ _ _ (SClause _ _ _ _ Nothing) = __IMPOSSIBLE__ -- | Append a instance clause to the clauses of a function. inferMissingClause :: QName -- ^ Function name. -> SplitClause -- ^ Clause to add. Clause hiding (in 'clauseType') must be 'Instance'. -> TCM (Closure Clause) inferMissingClause f (SClause tel ps _ cps (Just t)) = setCurrentRange f $ do reportSDoc "tc.cover.infer" 20 $ addContext tel $ "Trying to infer right-hand side of type" <+> prettyTCM t cl <- addContext tel $ locallyTC eCheckpoints (const cps) $ checkpoint IdS $ do -- introduce a fresh checkpoint (_x, rhs) <- case getHiding t of Instance{} -> newInstanceMeta "" (unArg t) Hidden -> __IMPOSSIBLE__ NotHidden -> __IMPOSSIBLE__ buildClosure $ Clause { clauseLHSRange = noRange , clauseFullRange = noRange , clauseTel = tel , namedClausePats = fromSplitPatterns ps , clauseBody = Just rhs , clauseType = Just t , clauseCatchall = False , clauseUnreachable = Just False -- missing, thus, not unreachable } addClauses f [clValue cl] -- Important: add at the end. return cl inferMissingClause _ (SClause _ _ _ _ Nothing) = __IMPOSSIBLE__ splitStrategy :: BlockingVars -> Telescope -> TCM BlockingVars splitStrategy bs tel = return $ updateLast setBlockingVarOverlap xs -- Make sure we do not insists on precomputed coverage when -- we make our last try to split. -- Otherwise, we will not get a nice error message. where xs = bs {- KEEP! -- Andreas, 2012-10-13 -- The following split strategy which prefers all-constructor columns -- fails on test/fail/CoverStrategy xs = ys ++ zs (ys, zs) = partition allConstructors bs allConstructors :: BlockingVar -> Bool allConstructors = isJust . snd -} -- | Check that a type is a non-irrelevant datatype or a record with -- named constructor. Unless the 'Induction' argument is 'CoInductive' -- the data type must be inductive. isDatatype :: (MonadTCM tcm, MonadError SplitError tcm) => Induction -> Dom Type -> tcm (DataOrRecord, QName, [Arg Term], [Arg Term], [QName], Bool) isDatatype ind at = do let t = unDom at throw f = throwError . f =<< do liftTCM $ buildClosure t t' <- liftTCM $ reduce t mInterval <- liftTCM $ getBuiltinName' builtinInterval mIsOne <- liftTCM $ getBuiltinName' builtinIsOne case unEl t' of Def d [] | Just d == mInterval -> throw NotADatatype Def d [Apply phi] | Just d == mIsOne -> do xs <- liftTCM $ decomposeInterval =<< reduce (unArg phi) if null xs then return $ (IsData, d, [phi], [], [], False) else throw NotADatatype Def d es -> do let ~(Just args) = allApplyElims es def <- liftTCM $ theDef <$> getConstInfo d case def of Datatype{dataPars = np, dataCons = cs, dataInduction = i} | i == CoInductive && ind /= CoInductive -> throw CoinductiveDatatype | otherwise -> do let (ps, is) = splitAt np args return (IsData, d, ps, is, cs, not $ null (dataPathCons def)) Record{recPars = np, recConHead = con, recInduction = i} | i == Just CoInductive && ind /= CoInductive -> throw CoinductiveDatatype | otherwise -> return (IsRecord, d, args, [], [conName con], False) _ -> throw NotADatatype _ -> throw NotADatatype -- | Update the target type, add more patterns to split clause -- if target becomes a function type. -- Returns the domains of the function type (if any). fixTarget :: SplitClause -> TCM (Telescope, SplitClause) fixTarget sc@SClause{ scTel = sctel, scPats = ps, scSubst = sigma, scCheckpoints = cps, scTarget = target } = caseMaybe target (return (empty, sc)) $ \ a -> do reportSDoc "tc.cover.target" 20 $ sep [ "split clause telescope: " <+> prettyTCM sctel , "old patterns : " <+> do addContext sctel $ prettyTCMPatternList $ fromSplitPatterns ps ] reportSDoc "tc.cover.target" 60 $ sep [ "substitution : " <+> prettyTCM sigma ] reportSDoc "tc.cover.target" 30 $ sep [ "target type before substitution (variables may be wrong): " <+> do addContext sctel $ prettyTCM a ] (TelV tel b) <- telViewUpTo (-1) $ applySplitPSubst sigma $ unArg a reportSDoc "tc.cover.target" 15 $ sep [ "target type telescope (after substitution): " <+> do addContext sctel $ prettyTCM tel , "target type core (after substitution): " <+> do addContext sctel $ addContext tel $ prettyTCM b ] let n = size tel -- Andreas, 2016-10-04 issue #2236 -- Need to set origin to "Inserted" to avoid printing of hidden patterns. xs = map (mapArgInfo hiddenInserted) $ teleNamedArgs tel -- Compute new split clause sctel' = telFromList $ telToList (raise n sctel) ++ telToList tel -- Dot patterns in @ps@ need to be raised! (Issue 1298) ps' = applySubst (raiseS n) ps ++ xs newTarget = Just $ a $> b sc' = SClause { scTel = sctel' , scPats = ps' , scSubst = wkS n $ sigma -- Should be wkS instead of liftS since -- variables are only added to new tel. , scCheckpoints = applySubst (raiseS n) cps , scTarget = newTarget } -- Separate debug printing to find cause of crash (Issue 1374) reportSDoc "tc.cover.target" 30 $ sep [ "new split clause telescope : " <+> prettyTCM sctel' ] reportSDoc "tc.cover.target" 30 $ sep [ "new split clause patterns : " <+> do addContext sctel' $ prettyTCMPatternList $ fromSplitPatterns ps' ] reportSDoc "tc.cover.target" 60 $ sep [ "new split clause substitution: " <+> prettyTCM (scSubst sc') ] reportSDoc "tc.cover.target" 30 $ sep [ "new split clause target : " <+> do addContext sctel' $ prettyTCM $ fromJust newTarget ] reportSDoc "tc.cover.target" 20 $ sep [ "new split clause" , prettyTCM sc' ] return $ if n == 0 then (empty, sc { scTarget = newTarget }) else (tel, sc') -- Andreas, 2017-01-18, issue #819, set visible arguments to UserWritten. -- Otherwise, they will be printed as _. hiddenInserted :: ArgInfo -> ArgInfo hiddenInserted ai | visible ai = setOrigin UserWritten ai | otherwise = setOrigin Inserted ai computeHCompSplit :: Telescope -- ^ Telescope before split point. -> PatVarName -- ^ Name of pattern variable at split point. -> Telescope -- ^ Telescope after split point. -> QName -- ^ Name of datatype to split at. -> Args -- ^ Data type parameters. -> Args -- ^ Data type indices. -> Nat -- ^ Index of split variable. -> Telescope -- ^ Telescope for the patterns. -> [NamedArg SplitPattern] -- ^ Patterns before doing the split. -> Map CheckpointId Substitution -- ^ Current checkpoints -- -> QName -- ^ Constructor to fit into hole. -> CoverM (Maybe (SplitTag,SplitClause)) -- ^ New split clause if successful. computeHCompSplit delta1 n delta2 d pars ixs hix tel ps cps = do -- Get the type of the datatype -- Δ1 ⊢ dtype dsort <- liftTCM $ (parallelS (reverse $ map unArg pars) `applySubst`) . dataSort . theDef <$> getConstInfo d hCompName <- fromMaybe __IMPOSSIBLE__ <$> getPrimitiveName' builtinHComp theHCompT <- defType <$> getConstInfo hCompName let dlvl = Level . (\ (Type s) -> s) $ dsort dterm = Def d [] `apply` (pars ++ ixs) -- Δ1 ⊢ gamma TelV gamma _ <- lift $ telView (theHCompT `piApply` [setHiding Hidden $ defaultArg $ dlvl , defaultArg $ dterm]) case (delta1 `abstract` gamma,IdS) of (delta1',rho0) -> do -- debugSubst "rho0" rho0 -- We have Δ₁' ⊢ ρ₀ : Δ₁Γ, so split it into the part for Δ₁ and the part for Γ let (rho1,rho2) = splitS (size gamma) $ toSplitPSubst rho0 -- Andreas, 2015-05-01 I guess it is fine to use no @conPType@ -- as the result of splitting is never used further down the pipeline. -- After splitting, Agda reloads the file. -- Andreas, 2017-09-03, issue #2729: remember that pattern was generated by case split. let -- cpi = noConPatternInfo{ conPRecord = Just PatOSplit } -- conp = ConP con cpi $ applySubst rho2 $ -- map (mapArgInfo hiddenInserted) $ tele2NamedArgs gamma0 gamma -- -- Andreas, 2016-09-08, issue #2166: use gamma0 for correct argument names defp = DefP PatOSystem hCompName . map (setOrigin Inserted) $ map (fmap unnamed) [setHiding Hidden $ defaultArg $ applySubst rho1 $ DotP PatOSystem $ dlvl ,setHiding Hidden $ defaultArg $ applySubst rho1 $ DotP PatOSystem $ dterm] ++ applySubst rho2 (teleNamedArgs gamma) -- rho0? -- Compute final context and substitution let rho3 = consS defp rho1 -- Δ₁' ⊢ ρ₃ : Δ₁(x:D) delta2' = applySplitPSubst rho3 delta2 -- Δ₂' = Δ₂ρ₃ delta' = delta1' `abstract` delta2' -- Δ' = Δ₁'Δ₂' rho = liftS (size delta2) rho3 -- Δ' ⊢ ρ : Δ₁(x:D)Δ₂ -- debugTel "delta'" delta' -- debugSubst "rho" rho -- debugPs tel ps -- Apply the substitution let ps' = applySubst rho ps -- debugPlugged delta' ps' let cps' = applySplitPSubst rho cps return $ Just . (SplitCon hCompName,) $ SClause delta' ps' rho cps' Nothing -- target fixed later -- | @computeNeighbourhood delta1 delta2 d pars ixs hix tel ps con@ -- -- @ -- delta1 Telescope before split point -- n Name of pattern variable at split point -- delta2 Telescope after split point -- d Name of datatype to split at -- pars Data type parameters -- ixs Data type indices -- hix Index of split variable -- tel Telescope for patterns ps -- ps Patterns before doing the split -- cps Current module parameter checkpoints -- con Constructor to fit into hole -- @ -- @dtype == d pars ixs@ computeNeighbourhood :: Telescope -- ^ Telescope before split point. -> PatVarName -- ^ Name of pattern variable at split point. -> Telescope -- ^ Telescope after split point. -> QName -- ^ Name of datatype to split at. -> Args -- ^ Data type parameters. -> Args -- ^ Data type indices. -> Nat -- ^ Index of split variable. -> Telescope -- ^ Telescope for the patterns. -> [NamedArg SplitPattern] -- ^ Patterns before doing the split. -> Map CheckpointId Substitution -- ^ Current checkpoints -> QName -- ^ Constructor to fit into hole. -> CoverM (Maybe SplitClause) -- ^ New split clause if successful. computeNeighbourhood delta1 n delta2 d pars ixs hix tel ps cps c = do -- Get the type of the datatype dtype <- liftTCM $ (`piApply` pars) . defType <$> getConstInfo d -- Get the real constructor name con <- liftTCM $ fromRight __IMPOSSIBLE__ <$> getConForm c con <- return $ con { conName = c } -- What if we restore the current name? -- Andreas, 2013-11-29 changes nothing! -- Get the type of the constructor ctype <- liftTCM $ defType <$> getConInfo con -- Lookup the type of the constructor at the given parameters (gamma0, cixs, boundary) <- do (TelV gamma0 (El _ d), boundary) <- liftTCM $ telViewPathBoundaryP (ctype `piApply` pars) let Def _ es = d Just cixs = allApplyElims es return (gamma0, cixs, boundary) -- Andreas, 2012-02-25 preserve name suggestion for recursive arguments -- of constructor let preserve (x, t@(El _ (Def d' _))) | d == d' = (n, t) preserve (x, t) = (x, t) gammal = map (fmap preserve) . telToList $ gamma0 gamma = telFromList gammal delta1Gamma = delta1 `abstract` gamma debugInit con ctype d pars ixs cixs delta1 delta2 gamma tel ps hix -- All variables are flexible let flex = allFlexVars delta1Gamma -- Unify constructor target and given type (in Δ₁Γ) let conIxs = drop (size pars) cixs givenIxs = raise (size gamma) ixs r <- unifyIndices delta1Gamma flex (raise (size gamma) dtype) conIxs givenIxs case r of NoUnify {} -> debugNoUnify $> Nothing DontKnow errs -> do debugCantSplit throwError $ UnificationStuck (conName con) (delta1 `abstract` gamma) conIxs givenIxs errs Unifies (delta1',rho0,_) -> do debugSubst "rho0" rho0 let rho0' = toSplitPSubst rho0 -- We have Δ₁' ⊢ ρ₀ : Δ₁Γ, so split it into the part for Δ₁ and the part for Γ let (rho1,rho2) = splitS (size gamma) $ rho0' -- Andreas, 2015-05-01 I guess it is fine to use no @conPType@ -- as the result of splitting is never used further down the pipeline. -- After splitting, Agda reloads the file. -- Andreas, 2017-09-03, issue #2729: remember that pattern was generated by case split. let cpi = noConPatternInfo{ conPRecord = Just PatOSplit } conp = ConP con cpi $ applySubst rho0' $ map (mapArgInfo hiddenInserted) $ telePatterns' (tele2NamedArgs gamma0) gamma boundary -- Andreas, 2016-09-08, issue #2166: use gamma0 for correct argument names -- Compute final context and substitution let rho3 = consS conp rho1 -- Δ₁' ⊢ ρ₃ : Δ₁(x:D) delta2' = applySplitPSubst rho3 delta2 -- Δ₂' = Δ₂ρ₃ delta' = delta1' `abstract` delta2' -- Δ' = Δ₁'Δ₂' rho = liftS (size delta2) rho3 -- Δ' ⊢ ρ : Δ₁(x:D)Δ₂ debugTel "delta'" delta' debugSubst "rho" rho debugPs tel ps -- Apply the substitution let ps' = applySubst rho ps debugPlugged delta' ps' let cps' = applySplitPSubst rho cps return $ Just $ SClause delta' ps' rho cps' Nothing -- target fixed later where debugInit con ctype d pars ixs cixs delta1 delta2 gamma tel ps hix = liftTCM $ reportSDoc "tc.cover.split.con" 20 $ vcat [ "computeNeighbourhood" , nest 2 $ vcat [ "context=" <+> (inTopContext . prettyTCM =<< getContextTelescope) , "con =" <+> prettyTCM con , "ctype =" <+> prettyTCM ctype , "ps =" <+> do inTopContext $ addContext tel $ prettyTCMPatternList $ fromSplitPatterns ps , "d =" <+> prettyTCM d , "pars =" <+> do prettyList $ map prettyTCM pars , "ixs =" <+> do addContext delta1 $ prettyList $ map prettyTCM ixs , "cixs =" <+> do addContext gamma $ prettyList $ map prettyTCM cixs , "delta1 =" <+> do inTopContext $ prettyTCM delta1 , "delta2 =" <+> do inTopContext $ addContext delta1 $ addContext gamma $ prettyTCM delta2 , "gamma =" <+> do inTopContext $ addContext delta1 $ prettyTCM gamma , "hix =" <+> text (show hix) ] ] debugNoUnify = liftTCM $ reportSLn "tc.cover.split.con" 20 " Constructor impossible!" debugCantSplit = liftTCM $ reportSLn "tc.cover.split.con" 20 " Bad split!" debugSubst s sub = liftTCM $ reportSDoc "tc.cover.split.con" 20 $ nest 2 $ vcat [ text (s ++ " =") <+> prettyTCM sub ] debugTel s tel = liftTCM $ reportSDoc "tc.cover.split.con" 20 $ nest 2 $ vcat [ text (s ++ " =") <+> prettyTCM tel ] debugPs tel ps = liftTCM $ reportSDoc "tc.cover.split.con" 20 $ inTopContext $ addContext tel $ nest 2 $ vcat [ "ps =" <+> prettyTCMPatternList (fromSplitPatterns ps) ] debugPlugged delta' ps' = do liftTCM $ reportSDoc "tc.cover.split.con" 20 $ inTopContext $ addContext delta' $ nest 2 $ vcat [ "ps' =" <+> do prettyTCMPatternList $ fromSplitPatterns ps' ] -- | Introduce trailing pattern variables via 'fixTarget'? data FixTarget = YesFixTarget | NoFixTarget deriving (Show) -- | Allow partial covering for split? data AllowPartialCover = YesAllowPartialCover -- To try to coverage-check incomplete splits. | NoAllowPartialCover -- Default. deriving (Eq, Show) -- | Entry point from @Interaction.MakeCase@. splitClauseWithAbsurd :: SplitClause -> Nat -> TCM (Either SplitError (Either SplitClause Covering)) splitClauseWithAbsurd c x = split' CheckEmpty Inductive NoAllowPartialCover NoFixTarget c (BlockingVar x [] [] True) -- Andreas, 2016-05-03, issue 1950: -- Do not introduce trailing pattern vars after split, -- because this does not work for with-clauses. -- | Entry point from @TypeChecking.Empty@ and @Interaction.BasicOps@. -- @splitLast CoInductive@ is used in the @refine@ tactics. splitLast :: Induction -> Telescope -> [NamedArg DeBruijnPattern] -> TCM (Either SplitError Covering) splitLast ind tel ps = split ind NoAllowPartialCover sc (BlockingVar 0 [] [] True) where sc = SClause tel (toSplitPatterns ps) empty empty Nothing -- | @split ind splitClause x = return res@ -- splits @splitClause@ at pattern var @x@ (de Bruijn index). -- -- Possible results @res@ are: -- -- 1. @Left err@: -- Splitting failed. -- -- 2. @Right covering@: -- A covering set of split clauses, one for each valid constructor. -- This could be the empty set (denoting an absurd clause). split :: Induction -- ^ Coinductive constructors are allowed if this argument is -- 'CoInductive'. -> AllowPartialCover -- ^ Don't fail if computed 'Covering' does not cover all constructors. -> SplitClause -> BlockingVar -> TCM (Either SplitError Covering) split ind allowPartialCover sc x = fmap blendInAbsurdClause <$> split' NoCheckEmpty ind allowPartialCover YesFixTarget sc x where n = lookupPatternVar sc $ blockingVarNo x blendInAbsurdClause :: Either SplitClause Covering -> Covering blendInAbsurdClause = fromRight (const $ Covering n []) -- | Convert a de Bruijn index relative to the clause telescope to a de Bruijn -- level. The result should be the argument position (counted from left, -- starting with 0) to split at (dot patterns included!). lookupPatternVar :: SplitClause -> Int -> Arg Nat lookupPatternVar SClause{ scTel = tel, scPats = pats } x = arg $> if n < 0 then __IMPOSSIBLE__ else n where n = if k < 0 then __IMPOSSIBLE__ else fromMaybe __IMPOSSIBLE__ $ permPicks perm !!! k perm = fromMaybe __IMPOSSIBLE__ $ dbPatPerm $ fromSplitPatterns pats k = size tel - x - 1 arg = indexWithDefault __IMPOSSIBLE__ (telVars (size tel) tel) k data CheckEmpty = CheckEmpty | NoCheckEmpty -- | @split' ind pc ft splitClause x = return res@ -- splits @splitClause@ at pattern var @x@ (de Bruijn index). -- -- Possible results @res@ are: -- -- 1. @Left err@: -- Splitting failed. -- -- 2. @Right (Left splitClause')@: -- Absurd clause (type of @x@ has 0 valid constructors). -- -- 3. @Right (Right covering)@: -- A covering set of split clauses, one for each valid constructor. split' :: CheckEmpty -- ^ Use isEmptyType to check whether the type of the variable to -- split on is empty. This switch is necessary to break the cycle -- between split' and isEmptyType. -> Induction -- ^ Coinductive constructors are allowed if this argument is -- 'CoInductive'. -> AllowPartialCover -- ^ Don't fail if computed 'Covering' does not cover all constructors. -> FixTarget -- ^ If 'YesFixTarget', introduce new trailing variable patterns via -- 'fixTarget'. -> SplitClause -> BlockingVar -> TCM (Either SplitError (Either SplitClause Covering)) split' checkEmpty ind allowPartialCover fixtarget sc@(SClause tel ps _ cps target) (BlockingVar x pcons' plits overlap) = liftTCM $ runExceptT $ do debugInit tel x ps cps -- Split the telescope at the variable -- t = type of the variable, Δ₁ ⊢ t (n, t, delta1, delta2) <- do let (tel1, dom : tel2) = splitAt (size tel - x - 1) $ telToList tel return (fst $ unDom dom, snd <$> dom, telFromList tel1, telFromList tel2) -- Compute the neighbourhoods for the constructors let computeNeighborhoods = do -- Check that t is a datatype or a record -- Andreas, 2010-09-21, isDatatype now directly throws an exception if it fails -- cons = constructors of this datatype (dr, d, pars, ixs, cons', isHIT) <- inContextOfT $ isDatatype ind t cons <- case checkEmpty of CheckEmpty -> ifM (liftTCM $ inContextOfT $ isEmptyType $ unDom t) (pure []) (pure cons') NoCheckEmpty -> pure cons' mns <- forM cons $ \ con -> fmap (SplitCon con,) <$> computeNeighbourhood delta1 n delta2 d pars ixs x tel ps cps con hcompsc <- if isHIT then case fixtarget of YesFixTarget -> computeHCompSplit delta1 n delta2 d pars ixs x tel ps cps; _ -> return Nothing else return Nothing return $ (dr, catMaybes (mns ++ [hcompsc])) computeLitNeighborhoods = do typeOk <- liftTCM $ do t' <- litType $ headWithDefault {-'-} __IMPOSSIBLE__ plits liftTCM $ dontAssignMetas $ tryConversion $ equalType (unDom t) t' unless typeOk $ throwError . NotADatatype =<< do liftTCM $ buildClosure (unDom t) ns <- forM plits $ \lit -> do let delta2' = subst 0 (Lit lit) delta2 delta' = delta1 `abstract` delta2' rho = liftS x $ consS (LitP lit) idS ps' = applySubst rho ps cps' = applySplitPSubst rho cps return (SplitLit lit , SClause delta' ps' rho cps' Nothing) ca <- do let delta' = tel -- telescope is unchanged for catchall branch varp = VarP PatOSplit $ SplitPatVar { splitPatVarName = underscore , splitPatVarIndex = 0 , splitExcludedLits = plits } rho = liftS x $ consS varp $ raiseS 1 ps' = applySubst rho ps return (SplitCatchall , SClause delta' ps' rho cps Nothing) return (IsData , ns ++ [ ca ]) (dr, ns) <- if null pcons' && not (null plits) then computeLitNeighborhoods else computeNeighborhoods ns <- case fixtarget of NoFixTarget -> return ns YesFixTarget -> lift $ forM ns $ \(con,sc) -> (con,) . snd <$> fixTarget sc{ scTarget = target } -- Andreas, 2018-10-27, issue #3324; use isPropM. -- Need to reduce sort to decide on Prop. -- Cannot split if domain is a Prop but target is relevant. propArrowRel <- isPropM t `and2M` maybe (return True) (not <.> isPropM) target mHCompName <- getPrimitiveName' builtinHComp case ns of [] -> do let absurdp = VarP PatOAbsurd $ SplitPatVar underscore 0 [] rho = liftS x $ consS absurdp $ raiseS 1 ps' = applySubst rho ps return $ Left $ SClause { scTel = tel , scPats = ps' , scSubst = __IMPOSSIBLE__ -- not used , scCheckpoints = __IMPOSSIBLE__ -- not used , scTarget = Nothing } -- Jesper, 2018-05-24: If the datatype is in Prop we can -- only do empty splits, unless the target is in Prop too. (_ : _) | dr == IsData && propArrowRel -> throwError . IrrelevantDatatype =<< do liftTCM $ inContextOfT $ buildClosure (unDom t) -- Andreas, 2018-10-17: If more than one constructor matches, we cannot erase. (_ : _ : _) | not (usableQuantity t) -> throwError . ErasedDatatype =<< do liftTCM $ inContextOfT $ buildClosure (unDom t) _ -> do -- Andreas, 2012-10-10 fail if precomputed constructor set does not cover -- all the data type constructors -- Andreas, 2017-10-08 ... unless partial covering is explicitly allowed. let ptags = map (SplitCon . conName) pcons' ++ map SplitLit plits -- clauses for hcomp will be automatically generated. let inferred_tags = maybe Set.empty (Set.singleton . SplitCon) mHCompName let all_tags = Set.fromList ptags `Set.union` inferred_tags when (allowPartialCover == NoAllowPartialCover && overlap == False) $ for_ ns $ \(tag, sc) -> do when (not $ tag `Set.member` all_tags) $ do isImpossibleClause <- liftTCM $ isEmptyTel $ scTel sc unless isImpossibleClause $ do liftTCM $ reportSDoc "tc.cover" 10 $ vcat [ text "Missing case for" <+> prettyTCM tag , nest 2 $ prettyTCM sc ] throwError (GenericSplitError "precomputed set of constructors does not cover all cases") liftTCM $ checkSortOfSplitVar dr (unDom t) target return $ Right $ Covering (lookupPatternVar sc x) ns where inContextOfT, inContextOfDelta2 :: (MonadTCM tcm, MonadDebug tcm) => tcm a -> tcm a inContextOfT = addContext tel . escapeContext (x + 1) inContextOfDelta2 = addContext tel . escapeContext x -- Debug printing debugInit tel x ps cps = liftTCM $ inTopContext $ do reportSDoc "tc.cover.top" 10 $ vcat [ "TypeChecking.Coverage.split': split" , nest 2 $ vcat [ "tel =" <+> prettyTCM tel , "x =" <+> prettyTCM x , "ps =" <+> do addContext tel $ prettyTCMPatternList $ fromSplitPatterns ps , "cps =" <+> prettyTCM cps ] ] debugHoleAndType delta1 delta2 s ps t = liftTCM $ reportSDoc "tc.cover.top" 10 $ nest 2 $ vcat $ [ "p =" <+> text (patVarNameToString s) , "ps =" <+> prettyTCMPatternList ps , "delta1 =" <+> prettyTCM delta1 , "delta2 =" <+> inContextOfDelta2 (prettyTCM delta2) , "t =" <+> inContextOfT (prettyTCM t) ] -- | splitResult for MakeCase, tries to introduce IApply or ProjP copatterns splitResult :: QName -> SplitClause -> TCM (Either SplitError [SplitClause]) splitResult f sc = do caseMaybeM (splitResultPath f sc) ((fmap . fmap) splitClauses $ splitResultRecord f sc) (return . Right . (:[])) -- | Tries to split the result to introduce an IApply pattern. splitResultPath :: QName -> SplitClause -> TCM (Maybe SplitClause) splitResultPath f sc@(SClause tel ps _ _ target) = do caseMaybe target (return Nothing) $ \ t -> do caseMaybeM (isPath (unArg t)) (return Nothing) $ \ _ -> do (TelV i b, boundary) <- telViewUpToPathBoundary' 1 (unArg t) let tel' = abstract tel i rho = raiseS 1 ps' = applySubst rho (scPats sc) ++ telePatterns i boundary cps' = applySubst rho (scCheckpoints sc) target' = Just $ b <$ t return . Just $ SClause tel' ps' idS cps' target' -- | @splitResultRecord f sc = return res@ -- -- If the target type of @sc@ is a record type, a covering set of -- split clauses is returned (@sc@ extended by all valid projection patterns), -- otherwise @res == Left _@. -- Note that the empty set of split clauses is returned if the record has no fields. splitResultRecord :: QName -> SplitClause -> TCM (Either SplitError Covering) splitResultRecord f sc@(SClause tel ps _ _ target) = do reportSDoc "tc.cover.split" 10 $ vcat [ "splitting result:" , nest 2 $ "f =" <+> prettyTCM f , nest 2 $ "target =" <+> (addContext tel $ maybe empty prettyTCM target) ] -- if we want to split projections, but have no target type, we give up let failure = return . Left caseMaybe target (failure CosplitNoTarget) $ \ t -> do isR <- addContext tel $ isRecordType $ unArg t case isR of Just (_r, vs, Record{ recFields = fs }) -> do reportSDoc "tc.cover" 20 $ sep [ text $ "we are of record type _r = " ++ prettyShow _r , text "applied to parameters vs = " <+> (addContext tel $ prettyTCM vs) , text $ "and have fields fs = " ++ prettyShow fs ] -- Andreas, 2018-06-09, issue #2170, we always have irrelevant projections -- available on the lhs. -- -- Andreas, 2018-03-19, issue #2971, check that we have a "strong" record type, -- -- i.e., with all the projections. Otherwise, we may not split. -- ifNotM (strongRecord fs) (failure CosplitIrrelevantProjections) $ {-else-} do let es = patternsToElims $ fromSplitPatterns ps -- Note: module parameters are part of ps let self = defaultArg $ Def f [] `applyE` es pargs = vs ++ [self] reportSDoc "tc.cover" 20 $ sep [ text "we are self = " <+> (addContext tel $ prettyTCM $ unArg self) ] let n = defaultArg $ permRange $ fromMaybe __IMPOSSIBLE__ $ dbPatPerm $ fromSplitPatterns ps -- Andreas & James, 2013-11-19 includes the dot patterns! -- See test/succeed/CopatternsAndDotPatterns.agda for a case with dot patterns -- and copatterns which fails for @n = size tel@ with a broken case tree. -- Andreas, 2016-07-22 read the style of projections from the user's lips projOrigin <- ifM (optPostfixProjections <$> pragmaOptions) (return ProjPostfix) (return ProjPrefix) Right . Covering n <$> do forM fs $ \ proj -> do -- compute the new target dType <- defType <$> do getConstInfo $ unArg proj -- WRONG: typeOfConst $ unArg proj let -- type of projection instantiated at self target' = Just $ proj $> dType `piApply` pargs -- Always visible (#2287) projArg = fmap (Named Nothing . ProjP projOrigin) $ setHiding NotHidden proj sc' = sc { scPats = scPats sc ++ [projArg] , scSubst = idS , scTarget = target' } return (SplitCon (unArg proj), sc') _ -> addContext tel $ do buildClosure (unArg t) >>= failure . CosplitNoRecordType -- Andreas, 2018-06-09, issue #2170: splitting with irrelevant fields is always fine! -- where -- -- A record type is strong if it has all the projections. -- -- This is the case if --irrelevant-projections or no field is irrelevant. -- -- TODO: what about shape irrelevance? -- strongRecord :: [Arg QName] -> TCM Bool -- strongRecord fs = (optIrrelevantProjections <$> pragmaOptions) `or2M` -- (return $ not $ any isIrrelevant fs) -- * Boring instances -- | For debugging only. instance PrettyTCM SplitClause where prettyTCM (SClause tel pats sigma cps target) = sep [ "SplitClause" , nest 2 $ vcat [ "tel =" <+> prettyTCM tel , "pats =" <+> sep (map (prettyTCM . namedArg) pats) , "subst =" <+> prettyTCM sigma , "checkpoints =" <+> prettyTCM cps , "target =" <+> do caseMaybe target empty $ \ t -> do addContext tel $ prettyTCM t -- Triggers crash (see Issue 1374). -- , "subst target = " <+> do -- caseMaybe target empty $ \ t -> do -- addContext tel $ prettyTCM $ applySubst sigma t ] ] Agda-2.6.0.1/src/full/Agda/TypeChecking/Conversion.hs-boot0000644000000000000000000000176613466402171021302 0ustar0000000000000000 module Agda.TypeChecking.Conversion where import Agda.Syntax.Internal import Agda.TypeChecking.Monad compareTerm :: Comparison -> Type -> Term -> Term -> TCM () compareTermOnFace :: Comparison -> Term -> Type -> Term -> Term -> TCM () compareAtom :: Comparison -> Type -> Term -> Term -> TCM () compareArgs :: [Polarity] -> [IsForced] -> Type -> Term -> Args -> Args -> TCM () compareElims :: [Polarity] -> [IsForced] -> Type -> Term -> [Elim] -> [Elim] -> TCM () compareType :: Comparison -> Type -> Type -> TCM () compareTel :: Type -> Type -> Comparison -> Telescope -> Telescope -> TCM () compareSort :: Comparison -> Sort -> Sort -> TCM () compareLevel :: Comparison -> Level -> Level -> TCM () equalTerm :: Type -> Term -> Term -> TCM () equalTermOnFace :: Term -> Type -> Term -> Term -> TCM () equalType :: Type -> Type -> TCM () equalSort :: Sort -> Sort -> TCM () equalLevel :: Level -> Level -> TCM () leqType :: Type -> Type -> TCM () leqLevel :: Level -> Level -> TCM () Agda-2.6.0.1/src/full/Agda/TypeChecking/Level.hs-boot0000644000000000000000000000020213466402171020204 0ustar0000000000000000 module Agda.TypeChecking.Level where import Agda.TypeChecking.Monad import Agda.Syntax.Internal levelView :: Term -> TCM Level Agda-2.6.0.1/src/full/Agda/TypeChecking/SyntacticEquality.hs0000644000000000000000000001620513466402171021665 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- | A syntactic equality check that takes meta instantiations into account, -- but does not reduce. It replaces -- @ -- (v, v') <- instantiateFull (v, v') -- v == v' -- @ -- by a more efficient routine which only traverses and instantiates the terms -- as long as they are equal. module Agda.TypeChecking.SyntacticEquality (SynEq, checkSyntacticEquality) where import Prelude hiding (mapM) import Control.Applicative hiding ((<**>)) import Control.Arrow ((***)) import Control.Monad.State hiding (mapM) import Agda.Interaction.Options (optSyntacticEquality) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad (ReduceM, MonadReduce(..), pragmaOptions) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad import Agda.TypeChecking.Substitute import Agda.Utils.Monad (ifM) #include "undefined.h" import Agda.Utils.Impossible -- | Syntactic equality check for terms. -- @ -- checkSyntacticEquality v v' = do -- (v,v') <- instantiateFull (v,v') -- return ((v,v'), v==v') -- @ -- only that @v,v'@ are only fully instantiated to the depth -- where they are equal. {-# SPECIALIZE checkSyntacticEquality :: Term -> Term -> ReduceM ((Term, Term), Bool) #-} {-# SPECIALIZE checkSyntacticEquality :: Type -> Type -> ReduceM ((Type, Type), Bool) #-} checkSyntacticEquality :: (SynEq a, MonadReduce m) => a -> a -> m ((a, a), Bool) checkSyntacticEquality v v' = liftReduce $ do ifM (optSyntacticEquality <$> pragmaOptions) {-then-} (synEq v v' `runStateT` True) {-else-} (return ((v,v'), False)) -- | Monad for checking syntactic equality type SynEqM = StateT Bool ReduceM -- | Return, flagging inequalty. inequal :: a -> SynEqM a inequal a = put False >> return a -- | If inequality is flagged, return, else continue. ifEqual :: (a -> SynEqM a) -> (a -> SynEqM a) ifEqual cont a = ifM get (cont a) (return a) -- Since List2 is only Applicative, not a monad, I cannot -- define a List2T monad transformer, so we do it manually: (<$$>) :: Functor f => (a -> b) -> f (a,a) -> f (b,b) f <$$> xx = (f *** f) <$> xx pure2 :: Applicative f => a -> f (a,a) pure2 a = pure (a,a) (<**>) :: Applicative f => f (a -> b, a -> b) -> f (a,a) -> f (b,b) ff <**> xx = pure (uncurry (***)) <*> ff <*> xx -- | Instantiate full as long as things are equal class SynEq a where synEq :: a -> a -> SynEqM (a,a) synEq' :: a -> a -> SynEqM (a,a) synEq' a a' = ifEqual (uncurry synEq) (a, a') instance SynEq Bool where synEq x y | x == y = return (x,y) synEq x y | otherwise = inequal (x,y) -- | Syntactic term equality ignores 'DontCare' stuff. instance SynEq Term where synEq v v' = do (v, v') <- lift $ instantiate' (v, v') case (v, v') of (Var i vs, Var i' vs') | i == i' -> Var i <$$> synEq vs vs' (Con c ci vs,Con c' ci' vs') | c == c' -> Con c (bestConInfo ci ci') <$$> synEq vs vs' (Def f vs, Def f' vs') | f == f' -> Def f <$$> synEq vs vs' (MetaV x vs, MetaV x' vs') | x == x' -> MetaV x <$$> synEq vs vs' (Lit l , Lit l' ) | l == l' -> pure2 $ v (Lam h b , Lam h' b' ) -> Lam <$$> synEq h h' <**> synEq b b' (Level l , Level l' ) -> levelTm <$$> synEq l l' (Sort s , Sort s' ) -> Sort <$$> synEq s s' (Pi a b , Pi a' b' ) -> Pi <$$> synEq a a' <**> synEq' b b' (DontCare _, DontCare _ ) -> pure (v, v') -- Irrelevant things are syntactically equal. ALT: -- DontCare <$$> synEq v v' (Dummy{} , Dummy{} ) -> pure (v, v') _ -> inequal (v, v') instance SynEq Level where synEq (Max vs) (Max vs') = levelMax <$$> synEq vs vs' instance SynEq PlusLevel where synEq l l' = do case (l, l') of (ClosedLevel v, ClosedLevel v') | v == v' -> pure2 l (Plus n v, Plus n' v') | n == n' -> Plus n <$$> synEq v v' _ -> inequal (l, l') instance SynEq LevelAtom where synEq l l' = do l <- lift (unBlock =<< instantiate' l) case (l, l') of (MetaLevel m vs , MetaLevel m' vs' ) | m == m' -> MetaLevel m <$$> synEq vs vs' (UnreducedLevel v, UnreducedLevel v' ) -> UnreducedLevel <$$> synEq v v' -- The reason for being blocked should not matter for equality. (NeutralLevel r v, NeutralLevel r' v') -> NeutralLevel r <$$> synEq v v' (BlockedLevel m v, BlockedLevel m' v') -> BlockedLevel m <$$> synEq v v' _ -> inequal (l, l') where unBlock l = case l of BlockedLevel m v -> ifM (isInstantiatedMeta m) (pure $ UnreducedLevel v) (pure l) _ -> pure l instance SynEq Sort where synEq s s' = do (s, s') <- lift $ instantiate' (s, s') case (s, s') of (Type l , Type l' ) -> Type <$$> synEq l l' (PiSort a b, PiSort a' b') -> piSort <$$> synEq a a' <**> synEq' b b' (UnivSort a, UnivSort a') -> UnivSort <$$> synEq a a' (SizeUniv, SizeUniv ) -> pure2 s (Prop l , Prop l' ) -> Prop <$$> synEq l l' (Inf , Inf ) -> pure2 s (MetaS x es , MetaS x' es') | x == x' -> MetaS x <$$> synEq es es' (DefS d es , DefS d' es') | d == d' -> DefS d <$$> synEq es es' (DummyS{}, DummyS{}) -> pure (s, s') _ -> inequal (s, s') -- | Syntactic equality ignores sorts. instance SynEq Type where synEq (El s t) (El s' t') = (El s *** El s') <$> synEq t t' instance SynEq a => SynEq [a] where synEq as as' | length as == length as' = unzip <$> zipWithM synEq' as as' | otherwise = inequal (as, as') instance SynEq a => SynEq (Elim' a) where synEq e e' = case (e, e') of (Proj _ f, Proj _ f') | f == f' -> pure2 e (Apply a, Apply a') -> Apply <$$> synEq a a' (IApply u v r, IApply u' v' r') -> (IApply u v *** IApply u' v') <$> synEq r r' _ -> inequal (e, e') instance (Subst t a, SynEq a) => SynEq (Abs a) where synEq a a' = case (a, a') of (NoAbs x b, NoAbs x' b') -> (NoAbs x *** NoAbs x') <$> synEq b b' (Abs x b, Abs x' b') -> (Abs x *** Abs x') <$> synEq b b' (Abs x b, NoAbs x' b') -> Abs x <$$> synEq b (raise 1 b') -- TODO: mkAbs? (NoAbs x b, Abs x' b') -> Abs x' <$$> synEq (raise 1 b) b' {- TRIGGERS test/fail/UnequalHiding -- | Ignores 'ArgInfo'. instance SynEq a => SynEq (Arg c a) where synEq (Arg ai a) (Arg ai' a') = (Arg ai *** Arg ai') <$> synEq a a' -- | Ignores 'ArgInfo'. instance SynEq a => SynEq (Dom c a) where synEq (Dom ai a) (Dom ai' a') = (Dom ai *** Dom ai') <$> synEq a a' -} instance SynEq a => SynEq (Arg a) where synEq (Arg ai a) (Arg ai' a') = Arg <$$> synEq ai ai' <**> synEq a a' instance SynEq a => SynEq (Dom a) where synEq d@(Dom ai b x a) d'@(Dom ai' b' x' a') | x == x' = Dom <$$> synEq ai ai' <**> synEq b b' <**> pure2 x <**> synEq a a' | otherwise = inequal (d, d') instance SynEq ArgInfo where synEq ai@(ArgInfo h r o _) ai'@(ArgInfo h' r' o' _) | h == h', r == r' = pure2 ai | otherwise = inequal (ai, ai') Agda-2.6.0.1/src/full/Agda/TypeChecking/Reduce.hs0000644000000000000000000016340313466402171017420 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE UndecidableInstances #-} module Agda.TypeChecking.Reduce where import Prelude hiding (mapM) import Control.Monad.Reader hiding (mapM) import qualified Data.List as List import Data.List ((\\)) import Data.Maybe import Data.Map (Map) import Data.Monoid import Data.Traversable import Data.Hashable import Agda.Interaction.Options import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Scope.Base (Scope) import Agda.Syntax.Literal import Agda.TypeChecking.Monad hiding ( underAbstraction_, enterClosure, isInstantiatedMeta , getConstInfo , lookupMeta ) import qualified Agda.TypeChecking.Monad as TCM import Agda.TypeChecking.Monad.Builtin hiding (getPrimitive, constructorForm) import Agda.TypeChecking.Substitute import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Reduce.Monad import {-# SOURCE #-} Agda.TypeChecking.CompiledClause.Match import {-# SOURCE #-} Agda.TypeChecking.Patterns.Match import {-# SOURCE #-} Agda.TypeChecking.Pretty import {-# SOURCE #-} Agda.TypeChecking.Rewriting import {-# SOURCE #-} Agda.TypeChecking.Reduce.Fast import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.HashMap (HashMap) import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible instantiate :: (Instantiate a, MonadReduce m) => a -> m a instantiate = liftReduce . instantiate' instantiateFull :: (InstantiateFull a, MonadReduce m) => a -> m a instantiateFull = liftReduce . instantiateFull' reduce :: (Reduce a, MonadReduce m) => a -> m a reduce = liftReduce . reduce' reduceB :: (Reduce a, MonadReduce m) => a -> m (Blocked a) reduceB = liftReduce . reduceB' normalise :: (Normalise a, MonadReduce m) => a -> m a normalise = liftReduce . normalise' -- | Normalise the given term but also preserve blocking tags -- TODO: implement a more efficient version of this. normaliseB :: (MonadReduce m, Reduce t, Normalise t) => t -> m (Blocked t) normaliseB = normalise >=> reduceB simplify :: (Simplify a, MonadReduce m) => a -> m a simplify = liftReduce . simplify' -- | Meaning no metas left in the instantiation. isFullyInstantiatedMeta :: MetaId -> TCM Bool isFullyInstantiatedMeta m = do mv <- TCM.lookupMeta m case mvInstantiation mv of InstV _tel v -> noMetas <$> instantiateFull v _ -> return False -- | Instantiate something. -- Results in an open meta variable or a non meta. -- Doesn't do any reduction, and preserves blocking tags (when blocking meta -- is uninstantiated). class Instantiate t where instantiate' :: t -> ReduceM t instance Instantiate Term where instantiate' t@(MetaV x es) = do mi <- mvInstantiation <$> lookupMeta x case mi of InstV tel v -> instantiate' inst where -- A slight complication here is that the meta might be underapplied, -- in which case we have to build the lambda abstraction before -- applying the substitution, or overapplied in which case we need to -- fall back to applyE. (es1, es2) = splitAt (length tel) es vs1 = reverse $ map unArg $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es1 rho = vs1 ++# wkS (length vs1) idS -- really should be .. ++# emptyS but using wkS makes it reduce to idS -- when applicable -- specification: inst == foldr mkLam v tel `applyE` es inst = applySubst rho (foldr mkLam v $ drop (length es1) tel) `applyE` es2 Open -> return t OpenInstance -> return t BlockedConst _ -> return t PostponedTypeCheckingProblem _ _ -> return t instantiate' (Level l) = levelTm <$> instantiate' l instantiate' (Sort s) = Sort <$> instantiate' s instantiate' t = return t instance Instantiate Level where instantiate' (Max as) = levelMax <$> instantiate' as instance Instantiate PlusLevel where instantiate' l@ClosedLevel{} = return l instantiate' (Plus n a) = Plus n <$> instantiate' a instance Instantiate LevelAtom where instantiate' l = case l of MetaLevel m vs -> do v <- instantiate' (MetaV m vs) case v of MetaV m vs -> return $ MetaLevel m vs _ -> return $ UnreducedLevel v UnreducedLevel l -> UnreducedLevel <$> instantiate' l _ -> return l instance Instantiate a => Instantiate (Blocked a) where instantiate' v@NotBlocked{} = return v instantiate' v@(Blocked x u) = do mi <- mvInstantiation <$> lookupMeta x case mi of InstV{} -> notBlocked <$> instantiate' u Open -> return v OpenInstance -> return v BlockedConst{} -> return v PostponedTypeCheckingProblem{} -> return v instance Instantiate Type where instantiate' (El s t) = El <$> instantiate' s <*> instantiate' t instance Instantiate Sort where instantiate' s = case s of MetaS x es -> instantiate' (MetaV x es) >>= \case Sort s' -> return s' MetaV x' es' -> return $ MetaS x' es' Def d es' -> return $ DefS d es' _ -> __IMPOSSIBLE__ _ -> return s instance Instantiate Elim where instantiate' (Apply v) = Apply <$> instantiate' v instantiate' (Proj o f)= pure $ Proj o f instantiate' (IApply x y v) = IApply <$> instantiate' x <*> instantiate' y <*> instantiate' v instance Instantiate t => Instantiate (Abs t) where instantiate' = traverse instantiate' instance Instantiate t => Instantiate (Arg t) where instantiate' = traverse instantiate' instance Instantiate t => Instantiate (Dom t) where instantiate' = traverse instantiate' instance Instantiate t => Instantiate (Maybe t) where instantiate' = traverse instantiate' instance Instantiate t => Instantiate [t] where instantiate' = traverse instantiate' instance (Instantiate a, Instantiate b) => Instantiate (a,b) where instantiate' (x,y) = (,) <$> instantiate' x <*> instantiate' y instance (Instantiate a, Instantiate b,Instantiate c) => Instantiate (a,b,c) where instantiate' (x,y,z) = (,,) <$> instantiate' x <*> instantiate' y <*> instantiate' z instance Instantiate a => Instantiate (Closure a) where instantiate' cl = do x <- enterClosure cl instantiate' return $ cl { clValue = x } instance Instantiate Telescope where instantiate' EmptyTel = return EmptyTel instantiate' (ExtendTel a tel) = ExtendTel <$> instantiate' a <*> instantiate' tel --instantiate' tel = return tel instance Instantiate Constraint where instantiate' (ValueCmp cmp t u v) = do (t,u,v) <- instantiate' (t,u,v) return $ ValueCmp cmp t u v instantiate' (ValueCmpOnFace cmp p t u v) = do ((p,t),u,v) <- instantiate' ((p,t),u,v) return $ ValueCmpOnFace cmp p t u v instantiate' (ElimCmp cmp fs t v as bs) = ElimCmp cmp fs <$> instantiate' t <*> instantiate' v <*> instantiate' as <*> instantiate' bs instantiate' (LevelCmp cmp u v) = uncurry (LevelCmp cmp) <$> instantiate' (u,v) instantiate' (TypeCmp cmp a b) = uncurry (TypeCmp cmp) <$> instantiate' (a,b) instantiate' (TelCmp a b cmp tela telb) = uncurry (TelCmp a b cmp) <$> instantiate' (tela,telb) instantiate' (SortCmp cmp a b) = uncurry (SortCmp cmp) <$> instantiate' (a,b) instantiate' (Guarded c pid) = Guarded <$> instantiate' c <*> pure pid instantiate' (UnBlock m) = return $ UnBlock m instantiate' (FindInstance m b args) = FindInstance m b <$> mapM instantiate' args instantiate' (IsEmpty r t) = IsEmpty r <$> instantiate' t instantiate' (CheckSizeLtSat t) = CheckSizeLtSat <$> instantiate' t instantiate' c@CheckFunDef{} = return c instantiate' (HasBiggerSort a) = HasBiggerSort <$> instantiate' a instantiate' (HasPTSRule a b) = uncurry HasPTSRule <$> instantiate' (a,b) instantiate' (UnquoteTactic m t h g) = UnquoteTactic m <$> instantiate' t <*> instantiate' h <*> instantiate' g instance Instantiate e => Instantiate (Map k e) where instantiate' = traverse instantiate' instance Instantiate Candidate where instantiate' (Candidate u t ov) = Candidate <$> instantiate' u <*> instantiate' t <*> pure ov instance Instantiate EqualityView where instantiate' (OtherType t) = OtherType <$> instantiate' t instantiate' (EqualityType s eq l t a b) = EqualityType <$> instantiate' s <*> return eq <*> mapM instantiate' l <*> instantiate' t <*> instantiate' a <*> instantiate' b --------------------------------------------------------------------------- -- * Reduction to weak head normal form. --------------------------------------------------------------------------- -- | Case on whether a term is blocked on a meta (or is a meta). -- That means it can change its shape when the meta is instantiated. ifBlocked :: (MonadReduce m) => Term -> (MetaId -> Term -> m a) -> (NotBlocked -> Term -> m a) -> m a ifBlocked t blocked unblocked = do t <- reduceB t case t of Blocked m _ -> blocked m (ignoreBlocking t) NotBlocked _ (MetaV m _) -> blocked m (ignoreBlocking t) NotBlocked nb _ -> unblocked nb (ignoreBlocking t) isBlocked :: MonadReduce m => Term -> m (Maybe MetaId) isBlocked t = ifBlocked t (\m _ -> return $ Just m) (\_ _ -> return Nothing) -- | Case on whether a type is blocked on a meta (or is a meta). ifBlockedType :: MonadReduce m => Type -> (MetaId -> Type -> m a) -> (NotBlocked -> Type -> m a) -> m a ifBlockedType (El s t) blocked unblocked = ifBlocked t (\ m v -> blocked m $ El s v) (\ nb v -> unblocked nb $ El s v) isBlockedType :: MonadReduce m => Type -> m (Maybe MetaId) isBlockedType t = ifBlockedType t (\m _ -> return $ Just m) (\_ _ -> return Nothing) class Reduce t where reduce' :: t -> ReduceM t reduceB' :: t -> ReduceM (Blocked t) reduce' t = ignoreBlocking <$> reduceB' t reduceB' t = notBlocked <$> reduce' t instance Reduce Type where reduce' (El s t) = El s <$> reduce' t reduceB' (El s t) = fmap (El s) <$> reduceB' t instance Reduce Sort where reduce' s = do s <- instantiate' s case s of PiSort s1 s2 -> do (s1,s2) <- reduce' (s1,s2) maybe (return $ PiSort s1 s2) reduce' $ piSort' s1 s2 UnivSort s' -> do s' <- reduce' s' ui <- univInf caseMaybe (univSort' ui s') (return $ UnivSort s') reduce' Prop s' -> Prop <$> reduce' s' Type s' -> Type <$> reduce' s' Inf -> return Inf SizeUniv -> return SizeUniv MetaS x es -> return s DefS d es -> return s -- postulated sorts do not reduce DummyS{} -> return s instance Reduce Elim where reduce' (Apply v) = Apply <$> reduce' v reduce' (Proj o f)= pure $ Proj o f reduce' (IApply x y v) = IApply <$> reduce' x <*> reduce' y <*> reduce' v instance Reduce Level where reduce' (Max as) = levelMax <$> mapM reduce' as reduceB' (Max as) = fmap levelMax . traverse id <$> traverse reduceB' as instance Reduce PlusLevel where reduceB' l@ClosedLevel{} = return $ notBlocked l reduceB' (Plus n l) = fmap (Plus n) <$> reduceB' l instance Reduce LevelAtom where reduceB' l = case l of MetaLevel m vs -> fromTm (MetaV m vs) NeutralLevel r v -> return $ NotBlocked r $ NeutralLevel r v BlockedLevel m v -> ifM (isInstantiatedMeta m) (fromTm v) (return $ Blocked m $ BlockedLevel m v) UnreducedLevel v -> fromTm v where fromTm v = do bv <- reduceB' v let v = ignoreBlocking bv case bv of NotBlocked r (MetaV m vs) -> return $ NotBlocked r $ MetaLevel m vs Blocked m _ -> return $ Blocked m $ BlockedLevel m v NotBlocked r _ -> return $ NotBlocked r $ NeutralLevel r v instance (Subst t a, Reduce a) => Reduce (Abs a) where reduce' b@(Abs x _) = Abs x <$> underAbstraction_ b reduce' reduce' (NoAbs x v) = NoAbs x <$> reduce' v -- Lists are never blocked instance Reduce t => Reduce [t] where reduce' = traverse reduce' instance Reduce t => Reduce (Arg t) where reduce' a = case getRelevance a of Irrelevant -> return a -- Don't reduce' irr. args!? -- Andreas, 2018-03-03, caused #2989. _ -> traverse reduce' a reduceB' t = traverse id <$> traverse reduceB' t instance Reduce t => Reduce (Dom t) where reduce' = traverse reduce' reduceB' t = traverse id <$> traverse reduceB' t instance (Reduce a, Reduce b) => Reduce (a,b) where reduce' (x,y) = (,) <$> reduce' x <*> reduce' y reduceB' (x,y) = do x <- reduceB' x y <- reduceB' y let blk = void x `mappend` void y xy = (ignoreBlocking x , ignoreBlocking y) return $ blk $> xy instance (Reduce a, Reduce b,Reduce c) => Reduce (a,b,c) where reduce' (x,y,z) = (,,) <$> reduce' x <*> reduce' y <*> reduce' z reduceB' (x,y,z) = do x <- reduceB' x y <- reduceB' y z <- reduceB' z let blk = void x `mappend` void y `mappend` void z xyz = (ignoreBlocking x , ignoreBlocking y , ignoreBlocking z) return $ blk $> xyz reduceIApply :: ReduceM (Blocked Term) -> [Elim] -> ReduceM (Blocked Term) reduceIApply = reduceIApply' reduceB' blockedOrMeta :: Blocked Term -> Blocked () blockedOrMeta r = case r of Blocked m _ -> Blocked m () NotBlocked _ (MetaV m _) -> Blocked m () NotBlocked i _ -> NotBlocked i () reduceIApply' :: (Term -> ReduceM (Blocked Term)) -> ReduceM (Blocked Term) -> [Elim] -> ReduceM (Blocked Term) reduceIApply' reduceB' d (IApply x y r : es) = do view <- intervalView' r <- reduceB' r -- We need to propagate the blocking information so that e.g. -- we postpone "someNeutralPath ?0 = a" rather than fail. let blockedInfo = blockedOrMeta r case view (ignoreBlocking r) of IZero -> reduceB' (applyE x es) IOne -> reduceB' (applyE y es) _ -> fmap (<* blockedInfo) (reduceIApply d es) reduceIApply' reduceB' d (_ : es) = reduceIApply d es reduceIApply' reduceB' d [] = d instance Reduce Term where reduceB' = {-# SCC "reduce'" #-} maybeFastReduceTerm shouldTryFastReduce :: ReduceM Bool shouldTryFastReduce = (optFastReduce <$> pragmaOptions) `and2M` do allowed <- asksTC envAllowedReductions let optionalReductions = [NonTerminatingReductions, UnconfirmedReductions] requiredReductions = allReductions \\ optionalReductions return $ (allowed \\ optionalReductions) == requiredReductions maybeFastReduceTerm :: Term -> ReduceM (Blocked Term) maybeFastReduceTerm v = do let tryFast = case v of Def{} -> True Con{} -> True MetaV{} -> True _ -> False if not tryFast then slowReduceTerm v else case v of MetaV x _ -> ifM (isOpen x) (return $ notBlocked v) (maybeFast v) _ -> maybeFast v where isOpen x = isOpenMeta . mvInstantiation <$> lookupMeta x maybeFast v = ifM shouldTryFastReduce (fastReduce v) (slowReduceTerm v) slowReduceTerm :: Term -> ReduceM (Blocked Term) slowReduceTerm v = do v <- instantiate' v let done = return $ notBlocked v iapp = reduceIApply done case v of -- Andreas, 2012-11-05 not reducing meta args does not destroy anything -- and seems to save 2% sec on the standard library -- MetaV x args -> notBlocked . MetaV x <$> reduce' args MetaV x es -> iapp es Def f es -> flip reduceIApply es $ unfoldDefinitionE False reduceB' (Def f []) f es Con c ci es -> do -- Constructors can reduce' when they come from an -- instantiated module. -- also reduce when they are path constructors v <- flip reduceIApply es $ unfoldDefinitionE False reduceB' (Con c ci []) (conName c) es traverse reduceNat v Sort s -> fmap Sort <$> reduceB' s Level l -> ifM (elem LevelReductions <$> asksTC envAllowedReductions) {- then -} (fmap levelTm <$> reduceB' l) {- else -} done Pi _ _ -> done Lit _ -> done Var _ es -> iapp es Lam _ _ -> done DontCare _ -> done Dummy{} -> done where -- NOTE: reduceNat can traverse the entire term. reduceNat v@(Con c ci []) = do mz <- getBuiltin' builtinZero case v of _ | Just v == mz -> return $ Lit $ LitNat (getRange c) 0 _ -> return v reduceNat v@(Con c ci [Apply a]) | visible a && isRelevant a = do ms <- getBuiltin' builtinSuc case v of _ | Just (Con c ci []) == ms -> inc <$> reduce' (unArg a) _ -> return v where inc w = case w of Lit (LitNat r n) -> Lit (LitNat (fuseRange c r) $ n + 1) _ -> Con c ci [Apply $ defaultArg w] reduceNat v = return v -- Andreas, 2013-03-20 recursive invokations of unfoldCorecursion -- need also to instantiate metas, see Issue 826. unfoldCorecursionE :: Elim -> ReduceM (Blocked Elim) unfoldCorecursionE (Proj o p) = notBlocked . Proj o <$> getOriginalProjection p unfoldCorecursionE (Apply (Arg info v)) = fmap (Apply . Arg info) <$> unfoldCorecursion v unfoldCorecursionE (IApply x y r) = do -- TODO check if this makes sense [x,y,r] <- mapM unfoldCorecursion [x,y,r] return $ IApply <$> x <*> y <*> r unfoldCorecursion :: Term -> ReduceM (Blocked Term) unfoldCorecursion v = do v <- instantiate' v case v of Def f es -> unfoldDefinitionE True unfoldCorecursion (Def f []) f es _ -> slowReduceTerm v -- | If the first argument is 'True', then a single delayed clause may -- be unfolded. unfoldDefinition :: Bool -> (Term -> ReduceM (Blocked Term)) -> Term -> QName -> Args -> ReduceM (Blocked Term) unfoldDefinition unfoldDelayed keepGoing v f args = unfoldDefinitionE unfoldDelayed keepGoing v f (map Apply args) unfoldDefinitionE :: Bool -> (Term -> ReduceM (Blocked Term)) -> Term -> QName -> Elims -> ReduceM (Blocked Term) unfoldDefinitionE unfoldDelayed keepGoing v f es = do r <- unfoldDefinitionStep unfoldDelayed v f es case r of NoReduction v -> return v YesReduction _ v -> keepGoing v unfoldDefinition' :: Bool -> (Simplification -> Term -> ReduceM (Simplification, Blocked Term)) -> Term -> QName -> Elims -> ReduceM (Simplification, Blocked Term) unfoldDefinition' unfoldDelayed keepGoing v0 f es = do r <- unfoldDefinitionStep unfoldDelayed v0 f es case r of NoReduction v -> return (NoSimplification, v) YesReduction simp v -> keepGoing simp v unfoldDefinitionStep :: Bool -> Term -> QName -> Elims -> ReduceM (Reduced (Blocked Term) Term) unfoldDefinitionStep unfoldDelayed v0 f es = {-# SCC "reduceDef" #-} do info <- getConstInfo f rewr <- instantiateRewriteRules =<< getRewriteRulesFor f allowed <- asksTC envAllowedReductions let def = theDef info v = v0 `applyE` es -- Non-terminating functions -- (i.e., those that failed the termination check) -- and delayed definitions -- are not unfolded unless explicitely permitted. dontUnfold = (defNonterminating info && notElem NonTerminatingReductions allowed) || (defTerminationUnconfirmed info && notElem UnconfirmedReductions allowed) || (defDelayed info == Delayed && not unfoldDelayed) copatterns = case def of Function{funCopatternLHS = b} -> b _ -> False case def of Constructor{conSrcCon = c} -> noReduction $ notBlocked $ Con (c `withRangeOf` f) ConOSystem [] `applyE` es Primitive{primAbstr = ConcreteDef, primName = x, primClauses = cls} -> do pf <- fromMaybe __IMPOSSIBLE__ <$> getPrimitive' x if FunctionReductions `elem` allowed then reducePrimitive x v0 f es pf dontUnfold cls (defCompiled info) rewr else noReduction $ notBlocked v _ -> do if (RecursiveReductions `elem` allowed) || (isJust (isProjection_ def) && ProjectionReductions `elem` allowed) || -- includes projection-like (isInlineFun def && InlineReductions `elem` allowed) || (definitelyNonRecursive_ def && copatterns && CopatternReductions `elem` allowed) || (definitelyNonRecursive_ def && FunctionReductions `elem` allowed) then reduceNormalE v0 f (map notReduced es) dontUnfold (defClauses info) (defCompiled info) rewr else noReduction $ notBlocked v -- Andrea(s), 2014-12-05 OK? where noReduction = return . NoReduction yesReduction s = return . YesReduction s reducePrimitive x v0 f es pf dontUnfold cls mcc rewr | length es < ar = noReduction $ NotBlocked Underapplied $ v0 `applyE` es -- not fully applied | otherwise = {-# SCC "reducePrimitive" #-} do let (es1,es2) = splitAt ar es args1 = fromMaybe __IMPOSSIBLE__ $ mapM isApplyElim es1 r <- primFunImplementation pf args1 (length es2) case r of NoReduction args1' -> do let es1' = map (fmap Apply) args1' if null cls && null rewr then do noReduction $ applyE (Def f []) <$> do traverse id $ map mredToBlocked es1' ++ map notBlocked es2 else reduceNormalE v0 f (es1' ++ map notReduced es2) dontUnfold cls mcc rewr YesReduction simpl v -> yesReduction simpl $ v `applyE` es2 where ar = primFunArity pf mredToBlocked :: MaybeReduced a -> Blocked a mredToBlocked (MaybeRed NotReduced x) = notBlocked x mredToBlocked (MaybeRed (Reduced b) x) = x <$ b reduceNormalE :: Term -> QName -> [MaybeReduced Elim] -> Bool -> [Clause] -> Maybe CompiledClauses -> RewriteRules -> ReduceM (Reduced (Blocked Term) Term) reduceNormalE v0 f es dontUnfold def mcc rewr = {-# SCC "reduceNormal" #-} do case (def,rewr) of _ | dontUnfold -> defaultResult -- non-terminating or delayed ([],[]) -> defaultResult -- no definition for head (cls,rewr) -> do ev <- appDefE_ f v0 cls mcc rewr es debugReduce ev return ev where defaultResult = noReduction $ NotBlocked ReallyNotBlocked vfull vfull = v0 `applyE` map ignoreReduced es debugReduce ev = verboseS "tc.reduce" 90 $ do case ev of NoReduction v -> do reportSDoc "tc.reduce" 90 $ vcat [ "*** tried to reduce " <+> prettyTCM f , " es = " <+> sep (map (prettyTCM . ignoreReduced) es) -- , "*** tried to reduce " <+> prettyTCM vfull , " stuck on" <+> prettyTCM (ignoreBlocking v) ] YesReduction _simpl v -> do reportSDoc "tc.reduce" 90 $ "*** reduced definition: " <+> prettyTCM f reportSDoc "tc.reduce" 95 $ " result" <+> prettyTCM v reportSDoc "tc.reduce" 100 $ " raw " <+> text (show v) -- | Reduce a non-primitive definition if it is a copy linking to another def. reduceDefCopy :: QName -> Elims -> TCM (Reduced () Term) reduceDefCopy f es = do info <- TCM.getConstInfo f rewr <- instantiateRewriteRules =<< TCM.getRewriteRulesFor f if (defCopy info) then reduceDef_ info rewr f es else return $ NoReduction () where reduceDef_ :: Definition -> RewriteRules -> QName -> Elims -> TCM (Reduced () Term) reduceDef_ info rewr f es = do let v0 = Def f [] cls = (defClauses info) mcc = (defCompiled info) if (defDelayed info == Delayed) || (defNonterminating info) then return $ NoReduction () else do ev <- runReduceM $ appDefE_ f v0 cls mcc rewr $ map notReduced es case ev of YesReduction simpl t -> return $ YesReduction simpl t NoReduction{} -> return $ NoReduction () -- | Reduce simple (single clause) definitions. reduceHead :: (HasBuiltins m, HasConstInfo m, MonadReduce m, MonadDebug m) => Term -> m (Blocked Term) reduceHead v = do -- ignoreAbstractMode $ do -- Andreas, 2013-02-18 ignoreAbstractMode leads to information leakage -- see Issue 796 -- first, possibly rewrite literal v to constructor form v <- constructorForm v traceSDoc "tc.inj.reduce" 30 ("reduceHead" <+> prettyTCM v) $ do case v of Def f es -> do abstractMode <- envAbstractMode <$> askTC isAbstract <- treatAbstractly f traceSLn "tc.inj.reduce" 50 ( "reduceHead: we are in " ++ show abstractMode++ "; " ++ show f ++ " is treated " ++ if isAbstract then "abstractly" else "concretely" ) $ do let v0 = Def f [] red = liftReduce $ unfoldDefinitionE False reduceHead v0 f es def <- theDef <$> getConstInfo f case def of -- Andreas, 2012-11-06 unfold aliases (single clause terminating functions) -- see test/succeed/Issue747 -- We restrict this to terminating functions to not make the -- type checker loop here on non-terminating functions. -- see test/fail/TerminationInfiniteRecord Function{ funClauses = [ _ ], funDelayed = NotDelayed, funTerminates = Just True } -> do traceSLn "tc.inj.reduce" 50 ("reduceHead: head " ++ show f ++ " is Function") $ do red Datatype{ dataClause = Just _ } -> red Record{ recClause = Just _ } -> red _ -> return $ notBlocked v _ -> return $ notBlocked v -- | Unfold a single inlined function. unfoldInlined :: (HasConstInfo m, MonadReduce m) => Term -> m Term unfoldInlined v = do inTypes <- viewTC eWorkingOnTypes case v of _ | inTypes -> return v -- Don't inline in types (to avoid unfolding of goals) Def f es -> do def <- theDef <$> getConstInfo f case def of -- Only for simple definitions with no pattern matching (TODO: maybe copatterns?) Function{ funCompiled = Just Done{}, funDelayed = NotDelayed } | def ^. funInline -> liftReduce $ ignoreBlocking <$> unfoldDefinitionE False (return . notBlocked) (Def f []) f es _ -> return v _ -> return v -- | Apply a definition using the compiled clauses, or fall back to -- ordinary clauses if no compiled clauses exist. appDef_ :: QName -> Term -> [Clause] -> Maybe CompiledClauses -> RewriteRules -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term) appDef_ f v0 cls mcc rewr args = appDefE_ f v0 cls mcc rewr $ map (fmap Apply) args appDefE_ :: QName -> Term -> [Clause] -> Maybe CompiledClauses -> RewriteRules -> MaybeReducedElims -> ReduceM (Reduced (Blocked Term) Term) appDefE_ f v0 cls mcc rewr args = localTC (\ e -> e { envAppDef = Just f }) $ maybe (appDefE' v0 cls rewr args) (\cc -> appDefE v0 cc rewr args) mcc -- | Apply a defined function to it's arguments, using the compiled clauses. -- The original term is the first argument applied to the third. appDef :: Term -> CompiledClauses -> RewriteRules -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term) appDef v cc rewr args = appDefE v cc rewr $ map (fmap Apply) args appDefE :: Term -> CompiledClauses -> RewriteRules -> MaybeReducedElims -> ReduceM (Reduced (Blocked Term) Term) appDefE v cc rewr es = do r <- matchCompiledE cc es case r of YesReduction simpl t -> return $ YesReduction simpl t NoReduction es' -> rewrite (void es') v rewr (ignoreBlocking es') -- | Apply a defined function to it's arguments, using the original clauses. appDef' :: Term -> [Clause] -> RewriteRules -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term) appDef' v cls rewr args = appDefE' v cls rewr $ map (fmap Apply) args appDefE' :: Term -> [Clause] -> RewriteRules -> MaybeReducedElims -> ReduceM (Reduced (Blocked Term) Term) appDefE' v cls rewr es = goCls cls $ map ignoreReduced es where goCls :: [Clause] -> [Elim] -> ReduceM (Reduced (Blocked Term) Term) goCls cl es = do case cl of -- Andreas, 2013-10-26 In case of an incomplete match, -- we just do not reduce. This allows adding single function -- clauses after they have been type-checked, to type-check -- the remaining clauses (see Issue 907). -- Andrea(s), 2014-12-05: We return 'MissingClauses' here, since this -- is the most conservative reason. [] -> rewrite (NotBlocked MissingClauses ()) v rewr es cl : cls -> do let pats = namedClausePats cl body = clauseBody cl npats = length pats nvars = size $ clauseTel cl -- if clause is underapplied, skip to next clause if length es < npats then goCls cls es else do let (es0, es1) = splitAt npats es (m, es0) <- matchCopatterns pats es0 es <- return $ es0 ++ es1 case m of No -> goCls cls es DontKnow b -> rewrite b v rewr es Yes simpl vs -- vs is the subst. for the variables bound in body | Just w <- body -> do -- clause has body? -- TODO: let matchPatterns also return the reduced forms -- of the original arguments! -- Andreas, 2013-05-19 isn't this done now? let sigma = buildSubstitution __IMPOSSIBLE__ nvars vs return $ YesReduction simpl $ applySubst sigma w `applyE` es1 | otherwise -> rewrite (NotBlocked AbsurdMatch ()) v rewr es instance Reduce a => Reduce (Closure a) where reduce' cl = do x <- enterClosure cl reduce' return $ cl { clValue = x } instance Reduce Telescope where reduce' EmptyTel = return EmptyTel reduce' (ExtendTel a tel) = ExtendTel <$> reduce' a <*> reduce' tel instance Reduce Constraint where reduce' (ValueCmp cmp t u v) = do (t,u,v) <- reduce' (t,u,v) return $ ValueCmp cmp t u v reduce' (ValueCmpOnFace cmp p t u v) = do ((p,t),u,v) <- reduce' ((p,t),u,v) return $ ValueCmpOnFace cmp p t u v reduce' (ElimCmp cmp fs t v as bs) = ElimCmp cmp fs <$> reduce' t <*> reduce' v <*> reduce' as <*> reduce' bs reduce' (LevelCmp cmp u v) = uncurry (LevelCmp cmp) <$> reduce' (u,v) reduce' (TypeCmp cmp a b) = uncurry (TypeCmp cmp) <$> reduce' (a,b) reduce' (TelCmp a b cmp tela telb) = uncurry (TelCmp a b cmp) <$> reduce' (tela,telb) reduce' (SortCmp cmp a b) = uncurry (SortCmp cmp) <$> reduce' (a,b) reduce' (Guarded c pid) = Guarded <$> reduce' c <*> pure pid reduce' (UnBlock m) = return $ UnBlock m reduce' (FindInstance m b cands) = FindInstance m b <$> mapM reduce' cands reduce' (IsEmpty r t) = IsEmpty r <$> reduce' t reduce' (CheckSizeLtSat t) = CheckSizeLtSat <$> reduce' t reduce' c@CheckFunDef{} = return c reduce' (HasBiggerSort a) = HasBiggerSort <$> reduce' a reduce' (HasPTSRule a b) = uncurry HasPTSRule <$> reduce' (a,b) reduce' (UnquoteTactic m t h g) = UnquoteTactic m <$> reduce' t <*> reduce' h <*> reduce' g instance Reduce e => Reduce (Map k e) where reduce' = traverse reduce' instance Reduce Candidate where reduce' (Candidate u t ov) = Candidate <$> reduce' u <*> reduce' t <*> pure ov instance Reduce EqualityView where reduce' (OtherType t) = OtherType <$> reduce' t reduce' (EqualityType s eq l t a b) = EqualityType <$> reduce' s <*> return eq <*> mapM reduce' l <*> reduce' t <*> reduce' a <*> reduce' b --------------------------------------------------------------------------- -- * Simplification --------------------------------------------------------------------------- -- | Only unfold definitions if this leads to simplification -- which means that a constructor/literal pattern is matched. class Simplify t where simplify' :: t -> ReduceM t instance Simplify Term where simplify' v = do v <- instantiate' v case v of Def f vs -> do let keepGoing simp v = return (simp, notBlocked v) (simpl, v) <- unfoldDefinition' False keepGoing (Def f []) f vs traceSDoc "tc.simplify'" 90 ( text ("simplify': unfolding definition returns " ++ show simpl) <+> prettyTCM (ignoreBlocking v)) $ do case simpl of YesSimplification -> simplifyBlocked' v -- Dangerous, but if @simpl@ then @v /= Def f vs@ NoSimplification -> Def f <$> simplify' vs MetaV x vs -> MetaV x <$> simplify' vs Con c ci vs-> Con c ci <$> simplify' vs Sort s -> Sort <$> simplify' s Level l -> levelTm <$> simplify' l Pi a b -> Pi <$> simplify' a <*> simplify' b Lit l -> return v Var i vs -> Var i <$> simplify' vs Lam h v -> Lam h <$> simplify' v DontCare v -> dontCare <$> simplify' v Dummy{} -> return v simplifyBlocked' :: Simplify t => Blocked t -> ReduceM t simplifyBlocked' (Blocked _ t) = return t simplifyBlocked' (NotBlocked _ t) = simplify' t -- Andrea(s), 2014-12-05 OK? instance Simplify Type where simplify' (El s t) = El <$> simplify' s <*> simplify' t instance Simplify Elim where simplify' (Apply v) = Apply <$> simplify' v simplify' (Proj o f)= pure $ Proj o f simplify' (IApply x y v) = IApply <$> simplify' x <*> simplify' y <*> simplify' v instance Simplify Sort where simplify' s = do case s of PiSort s1 s2 -> piSort <$> simplify' s1 <*> simplify' s2 UnivSort s -> do ui <- univInf univSort ui <$> simplify' s Type s -> Type <$> simplify' s Prop s -> Prop <$> simplify' s Inf -> return s SizeUniv -> return s MetaS x es -> MetaS x <$> simplify' es DefS d es -> DefS d <$> simplify' es DummyS{} -> return s instance Simplify Level where simplify' (Max as) = levelMax <$> simplify' as instance Simplify PlusLevel where simplify' l@ClosedLevel{} = return l simplify' (Plus n l) = Plus n <$> simplify' l instance Simplify LevelAtom where simplify' l = do l <- instantiate' l case l of MetaLevel m vs -> MetaLevel m <$> simplify' vs BlockedLevel m v -> BlockedLevel m <$> simplify' v NeutralLevel r v -> NeutralLevel r <$> simplify' v -- ?? UnreducedLevel v -> UnreducedLevel <$> simplify' v -- ?? instance (Subst t a, Simplify a) => Simplify (Abs a) where simplify' a@(Abs x _) = Abs x <$> underAbstraction_ a simplify' simplify' (NoAbs x v) = NoAbs x <$> simplify' v instance Simplify t => Simplify (Arg t) where simplify' = traverse simplify' instance Simplify t => Simplify (Named name t) where simplify' = traverse simplify' instance Simplify t => Simplify (Dom t) where simplify' = traverse simplify' instance Simplify t => Simplify [t] where simplify' = traverse simplify' instance Simplify e => Simplify (Map k e) where simplify' = traverse simplify' instance Simplify a => Simplify (Maybe a) where simplify' = traverse simplify' instance (Simplify a, Simplify b) => Simplify (a,b) where simplify' (x,y) = (,) <$> simplify' x <*> simplify' y instance (Simplify a, Simplify b, Simplify c) => Simplify (a,b,c) where simplify' (x,y,z) = do (x,(y,z)) <- simplify' (x,(y,z)) return (x,y,z) instance Simplify a => Simplify (Closure a) where simplify' cl = do x <- enterClosure cl simplify' return $ cl { clValue = x } instance (Subst t a, Simplify a) => Simplify (Tele a) where simplify' EmptyTel = return EmptyTel simplify' (ExtendTel a b) = uncurry ExtendTel <$> simplify' (a, b) instance Simplify ProblemConstraint where simplify' (PConstr pid c) = PConstr pid <$> simplify' c instance Simplify Constraint where simplify' (ValueCmp cmp t u v) = do (t,u,v) <- simplify' (t,u,v) return $ ValueCmp cmp t u v simplify' (ValueCmpOnFace cmp p t u v) = do ((p,t),u,v) <- simplify' ((p,t),u,v) return $ ValueCmp cmp t u v simplify' (ElimCmp cmp fs t v as bs) = ElimCmp cmp fs <$> simplify' t <*> simplify' v <*> simplify' as <*> simplify' bs simplify' (LevelCmp cmp u v) = uncurry (LevelCmp cmp) <$> simplify' (u,v) simplify' (TypeCmp cmp a b) = uncurry (TypeCmp cmp) <$> simplify' (a,b) simplify' (TelCmp a b cmp tela telb) = uncurry (TelCmp a b cmp) <$> simplify' (tela,telb) simplify' (SortCmp cmp a b) = uncurry (SortCmp cmp) <$> simplify' (a,b) simplify' (Guarded c pid) = Guarded <$> simplify' c <*> pure pid simplify' (UnBlock m) = return $ UnBlock m simplify' (FindInstance m b cands) = FindInstance m b <$> mapM simplify' cands simplify' (IsEmpty r t) = IsEmpty r <$> simplify' t simplify' (CheckSizeLtSat t) = CheckSizeLtSat <$> simplify' t simplify' c@CheckFunDef{} = return c simplify' (HasBiggerSort a) = HasBiggerSort <$> simplify' a simplify' (HasPTSRule a b) = uncurry HasPTSRule <$> simplify' (a,b) simplify' (UnquoteTactic m t h g) = UnquoteTactic m <$> simplify' t <*> simplify' h <*> simplify' g instance Simplify Bool where simplify' = return -- UNUSED -- instance Simplify ConPatternInfo where -- simplify' (ConPatternInfo mr mt) = ConPatternInfo mr <$> simplify' mt -- UNUSED -- instance Simplify Pattern where -- simplify' p = case p of -- VarP _ -> return p -- LitP _ -> return p -- ConP c ci ps -> ConP c <$> simplify' ci <*> simplify' ps -- DotP v -> DotP <$> simplify' v -- ProjP _ -> return p instance Simplify DisplayForm where simplify' (Display n ps v) = Display n <$> simplify' ps <*> return v instance Simplify Candidate where simplify' (Candidate u t ov) = Candidate <$> simplify' u <*> simplify' t <*> pure ov instance Simplify EqualityView where simplify' (OtherType t) = OtherType <$> simplify' t simplify' (EqualityType s eq l t a b) = EqualityType <$> simplify' s <*> return eq <*> mapM simplify' l <*> simplify' t <*> simplify' a <*> simplify' b --------------------------------------------------------------------------- -- * Normalisation --------------------------------------------------------------------------- class Normalise t where normalise' :: t -> ReduceM t instance Normalise Sort where normalise' s = do s <- reduce' s case s of PiSort s1 s2 -> piSort <$> normalise' s1 <*> normalise' s2 UnivSort s -> do ui <- univInf univSort ui <$> normalise' s Prop s -> Prop <$> normalise' s Type s -> Type <$> normalise' s Inf -> return Inf SizeUniv -> return SizeUniv MetaS x es -> return s DefS d es -> return s DummyS{} -> return s instance Normalise Type where normalise' (El s t) = El <$> normalise' s <*> normalise' t instance Normalise Term where normalise' v = ifM shouldTryFastReduce (fastNormalise v) (slowNormaliseArgs =<< reduce' v) slowNormaliseArgs :: Term -> ReduceM Term slowNormaliseArgs v = case v of Var n vs -> Var n <$> normalise' vs Con c ci vs -> Con c ci <$> normalise' vs Def f vs -> Def f <$> normalise' vs MetaV x vs -> MetaV x <$> normalise' vs Lit _ -> return v Level l -> levelTm <$> normalise' l Lam h b -> Lam h <$> normalise' b Sort s -> Sort <$> normalise' s Pi a b -> uncurry Pi <$> normalise' (a, b) DontCare _ -> return v Dummy{} -> return v instance Normalise Elim where normalise' (Apply v) = Apply <$> normalise' v normalise' (Proj o f)= pure $ Proj o f normalise' (IApply x y v) = IApply <$> normalise' x <*> normalise' y <*> normalise' v instance Normalise Level where normalise' (Max as) = levelMax <$> normalise' as instance Normalise PlusLevel where normalise' l@ClosedLevel{} = return l normalise' (Plus n l) = Plus n <$> normalise' l instance Normalise LevelAtom where normalise' l = do l <- reduce' l case l of MetaLevel m vs -> MetaLevel m <$> normalise' vs BlockedLevel m v -> BlockedLevel m <$> normalise' v NeutralLevel r v -> NeutralLevel r <$> normalise' v UnreducedLevel{} -> __IMPOSSIBLE__ -- I hope instance (Subst t a, Normalise a) => Normalise (Abs a) where normalise' a@(Abs x _) = Abs x <$> underAbstraction_ a normalise' normalise' (NoAbs x v) = NoAbs x <$> normalise' v instance Normalise t => Normalise (Arg t) where normalise' a | isIrrelevant a = return a -- Andreas, 2012-04-02: Do not normalize irrelevant terms!? | otherwise = traverse normalise' a instance Normalise t => Normalise (Named name t) where normalise' = traverse normalise' instance Normalise t => Normalise (Dom t) where normalise' = traverse normalise' instance Normalise t => Normalise [t] where normalise' = traverse normalise' instance (Normalise a, Normalise b) => Normalise (a,b) where normalise' (x,y) = (,) <$> normalise' x <*> normalise' y instance (Normalise a, Normalise b, Normalise c) => Normalise (a,b,c) where normalise' (x,y,z) = do (x,(y,z)) <- normalise' (x,(y,z)) return (x,y,z) instance Normalise a => Normalise (Closure a) where normalise' cl = do x <- enterClosure cl normalise' return $ cl { clValue = x } instance (Subst t a, Normalise a) => Normalise (Tele a) where normalise' EmptyTel = return EmptyTel normalise' (ExtendTel a b) = uncurry ExtendTel <$> normalise' (a, b) instance Normalise ProblemConstraint where normalise' (PConstr pid c) = PConstr pid <$> normalise' c instance Normalise Constraint where normalise' (ValueCmp cmp t u v) = do (t,u,v) <- normalise' (t,u,v) return $ ValueCmp cmp t u v normalise' (ValueCmpOnFace cmp p t u v) = do ((p,t),u,v) <- normalise' ((p,t),u,v) return $ ValueCmpOnFace cmp p t u v normalise' (ElimCmp cmp fs t v as bs) = ElimCmp cmp fs <$> normalise' t <*> normalise' v <*> normalise' as <*> normalise' bs normalise' (LevelCmp cmp u v) = uncurry (LevelCmp cmp) <$> normalise' (u,v) normalise' (TypeCmp cmp a b) = uncurry (TypeCmp cmp) <$> normalise' (a,b) normalise' (TelCmp a b cmp tela telb) = uncurry (TelCmp a b cmp) <$> normalise' (tela,telb) normalise' (SortCmp cmp a b) = uncurry (SortCmp cmp) <$> normalise' (a,b) normalise' (Guarded c pid) = Guarded <$> normalise' c <*> pure pid normalise' (UnBlock m) = return $ UnBlock m normalise' (FindInstance m b cands) = FindInstance m b <$> mapM normalise' cands normalise' (IsEmpty r t) = IsEmpty r <$> normalise' t normalise' (CheckSizeLtSat t) = CheckSizeLtSat <$> normalise' t normalise' c@CheckFunDef{} = return c normalise' (HasBiggerSort a) = HasBiggerSort <$> normalise' a normalise' (HasPTSRule a b) = uncurry HasPTSRule <$> normalise' (a,b) normalise' (UnquoteTactic m t h g) = UnquoteTactic m <$> normalise' t <*> normalise' h <*> normalise' g instance Normalise Bool where normalise' = return instance Normalise Int where normalise' = return instance Normalise Char where normalise' = return instance Normalise ConPatternInfo where normalise' i = normalise' (conPType i) <&> \ t -> i { conPType = t } instance Normalise DBPatVar where normalise' = return instance Normalise a => Normalise (Pattern' a) where normalise' p = case p of VarP o x -> VarP o <$> normalise' x LitP _ -> return p ConP c mt ps -> ConP c <$> normalise' mt <*> normalise' ps DefP o q ps -> DefP o q <$> normalise' ps DotP o v -> DotP o <$> normalise' v ProjP{} -> return p IApplyP o t u x -> IApplyP o <$> normalise' t <*> normalise' u <*> normalise' x instance Normalise DisplayForm where normalise' (Display n ps v) = Display n <$> normalise' ps <*> return v instance Normalise e => Normalise (Map k e) where normalise' = traverse normalise' instance Normalise a => Normalise (Maybe a) where normalise' = traverse normalise' instance Normalise Candidate where normalise' (Candidate u t ov) = Candidate <$> normalise' u <*> normalise' t <*> pure ov instance Normalise EqualityView where normalise' (OtherType t) = OtherType <$> normalise' t normalise' (EqualityType s eq l t a b) = EqualityType <$> normalise' s <*> return eq <*> mapM normalise' l <*> normalise' t <*> normalise' a <*> normalise' b --------------------------------------------------------------------------- -- * Full instantiation --------------------------------------------------------------------------- -- | @instantiateFull'@ 'instantiate's metas everywhere (and recursively) -- but does not 'reduce'. class InstantiateFull t where instantiateFull' :: t -> ReduceM t instance InstantiateFull Name where instantiateFull' = return instance InstantiateFull Sort where instantiateFull' s = do s <- instantiate' s case s of Type n -> Type <$> instantiateFull' n Prop n -> Prop <$> instantiateFull' n PiSort s1 s2 -> piSort <$> instantiateFull' s1 <*> instantiateFull' s2 UnivSort s -> do ui <- univInf univSort ui <$> instantiateFull' s Inf -> return s SizeUniv -> return s MetaS x es -> MetaS x <$> instantiateFull' es DefS d es -> DefS d <$> instantiateFull' es DummyS{} -> return s instance (InstantiateFull a) => InstantiateFull (Type' a) where instantiateFull' (El s t) = El <$> instantiateFull' s <*> instantiateFull' t instance InstantiateFull Term where instantiateFull' v = etaOnce =<< do -- Andreas, 2010-11-12 DONT ETA!? eta-reduction breaks subject reduction -- but removing etaOnce now breaks everything v <- instantiate' v case v of Var n vs -> Var n <$> instantiateFull' vs Con c ci vs -> Con c ci <$> instantiateFull' vs Def f vs -> Def f <$> instantiateFull' vs MetaV x vs -> MetaV x <$> instantiateFull' vs Lit _ -> return v Level l -> levelTm <$> instantiateFull' l Lam h b -> Lam h <$> instantiateFull' b Sort s -> Sort <$> instantiateFull' s Pi a b -> uncurry Pi <$> instantiateFull' (a,b) DontCare v -> dontCare <$> instantiateFull' v Dummy{} -> return v instance InstantiateFull Level where instantiateFull' (Max as) = levelMax <$> instantiateFull' as instance InstantiateFull PlusLevel where instantiateFull' l@ClosedLevel{} = return l instantiateFull' (Plus n l) = Plus n <$> instantiateFull' l instance InstantiateFull LevelAtom where instantiateFull' l = case l of MetaLevel m vs -> do v <- instantiateFull' (MetaV m vs) case v of MetaV m vs -> return $ MetaLevel m vs _ -> return $ UnreducedLevel v NeutralLevel r v -> NeutralLevel r <$> instantiateFull' v BlockedLevel m v -> ifM (isInstantiatedMeta m) (UnreducedLevel <$> instantiateFull' v) (BlockedLevel m <$> instantiateFull' v) UnreducedLevel v -> UnreducedLevel <$> instantiateFull' v instance InstantiateFull Substitution where instantiateFull' sigma = case sigma of IdS -> return IdS EmptyS err -> return $ EmptyS err Wk n sigma -> Wk n <$> instantiateFull' sigma Lift n sigma -> Lift n <$> instantiateFull' sigma Strengthen bot sigma -> Strengthen bot <$> instantiateFull' sigma t :# sigma -> consS <$> instantiateFull' t <*> instantiateFull' sigma instance InstantiateFull Bool where instantiateFull' = return instance InstantiateFull Int where instantiateFull' = return instance InstantiateFull ConPatternInfo where instantiateFull' i = instantiateFull' (conPType i) <&> \ t -> i { conPType = t } instance InstantiateFull DBPatVar where instantiateFull' = return instance InstantiateFull a => InstantiateFull (Pattern' a) where instantiateFull' (VarP o x) = VarP o <$> instantiateFull' x instantiateFull' (DotP o t) = DotP o <$> instantiateFull' t instantiateFull' (ConP n mt ps) = ConP n <$> instantiateFull' mt <*> instantiateFull' ps instantiateFull' (DefP o q ps) = DefP o q <$> instantiateFull' ps instantiateFull' l@LitP{} = return l instantiateFull' p@ProjP{} = return p instantiateFull' (IApplyP o t u x) = IApplyP o <$> instantiateFull' t <*> instantiateFull' u <*> instantiateFull' x instance (Subst t a, InstantiateFull a) => InstantiateFull (Abs a) where instantiateFull' a@(Abs x _) = Abs x <$> underAbstraction_ a instantiateFull' instantiateFull' (NoAbs x a) = NoAbs x <$> instantiateFull' a instance InstantiateFull t => InstantiateFull (Arg t) where instantiateFull' = traverse instantiateFull' instance InstantiateFull t => InstantiateFull (Named name t) where instantiateFull' = traverse instantiateFull' instance InstantiateFull t => InstantiateFull (Dom t) where instantiateFull' = traverse instantiateFull' instance InstantiateFull t => InstantiateFull [t] where instantiateFull' = traverse instantiateFull' instance (InstantiateFull a, InstantiateFull b) => InstantiateFull (a,b) where instantiateFull' (x,y) = (,) <$> instantiateFull' x <*> instantiateFull' y instance (InstantiateFull a, InstantiateFull b, InstantiateFull c) => InstantiateFull (a,b,c) where instantiateFull' (x,y,z) = do (x,(y,z)) <- instantiateFull' (x,(y,z)) return (x,y,z) instance InstantiateFull a => InstantiateFull (Closure a) where instantiateFull' cl = do x <- enterClosure cl instantiateFull' return $ cl { clValue = x } instance InstantiateFull ProblemConstraint where instantiateFull' (PConstr p c) = PConstr p <$> instantiateFull' c instance InstantiateFull Constraint where instantiateFull' c = case c of ValueCmp cmp t u v -> do (t,u,v) <- instantiateFull' (t,u,v) return $ ValueCmp cmp t u v ValueCmpOnFace cmp p t u v -> do ((p,t),u,v) <- instantiateFull' ((p,t),u,v) return $ ValueCmpOnFace cmp p t u v ElimCmp cmp fs t v as bs -> ElimCmp cmp fs <$> instantiateFull' t <*> instantiateFull' v <*> instantiateFull' as <*> instantiateFull' bs LevelCmp cmp u v -> uncurry (LevelCmp cmp) <$> instantiateFull' (u,v) TypeCmp cmp a b -> uncurry (TypeCmp cmp) <$> instantiateFull' (a,b) TelCmp a b cmp tela telb -> uncurry (TelCmp a b cmp) <$> instantiateFull' (tela,telb) SortCmp cmp a b -> uncurry (SortCmp cmp) <$> instantiateFull' (a,b) Guarded c pid -> Guarded <$> instantiateFull' c <*> pure pid UnBlock m -> return $ UnBlock m FindInstance m b cands -> FindInstance m b <$> mapM instantiateFull' cands IsEmpty r t -> IsEmpty r <$> instantiateFull' t CheckSizeLtSat t -> CheckSizeLtSat <$> instantiateFull' t c@CheckFunDef{} -> return c HasBiggerSort a -> HasBiggerSort <$> instantiateFull' a HasPTSRule a b -> uncurry HasPTSRule <$> instantiateFull' (a,b) UnquoteTactic m t g h -> UnquoteTactic m <$> instantiateFull' t <*> instantiateFull' g <*> instantiateFull' h instance (InstantiateFull a) => InstantiateFull (Elim' a) where instantiateFull' (Apply v) = Apply <$> instantiateFull' v instantiateFull' (Proj o f)= pure $ Proj o f instantiateFull' (IApply x y v) = IApply <$> instantiateFull' x <*> instantiateFull' y <*> instantiateFull' v instance InstantiateFull e => InstantiateFull (Map k e) where instantiateFull' = traverse instantiateFull' instance InstantiateFull e => InstantiateFull (HashMap k e) where instantiateFull' = traverse instantiateFull' instance InstantiateFull ModuleName where instantiateFull' = return instance InstantiateFull Scope where instantiateFull' = return instance InstantiateFull Signature where instantiateFull' (Sig a b c) = uncurry3 Sig <$> instantiateFull' (a, b, c) instance InstantiateFull Section where instantiateFull' (Section tel) = Section <$> instantiateFull' tel instance (Subst t a, InstantiateFull a) => InstantiateFull (Tele a) where instantiateFull' EmptyTel = return EmptyTel instantiateFull' (ExtendTel a b) = uncurry ExtendTel <$> instantiateFull' (a, b) instance InstantiateFull Char where instantiateFull' = return instance InstantiateFull Definition where instantiateFull' def@Defn{ defType = t ,defDisplay = df, theDef = d } = do (t, df, d) <- instantiateFull' (t, df, d) return $ def{ defType = t, defDisplay = df, theDef = d } instance InstantiateFull NLPat where instantiateFull' (PVar x y) = return $ PVar x y instantiateFull' (PWild) = return PWild instantiateFull' (PDef x y) = PDef <$> instantiateFull' x <*> instantiateFull' y instantiateFull' (PLam x y) = PLam x <$> instantiateFull' y instantiateFull' (PPi x y) = PPi <$> instantiateFull' x <*> instantiateFull' y instantiateFull' (PBoundVar x y) = PBoundVar x <$> instantiateFull' y instantiateFull' (PTerm x) = PTerm <$> instantiateFull' x instance InstantiateFull NLPType where instantiateFull' (NLPType l a) = NLPType <$> instantiateFull' l <*> instantiateFull' a instance InstantiateFull RewriteRule where instantiateFull' (RewriteRule q gamma f ps rhs t) = RewriteRule q <$> instantiateFull' gamma <*> pure f <*> instantiateFull' ps <*> instantiateFull' rhs <*> instantiateFull' t instance InstantiateFull a => InstantiateFull (Open a) where instantiateFull' (OpenThing n a) = OpenThing n <$> instantiateFull' a instance InstantiateFull DisplayForm where instantiateFull' (Display n ps v) = uncurry (Display n) <$> instantiateFull' (ps, v) instance InstantiateFull DisplayTerm where instantiateFull' (DTerm v) = DTerm <$> instantiateFull' v instantiateFull' (DDot v) = DDot <$> instantiateFull' v instantiateFull' (DCon c ci vs) = DCon c ci <$> instantiateFull' vs instantiateFull' (DDef c es) = DDef c <$> instantiateFull' es instantiateFull' (DWithApp v vs ws) = uncurry3 DWithApp <$> instantiateFull' (v, vs, ws) instance InstantiateFull Defn where instantiateFull' d = case d of Axiom{} -> return d DataOrRecSig{} -> return d GeneralizableVar{} -> return d AbstractDefn d -> AbstractDefn <$> instantiateFull' d Function{ funClauses = cs, funCompiled = cc, funInv = inv, funExtLam = extLam } -> do (cs, cc, inv) <- instantiateFull' (cs, cc, inv) extLam <- instantiateFull' extLam return $ d { funClauses = cs, funCompiled = cc, funInv = inv, funExtLam = extLam } Datatype{ dataSort = s, dataClause = cl } -> do s <- instantiateFull' s cl <- instantiateFull' cl return $ d { dataSort = s, dataClause = cl } Record{ recClause = cl, recTel = tel } -> do cl <- instantiateFull' cl tel <- instantiateFull' tel return $ d { recClause = cl, recTel = tel } Constructor{} -> return d Primitive{ primClauses = cs } -> do cs <- instantiateFull' cs return $ d { primClauses = cs } instance InstantiateFull ExtLamInfo where instantiateFull' e@(ExtLamInfo { extLamSys = sys}) = do sys <- instantiateFull' sys return $ e { extLamSys = sys} instance InstantiateFull System where instantiateFull' (System tel sys) = System <$> instantiateFull' tel <*> instantiateFull' sys instance InstantiateFull FunctionInverse where instantiateFull' NotInjective = return NotInjective instantiateFull' (Inverse inv) = Inverse <$> instantiateFull' inv instance InstantiateFull a => InstantiateFull (WithArity a) where instantiateFull' (WithArity n a) = WithArity n <$> instantiateFull' a instance InstantiateFull a => InstantiateFull (Case a) where instantiateFull' (Branches cop cs eta ls m b lz) = Branches cop <$> instantiateFull' cs <*> instantiateFull' eta <*> instantiateFull' ls <*> instantiateFull' m <*> pure b <*> pure lz instance InstantiateFull CompiledClauses where instantiateFull' Fail = return Fail instantiateFull' (Done m t) = Done m <$> instantiateFull' t instantiateFull' (Case n bs) = Case n <$> instantiateFull' bs instance InstantiateFull Clause where instantiateFull' (Clause rl rf tel ps b t catchall unreachable) = Clause rl rf <$> instantiateFull' tel <*> instantiateFull' ps <*> instantiateFull' b <*> instantiateFull' t <*> return catchall <*> return unreachable instance InstantiateFull Interface where instantiateFull' (Interface h s ft ms mod scope inside sig display userwarn b foreignCode highlighting pragmas usedOpts patsyns warnings) = Interface h s ft ms mod scope inside <$> instantiateFull' sig <*> instantiateFull' display <*> return userwarn <*> instantiateFull' b <*> return foreignCode <*> return highlighting <*> return pragmas <*> return usedOpts <*> return patsyns <*> return warnings instance InstantiateFull a => InstantiateFull (Builtin a) where instantiateFull' (Builtin t) = Builtin <$> instantiateFull' t instantiateFull' (Prim x) = Prim <$> instantiateFull' x instance InstantiateFull QName where instantiateFull' = return instance InstantiateFull ConHead where instantiateFull' = return instance InstantiateFull a => InstantiateFull (Maybe a) where instantiateFull' = mapM instantiateFull' instance InstantiateFull Candidate where instantiateFull' (Candidate u t ov) = Candidate <$> instantiateFull' u <*> instantiateFull' t <*> pure ov instance InstantiateFull EqualityView where instantiateFull' (OtherType t) = OtherType <$> instantiateFull' t instantiateFull' (EqualityType s eq l t a b) = EqualityType <$> instantiateFull' s <*> return eq <*> mapM instantiateFull' l <*> instantiateFull' t <*> instantiateFull' a <*> instantiateFull' b Agda-2.6.0.1/src/full/Agda/TypeChecking/Rewriting.hs0000644000000000000000000004301213466402171020154 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Rewriting with arbitrary rules. -- -- The user specifies a relation symbol by the pragma -- @ -- {-\# BUILTIN REWRITE rel \#-} -- @ -- where @rel@ should be of type @Δ → (lhs rhs : A) → Set i@. -- -- Then the user can add rewrite rules by the pragma -- @ -- {-\# REWRITE q \#-} -- @ -- where @q@ should be a closed term of type @Γ → rel us lhs rhs@. -- -- We then intend to add a rewrite rule -- @ -- Γ ⊢ lhs ↦ rhs : B -- @ -- to the signature where @B = A[us/Δ]@. -- -- To this end, we normalize @lhs@, which should be of the form -- @ -- f ts -- @ -- for a @'Def'@-symbol f (postulate, function, data, record, constructor). -- Further, @FV(ts) = dom(Γ)@. -- The rule @q :: Γ ⊢ f ts ↦ rhs : B@ is added to the signature -- to the definition of @f@. -- -- When reducing a term @Ψ ⊢ f vs@ is stuck, we try the rewrites for @f@, -- by trying to unify @vs@ with @ts@. -- This is for now done by substituting fresh metas Xs for the bound -- variables in @ts@ and checking equality with @vs@ -- @ -- Ψ ⊢ (f ts)[Xs/Γ] = f vs : B[Xs/Γ] -- @ -- If successful (no open metas/constraints), we replace @f vs@ by -- @rhs[Xs/Γ]@ and continue reducing. module Agda.TypeChecking.Rewriting where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.Reader (local, asks) import Data.Foldable ( Foldable, foldMap ) import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import qualified Data.List as List import Data.Monoid import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.Env import Agda.TypeChecking.EtaExpand import Agda.TypeChecking.Free import Agda.TypeChecking.Free.Lazy import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Conversion import qualified Agda.TypeChecking.Positivity.Occurrence as Pos import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive ( getBuiltinName ) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Rewriting.NonLinMatch import qualified Agda.TypeChecking.Reduce.Monad as Red import Agda.TypeChecking.Warnings import Agda.Utils.Functor import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.Lens import qualified Agda.Utils.HashMap as HMap #include "undefined.h" import Agda.Utils.Impossible requireOptionRewriting :: TCM () requireOptionRewriting = unlessM (optRewriting <$> pragmaOptions) $ typeError NeedOptionRewriting -- | Check that the name given to the BUILTIN REWRITE is actually -- a relation symbol. -- I.e., its type should be of the form @Δ → (lhs : A) (rhs : B) → Set ℓ@. -- Note: we do not care about hiding/non-hiding of lhs and rhs. verifyBuiltinRewrite :: Term -> Type -> TCM () verifyBuiltinRewrite v t = do requireOptionRewriting let failure reason = typeError . GenericDocError =<< sep [ prettyTCM v <+> " does not have the right type for a rewriting relation" , reason ] caseMaybeM (relView t) (failure $ "because it should accept at least two arguments") $ \ (RelView tel delta a b core) -> do unless (visible a && visible b) $ failure $ "because its two final arguments are not both visible." case unEl core of Sort{} -> return () Con{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ Lam{} -> __IMPOSSIBLE__ Pi{} -> __IMPOSSIBLE__ _ -> failure $ "because its type does not end in a sort, but in " <+> do inTopContext $ addContext tel $ prettyTCM core -- | Deconstructing a type into @Δ → t → t' → core@. data RelView = RelView { relViewTel :: Telescope -- ^ The whole telescope @Δ, t, t'@. , relViewDelta :: ListTel -- ^ @Δ@. , relViewType :: Dom Type -- ^ @t@. , relViewType' :: Dom Type -- ^ @t'@. , relViewCore :: Type -- ^ @core@. } -- | Deconstructing a type into @Δ → t → t' → core@. -- Returns @Nothing@ if not enough argument types. relView :: Type -> TCM (Maybe RelView) relView t = do TelV tel core <- telView t let n = size tel (delta, lastTwo) = splitAt (n - 2) $ telToList tel if size lastTwo < 2 then return Nothing else do let [a, b] = fmap snd <$> lastTwo return $ Just $ RelView tel delta a b core -- | Add @q : Γ → rel us lhs rhs@ as rewrite rule -- @ -- Γ ⊢ lhs ↦ rhs : B -- @ -- to the signature where @B = A[us/Δ]@. -- Remember that @rel : Δ → A → A → Set i@, so -- @rel us : (lhs rhs : A[us/Δ]) → Set i@. addRewriteRule :: QName -> TCM () addRewriteRule q = do requireOptionRewriting let failNoBuiltin = typeError $ GenericError $ "Cannot add rewrite rule without prior BUILTIN REWRITE" rel <- fromMaybeM failNoBuiltin $ getBuiltinName builtinRewrite def <- instantiateDef =<< getConstInfo q -- Issue 1651: Check that we are not adding a rewrite rule -- for a type signature whose body has not been type-checked yet. when (isEmptyFunction $ theDef def) $ typeError . GenericDocError =<< hsep [ "Rewrite rule from function " , prettyTCM q , " cannot be added before the function definition" ] -- We know that the type of rel is that of a relation. relV <- relView =<< do defType <$> getConstInfo rel let RelView _tel delta a _a' _core = -- line break for CPP fromMaybe __IMPOSSIBLE__ relV reportSDoc "rewriting" 30 $ do "rewrite relation at type " <+> do inTopContext $ prettyTCM (telFromList delta) <+> " |- " <+> do addContext delta $ prettyTCM a -- Get rewrite rule (type of q). TelV gamma1 core <- telView $ defType def reportSDoc "rewriting" 30 $ vcat [ "attempting to add rewrite rule of type " , prettyTCM gamma1 , " |- " <+> do addContext gamma1 $ prettyTCM core ] let failureWrongTarget = typeError . GenericDocError =<< hsep [ prettyTCM q , " does not target rewrite relation" ] let failureMetas = typeError . GenericDocError =<< hsep [ prettyTCM q , " is not a legal rewrite rule, since it contains unsolved meta variables" ] let failureNotDefOrCon = typeError . GenericDocError =<< hsep [ prettyTCM q , " is not a legal rewrite rule, since the left-hand side is neither a defined symbol nor a constructor" ] let failureFreeVars xs = typeError . GenericDocError =<< hsep [ prettyTCM q , " is not a legal rewrite rule, since the following variables are not bound by the left hand side: " , prettyList_ (map (prettyTCM . var) $ IntSet.toList xs) ] let failureIllegalRule = typeError . GenericDocError =<< hsep [ prettyTCM q , " is not a legal rewrite rule" ] -- Check that type of q targets rel. case unEl core of Def rel' es@(_:_:_) | rel == rel' -> do -- Because of the type of rel (Γ → sort), all es are applications. let vs = map unArg $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- The last two arguments are lhs and rhs. n = size vs (us, [lhs, rhs]) = splitAt (n - 2) vs unless (size delta == size us) __IMPOSSIBLE__ rhs <- instantiateFull rhs b <- instantiateFull $ applySubst (parallelS $ reverse us) a gamma0 <- getContextTelescope gamma1 <- instantiateFull gamma1 let gamma = gamma0 `abstract` gamma1 unless (noMetas (telToList gamma1)) $ do reportSDoc "rewriting" 30 $ "metas in gamma1: " <+> text (show $ allMetasList $ telToList gamma1) failureMetas -- 2017-06-18, Jesper: Unfold inlined definitions on the LHS. -- This is necessary to replace copies created by imports by their -- original definition. lhs <- modifyAllowedReductions (const [InlineReductions]) $ normalise lhs -- Find head symbol f of the lhs, its type and its arguments. (f , hd , t , es) <- case lhs of Def f es -> do t <- defType <$> getConstInfo f return (f , Def f , t , es) Con c ci vs -> do let hd = Con c ci ~(Just ((_ , _ , pars) , t)) <- getFullyAppliedConType c $ unDom b addContext gamma1 $ checkParametersAreGeneral c (size gamma1) pars return (conName c , hd , t , vs) _ -> failureNotDefOrCon ifNotAlreadyAdded f $ do rew <- addContext gamma1 $ do -- Normalize lhs args: we do not want to match redexes. es <- normalise es checkNoLhsReduction f es unless (noMetas (es, rhs, b)) $ do reportSDoc "rewriting" 30 $ "metas in lhs: " <+> text (show $ allMetasList es) reportSDoc "rewriting" 30 $ "metas in rhs: " <+> text (show $ allMetasList rhs) reportSDoc "rewriting" 30 $ "metas in b : " <+> text (show $ allMetasList b) failureMetas ps <- patternFrom Relevant 0 (t , Def f []) es reportSDoc "rewriting" 30 $ "Pattern generated from lhs: " <+> prettyTCM (PDef f ps) -- check that FV(rhs) ⊆ nlPatVars(lhs) let freeVars = usedArgs (defArgOccurrences def) `IntSet.union` allFreeVars (ps,rhs) boundVars = nlPatVars ps reportSDoc "rewriting" 70 $ "variables bound by the pattern: " <+> text (show boundVars) reportSDoc "rewriting" 70 $ "variables free in the rewrite rule: " <+> text (show freeVars) unlessNull (freeVars IntSet.\\ boundVars) failureFreeVars return $ RewriteRule q gamma f ps rhs (unDom b) reportSDoc "rewriting" 10 $ vcat [ "considering rewrite rule " , prettyTCM rew ] reportSDoc "rewriting" 90 $ vcat [ "considering rewrite rule" , text (show rew) ] -- NO LONGER WORKS: -- -- Check whether lhs can be rewritten with itself. -- -- Otherwise, there are unbound variables in either gamma or rhs. -- addContext gamma $ -- unlessM (isJust <$> runReduceM (rewriteWith (Just b) lhs rew)) $ -- failureFreeVars -- Add rewrite rule gamma ⊢ lhs ↦ rhs : b for f. addRewriteRules f [rew] _ -> failureWrongTarget where checkNoLhsReduction :: QName -> Elims -> TCM () checkNoLhsReduction f es = do let v = Def f es v' <- reduce v let fail = do reportSDoc "rewriting" 20 $ "v = " <+> text (show v) reportSDoc "rewriting" 20 $ "v' = " <+> text (show v') typeError . GenericDocError =<< fsep [ prettyTCM q <+> " is not a legal rewrite rule, since the left-hand side " , prettyTCM v <+> " reduces to " <+> prettyTCM v' ] case v' of Def f' es' | f == f' -> do a <- computeElimHeadType f es es' pol <- getPolarity' CmpEq f ok <- dontAssignMetas $ tryConversion $ compareElims pol [] a (Def f []) es es' unless ok fail _ -> fail ifNotAlreadyAdded :: QName -> TCM () -> TCM () ifNotAlreadyAdded f cont = do rews <- getRewriteRulesFor f -- check if q is already an added rewrite rule if any ((q ==) . rewName) rews then genericWarning =<< do "Rewrite rule " <+> prettyTCM q <+> " has already been added" else cont usedArgs :: [Pos.Occurrence] -> IntSet usedArgs occs = IntSet.fromList $ map snd $ usedIxs where allIxs = zip occs $ downFrom $ size occs usedIxs = filter (used . fst) allIxs used Pos.Unused = False used _ = True checkParametersAreGeneral :: ConHead -> Int -> Args -> TCM () checkParametersAreGeneral c k vs = do is <- loop vs unless (fastDistinct is) $ errorNotGeneral where loop [] = return [] loop (v : vs) = case unArg v of Var i [] | i < k -> (i :) <$> loop vs _ -> errorNotGeneral errorNotGeneral = typeError . GenericDocError =<< vcat [ prettyTCM q <+> text " is not a legal rewrite rule, since the constructor parameters are not fully general:" , nest 2 $ text "Constructor: " <+> prettyTCM c , nest 2 $ text "Parameters: " <+> prettyList (map prettyTCM vs) ] -- | Append rewrite rules to a definition. addRewriteRules :: QName -> RewriteRules -> TCM () addRewriteRules f rews = do reportSDoc "rewriting" 10 $ "rewrite rule ok, adding it to the definition of " <+> prettyTCM f let matchables = getMatchables rews reportSDoc "rewriting" 30 $ "matchable symbols: " <+> prettyTCM matchables modifySignature $ addRewriteRulesFor f rews matchables -- | @rewriteWith t f es rew@ where @f : t@ -- tries to rewrite @f es@ with @rew@, returning the reduct if successful. rewriteWith :: Type -> Term -> RewriteRule -> Elims -> ReduceM (Either (Blocked Term) Term) rewriteWith t v rew@(RewriteRule q gamma _ ps rhs b) es = do traceSDoc "rewriting.rewrite" 50 (sep [ "{ attempting to rewrite term " <+> prettyTCM (v `applyE` es) , " having head " <+> prettyTCM v <+> " of type " <+> prettyTCM t , " with rule " <+> prettyTCM rew ]) $ do traceSDoc "rewriting.rewrite" 90 (sep [ "raw: attempting to rewrite term " <+> (text . show) (v `applyE` es) , " having head " <+> (text . show) v <+> " of type " <+> (text . show) t , " with rule " <+> (text . show) rew ]) $ do result <- nonLinMatch gamma (t,v) ps es case result of Left block -> traceSDoc "rewriting.rewrite" 50 "}" $ return $ Left $ block $> v `applyE` es -- TODO: remember reductions Right sub -> do let v' = applySubst sub rhs traceSDoc "rewriting.rewrite" 50 (sep [ "rewrote " <+> prettyTCM (v `applyE` es) , " to " <+> prettyTCM v' <+> "}" ]) $ do return $ Right v' -- | @rewrite b v rules es@ tries to rewrite @v@ applied to @es@ with the -- rewrite rules @rules@. @b@ is the default blocking tag. rewrite :: Blocked_ -> Term -> RewriteRules -> Elims -> ReduceM (Reduced (Blocked Term) Term) rewrite block v rules es = do rewritingAllowed <- optRewriting <$> pragmaOptions if (rewritingAllowed && not (null rules)) then do t <- case v of Def f [] -> defType <$> getConstInfo f Con c _ [] -> typeOfConst $ conName c -- Andreas, 2018-09-08, issue #3211: -- discount module parameters for constructor heads _ -> __IMPOSSIBLE__ loop block t rules =<< instantiateFull' es else return $ NoReduction (block $> v `applyE` es) where loop :: Blocked_ -> Type -> RewriteRules -> Elims -> ReduceM (Reduced (Blocked Term) Term) loop block t [] es = traceSDoc "rewriting.rewrite" 20 (sep [ "failed to rewrite " <+> prettyTCM (v `applyE` es) , "blocking tag" <+> text (show block) ]) $ do return $ NoReduction $ block $> v `applyE` es loop block t (rew:rews) es | let n = rewArity rew, length es >= n = do let (es1, es2) = List.genericSplitAt n es result <- rewriteWith t v rew es1 case result of Left (Blocked m u) -> loop (block `mappend` Blocked m ()) t rews es Left (NotBlocked _ _) -> loop block t rews es Right w -> return $ YesReduction YesSimplification $ w `applyE` es2 | otherwise = loop (block `mappend` NotBlocked Underapplied ()) t rews es ------------------------------------------------------------------------ -- * Auxiliary functions ------------------------------------------------------------------------ class NLPatVars a where nlPatVarsUnder :: Int -> a -> IntSet nlPatVars :: a -> IntSet nlPatVars = nlPatVarsUnder 0 instance (Foldable f, NLPatVars a) => NLPatVars (f a) where nlPatVarsUnder k = foldMap $ nlPatVarsUnder k instance NLPatVars NLPType where nlPatVarsUnder k (NLPType l a) = nlPatVarsUnder k l `IntSet.union` nlPatVarsUnder k a instance NLPatVars NLPat where nlPatVarsUnder k p = case p of PVar i _ -> singleton $ i - k PDef _ es -> nlPatVarsUnder k es PWild -> empty PLam _ p' -> nlPatVarsUnder (k+1) $ unAbs p' PPi a b -> nlPatVarsUnder k a `IntSet.union` nlPatVarsUnder (k+1) (unAbs b) PBoundVar _ es -> nlPatVarsUnder k es PTerm{} -> empty rewArity :: RewriteRule -> Int rewArity = length . rewPats -- | Get all symbols that a rewrite rule matches against class GetMatchables a where getMatchables :: a -> [QName] instance (Foldable f, GetMatchables a) => GetMatchables (f a) where getMatchables = foldMap getMatchables instance GetMatchables NLPat where getMatchables p = case p of PVar _ _ -> empty PWild -> empty PDef f _ -> singleton f PLam _ x -> empty PPi a b -> empty PBoundVar i es -> empty PTerm _ -> empty -- should be safe (I hope) instance GetMatchables RewriteRule where getMatchables = getMatchables . rewPats -- Only computes free variables that are not bound (i.e. those in a PTerm) instance Free NLPat where freeVars' p = case p of PVar _ _ -> mempty PWild -> mempty PDef _ es -> freeVars' es PLam _ u -> freeVars' u PPi a b -> freeVars' (a,b) PBoundVar _ es -> freeVars' es PTerm t -> freeVars' t instance Free NLPType where freeVars' (NLPType l a) = ifM ((IgnoreNot ==) <$> asks feIgnoreSorts) {- then -} (freeVars' (l, a)) {- else -} (freeVars' a) Agda-2.6.0.1/src/full/Agda/TypeChecking/Positivity.hs0000644000000000000000000010015113466402171020363 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- | Check that a datatype is strictly positive. module Agda.TypeChecking.Positivity where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Applicative hiding (empty) import Control.DeepSeq import Control.Monad.Reader import Control.Monad.State (get) import Data.Either import qualified Data.Foldable as Fold import Data.Function import Data.Graph (SCC(..), flattenSCC) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid (mconcat) import Data.Sequence (Seq) import qualified Data.Sequence as DS import Data.Set (Set) import qualified Data.Set as Set import Debug.Trace import Agda.Syntax.Common import qualified Agda.Syntax.Info as Info import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Position (fuseRange, Range, HasRange(..), noRange) import Agda.TypeChecking.Datatypes ( isDataOrRecordType ) import Agda.TypeChecking.Functions import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (primInf, CoinductionKit(..), coinductionKit) import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Warnings import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as Graph import Agda.Utils.Function (applyUnless) import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import qualified Agda.Utils.Permutation as Perm import qualified Agda.Utils.Pretty as P import Agda.Utils.Pretty (Pretty, prettyShow) import Agda.Utils.SemiRing import Agda.Utils.Singleton import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible type Graph n e = Graph.Graph n e -- | Check that the datatypes in the mutual block containing the given -- declarations are strictly positive. -- -- Also add information about positivity and recursivity of records -- to the signature. checkStrictlyPositive :: Info.MutualInfo -> Set QName -> TCM () checkStrictlyPositive mi qset = do -- compute the occurrence graph for qs let qs = Set.toList qset reportSDoc "tc.pos.tick" 100 $ "positivity of" <+> prettyTCM qs g <- buildOccurrenceGraph qset let (gstar, sccs) = Graph.gaussJordanFloydWarshallMcNaughtonYamada $ fmap occ g reportSDoc "tc.pos.tick" 100 $ "constructed graph" reportSLn "tc.pos.graph" 5 $ "Positivity graph: N=" ++ show (size $ Graph.nodes g) ++ " E=" ++ show (length $ Graph.edges g) reportSDoc "tc.pos.graph" 10 $ vcat [ "positivity graph for" <+> (fsep $ map prettyTCM qs) , nest 2 $ prettyTCM g ] reportSLn "tc.pos.graph" 5 $ "Positivity graph (completed): E=" ++ show (length $ Graph.edges gstar) reportSDoc "tc.pos.graph" 50 $ vcat [ "transitive closure of positivity graph for" <+> prettyTCM qs , nest 2 $ prettyTCM gstar ] -- remember argument occurrences for qs in the signature setArgOccs qset qs gstar reportSDoc "tc.pos.tick" 100 $ "set args" -- check positivity for all strongly connected components of the graph for qs reportSDoc "tc.pos.graph.sccs" 10 $ do let (triv, others) = partitionEithers $ for sccs $ \case AcyclicSCC v -> Left v CyclicSCC vs -> Right vs sep [ text $ show (length triv) ++ " trivial sccs" , text $ show (length others) ++ " non-trivial sccs with lengths " ++ show (map length others) ] reportSLn "tc.pos.graph.sccs" 15 $ " sccs = " ++ prettyShow [ scc | CyclicSCC scc <- sccs ] forM_ sccs $ \case -- If the mutuality information has never been set, we set it to [] AcyclicSCC (DefNode q) -> whenM (isNothing <$> getMutual q) $ do reportSLn "tc.pos.mutual" 10 $ "setting " ++ prettyShow q ++ " to non-recursive" -- Andreas, 2017-04-26, issue #2555 -- We should not have @DefNode@s pointing outside our formal mutual block. unless (Set.member q qset) __IMPOSSIBLE__ setMutual q [] AcyclicSCC (ArgNode{}) -> return () CyclicSCC scc -> setMut [ q | DefNode q <- scc ] mapM_ (checkPos g gstar) qs reportSDoc "tc.pos.tick" 100 $ "checked positivity" where checkPos :: Graph Node (Edge OccursWhere) -> Graph Node Occurrence -> QName -> TCM () checkPos g gstar q = inConcreteOrAbstractMode q $ \ _def -> do -- we check positivity only for data or record definitions whenJustM (isDatatype q) $ \ dr -> do reportSDoc "tc.pos.check" 10 $ "Checking positivity of" <+> prettyTCM q let loop :: Maybe Occurrence loop = Graph.lookup (DefNode q) (DefNode q) gstar g' :: Graph Node (Edge (Seq OccursWhere)) g' = fmap (fmap DS.singleton) g -- Note the property -- Internal.Utils.Graph.AdjacencyMap.Unidirectional.prop_productOfEdgesInBoundedWalk, -- which relates productOfEdgesInBoundedWalk to -- gaussJordanFloydWarshallMcNaughtonYamada. reason bound = case productOfEdgesInBoundedWalk occ g' (DefNode q) (DefNode q) bound of Just (Edge _ how) -> how Nothing -> __IMPOSSIBLE__ how :: String -> Occurrence -> TCM Doc how msg bound = fsep $ [prettyTCM q] ++ pwords "is" ++ pwords (msg ++ ", because it occurs") ++ [prettyTCM (reason bound)] -- if we have a negative loop, raise error -- ASR (23 December 2015). We don't raise a strictly positive -- error if the NO_POSITIVITY_CHECK pragma was set on in the -- mutual block. See Issue 1614. when (Info.mutualPositivityCheck mi) $ whenM positivityCheckEnabled $ case loop of Just o | o <= JustPos -> warning $ NotStrictlyPositive q (reason JustPos) _ -> return () -- if we find an unguarded record, mark it as such when (dr == IsRecord) $ case loop of Just o | o <= StrictPos -> do reportSDoc "tc.pos.record" 5 $ how "not guarded" StrictPos unguardedRecord q checkInduction q -- otherwise, if the record is recursive, mark it as well Just o | o <= GuardPos -> do reportSDoc "tc.pos.record" 5 $ how "recursive" GuardPos recursiveRecord q checkInduction q -- If the record is not recursive, switch on eta -- unless it is coinductive or a no-eta-equality record. Nothing -> do reportSDoc "tc.pos.record" 10 $ "record type " <+> prettyTCM q <+> "is not recursive" nonRecursiveRecord q _ -> return () checkInduction :: QName -> TCM () checkInduction q = -- ASR (01 January 2016). We don't raise this error if the -- NO_POSITIVITY_CHECK pragma was set on in the record. See -- Issue 1760. when (Info.mutualPositivityCheck mi) $ whenM positivityCheckEnabled $ do -- Check whether the recursive record has been declared as -- 'Inductive' or 'Coinductive'. Otherwise, error. unlessM (isJust . recInduction . theDef <$> getConstInfo q) $ setCurrentRange (nameBindingSite $ qnameName q) $ typeError . GenericDocError =<< "Recursive record" <+> prettyTCM q <+> "needs to be declared as either inductive or coinductive" occ (Edge o _) = o isDatatype :: QName -> TCM (Maybe DataOrRecord) isDatatype q = do def <- theDef <$> getConstInfo q return $ case def of Datatype{dataClause = Nothing} -> Just IsData Record {recClause = Nothing} -> Just IsRecord _ -> Nothing -- Set the mutually recursive identifiers for a SCC. setMut :: [QName] -> TCM () setMut [] = return () -- nothing to do setMut qs = forM_ qs $ \ q -> do reportSLn "tc.pos.mutual" 10 $ "setting " ++ prettyShow q ++ " to (mutually) recursive" setMutual q qs -- TODO: The previous line produces data of quadratic size -- (which has to be processed upon serialization). Presumably qs is -- usually short, but in some cases (for instance for generated -- code) it may be long. Wouldn't it be better to assign a -- unique identifier to each SCC, and avoid storing lists? -- Set the polarity of the arguments to a couple of definitions setArgOccs :: Set QName -> [QName] -> Graph Node Occurrence -> TCM () setArgOccs qset qs g = do -- Andreas, 2018-05-11, issue #3049: we need to be pessimistic about -- argument polarity beyond the formal arity of the function. -- -- -- Compute a map from each name in q to the maximal argument index -- let maxs = Map.fromListWith max -- [ (q, i) | ArgNode q i <- Set.toList $ Graph.nodes g, q `Set.member` qset ] forM_ qs $ \ q -> inConcreteOrAbstractMode q $ \ def -> when (hasDefinition $ theDef def) $ do reportSDoc "tc.pos.args" 10 $ "checking args of" <+> prettyTCM q n <- getDefArity def -- If there is no outgoing edge @ArgNode q i@, all @n@ arguments are @Unused@. -- Otherwise, we obtain the occurrences from the Graph. let findOcc i = fromMaybe Unused $ Graph.lookup (ArgNode q i) (DefNode q) g args = -- caseMaybe (Map.lookup q maxs) (replicate n Unused) $ \ m -> map findOcc [0 .. n-1] -- [0 .. max m (n - 1)] -- triggers issue #3049 reportSDoc "tc.pos.args" 10 $ sep [ "args of" <+> prettyTCM q <+> "=" , nest 2 $ prettyList $ map prettyTCM args ] -- The list args can take a long time to compute, but contains -- small elements, and is stored in the interface (right?), so -- it is computed deep-strictly. setArgOccurrences q $!! args where -- Andreas, 2018-11-23, issue #3404 -- Only assign argument occurrences to things which have a definition. -- Things without a definition would be judged "constant" in all arguments, -- since no occurrence could possibly be found, naturally. hasDefinition :: Defn -> Bool hasDefinition = \case Axiom{} -> False DataOrRecSig{} -> False GeneralizableVar{} -> False AbstractDefn{} -> False Primitive{} -> False Constructor{} -> False Function{} -> True Datatype{} -> True Record{} -> True getDefArity :: Definition -> TCM Int getDefArity def = do let dropped = case theDef def of defn@Function{} -> projectionArgs defn _ -> 0 -- TODO: instantiateFull followed by arity could perhaps be -- optimised, presumably the instantiation can be performed -- lazily. subtract dropped . arity <$> instantiateFull (defType def) -- Computing occurrences -------------------------------------------------- data Item = AnArg Nat | ADef QName deriving (Eq, Ord, Show) instance HasRange Item where getRange (AnArg _) = noRange getRange (ADef qn) = getRange qn type Occurrences = Map Item [OccursWhere] -- | Used to build 'Occurrences' and occurrence graphs. data OccurrencesBuilder = Concat [OccurrencesBuilder] | OccursAs Where OccurrencesBuilder | OccursHere Item | OnlyVarsUpTo Nat OccurrencesBuilder -- ^ @OnlyVarsUpTo n occs@ discards occurrences of de Bruijn index -- @>= n@. -- | Used to build 'Occurrences' and occurrence graphs. data OccurrencesBuilder' = Concat' [OccurrencesBuilder'] | OccursAs' Where OccurrencesBuilder' | OccursHere' Item emptyOB :: OccurrencesBuilder emptyOB = Concat [] (>+<) :: OccurrencesBuilder -> OccurrencesBuilder -> OccurrencesBuilder occs1 >+< occs2 = Concat [occs1, occs2] -- | Removes 'OnlyVarsUpTo' entries. preprocess :: OccurrencesBuilder -> OccurrencesBuilder' preprocess ob = case pp Nothing ob of Nothing -> Concat' [] Just ob -> ob where pp :: Maybe Nat -- ^ Variables larger than or equal to this number, if any, -- are not retained. -> OccurrencesBuilder -> Maybe OccurrencesBuilder' pp !m = \case Concat obs -> case mapMaybe (pp m) obs of [] -> Nothing obs -> return (Concat' obs) OccursAs w ob -> OccursAs' w <$> pp m ob OnlyVarsUpTo n ob -> pp (Just $! maybe n (min n) m) ob OccursHere i -> do guard keep return (OccursHere' i) where keep = case (m, i) of (Nothing, _) -> True (_, ADef _) -> True (Just m, AnArg i) -> i < m -- | An interpreter for 'OccurrencesBuilder'. -- -- WARNING: There can be lots of sharing between the generated -- 'OccursWhere' entries. Traversing all of these entries could be -- expensive. (See 'computeEdges' for an example.) flatten :: OccurrencesBuilder -> Map Item Integer flatten = Map.fromListWith (+) . flip flatten' [] . preprocess where flatten' :: OccurrencesBuilder' -> [(Item, Integer)] -> [(Item, Integer)] flatten' (Concat' obs) = foldr (\occs f -> flatten' occs . f) id obs flatten' (OccursAs' _ ob) = flatten' ob flatten' (OccursHere' i) = ((i, 1) :) -- | Context for computing occurrences. data OccEnv = OccEnv { vars :: [Maybe Item] -- ^ Items corresponding to the free variables. -- -- Potential invariant: It seems as if the list has the form -- @'genericReplicate' n 'Nothing' ++ 'map' ('Just' . 'AnArg') is@, -- for some @n@ and @is@, where @is@ is decreasing -- (non-strictly). , inf :: Maybe QName -- ^ Name for ∞ builtin. } -- | Monad for computing occurrences. type OccM = Reader OccEnv withExtendedOccEnv :: Maybe Item -> OccM a -> OccM a withExtendedOccEnv i = withExtendedOccEnv' [i] withExtendedOccEnv' :: [Maybe Item] -> OccM a -> OccM a withExtendedOccEnv' is = local $ \ e -> e { vars = is ++ vars e } -- | Running the monad getOccurrences :: (Show a, PrettyTCM a, ComputeOccurrences a) => [Maybe Item] -> a -> TCM OccurrencesBuilder getOccurrences vars a = do reportSDoc "tc.pos.occ" 70 $ "computing occurrences in " <+> text (show a) reportSDoc "tc.pos.occ" 20 $ "computing occurrences in " <+> prettyTCM a kit <- coinductionKit return $ runReader (occurrences a) $ OccEnv vars $ fmap nameOfInf kit class ComputeOccurrences a where occurrences :: a -> OccM OccurrencesBuilder instance ComputeOccurrences Clause where occurrences cl = do let ps = namedClausePats cl items = IntMap.elems $ patItems ps -- sorted from low to high DBI (Concat (mapMaybe matching (zip [0..] ps)) >+<) <$> withExtendedOccEnv' items (occurrences $ clauseBody cl) where matching (i, p) | properlyMatching (namedThing $ unArg p) = Just $ OccursAs Matched $ OccursHere $ AnArg i | otherwise = Nothing -- @patItems ps@ creates a map from the pattern variables of @ps@ -- to the index of the argument they are bound in. patItems ps = mconcat $ zipWith patItem [0..] ps -- @patItem i p@ assigns index @i@ to each pattern variable in @p@ patItem :: Int -> NamedArg DeBruijnPattern -> IntMap (Maybe Item) patItem i p = Fold.foldMap makeEntry ixs where ixs = map dbPatVarIndex $ lefts $ map unArg $ patternVars $ namedThing <$> p makeEntry x = singleton (x, Just $ AnArg i) instance ComputeOccurrences Term where occurrences v = case unSpine v of Var i args -> do vars <- asks vars occs <- occurrences args let mi = indexWithDefault unbound vars i unbound = flip trace __IMPOSSIBLE__ $ "impossible: occurrence of de Bruijn index " ++ show i ++ " in vars " ++ show vars ++ " is unbound" return $ maybe emptyOB OccursHere mi >+< OccursAs VarArg occs Def d args -> do inf <- asks inf let occsAs = if Just d /= inf then OccursAs . DefArg d else \ n -> -- the principal argument of builtin INF (∞) is the second (n==1) -- the first is a level argument (n==0, counting from 0!) if n == 1 then OccursAs UnderInf else OccursAs (DefArg d n) occs <- mapM occurrences args return $ OccursHere (ADef d) >+< Concat (zipWith occsAs [0..] occs) Con _ _ args -> occurrences args MetaV _ args -> OccursAs MetaArg <$> occurrences args Pi a b -> do oa <- occurrences a ob <- occurrences b return $ OccursAs LeftOfArrow oa >+< ob Lam _ b -> occurrences b Level l -> occurrences l Lit{} -> return emptyOB Sort{} -> return emptyOB DontCare _ -> return emptyOB -- Andreas, 2011-09-09: do we need to check for negative occurrences in irrelevant positions? Dummy{} -> return emptyOB instance ComputeOccurrences Level where occurrences (Max as) = occurrences as instance ComputeOccurrences PlusLevel where occurrences ClosedLevel{} = return emptyOB occurrences (Plus _ l) = occurrences l instance ComputeOccurrences LevelAtom where occurrences l = case l of MetaLevel x es -> occurrences $ MetaV x es -- Andreas, 2016-07-25, issue 2108 -- NOT: OccursAs MetaArg <$> occurrences vs -- since we need to unSpine! -- (Otherwise, we run into __IMPOSSIBLE__ at Proj elims) BlockedLevel _ v -> occurrences v NeutralLevel _ v -> occurrences v UnreducedLevel v -> occurrences v instance ComputeOccurrences Type where occurrences (El _ v) = occurrences v instance ComputeOccurrences a => ComputeOccurrences (Tele a) where occurrences EmptyTel = return emptyOB occurrences (ExtendTel a b) = occurrences (a, b) instance ComputeOccurrences a => ComputeOccurrences (Abs a) where occurrences (Abs _ b) = withExtendedOccEnv Nothing $ occurrences b occurrences (NoAbs _ b) = occurrences b instance ComputeOccurrences a => ComputeOccurrences (Elim' a) where occurrences Proj{} = __IMPOSSIBLE__ occurrences (Apply a) = occurrences a occurrences (IApply x y a) = occurrences (x,(y,a)) -- TODO Andrea: conservative instance ComputeOccurrences a => ComputeOccurrences (Arg a) where occurrences = occurrences . unArg instance ComputeOccurrences a => ComputeOccurrences (Dom a) where occurrences = occurrences . unDom instance ComputeOccurrences a => ComputeOccurrences [a] where occurrences vs = Concat <$> mapM occurrences vs instance ComputeOccurrences a => ComputeOccurrences (Maybe a) where occurrences (Just v) = occurrences v occurrences Nothing = return emptyOB instance (ComputeOccurrences a, ComputeOccurrences b) => ComputeOccurrences (a, b) where occurrences (x, y) = do ox <- occurrences x oy <- occurrences y return $ ox >+< oy -- | Computes the number of occurrences of different 'Item's in the -- given definition. -- -- WARNING: There can be lots of sharing between the 'OccursWhere' -- entries. Traversing all of these entries could be expensive. (See -- 'computeEdges' for an example.) computeOccurrences :: QName -> TCM (Map Item Integer) computeOccurrences q = flatten <$> computeOccurrences' q -- | Computes the occurrences in the given definition. computeOccurrences' :: QName -> TCM OccurrencesBuilder computeOccurrences' q = inConcreteOrAbstractMode q $ \ def -> do reportSDoc "tc.pos" 25 $ do let a = defAbstract def m <- asksTC envAbstractMode cur <- asksTC envCurrentModule "computeOccurrences" <+> prettyTCM q <+> text (show a) <+> text (show m) <+> prettyTCM cur OccursAs (InDefOf q) <$> case theDef def of Function{funClauses = cs} -> do cs <- mapM etaExpandClause =<< instantiateFull cs Concat . zipWith (OccursAs . InClause) [0..] <$> mapM (getOccurrences []) cs Datatype{dataClause = Just c} -> getOccurrences [] =<< instantiateFull c Datatype{dataPars = np0, dataCons = cs} -> do -- Andreas, 2013-02-27 (later edited by someone else): First, -- include each index of an inductive family. TelV tel t <- telView $ defType def -- Andreas, 2017-04-26, issue #2554: count first index as parameter if it has type Size. -- We compute sizeIndex=1 if first first index has type Size, otherwise sizeIndex==0 sizeIndex <- caseMaybe (headMaybe $ drop np0 $ telToList tel) (return 0) $ \ dom -> do caseMaybeM (isSizeType dom) (return 0) $ \ _ -> return 1 let np = np0 + sizeIndex let xs = [np .. size tel - 1] -- argument positions corresponding to indices ioccs = Concat $ map (OccursHere . AnArg) [np0 .. np - 1] ++ map (OccursAs IsIndex . OccursHere . AnArg) xs -- Then, we compute the occurrences in the constructor types. let conOcc c = do a <- defType <$> getConstInfo c TelV tel t <- telView'Path =<< normalise a -- normalization needed e.g. for test/succeed/Bush.agda let indices = case unEl t of Def _ vs -> drop np vs _ -> __IMPOSSIBLE__ let tel' = telFromList $ drop np $ telToList tel vars np = map (Just . AnArg) $ downFrom np (>+<) <$> (OccursAs (ConArgType c) <$> getOccurrences (vars np) tel') <*> (OccursAs (IndArgType c) . OnlyVarsUpTo np <$> getOccurrences (vars $ size tel) indices) (>+<) ioccs <$> (Concat <$> mapM conOcc cs) Record{recClause = Just c} -> getOccurrences [] =<< instantiateFull c Record{recPars = np, recTel = tel} -> do let tel' = telFromList $ drop np $ telToList tel vars = map (Just . AnArg) $ downFrom np getOccurrences vars =<< normalise tel' -- Andreas, 2017-01-01, issue #1899, treat like data types -- Arguments to other kinds of definitions are hard-wired. Constructor{} -> return emptyOB Axiom{} -> return emptyOB DataOrRecSig{} -> return emptyOB Primitive{} -> return emptyOB GeneralizableVar{} -> return emptyOB AbstractDefn{} -> __IMPOSSIBLE__ -- Building the occurrence graph ------------------------------------------ data Node = DefNode !QName | ArgNode !QName !Nat deriving (Eq, Ord) -- | Edge labels for the positivity graph. data Edge a = Edge !Occurrence a deriving (Eq, Ord, Show, Functor) -- | Merges two edges between the same source and target. mergeEdges :: Edge a -> Edge a -> Edge a mergeEdges _ e@(Edge Mixed _) = e -- dominant mergeEdges e@(Edge Mixed _) _ = e mergeEdges (Edge Unused _) e = e -- neutral mergeEdges e (Edge Unused _) = e mergeEdges (Edge JustNeg _) e@(Edge JustNeg _) = e mergeEdges _ e@(Edge JustNeg w) = Edge Mixed w mergeEdges e@(Edge JustNeg w) _ = Edge Mixed w mergeEdges _ e@(Edge JustPos _) = e -- dominates strict pos. mergeEdges e@(Edge JustPos _) _ = e mergeEdges _ e@(Edge StrictPos _) = e -- dominates 'GuardPos' mergeEdges e@(Edge StrictPos _) _ = e mergeEdges (Edge GuardPos _) e@(Edge GuardPos _) = e -- | These operations form a semiring if we quotient by the relation -- \"the 'Occurrence' components are equal\". instance SemiRing (Edge (Seq OccursWhere)) where ozero = Edge ozero DS.empty oone = Edge oone DS.empty oplus = mergeEdges otimes (Edge o1 w1) (Edge o2 w2) = Edge (otimes o1 o2) (w1 DS.>< w2) -- | WARNING: There can be lots of sharing between the 'OccursWhere' -- entries in the edges. Traversing all of these entries could be -- expensive. (See 'computeEdges' for an example.) buildOccurrenceGraph :: Set QName -> TCM (Graph Node (Edge OccursWhere)) buildOccurrenceGraph qs = Graph.fromEdgesWith mergeEdges . concat <$> mapM defGraph (Set.toList qs) where defGraph :: QName -> TCM [Graph.Edge Node (Edge OccursWhere)] defGraph q = inConcreteOrAbstractMode q $ \ _def -> do occs <- computeOccurrences' q reportSDoc "tc.pos.occs" 40 $ ("Occurrences in" <+> prettyTCM q <> ":") $+$ (nest 2 $ vcat $ map (\(i, n) -> text (show i) <> ":" <+> text (show n) <+> "occurrences") $ List.sortBy (compare `on` snd) $ Map.toList (flatten occs)) -- Placing this line before the reportSDoc lines above creates a -- space leak: occs is retained for too long. es <- computeEdges qs q occs reportSDoc "tc.pos.occs.edges" 60 $ "Edges:" $+$ (nest 2 $ vcat $ map (\e -> let Edge o w = Graph.label e in prettyTCM (Graph.source e) <+> "-[" <+> return (P.pretty o) <> "," <+> return (P.pretty w) <+> "]->" <+> prettyTCM (Graph.target e)) es) return es -- | Computes all non-'ozero' occurrence graph edges represented by -- the given 'OccurrencesBuilder'. -- -- WARNING: There can be lots of sharing between the 'OccursWhere' -- entries in the edges. Traversing all of these entries could be -- expensive. For instance, for the function @F@ in -- @benchmark/misc/SlowOccurrences.agda@ a large number of edges from -- the argument @X@ to the function @F@ are computed. These edges have -- polarity 'StrictPos', 'JustNeg' or 'JustPos', and contain the -- following 'OccursWhere' elements: -- -- * @'OccursWhere' _ 'DS.empty' ('DS.fromList' ['InDefOf' "F", 'InClause' 0])@, -- -- * @'OccursWhere' _ 'DS.empty' ('DS.fromList' ['InDefOf' "F", 'InClause' 0, 'LeftOfArrow'])@, -- -- * @'OccursWhere' _ 'DS.empty' ('DS.fromList' ['InDefOf' "F", 'InClause' 0, 'LeftOfArrow', 'LeftOfArrow'])@, -- -- * @'OccursWhere' _ 'DS.empty' ('DS.fromList' ['InDefOf' "F", 'InClause' 0, 'LeftOfArrow', 'LeftOfArrow', 'LeftOfArrow'])@, -- -- * and so on. computeEdges :: Set QName -- ^ The names in the current mutual block. -> QName -- ^ The current name. -> OccurrencesBuilder -> TCM [Graph.Edge Node (Edge OccursWhere)] computeEdges muts q ob = ($ []) <$> mkEdge StrictPos (preprocess ob) __IMPOSSIBLE__ DS.empty DS.empty where mkEdge :: Occurrence -> OccurrencesBuilder' -> Node -- ^ The current target node. -> DS.Seq Where -- ^ 'Where' information encountered before the current target -- node was (re)selected. -> DS.Seq Where -- ^ 'Where' information encountered after the current target -- node was (re)selected. -> TCM ([Graph.Edge Node (Edge OccursWhere)] -> [Graph.Edge Node (Edge OccursWhere)]) mkEdge !pol ob to cs os = case ob of Concat' obs -> foldr (liftM2 (.)) (return id) [ mkEdge pol ob to cs os | ob <- obs ] OccursAs' w ob -> do (to', pol) <- mkEdge' to pol w let mk = mkEdge pol ob case to' of Nothing -> mk to cs (os DS.|> w) Just to -> mk to (cs DS.>< os) (DS.singleton w) OccursHere' i -> let o = OccursWhere (getRange i) cs os in case i of AnArg i -> return $ applyUnless (null pol) (Graph.Edge { Graph.source = ArgNode q i , Graph.target = to , Graph.label = Edge pol o } :) ADef q' -> -- Andreas, 2017-04-26, issue #2555 -- Skip nodes pointing outside the mutual block. return $ applyUnless (null pol || Set.notMember q' muts) (Graph.Edge { Graph.source = DefNode q' , Graph.target = to , Graph.label = Edge pol o } :) -- | This function might return a new target node. mkEdge' :: Node -- ^ The current target node. -> Occurrence -> Where -> TCM (Maybe Node, Occurrence) mkEdge' to !pol w = case w of VarArg -> mixed MetaArg -> mixed LeftOfArrow -> negative DefArg d i -> do pol' <- isGuarding d if Set.member d muts then return (Just (ArgNode d i), pol') else addPol =<< otimes pol' <$> getArgOccurrence d i UnderInf -> addPol GuardPos -- Andreas, 2012-06-09: ∞ is guarding ConArgType _ -> keepGoing IndArgType _ -> mixed InClause _ -> keepGoing Matched -> mixed -- consider arguments matched against as used IsIndex -> mixed -- And similarly for indices. InDefOf d -> do pol' <- isGuarding d return (Just (DefNode d), pol') where keepGoing = return (Nothing, pol) mixed = return (Nothing, Mixed) negative = return (Nothing, otimes pol JustNeg) addPol pol' = return (Nothing, otimes pol pol') isGuarding d = do isDR <- isDataOrRecordType d return $ case isDR of Just IsData -> GuardPos -- a datatype is guarding _ -> StrictPos -- Pretty-printing ----------------------------------------------------- instance Pretty Node where pretty = \case DefNode q -> P.pretty q ArgNode q i -> P.pretty q P.<> P.text ("." ++ show i) instance PrettyTCM Node where prettyTCM = return . P.pretty instance PrettyTCM n => PrettyTCM (WithNode n (Edge OccursWhere)) where prettyTCM (WithNode n (Edge o w)) = vcat [ prettyTCM o <+> prettyTCM n , nest 2 $ return $ P.pretty w ] instance PrettyTCM (Seq OccursWhere) where prettyTCM = fmap snd . prettyOWs . map adjustLeftOfArrow . uniq . Fold.toList where nth 0 = pwords "first" nth 1 = pwords "second" nth 2 = pwords "third" nth n = pwords $ show (n + 1) ++ "th" -- Removes consecutive duplicates. uniq :: [OccursWhere] -> [OccursWhere] uniq = map head . List.groupBy ((==) `on` snd') where snd' (OccursWhere _ _ ws) = ws prettyOWs :: [OccursWhere] -> TCM (String, Doc) prettyOWs [] = __IMPOSSIBLE__ prettyOWs [o] = do (s, d) <- prettyOW o return (s, d P.<> ".") prettyOWs (o:os) = do (s1, d1) <- prettyOW o (s2, d2) <- prettyOWs os return (s1, d1 P.<> "," P.<+> "which" P.<+> P.text s2 P.$$ d2) prettyOW :: OccursWhere -> TCM (String, Doc) prettyOW (OccursWhere _ cs ws) | null cs = prettyWs ws | otherwise = do (s, d1) <- prettyWs ws (_, d2) <- prettyWs cs return (s, d1 P.$$ "(" P.<> d2 P.<> ")") prettyWs :: Seq Where -> TCM (String, Doc) prettyWs ws = case Fold.toList ws of [InDefOf d, IsIndex] -> (,) "is" <$> fsep (pwords "an index of" ++ [prettyTCM d]) _ -> (,) "occurs" <$> Fold.foldrM (\w d -> return d $$ fsep (prettyW w)) empty ws prettyW :: Where -> [TCM Doc] prettyW w = case w of LeftOfArrow -> pwords "to the left of an arrow" DefArg q i -> pwords "in the" ++ nth i ++ pwords "argument of" ++ [prettyTCM q] UnderInf -> pwords "under" ++ [do -- this cannot fail if an 'UnderInf' has been generated Def inf _ <- primInf prettyTCM inf] VarArg -> pwords "in an argument of a bound variable" MetaArg -> pwords "in an argument of a metavariable" ConArgType c -> pwords "in the type of the constructor" ++ [prettyTCM c] IndArgType c -> pwords "in an index of the target type of the constructor" ++ [prettyTCM c] InClause i -> pwords "in the" ++ nth i ++ pwords "clause" Matched -> pwords "as matched against" IsIndex -> pwords "as an index" InDefOf d -> pwords "in the definition of" ++ [prettyTCM d] adjustLeftOfArrow :: OccursWhere -> OccursWhere adjustLeftOfArrow (OccursWhere r cs os) = OccursWhere r (DS.filter (not . isArrow) cs) $ noArrows DS.>< case DS.viewl startsWithArrow of DS.EmptyL -> DS.empty w DS.:< ws -> w DS.<| DS.filter (not . isArrow) ws where (noArrows, startsWithArrow) = DS.breakl isArrow os isArrow LeftOfArrow{} = True isArrow _ = False Agda-2.6.0.1/src/full/Agda/TypeChecking/IApplyConfluence.hs0000644000000000000000000000706313466402171021410 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.IApplyConfluence where import Prelude hiding (null, (!!)) -- do not use partial functions like !! import Control.Monad import Control.Monad.Reader import Control.Monad.Trans ( lift ) import Data.Either (lefts) import qualified Data.List as List import Data.Monoid (Any(..)) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Traversable as Trav import Agda.Syntax.Common import Agda.Syntax.Position -- import Agda.Syntax.Literal import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Interaction.Options import Agda.TypeChecking.Names import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Primitive.Cubical import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Conversion (tryConversion, equalType, equalTermOnFace) import Agda.TypeChecking.Pretty import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Records import Agda.TypeChecking.Telescope import Agda.TypeChecking.Telescope.Path import Agda.Utils.Either import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.Lens #include "undefined.h" import Agda.Utils.Impossible checkIApplyConfluence_ :: QName -> TCM () checkIApplyConfluence_ f = whenM (optCubical <$> pragmaOptions) $ do -- Andreas, 2019-03-27, iapply confluence should only be checked when --cubical. -- See test/Succeed/CheckIApplyConfluence.agda. -- We cannot reach the following crash point unless --cubical. __CRASH_WHEN__ "tc.cover.iapply.confluence.crash" 666 reportSDoc "tc.cover.iapply" 10 $ text "Checking IApply confluence of" <+> pretty f inConcreteOrAbstractMode f $ \ d -> do case theDef d of Function{funClauses = cls', funCovering = cls} -> do reportSDoc "tc.cover.iapply" 10 $ text "length cls =" <+> pretty (length cls) when (null cls && not (null $ concatMap (iApplyVars . namedClausePats) cls')) $ __IMPOSSIBLE__ modifySignature $ updateDefinition f $ updateTheDef $ updateCovering (const []) forM_ cls $ checkIApplyConfluence f _ -> return () -- | @addClause f (Clause {namedClausePats = ps})@ checks that @f ps@ -- reduces in a way that agrees with @IApply@ reductions. checkIApplyConfluence :: QName -> Closure Clause -> TCM () checkIApplyConfluence f clos = do enterClosure clos $ \ cl -> case cl of Clause {clauseBody = Nothing} -> return () Clause {clauseType = Nothing} -> __IMPOSSIBLE__ cl@Clause { clauseTel = tel , namedClausePats = ps , clauseType = Just t , clauseBody = Just body } -> setCurrentRange (getRange f) $ do let trhs = unArg t reportSDoc "tc.cover.iapply" 40 $ "tel =" <+> prettyTCM tel reportSDoc "tc.cover.iapply" 40 $ "ps =" <+> pretty ps ps <- normaliseProjP ps forM_ (iApplyVars ps) $ \ i -> do unview <- intervalUnview' let phi = unview $ IMax (argN $ var $ i) $ argN $ unview (INeg $ argN $ var i) let es = patternsToElims ps let lhs = Def f es equalTermOnFace phi trhs lhs body Agda-2.6.0.1/src/full/Agda/TypeChecking/Free.hs0000644000000000000000000002765513466402171017102 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Computing the free variables of a term. -- -- The distinction between rigid and strongly rigid occurrences comes from: -- Jason C. Reed, PhD thesis, 2009, page 96 (see also his LFMTP 2009 paper) -- -- The main idea is that x = t(x) is unsolvable if x occurs strongly rigidly -- in t. It might have a solution if the occurrence is not strongly rigid, e.g. -- -- x = \f -> suc (f (x (\ y -> k))) has x = \f -> suc (f (suc k)) -- -- [Jason C. Reed, PhD thesis, page 106] -- -- Under coinductive constructors, occurrences are never strongly rigid. -- Also, function types and lambdas do not establish strong rigidity. -- Only inductive constructors do so. -- (See issue 1271). module Agda.TypeChecking.Free ( FreeVars(..) , VarCounts(..) , Free , IsVarSet(..) , IgnoreSorts(..) , runFree , rigidVars, relevantVars, allVars , allFreeVars, allFreeVarsWithOcc , allRelevantVars, allRelevantVarsIgnoring , freeIn, freeInIgnoringSorts, isBinderUsed , relevantIn, relevantInIgnoringSortAnn , Occurrence(..) , VarOcc(..) , occurrence , closed , freeVars -- only for testing , freeVars' , MetaSet ) where import Prelude hiding (null) import Control.Monad.Reader import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend, mconcat ) import Data.Semigroup ( Semigroup, (<>), Any(..), All(..) ) import Data.IntSet (IntSet) import qualified Data.IntSet as Set import Data.IntMap (IntMap) import qualified Data.IntMap as Map import Data.Set (Set) import Data.Proxy import qualified Agda.Benchmarking as Bench import Agda.Syntax.Common hiding (Arg, Dom, NamedArg) import Agda.Syntax.Internal import Agda.TypeChecking.Free.Lazy ( Free(..) , FreeEnv(..), initFreeEnv , VarOcc(..), topVarOcc, TheVarMap, theVarMap, IgnoreSorts(..), Variable, SingleVar , MetaSet, IsVarSet(..), runFreeM ) import qualified Agda.TypeChecking.Free.Lazy as Free import Agda.Utils.Null import Agda.Utils.Singleton type VarSet = IntSet -- | Free variables of a term, (disjointly) partitioned into strongly and -- and weakly rigid variables, flexible variables and irrelevant variables. data FreeVars = FV { stronglyRigidVars :: VarSet -- ^ Variables under only and at least one inductive constructor(s). , unguardedVars :: VarSet -- ^ Variables at top or only under inductive record constructors -- λs and Πs. -- The purpose of recording these separately is that they -- can still become strongly rigid if put under a constructor -- whereas weakly rigid ones stay weakly rigid. , weaklyRigidVars :: VarSet -- ^ Ordinary rigid variables, e.g., in arguments of variables or functions. , flexibleVars :: IntMap MetaSet -- ^ Variables occuring in arguments of metas. -- These are only potentially free, depending how the meta variable is instantiated. -- The set contains the id's of the meta variables that this variable is an argument to. , irrelevantVars :: VarSet -- ^ Variables in irrelevant arguments and under a @DontCare@, i.e., -- in irrelevant positions. } deriving (Eq, Show) mapSRV, mapUGV, mapWRV, mapIRV :: (VarSet -> VarSet) -> FreeVars -> FreeVars mapSRV f fv = fv { stronglyRigidVars = f $ stronglyRigidVars fv } mapUGV f fv = fv { unguardedVars = f $ unguardedVars fv } mapWRV f fv = fv { weaklyRigidVars = f $ weaklyRigidVars fv } mapIRV f fv = fv { irrelevantVars = f $ irrelevantVars fv } mapFXV :: (IntMap MetaSet -> IntMap MetaSet) -> FreeVars -> FreeVars mapFXV f fv = fv { flexibleVars = f $ flexibleVars fv } -- | Rigid variables: either strongly rigid, unguarded, or weakly rigid. rigidVars :: FreeVars -> VarSet rigidVars fv = Set.unions [ stronglyRigidVars fv , unguardedVars fv , weaklyRigidVars fv ] -- | All but the irrelevant variables. relevantVars :: FreeVars -> VarSet relevantVars fv = Set.unions [rigidVars fv, Map.keysSet (flexibleVars fv)] -- | @allVars fv@ includes irrelevant variables. allVars :: FreeVars -> VarSet allVars fv = Set.unions [relevantVars fv, irrelevantVars fv] data Occurrence = NoOccurrence | Irrelevantly | StronglyRigid -- ^ Under at least one and only inductive constructors. | Unguarded -- ^ In top position, or only under inductive record constructors. | WeaklyRigid -- ^ In arguments to variables and definitions. | Flexible MetaSet -- ^ In arguments of metas. deriving (Eq,Show) -- | Compute an occurrence of a single variable in a piece of internal syntax. occurrence :: Free a => Nat -> a -> Occurrence occurrence x v = occurrenceFV x $ freeVars v -- | Extract occurrence of a single variable from computed free variables. occurrenceFV :: Nat -> FreeVars -> Occurrence occurrenceFV x fv | x `Set.member` stronglyRigidVars fv = StronglyRigid | x `Set.member` unguardedVars fv = Unguarded | x `Set.member` weaklyRigidVars fv = WeaklyRigid | Just ms <- Map.lookup x (flexibleVars fv) = Flexible ms | x `Set.member` irrelevantVars fv = Irrelevantly | otherwise = NoOccurrence -- | Mark variables as flexible. Useful when traversing arguments of metas. flexible :: MetaSet -> FreeVars -> FreeVars flexible ms fv = fv { stronglyRigidVars = Set.empty , unguardedVars = Set.empty , weaklyRigidVars = Set.empty , flexibleVars = Map.unionsWith mappend [ Map.fromSet (const ms) (rigidVars fv) , fmap (mappend ms) (flexibleVars fv) ] } -- | Mark rigid variables as non-strongly. Useful when traversing arguments of variables. weakly :: FreeVars -> FreeVars weakly fv = fv { stronglyRigidVars = Set.empty , unguardedVars = Set.empty , weaklyRigidVars = rigidVars fv } -- | Mark unguarded variables as strongly rigid. Useful when traversing arguments of inductive constructors. strongly :: FreeVars -> FreeVars strongly fv = fv { stronglyRigidVars = stronglyRigidVars fv `Set.union` unguardedVars fv , unguardedVars = Set.empty } -- | What happens to the variables occurring under a constructor? underConstructor :: ConHead -> FreeVars -> FreeVars underConstructor (ConHead c i fs) = case (i,fs) of -- Coinductive (record) constructors admit infinite cycles: (CoInductive, _) -> weakly -- Inductive data constructors do not admit infinite cycles: (Inductive, []) -> strongly -- Inductive record constructors do not admit infinite cycles, -- but this cannot be proven inside Agda. -- Thus, unification should not prove it either. (Inductive, (_:_)) -> id -- | Mark all free variables as irrelevant. irrelevantly :: FreeVars -> FreeVars irrelevantly fv = empty { irrelevantVars = allVars fv } -- | Pointwise union. union :: FreeVars -> FreeVars -> FreeVars union (FV sv1 gv1 rv1 fv1 iv1) (FV sv2 gv2 rv2 fv2 iv2) = FV (Set.union sv1 sv2) (Set.union gv1 gv2) (Set.union rv1 rv2) (Map.unionWith mappend fv1 fv2) (Set.union iv1 iv2) unions :: [FreeVars] -> FreeVars unions = foldr union empty instance Null FreeVars where empty = FV Set.empty Set.empty Set.empty Map.empty Set.empty null (FV a b c d e) = null a && null b && null c && null d && null e -- | Free variable sets form a monoid under 'union'. instance Semigroup FreeVars where (<>) = union instance Monoid FreeVars where mempty = empty mappend = (<>) mconcat = unions -- | @delete x fv@ deletes variable @x@ from variable set @fv@. delete :: Nat -> FreeVars -> FreeVars delete n (FV sv gv rv fv iv) = FV (Set.delete n sv) (Set.delete n gv) (Set.delete n rv) (Map.delete n fv) (Set.delete n iv) instance Singleton Variable FreeVars where singleton i = mapUGV (Set.insert i) mempty instance IsVarSet FreeVars where withVarOcc (VarOcc o r) = goOcc o . goRel r where goOcc o = case o of Free.Flexible ms -> flexible ms Free.WeaklyRigid -> weakly Free.Unguarded -> id Free.StronglyRigid -> strongly goRel r = case r of Relevant -> id NonStrict -> id -- we don't track non-strict in FreeVars Irrelevant -> irrelevantly -- In most cases we don't care about the VarOcc. instance IsVarSet VarSet where withVarOcc _ = id instance IsVarSet [Int] where withVarOcc _ = id instance IsVarSet Any where withVarOcc _ = id instance IsVarSet All where withVarOcc _ = id newtype VarCounts = VarCounts { varCounts :: IntMap Int } instance Semigroup VarCounts where VarCounts fv1 <> VarCounts fv2 = VarCounts (Map.unionWith (+) fv1 fv2) instance Monoid VarCounts where mempty = VarCounts Map.empty mappend = (<>) instance IsVarSet VarCounts where withVarOcc _ = id instance Singleton Variable VarCounts where singleton i = VarCounts $ Map.singleton i 1 -- * Collecting free variables. bench :: a -> a bench = Bench.billToPure [ Bench.Typing , Bench.Free ] -- | Doesn't go inside solved metas, but collects the variables from a -- metavariable application @X ts@ as @flexibleVars@. {-# SPECIALIZE freeVars :: Free a => a -> FreeVars #-} freeVars :: (IsVarSet c, Singleton Variable c, Free a) => a -> c freeVars = freeVarsIgnore IgnoreNot {-# SPECIALIZE freeVarsIgnore :: Free a => IgnoreSorts -> a -> FreeVars #-} freeVarsIgnore :: (IsVarSet c, Singleton Variable c, Free a) => IgnoreSorts -> a -> c freeVarsIgnore = runFree singleton -- Specialization to typical monoids {-# SPECIALIZE runFree :: Free a => SingleVar Any -> IgnoreSorts -> a -> Any #-} {-# SPECIALIZE runFree :: Free a => SingleVar FreeVars -> IgnoreSorts -> a -> FreeVars #-} -- Specialization to Term {-# SPECIALIZE runFree :: SingleVar Any -> IgnoreSorts -> Term -> Any #-} {-# SPECIALIZE runFree :: SingleVar FreeVars -> IgnoreSorts -> Term -> FreeVars #-} -- | Compute free variables. runFree :: (IsVarSet c, Free a) => SingleVar c -> IgnoreSorts -> a -> c runFree single i t = -- bench $ -- Benchmarking is expensive (4% on std-lib) runFreeM single i (freeVars' t) -- | Check if a variable is free, possibly ignoring sorts. freeIn' :: Free a => IgnoreSorts -> Nat -> a -> Bool freeIn' ig x t = getAny $ runFree (Any . (x ==)) ig t {-# SPECIALIZE freeIn :: Nat -> Term -> Bool #-} freeIn :: Free a => Nat -> a -> Bool freeIn = freeIn' IgnoreNot freeInIgnoringSorts :: Free a => Nat -> a -> Bool freeInIgnoringSorts = freeIn' IgnoreAll freeInIgnoringSortAnn :: Free a => Nat -> a -> Bool freeInIgnoringSortAnn = freeIn' IgnoreInAnnotations newtype RelevantIn a = RelevantIn {getRelevantIn :: a} deriving (Semigroup, Monoid) instance IsVarSet a => IsVarSet (RelevantIn a) where withVarOcc o x | isIrrelevant (varRelevance o) = mempty | otherwise = RelevantIn $ withVarOcc o $ getRelevantIn x relevantIn' :: Free a => IgnoreSorts -> Nat -> a -> Bool relevantIn' ig x t = getAny . getRelevantIn $ runFree (RelevantIn . Any . (x ==)) ig t relevantInIgnoringSortAnn :: Free a => Nat -> a -> Bool relevantInIgnoringSortAnn = relevantIn' IgnoreInAnnotations relevantIn :: Free a => Nat -> a -> Bool relevantIn = relevantIn' IgnoreAll -- | Is the variable bound by the abstraction actually used? isBinderUsed :: Free a => Abs a -> Bool isBinderUsed NoAbs{} = False isBinderUsed (Abs _ x) = 0 `freeIn` x -- | Is the term entirely closed (no free variables)? closed :: Free a => a -> Bool closed t = getAll $ runFree (const $ All False) IgnoreNot t -- | Collect all free variables. allFreeVars :: Free a => a -> VarSet allFreeVars = runFree Set.singleton IgnoreNot -- | Collect all free variables together with information about their occurrence. allFreeVarsWithOcc :: Free a => a -> TheVarMap allFreeVarsWithOcc = theVarMap . runFree (singleton . (,topVarOcc)) IgnoreNot -- | Collect all relevant free variables, possibly ignoring sorts. allRelevantVarsIgnoring :: Free a => IgnoreSorts -> a -> VarSet allRelevantVarsIgnoring ig = getRelevantIn . runFree (RelevantIn . Set.singleton) ig -- | Collect all relevant free variables, excluding the "unused" ones. allRelevantVars :: Free a => a -> VarSet allRelevantVars = allRelevantVarsIgnoring IgnoreNot Agda-2.6.0.1/src/full/Agda/TypeChecking/Empty.hs-boot0000644000000000000000000000056113466402171020243 0ustar0000000000000000 module Agda.TypeChecking.Empty where import Agda.TypeChecking.Monad (TCM) import Agda.Syntax.Internal (Type, Telescope) import Agda.Syntax.Position (Range) data ErrorNonEmpty isEmptyType :: Type -> TCM Bool isEmptyTel :: Telescope -> TCM Bool ensureEmptyType :: Range -> Type -> TCM () checkEmptyTel :: Range -> Telescope -> TCM (Either ErrorNonEmpty Int) Agda-2.6.0.1/src/full/Agda/TypeChecking/ReconstructParameters.hs0000644000000000000000000000615413466402171022547 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Reconstruct dropped parameters from constructors. Used by -- with-abstraction to avoid ill-typed abstractions (#745). Note that the -- term is invalid after parameter reconstruction. Parameters need to be -- dropped again before using it. module Agda.TypeChecking.ReconstructParameters where import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.TypeChecking.Monad import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Telescope import Agda.TypeChecking.Pretty import Agda.Utils.Size import Agda.Utils.Impossible #include "undefined.h" reconstructParametersInType :: Type -> TCM Type reconstructParametersInType a = traverse (reconstructParameters (sort $ getSort a)) a reconstructParametersInTel :: Telescope -> TCM Telescope reconstructParametersInTel EmptyTel = return EmptyTel reconstructParametersInTel (ExtendTel a tel) = do ar <- reconstructParametersInType (unDom a) addContext (absName tel, a) $ ExtendTel (ar <$ a) <$> traverse reconstructParametersInTel tel reconstructParametersInEqView :: EqualityView -> TCM EqualityView reconstructParametersInEqView (EqualityType s eq l a u v) = EqualityType s eq l <$> traverse (reconstructParameters $ sort s) a <*> traverse (reconstructParameters $ El s $ unArg a) u <*> traverse (reconstructParameters $ El s $ unArg a) v reconstructParametersInEqView (OtherType a) = OtherType <$> reconstructParametersInType a reconstructParameters :: Type -> Term -> TCM Term reconstructParameters a v = do reportSDoc "tc.with.reconstruct" 30 $ sep [ "reconstructing parameters in" , nest 2 $ sep [ prettyTCM v <+> ":", nest 2 $ prettyTCM a ] ] v <- checkInternal' (defaultAction{ postAction = reconstruct }) v a reportSDoc "tc.with.reconstruct" 30 $ nest 2 $ "-->" <+> prettyTCM v return v where reconstruct a v = do case v of Con h ci vs -> do TelV tel a <- telView a let under = size tel -- under-applied when under > 0 reportSDoc "tc.with.reconstruct" 50 $ sep [ "reconstructing" , nest 2 $ sep [ prettyTCM v <+> ":" , nest 2 $ prettyTCM a ] ] case (unEl a) of Def d es -> do Just n <- defParameters <$> getConstInfo d let ps = applySubst (strengthenS __IMPOSSIBLE__ under) . take n $ es reportSLn "tc.with.reconstruct" 50 $ show n ++ " parameters" -- TODO: the reconstructed parameters are not reconstructed recursively! return $ Con h ci (ps ++ vs) _ -> __IMPOSSIBLE__ _ -> return v dropParameters :: TermLike a => a -> TCM a dropParameters = traverseTermM dropPars where dropPars v = case v of Con c ci vs -> do Constructor{ conData = d } <- theDef <$> getConstInfo (conName c) Just n <- defParameters <$> getConstInfo d return $ Con c ci $ drop n vs _ -> return v Agda-2.6.0.1/src/full/Agda/TypeChecking/Irrelevance.hs0000644000000000000000000004216413466402171020450 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} {-| Compile-time irrelevance. In type theory with compile-time irrelevance à la Pfenning (LiCS 2001), variables in the context are annotated with relevance attributes. @@ Γ = r₁x₁:A₁, ..., rⱼxⱼ:Aⱼ @@ To handle irrelevant projections, we also record the current relevance attribute in the judgement. For instance, this attribute is equal to to 'Irrelevant' if we are in an irrelevant position, like an irrelevant argument. @@ Γ ⊢r t : A @@ Only relevant variables can be used: @@ (Relevant x : A) ∈ Γ -------------------- Γ ⊢r x : A @@ Irrelevant global declarations can only be used if @r = Irrelevant@. When we enter a @r'@-relevant function argument, we compose the @r@ with @r'@ and (left-)divide the attributes in the context by @r'@. @@ Γ ⊢r t : (r' x : A) → B r' \ Γ ⊢(r'·r) u : A --------------------------------------------------------- Γ ⊢r t u : B[u/x] @@ No surprises for abstraction: @@ Γ, (r' x : A) ⊢r : B ----------------------------- Γ ⊢r λxt : (r' x : A) → B @@ This is different for runtime irrelevance (erasure) which is ``flat'', meaning that once one is in an irrelevant context, all new assumptions will be usable, since they are turned relevant once entering the context. See Conor McBride (WadlerFest 2016), for a type system in this spirit: We use such a rule for runtime-irrelevance: @@ Γ, (q \ q') x : A ⊢q t : B ------------------------------ Γ ⊢q λxt : (q' x : A) → B @@ Conor's system is however set up differently, with a very different variable rule: @@ (q x : A) ∈ Γ -------------- Γ ⊢q x : A Γ, (q·p) x : A ⊢q t : B ----------------------------- Γ ⊢q λxt : (p x : A) → B Γ ⊢q t : (p x : A) → B Γ' ⊢qp u : A ------------------------------------------------- Γ + Γ' ⊢q t u : B[u/x] @@ -} module Agda.TypeChecking.Irrelevance where import Control.Arrow (first, second) import Control.Monad.Reader import qualified Data.Map as Map import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute.Class import Agda.Utils.Function import Agda.Utils.Lens import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible -- | data 'Relevance' -- see "Agda.Syntax.Common". -- * Operations on 'Dom'. -- | Prepare parts of a parameter telescope for abstraction in constructors -- and projections. hideAndRelParams :: Dom a -> Dom a hideAndRelParams = hideOrKeepInstance . mapRelevance nonStrictToIrr -- * Operations on 'Context'. -- | Modify the context whenever going from the l.h.s. (term side) -- of the typing judgement to the r.h.s. (type side). workOnTypes :: TCM a -> TCM a workOnTypes cont = do allowed <- optExperimentalIrrelevance <$> pragmaOptions verboseBracket "tc.irr" 20 "workOnTypes" $ workOnTypes' allowed cont -- | Internal workhorse, expects value of --experimental-irrelevance flag -- as argument. workOnTypes' :: Bool -> TCM a -> TCM a workOnTypes' experimental = modifyContext (map $ mapRelevance f) . applyQuantityToContext Quantity0 . localTC (\ e -> e { envWorkingOnTypes = True }) where f | experimental = irrToNonStrict | otherwise = id -- | (Conditionally) wake up irrelevant variables and make them relevant. -- For instance, -- in an irrelevant function argument otherwise irrelevant variables -- may be used, so they are awoken before type checking the argument. -- -- Also allow the use of irrelevant definitions. applyRelevanceToContext :: (MonadTCEnv tcm, LensRelevance r) => r -> tcm a -> tcm a applyRelevanceToContext thing = case getRelevance thing of Relevant -> id rel -> applyRelevanceToContextOnly rel . applyRelevanceToJudgementOnly rel -- | (Conditionally) wake up irrelevant variables and make them relevant. -- For instance, -- in an irrelevant function argument otherwise irrelevant variables -- may be used, so they are awoken before type checking the argument. -- -- Precondition: @Relevance /= Relevant@ applyRelevanceToContextOnly :: (MonadTCEnv tcm) => Relevance -> tcm a -> tcm a applyRelevanceToContextOnly rel = localTC $ over eContext (map $ inverseApplyRelevance rel) . over eLetBindings (Map.map . fmap . second $ inverseApplyRelevance rel) -- | Apply relevance @rel@ the the relevance annotation of the (typing/equality) -- judgement. This is part of the work done when going into a @rel@-context. -- -- Precondition: @Relevance /= Relevant@ applyRelevanceToJudgementOnly :: (MonadTCEnv tcm) => Relevance -> tcm a -> tcm a applyRelevanceToJudgementOnly = localTC . over eRelevance . composeRelevance -- | Like 'applyRelevanceToContext', but only act on context if -- @--irrelevant-projections@. -- See issue #2170. applyRelevanceToContextFunBody :: (MonadTCM tcm, LensRelevance r) => r -> tcm a -> tcm a applyRelevanceToContextFunBody thing cont = case getRelevance thing of Relevant -> cont rel -> applyWhenM (optIrrelevantProjections <$> pragmaOptions) (applyRelevanceToContextOnly rel) $ -- enable local irr. defs only when option applyRelevanceToJudgementOnly rel cont -- enable global irr. defs alway -- | (Conditionally) wake up erased variables and make them unrestricted. -- For instance, -- in an erased function argument otherwise erased variables -- may be used, so they are awoken before type checking the argument. -- -- Also allow the use of erased definitions. applyQuantityToContext :: (MonadTCEnv tcm, LensQuantity q) => q -> tcm a -> tcm a applyQuantityToContext thing = case getQuantity thing of Quantity1 -> id q -> applyQuantityToContextOnly q . applyQuantityToJudgementOnly q -- | (Conditionally) wake up erased variables and make them unrestricted. -- For instance, -- in an erased function argument otherwise erased variables -- may be used, so they are awoken before type checking the argument. -- -- Precondition: @Quantity /= Quantity1@ applyQuantityToContextOnly :: (MonadTCEnv tcm) => Quantity -> tcm a -> tcm a applyQuantityToContextOnly q = localTC $ over eContext (map $ inverseApplyQuantity q) . over eLetBindings (Map.map . fmap . second $ inverseApplyQuantity q) -- | Apply quantity @q@ the the quantity annotation of the (typing/equality) -- judgement. This is part of the work done when going into a @q@-context. -- -- Precondition: @Quantity /= Quantity1@ applyQuantityToJudgementOnly :: (MonadTCEnv tcm) => Quantity -> tcm a -> tcm a applyQuantityToJudgementOnly = localTC . over eQuantity . composeQuantity -- | (Conditionally) wake up irrelevant variables and make them relevant. -- For instance, -- in an irrelevant function argument otherwise irrelevant variables -- may be used, so they are awoken before type checking the argument. -- -- Also allow the use of irrelevant definitions. applyModalityToContext :: (MonadTCEnv tcm, LensModality m) => m -> tcm a -> tcm a applyModalityToContext thing = case getModality thing of m | m == mempty -> id | otherwise -> applyModalityToContextOnly m . applyModalityToJudgementOnly m -- | (Conditionally) wake up irrelevant variables and make them relevant. -- For instance, -- in an irrelevant function argument otherwise irrelevant variables -- may be used, so they are awoken before type checking the argument. -- -- Precondition: @Modality /= Relevant@ applyModalityToContextOnly :: (MonadTCEnv tcm) => Modality -> tcm a -> tcm a applyModalityToContextOnly m = localTC $ over eContext (map $ inverseApplyModality m) . over eLetBindings (Map.map . fmap . second $ inverseApplyModality m) -- | Apply modality @m@ the the modality annotation of the (typing/equality) -- judgement. This is part of the work done when going into a @m@-context. -- -- Precondition: @Modality /= Relevant@ applyModalityToJudgementOnly :: (MonadTCEnv tcm) => Modality -> tcm a -> tcm a applyModalityToJudgementOnly = localTC . over eModality . composeModality -- | Like 'applyModalityToContext', but only act on context if -- @--irrelevant-projections@. -- See issue #2170. applyModalityToContextFunBody :: (MonadTCM tcm, LensModality r) => r -> tcm a -> tcm a applyModalityToContextFunBody thing cont = do let m = getModality thing if m == mempty then cont else applyWhenM (optIrrelevantProjections <$> pragmaOptions) (applyRelevanceToContextOnly (getRelevance m)) $ -- enable local irr. defs only when option applyModalityToJudgementOnly m cont -- enable global irr. defs alway -- | Wake up irrelevant variables and make them relevant. This is used -- when type checking terms in a hole, in which case you want to be able to -- (for instance) infer the type of an irrelevant variable. In the course -- of type checking an irrelevant function argument 'applyRelevanceToContext' -- is used instead, which also sets the context relevance to 'Irrelevant'. -- This is not the right thing to do when type checking interactively in a -- hole since it also marks all metas created during type checking as -- irrelevant (issue #2568). wakeIrrelevantVars :: (MonadTCEnv tcm) => tcm a -> tcm a wakeIrrelevantVars = applyRelevanceToContextOnly Irrelevant . applyQuantityToContextOnly Quantity0 -- | Check whether something can be used in a position of the given relevance. -- -- This is a substitute for double-checking that only makes sure -- relevances are correct. See issue #2640. -- -- Used in unifier (@ unifyStep Solution{}@). -- -- At the moment, this implements McBride-style irrelevance, -- where Pfenning-style would be the most accurate thing. -- However, these two notions only differ how they handle -- bound variables in a term. Here, we are only concerned -- in the free variables, used meta-variables, and used -- (irrelevant) definitions. -- class UsableRelevance a where usableRel :: Relevance -> a -> TCM Bool instance UsableRelevance Term where usableRel rel u = case u of Var i vs -> do irel <- getRelevance <$> typeOfBV' i let ok = irel `moreRelevant` rel reportSDoc "tc.irr" 50 $ "Variable" <+> prettyTCM (var i) <+> text ("has relevance " ++ show irel ++ ", which is " ++ (if ok then "" else "NOT ") ++ "more relevant than " ++ show rel) return ok `and2M` usableRel rel vs Def f vs -> do frel <- relOfConst f return (frel `moreRelevant` rel) `and2M` usableRel rel vs Con c _ vs -> usableRel rel vs Lit l -> return True Lam _ v -> usableRel rel v Pi a b -> usableRel rel (a,b) Sort s -> usableRel rel s Level l -> return True MetaV m vs -> do mrel <- getMetaRelevance <$> lookupMeta m return (mrel `moreRelevant` rel) `and2M` usableRel rel vs DontCare _ -> return $ isIrrelevant rel Dummy{} -> return True instance UsableRelevance a => UsableRelevance (Type' a) where usableRel rel (El _ t) = usableRel rel t instance UsableRelevance Sort where usableRel rel s = case s of Type l -> usableRel rel l Prop l -> usableRel rel l Inf -> return True SizeUniv -> return True PiSort s1 s2 -> usableRel rel (s1,s2) UnivSort s -> usableRel rel s MetaS x es -> usableRel rel es DefS d es -> usableRel rel $ Def d es DummyS{} -> return True instance UsableRelevance Level where usableRel rel (Max ls) = usableRel rel ls instance UsableRelevance PlusLevel where usableRel rel ClosedLevel{} = return True usableRel rel (Plus _ l) = usableRel rel l instance UsableRelevance LevelAtom where usableRel rel l = case l of MetaLevel m vs -> do mrel <- getMetaRelevance <$> lookupMeta m return (mrel `moreRelevant` rel) `and2M` usableRel rel vs NeutralLevel _ v -> usableRel rel v BlockedLevel _ v -> usableRel rel v UnreducedLevel v -> usableRel rel v instance UsableRelevance a => UsableRelevance [a] where usableRel rel = andM . map (usableRel rel) instance (UsableRelevance a, UsableRelevance b) => UsableRelevance (a,b) where usableRel rel (a,b) = usableRel rel a `and2M` usableRel rel b instance UsableRelevance a => UsableRelevance (Elim' a) where usableRel rel (Apply a) = usableRel rel a usableRel rel (Proj _ p) = do prel <- relOfConst p return $ prel `moreRelevant` rel usableRel rel (IApply x y v) = allM [x,y,v] $ usableRel rel instance UsableRelevance a => UsableRelevance (Arg a) where usableRel rel (Arg info u) = let rel' = getRelevance info in usableRel (rel `composeRelevance` rel') u instance UsableRelevance a => UsableRelevance (Dom a) where usableRel rel Dom{unDom = u} = usableRel rel u instance (Subst t a, UsableRelevance a) => UsableRelevance (Abs a) where usableRel rel abs = underAbstraction_ abs $ \u -> usableRel rel u -- | Check whether something can be used in a position of the given modality. -- -- This is a substitute for double-checking that only makes sure -- modalities are correct. See issue #2640. -- -- Used in unifier (@ unifyStep Solution{}@). -- -- This uses McBride-style modality checking. -- It does not differ from Pfenning-style if we -- are only interested in the modality of the -- free variables, used meta-variables, and used -- definitions. -- class UsableModality a where usableMod :: Modality -> a -> TCM Bool instance UsableModality Term where usableMod mod u = case u of Var i vs -> do imod <- getModality <$> typeOfBV' i let ok = imod `moreUsableModality` mod reportSDoc "tc.irr" 50 $ "Variable" <+> prettyTCM (var i) <+> text ("has modality " ++ show imod ++ ", which is a " ++ (if ok then "" else "NOT ") ++ "more usable modality than " ++ show mod) return ok `and2M` usableMod mod vs Def f vs -> do fmod <- modalityOfConst f let ok = fmod `moreUsableModality` mod reportSDoc "tc.irr" 50 $ "Definition" <+> prettyTCM (Def f []) <+> text ("has modality " ++ show fmod ++ ", which is a " ++ (if ok then "" else "NOT ") ++ "more usable modality than " ++ show mod) return ok `and2M` usableMod mod vs Con c _ vs -> usableMod mod vs Lit l -> return True Lam _ v -> usableMod mod v Pi a b -> usableMod mod (a,b) Sort s -> usableMod mod s Level l -> return True MetaV m vs -> do mmod <- getMetaModality <$> lookupMeta m let ok = mmod `moreUsableModality` mod reportSDoc "tc.irr" 50 $ "Metavariable" <+> prettyTCM (MetaV m []) <+> text ("has modality " ++ show mmod ++ ", which is a " ++ (if ok then "" else "NOT ") ++ "more usable modality than " ++ show mod) return ok `and2M` usableMod mod vs DontCare _ -> return $ isIrrelevant mod Dummy{} -> return True instance UsableRelevance a => UsableModality (Type' a) where usableMod mod (El _ t) = usableRel (getRelevance mod) t instance UsableModality Sort where usableMod mod s = usableRel (getRelevance mod) s -- usableMod mod s = case s of -- Type l -> usableMod mod l -- Prop l -> usableMod mod l -- Inf -> return True -- SizeUniv -> return True -- PiSort s1 s2 -> usableMod mod (s1,s2) -- UnivSort s -> usableMod mod s -- MetaS x es -> usableMod mod es -- DummyS{} -> return True instance UsableModality Level where usableMod mod (Max ls) = usableRel (getRelevance mod) ls -- instance UsableModality PlusLevel where -- usableMod mod ClosedLevel{} = return True -- usableMod mod (Plus _ l) = usableMod mod l -- instance UsableModality LevelAtom where -- usableMod mod l = case l of -- MetaLevel m vs -> do -- mmod <- getMetaModality <$> lookupMeta m -- return (mmod `moreUsableModality` mod) `and2M` usableMod mod vs -- NeutralLevel _ v -> usableMod mod v -- BlockedLevel _ v -> usableMod mod v -- UnreducedLevel v -> usableMod mod v instance UsableModality a => UsableModality [a] where usableMod mod = andM . map (usableMod mod) instance (UsableModality a, UsableModality b) => UsableModality (a,b) where usableMod mod (a,b) = usableMod mod a `and2M` usableMod mod b instance UsableModality a => UsableModality (Elim' a) where usableMod mod (Apply a) = usableMod mod a usableMod mod (Proj _ p) = do pmod <- modalityOfConst p return $ pmod `moreUsableModality` mod usableMod mod (IApply x y v) = allM [x,y,v] $ usableMod mod instance UsableModality a => UsableModality (Arg a) where usableMod mod (Arg info u) = let mod' = getModality info in usableMod (mod `composeModality` mod') u instance UsableModality a => UsableModality (Dom a) where usableMod mod Dom{unDom = u} = usableMod mod u instance (Subst t a, UsableModality a) => UsableModality (Abs a) where usableMod mod abs = underAbstraction_ abs $ \u -> usableMod mod u -- * Propositions -- | Is a type a proposition? (Needs reduction.) isPropM :: (LensSort a, MonadReduce m) => a -> m Bool isPropM a = reduce (getSort a) <&> \case Prop{} -> True _ -> False isIrrelevantOrPropM :: (LensRelevance a, LensSort a, MonadReduce m) => a -> m Bool isIrrelevantOrPropM x = return (isIrrelevant x) `or2M` isPropM x Agda-2.6.0.1/src/full/Agda/TypeChecking/Rewriting.hs-boot0000644000000000000000000000037013466402171021115 0ustar0000000000000000module Agda.TypeChecking.Rewriting where import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base verifyBuiltinRewrite :: Term -> Type -> TCM () rewrite :: Blocked_ -> Term -> RewriteRules -> Elims -> ReduceM (Reduced (Blocked Term) Term) Agda-2.6.0.1/src/full/Agda/TypeChecking/Forcing.hs0000644000000000000000000003253113466402171017575 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-| A constructor argument is forced if it appears as pattern variable in an index of the target. For instance @x@ is forced in @sing@ and @n@ is forced in @zero@ and @suc@: @ data Sing {a}{A : Set a} : A -> Set where sing : (x : A) -> Sing x data Fin : Nat -> Set where zero : (n : Nat) -> Fin (suc n) suc : (n : Nat) (i : Fin n) -> Fin (suc n) @ At runtime, forced constructor arguments may be erased as they can be recovered from dot patterns. For instance, @ unsing : {A : Set} (x : A) -> Sing x -> A unsing .x (sing x) = x @ can become @ unsing x sing = x @ and @ proj : (n : Nat) (i : Fin n) -> Nat proj .(suc n) (zero n) = n proj .(suc n) (suc n i) = n @ becomes @ proj (suc n) zero = n proj (suc n) (suc i) = n @ Forcing is a concept from pattern matching and thus builds on the concept of equality (I) used there (closed terms, extensional) which is different from the equality (II) used in conversion checking and the constraint solver (open terms, intensional). Up to issue 1441 (Feb 2015), the forcing analysis here relied on the wrong equality (II), considering type constructors as injective. This is unsound for program extraction, but ok if forcing is only used to decide which arguments to skip during conversion checking. From now on, forcing uses equality (I) and does not search for forced variables under type constructors. This may lose some savings during conversion checking. If this turns out to be a problem, the old forcing could be brought back, using a new modality @Skip@ to indicate that this is a relevant argument but still can be skipped during conversion checking as it is forced by equality (II). -} module Agda.TypeChecking.Forcing where import Control.Arrow (first, second) import Control.Monad import Control.Monad.Trans.Maybe import Control.Monad.Writer (WriterT(..), tell) import Data.Foldable hiding (any) import Data.Traversable import Data.Semigroup hiding (Arg) import Data.Maybe import Data.List ((\\)) import Data.Function (on) import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.Telescope import Agda.Utils.Function import Agda.Utils.PartialOrd import Agda.Utils.Pretty (prettyShow) import Agda.Utils.List import Agda.Utils.Monad import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Given the type of a constructor (excluding the parameters), -- decide which arguments are forced. -- Precondition: the type is of the form @Γ → D vs@ and the @vs@ -- are in normal form. computeForcingAnnotations :: QName -> Type -> TCM [IsForced] computeForcingAnnotations c t = ifM (not . optForcing <$> commandLineOptions) (return []) $ do -- Andreas, 2015-03-10 Normalization prevents Issue 1454. -- t <- normalise t -- Andreas, 2015-03-28 Issue 1469: Normalization too costly. -- Instantiation also fixes Issue 1454. -- Note that normalization of s0 below does not help. t <- instantiateFull t -- Ulf, 2018-01-28 (#2919): We do need to reduce the target type enough to -- get to the actual data type. -- Also #2947: The type might reduce to a pi type. TelV tel (El _ a) <- telViewPath t let vs = case a of Def _ us -> us _ -> __IMPOSSIBLE__ n = size tel xs = forcedVariables vs -- #2819: We can only mark an argument as forced if it appears in the -- type with a relevance below (i.e. more relevant) than the one of the -- constructor argument. Otherwise we can't actually get the value from -- the type. Also the argument shouldn't be irrelevant, since in that -- case it isn't really forced. isForced m i = getRelevance m /= Irrelevant && any (\ (m', j) -> i == j && related m' POLE m) xs forcedArgs = [ if isForced m i then Forced else NotForced | (i, m) <- zip (downFrom n) $ map getModality (telToList tel) ] reportSLn "tc.force" 60 $ unlines [ "Forcing analysis for " ++ show c , " xs = " ++ show (map snd xs) , " forcedArgs = " ++ show forcedArgs ] return forcedArgs -- | Compute the pattern variables of a term or term-like thing. class ForcedVariables a where forcedVariables :: a -> [(Modality, Nat)] default forcedVariables :: (ForcedVariables b, Foldable t, a ~ t b) => a -> [(Modality, Nat)] forcedVariables = foldMap forcedVariables instance ForcedVariables a => ForcedVariables [a] where -- Note the 'a' does not include the 'Arg' in 'Apply'. instance ForcedVariables a => ForcedVariables (Elim' a) where forcedVariables (Apply x) = forcedVariables x forcedVariables IApply{} = [] -- No forced variables in path applications forcedVariables Proj{} = [] instance ForcedVariables a => ForcedVariables (Arg a) where forcedVariables x = [ (m <> m', i) | (m', i) <- forcedVariables (unArg x) ] where m = getModality x -- | Assumes that the term is in normal form. instance ForcedVariables Term where forcedVariables t = case t of Var i [] -> [(mempty, i)] Con _ _ vs -> forcedVariables vs _ -> [] isForced :: IsForced -> Bool isForced Forced = True isForced NotForced = False nextIsForced :: [IsForced] -> (IsForced, [IsForced]) nextIsForced [] = (NotForced, []) nextIsForced (f:fs) = (f, fs) ----------------------------------------------------------------------------- -- * Forcing translation ----------------------------------------------------------------------------- -- | Move bindings for forced variables to unforced positions. forcingTranslation :: [NamedArg DeBruijnPattern] -> TCM [NamedArg DeBruijnPattern] forcingTranslation ps = do (qs, rebind) <- dotForcedPatterns ps case rebind of Nothing -> return ps Just rebind -> do reportSDoc "tc.force" 50 $ "forcingTranslation" vcat [ "patterns:" pretty ps , "dotted: " pretty qs , "rebind: " pretty rebind ] rs <- foldM rebindForcedPattern qs rebind when (not $ null rebind) $ reportSDoc "tc.force" 50 $ nest 2 $ "result: " pretty rs -- Repeat translation as long as we're making progress (Issue 3410) forcingTranslation rs -- | Applies the forcing translation in order to update modalities of forced -- arguments in the telescope. This is used before checking a right-hand side -- in order to make sure all uses of forced arguments agree with the -- relevance of the position where the variable will ultimately be bound. -- Precondition: the telescope types the bound variables of the patterns. forceTranslateTelescope :: Telescope -> [NamedArg DeBruijnPattern] -> TCM Telescope forceTranslateTelescope delta qs = do qs' <- forcingTranslation qs let xms = patternVarModalities qs xms' = patternVarModalities qs' old = xms \\ xms' new = xms' \\ xms if null new then return delta else do reportSLn "tc.force" 40 $ "Updating modalities of forced arguments\n" ++ " from: " ++ show old ++ "\n" ++ " to: " ++ show new let mods = map (first dbPatVarIndex) new ms = map (`lookup` mods) $ downFrom $ size delta delta' = telFromList $ zipWith (maybe id setModality) ms $ telToList delta reportSDoc "tc.force" 60 $ nest 2 $ "delta' =" prettyTCM delta' return delta' -- | Rebind a forced pattern in a non-forced position. The forced pattern has -- already been dotted by 'dotForcedPatterns', so the remaining task is to -- find a dot pattern in an unforced position that can be turned into a -- proper match of the forced pattern. -- -- For instance (with patterns prettified to ease readability): -- -- rebindForcedPattern [.(suc n), cons .n x xs] n = [suc n, cons .n x xs] -- rebindForcedPattern :: [NamedArg DeBruijnPattern] -> DeBruijnPattern -> TCM [NamedArg DeBruijnPattern] rebindForcedPattern ps toRebind = do reportSDoc "tc.force" 50 $ hsep ["rebinding", pretty toRebind, "in"] pretty ps ps' <- go $ zip (repeat NotForced) ps reportSDoc "tc.force" 50 $ nest 2 $ hsep ["result:", pretty ps'] return ps' where targetDotP = patternToTerm toRebind go [] = __IMPOSSIBLE__ -- unforcing cannot fail go ((Forced, p) : ps) = (p :) <$> go ps go ((NotForced, p) : ps) | namedArg p `rebinds` toRebind = return $ p : map snd ps go ((NotForced, p) : ps) = -- (#3544) A previous rebinding might have already rebound our pattern case namedArg p of VarP{} -> (p :) <$> go ps DotP _ v -> mkPat v >>= \ case Nothing -> (p :) <$> go ps Just q' -> return $ fmap (q' <$) p : map snd ps ConP c i qs -> do fqs <- withForced c qs qps <- go (fqs ++ ps) let (qs', ps') = splitAt (length qs) qps return $ fmap (ConP c i qs' <$) p : ps' DefP o q qs -> do fs <- defForced <$> getConstInfo q fqs <- return $ zip (fs ++ repeat NotForced) qs qps <- go (fqs ++ ps) let (qs', ps') = splitAt (length qs) qps return $ fmap (DefP o q qs' <$) p : ps' LitP{} -> (p :) <$> go ps ProjP{} -> (p :) <$> go ps IApplyP{} -> (p :) <$> go ps withForced :: ConHead -> [a] -> TCM [(IsForced, a)] withForced c qs = do fs <- defForced <$> getConstInfo (conName c) return $ zip (fs ++ repeat NotForced) qs -- Try to turn a term in a dot pattern into a pattern matching q mkPat :: Term -> TCM (Maybe DeBruijnPattern) mkPat v = mkPat' (NotForced, v) mkPat' :: (IsForced, Term) -> TCM (Maybe DeBruijnPattern) mkPat' (Forced, _) = return Nothing mkPat' (NotForced, v) | targetDotP == v = return (Just toRebind) mkPat' (NotForced, v) = case v of Con c co es -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es fvs <- withForced c vs let fvs' = [ (f,) <$> a | (f, a) <- fvs ] :: [Arg (IsForced, Term)] -- It takes a bit of juggling to apply mkPat' under the the 'Arg's, but since it -- type checks, it's pretty much guaranteed to be the right thing. mps :: [Maybe (Arg DeBruijnPattern)] <- mapM (runMaybeT . traverse (MaybeT . mkPat')) fvs' case break (isJust . snd) (zip vs mps) of (mvs1, (_, Just p) : mvs2) -> do let vs1 = map fst mvs1 vs2 = map fst mvs2 ci = (toConPatternInfo co) { conPLazy = True } dots = (map . fmap) dotP return $ Just $ ConP c ci $ doname $ dots vs1 ++ [p] ++ dots vs2 _ -> return Nothing _ -> return Nothing where doname = (map . fmap) unnamed -- | Check if the first pattern rebinds the second pattern. Almost equality, -- but allows the first pattern to have a variable where the second pattern -- has a dot pattern. Used to fix #3544. rebinds :: DeBruijnPattern -> DeBruijnPattern -> Bool VarP{} `rebinds` DotP{} = True VarP _ x `rebinds` VarP _ y = dbPatVarIndex x == dbPatVarIndex y DotP _ u `rebinds` DotP _ v = u == v ConP c _ ps `rebinds` ConP c' _ qs = c == c' && and (zipWith (rebinds `on` namedArg) ps qs) LitP l `rebinds` LitP l' = l == l' ProjP _ f `rebinds` ProjP _ g = f == g IApplyP _ u v x `rebinds` IApplyP _ u' v' y = u == u' && v == v' && x == y DefP _ f ps `rebinds` DefP _ g qs = f == g && and (zipWith (rebinds `on` namedArg) ps qs) _ `rebinds` _ = False -- | Dot all forced patterns and return a list of patterns that need to be -- undotted elsewhere. Patterns that need to be undotted are those that bind -- variables or does some actual (non-eta) matching. dotForcedPatterns :: [NamedArg DeBruijnPattern] -> TCM ([NamedArg DeBruijnPattern], Maybe [DeBruijnPattern]) dotForcedPatterns ps = runWriterT $ (traverse . traverse . traverse) (forced NotForced) ps where forced :: IsForced -> DeBruijnPattern -> WriterT (Maybe [DeBruijnPattern]) TCM DeBruijnPattern forced f p = case p of DotP{} -> return p ProjP{} -> return p _ | f == Forced -> do properMatch <- isProperMatch p dotP (patternToTerm p) <$ tell (Just [p | properMatch || length p > 0]) VarP{} -> return p LitP{} -> return p ConP c i ps -> do fs <- defForced <$> getConstInfo (conName c) ConP c i <$> zipWithM forcedArg (fs ++ repeat NotForced) ps DefP o q ps -> do fs <- defForced <$> getConstInfo q DefP o q <$> zipWithM forcedArg (fs ++ repeat NotForced) ps IApplyP{} -> return p forcedArg f = (traverse . traverse) (forced f) isProperMatch LitP{} = return True isProperMatch IApplyP{} = return False isProperMatch VarP{} = return False isProperMatch ProjP{} = return False isProperMatch DotP{} = return False isProperMatch (ConP c i ps) = ifM (isEtaCon $ conName c) (anyM ps (isProperMatch . namedArg)) (return True) isProperMatch DefP{} = return True -- Andrea, TODO check semantics Agda-2.6.0.1/src/full/Agda/TypeChecking/EtaContract.hs0000644000000000000000000001131013466402171020405 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Compute eta short normal forms. module Agda.TypeChecking.EtaContract where import Control.Monad.Reader import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce.Monad () import {-# SOURCE #-} Agda.TypeChecking.Records import {-# SOURCE #-} Agda.TypeChecking.Datatypes import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible -- TODO: move to Agda.Syntax.Internal.SomeThing data BinAppView = App Term (Arg Term) | NoApp Term binAppView :: Term -> BinAppView binAppView t = case t of Var i xs -> appE (Var i) xs Def c xs -> appE (Def c) xs -- Andreas, 2013-09-17: do not eta-contract when body is (record) constructor -- like in \ x -> s , x! (See interaction/DoNotEtaContractFunIntoRecord) -- (Cf. also issue 889 (fixed differently).) -- At least record constructors should be fully applied where possible! -- TODO: also for ordinary constructors (\ x -> suc x vs. suc)? Con c ci xs | null (conFields c) -> appE (Con c ci) xs | otherwise -> noApp Lit _ -> noApp Level _ -> noApp -- could be an application, but let's not eta contract levels Lam _ _ -> noApp Pi _ _ -> noApp Sort _ -> noApp MetaV _ _ -> noApp DontCare _ -> noApp Dummy{} -> __IMPOSSIBLE__ where noApp = NoApp t app f [] = noApp app f xs = App (f $ init xs) (last xs) appE f [] = noApp appE f xs | Apply v <- last xs = App (f $ init xs) v | otherwise = noApp -- | Contracts all eta-redexes it sees without reducing. {-# SPECIALIZE etaContract :: TermLike a => a -> TCM a #-} {-# SPECIALIZE etaContract :: TermLike a => a -> ReduceM a #-} etaContract :: (MonadTCEnv m, HasConstInfo m, HasOptions m, TermLike a) => a -> m a etaContract = traverseTermM etaOnce {-# SPECIALIZE etaOnce :: Term -> TCM Term #-} {-# SPECIALIZE etaOnce :: Term -> ReduceM Term #-} etaOnce :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => Term -> m Term etaOnce v = case v of -- Andreas, 2012-11-18: this call to reportSDoc seems to cost me 2% -- performance on the std-lib -- reportSDoc "tc.eta" 70 $ "eta-contracting" <+> prettyTCM v Lam i (Abs x b) -> etaLam i x b -- NoAbs can't be eta'd -- Andreas, 2012-12-18: Abstract definitions could contain -- abstract records whose constructors are not in scope. -- To be able to eta-contract them, we ignore abstract. Con c ci es -> do etaCon c ci es etaContractRecord v -> return v -- | If record constructor, call eta-contraction function. etaCon :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => ConHead -- ^ Constructor name @c@. -> ConInfo -- ^ Constructor info @ci@. -> Elims -- ^ Constructor arguments @args@. -> (QName -> ConHead -> ConInfo -> Args -> m Term) -- ^ Eta-contraction workhorse, gets also name of record type. -> m Term -- ^ Returns @Con c ci args@ or its eta-contraction. etaCon c ci es cont = ignoreAbstractMode $ do let fallback = return $ Con c ci $ es -- reportSDoc "tc.eta" 20 $ "eta-contracting record" <+> prettyTCM t r <- getConstructorData $ conName c -- fails in ConcreteMode if c is abstract ifNotM (isEtaRecord r) fallback $ {-else-} do -- reportSDoc "tc.eta" 20 $ "eta-contracting record" <+> prettyTCM t let Just args = allApplyElims es cont r c ci args -- | Try to contract a lambda-abstraction @Lam i (Abs x b)@. etaLam :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => ArgInfo -- ^ Info @i@ of the 'Lam'. -> ArgName -- ^ Name @x@ of the abstraction. -> Term -- ^ Body ('Term') @b@ of the 'Abs'. -> m Term -- ^ @Lam i (Abs x b)@, eta-contracted if possible. etaLam i x b = do let fallback = return $ Lam i $ Abs x b case binAppView b of App u (Arg info v) -> do tyty <- typeInType if isVar0 tyty v -- Andreas, 2017-02-20 issue #2464 -- Contracting with any irrelevant argument breaks subject reduction. -- E.g. \ .x -> f .(subst P eq x) can in general not be contracted to f. -- -- (isIrrelevant info || isVar0 tyty v) && sameHiding i info && not (freeIn 0 u) then return $ strengthen __IMPOSSIBLE__ u else fallback _ -> fallback where isVar0 _ (Var 0 []) = True -- Andreas, 2016-01-08 If --type-in-type, all levels are equal. isVar0 True Level{} = True isVar0 tyty (Level (Max [Plus 0 l])) = case l of NeutralLevel _ v -> isVar0 tyty v UnreducedLevel v -> isVar0 tyty v BlockedLevel{} -> False MetaLevel{} -> False isVar0 _ _ = False Agda-2.6.0.1/src/full/Agda/TypeChecking/Implicit.hs0000644000000000000000000001511713466402171017761 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE PatternSynonyms #-} {-| Functions for inserting implicit arguments at the right places. -} module Agda.TypeChecking.Implicit where import Control.Monad import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.TypeChecking.Irrelevance import {-# SOURCE #-} Agda.TypeChecking.MetaVars import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Pretty import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | @implicitArgs n expand t@ generates up to @n@ implicit arguments -- metas (unbounded if @n<0@), as long as @t@ is a function type -- and @expand@ holds on the hiding info of its domain. implicitArgs :: Int -- ^ @n@, the maximum number of implicts to be inserted. -> (Hiding -> Bool) -- ^ @expand@, the predicate to test whether we should keep inserting. -> Type -- ^ The (function) type @t@ we are eliminating. -> TCM (Args, Type) -- ^ The eliminating arguments and the remaining type. implicitArgs n expand t = mapFst (map (fmap namedThing)) <$> do implicitNamedArgs n (\ h x -> expand h) t -- | @implicitNamedArgs n expand t@ generates up to @n@ named implicit arguments -- metas (unbounded if @n<0@), as long as @t@ is a function type -- and @expand@ holds on the hiding and name info of its domain. implicitNamedArgs :: Int -- ^ @n@, the maximum number of implicts to be inserted. -> (Hiding -> ArgName -> Bool) -- ^ @expand@, the predicate to test whether we should keep inserting. -> Type -- ^ The (function) type @t@ we are eliminating. -> TCM (NamedArgs, Type) -- ^ The eliminating arguments and the remaining type. implicitNamedArgs 0 expand t0 = return ([], t0) implicitNamedArgs n expand t0 = do t0' <- reduce t0 reportSDoc "tc.term.args" 30 $ "implicitNamedArgs" <+> prettyTCM t0' reportSDoc "tc.term.args" 80 $ "implicitNamedArgs" <+> text (show t0') case unEl t0' of Pi Dom{domInfo = info, domName = name, unDom = a} b | let x = maybe "_" rangedThing name, expand (getHiding info) x -> do info' <- if hidden info then return info else do reportSDoc "tc.term.args.ifs" 15 $ "inserting instance meta for type" <+> prettyTCM a reportSDoc "tc.term.args.ifs" 40 $ nest 2 $ vcat [ "x = " <+> text (show x) , "hiding = " <+> text (show $ getHiding info) ] return $ makeInstance info (_, v) <- newMetaArg info' x a let narg = Arg info (Named (Just $ unranged x) v) mapFst (narg :) <$> implicitNamedArgs (n-1) expand (absApp b v) _ -> return ([], t0') -- | Create a metavariable according to the 'Hiding' info. newMetaArg :: ArgInfo -- ^ Kind/relevance of meta. -> ArgName -- ^ Name suggestion for meta. -> Type -- ^ Type of meta. -> TCM (MetaId, Term) -- ^ The created meta as id and as term. newMetaArg info x a = do applyModalityToContext info $ newMeta (getHiding info) (argNameToString x) a where newMeta :: Hiding -> String -> Type -> TCM (MetaId, Term) newMeta Instance{} = newInstanceMeta newMeta Hidden = newNamedValueMeta RunMetaOccursCheck newMeta NotHidden = newNamedValueMeta RunMetaOccursCheck -- | Create a questionmark according to the 'Hiding' info. newInteractionMetaArg :: ArgInfo -- ^ Kind/relevance of meta. -> ArgName -- ^ Name suggestion for meta. -> Type -- ^ Type of meta. -> TCM (MetaId, Term) -- ^ The created meta as id and as term. newInteractionMetaArg info x a = do applyModalityToContext info $ newMeta (getHiding info) (argNameToString x) a where newMeta :: Hiding -> String -> Type -> TCM (MetaId, Term) newMeta Instance{} = newInstanceMeta newMeta Hidden = newNamedValueMeta' RunMetaOccursCheck newMeta NotHidden = newNamedValueMeta' RunMetaOccursCheck --------------------------------------------------------------------------- -- | Possible results of 'insertImplicit'. data ImplicitInsertion = ImpInsert [Hiding] -- ^ Success: this many implicits have to be inserted (list can be empty). | BadImplicits -- ^ Error: hidden argument where there should have been a non-hidden argument. | NoSuchName ArgName -- ^ Error: bad named argument. deriving (Show) pattern NoInsertNeeded :: ImplicitInsertion pattern NoInsertNeeded = ImpInsert [] -- | If the next given argument is @a@ and the expected arguments are @ts@ -- @insertImplicit' a ts@ returns the prefix of @ts@ that precedes @a@. -- -- If @a@ is named but this name does not appear in @ts@, the 'NoSuchName' exception is thrown. -- insertImplicit :: NamedArg e -- ^ Next given argument @a@. -> [Dom a] -- ^ Expected arguments @ts@. -> ImplicitInsertion insertImplicit a doms = insertImplicit' a $ map name doms where name dom = x <$ argFromDom dom where x = maybe "_" rangedThing $ domName dom -- | If the next given argument is @a@ and the expected arguments are @ts@ -- @insertImplicit' a ts@ returns the prefix of @ts@ that precedes @a@. -- -- If @a@ is named but this name does not appear in @ts@, the 'NoSuchName' exception is thrown. -- insertImplicit' :: NamedArg e -- ^ Next given argument @a@. -> [Arg ArgName] -- ^ Expected arguments @ts@. -> ImplicitInsertion insertImplicit' _ [] = BadImplicits insertImplicit' a ts -- If @a@ is visible, then take the non-visible prefix of @ts@. | visible a = ImpInsert $ takeWhile notVisible $ map getHiding ts -- If @a@ is named, take prefix of @ts@ until the name of @a@ (with correct hiding). -- If the name is not found, throw exception 'NoSuchName'. | Just x <- rangedThing <$> nameOf (unArg a) = maybe (NoSuchName x) ImpInsert $ takeHiddenUntil (\ t -> x == unArg t && sameHiding a t) ts -- If @a@ is neither visible nor named, take prefix of @ts@ with different hiding than @a@. | otherwise = maybe BadImplicits ImpInsert $ takeHiddenUntil (sameHiding a) ts where -- | @takeHiddenUntil p ts@ returns the 'getHiding' of the prefix of @ts@ -- until @p@ holds or a visible argument is encountered. -- If @p@ never holds, 'Nothing' is returned. -- -- Precondition: @p@ should imply @not . visible@. takeHiddenUntil :: (Arg ArgName -> Bool) -> [Arg ArgName] -> Maybe [Hiding] takeHiddenUntil p ts = case ts2 of [] -> Nothing -- Predicate was never true (t : _) -> if visible t then Nothing else Just $ map getHiding ts1 where (ts1, ts2) = break (\ t -> p t || visible t) ts Agda-2.6.0.1/src/full/Agda/TypeChecking/Inlining.hs0000644000000000000000000000213513466402171017752 0ustar0000000000000000-- | Logic for deciding which functions should be automatically inlined. module Agda.TypeChecking.Inlining (autoInline) where import qualified Data.IntMap as IntMap import Agda.Interaction.Options import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Free import Agda.Utils.Lens -- | Mark a definition to be inlined if it satisfies the inlining criterion. autoInline :: Defn -> TCM Defn autoInline defn = do inlining <- optAutoInline <$> pragmaOptions if | inlining, shouldInline defn -> return $ set funInline True defn | otherwise -> return defn shouldInline :: Defn -> Bool shouldInline Function{funCompiled = Just cc} = shouldInline' cc shouldInline _ = False -- Only auto-inline simple definitions (no pattern matching) where no variable -- is used more than once, and some variables are not used at all. shouldInline' :: CompiledClauses -> Bool shouldInline' (Done xs body) = all (< 2) counts && length counts < length xs where counts = IntMap.elems $ varCounts $ freeVars body shouldInline' _ = False Agda-2.6.0.1/src/full/Agda/TypeChecking/LevelConstraints.hs0000644000000000000000000000506213466402171021504 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.LevelConstraints ( simplifyLevelConstraint ) where import qualified Data.List as List import Data.Maybe import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.Utils.Impossible #include "undefined.h" -- | @simplifyLevelConstraint c cs@ turns an @c@ into an equality -- constraint if it is an inequality constraint and the reverse -- inequality is contained in @cs@. -- -- The constraints doesn't necessarily have to live in the same context, but -- they do need to be universally quanitfied over the context. This function -- takes care of renaming variables when checking for matches. simplifyLevelConstraint :: Constraint -> [Constraint] -> [Constraint] simplifyLevelConstraint new old = case inequalities new of Just eqs -> map simpl eqs Nothing -> [new] where simpl (a :=< b) | any (matchLeq (b :=< a)) leqs = LevelCmp CmpEq (Max [a]) (Max [b]) | otherwise = LevelCmp CmpLeq (Max [a]) (Max [b]) leqs = concat $ mapMaybe inequalities old data Leq = PlusLevel :=< PlusLevel deriving (Show, Eq) -- | Check if two inequality constraints are the same up to variable renaming. matchLeq :: Leq -> Leq -> Bool matchLeq (a :=< b) (c :=< d) | length xs == length ys = (a, b) == applySubst rho (c, d) | otherwise = False where free :: Free a => a -> [Int] free = List.nub . runFree (:[]) IgnoreNot -- Note: use a list to preserve order of variables xs = free (a, b) ys = free (c, d) rho = mkSub $ List.sort $ zip ys xs mkSub = go 0 where go _ [] = IdS go y ren0@((y', x) : ren) | y == y' = Var x [] :# go (y + 1) ren | otherwise = Strengthen __IMPOSSIBLE__ $ go (y + 1) ren0 -- | Turn a level constraint into a list of level inequalities, if possible. inequalities :: Constraint -> Maybe [Leq] inequalities (LevelCmp CmpLeq (Max as) (Max [b])) = Just $ map (:=< b) as -- Andreas, 2016-09-28 -- Why was this most natural case missing? -- See test/Succeed/LevelLeqGeq.agda for where it is useful! -- These are very special cases only, in no way complete: inequalities (LevelCmp CmpEq (Max as) (Max [b])) = case break (== b) as of (as0, _ : as1) -> Just [ a :=< b | a <- as0 ++ as1 ] _ -> Nothing inequalities (LevelCmp CmpEq (Max [b]) (Max as)) = case break (== b) as of (as0, _ : as1) -> Just [ a :=< b | a <- as0 ++ as1 ] _ -> Nothing inequalities _ = Nothing Agda-2.6.0.1/src/full/Agda/TypeChecking/Datatypes.hs-boot0000644000000000000000000000043313466402171021101 0ustar0000000000000000 module Agda.TypeChecking.Datatypes where import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Signature import Agda.Syntax.Internal getConHead :: HasConstInfo m => QName -> m (Either SigError ConHead) getConstructorData :: HasConstInfo m => QName -> m QName Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes.hs0000644000000000000000000006655213466402171020323 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.SizedTypes where import Prelude hiding (null) import Control.Monad.Writer import qualified Data.Foldable as Fold import qualified Data.List as List import qualified Data.Map as Map import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import {-# SOURCE #-} Agda.TypeChecking.MetaVars import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import {-# SOURCE #-} Agda.TypeChecking.Conversion import {-# SOURCE #-} Agda.TypeChecking.Constraints import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.List as List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Pretty (Pretty) import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.Tuple import qualified Agda.Utils.Pretty as P import qualified Agda.Utils.Warshall as W #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- * SIZELT stuff ------------------------------------------------------------------------ -- | Check whether a type is either not a SIZELT or a SIZELT that is non-empty. checkSizeLtSat :: Term -> TCM () checkSizeLtSat t = whenM haveSizeLt $ do reportSDoc "tc.size" 10 $ do tel <- getContextTelescope sep [ "checking that " <+> prettyTCM t <+> " is not an empty type of sizes" , if null tel then empty else do "in context " <+> inTopContext (prettyTCM tel) ] reportSLn "tc.size" 60 $ "- raw type = " ++ show t let postpone :: Term -> TCM () postpone t = do reportSDoc "tc.size.lt" 20 $ sep [ "- postponing `not empty type of sizes' check for " <+> prettyTCM t ] addConstraint $ CheckSizeLtSat t let ok :: TCM () ok = reportSLn "tc.size.lt" 20 $ "- succeeded: not an empty type of sizes" ifBlocked t (const postpone) $ \ _ t -> do reportSLn "tc.size.lt" 20 $ "- type is not blocked" caseMaybeM (isSizeType t) ok $ \ b -> do reportSLn "tc.size.lt" 20 $ " - type is a size type" case b of BoundedNo -> ok BoundedLt b -> do reportSDoc "tc.size.lt" 20 $ " - type is SIZELT" <+> prettyTCM b ifBlocked b (\ _ _ -> postpone t) $ \ _ b -> do reportSLn "tc.size.lt" 20 $ " - size bound is not blocked" catchConstraint (CheckSizeLtSat t) $ do unlessM (checkSizeNeverZero b) $ do typeError . GenericDocError =<< do "Possibly empty type of sizes " <+> prettyTCM t -- | Precondition: Term is reduced and not blocked. -- Throws a 'patternViolation' if undecided checkSizeNeverZero :: Term -> TCM Bool checkSizeNeverZero u = do v <- sizeView u case v of SizeInf -> return True -- OK, infty is never 0. SizeSuc{} -> return True -- OK, a + 1 is never 0. OtherSize u -> case u of Var i [] -> checkSizeVarNeverZero i -- neutral sizes cannot be guaranteed > 0 _ -> return False -- -- | A size variable is never zero if it is the strict upper bound of -- -- some other size variable in context. -- -- Eg. @i : Size, j : Size< i@ |- i is never zero. -- -- Throws a 'patternViolation' if undecided. -- checkSizeVarNeverZero :: Int -> TCM Bool -- checkSizeVarNeverZero i = do -- -- Looking for a variable j : Size< i, we can restrict to the last i -- -- entries, as this variable necessarily has been defined later than i. -- doms <- take i <$> getContext -- -- We raise each type to make sense in the current context. -- let ts = zipWith raise [1..] $ map (snd . unDom) doms -- reportSDoc "tc.size" 15 $ sep -- [ "checking that size " <+> prettyTCM (var i) <+> " is never 0" -- , "in context " <+> do sep $ map prettyTCM ts -- ] -- foldr f (return False) ts -- where -- f t cont = do -- -- If we encounter a blocked type in the context, we cannot -- -- definitely say no. -- let yes = return True -- no = cont -- perhaps = cont >>= \ res -> if res then return res else patternViolation -- ifBlockedType t (\ _ _ -> perhaps) $ \ t -> do -- caseMaybeM (isSizeType t) no $ \ b -> do -- case b of -- BoundedNo -> no -- BoundedLt u -> ifBlocked u (\ _ _ -> perhaps) $ \ u -> do -- case u of -- Var i' [] | i == i' -> yes -- _ -> no -- | Checks that a size variable is ensured to be @> 0@. -- E.g. variable @i@ cannot be zero in context -- @(i : Size) (j : Size< ↑ ↑ i) (k : Size< j) (k' : Size< k)@. -- Throws a 'patternViolation' if undecided. checkSizeVarNeverZero :: Int -> TCM Bool checkSizeVarNeverZero i = do reportSDoc "tc.size" 20 $ "checkSizeVarNeverZero" <+> prettyTCM (var i) -- Looking for the minimal value for size variable i, -- we can restrict to the last i -- entries, as only these can contain i in an upper bound. ts <- map (snd . unDom) . take i <$> getContext -- If we encountered a blocking meta in the context, we cannot -- say ``no'' for sure. (n, Any meta) <- runWriterT $ minSizeValAux ts $ repeat 0 if n > 0 then return True else if meta then patternViolation else return False where -- Compute the least valuation for size context ts above the -- given valuation and return its last value. minSizeValAux :: [Type] -> [Int] -> WriterT Any TCM Int minSizeValAux _ [] = __IMPOSSIBLE__ minSizeValAux [] (n : _) = return n minSizeValAux (t : ts) (n : ns) = do reportSDoc "tc.size" 60 $ text ("minSizeVal (n:ns) = " ++ show (take (length ts + 2) $ n:ns) ++ " t =") <+> (text . show) t -- prettyTCM t -- Wrong context! -- n is the min. value for variable 0 which has type t. let cont = minSizeValAux ts ns perhaps = tell (Any True) >> cont -- If we encounter a blocked type in the context, we cannot -- give a definite answer. ifBlockedType t (\ _ _ -> perhaps) $ \ _ t -> do caseMaybeM (liftTCM $ isSizeType t) cont $ \ b -> do case b of BoundedNo -> cont BoundedLt u -> ifBlocked u (\ _ _ -> perhaps) $ \ _ u -> do reportSLn "tc.size" 60 $ "minSizeVal upper bound u = " ++ show u v <- liftTCM $ deepSizeView u case v of -- Variable 0 has bound @(< j + m)@ -- meaning that @minval(j) > n - m@, i.e., @minval(j) >= n+1-m@. -- Thus, we update the min value for @j@ with function @(max (n+1-m))@. DSizeVar j m -> do reportSLn "tc.size" 60 $ "minSizeVal upper bound v = " ++ show v let ns' = List.updateAt j (max $ n+1-m) ns reportSLn "tc.size" 60 $ "minSizeVal ns' = " ++ show (take (length ts + 1) ns') minSizeValAux ts ns' DSizeMeta{} -> perhaps _ -> cont -- | Check whether a variable in the context is bounded by a size expression. -- If @x : Size< a@, then @a@ is returned. isBounded :: MonadTCM tcm => Nat -> tcm BoundedSize isBounded i = liftTCM $ do t <- reduce =<< typeOfBV i case unEl t of Def x [Apply u] -> do sizelt <- getBuiltin' builtinSizeLt return $ if (Just (Def x []) == sizelt) then BoundedLt $ unArg u else BoundedNo _ -> return BoundedNo -- | Whenever we create a bounded size meta, add a constraint -- expressing the bound. -- In @boundedSizeMetaHook v tel a@, @tel@ includes the current context. boundedSizeMetaHook :: Term -> Telescope -> Type -> TCM () boundedSizeMetaHook v tel0 a = do res <- isSizeType a case res of Just (BoundedLt u) -> do n <- getContextSize let tel | n > 0 = telFromList $ drop n $ telToList tel0 | otherwise = tel0 addContext tel $ do v <- sizeSuc 1 $ raise (size tel) v `apply` teleArgs tel -- compareSizes CmpLeq v u size <- sizeType addConstraint $ ValueCmp CmpLeq size v u _ -> return () -- | @trySizeUniv cmp t m n x els1 y els2@ -- is called as a last resort when conversion checking @m `cmp` n : t@ -- failed for definitions @m = x els1@ and @n = y els2@, -- where the heads @x@ and @y@ are not equal. -- -- @trySizeUniv@ accounts for subtyping between SIZELT and SIZE, -- like @Size< i =< Size@. -- -- If it does not succeed it reports failure of conversion check. trySizeUniv :: Comparison -> Type -> Term -> Term -> QName -> Elims -> QName -> Elims -> TCM () trySizeUniv cmp t m n x els1 y els2 = do let failure = typeError $ UnequalTerms cmp m n t forceInfty u = compareSizes CmpEq (unArg u) =<< primSizeInf -- Get the SIZE built-ins. (size, sizelt) <- flip catchError (const failure) $ do Def size _ <- primSize Def sizelt _ <- primSizeLt return (size, sizelt) case (cmp, els1, els2) of -- Case @Size< _ <= Size@: true. (CmpLeq, [_], []) | x == sizelt && y == size -> return () -- Case @Size< u = Size@: forces @u = ∞@. (_, [Apply u], []) | x == sizelt && y == size -> forceInfty u (_, [], [Apply u]) | x == size && y == sizelt -> forceInfty u -- This covers all cases for SIZE and SIZELT. -- The remaining case is for @x@ and @y@ which are not size built-ins. _ -> failure ------------------------------------------------------------------------ -- * Size views that 'reduce'. ------------------------------------------------------------------------ -- | Compute the deep size view of a term. -- Precondition: sized types are enabled. deepSizeView :: Term -> TCM DeepSizeView deepSizeView v = do Def inf [] <- primSizeInf Def suc [] <- primSizeSuc let loop v = do v <- reduce v case v of Def x [] | x == inf -> return $ DSizeInf Def x [Apply u] | x == suc -> sizeViewSuc_ suc <$> loop (unArg u) Var i [] -> return $ DSizeVar i 0 MetaV x us -> return $ DSizeMeta x us 0 _ -> return $ DOtherSize v loop v sizeMaxView :: Term -> TCM SizeMaxView sizeMaxView v = do inf <- getBuiltinDefName builtinSizeInf suc <- getBuiltinDefName builtinSizeSuc max <- getBuiltinDefName builtinSizeMax let loop v = do v <- reduce v case v of Def x [] | Just x == inf -> return $ singleton $ DSizeInf Def x [Apply u] | Just x == suc -> maxViewSuc_ (fromJust suc) <$> loop (unArg u) Def x [Apply u1, Apply u2] | Just x == max -> maxViewMax <$> loop (unArg u1) <*> loop (unArg u2) Var i [] -> return $ singleton $ DSizeVar i 0 MetaV x us -> return $ singleton $ DSizeMeta x us 0 _ -> return $ singleton $ DOtherSize v loop v ------------------------------------------------------------------------ -- * Size comparison that might add constraints. ------------------------------------------------------------------------ -- | Compare two sizes. compareSizes :: Comparison -> Term -> Term -> TCM () compareSizes cmp u v = verboseBracket "tc.conv.size" 10 "compareSizes" $ do reportSDoc "tc.conv.size" 10 $ vcat [ "Comparing sizes" , nest 2 $ sep [ prettyTCM u <+> prettyTCM cmp , prettyTCM v ] ] verboseS "tc.conv.size" 60 $ do u <- reduce u v <- reduce v reportSDoc "tc.conv.size" 60 $ nest 2 $ sep [ pretty u <+> prettyTCM cmp , pretty v ] us <- sizeMaxView u vs <- sizeMaxView v compareMaxViews cmp us vs -- | Compare two sizes in max view. compareMaxViews :: Comparison -> SizeMaxView -> SizeMaxView -> TCM () compareMaxViews cmp us vs = case (cmp, us, vs) of (CmpLeq, _, (DSizeInf :! _)) -> return () (cmp, u:![], v:![]) -> compareSizeViews cmp u v (CmpLeq, us, v:![]) -> Fold.forM_ us $ \ u -> compareSizeViews cmp u v (CmpLeq, us, vs) -> Fold.forM_ us $ \ u -> compareBelowMax u vs (CmpEq, us, vs) -> do compareMaxViews CmpLeq us vs compareMaxViews CmpLeq vs us -- | @compareBelowMax u vs@ checks @u <= max vs@. Precondition: @size vs >= 2@ compareBelowMax :: DeepSizeView -> SizeMaxView -> TCM () compareBelowMax u vs = verboseBracket "tc.conv.size" 45 "compareBelowMax" $ do reportSDoc "tc.conv.size" 45 $ sep [ pretty u , pretty CmpLeq , pretty vs ] -- When trying several alternatives, we do not assign metas -- and also do not produce constraints (see 'giveUp' below). -- Andreas, 2019-03-28, issue #3600. alt (dontAssignMetas $ Fold.foldr1 alt $ fmap (compareSizeViews CmpLeq u) vs) $ do reportSDoc "tc.conv.size" 45 $ vcat [ "compareBelowMax: giving up" ] u <- unDeepSizeView u v <- unMaxView vs size <- sizeType giveUp CmpLeq size u v where alt c1 c2 = c1 `catchError` const c2 compareSizeViews :: Comparison -> DeepSizeView -> DeepSizeView -> TCM () compareSizeViews cmp s1' s2' = do reportSDoc "tc.conv.size" 45 $ hsep [ "compareSizeViews" , pretty s1' , pretty cmp , pretty s2' ] size <- sizeType let (s1, s2) = removeSucs (s1', s2') withUnView cont = do u <- unDeepSizeView s1 v <- unDeepSizeView s2 cont u v failure = withUnView $ \ u v -> typeError $ UnequalTerms cmp u v size continue cmp = withUnView $ compareAtom cmp size case (cmp, s1, s2) of (CmpLeq, _, DSizeInf) -> return () (CmpEq, DSizeInf, DSizeInf) -> return () (CmpEq, DSizeVar{}, DSizeInf) -> failure (_ , DSizeInf, DSizeVar{}) -> failure (_ , DSizeInf, _ ) -> continue CmpEq (CmpLeq, DSizeVar i n, DSizeVar j m) | i == j -> unless (n <= m) failure (CmpLeq, DSizeVar i n, DSizeVar j m) | i /= j -> do res <- isBounded i case res of BoundedNo -> failure BoundedLt u' -> do -- now we have i < u', in the worst case i+1 = u' -- and we want to check i+n <= v v <- unDeepSizeView s2 if n > 0 then do u'' <- sizeSuc (n - 1) u' compareSizes cmp u'' v else compareSizes cmp u' =<< sizeSuc 1 v (CmpLeq, s1, s2) -> withUnView $ \ u v -> do unlessM (trivial u v) $ giveUp CmpLeq size u v (CmpEq, s1, s2) -> continue cmp -- | If 'envAssignMetas' then postpone as constraint, otherwise, fail hard. -- Failing is required if we speculatively test several alternatives. giveUp :: Comparison -> Type -> Term -> Term -> TCM () giveUp cmp size u v = ifM (asksTC envAssignMetas) {-then-} (addConstraint $ ValueCmp CmpLeq size u v) {-else-} (typeError $ UnequalTerms cmp u v size) -- | Checked whether a size constraint is trivial (like @X <= X+1@). trivial :: Term -> Term -> TCM Bool trivial u v = do a@(e , n ) <- oldSizeExpr u b@(e', n') <- oldSizeExpr v let triv = e == e' && n <= n' -- Andreas, 2012-02-24 filtering out more trivial constraints fixes -- test/lib-succeed/SizeInconsistentMeta4.agda reportSDoc "tc.conv.size" 60 $ nest 2 $ sep [ if triv then "trivial constraint" else empty , pretty a <+> "<=" , pretty b ] return triv `catchError` \_ -> return False ------------------------------------------------------------------------ -- * Size constraints. ------------------------------------------------------------------------ -- | Test whether a problem consists only of size constraints. isSizeProblem :: ProblemId -> TCM Bool isSizeProblem pid = andM . map (isSizeConstraint . theConstraint) =<< getConstraintsForProblem pid -- | Test is a constraint speaks about sizes. isSizeConstraint :: Closure Constraint -> TCM Bool isSizeConstraint Closure{ clValue = ValueCmp _ s _ _ } = isJust <$> isSizeType s isSizeConstraint _ = return False -- | Take out all size constraints (DANGER!). takeSizeConstraints :: TCM [Closure Constraint] takeSizeConstraints = do test <- isSizeTypeTest let sizeConstraint :: Closure Constraint -> Bool sizeConstraint cl@Closure{ clValue = ValueCmp CmpLeq s _ _ } | isJust (test $ unEl s) = True sizeConstraint _ = False cs <- filter sizeConstraint . map theConstraint <$> getAllConstraints dropConstraints $ sizeConstraint . theConstraint return cs -- | Find the size constraints. getSizeConstraints :: TCM [Closure Constraint] getSizeConstraints = do test <- isSizeTypeTest let sizeConstraint :: Closure Constraint -> Bool sizeConstraint cl@Closure{ clValue = ValueCmp CmpLeq s _ _ } | isJust (test $ unEl s) = True sizeConstraint _ = False filter sizeConstraint . map theConstraint <$> getAllConstraints -- | Return a list of size metas and their context. getSizeMetas :: Bool -> TCM [(MetaId, Type, Telescope)] getSizeMetas interactionMetas = do test <- isSizeTypeTest catMaybes <$> do getOpenMetas >>= do mapM $ \ m -> do let no = return Nothing mi <- lookupMeta m case mvJudgement mi of _ | BlockedConst{} <- mvInstantiation mi -> no -- Blocked terms should not be touched (#2637, #2881) HasType _ a -> do TelV tel b <- telView a -- b is reduced caseMaybe (test $ unEl b) no $ \ _ -> do let yes = return $ Just (m, a, tel) if interactionMetas then yes else do ifM (isJust <$> isInteractionMeta m) no yes _ -> no {- ROLLED BACK getSizeMetas :: TCM ([(MetaId, Int)], [SizeConstraint]) getSizeMetas = do ms <- getOpenMetas test <- isSizeTypeTest let sizeCon m = do let nothing = return ([], []) mi <- lookupMeta m case mvJudgement mi of HasType _ a -> do TelV tel b <- telView =<< instantiateFull a let noConstr = return ([(m, size tel)], []) case test b of Nothing -> nothing Just BoundedNo -> noConstr Just (BoundedLt u) -> noConstr {- WORKS NOT Just (BoundedLt u) -> flip catchError (const $ noConstr) $ do -- we assume the metavariable is used in an -- extension of its creation context ctxIds <- getContextId let a = SizeMeta m $ take (size tel) $ reverse ctxIds (b, n) <- oldSizeExpr u return ([(m, size tel)], [Leq a (n-1) b]) -} _ -> nothing (mss, css) <- unzip <$> mapM sizeCon ms return (concat mss, concat css) -} ------------------------------------------------------------------------ -- * Size constraint solving. ------------------------------------------------------------------------ -- | Atomic size expressions. data OldSizeExpr = SizeMeta MetaId [Int] -- ^ A size meta applied to de Bruijn indices. | Rigid Int -- ^ A de Bruijn index. deriving (Eq, Show) instance Pretty OldSizeExpr where pretty (SizeMeta m _) = P.text $ "X" ++ show (fromIntegral m :: Int) pretty (Rigid i) = P.text $ "c" ++ show i -- | Size constraints we can solve. data OldSizeConstraint = Leq OldSizeExpr Int OldSizeExpr -- ^ @Leq a +n b@ represents @a =< b + n@. -- @Leq a -n b@ represents @a + n =< b@. deriving (Show) instance Pretty OldSizeConstraint where pretty (Leq a n b) | n == 0 = P.pretty a P.<+> "=<" P.<+> P.pretty b | n > 0 = P.pretty a P.<+> "=<" P.<+> P.pretty b P.<+> "+" P.<+> P.text (show n) | otherwise = P.pretty a P.<+> "+" P.<+> P.text (show (-n)) P.<+> "=<" P.<+> P.pretty b -- | Compute a set of size constraints that all live in the same context -- from constraints over terms of type size that may live in different -- contexts. -- -- cf. 'Agda.TypeChecking.LevelConstraints.simplifyLevelConstraint' oldComputeSizeConstraints :: [Closure Constraint] -> TCM [OldSizeConstraint] oldComputeSizeConstraints [] = return [] -- special case to avoid maximum [] oldComputeSizeConstraints cs = catMaybes <$> mapM oldComputeSizeConstraint leqs where -- get the constraints plus contexts they are defined in gammas = map (envContext . clEnv) cs ls = map clValue cs -- compute the longest context (common water level) ns = map size gammas waterLevel = maximum ns -- lift all constraints to live in the longest context -- (assuming this context is an extension of the shorter ones) -- by raising the de Bruijn indices leqs = zipWith raise (map (waterLevel -) ns) ls -- | Turn a constraint over de Bruijn indices into a size constraint. oldComputeSizeConstraint :: Constraint -> TCM (Maybe OldSizeConstraint) oldComputeSizeConstraint c = case c of ValueCmp CmpLeq _ u v -> do reportSDoc "tc.size.solve" 50 $ sep [ "converting size constraint" , prettyTCM c ] (a, n) <- oldSizeExpr u (b, m) <- oldSizeExpr v return $ Just $ Leq a (m - n) b `catchError` \ err -> case err of PatternErr{} -> return Nothing _ -> throwError err _ -> __IMPOSSIBLE__ -- | Turn a term with de Bruijn indices into a size expression with offset. -- -- Throws a 'patternViolation' if the term isn't a proper size expression. oldSizeExpr :: Term -> TCM (OldSizeExpr, Int) oldSizeExpr u = do u <- reduce u -- Andreas, 2009-02-09. -- This is necessary to surface the solutions of metavariables. reportSDoc "tc.conv.size" 60 $ "oldSizeExpr:" <+> prettyTCM u s <- sizeView u case s of SizeInf -> patternViolation SizeSuc u -> mapSnd (+1) <$> oldSizeExpr u OtherSize u -> case u of Var i [] -> return (Rigid i, 0) MetaV m es | Just xs <- mapM isVar es, fastDistinct xs -> return (SizeMeta m xs, 0) _ -> patternViolation where isVar (Proj{}) = Nothing isVar (IApply _ _ v) = isVar (Apply (defaultArg v)) isVar (Apply v) = case unArg v of Var i [] -> Just i _ -> Nothing -- | Compute list of size metavariables with their arguments -- appearing in a constraint. flexibleVariables :: OldSizeConstraint -> [(MetaId, [Int])] flexibleVariables (Leq a _ b) = flex a ++ flex b where flex (Rigid _) = [] flex (SizeMeta m xs) = [(m, xs)] -- | Convert size constraint into form where each meta is applied -- to indices @0,1,..,n-1@ where @n@ is the arity of that meta. -- -- @X[σ] <= t@ becomes @X[id] <= t[σ^-1]@ -- -- @X[σ] ≤ Y[τ]@ becomes @X[id] ≤ Y[τ[σ^-1]]@ or @X[σ[τ^1]] ≤ Y[id]@ -- whichever is defined. If none is defined, we give up. -- oldCanonicalizeSizeConstraint :: OldSizeConstraint -> Maybe OldSizeConstraint oldCanonicalizeSizeConstraint c@(Leq a n b) = case (a,b) of (Rigid{}, Rigid{}) -> return c (SizeMeta m xs, Rigid i) -> do j <- List.findIndex (==i) xs return $ Leq (SizeMeta m [0..size xs-1]) n (Rigid j) (Rigid i, SizeMeta m xs) -> do j <- List.findIndex (==i) xs return $ Leq (Rigid j) n (SizeMeta m [0..size xs-1]) (SizeMeta m xs, SizeMeta l ys) -- try to invert xs on ys | Just ys' <- mapM (\ y -> List.findIndex (==y) xs) ys -> return $ Leq (SizeMeta m [0..size xs-1]) n (SizeMeta l ys') -- try to invert ys on xs | Just xs' <- mapM (\ x -> List.findIndex (==x) ys) xs -> return $ Leq (SizeMeta m xs') n (SizeMeta l [0..size ys-1]) -- give up | otherwise -> Nothing -- | Main function. -- Uses the old solver for size constraints using "Agda.Utils.Warshall". -- This solver does not smartly use size hypotheses @j : Size< i@. -- It only checks that its computed solution is compatible oldSolveSizeConstraints :: TCM () oldSolveSizeConstraints = whenM haveSizedTypes $ do reportSLn "tc.size.solve" 70 $ "Considering to solve size constraints" cs0 <- getSizeConstraints cs <- oldComputeSizeConstraints cs0 ms <- getSizeMetas True -- get all size metas, also interaction metas when (not (null cs) || not (null ms)) $ do reportSLn "tc.size.solve" 10 $ "Solving size constraints " ++ show cs cs <- return $ mapMaybe oldCanonicalizeSizeConstraint cs reportSLn "tc.size.solve" 10 $ "Canonicalized constraints: " ++ show cs let -- Error for giving up cannotSolve = typeError . GenericDocError =<< vcat ("Cannot solve size constraints" : map prettyTCM cs0) -- Size metas in constraints. metas0 :: [(MetaId, Int)] -- meta id + arity metas0 = List.nub $ map (mapSnd length) $ concatMap flexibleVariables cs -- Unconstrained size metas that do not occur in constraints. metas1 :: [(MetaId, Int)] metas1 = forMaybe ms $ \ (m, _, tel) -> maybe (Just (m, size tel)) (const Nothing) $ lookup m metas0 -- All size metas metas = metas0 ++ metas1 reportSLn "tc.size.solve" 15 $ "Metas: " ++ show metas0 ++ ", " ++ show metas1 verboseS "tc.size.solve" 20 $ -- debug print the type of all size metas forM_ metas $ \ (m, _) -> reportSDoc "tc.size.solve" 20 $ prettyTCM =<< mvJudgement <$> lookupMeta m -- Run the solver. unlessM (oldSolver metas cs) cannotSolve -- Double-checking the solution. -- Andreas, 2012-09-19 -- The returned solution might not be consistent with -- the hypotheses on rigid vars (j : Size< i). -- Thus, we double check that all size constraints -- have been solved correctly. flip catchError (const cannotSolve) $ noConstraints $ forM_ cs0 $ \ cl -> enterClosure cl solveConstraint -- | Old solver for size constraints using "Agda.Utils.Warshall". -- This solver does not smartly use size hypotheses @j : Size< i@. oldSolver :: [(MetaId, Int)] -- ^ Size metas and their arity. -> [OldSizeConstraint] -- ^ Size constraints (in preprocessed form). -> TCM Bool -- ^ Returns @False@ if solver fails. oldSolver metas cs = do let cannotSolve = return False mkFlex (m, ar) = W.NewFlex (fromIntegral m) $ \ i -> fromIntegral i < ar mkConstr (Leq a n b) = W.Arc (mkNode a) n (mkNode b) mkNode (Rigid i) = W.Rigid $ W.RVar i mkNode (SizeMeta m _) = W.Flex $ fromIntegral m -- run the Warshall solver case W.solve $ map mkFlex metas ++ map mkConstr cs of Nothing -> cannotSolve Just sol -> do reportSLn "tc.size.solve" 10 $ "Solved constraints: " ++ show sol suc <- primSizeSuc infty <- primSizeInf let plus v 0 = v plus v n = suc `apply1` plus v (n - 1) inst (i, e) = do let m = fromIntegral i -- meta variable identifier ar = fromMaybe __IMPOSSIBLE__ $ lookup m metas -- meta var arity term (W.SizeConst W.Infinite) = infty term (W.SizeVar j n) | j < ar = plus (var $ ar - j - 1) n term _ = __IMPOSSIBLE__ tel = replicate ar $ defaultArg "s" -- convert size expression to term v = term e reportSDoc "tc.size.solve" 20 $ sep [ pretty m <+> ":=" , nest 2 $ prettyTCM v ] -- Andreas, 2012-09-25: do not assign interaction metas to \infty let isInf (W.SizeConst W.Infinite) = True isInf _ = False unlessM (((isInf e &&) . isJust <$> isInteractionMeta m) `or2M` isFrozen m) $ assignTerm m tel v mapM_ inst $ Map.toList sol return True Agda-2.6.0.1/src/full/Agda/TypeChecking/MetaVars.hs-boot0000644000000000000000000000175413466402171020674 0ustar0000000000000000module Agda.TypeChecking.MetaVars where import Agda.Syntax.Common ( Arg, Dom ) import Agda.Syntax.Internal ( MetaId, Term, Type, Args, Abs, Telescope, Sort ) import Agda.TypeChecking.Monad.Base ( TCM, RunMetaOccursCheck, CompareDirection ) type Condition = Dom Type -> Abs Type -> Bool newArgsMeta' :: Condition -> Type -> TCM Args newArgsMeta :: Type -> TCM Args assignTerm :: MetaId -> [Arg String] -> Term -> TCM () etaExpandMetaSafe :: MetaId -> TCM () assignV :: CompareDirection -> MetaId -> Args -> Term -> TCM () assign :: CompareDirection -> MetaId -> Args -> Term -> TCM () newInstanceMeta :: String -> Type -> TCM (MetaId, Term) newValueMeta :: RunMetaOccursCheck -> Type -> TCM (MetaId, Term) newNamedValueMeta :: RunMetaOccursCheck -> String -> Type -> TCM (MetaId, Term) newNamedValueMeta':: RunMetaOccursCheck -> String -> Type -> TCM (MetaId, Term) newTelMeta :: Telescope -> TCM Args newSortMeta :: TCM Sort Agda-2.6.0.1/src/full/Agda/TypeChecking/Polarity.hs0000644000000000000000000003735713466402171020024 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Polarity where import Control.Monad.State import Data.Maybe import Data.Traversable (traverse) import Agda.Syntax.Abstract.Name import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Datatypes (getNumberOfParameters) import Agda.TypeChecking.Pretty import Agda.TypeChecking.SizedTypes import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Reduce import Agda.TypeChecking.Free hiding (Occurrence(..)) import Agda.TypeChecking.Positivity.Occurrence import Agda.Interaction.Options import Agda.Utils.List import Agda.Utils.Maybe ( whenNothingM ) import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- * Polarity lattice. ------------------------------------------------------------------------ -- | Infimum on the information lattice. -- 'Invariant' is bottom (dominant for inf), -- 'Nonvariant' is top (neutral for inf). (/\) :: Polarity -> Polarity -> Polarity Nonvariant /\ b = b a /\ Nonvariant = a a /\ b | a == b = a | otherwise = Invariant -- | 'Polarity' negation, swapping monotone and antitone. neg :: Polarity -> Polarity neg Covariant = Contravariant neg Contravariant = Covariant neg Invariant = Invariant neg Nonvariant = Nonvariant -- | What is the polarity of a function composition? composePol :: Polarity -> Polarity -> Polarity composePol Nonvariant _ = Nonvariant composePol _ Nonvariant = Nonvariant composePol Invariant _ = Invariant composePol Covariant x = x composePol Contravariant x = neg x polFromOcc :: Occurrence -> Polarity polFromOcc o = case o of GuardPos -> Covariant StrictPos -> Covariant JustPos -> Covariant JustNeg -> Contravariant Mixed -> Invariant Unused -> Nonvariant ------------------------------------------------------------------------ -- * Auxiliary functions ------------------------------------------------------------------------ -- | Get the next polarity from a list, 'Invariant' if empty. nextPolarity :: [Polarity] -> (Polarity, [Polarity]) nextPolarity [] = (Invariant, []) nextPolarity (p : ps) = (p, ps) -- | Replace 'Nonvariant' by 'Covariant'. -- (Arbitrary bias, but better than 'Invariant', see issue 1596). purgeNonvariant :: [Polarity] -> [Polarity] purgeNonvariant = map (\ p -> if p == Nonvariant then Covariant else p) -- | A quick transliterations of occurrences to polarities. polarityFromPositivity :: QName -> TCM () polarityFromPositivity x = inConcreteOrAbstractMode x $ \ def -> do -- Get basic polarity from positivity analysis. let npars = droppedPars def let pol0 = replicate npars Nonvariant ++ map polFromOcc (defArgOccurrences def) reportSLn "tc.polarity.set" 15 $ "Polarity of " ++ prettyShow x ++ " from positivity: " ++ prettyShow pol0 -- set the polarity in the signature (not the final polarity, though) setPolarity x $ drop npars pol0 ------------------------------------------------------------------------ -- * Computing the polarity of a symbol. ------------------------------------------------------------------------ -- | Main function of this module. computePolarity :: [QName] -> TCM () computePolarity xs = do -- Andreas, 2017-04-26, issue #2554 -- First, for mutual definitions, obtain a crude polarity from positivity. when (length xs >= 2) $ mapM_ polarityFromPositivity xs -- Then, refine it. forM_ xs $ \ x -> inConcreteOrAbstractMode x $ \ def -> do reportSLn "tc.polarity.set" 25 $ "Refining polarity of " ++ prettyShow x -- Again: get basic polarity from positivity analysis. let npars = droppedPars def let pol0 = replicate npars Nonvariant ++ map polFromOcc (defArgOccurrences def) reportSLn "tc.polarity.set" 15 $ "Polarity of " ++ prettyShow x ++ " from positivity: " ++ prettyShow pol0 {- -- get basic polarity from shape of def (arguments matched on or not?) def <- getConstInfo x let usagePol = usagePolarity $ theDef def reportSLn "tc.polarity.set" 15 $ "Polarity of " ++ prettyShow x ++ " from definition form: " ++ prettyShow usagePol let n = genericLength usagePol -- n <- getArity x reportSLn "tc.polarity.set" 20 $ " arity = " ++ show n -- refine polarity by positivity information pol0 <- zipWith (/\) usagePol <$> mapM getPol [0..n - 1] reportSLn "tc.polarity.set" 15 $ "Polarity of " ++ prettyShow x ++ " from positivity: " ++ prettyShow pol0 -} -- compute polarity of sized types pol1 <- sizePolarity x pol0 -- refine polarity again by using type information let t = defType def -- Instantiation takes place in Rules.Decl.instantiateDefinitionType -- t <- instantiateFull t -- Andreas, 2014-04-11 Issue 1099: needed for -- -- variable occurrence test in dependentPolarity. reportSDoc "tc.polarity.set" 15 $ "Refining polarity with type " <+> prettyTCM t reportSDoc "tc.polarity.set" 60 $ "Refining polarity with type (raw): " <+> (text .show) t pol <- dependentPolarity t (enablePhantomTypes (theDef def) pol1) pol1 reportSLn "tc.polarity.set" 10 $ "Polarity of " ++ prettyShow x ++ ": " ++ prettyShow pol -- set the polarity in the signature setPolarity x $ drop npars pol -- purgeNonvariant pol -- temporarily disable non-variance -- | Data and record parameters are used as phantom arguments all over -- the test suite (and possibly in user developments). -- @enablePhantomTypes@ turns 'Nonvariant' parameters to 'Covariant' -- to enable phantoms. enablePhantomTypes :: Defn -> [Polarity] -> [Polarity] enablePhantomTypes def pol = case def of Datatype{ dataPars = np } -> enable np Record { recPars = np } -> enable np _ -> pol where enable np = let (pars, rest) = splitAt np pol in purgeNonvariant pars ++ rest {- UNUSED -- | Extract a basic approximate polarity info from the shape of definition. -- Arguments that are matched against get 'Invariant', others 'Nonvariant'. -- For data types, parameters get 'Nonvariant', indices 'Invariant'. usagePolarity :: Defn -> [Polarity] usagePolarity def = case def of Axiom{} -> [] Function{ funClauses = [] } -> [] Function{ funClauses = cs } -> usage $ map namedClausePats cs Datatype{ dataPars = np, dataIxs = ni } -> genericReplicate np Nonvariant Record{ recPars = n } -> genericReplicate n Nonvariant Constructor{} -> [] Primitive{} -> [] where usage = foldr1 (zipWith (/\)) . map (map (usagePat . namedArg)) usagePat VarP{} = Nonvariant usagePat DotP{} = Nonvariant usagePat ConP{} = Invariant usagePat LitP{} = Invariant -} -- | Make arguments 'Invariant' if the type of a not-'Nonvariant' -- later argument depends on it. -- Also, enable phantom types by turning 'Nonvariant' into something -- else if it is a data/record parameter but not a size argument. [See issue 1596] -- -- Precondition: the "phantom" polarity list has the same length as the polarity list. dependentPolarity :: Type -> [Polarity] -> [Polarity] -> TCM [Polarity] dependentPolarity t _ [] = return [] -- all remaining are 'Invariant' dependentPolarity t [] (_ : _) = __IMPOSSIBLE__ dependentPolarity t (q:qs) pols@(p:ps) = do t <- reduce $ unEl t reportSDoc "tc.polarity.dep" 20 $ "dependentPolarity t = " <+> prettyTCM t reportSDoc "tc.polarity.dep" 70 $ "dependentPolarity t = " <+> (text . show) t case t of Pi dom b -> do ps <- underAbstraction dom b $ \ c -> dependentPolarity c qs ps let fallback = ifM (isJust <$> isSizeType (unDom dom)) (return p) (return q) p <- case b of Abs{} | p /= Invariant -> -- Andreas, 2014-04-11 see Issue 1099 -- Free variable analysis is not in the monad, -- hence metas must have been instantiated before! ifM (relevantInIgnoringNonvariant 0 (absBody b) ps) {- then -} (return Invariant) {- else -} fallback _ -> fallback return $ p : ps _ -> return pols -- | Check whether a variable is relevant in a type expression, -- ignoring domains of non-variant arguments. relevantInIgnoringNonvariant :: Nat -> Type -> [Polarity] -> TCM Bool relevantInIgnoringNonvariant i t [] = return $ i `relevantInIgnoringSortAnn` t relevantInIgnoringNonvariant i t (p:ps) = do t <- reduce $ unEl t case t of Pi a b -> if p /= Nonvariant && i `relevantInIgnoringSortAnn` a then return True else relevantInIgnoringNonvariant (i + 1) (absBody b) ps _ -> return $ i `relevantInIgnoringSortAnn` t ------------------------------------------------------------------------ -- * Sized types ------------------------------------------------------------------------ -- | Hack for polarity of size indices. -- As a side effect, this sets the positivity of the size index. -- See test/succeed/PolaritySizeSucData.agda for a case where this is needed. sizePolarity :: QName -> [Polarity] -> TCM [Polarity] sizePolarity d pol0 = do let exit = return pol0 ifNotM sizedTypesOption exit $ {- else -} do def <- getConstInfo d case theDef def of Datatype{ dataPars = np, dataCons = cons } -> do let TelV tel _ = telView' $ defType def (parTel, ixTel) = splitAt np $ telToList tel case ixTel of [] -> exit -- No size index Dom{unDom = (_,a)} : _ -> ifM ((/= Just BoundedNo) <$> isSizeType a) exit $ do -- we assume the size index to be 'Covariant' ... let pol = take np pol0 polCo = pol ++ [Covariant] polIn = pol ++ [Invariant] setPolarity d $ polCo -- and seek confirm it by looking at the constructor types let check c = do t <- defType <$> getConstInfo c addContext (telFromList parTel) $ do let pars = map (defaultArg . var) $ downFrom np TelV conTel target <- telView =<< (t `piApplyM` pars) case conTel of EmptyTel -> return False -- no size argument ExtendTel arg tel -> ifM ((/= Just BoundedNo) <$> isSizeType (unDom arg)) (return False) $ do -- also no size argument -- First constructor argument has type Size -- check that only positive occurences in tel let isPos = underAbstraction arg tel $ \ tel -> do pols <- zipWithM polarity [0..] $ map (snd . unDom) $ telToList tel reportSDoc "tc.polarity.size" 25 $ text $ "to pass size polarity check, the following polarities need all to be covariant: " ++ prettyShow pols return $ all (`elem` [Nonvariant, Covariant]) pols -- check that the size argument appears in the -- right spot in the target type let sizeArg = size tel isLin = addContext conTel $ checkSizeIndex d sizeArg target ok <- isPos `and2M` isLin reportSDoc "tc.polarity.size" 15 $ "constructor" <+> prettyTCM c <+> text (if ok then "passes" else "fails") <+> "size polarity check" return ok ifNotM (andM $ map check cons) (return polIn) -- no, does not conform to the rules of sized types $ do -- yes, we have a sized type here -- Andreas, 2015-07-01 -- As a side effect, mark the size also covariant for subsequent -- positivity checking (which feeds back into polarity analysis). modifyArgOccurrences d $ \ occ -> take np occ ++ [JustPos] return polCo _ -> exit -- | @checkSizeIndex d i a@ checks that constructor target type @a@ -- has form @d ps (↑ⁿ i) idxs@ where @|ps| = np(d)@. -- -- Precondition: @a@ is reduced and of form @d ps idxs0@. checkSizeIndex :: QName -> Nat -> Type -> TCM Bool checkSizeIndex d i a = do reportSDoc "tc.polarity.size" 15 $ withShowAllArguments $ vcat [ "checking that constructor target type " <+> prettyTCM a , " is data type " <+> prettyTCM d , " and has size index (successor(s) of) " <+> prettyTCM (var i) ] case unEl a of Def d0 es -> do whenNothingM (sameDef d d0) __IMPOSSIBLE__ np <- fromMaybe __IMPOSSIBLE__ <$> getNumberOfParameters d0 let (pars, Apply ix : ixs) = splitAt np es s <- deepSizeView $ unArg ix case s of DSizeVar j _ | i == j -> return $ not $ freeIn i (pars ++ ixs) _ -> return False _ -> __IMPOSSIBLE__ -- | @polarities i a@ computes the list of polarities of de Bruijn index @i@ -- in syntactic entity @a@. class HasPolarity a where polarities :: Nat -> a -> TCM [Polarity] -- | @polarity i a@ computes the polarity of de Bruijn index @i@ -- in syntactic entity @a@ by taking the infimum of all 'polarities'. polarity :: HasPolarity a => Nat -> a -> TCM Polarity polarity i x = do ps <- polarities i x case ps of [] -> return Nonvariant ps -> return $ foldr1 (/\) ps instance HasPolarity a => HasPolarity (Arg a) where polarities i = polarities i . unArg instance HasPolarity a => HasPolarity (Dom a) where polarities i = polarities i . unDom instance HasPolarity a => HasPolarity (Abs a) where polarities i (Abs _ b) = polarities (i + 1) b polarities i (NoAbs _ v) = polarities i v instance HasPolarity a => HasPolarity [a] where polarities i xs = concat <$> mapM (polarities i) xs instance (HasPolarity a, HasPolarity b) => HasPolarity (a, b) where polarities i (x, y) = (++) <$> polarities i x <*> polarities i y instance HasPolarity Type where polarities i (El _ v) = polarities i v instance HasPolarity a => HasPolarity (Elim' a) where polarities i Proj{} = return [] polarities i (Apply a) = polarities i a polarities i (IApply x y a) = polarities i (x,(y,a)) instance HasPolarity Term where polarities i v = do v <- instantiate v case v of -- Andreas, 2012-09-06: taking the polarities of the arguments -- without taking the variance of the function into account seems wrong. Var n ts | n == i -> (Covariant :) . map (const Invariant) <$> polarities i ts | otherwise -> map (const Invariant) <$> polarities i ts Lam _ t -> polarities i t Lit _ -> return [] Level l -> polarities i l Def x ts -> do pols <- getPolarity x let compose p ps = map (composePol p) ps concat . zipWith compose (pols ++ repeat Invariant) <$> mapM (polarities i) ts Con _ _ ts -> polarities i ts -- constructors can be seen as monotone in all args. Pi a b -> (++) <$> (map neg <$> polarities i a) <*> polarities i b Sort s -> return [] -- polarities i s -- return [] MetaV _ ts -> map (const Invariant) <$> polarities i ts DontCare t -> polarities i t -- return [] Dummy{} -> return [] instance HasPolarity Level where polarities i (Max as) = polarities i as instance HasPolarity PlusLevel where polarities i ClosedLevel{} = return [] polarities i (Plus _ l) = polarities i l instance HasPolarity LevelAtom where polarities i l = case l of MetaLevel _ vs -> map (const Invariant) <$> polarities i vs BlockedLevel _ v -> polarities i v NeutralLevel _ v -> polarities i v UnreducedLevel v -> polarities i v Agda-2.6.0.1/src/full/Agda/TypeChecking/Warnings.hs0000644000000000000000000000774313466402171020005 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Warnings where import qualified Data.Set as Set import qualified Data.List as List import Data.Maybe ( catMaybes ) import Control.Monad ( guard, forM, unless ) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Caching import {-# SOURCE #-} Agda.TypeChecking.Errors import {-# SOURCE #-} Agda.TypeChecking.Pretty import Agda.Syntax.Position import Agda.Syntax.Parser import Agda.Syntax.Concrete.Definitions (DeclarationWarning(..)) import Agda.Interaction.Options import Agda.Interaction.Options.Warnings import Agda.Utils.Lens import qualified Agda.Utils.Pretty as P import Agda.Utils.Except {-# SPECIALIZE genericWarning :: P.Doc -> TCM () #-} genericWarning :: MonadTCM tcm => P.Doc -> tcm () genericWarning = warning . GenericWarning {-# SPECIALIZE genericNonFatalError :: P.Doc -> TCM () #-} genericNonFatalError :: MonadTCM tcm => P.Doc -> tcm () genericNonFatalError = warning . GenericNonFatalError {-# SPECIALIZE warning_ :: Warning -> TCM TCWarning #-} warning_ :: MonadTCM tcm => Warning -> tcm TCWarning warning_ w = do r <- viewTC eRange c <- viewTC eCall b <- liftTCM areWeCaching -- NicifierIssues print their own error locations in their list of -- issues (but we might need to keep the overall range `r` for -- comparing ranges) let r' = case w of { NicifierIssue{} -> NoRange ; _ -> r } p <- liftTCM $ sayWhen r' c $ prettyWarning w liftTCM $ return $ TCWarning r w p b -- | @applyWarningMode@ filters out the warnings the user has not requested -- Users are not allowed to ignore non-fatal errors. applyWarningMode :: WarningMode -> Warning -> Maybe Warning applyWarningMode wm w = case classifyWarning w of ErrorWarnings -> Just w AllWarnings -> w <$ guard (Set.member (warningName w) $ wm ^. warningSet) {-# SPECIALIZE warnings :: [Warning] -> TCM () #-} warnings :: MonadTCM tcm => [Warning] -> tcm () warnings ws = do wmode <- optWarningMode <$> pragmaOptions let add w tcwarn tcwarns | onlyOnce w && elem tcwarn tcwarns = tcwarns -- Eq on TCWarning only checks head constructor | otherwise = tcwarn : tcwarns -- We collect *all* of the warnings no matter whether they are in the @warningSet@ -- or not. If we find one which should be turned into an error, we keep processing -- the rest of the warnings and *then* report all of the errors at once. merrs <- forM ws $ \ w' -> do tcwarn <- warning_ w' if wmode ^. warn2Error && warningName w' `elem` wmode ^. warningSet then pure (Just tcwarn) else Nothing <$ (stTCWarnings `modifyTCLens` add w' tcwarn) let errs = catMaybes merrs unless (null errs) $ typeError $ NonFatalErrors errs {-# SPECIALIZE warning :: Warning -> TCM () #-} warning :: MonadTCM tcm => Warning -> tcm () warning = warnings . pure -- | Classifying warnings: some are benign, others are (non-fatal) errors data WhichWarnings = ErrorWarnings -- ^ warnings that will be turned into errors | AllWarnings -- ^ all warnings, including errors and benign ones -- Note: order of constructors is important for the derived Ord instance deriving (Eq, Ord) isUnsolvedWarning :: Warning -> Bool isUnsolvedWarning w = warningName w `elem` unsolvedWarnings classifyWarning :: Warning -> WhichWarnings classifyWarning w = if warningName w `elem` errorWarnings then ErrorWarnings else AllWarnings -- | Should we only emit a single warning with this constructor. onlyOnce :: Warning -> Bool onlyOnce InversionDepthReached{} = True onlyOnce _ = False onlyShowIfUnsolved :: Warning -> Bool onlyShowIfUnsolved InversionDepthReached{} = True onlyShowIfUnsolved _ = False classifyWarnings :: [TCWarning] -> ([TCWarning], [TCWarning]) classifyWarnings = List.partition $ (< AllWarnings) . classifyWarning . tcWarning -- | running the Parse monad runPM :: PM a -> TCM a runPM m = do (res, ws) <- runPMIO m mapM_ (warning . ParseWarning) ws case res of Left e -> throwError (Exception (getRange e) (P.pretty e)) Right a -> return a Agda-2.6.0.1/src/full/Agda/TypeChecking/Constraints.hs0000644000000000000000000002575213466402171020524 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Constraints where import Prelude hiding (null) import Control.Monad import Control.Monad.Reader import qualified Data.List as List import qualified Data.Set as Set import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Caching import Agda.TypeChecking.InstanceArguments import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.LevelConstraints import Agda.TypeChecking.SizedTypes import Agda.TypeChecking.Sort import Agda.TypeChecking.MetaVars.Mention import Agda.TypeChecking.Warnings import {-# SOURCE #-} Agda.TypeChecking.Rules.Application import {-# SOURCE #-} Agda.TypeChecking.Rules.Def import {-# SOURCE #-} Agda.TypeChecking.Rules.Term import {-# SOURCE #-} Agda.TypeChecking.Conversion import {-# SOURCE #-} Agda.TypeChecking.MetaVars import {-# SOURCE #-} Agda.TypeChecking.Empty import Agda.Utils.Except ( MonadError(throwError) ) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Lens #include "undefined.h" import Agda.Utils.Impossible -- | Catches pattern violation errors and adds a constraint. -- catchConstraint :: Constraint -> TCM () -> TCM () catchConstraint c v = liftTCM $ catchError_ v $ \err -> case err of -- Not putting s (which should really be the what's already there) makes things go -- a lot slower (+20% total time on standard library). How is that possible?? -- The problem is most likely that there are internal catchErrors which forgets the -- state. catchError should preserve the state on pattern violations. PatternErr{} -> addConstraint c _ -> throwError err addConstraint :: Constraint -> TCM () addConstraint c = do pids <- asksTC envActiveProblems reportSDoc "tc.constr.add" 20 $ hsep [ "adding constraint" , text (show $ Set.toList pids) , prettyTCM c ] -- Need to reduce to reveal possibly blocking metas c <- reduce =<< instantiateFull c cs <- simpl c if ([c] /= cs) then do reportSDoc "tc.constr.add" 20 $ " simplified:" <+> prettyList (map prettyTCM cs) mapM_ solveConstraint_ cs else mapM_ addConstraint' cs -- the added constraint can cause instance constraints to be solved (but only -- the constraints which aren’t blocked on an uninstantiated meta) unless (isInstanceConstraint c) $ wakeConstraints' (isWakeableInstanceConstraint . clValue . theConstraint) where isWakeableInstanceConstraint :: Constraint -> TCM Bool isWakeableInstanceConstraint (FindInstance _ b _) = caseMaybe b (return True) (\m -> isInstantiatedMeta m) isWakeableInstanceConstraint _ = return False isLvl LevelCmp{} = True isLvl _ = False -- Try to simplify a level constraint simpl :: Constraint -> TCM [Constraint] simpl c = if not $ isLvl c then return [c] else do cs <- map theConstraint <$> getAllConstraints lvls <- instantiateFull $ List.filter (isLvl . clValue) cs when (not $ null lvls) $ do reportSDoc "tc.constr.lvl" 40 $ "simplifying level constraint" <+> prettyTCM c $$ nest 2 (hang "using" 2 (prettyTCM lvls)) return $ simplifyLevelConstraint c $ map clValue lvls -- | Don't allow the argument to produce any blocking constraints. noConstraints :: TCM a -> TCM a noConstraints problem = liftTCM $ do (pid, x) <- newProblem problem cs <- getConstraintsForProblem pid unless (null cs) $ do w <- warning_ (UnsolvedConstraints cs) typeError $ NonFatalErrors [ w ] return x -- | Create a fresh problem for the given action. newProblem :: TCM a -> TCM (ProblemId, a) newProblem action = do pid <- fresh -- Don't get distracted by other constraints while working on the problem x <- nowSolvingConstraints $ solvingProblem pid action -- Now we can check any woken constraints solveAwakeConstraints return (pid, x) newProblem_ :: TCM () -> TCM ProblemId newProblem_ action = fst <$> newProblem action ifNoConstraints :: TCM a -> (a -> TCM b) -> (ProblemId -> a -> TCM b) -> TCM b ifNoConstraints check ifNo ifCs = do (pid, x) <- newProblem check ifM (isProblemSolved pid) (ifNo x) (ifCs pid x) ifNoConstraints_ :: TCM () -> TCM a -> (ProblemId -> TCM a) -> TCM a ifNoConstraints_ check ifNo ifCs = ifNoConstraints check (const ifNo) (\pid _ -> ifCs pid) -- | @guardConstraint c blocker@ tries to solve @blocker@ first. -- If successful without constraints, it moves on to solve @c@, otherwise it -- adds a @Guarded c cs@ constraint -- to the @blocker@-generated constraints @cs@. guardConstraint :: Constraint -> TCM () -> TCM () guardConstraint c blocker = ifNoConstraints_ blocker (solveConstraint c) (addConstraint . Guarded c) whenConstraints :: TCM () -> TCM () -> TCM () whenConstraints action handler = ifNoConstraints_ action (return ()) $ \pid -> do stealConstraints pid handler -- | Wake constraints matching the given predicate (and aren't instance -- constraints if 'isConsideringInstance'). wakeConstraints' :: (ProblemConstraint -> TCM Bool) -> TCM () wakeConstraints' p = do skipInstance <- isConsideringInstance wakeConstraints (\ c -> (&&) (not $ skipInstance && isInstanceConstraint (clValue $ theConstraint c)) <$> p c) -- | Wake up the constraints depending on the given meta. wakeupConstraints :: MetaId -> TCM () wakeupConstraints x = do wakeConstraints' (return . mentionsMeta x) solveAwakeConstraints -- | Wake up all constraints. wakeupConstraints_ :: TCM () wakeupConstraints_ = do wakeConstraints' (return . const True) solveAwakeConstraints solveAwakeConstraints :: TCM () solveAwakeConstraints = solveAwakeConstraints' False solveAwakeConstraints' :: Bool -> TCM () solveAwakeConstraints' = solveSomeAwakeConstraints (const True) -- | Solve awake constraints matching the predicate. If the second argument is -- True solve constraints even if already 'isSolvingConstraints'. solveSomeAwakeConstraints :: (ProblemConstraint -> Bool) -> Bool -> TCM () solveSomeAwakeConstraints solveThis force = do verboseS "profile.constraints" 10 $ liftTCM $ tickMax "max-open-constraints" . List.genericLength =<< getAllConstraints whenM ((force ||) . not <$> isSolvingConstraints) $ nowSolvingConstraints $ do -- solveSizeConstraints -- Andreas, 2012-09-27 attacks size constrs too early -- Ulf, 2016-12-06: Don't inherit problems here! Stored constraints -- already contain all their dependencies. locallyTC eActiveProblems (const Set.empty) solve where solve = do reportSDoc "tc.constr.solve" 10 $ hsep [ "Solving awake constraints." , text . show . length =<< getAwakeConstraints , "remaining." ] whenJustM (takeAwakeConstraint' solveThis) $ \ c -> do withConstraint solveConstraint c solve solveConstraint :: Constraint -> TCM () solveConstraint c = do verboseS "profile.constraints" 10 $ liftTCM $ tick "attempted-constraints" verboseBracket "tc.constr.solve" 20 "solving constraint" $ do pids <- asksTC envActiveProblems reportSDoc "tc.constr.solve.constr" 20 $ text (show $ Set.toList pids) <+> prettyTCM c solveConstraint_ c solveConstraint_ :: Constraint -> TCM () solveConstraint_ (ValueCmp cmp a u v) = compareTerm cmp a u v solveConstraint_ (ValueCmpOnFace cmp p a u v) = compareTermOnFace cmp p a u v solveConstraint_ (ElimCmp cmp fs a e u v) = compareElims cmp fs a e u v solveConstraint_ (TypeCmp cmp a b) = compareType cmp a b solveConstraint_ (TelCmp a b cmp tela telb) = compareTel a b cmp tela telb solveConstraint_ (SortCmp cmp s1 s2) = compareSort cmp s1 s2 solveConstraint_ (LevelCmp cmp a b) = compareLevel cmp a b solveConstraint_ c0@(Guarded c pid) = do ifM (isProblemSolved pid) {-then-} (do reportSLn "tc.constr.solve" 50 $ "Guarding problem " ++ show pid ++ " is solved, moving on..." solveConstraint_ c) {-else-} $ do reportSLn "tc.constr.solve" 50 $ "Guarding problem " ++ show pid ++ " is still unsolved." addConstraint c0 solveConstraint_ (IsEmpty r t) = ensureEmptyType r t solveConstraint_ (CheckSizeLtSat t) = checkSizeLtSat t solveConstraint_ (UnquoteTactic _ tac hole goal) = unquoteTactic tac hole goal solveConstraint_ (UnBlock m) = ifM (isFrozen m) (addConstraint $ UnBlock m) $ do inst <- mvInstantiation <$> lookupMeta m reportSDoc "tc.constr.unblock" 15 $ text ("unblocking a metavar yields the constraint: " ++ show inst) case inst of BlockedConst t -> do reportSDoc "tc.constr.blocked" 15 $ text ("blocked const " ++ prettyShow m ++ " :=") <+> prettyTCM t assignTerm m [] t PostponedTypeCheckingProblem cl unblock -> enterClosure cl $ \prob -> do ifNotM unblock (addConstraint $ UnBlock m) $ do tel <- getContextTelescope v <- liftTCM $ checkTypeCheckingProblem prob assignTerm m (telToArgs tel) v -- Andreas, 2009-02-09, the following were IMPOSSIBLE cases -- somehow they pop up in the context of sized types -- -- already solved metavariables: should only happen for size -- metas (not sure why it does, Andreas?) -- Andreas, 2017-07-11: -- I think this is because the size solver instantiates -- some metas with infinity but does not clean up the UnBlock constraints. -- See also issue #2637. -- Ulf, 2018-04-30: The size solver shouldn't touch blocked terms! They have -- a twin meta that it's safe to solve. InstV{} -> __IMPOSSIBLE__ -- Open (whatever that means) Open -> __IMPOSSIBLE__ OpenInstance -> __IMPOSSIBLE__ solveConstraint_ (FindInstance m b cands) = findInstance m cands solveConstraint_ (CheckFunDef d i q cs) = withoutCache $ -- re #3498: checking a fundef would normally be cached, but here it's -- happening out of order so it would only corrupt the caching log. checkFunDef d i q cs solveConstraint_ (HasBiggerSort a) = hasBiggerSort a solveConstraint_ (HasPTSRule a b) = hasPTSRule a b checkTypeCheckingProblem :: TypeCheckingProblem -> TCM Term checkTypeCheckingProblem p = case p of CheckExpr cmp e t -> checkExpr' cmp e t CheckArgs eh r args t0 t1 k -> checkArguments eh r args t0 t1 k CheckProjAppToKnownPrincipalArg cmp e o ds args t k v0 pt -> checkProjAppToKnownPrincipalArg cmp e o ds args t k v0 pt CheckLambda cmp args body target -> checkPostponedLambda cmp args body target DoQuoteTerm cmp et t -> doQuoteTerm cmp et t debugConstraints :: TCM () debugConstraints = verboseS "tc.constr" 50 $ do awake <- useTC stAwakeConstraints sleeping <- useTC stSleepingConstraints reportSDoc "tc.constr" 50 $ vcat [ "Current constraints" , nest 2 $ vcat [ "awake " <+> vcat (map prettyTCM awake) , "asleep" <+> vcat (map prettyTCM sleeping) ] ] Agda-2.6.0.1/src/full/Agda/TypeChecking/DisplayForm.hs0000644000000000000000000002206413466402171020437 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- for Arg a => Elim' a -- | Tools for 'DisplayTerm' and 'DisplayForm'. module Agda.TypeChecking.DisplayForm where import Prelude hiding (all) import Control.Monad import Control.Monad.Trans (lift) import Control.Monad.Trans.Maybe import Data.Foldable (all) import qualified Data.Set as Set import qualified Data.Map as Map import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Names import Agda.Syntax.Scope.Base (inverseScopeLookupName) import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Level import Agda.TypeChecking.Reduce (instantiate) import Agda.Utils.Except import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- | Convert a 'DisplayTerm' into a 'Term'. dtermToTerm :: DisplayTerm -> Term dtermToTerm dt = case dt of DWithApp d ds es -> dtermToTerm d `apply` map (defaultArg . dtermToTerm) ds `applyE` es DCon c ci args -> Con c ci $ map (Apply . fmap dtermToTerm) args DDef f es -> Def f $ map (fmap dtermToTerm) es DDot v -> v DTerm v -> v -- | Get the arities of all display forms for a name. displayFormArities :: QName -> TCM [Int] displayFormArities q = map (length . dfPats . dget) <$> getDisplayForms q -- | Find a matching display form for @q es@. -- In essence this tries to rewrite @q es@ with any -- display form @q ps --> dt@ and returns the instantiated -- @dt@ if successful. First match wins. displayForm :: QName -> Elims -> TCM (Maybe DisplayTerm) displayForm q es = do -- Get display forms for name q. odfs <- getDisplayForms q if (null odfs) then do reportSLn "tc.display.top" 101 $ "no displayForm for " ++ prettyShow q return Nothing else do -- Display debug info about the @Open@s. verboseS "tc.display.top" 100 $ unlessDebugPrinting $ do cps <- viewTC eCheckpoints cxt <- getContextTelescope reportSDoc "tc.display.top" 100 $ return $ vcat [ "displayForm for" <+> pretty q , nest 2 $ "cxt =" <+> pretty cxt , nest 2 $ "cps =" <+> vcat (map pretty (Map.toList cps)) , nest 2 $ "dfs =" <+> vcat (map pshow odfs) ] -- Use only the display forms that can be opened in the current context. dfs <- catMaybes <$> mapM tryGetOpen odfs scope <- getScope -- Keep the display forms that match the application @q es@. ms <- do ms <- mapM (runMaybeT . (`matchDisplayForm` es)) dfs return [ m | Just (d, m) <- ms, wellScoped scope d ] -- Not safe when printing non-terminating terms. -- (nfdfs, us) <- normalise (dfs, es) unlessDebugPrinting $ reportSLn "tc.display.top" 100 $ unlines [ "name : " ++ prettyShow q , "displayForms: " ++ show dfs , "arguments : " ++ show es , "matches : " ++ show ms , "result : " ++ show (headMaybe ms) ] -- Return the first display form that matches. return $ headMaybe ms where -- Look at the original display form, not the instantiated result when -- checking if it's well-scoped. Otherwise we might pick up out of scope -- identifiers coming from the source term. wellScoped scope (Display _ _ d) | isWithDisplay d = True | otherwise = all (inScope scope) $ namesIn d inScope scope x = not $ null $ inverseScopeLookupName x scope isWithDisplay DWithApp{} = True isWithDisplay _ = False -- | Match a 'DisplayForm' @q ps = v@ against @q es@. -- Return the 'DisplayTerm' @v[us]@ if the match was successful, -- i.e., @es / ps = Just us@. matchDisplayForm :: DisplayForm -> Elims -> MaybeT TCM (DisplayForm, DisplayTerm) matchDisplayForm d@(Display _ ps v) es | length ps > length es = mzero | otherwise = do let (es0, es1) = splitAt (length ps) es us <- reverse <$> do match ps $ raise 1 es0 return (d, substWithOrigin (parallelS $ map woThing us) us v `applyE` es1) -- | Class @Match@ for matching a term @p@ in the role of a pattern -- against a term @v@. -- -- The 0th variable in @p@ plays the role -- of a place holder (pattern variable). Each occurrence of -- @var 0@ in @p@ stands for a different pattern variable. -- -- The result of matching, if successful, is a list of solutions for the -- pattern variables, in left-to-right order. -- -- The 0th variable is in scope in the input @v@, but should not -- actually occur! -- In the output solution, the @0th@ variable is no longer in scope. -- (It has been substituted by __IMPOSSIBLE__ which corresponds to -- a raise by -1). class Match a where match :: a -> a -> MaybeT TCM [WithOrigin Term] instance Match a => Match [a] where match xs ys = concat <$> zipWithM match xs ys instance Match a => Match (Arg a) where match p v = map (setOrigin (getOrigin v)) <$> match (unArg p) (unArg v) instance Match a => Match (Elim' a) where match p v = case (p, v) of (Proj _ f, Proj _ f') | f == f' -> return [] (Apply a, Apply a') -> match a a' _ -> mzero instance Match Term where match p v = lift (instantiate v) >>= \ v -> case (p, v) of (Var 0 [], v) -> return [ WithOrigin Inserted $ strengthen __IMPOSSIBLE__ v ] (Var i ps, Var j vs) | i == j -> match ps vs (Def c ps, Def d vs) | c == d -> match ps vs (Con c _ ps, Con d _ vs) | c == d -> match ps vs (Lit l, Lit l') | l == l' -> return [] (p, v) | p == v -> return [] (p, Level l) -> match p =<< reallyUnLevelView l (Sort ps, Sort pv) -> match ps pv (p, Sort (Type v)) -> match p =<< reallyUnLevelView v _ -> mzero instance Match Sort where match p v = case (p, v) of (Type pl, Type vl) -> match pl vl _ | p == v -> return [] _ -> mzero instance Match Level where match p v = do p <- reallyUnLevelView p v <- reallyUnLevelView v match p v -- | Substitute terms with origin into display terms, -- replacing variables along with their origins. -- -- The purpose is to replace the pattern variables in a with-display form, -- and only on the top level of the lhs. Thus, we are happy to fall back -- to ordinary substitution where it does not matter. -- This fixes issue #2590. class SubstWithOrigin a where substWithOrigin :: Substitution -> [WithOrigin Term] -> a -> a instance SubstWithOrigin a => SubstWithOrigin [a] where substWithOrigin rho ots = map (substWithOrigin rho ots) instance (SubstWithOrigin a, SubstWithOrigin (Arg a)) => SubstWithOrigin (Elim' a) where substWithOrigin rho ots (Apply arg) = Apply $ substWithOrigin rho ots arg substWithOrigin rho ots e@Proj{} = e substWithOrigin rho ots (IApply u v w) = IApply (substWithOrigin rho ots u) (substWithOrigin rho ots v) (substWithOrigin rho ots w) instance SubstWithOrigin (Arg Term) where substWithOrigin rho ots (Arg ai v) = case v of -- pattern variable: replace origin if better Var x [] -> case ots !!! x of Just (WithOrigin o u) -> Arg (mapOrigin (replaceOrigin o) ai) u Nothing -> Arg ai $ applySubst rho v -- Issue #2717, not __IMPOSSIBLE__ -- constructor: recurse Con c ci args -> Arg ai $ Con c ci $ substWithOrigin rho ots args -- def: recurse Def q es -> Arg ai $ Def q $ substWithOrigin rho ots es -- otherwise: fall back to ordinary substitution _ -> Arg ai $ applySubst rho v where replaceOrigin _ UserWritten = UserWritten replaceOrigin o _ = o instance SubstWithOrigin Term where substWithOrigin rho ots v = case v of -- constructor: recurse Con c ci args -> Con c ci $ substWithOrigin rho ots args -- def: recurse Def q es -> Def q $ substWithOrigin rho ots es -- otherwise: fall back to oridinary substitution _ -> applySubst rho v -- Do not go into dot pattern, otherwise interaction test #231 fails instance SubstWithOrigin DisplayTerm where substWithOrigin rho ots dt = case dt of DTerm v -> DTerm $ substWithOrigin rho ots v DDot v -> DDot $ applySubst rho v DDef q es -> DDef q $ substWithOrigin rho ots es DCon c ci args -> DCon c ci $ substWithOrigin rho ots args DWithApp t ts es -> DWithApp (substWithOrigin rho ots t) (substWithOrigin rho ots ts) (substWithOrigin rho ots es) -- Do not go into dot pattern, otherwise interaction test #231 fails instance SubstWithOrigin (Arg DisplayTerm) where substWithOrigin rho ots (Arg ai dt) = case dt of DTerm v -> fmap DTerm $ substWithOrigin rho ots $ Arg ai v DDot v -> Arg ai $ DDot $ applySubst rho v DDef q es -> Arg ai $ DDef q $ substWithOrigin rho ots es DCon c ci args -> Arg ai $ DCon c ci $ substWithOrigin rho ots args DWithApp t ts es -> Arg ai $ DWithApp (substWithOrigin rho ots t) (substWithOrigin rho ots ts) (substWithOrigin rho ots es) Agda-2.6.0.1/src/full/Agda/TypeChecking/Sort.hs0000644000000000000000000000770113466402171017136 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | This module contains the rules for Agda's sort system viewed as a pure -- type system (pts). The specification of a pts consists of a set -- of axioms of the form @s1 : s2@ specifying when a sort fits in -- another sort, and a set of rules of the form @(s1,s2,s3)@ -- specifying that a pi type with domain in @s1@ and codomain in -- @s2@ itself fits into sort @s3@. -- -- To ensure unique principal types, the axioms and rules of Agda's -- pts are given by two partial functions @univSort'@ and @piSort'@ -- (see @Agda.TypeChecking.Substitute@). If these functions return -- @Nothing@, a constraint is added to ensure that the sort will be -- computed eventually. -- -- One 'upgrade' over the standard definition of a pts is that in a -- rule @(s1,s2,s3)@, in Agda the sort @s2@ can depend on a variable -- of some type in @s1@. This is needed to support Agda's universe -- polymorphism where we can have e.g. a function of type @∀ {ℓ} → -- Set ℓ@. module Agda.TypeChecking.Sort where import Control.Monad import Agda.Syntax.Common import Agda.Syntax.Internal import {-# SOURCE #-} Agda.TypeChecking.Constraints (addConstraint) import {-# SOURCE #-} Agda.TypeChecking.Conversion import {-# SOURCE #-} Agda.TypeChecking.MetaVars import Agda.TypeChecking.Free import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute #include "undefined.h" import Agda.Utils.Impossible -- | Infer the sort of another sort. If we can compute the bigger sort -- straight away, return that. Otherwise, return @UnivSort s@ and add a -- constraint to ensure we can compute the sort eventually. inferUnivSort :: Sort -> TCM Sort inferUnivSort s = do s <- reduce s ui <- univInf case univSort' ui s of Just s' -> return s' Nothing -> do addConstraint $ HasBiggerSort s return $ UnivSort s sortFitsIn :: Sort -> Sort -> TCM () sortFitsIn a b = do b' <- inferUnivSort a equalSort b' b -- CUMULATIVITY: leqSort b' b hasBiggerSort :: Sort -> TCM () hasBiggerSort = void . inferUnivSort -- | Infer the sort of a pi type. If we can compute the sort straight away, -- return that. Otherwise, return @PiSort s1 s2@ and add a constraint to -- ensure we can compute the sort eventually. inferPiSort :: Sort -> Abs Sort -> TCM Sort inferPiSort s1 s2 = do (s1,s2) <- reduce (s1,s2) -- we do instantiateFull here to perhaps remove some (flexible) -- dependencies of s2 on var 0, thus allowing piSort' to reduce s2 <- instantiateFull s2 --Jesper, 2018-04-23: disabled PTS constraints for now, --this assumes that piSort can only be blocked by unsolved metas. --case piSort' s1 s2 of -- Just s -> return s -- Nothing -> do -- addConstraint $ HasPTSRule s1 s2 -- return $ PiSort s1 s2 return $ piSort s1 s2 -- | As @inferPiSort@, but for a nondependent function type. inferFunSort :: Sort -> Sort -> TCM Sort inferFunSort s1 s2 = inferPiSort s1 $ NoAbs underscore s2 ptsRule :: Sort -> Abs Sort -> Sort -> TCM () ptsRule a b c = do c' <- inferPiSort a b equalSort c' c -- CUMULATIVITY: leqSort c' c -- | Non-dependent version of ptsRule ptsRule' :: Sort -> Sort -> Sort -> TCM () ptsRule' a b c = do c' <- inferFunSort a b equalSort c' c -- CUMULATIVITY: leqSort c' c hasPTSRule :: Sort -> Abs Sort -> TCM () hasPTSRule a b = void $ inferPiSort a b -- | Recursively check that an iterated function type constructed by @telePi@ -- is well-sorted. checkTelePiSort :: Type -> TCM () checkTelePiSort (El s (Pi a b)) = do -- Since the function type is assumed to be constructed by @telePi@, -- we already know that @s == piSort (getSort a) (getSort <$> b)@, -- so we just check that this sort is well-formed. hasPTSRule (getSort a) (getSort <$> b) underAbstraction a b checkTelePiSort checkTelePiSort _ = return () Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause.hs0000644000000000000000000001634513466402171021104 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Case trees. -- -- After coverage checking, pattern matching is translated -- to case trees, i.e., a tree of successive case splits -- on one variable at a time. module Agda.TypeChecking.CompiledClause where import Prelude hiding (null) import qualified Data.Map as Map import Data.Map (Map) import Data.Semigroup hiding (Arg(..)) import Data.Foldable hiding (null) import Data.Traversable import Data.Maybe import Data.Data (Data) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Utils.Null import Agda.Utils.Pretty hiding ((<>)) #include "undefined.h" import Agda.Utils.Impossible data WithArity c = WithArity { arity :: Int, content :: c } deriving (Data, Functor, Foldable, Traversable, Show) -- | Branches in a case tree. data Case c = Branches { projPatterns :: Bool -- ^ We are constructing a record here (copatterns). -- 'conBranches' lists projections. , conBranches :: Map QName (WithArity c) -- ^ Map from constructor (or projection) names to their arity -- and the case subtree. (Projections have arity 0.) , etaBranch :: Maybe (ConHead, WithArity c) -- ^ Eta-expand with the given (eta record) constructor. If this is -- present, there should not be any conBranches or litBranches. , litBranches :: Map Literal c -- ^ Map from literal to case subtree. , catchAllBranch :: Maybe c -- ^ (Possibly additional) catch-all clause. , fallThrough :: Maybe Bool -- ^ (if True) In case of non-canonical argument use catchAllBranch. , lazyMatch :: Bool -- ^ Lazy pattern match. Requires single (non-copattern) branch with no lit -- branches and no catch-all. } deriving (Data, Functor, Foldable, Traversable, Show) -- | Case tree with bodies. data CompiledClauses' a = Case (Arg Int) (Case (CompiledClauses' a)) -- ^ @Case n bs@ stands for a match on the @n@-th argument -- (counting from zero) with @bs@ as the case branches. -- If the @n@-th argument is a projection, we have only 'conBranches' -- with arity 0. | Done [Arg ArgName] a -- ^ @Done xs b@ stands for the body @b@ where the @xs@ contains hiding -- and name suggestions for the free variables. This is needed to build -- lambdas on the right hand side for partial applications which can -- still reduce. | Fail -- ^ Absurd case. deriving (Data, Functor, Traversable, Foldable, Show) type CompiledClauses = CompiledClauses' Term litCase :: Literal -> c -> Case c litCase l x = Branches False Map.empty Nothing (Map.singleton l x) Nothing (Just False) False conCase :: QName -> Bool -> WithArity c -> Case c conCase c b x = Branches False (Map.singleton c x) Nothing Map.empty Nothing (Just b) False etaCase :: ConHead -> WithArity c -> Case c etaCase c x = Branches False Map.empty (Just (c, x)) Map.empty Nothing (Just False) True projCase :: QName -> c -> Case c projCase c x = Branches True (Map.singleton c $ WithArity 0 x) Nothing Map.empty Nothing (Just False) False catchAll :: c -> Case c catchAll x = Branches False Map.empty Nothing Map.empty (Just x) (Just True) False -- | Check that the requirements on lazy matching (single inductive case) are -- met, and set lazy to False otherwise. checkLazyMatch :: Case c -> Case c checkLazyMatch b = b { lazyMatch = lazyMatch b && requirements } where requirements = and [ null (catchAllBranch b) , Map.size (conBranches b) <= 1 , null (litBranches b) , not $ projPatterns b ] -- | Check whether a case tree has a catch-all clause. hasCatchAll :: CompiledClauses -> Bool hasCatchAll = getAny . loop where loop cc = case cc of Fail{} -> mempty Done{} -> mempty Case _ br -> maybe (foldMap loop br) (const $ Any True) $ catchAllBranch br -- | Check whether a case tree has any projection patterns hasProjectionPatterns :: CompiledClauses -> Bool hasProjectionPatterns = getAny . loop where loop cc = case cc of Fail{} -> mempty Done{} -> mempty Case _ br -> Any (projPatterns br) <> foldMap loop br instance Semigroup c => Semigroup (WithArity c) where WithArity n1 c1 <> WithArity n2 c2 | n1 == n2 = WithArity n1 (c1 <> c2) | otherwise = __IMPOSSIBLE__ -- arity must match! instance (Semigroup c, Monoid c) => Monoid (WithArity c) where mempty = WithArity __IMPOSSIBLE__ mempty mappend = (<>) instance Semigroup m => Semigroup (Case m) where Branches cop cs eta ls m b lazy <> Branches cop' cs' eta' ls' m' b' lazy' = checkLazyMatch $ Branches (cop || cop') -- for @projCase <> mempty@ (Map.unionWith (<>) cs cs') (unionEta eta eta') (Map.unionWith (<>) ls ls') (m <> m') (combine b b') (lazy && lazy') where combine Nothing b' = b combine b Nothing = b combine (Just b) (Just b') = Just $ b && b' unionEta Nothing b = b unionEta b Nothing = b unionEta Just{} Just{} = __IMPOSSIBLE__ instance (Semigroup m, Monoid m) => Monoid (Case m) where mempty = empty mappend = (<>) instance Null (Case m) where empty = Branches False Map.empty Nothing Map.empty Nothing Nothing True null (Branches _cop cs eta ls mcatch _b _lazy) = null cs && null eta && null ls && null mcatch -- * Pretty instances. instance Pretty a => Pretty (WithArity a) where pretty = pretty . content instance Pretty a => Pretty (Case a) where prettyPrec p (Branches _cop cs eta ls m b lazy) = mparens (p > 0) $ prLazy lazy <+> vcat (prettyMap cs ++ prEta eta ++ prettyMap ls ++ prC m) where prLazy True = "~" prLazy False = empty prC Nothing = [] prC (Just x) = ["_ ->" <+> pretty x] prEta Nothing = [] prEta (Just (c, cc)) = [("eta" <+> pretty c <+> "->") pretty cc] prettyMap :: (Pretty k, Pretty v) => Map k v -> [Doc] prettyMap m = [ sep [ pretty k <+> "->" , nest 2 $ pretty v ] | (k, v) <- Map.toList m ] instance Pretty CompiledClauses where pretty (Done hs t) = ("done" <> pretty hs) pretty t pretty Fail = "fail" pretty (Case n bs) | projPatterns bs = sep [ "record" , nest 2 $ pretty bs ] pretty (Case n bs) = text ("case " ++ prettyShow n ++ " of") pretty bs -- * KillRange instances. instance KillRange c => KillRange (WithArity c) where killRange = fmap killRange instance KillRange c => KillRange (Case c) where killRange (Branches cop con eta lit all b lazy) = Branches cop (killRangeMap con) (killRange eta) (killRangeMap lit) (killRange all) b lazy instance KillRange CompiledClauses where killRange (Case i br) = killRange2 Case i br killRange (Done xs v) = killRange2 Done xs v killRange Fail = Fail -- * TermLike instances instance TermLike a => TermLike (WithArity a) where traverseTermM = traverse . traverseTermM foldTerm = foldMap . foldTerm instance TermLike a => TermLike (Case a) where traverseTermM = traverse . traverseTermM foldTerm = foldMap . foldTerm instance TermLike a => TermLike (CompiledClauses' a) where traverseTermM = traverse . traverseTermM foldTerm = foldMap . foldTerm Agda-2.6.0.1/src/full/Agda/TypeChecking/ProjectionLike.hs-boot0000644000000000000000000000044713466402171022071 0ustar0000000000000000module Agda.TypeChecking.ProjectionLike where import Agda.Syntax.Abstract.Name (QName) import Agda.TypeChecking.Monad.Base import {-# SOURCE #-} Agda.TypeChecking.Monad.Signature (HasConstInfo) makeProjection :: QName -> TCM () eligibleForProjectionLike :: (HasConstInfo m) => QName -> m Bool Agda-2.6.0.1/src/full/Agda/TypeChecking/RecordPatterns.hs0000644000000000000000000007374013466402171021154 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Code which replaces pattern matching on record constructors with -- uses of projection functions. module Agda.TypeChecking.RecordPatterns ( translateRecordPatterns , translateCompiledClauses , translateSplitTree , recordPatternToProjections ) where import Control.Arrow (first, second) import Control.Monad.Fix import Control.Monad.Reader import Control.Monad.State import qualified Data.List as List import Data.Maybe import qualified Data.Map as Map import qualified Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern as I import Agda.Syntax.Literal import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty hiding (pretty) import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Interaction.Options import Agda.Utils.Either import Agda.Utils.Functor import Agda.Utils.List import qualified Agda.Utils.Map as Map import Agda.Utils.Maybe import Agda.Utils.Permutation hiding (dropFrom) import Agda.Utils.Pretty (Pretty(..)) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Record pattern translation for let bindings --------------------------------------------------------------------------- -- | Take a record pattern @p@ and yield a list of projections -- corresponding to the pattern variables, from left to right. -- -- E.g. for @(x , (y , z))@ we return @[ fst, fst . snd, snd . snd ]@. -- -- If it is not a record pattern, error 'ShouldBeRecordPattern' is raised. recordPatternToProjections :: DeBruijnPattern -> TCM [Term -> Term] recordPatternToProjections p = case p of VarP{} -> return [ \ x -> x ] LitP{} -> typeError $ ShouldBeRecordPattern p DotP{} -> typeError $ ShouldBeRecordPattern p ConP c ci ps -> do whenNothing (conPRecord ci) $ typeError $ ShouldBeRecordPattern p let t = unArg $ fromMaybe __IMPOSSIBLE__ $ conPType ci reportSDoc "tc.rec" 45 $ vcat [ "recordPatternToProjections: " , nest 2 $ "constructor pattern " <+> prettyTCM p <+> " has type " <+> prettyTCM t ] reportSLn "tc.rec" 70 $ " type raw: " ++ show t fields <- getRecordTypeFields t concat <$> zipWithM comb (map proj fields) (map namedArg ps) ProjP{} -> __IMPOSSIBLE__ -- copattern cannot appear here IApplyP{} -> typeError $ ShouldBeRecordPattern p DefP{} -> typeError $ ShouldBeRecordPattern p where proj p = (`applyE` [Proj ProjSystem $ unArg p]) comb :: (Term -> Term) -> DeBruijnPattern -> TCM [Term -> Term] comb prj p = map (\ f -> f . prj) <$> recordPatternToProjections p --------------------------------------------------------------------------- -- * Record pattern translation for compiled clauses --------------------------------------------------------------------------- -- | Take a matrix of booleans (at least one row!) and summarize the columns -- using conjunction. conjColumns :: [[Bool]] -> [Bool] conjColumns = foldl1 (zipWith (&&)) -- | @insertColumn i a m@ inserts a column before the @i@th column in -- matrix @m@ and fills it with value @a@. insertColumn :: Int -> a -> [[a]] -> [[a]] insertColumn i a rows = map ins rows where ins row = let (init, last) = splitAt i row in init ++ a : last {- UNUSED -- | @cutColumn i m@ removes the @i@th column from matrix @m@. cutColumn :: Int -> [[a]] -> [[a]] cutColumn i rows = map cut rows where cut row = let (init, _:last) = splitAt i row in init ++ last -- | @cutColumns i n xss = (yss, xss')@ cuts out a submatrix @yss@ -- of width @n@ from @xss@, starting at column @i@. cutColumns :: Int -> Int -> [[a]] -> ([[a]], [[a]]) cutColumns i n rows = unzip (map (cutSublist i n) rows) -} -- | @cutSublist i n xs = (xs', ys, xs'')@ cuts out a sublist @ys@ -- of width @n@ from @xs@, starting at column @i@. cutSublist :: Int -> Int -> [a] -> ([a], [a], [a]) cutSublist i n row = let (init, rest) = splitAt i row (mid , last) = splitAt n rest in (init, mid, last) getEtaAndArity :: SplitTag -> TCM (Bool, Nat) getEtaAndArity (SplitCon c) = for (getConstructorInfo c) $ \case DataCon n -> (False, n) RecordCon eta fs -> (eta == YesEta, size fs) getEtaAndArity (SplitLit l) = return (False, 0) getEtaAndArity SplitCatchall = return (False, 1) translateCompiledClauses :: CompiledClauses -> TCM CompiledClauses translateCompiledClauses cc = do reportSDoc "tc.cc.record" 20 $ vcat [ "translate record patterns in compiled clauses" , nest 2 $ return $ pretty cc ] cc <- loop cc reportSDoc "tc.cc.record" 20 $ vcat [ "translated compiled clauses (no eta record patterns):" , nest 2 $ return $ pretty cc ] cc <- recordExpressionsToCopatterns cc reportSDoc "tc.cc.record" 20 $ vcat [ "translated compiled clauses (record expressions to copatterns):" , nest 2 $ return $ pretty cc ] return cc where loop :: CompiledClauses -> TCM (CompiledClauses) loop cc = case cc of Fail -> return cc Done{} -> return cc Case i cs -> loops i cs loops :: Arg Int -- ^ split variable -> Case CompiledClauses -- ^ original split tree -> TCM CompiledClauses loops i cs@Branches{ projPatterns = comatch , conBranches = conMap , etaBranch = eta , litBranches = litMap , fallThrough = fT , catchAllBranch = catchAll , lazyMatch = lazy } = do catchAll <- traverse loop catchAll litMap <- traverse loop litMap (conMap, eta) <- do let noEtaCase = (, Nothing) <$> (traverse . traverse) loop conMap yesEtaCase ch b = (Map.empty,) . Just . (ch,) <$> traverse loop b case Map.toList conMap of -- This is already an eta match. Still need to recurse though. -- This can happen (#2981) when we -- 'revisitRecordPatternTranslation' in Rules.Decl, due to -- inferred eta. _ | Just (ch, b) <- eta -> yesEtaCase ch b [(c, b)] | not comatch -> -- possible eta-match getConstructorInfo c >>= \ case RecordCon YesEta fs -> let ch = ConHead c Inductive fs in yesEtaCase ch b _ -> noEtaCase _ -> noEtaCase return $ Case i cs{ conBranches = conMap , etaBranch = eta , litBranches = litMap , fallThrough = fT , catchAllBranch = catchAll } {- UNUSED instance Monoid CompiledClauses where mempty = __IMPOSSIBLE__ mappend (Case n c) (Case n' c') | n == n' = Case n $ mappend c c' mappend _ _ = __IMPOSSIBLE__ mergeCatchAll :: CompiledClauses -> Maybe CompiledClauses -> CompiledClauses mergeCatchAll cc ca = maybe cc (mappend cc) ca {- case (cc, ca) of (_ , Nothing) -> cc (Case n c, Just (Case n' c')) | n == n' -> Case n $ mappend c c' _ -> __IMPOSSIBLE__ -- this would mean non-determinism -} -} -- | Transform definitions returning record expressions to use copatterns -- instead. This prevents terms from blowing up when reduced. recordExpressionsToCopatterns :: CompiledClauses -> TCM CompiledClauses recordExpressionsToCopatterns cc = case cc of Case i bs -> Case i <$> traverse recordExpressionsToCopatterns bs Fail -> return cc Done xs (Con c i es) | i == ConORec -> do -- don't translate if using the record constructor Constructor{conData = d, conArity = ar} <- theDef <$> getConstInfo (conName c) ddef <- theDef <$> getConstInfo d irrProj <- optIrrelevantProjections <$> pragmaOptions getConstructorInfo (conName c) >>= \ case RecordCon YesEta fs | ar <- length fs, ar > 0, -- only for eta-records with at least one field length es == ar, -- where the constructor application is saturated irrProj || not (any isIrrelevant fs) -> do -- and irrelevant projections (if any) are allowed let body (Apply v) = WithArity 0 $ Done xs (unArg v) body _ = __IMPOSSIBLE__ bs = Branches True (Map.fromList $ zip (map unArg fs) (map body es)) Nothing Map.empty Nothing Nothing False -- translate new cases recursively (there might be nested record expressions) Case (defaultArg $ length xs) <$> traverse recordExpressionsToCopatterns bs _ -> return cc Done{} -> return cc -- | @replaceByProjections i projs cc@ replaces variables @i..i+n-1@ -- (counted from left) by projections @projs_1 i .. projs_n i@. -- -- If @n==0@, we matched on a zero-field record, which means that -- we are actually introduce a new variable, increasing split -- positions greater or equal to @i@ by one. -- Otherwise, we have to lower -- replaceByProjections :: Arg Int -> [QName] -> CompiledClauses -> CompiledClauses replaceByProjections (Arg ai i) projs cc = let n = length projs loop :: Int -> CompiledClauses -> CompiledClauses loop i cc = case cc of Case j cs -- if j < i, we leave j untouched, but we increase i by the number -- of variables replacing j in the branches | unArg j < i -> Case j $ loops i cs -- if j >= i then we shrink j by (n-1) | otherwise -> Case (j <&> \ k -> k - (n-1)) $ fmap (loop i) cs Done xs v -> -- we have to delete (n-1) variables from xs -- and instantiate v suitably with the projections let (xs0,xs1,xs2) = cutSublist i n xs names | null xs1 = ["r"] | otherwise = map unArg xs1 x = Arg ai $ foldr1 appendArgNames names xs' = xs0 ++ x : xs2 us = map (\ p -> Var 0 [Proj ProjSystem p]) (reverse projs) -- go from level (i + n - 1) to index (subtract from |xs|-1) index = length xs - (i + n) in Done xs' $ applySubst (liftS (length xs2) $ us ++# raiseS 1) v -- The body is NOT guarded by lambdas! -- WRONG: underLambdas i (flip apply) (map defaultArg us) v Fail -> Fail loops :: Int -> Case CompiledClauses -> Case CompiledClauses loops i bs@Branches{ conBranches = conMap , litBranches = litMap , catchAllBranch = catchAll } = bs{ conBranches = fmap (\ (WithArity n c) -> WithArity n $ loop (i + n - 1) c) conMap , litBranches = fmap (loop (i - 1)) litMap , catchAllBranch = fmap (loop i) catchAll } in loop i cc -- | Check if a split is on a record constructor, and return the projections -- if yes. isRecordCase :: Case c -> TCM (Maybe ([QName], c)) isRecordCase (Branches { conBranches = conMap , litBranches = litMap , catchAllBranch = Nothing }) | Map.null litMap , [(con, WithArity _ br)] <- Map.toList conMap = do isRC <- isRecordConstructor con case isRC of Just (r, Record { recFields = fs }) -> return $ Just (map unArg fs, br) Just (r, _) -> __IMPOSSIBLE__ Nothing -> return Nothing isRecordCase _ = return Nothing --------------------------------------------------------------------------- -- * Record pattern translation for split trees --------------------------------------------------------------------------- -- | Split tree annotation. data RecordSplitNode = RecordSplitNode { splitTag :: SplitTag -- ^ Constructor name/literal for this branch. , splitArity :: Int -- ^ Arity of the constructor. , splitRecordPattern :: Bool -- ^ Should we translate this split away? } -- | Split tree annotated for record pattern translation. type RecordSplitTree = SplitTree' RecordSplitNode type RecordSplitTrees = SplitTrees' RecordSplitNode -- | Bottom-up procedure to annotate split tree. recordSplitTree :: SplitTree -> TCM RecordSplitTree recordSplitTree t = snd <$> loop t where loop :: SplitTree -> TCM ([Bool], RecordSplitTree) loop t = case t of SplittingDone n -> return (replicate n True, SplittingDone n) SplitAt i ts -> do (xs, ts) <- loops (unArg i) ts return (xs, SplitAt i ts) loops :: Int -> SplitTrees -> TCM ([Bool], RecordSplitTrees) loops i ts = do (xss, ts) <- unzip <$> do forM ts $ \ (c, t) -> do (xs, t) <- loop t (isRC, n) <- getEtaAndArity c let (xs0, rest) = splitAt i xs (xs1, xs2) = splitAt n rest x = isRC && and xs1 xs' = xs0 ++ x : xs2 return (xs, (RecordSplitNode c n x, t)) return (foldl1 (zipWith (&&)) xss, ts) -- | Bottom-up procedure to record-pattern-translate split tree. translateSplitTree :: SplitTree -> TCM SplitTree translateSplitTree t = snd <$> loop t where -- @loop t = return (xs, t')@ returns the translated split tree @t'@ -- plus the status @xs@ of the clause variables -- True = variable will never be split on in @t'@ (virgin variable) -- False = variable will be spilt on in @t'@ loop :: SplitTree -> TCM ([Bool], SplitTree) loop t = case t of SplittingDone n -> -- start with n virgin variables return (replicate n True, SplittingDone n) SplitAt i ts -> do (x, xs, ts) <- loops (unArg i) ts -- if we case on record constructor, drop case let t' = if x then case ts of [(c,t)] -> t _ -> __IMPOSSIBLE__ -- else retain case else SplitAt i ts return (xs, t') -- @loops i ts = return (x, xs, ts')@ cf. @loop@ -- @x@ says wether at arg @i@ we have a record pattern split -- that can be removed loops :: Int -> SplitTrees -> TCM (Bool, [Bool], SplitTrees) loops i ts = do -- note: ts not empty (rs, xss, ts) <- unzip3 <$> do forM ts $ \ (c, t) -> do (xs, t) <- loop t (isRC, n) <- getEtaAndArity c -- now drop variables from i to i+n-1 let (xs0, rest) = splitAt i xs (xs1, xs2) = splitAt n rest -- if all dropped variables are virgins and we are record cons. -- then new variable x is also virgin -- and we can translate away the split x = isRC && and xs1 -- xs' = updated variables xs' = xs0 ++ x : xs2 -- delete splits from t if record match t' = if x then dropFrom i (n - 1) t else t return (x, xs', (c, t')) -- x = did we split on a record constructor? let x = and rs -- invariant: if record constructor, then exactly one constructor if x then unless (rs == [True]) __IMPOSSIBLE__ -- else no record constructor else unless (or rs == False) __IMPOSSIBLE__ return (x, conjColumns xss, ts) -- | @dropFrom i n@ drops arguments @j@ with @j < i + n@ and @j >= i@. -- NOTE: @n@ can be negative, in which case arguments are inserted. class DropFrom a where dropFrom :: Int -> Int -> a -> a instance DropFrom (SplitTree' c) where dropFrom i n t = case t of SplittingDone m -> SplittingDone (m - n) SplitAt x@(Arg ai j) ts | j >= i + n -> SplitAt (Arg ai $ j - n) $ dropFrom i n ts | j < i -> SplitAt x $ dropFrom i n ts | otherwise -> __IMPOSSIBLE__ instance DropFrom (c, SplitTree' c) where dropFrom i n (c, t) = (c, dropFrom i n t) instance DropFrom a => DropFrom [a] where dropFrom i n ts = map (dropFrom i n) ts {- -- | Check if a split is on a record constructor, and return the projections -- if yes. isRecordSplit :: SplitTrees -> TCM (Maybe ([QName], c)) isRecordSplit (Branches { conBranches = conMap , litBranches = litMap , catchAllBranch = Nothing }) | Map.null litBranches , [(con,br)] <- Map.toList conMap = do isRC <- isRecordConstructor con case isRC of Just (r, Record { recFields = fs }) -> return $ Just (map unArg fs, br) Just (r, _) -> __IMPOSSIBLE__ Nothing -> return Nothing isRecordSplit _ = return Nothing -} --------------------------------------------------------------------------- -- * Record pattern translation for function definitions --------------------------------------------------------------------------- -- | Replaces pattern matching on record constructors with uses of -- projection functions. Does not remove record constructor patterns -- which have sub-patterns containing non-record constructor or -- literal patterns. translateRecordPatterns :: Clause -> TCM Clause translateRecordPatterns clause = do -- ps: New patterns, in left-to-right order, in the context of the -- old RHS. -- s: Partial substitution taking the old pattern variables -- (including dot patterns; listed from left to right) to terms in -- the context of the new RHS. -- cs: List of changes, with types in the context of the old -- telescope. (ps, s, cs) <- runRecPatM $ translatePatterns $ unnumberPatVars $ namedClausePats clause let -- Number of variables + dot patterns in new clause. noNewPatternVars = size cs s' = reverse s mkSub s = s ++# raiseS noNewPatternVars -- Substitution used to convert terms in the old RHS's -- context to terms in the new RHS's context. rhsSubst = mkSub s' -- Substitution used to convert terms in the old telescope's -- context to terms in the new RHS's context. perm = fromMaybe __IMPOSSIBLE__ $ clausePerm clause rhsSubst' = mkSub $ permute (reverseP perm) s' -- TODO: Is it OK to replace the definition above with the -- following one? -- -- rhsSubst' = mkSub $ permute (clausePerm clause) s -- The old telescope, flattened and in textual left-to-right -- order (i.e. the type signature for the variable which occurs -- first in the list of patterns comes first). flattenedOldTel = permute (invertP __IMPOSSIBLE__ $ compactP perm) $ zip (teleNames $ clauseTel clause) $ flattenTel $ clauseTel clause -- The new telescope, still flattened, with types in the context -- of the new RHS, in textual left-to-right order, and with -- Nothing in place of dot patterns. substTel = map . fmap . second . applySubst newTel' = substTel rhsSubst' $ translateTel cs $ flattenedOldTel -- Permutation taking the new variable and dot patterns to the -- new telescope. newPerm = adjustForDotPatterns $ reorderTel_ $ map (maybe __DUMMY_DOM__ snd) newTel' -- It is important that __DUMMY_DOM__ does not mention any variable -- (see the definition of reorderTel). where isDotP n = case List.genericIndex cs n of Left DotP{} -> True _ -> False adjustForDotPatterns (Perm n is) = Perm n (filter (not . isDotP) is) -- Substitution used to convert terms in the new RHS's context -- to terms in the new telescope's context. lhsSubst' = {-'-} renaming __IMPOSSIBLE__ (reverseP newPerm) -- Substitution used to convert terms in the old telescope's -- context to terms in the new telescope's context. lhsSubst = applySubst lhsSubst' rhsSubst' -- The new telescope. newTel = uncurry unflattenTel . unzip $ map (fromMaybe __IMPOSSIBLE__) $ permute newPerm $ substTel lhsSubst' $ newTel' -- New clause. c = clause { clauseTel = newTel , namedClausePats = numberPatVars __IMPOSSIBLE__ newPerm $ applySubst lhsSubst ps , clauseBody = applySubst lhsSubst $ clauseBody clause } reportSDoc "tc.lhs.recpat" 20 $ vcat [ "Original clause:" , nest 2 $ inTopContext $ vcat [ "delta =" <+> prettyTCM (clauseTel clause) , "pats =" <+> text (show $ clausePats clause) ] , "Intermediate results:" , nest 2 $ vcat [ "ps =" <+> text (show ps) , "s =" <+> prettyTCM s , "cs =" <+> prettyTCM cs , "flattenedOldTel =" <+> (text . show) flattenedOldTel , "newTel' =" <+> (text . show) newTel' , "newPerm =" <+> prettyTCM newPerm ] ] reportSDoc "tc.lhs.recpat" 20 $ vcat [ "lhsSubst' =" <+> (text . show) lhsSubst' , "lhsSubst =" <+> (text . show) lhsSubst , "newTel =" <+> prettyTCM newTel ] reportSDoc "tc.lhs.recpat" 10 $ escapeContext (size $ clauseTel clause) $ vcat [ "Translated clause:" , nest 2 $ vcat [ "delta =" <+> prettyTCM (clauseTel c) , "ps =" <+> text (show $ clausePats c) , "body =" <+> text (show $ clauseBody c) , "body =" <+> addContext (clauseTel c) (maybe "_|_" prettyTCM (clauseBody c)) ] ] return c ------------------------------------------------------------------------ -- Record pattern monad -- | A monad used to translate record patterns. -- -- The state records the number of variables produced so far, the -- reader records the total number of variables produced by the entire -- computation. Functions using this monad need to be sufficiently -- lazy in the reader component. newtype RecPatM a = RecPatM (TCMT (ReaderT Nat (StateT Nat IO)) a) deriving (Functor, Applicative, Monad, MonadIO, MonadTCM, HasOptions, MonadDebug, MonadTCEnv, MonadTCState) -- | Runs a computation in the 'RecPatM' monad. runRecPatM :: RecPatM a -> TCM a runRecPatM (RecPatM m) = mapTCMT (\m -> do (x, noVars) <- mfix $ \ ~(_, noVars) -> runStateT (runReaderT m noVars) 0 return x) m -- | Returns the next pattern variable, and the corresponding term. nextVar :: RecPatM (Pattern, Term) nextVar = RecPatM $ do n <- lift get lift $ put $ succ n noVars <- lift ask return (varP "r", var $ noVars - n - 1) ------------------------------------------------------------------------ -- Types used to record changes to a clause -- | @VarPat@ stands for variable patterns, and @DotPat@ for dot -- patterns. data Kind = VarPat | DotPat deriving Eq -- | @'Left' p@ means that a variable (corresponding to the pattern -- @p@, a variable or dot pattern) should be kept unchanged. @'Right' -- (n, x, t)@ means that @n 'VarPat'@ variables, and @n 'DotPat'@ dot -- patterns, should be removed, and a new variable, with the name @x@, -- inserted instead. The type of the new variable is @t@. type Change = Either Pattern (Kind -> Nat, ArgName, Dom Type) type Changes = [Change] instance Pretty (Kind -> Nat) where pretty f = "(VarPat:" P.<+> P.text (show $ f VarPat) P.<+> "DotPat:" P.<+> P.text (show $ f DotPat) P.<> ")" instance PrettyTCM (Kind -> Nat) where prettyTCM = return . pretty instance PrettyTCM Change where prettyTCM (Left p) = prettyTCM p prettyTCM (Right (f, x, t)) = "Change" <+> prettyTCM f <+> text x <+> prettyTCM t -- | Record pattern trees. data RecordTree = Leaf Pattern -- ^ Corresponds to variable and dot patterns; contains the -- original pattern. | RecCon (Arg Type) [(Term -> Term, RecordTree)] -- ^ @RecCon t args@ stands for a record constructor application: -- @t@ is the type of the application, and the list contains a -- projection function and a tree for every argument. ------------------------------------------------------------------------ -- Record pattern trees -- | @projections t@ returns a projection for every non-dot leaf -- pattern in @t@. The term is the composition of the projection -- functions from the leaf to the root. -- -- Every term is tagged with its origin: a variable pattern or a dot -- pattern. projections :: RecordTree -> [(Term -> Term, Kind)] projections (Leaf (DotP{})) = [(id, DotPat)] projections (Leaf (VarP{})) = [(id, VarPat)] projections (Leaf _) = __IMPOSSIBLE__ projections (RecCon _ args) = concatMap (\ (p, t) -> map (first (. p)) $ projections t) args -- | Converts a record tree to a single pattern along with information -- about the deleted pattern variables. removeTree :: RecordTree -> RecPatM (Pattern, [Term], Changes) removeTree tree = do (pat, x) <- nextVar let ps = projections tree s = map (\(p, _) -> p x) ps count k = length $ filter ((== k) . snd) ps return $ case tree of Leaf p -> (p, s, [Left p]) RecCon t _ -> (pat, s, [Right (count, "r", domFromArg t)]) ------------------------------------------------------------------------ -- Translation of patterns -- | Removes record constructors from patterns. -- -- Returns the following things: -- -- * The new pattern. -- -- * A substitution which maps the /old/ pattern variables (in the -- order they occurred in the pattern; not including dot patterns) -- to terms (either the new name of the variable, or a projection -- applied to a new pattern variable). -- -- * A list explaining the changes to the variables bound in the -- pattern. -- -- Record patterns containing non-record constructor patterns are not -- translated (though their sub-patterns may be). -- -- Example: The pattern @rec1 (con1 a) (rec2 b c) (rec3 d)@ should -- yield the pattern @rec1 (con1 x) y z@, along with a substitution -- similar to @[x, proj2-1 y, proj2-2 y, proj3-1 z]@. -- -- This function assumes that literals are never of record type. translatePattern :: Pattern -> RecPatM (Pattern, [Term], Changes) translatePattern p@(ConP c ci ps) -- Andreas, 2015-05-28 only translate implicit record patterns | Just PatOSystem <- conPRecord ci = do r <- recordTree p case r of Left r -> r Right t -> removeTree t | otherwise = do (ps, s, cs) <- translatePatterns ps return (ConP c ci ps, s, cs) translatePattern p@(DefP o q ps) = do (ps, s, cs) <- translatePatterns ps return (DefP o q ps, s, cs) translatePattern p@VarP{} = removeTree (Leaf p) translatePattern p@DotP{} = removeTree (Leaf p) translatePattern p@LitP{} = return (p, [], []) translatePattern p@ProjP{}= return (p, [], []) translatePattern p@IApplyP{}= return (p, [], []) translatePatterns :: [NamedArg Pattern] -> RecPatM ([NamedArg Pattern], [Term], Changes) translatePatterns ps = do (ps', ss, cs) <- unzip3 <$> mapM (translatePattern . namedArg) ps return (zipWith (\p -> fmap (p <$)) ps' ps, concat ss, concat cs) -- | Traverses a pattern and returns one of two things: -- -- * If there is no non-record constructor in the pattern, then -- @'Right' ps@ is returned, where @ps@ contains one projection for -- every variable in the input pattern (in the order they are -- encountered). -- -- * Otherwise the output is a computation returning the same kind of -- result as that coming from 'translatePattern'. (Computations are -- returned rather than values to ensure that variable numbers are -- allocated in the right order.) -- -- Assumes that literals are never of record type. recordTree :: Pattern -> RecPatM (Either (RecPatM (Pattern, [Term], Changes)) RecordTree) -- Andreas, 2015-05-28 only translate implicit record patterns recordTree p@(ConP c ci ps) | Just PatOSystem <- conPRecord ci = do let t = fromMaybe __IMPOSSIBLE__ $ conPType ci rs <- mapM (recordTree . namedArg) ps case allRight rs of Nothing -> return $ Left $ do (ps', ss, cs) <- unzip3 <$> mapM (either id removeTree) rs return (ConP c ci (ps' `withNamedArgsFrom` ps), concat ss, concat cs) Just ts -> liftTCM $ do t <- reduce t reportSDoc "tc.rec" 45 $ vcat [ "recordTree: " , nest 2 $ "constructor pattern " <+> prettyTCM p <+> " has type " <+> prettyTCM t ] -- Andreas, 2018-03-03, see #2989: -- The content of an @Arg@ might not be reduced (if @Arg@ is @Irrelevant@). fields <- getRecordTypeFields =<< reduce (unArg t) -- let proj p = \x -> Def (unArg p) [defaultArg x] let proj p = (`applyE` [Proj ProjSystem $ unArg p]) return $ Right $ RecCon t $ zip (map proj fields) ts recordTree p@(ConP _ ci _) = return $ Left $ translatePattern p recordTree p@DefP{} = return $ Left $ translatePattern p recordTree p@VarP{} = return (Right (Leaf p)) recordTree p@DotP{} = return (Right (Leaf p)) recordTree p@LitP{} = return $ Left $ translatePattern p recordTree p@ProjP{}= return $ Left $ translatePattern p recordTree p@IApplyP{}= return $ Left $ translatePattern p ------------------------------------------------------------------------ -- Translation of the clause telescope and body -- | Translates the telescope. translateTel :: Changes -- ^ Explanation of how the telescope should be changed. Types -- should be in the context of the old telescope. -> [(ArgName, Dom Type)] -- ^ Old telescope, flattened, in textual left-to-right -- order. -> [Maybe (ArgName, Dom Type)] -- ^ New telescope, flattened, in textual left-to-right order. -- 'Nothing' is used to indicate the locations of dot patterns. translateTel (Left (DotP{}) : rest) tel = Nothing : translateTel rest tel translateTel (Right (n, x, t) : rest) tel = Just (x, t) : translateTel rest (drop (n VarPat) tel) translateTel (Left _ : rest) (t : tel) = Just t : translateTel rest tel translateTel [] [] = [] translateTel (Left _ : _) [] = __IMPOSSIBLE__ translateTel [] (_ : _) = __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad.hs0000644000000000000000000000267013466402171017245 0ustar0000000000000000module Agda.TypeChecking.Monad ( module Agda.TypeChecking.Monad.Base , module Agda.TypeChecking.Monad.Closure , module Agda.TypeChecking.Monad.Constraints , module Agda.TypeChecking.Monad.Context , module Agda.TypeChecking.Monad.Debug , module Agda.TypeChecking.Monad.Env , module Agda.TypeChecking.Monad.Imports , module Agda.TypeChecking.Monad.MetaVars , module Agda.TypeChecking.Monad.Mutual , module Agda.TypeChecking.Monad.Open , module Agda.TypeChecking.Monad.Options , module Agda.TypeChecking.Monad.Signature , module Agda.TypeChecking.Monad.SizedTypes , module Agda.TypeChecking.Monad.State , module Agda.TypeChecking.Monad.Statistics , module Agda.TypeChecking.Monad.Trace , module Agda.TypeChecking.Monad.Caching ) where import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Closure import Agda.TypeChecking.Monad.Constraints import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Env import Agda.TypeChecking.Monad.Imports import Agda.TypeChecking.Monad.MetaVars import Agda.TypeChecking.Monad.Mutual import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Open import Agda.TypeChecking.Monad.Signature import Agda.TypeChecking.Monad.SizedTypes import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.Statistics import Agda.TypeChecking.Monad.Trace import Agda.TypeChecking.Monad.Caching Agda-2.6.0.1/src/full/Agda/TypeChecking/DropArgs.hs0000644000000000000000000000546413466402171017734 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.DropArgs where import Control.Arrow (first, second) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Substitute import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage.SplitTree import Agda.Utils.Functor import Agda.Utils.Permutation #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Dropping initial arguments to create a projection-like function --------------------------------------------------------------------------- -- | When making a function projection-like, we drop the first @n@ -- arguments. class DropArgs a where dropArgs :: Int -> a -> a instance DropArgs a => DropArgs (Maybe a) where dropArgs n = fmap (dropArgs n) -- | NOTE: This creates telescopes with unbound de Bruijn indices. instance DropArgs Telescope where dropArgs n tel = telFromList $ drop n $ telToList tel instance DropArgs Permutation where dropArgs n (Perm m p) = Perm (m - n) $ map (subtract n) $ drop n p -- | NOTE: does not work for recursive functions. instance DropArgs Clause where dropArgs n cl = cl{ -- Andreas, 2012-09-25: just dropping the front of telescope -- makes it ill-formed (unbound indices) -- we should let the telescope intact!? -- Ulf, 2016-06-23: Indeed. After parameter refinement it's even -- worse: the module parameters we want to drop aren't necessarily -- the first things in the telescope. namedClausePats = drop n $ namedClausePats cl -- BUG: need to drop also from recursive calls!! } instance DropArgs FunctionInverse where dropArgs n finv = fmap (dropArgs n) finv -- | Use for dropping initial lambdas in clause bodies. -- NOTE: does not reduce term, need lambdas to be present. instance DropArgs Term where dropArgs 0 v = v dropArgs n v = case v of Lam h b -> dropArgs (n - 1) (absBody b) _ -> __IMPOSSIBLE__ -- | To drop the first @n@ arguments in a compiled clause, -- we reduce the split argument indices by @n@ and -- drop @n@ arguments from the bodies. -- NOTE: this only works for non-recursive functions, we -- are not dropping arguments to recursive calls in bodies. instance DropArgs CompiledClauses where dropArgs n cc = case cc of Case i br | unArg i < n -> __IMPOSSIBLE__ | otherwise -> Case (i <&> \ j -> j - n) $ fmap (dropArgs n) br Done xs t | length xs < n -> __IMPOSSIBLE__ | otherwise -> Done (drop n xs) t Fail -> Fail instance DropArgs SplitTree where dropArgs n (SplittingDone m) = SplittingDone (m - n) dropArgs n (SplitAt i ts) = SplitAt (subtract n <$> i) $ map (second $ dropArgs n) ts Agda-2.6.0.1/src/full/Agda/TypeChecking/Polarity.hs-boot0000644000000000000000000000030413466402171020743 0ustar0000000000000000 module Agda.TypeChecking.Polarity where import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base computePolarity :: [QName] -> TCM () composePol :: Polarity -> Polarity -> Polarity Agda-2.6.0.1/src/full/Agda/TypeChecking/Substitute.hs0000644000000000000000000015741713466402171020374 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | This module contains the definition of hereditary substitution -- and application operating on internal syntax which is in β-normal -- form (β including projection reductions). -- -- Further, it contains auxiliary functions which rely on substitution -- but not on reduction. module Agda.TypeChecking.Substitute ( module Agda.TypeChecking.Substitute , module Agda.TypeChecking.Substitute.Class , module Agda.TypeChecking.Substitute.DeBruijn , Substitution'(..), Substitution ) where import Control.Arrow (first, second) import Data.Function import Data.Functor import qualified Data.List as List import Data.Map (Map) import Data.Maybe import Data.Monoid import Debug.Trace (trace) import Language.Haskell.TH.Syntax (thenCmp) -- lexicographic combination of Ordering import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Position (Range) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Options (typeInType) import Agda.TypeChecking.Free as Free import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Positivity.Occurrence as Occ import Agda.TypeChecking.Substitute.Class import Agda.TypeChecking.Substitute.DeBruijn import Agda.Utils.Empty import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Pretty import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.HashMap (HashMap) #include "undefined.h" import Agda.Utils.Impossible instance Apply Term where applyE m [] = m applyE m es = case m of Var i es' -> Var i (es' ++ es) Def f es' -> defApp f es' es -- remove projection redexes Con c ci args -> conApp c ci args es Lam _ b -> case es of Apply a : es0 -> lazyAbsApp b (unArg a) `applyE` es0 IApply _ _ a : es0 -> lazyAbsApp b a `applyE` es0 _ -> __IMPOSSIBLE__ MetaV x es' -> MetaV x (es' ++ es) Lit{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ Pi _ _ -> __IMPOSSIBLE__ Sort s -> Sort $ s `applyE` es Dummy{} -> __IMPOSSIBLE__ DontCare mv -> dontCare $ mv `applyE` es -- Andreas, 2011-10-02 -- need to go under DontCare, since "with" might resurrect irrelevant term -- | If $v$ is a record value, @canProject f v@ -- returns its field @f@. canProject :: QName -> Term -> Maybe (Arg Term) canProject f v = case v of (Con (ConHead _ _ fs) _ vs) -> do (fld, i) <- findWithIndex ((f==) . unArg) fs -- Andreas, 2018-06-12, issue #2170 -- The ArgInfo from the ConHead is more accurate (relevance subtyping!). setArgInfo (getArgInfo fld) <.> isApplyElim =<< headMaybe (drop i vs) _ -> Nothing -- | Eliminate a constructed term. conApp :: ConHead -> ConInfo -> Elims -> Elims -> Term conApp ch ci args [] = Con ch ci args conApp ch ci args (a@Apply{} : es) = conApp ch ci (args ++ [a]) es conApp ch ci args (a@IApply{} : es) = conApp ch ci (args ++ [a]) es conApp ch@(ConHead c _ fs) ci args (Proj o f : es) = let failure err = flip trace err $ "conApp: constructor " ++ show c ++ " with fields\n" ++ unlines (map ((" " ++) . show) fs) ++ " and args\n" ++ unlines (map ((" " ++) . prettyShow) args) ++ " projected by " ++ show f isApply e = fromMaybe (failure __IMPOSSIBLE__) $ isApplyElim e (fld, i) = fromMaybe (failure __IMPOSSIBLE__) $ findWithIndex ((f==) . unArg) fs -- Andreas, 2018-06-12, issue #2170 -- We safe-guard the projected value by DontCare using the ArgInfo stored at the record constructor, -- since the ArgInfo in the constructor application might be inaccurate because of subtyping. v = maybe (failure __IMPOSSIBLE__) (relToDontCare fld . argToDontCare . isApply) $ headMaybe $ drop i args in applyE v es -- -- Andreas, 2016-07-20 futile attempt to magically fix ProjOrigin -- fallback = v -- in if not $ null es then applyE v es else -- -- If we have no more eliminations, we can return v -- if o == ProjSystem then fallback else -- -- If the result is a projected term with ProjSystem, -- -- we can can restore it to ProjOrigin o. -- -- Otherwise, we get unpleasant printing with eta-expanded record metas. -- caseMaybe (hasElims v) fallback $ \ (hd, es0) -> -- caseMaybe (initLast es0) fallback $ \ (es1, e2) -> -- case e2 of -- -- We want to replace this ProjSystem by o. -- Proj ProjSystem q -> hd (es1 ++ [Proj o q]) -- -- Andreas, 2016-07-21 for the whole testsuite -- -- this case was never triggered! -- _ -> fallback {- i = maybe failure id $ elemIndex f $ map unArg fs v = maybe failure unArg $ headMaybe $ drop i args -- Andreas, 2013-10-20 see Issue543a: -- protect result of irrelevant projection. r = maybe __IMPOSSIBLE__ getRelevance $ headMaybe $ drop i fs u | Irrelevant <- r = DontCare v | otherwise = v in applyE v es -} -- | @defApp f us vs@ applies @Def f us@ to further arguments @vs@, -- eliminating top projection redexes. -- If @us@ is not empty, we cannot have a projection redex, since -- the record argument is the first one. defApp :: QName -> Elims -> Elims -> Term defApp f [] (Apply a : es) | Just v <- canProject f (unArg a) = argToDontCare v `applyE` es defApp f es0 es = Def f $ es0 ++ es -- protect irrelevant fields (see issue 610) argToDontCare :: Arg Term -> Term argToDontCare (Arg ai v) = relToDontCare ai v relToDontCare :: LensRelevance a => a -> Term -> Term relToDontCare ai v | Irrelevant <- getRelevance ai = dontCare v | otherwise = v -- Andreas, 2016-01-19: In connection with debugging issue #1783, -- I consider the Apply instance for Type harmful, as piApply is not -- safe if the type is not sufficiently reduced. -- (piApply is not in the monad and hence cannot unfold type synonyms). -- -- Without apply for types, one has to at least use piApply and be -- aware of doing something which has a precondition -- (type sufficiently reduced). -- -- By grepping for piApply, one can quickly get an overview over -- potentially harmful uses. -- -- In general, piApplyM is preferable over piApply since it is more robust -- and fails earlier than piApply, which may only fail at serialization time, -- when all thunks are forced. -- REMOVED: -- instance Apply Type where -- apply = piApply -- -- Maybe an @applyE@ instance would be useful here as well. -- -- A record type could be applied to a projection name -- -- to yield the field type. -- -- However, this works only in the monad where we can -- -- look up the fields of a record type. instance Apply Sort where applyE s [] = s applyE s es = case s of MetaS x es' -> MetaS x $ es' ++ es DefS d es' -> DefS d $ es' ++ es _ -> __IMPOSSIBLE__ -- @applyE@ does not make sense for telecopes, definitions, clauses etc. instance Subst Term a => Apply (Tele a) where apply tel [] = tel apply EmptyTel _ = __IMPOSSIBLE__ apply (ExtendTel _ tel) (t : ts) = lazyAbsApp tel (unArg t) `apply` ts applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply Definition where apply (Defn info x t pol occ gens gpars df m c inst copy ma nc inj d) args = Defn info x (piApply t args) (apply pol args) (apply occ args) (apply gens args) (drop (length args) gpars) df m c inst copy ma nc inj (apply d args) applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply RewriteRule where apply r args = let newContext = apply (rewContext r) args sub = liftS (size newContext) $ parallelS $ reverse $ map (PTerm . unArg) args in RewriteRule { rewName = rewName r , rewContext = newContext , rewHead = rewHead r , rewPats = applySubst sub (rewPats r) , rewRHS = applyNLPatSubst sub (rewRHS r) , rewType = applyNLPatSubst sub (rewType r) } applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance {-# OVERLAPPING #-} Apply [Occ.Occurrence] where apply occ args = List.drop (length args) occ applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance {-# OVERLAPPING #-} Apply [Polarity] where apply pol args = List.drop (length args) pol applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply NumGeneralizableArgs where apply NoGeneralizableArgs args = NoGeneralizableArgs apply (SomeGeneralizableArgs n) args = SomeGeneralizableArgs (n - length args) applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- | Make sure we only drop variable patterns. instance {-# OVERLAPPING #-} Apply [NamedArg (Pattern' a)] where apply ps args = loop (length args) ps where loop 0 ps = ps loop n [] = __IMPOSSIBLE__ loop n (p : ps) = let recurse = loop (n - 1) ps in case namedArg p of VarP{} -> recurse DotP{} -> __IMPOSSIBLE__ LitP{} -> __IMPOSSIBLE__ ConP{} -> __IMPOSSIBLE__ DefP{} -> __IMPOSSIBLE__ ProjP{} -> __IMPOSSIBLE__ IApplyP{} -> recurse applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply Projection where apply p args = p { projIndex = projIndex p - size args , projLams = projLams p `apply` args } applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply ProjLams where apply (ProjLams lams) args = ProjLams $ List.drop (length args) lams applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply Defn where apply d [] = d apply d args = case d of Axiom{} -> d DataOrRecSig n -> DataOrRecSig (n - length args) GeneralizableVar{} -> d AbstractDefn d -> AbstractDefn $ apply d args Function{ funClauses = cs, funCompiled = cc, funInv = inv , funExtLam = extLam , funProjection = Nothing } -> d { funClauses = apply cs args , funCompiled = apply cc args , funInv = apply inv args , funExtLam = modifySystem (`apply` args) <$> extLam } Function{ funClauses = cs, funCompiled = cc, funInv = inv , funExtLam = extLam , funProjection = Just p0} -> case p0 `apply` args of p@Projection{ projIndex = n } | n < 0 -> d { funProjection = __IMPOSSIBLE__ } -- TODO (#3123): we actually get here! -- case: applied only to parameters | n > 0 -> d { funProjection = Just p } -- case: applied also to record value (n == 0) | otherwise -> d { funClauses = apply cs args' , funCompiled = apply cc args' , funInv = apply inv args' , funProjection = if isVar0 then Just p{ projIndex = 0 } else Nothing , funExtLam = modifySystem (\ _ -> __IMPOSSIBLE__) <$> extLam } where larg = last args -- the record value args' = [larg] isVar0 = case unArg larg of Var 0 [] -> True; _ -> False {- Function{ funClauses = cs, funCompiled = cc, funInv = inv , funProjection = Just p@Projection{ projIndex = n } } -- case: only applying parameters | size args < n -> d { funProjection = Just $ p `apply` args } -- case: apply also to record value | otherwise -> d { funClauses = apply cs args' , funCompiled = apply cc args' , funInv = apply inv args' , funProjection = Just $ p { projIndex = 0 } -- Nothing ? } where args' = [last args] -- the record value -} Datatype{ dataPars = np, dataClause = cl } -> d { dataPars = np - size args , dataClause = apply cl args } Record{ recPars = np, recClause = cl, recTel = tel {-, recArgOccurrences = occ-} } -> d { recPars = np - size args , recClause = apply cl args, recTel = apply tel args -- , recArgOccurrences = List.drop (length args) occ } Constructor{ conPars = np } -> d { conPars = np - size args } Primitive{ primClauses = cs } -> d { primClauses = apply cs args } applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply PrimFun where apply (PrimFun x ar def) args = PrimFun x (ar - size args) $ \ vs -> def (args ++ vs) applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply Clause where -- This one is a little bit tricksy after the parameter refinement change. -- It is assumed that we only apply a clause to "parameters", i.e. -- arguments introduced by lambda lifting. The problem is that these aren't -- necessarily the first elements of the clause telescope. apply cls@(Clause rl rf tel ps b t catchall unreachable) args | length args > length ps = __IMPOSSIBLE__ | otherwise = Clause rl rf tel' (applySubst rhoP $ drop (length args) ps) (applySubst rho b) (applySubst rho t) catchall unreachable where -- We have -- Γ ⊢ args, for some outer context Γ -- Δ ⊢ ps, where Δ is the clause telescope (tel) rargs = map unArg $ reverse args rps = reverse $ take (length args) ps n = size tel -- This is the new telescope. Created by substituting the args into the -- appropriate places in the old telescope. We know where those are by -- looking at the deBruijn indices of the patterns. tel' = newTel n tel rps rargs -- We then have to create a substitution from the old telescope to the -- new telescope that we can apply to dot patterns and the clause body. rhoP :: PatternSubstitution rhoP = mkSub dotP n rps rargs rho = mkSub id n rps rargs substP :: Nat -> Term -> [NamedArg DeBruijnPattern] -> [NamedArg DeBruijnPattern] substP i v = subst i (dotP v) -- Building the substitution from the old telescope to the new. The -- interesting case is when we have a variable pattern: -- We need Δ′ ⊢ ρ : Δ -- where Δ′ = newTel Δ (xⁱ : ps) (v : vs) -- = newTel Δ[xⁱ:=v] ps[xⁱ:=v'] vs -- Note that we need v' = raise (|Δ| - 1) v, to make Γ ⊢ v valid in -- ΓΔ[xⁱ:=v]. -- A recursive call ρ′ = mkSub (substP i v' ps) vs gets us -- Δ′ ⊢ ρ′ : Δ[xⁱ:=v] -- so we just need Δ[xⁱ:=v] ⊢ σ : Δ and then ρ = ρ′ ∘ σ. -- That's achieved by σ = singletonS i v'. mkSub :: Subst a a => (Term -> a) -> Nat -> [NamedArg DeBruijnPattern] -> [Term] -> Substitution' a mkSub _ _ [] [] = idS mkSub tm n (p : ps) (v : vs) = case namedArg p of VarP _ (DBPatVar _ i) -> mkSub tm (n - 1) (substP i v' ps) vs `composeS` singletonS i (tm v') where v' = raise (n - 1) v DotP{} -> mkSub tm n ps vs ConP c _ ps' -> mkSub tm n (ps' ++ ps) (projections c v ++ vs) DefP o q ps' -> mkSub tm n (ps' ++ ps) vs LitP{} -> __IMPOSSIBLE__ ProjP{} -> __IMPOSSIBLE__ IApplyP _ _ _ (DBPatVar _ i) -> mkSub tm (n - 1) (substP i v' ps) vs `composeS` singletonS i (tm v') where v' = raise (n - 1) v mkSub _ _ _ _ = __IMPOSSIBLE__ -- The parameter patterns 'ps' are all variables or dot patterns, or eta -- expanded record patterns (issue #2550). If they are variables they -- can appear anywhere in the clause telescope. This function -- constructs the new telescope with 'vs' substituted for 'ps'. -- Example: -- tel = (x : A) (y : B) (z : C) (w : D) -- ps = y@3 w@0 -- vs = u v -- newTel tel ps vs = (x : A) (z : C[u/y]) newTel :: Nat -> Telescope -> [NamedArg DeBruijnPattern] -> [Term] -> Telescope newTel n tel [] [] = tel newTel n tel (p : ps) (v : vs) = case namedArg p of VarP _ (DBPatVar _ i) -> newTel (n - 1) (subTel (size tel - 1 - i) v tel) (substP i (raise (n - 1) v) ps) vs DotP{} -> newTel n tel ps vs ConP c _ ps' -> newTel n tel (ps' ++ ps) (projections c v ++ vs) DefP _ q ps' -> newTel n tel (ps' ++ ps) vs LitP{} -> __IMPOSSIBLE__ ProjP{} -> __IMPOSSIBLE__ IApplyP _ _ _ (DBPatVar _ i) -> newTel (n - 1) (subTel (size tel - 1 - i) v tel) (substP i (raise (n - 1) v) ps) vs newTel _ tel _ _ = __IMPOSSIBLE__ projections c v = [ relToDontCare ai $ applyE v [Proj ProjSystem f] | Arg ai f <- conFields c ] -- subTel i v (Δ₁ (xᵢ : A) Δ₂) = Δ₁ Δ₂[xᵢ = v] subTel i v EmptyTel = __IMPOSSIBLE__ subTel 0 v (ExtendTel _ tel) = absApp tel v subTel i v (ExtendTel a tel) = ExtendTel a $ subTel (i - 1) (raise 1 v) <$> tel applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply CompiledClauses where apply cc args = case cc of Fail -> Fail Done hs t | length hs >= len -> let sub = parallelS $ map var [0..length hs - len - 1] ++ map unArg args in Done (List.drop len hs) $ applySubst sub t | otherwise -> __IMPOSSIBLE__ Case n bs | unArg n >= len -> Case (n <&> \ m -> m - len) (apply bs args) | otherwise -> __IMPOSSIBLE__ where len = length args applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply ExtLamInfo where apply (ExtLamInfo m sys) args = ExtLamInfo m (apply sys args) applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply System where -- We assume we apply a system only to arguments introduced by -- lambda lifting. apply (System tel sys) args = if nargs > ntel then __IMPOSSIBLE__ else System newTel (map (map (f -*- id) -*- f) sys) where f = applySubst sigma nargs = length args ntel = size tel newTel = apply tel args -- newTel ⊢ σ : tel sigma = liftS (ntel - nargs) (parallelS (reverse $ map unArg args)) applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply a => Apply (WithArity a) where apply (WithArity n a) args = WithArity n $ apply a args applyE (WithArity n a) es = WithArity n $ applyE a es instance Apply a => Apply (Case a) where apply (Branches cop cs eta ls m b lz) args = Branches cop (apply cs args) (second (`apply` args) <$> eta) (apply ls args) (apply m args) b lz applyE (Branches cop cs eta ls m b lz) es = Branches cop (applyE cs es) (second (`applyE` es) <$> eta)(applyE ls es) (applyE m es) b lz instance Apply FunctionInverse where apply NotInjective args = NotInjective apply (Inverse inv) args = Inverse $ apply inv args applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Apply DisplayTerm where apply (DTerm v) args = DTerm $ apply v args apply (DDot v) args = DDot $ apply v args apply (DCon c ci vs) args = DCon c ci $ vs ++ map (fmap DTerm) args apply (DDef c es) args = DDef c $ es ++ map (Apply . fmap DTerm) args apply (DWithApp v ws es) args = DWithApp v ws $ es ++ map Apply args applyE (DTerm v) es = DTerm $ applyE v es applyE (DDot v) es = DDot $ applyE v es applyE (DCon c ci vs) es = DCon c ci $ vs ++ map (fmap DTerm) ws where ws = fromMaybe __IMPOSSIBLE__ $ allApplyElims es applyE (DDef c es') es = DDef c $ es' ++ map (fmap DTerm) es applyE (DWithApp v ws es') es = DWithApp v ws $ es' ++ es instance {-# OVERLAPPABLE #-} Apply t => Apply [t] where apply ts args = map (`apply` args) ts applyE ts es = map (`applyE` es) ts instance Apply t => Apply (Blocked t) where apply b args = fmap (`apply` args) b applyE b es = fmap (`applyE` es) b instance Apply t => Apply (Maybe t) where apply x args = fmap (`apply` args) x applyE x es = fmap (`applyE` es) x instance Apply v => Apply (Map k v) where apply x args = fmap (`apply` args) x applyE x es = fmap (`applyE` es) x instance Apply v => Apply (HashMap k v) where apply x args = fmap (`apply` args) x applyE x es = fmap (`applyE` es) x instance (Apply a, Apply b) => Apply (a,b) where apply (x,y) args = (apply x args, apply y args) applyE (x,y) es = (applyE x es , applyE y es ) instance (Apply a, Apply b, Apply c) => Apply (a,b,c) where apply (x,y,z) args = (apply x args, apply y args, apply z args) applyE (x,y,z) es = (applyE x es , applyE y es , applyE z es ) instance DoDrop a => Apply (Drop a) where apply x args = dropMore (size args) x applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance DoDrop a => Abstract (Drop a) where abstract tel x = unDrop (size tel) x instance Apply Permutation where -- The permutation must start with [0..m - 1] -- NB: section (- m) not possible (unary minus), hence (flip (-) m) apply (Perm n xs) args = Perm (n - m) $ map (flip (-) m) $ drop m xs where m = size args applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es instance Abstract Permutation where abstract tel (Perm n xs) = Perm (n + m) $ [0..m - 1] ++ map (+ m) xs where m = size tel -- | @(x:A)->B(x) `piApply` [u] = B(u)@ -- -- Precondition: The type must contain the right number of pis without -- having to perform any reduction. -- -- @piApply@ is potentially unsafe, the monadic 'piApplyM' is preferable. piApply :: Type -> Args -> Type piApply t [] = t piApply (El _ (Pi _ b)) (a:args) = lazyAbsApp b (unArg a) `piApply` args piApply t args = trace ("piApply t = " ++ show t ++ "\n args = " ++ show args) __IMPOSSIBLE__ --------------------------------------------------------------------------- -- * Abstraction --------------------------------------------------------------------------- instance Abstract Term where abstract = teleLam instance Abstract Type where abstract = telePi_ instance Abstract Sort where abstract EmptyTel s = s abstract _ s = __IMPOSSIBLE__ instance Abstract Telescope where EmptyTel `abstract` tel = tel ExtendTel arg xtel `abstract` tel = ExtendTel arg $ xtel <&> (`abstract` tel) instance Abstract Definition where abstract tel (Defn info x t pol occ gens gpars df m c inst copy ma nc inj d) = Defn info x (abstract tel t) (abstract tel pol) (abstract tel occ) (abstract tel gens) (replicate (size tel) Nothing ++ gpars) df m c inst copy ma nc inj (abstract tel d) -- | @tel ⊢ (Γ ⊢ lhs ↦ rhs : t)@ becomes @tel, Γ ⊢ lhs ↦ rhs : t)@ -- we do not need to change lhs, rhs, and t since they live in Γ. -- See 'Abstract Clause'. instance Abstract RewriteRule where abstract tel (RewriteRule q gamma f ps rhs t) = RewriteRule q (abstract tel gamma) f ps rhs t instance {-# OVERLAPPING #-} Abstract [Occ.Occurrence] where abstract tel [] = [] abstract tel occ = replicate (size tel) Mixed ++ occ -- TODO: check occurrence instance {-# OVERLAPPING #-} Abstract [Polarity] where abstract tel [] = [] abstract tel pol = replicate (size tel) Invariant ++ pol -- TODO: check polarity instance Abstract NumGeneralizableArgs where abstract tel NoGeneralizableArgs = NoGeneralizableArgs abstract tel (SomeGeneralizableArgs n) = SomeGeneralizableArgs (size tel + n) instance Abstract Projection where abstract tel p = p { projIndex = size tel + projIndex p , projLams = abstract tel $ projLams p } instance Abstract ProjLams where abstract tel (ProjLams lams) = ProjLams $ map (\ !dom -> argFromDom (fst <$> dom)) (telToList tel) ++ lams instance Abstract System where abstract tel (System tel1 sys) = System (abstract tel tel1) sys instance Abstract Defn where abstract tel d = case d of Axiom{} -> d DataOrRecSig n -> DataOrRecSig (size tel + n) GeneralizableVar{} -> d AbstractDefn d -> AbstractDefn $ abstract tel d Function{ funClauses = cs, funCompiled = cc, funInv = inv , funExtLam = extLam , funProjection = Nothing } -> d { funClauses = abstract tel cs , funCompiled = abstract tel cc , funInv = abstract tel inv , funExtLam = modifySystem (abstract tel) <$> extLam } Function{ funClauses = cs, funCompiled = cc, funInv = inv , funExtLam = extLam , funProjection = Just p } -> -- Andreas, 2015-05-11 if projection was applied to Var 0 -- then abstract over last element of tel (the others are params). if projIndex p > 0 then d' else d' { funClauses = abstract tel1 cs , funCompiled = abstract tel1 cc , funInv = abstract tel1 inv , funExtLam = modifySystem (\ _ -> __IMPOSSIBLE__) <$> extLam } where d' = d { funProjection = Just $ abstract tel p } tel1 = telFromList $ drop (size tel - 1) $ telToList tel Datatype{ dataPars = np, dataClause = cl } -> d { dataPars = np + size tel , dataClause = abstract tel cl } Record{ recPars = np, recClause = cl, recTel = tel' } -> d { recPars = np + size tel , recClause = abstract tel cl , recTel = abstract tel tel' } Constructor{ conPars = np } -> d { conPars = np + size tel } Primitive{ primClauses = cs } -> d { primClauses = abstract tel cs } instance Abstract PrimFun where abstract tel (PrimFun x ar def) = PrimFun x (ar + n) $ \ts -> def $ drop n ts where n = size tel instance Abstract Clause where abstract tel (Clause rl rf tel' ps b t catchall unreachable) = Clause rl rf (abstract tel tel') (namedTelVars m tel ++ ps) b t -- nothing to do for t, since it lives under the telescope catchall unreachable where m = size tel + size tel' instance Abstract CompiledClauses where abstract tel Fail = Fail abstract tel (Done xs t) = Done (map (argFromDom . fmap fst) (telToList tel) ++ xs) t abstract tel (Case n bs) = Case (n <&> \ i -> i + size tel) (abstract tel bs) instance Abstract a => Abstract (WithArity a) where abstract tel (WithArity n a) = WithArity n $ abstract tel a instance Abstract a => Abstract (Case a) where abstract tel (Branches cop cs eta ls m b lz) = Branches cop (abstract tel cs) (second (abstract tel) <$> eta) (abstract tel ls) (abstract tel m) b lz telVars :: Int -> Telescope -> [Arg DeBruijnPattern] telVars m = map (fmap namedThing) . (namedTelVars m) namedTelVars :: Int -> Telescope -> [NamedArg DeBruijnPattern] namedTelVars m EmptyTel = [] namedTelVars m (ExtendTel !dom tel) = Arg (domInfo dom) (namedDBVarP (m-1) $ absName tel) : namedTelVars (m-1) (unAbs tel) instance Abstract FunctionInverse where abstract tel NotInjective = NotInjective abstract tel (Inverse inv) = Inverse $ abstract tel inv instance {-# OVERLAPPABLE #-} Abstract t => Abstract [t] where abstract tel = map (abstract tel) instance Abstract t => Abstract (Maybe t) where abstract tel x = fmap (abstract tel) x instance Abstract v => Abstract (Map k v) where abstract tel m = fmap (abstract tel) m instance Abstract v => Abstract (HashMap k v) where abstract tel m = fmap (abstract tel) m abstractArgs :: Abstract a => Args -> a -> a abstractArgs args x = abstract tel x where tel = foldr (\arg@(Arg info x) -> ExtendTel (__DUMMY_TYPE__ <$ domFromArg arg) . Abs x) EmptyTel $ zipWith (<$) names args names = cycle $ map (stringToArgName . (:[])) ['a'..'z'] --------------------------------------------------------------------------- -- * Substitution and raising/shifting/weakening --------------------------------------------------------------------------- -- | If @permute π : [a]Γ -> [a]Δ@, then @applySubst (renaming _ π) : Term Γ -> Term Δ@ renaming :: forall a. DeBruijn a => Empty -> Permutation -> Substitution' a renaming err p = prependS err gamma $ raiseS $ size p where gamma :: [Maybe a] gamma = inversePermute p (deBruijnVar :: Int -> a) -- gamma = safePermute (invertP (-1) p) $ map deBruijnVar [0..] -- | If @permute π : [a]Γ -> [a]Δ@, then @applySubst (renamingR π) : Term Δ -> Term Γ@ renamingR :: DeBruijn a => Permutation -> Substitution' a renamingR p@(Perm n _) = permute (reverseP p) (map deBruijnVar [0..]) ++# raiseS n -- | The permutation should permute the corresponding context. (right-to-left list) renameP :: Subst t a => Empty -> Permutation -> a -> a renameP err p = applySubst (renaming err p) instance Subst a a => Subst a (Substitution' a) where applySubst rho sgm = composeS rho sgm instance Subst Term Term where applySubst IdS t = t applySubst rho t = case t of Var i es -> lookupS rho i `applyE` applySubst rho es Lam h m -> Lam h $ applySubst rho m Def f es -> defApp f [] $ applySubst rho es Con c ci vs -> Con c ci $ applySubst rho vs MetaV x es -> MetaV x $ applySubst rho es Lit l -> Lit l Level l -> levelTm $ applySubst rho l Pi a b -> uncurry Pi $ applySubst rho (a,b) Sort s -> Sort $ applySubst rho s DontCare mv -> dontCare $ applySubst rho mv Dummy{} -> t instance Subst Term a => Subst Term (Type' a) where applySubst rho (El s t) = applySubst rho s `El` applySubst rho t instance Subst Term Sort where applySubst rho s = case s of Type n -> Type $ sub n Prop n -> Prop $ sub n Inf -> Inf SizeUniv -> SizeUniv PiSort s1 s2 -> piSort (sub s1) (sub s2) UnivSort s -> univSort Nothing $ sub s MetaS x es -> MetaS x $ sub es DefS d es -> DefS d $ sub es DummyS{} -> s where sub x = applySubst rho x instance Subst Term Level where applySubst rho (Max as) = Max $ applySubst rho as instance Subst Term PlusLevel where applySubst rho l@ClosedLevel{} = l applySubst rho (Plus n l) = Plus n $ applySubst rho l instance Subst Term LevelAtom where applySubst rho (MetaLevel m vs) = MetaLevel m $ applySubst rho vs applySubst rho (BlockedLevel m v) = BlockedLevel m $ applySubst rho v applySubst rho (NeutralLevel _ v) = UnreducedLevel $ applySubst rho v applySubst rho (UnreducedLevel v) = UnreducedLevel $ applySubst rho v instance Subst Term Name where applySubst rho = id instance {-# OVERLAPPING #-} Subst Term String where applySubst rho = id instance Subst Term ConPatternInfo where applySubst rho i = i{ conPType = applySubst rho $ conPType i } instance Subst Term Pattern where applySubst rho p = case p of ConP c mt ps -> ConP c (applySubst rho mt) $ applySubst rho ps DefP o q ps -> DefP o q $ applySubst rho ps DotP o t -> DotP o $ applySubst rho t VarP o s -> p LitP l -> p ProjP{} -> p IApplyP o t u x -> IApplyP o (applySubst rho t) (applySubst rho u) x instance Subst Term A.ProblemEq where applySubst rho (A.ProblemEq p v a) = uncurry (A.ProblemEq p) $ applySubst rho (v,a) instance DeBruijn NLPat where deBruijnVar i = PVar i [] deBruijnView p = case p of PVar i [] -> Just i PVar{} -> Nothing PWild{} -> Nothing PDef{} -> Nothing PLam{} -> Nothing PPi{} -> Nothing PBoundVar{} -> Nothing -- or... ? PTerm{} -> Nothing -- or... ? applyNLPatSubst :: (Subst Term a) => Substitution' NLPat -> a -> a applyNLPatSubst = applySubst . fmap nlPatToTerm where nlPatToTerm :: NLPat -> Term nlPatToTerm p = case p of PVar i xs -> Var i $ map (Apply . fmap var) xs PTerm u -> u PWild -> __IMPOSSIBLE__ PDef f es -> __IMPOSSIBLE__ PLam i u -> __IMPOSSIBLE__ PPi a b -> __IMPOSSIBLE__ PBoundVar i es -> __IMPOSSIBLE__ instance Subst NLPat NLPat where applySubst rho p = case p of PVar i bvs -> lookupS rho i `applyBV` bvs PWild -> p PDef f es -> PDef f $ applySubst rho es PLam i u -> PLam i $ applySubst rho u PPi a b -> PPi (applySubst rho a) (applySubst rho b) PBoundVar i es -> PBoundVar i $ applySubst rho es PTerm u -> PTerm $ applyNLPatSubst rho u where applyBV :: NLPat -> [Arg Int] -> NLPat applyBV p ys = case p of PVar i xs -> PVar i (xs ++ ys) PTerm u -> PTerm $ u `apply` map (fmap var) ys PWild -> __IMPOSSIBLE__ PDef f es -> __IMPOSSIBLE__ PLam i u -> __IMPOSSIBLE__ PPi a b -> __IMPOSSIBLE__ PBoundVar i es -> __IMPOSSIBLE__ instance Subst NLPat NLPType where applySubst rho (NLPType s a) = NLPType (applySubst rho s) (applySubst rho a) instance Subst NLPat RewriteRule where applySubst rho (RewriteRule q gamma f ps rhs t) = RewriteRule q (applyNLPatSubst rho gamma) f (applySubst (liftS n rho) ps) (applyNLPatSubst (liftS n rho) rhs) (applyNLPatSubst (liftS n rho) t) where n = size gamma instance Subst t a => Subst t (Blocked a) where applySubst rho b = fmap (applySubst rho) b instance Subst Term DisplayForm where applySubst rho (Display n ps v) = Display n (applySubst (liftS 1 rho) ps) (applySubst (liftS n rho) v) instance Subst Term DisplayTerm where applySubst rho (DTerm v) = DTerm $ applySubst rho v applySubst rho (DDot v) = DDot $ applySubst rho v applySubst rho (DCon c ci vs) = DCon c ci $ applySubst rho vs applySubst rho (DDef c es) = DDef c $ applySubst rho es applySubst rho (DWithApp v vs es) = uncurry3 DWithApp $ applySubst rho (v, vs, es) instance Subst t a => Subst t (Tele a) where applySubst rho EmptyTel = EmptyTel applySubst rho (ExtendTel t tel) = uncurry ExtendTel $ applySubst rho (t, tel) instance Subst Term Constraint where applySubst rho c = case c of ValueCmp cmp a u v -> ValueCmp cmp (rf a) (rf u) (rf v) ValueCmpOnFace cmp p t u v -> ValueCmpOnFace cmp (rf p) (rf t) (rf u) (rf v) ElimCmp ps fs a v e1 e2 -> ElimCmp ps fs (rf a) (rf v) (rf e1) (rf e2) TypeCmp cmp a b -> TypeCmp cmp (rf a) (rf b) TelCmp a b cmp tel1 tel2 -> TelCmp (rf a) (rf b) cmp (rf tel1) (rf tel2) SortCmp cmp s1 s2 -> SortCmp cmp (rf s1) (rf s2) LevelCmp cmp l1 l2 -> LevelCmp cmp (rf l1) (rf l2) Guarded c cs -> Guarded (rf c) cs IsEmpty r a -> IsEmpty r (rf a) CheckSizeLtSat t -> CheckSizeLtSat (rf t) FindInstance m b cands -> FindInstance m b (rf cands) UnBlock{} -> c CheckFunDef{} -> c HasBiggerSort s -> HasBiggerSort (rf s) HasPTSRule s1 s2 -> HasPTSRule (rf s1) (rf s2) UnquoteTactic m t h g -> UnquoteTactic m (rf t) (rf h) (rf g) where rf x = applySubst rho x instance Subst t a => Subst t (Elim' a) where applySubst rho e = case e of Apply v -> Apply $ applySubst rho v IApply x y r -> IApply (applySubst rho x) (applySubst rho y) (applySubst rho r) Proj{} -> e instance Subst t a => Subst t (Abs a) where applySubst rho (Abs x a) = Abs x $ applySubst (liftS 1 rho) a applySubst rho (NoAbs x a) = NoAbs x $ applySubst rho a instance Subst t a => Subst t (Arg a) where applySubst IdS arg = arg applySubst rho arg = setFreeVariables unknownFreeVariables $ fmap (applySubst rho) arg instance Subst t a => Subst t (Named name a) where applySubst rho = fmap (applySubst rho) instance Subst t a => Subst t (Dom a) where applySubst IdS dom = dom applySubst rho dom = setFreeVariables unknownFreeVariables $ fmap (applySubst rho) dom instance Subst t a => Subst t (Maybe a) where applySubst rho = fmap (applySubst rho) instance Subst t a => Subst t [a] where applySubst rho = map (applySubst rho) instance (Ord k, Subst t a) => Subst t (Map k a) where applySubst rho = fmap (applySubst rho) instance Subst Term () where applySubst _ _ = () instance (Subst t a, Subst t b) => Subst t (a, b) where applySubst rho (x,y) = (applySubst rho x, applySubst rho y) instance (Subst t a, Subst t b, Subst t c) => Subst t (a, b, c) where applySubst rho (x,y,z) = (applySubst rho x, applySubst rho y, applySubst rho z) instance (Subst t a, Subst t b, Subst t c, Subst t d) => Subst t (a, b, c, d) where applySubst rho (x,y,z,u) = (applySubst rho x, applySubst rho y, applySubst rho z, applySubst rho u) instance Subst Term Candidate where applySubst rho (Candidate u t ov) = Candidate (applySubst rho u) (applySubst rho t) ov instance Subst Term EqualityView where applySubst rho (OtherType t) = OtherType (applySubst rho t) applySubst rho (EqualityType s eq l t a b) = EqualityType (applySubst rho s) eq (map (applySubst rho) l) (applySubst rho t) (applySubst rho a) (applySubst rho b) instance DeBruijn DeBruijnPattern where debruijnNamedVar n i = varP $ DBPatVar n i -- deBruijnView returns Nothing, to prevent consS and the like -- from dropping the names and origins when building a substitution. deBruijnView _ = Nothing fromPatternSubstitution :: PatternSubstitution -> Substitution fromPatternSubstitution = fmap patternToTerm applyPatSubst :: (Subst Term a) => PatternSubstitution -> a -> a applyPatSubst = applySubst . fromPatternSubstitution usePatOrigin :: PatOrigin -> Pattern' a -> Pattern' a usePatOrigin o p = case patternOrigin p of Nothing -> p Just PatOSplit -> p Just PatOAbsurd -> p Just _ -> case p of (VarP _ x) -> VarP o x (DotP _ u) -> DotP o u (ConP c (ConPatternInfo (Just _) ft b l) ps) -> ConP c (ConPatternInfo (Just o) ft b l) ps DefP _ q ps -> DefP o q ps ConP{} -> __IMPOSSIBLE__ LitP{} -> __IMPOSSIBLE__ ProjP{} -> __IMPOSSIBLE__ (IApplyP _ t u x) -> IApplyP o t u x instance Subst DeBruijnPattern DeBruijnPattern where applySubst IdS p = p applySubst rho p = case p of VarP o x -> usePatOrigin o $ useName (dbPatVarName x) $ lookupS rho $ dbPatVarIndex x DotP o u -> DotP o $ applyPatSubst rho u ConP c ci ps -> ConP c ci $ applySubst rho ps DefP o q ps -> DefP o q $ applySubst rho ps LitP x -> p ProjP{} -> p IApplyP o t u x -> case useName (dbPatVarName x) $ lookupS rho $ dbPatVarIndex x of IApplyP _ _ _ y -> IApplyP o (applyPatSubst rho t) (applyPatSubst rho u) y VarP _ y -> IApplyP o (applyPatSubst rho t) (applyPatSubst rho u) y _ -> __IMPOSSIBLE__ where useName :: PatVarName -> DeBruijnPattern -> DeBruijnPattern useName n (VarP o x) | isUnderscore (dbPatVarName x) = VarP o $ x { dbPatVarName = n } useName _ x = x instance Subst Term Range where applySubst _ = id --------------------------------------------------------------------------- -- * Projections --------------------------------------------------------------------------- -- | @projDropParsApply proj o args = 'projDropPars' proj o `'apply'` args@ -- -- This function is an optimization, saving us from construction lambdas we -- immediately remove through application. projDropParsApply :: Projection -> ProjOrigin -> Args -> Term projDropParsApply (Projection prop d r _ lams) o args = case initLast $ getProjLams lams of -- If we have no more abstractions, we must be a record field -- (projection applied already to record value). Nothing -> if proper then Def d $ map Apply args else __IMPOSSIBLE__ Just (pars, Arg i y) -> let core = if proper then Lam i $ Abs y $ Var 0 [Proj o d] else Lam i $ Abs y $ Def d [Apply $ Var 0 [] <$ r] -- Issue2226: get ArgInfo for principal argument from projFromType -- Now drop pars many args (pars', args') = dropCommon pars args -- We only have to abstract over the parameters that exceed the arguments. -- We only have to apply to the arguments that exceed the parameters. in List.foldr (\ (Arg ai x) -> Lam ai . NoAbs x) (core `apply` args') pars' where proper = isJust prop --------------------------------------------------------------------------- -- * Telescopes --------------------------------------------------------------------------- -- ** Telescope view of a type type TelView = TelV Type data TelV a = TelV { theTel :: Tele (Dom a), theCore :: a } deriving (Show, Functor) deriving instance (Subst t a, Eq a) => Eq (TelV a) deriving instance (Subst t a, Ord a) => Ord (TelV a) -- | Takes off all exposed function domains from the given type. -- This means that it does not reduce to expose @Pi@-types. telView' :: Type -> TelView telView' = telView'UpTo (-1) -- | @telView'UpTo n t@ takes off the first @n@ exposed function types of @t@. -- Takes off all (exposed ones) if @n < 0@. telView'UpTo :: Int -> Type -> TelView telView'UpTo 0 t = TelV EmptyTel t telView'UpTo n t = case unEl t of Pi a b -> absV a (absName b) $ telView'UpTo (n - 1) (absBody b) _ -> TelV EmptyTel t where absV a x (TelV tel t) = TelV (ExtendTel a (Abs x tel)) t -- ** Creating telescopes from lists of types -- | Turn a typed binding @(x1 .. xn : A)@ into a telescope. bindsToTel' :: (Name -> a) -> [Name] -> Dom Type -> ListTel' a bindsToTel' f [] t = [] bindsToTel' f (x:xs) t = fmap (f x,) t : bindsToTel' f xs (raise 1 t) bindsToTel :: [Name] -> Dom Type -> ListTel bindsToTel = bindsToTel' nameToArgName -- | Turn a typed binding @(x1 .. xn : A)@ into a telescope. namedBindsToTel :: [NamedArg Name] -> Type -> Telescope namedBindsToTel [] t = EmptyTel namedBindsToTel (x : xs) t = ExtendTel (t <$ domFromNamedArgName x) $ Abs (nameToArgName $ namedArg x) $ namedBindsToTel xs (raise 1 t) domFromNamedArgName :: NamedArg Name -> Dom () domFromNamedArgName x = () <$ domFromNamedArg (fmap forceName x) where -- If no explicit name is given we use the bound name for the label. forceName (Named Nothing x) = Named (Just $ Ranged (getRange x) $ nameToArgName x) x forceName x = x -- ** Abstracting in terms and types -- | @mkPi dom t = telePi (telFromList [dom]) t@ mkPi :: Dom (ArgName, Type) -> Type -> Type mkPi !dom b = el $ Pi a (mkAbs x b) where x = fst $ unDom dom a = snd <$> dom el = El $ piSort (getSort a) (Abs x (getSort b)) -- piSort checks x freeIn mkLam :: Arg ArgName -> Term -> Term mkLam a v = Lam (argInfo a) (Abs (unArg a) v) telePi' :: (Abs Type -> Abs Type) -> Telescope -> Type -> Type telePi' reAbs = telePi where telePi EmptyTel t = t telePi (ExtendTel u tel) t = el $ Pi u $ reAbs b where b = (`telePi` t) <$> tel el = El $ piSort (getSort u) (getSort <$> b) -- | Uses free variable analysis to introduce 'NoAbs' bindings. telePi :: Telescope -> Type -> Type telePi = telePi' reAbs -- | Everything will be an 'Abs'. telePi_ :: Telescope -> Type -> Type telePi_ = telePi' id -- | Abstract over a telescope in a term, producing lambdas. -- Dumb abstraction: Always produces 'Abs', never 'NoAbs'. -- -- The implementation is sound because 'Telescope' does not use 'NoAbs'. teleLam :: Telescope -> Term -> Term teleLam EmptyTel t = t teleLam (ExtendTel u tel) t = Lam (domInfo u) $ flip teleLam t <$> tel -- | Performs void ('noAbs') abstraction over telescope. class TeleNoAbs a where teleNoAbs :: a -> Term -> Term instance TeleNoAbs ListTel where teleNoAbs tel t = foldr (\ (Dom{domInfo = ai, unDom = (x, _)}) -> Lam ai . NoAbs x) t tel instance TeleNoAbs Telescope where teleNoAbs tel = teleNoAbs $ telToList tel -- ** Telescope typing -- | Given arguments @vs : tel@ (vector typing), extract their individual types. -- Returns @Nothing@ is @tel@ is not long enough. typeArgsWithTel :: Telescope -> [Term] -> Maybe [Dom Type] typeArgsWithTel _ [] = return [] typeArgsWithTel (ExtendTel dom tel) (v : vs) = (dom :) <$> typeArgsWithTel (absApp tel v) vs typeArgsWithTel EmptyTel{} (_:_) = Nothing --------------------------------------------------------------------------- -- * Clauses --------------------------------------------------------------------------- -- | In compiled clauses, the variables in the clause body are relative to the -- pattern variables (including dot patterns) instead of the clause telescope. compiledClauseBody :: Clause -> Maybe Term compiledClauseBody cl = applySubst (renamingR perm) $ clauseBody cl where perm = fromMaybe __IMPOSSIBLE__ $ clausePerm cl --------------------------------------------------------------------------- -- * Syntactic equality and order -- -- Needs weakening. --------------------------------------------------------------------------- deriving instance Eq Substitution deriving instance Ord Substitution deriving instance Eq Sort deriving instance Ord Sort deriving instance Eq Level deriving instance Ord Level deriving instance Eq PlusLevel deriving instance Eq NotBlocked deriving instance Eq t => Eq (Blocked t) deriving instance Eq Candidate deriving instance (Subst t a, Eq a) => Eq (Tele a) deriving instance (Subst t a, Ord a) => Ord (Tele a) deriving instance Eq Constraint deriving instance Eq Section instance Ord PlusLevel where compare ClosedLevel{} Plus{} = LT compare Plus{} ClosedLevel{} = GT compare (ClosedLevel n) (ClosedLevel m) = compare n m -- Compare on the atom first. Makes most sense for levelMax. compare (Plus n a) (Plus m b) = compare (a,n) (b,m) instance Eq LevelAtom where (==) = (==) `on` unLevelAtom instance Ord LevelAtom where compare = compare `on` unLevelAtom -- | Syntactic 'Type' equality, ignores sort annotations. instance Eq a => Eq (Type' a) where (==) = (==) `on` unEl instance Ord a => Ord (Type' a) where compare = compare `on` unEl -- | Syntactic 'Term' equality, ignores stuff below @DontCare@ and sharing. instance Eq Term where Var x vs == Var x' vs' = x == x' && vs == vs' Lam h v == Lam h' v' = h == h' && v == v' Lit l == Lit l' = l == l' Def x vs == Def x' vs' = x == x' && vs == vs' Con x _ vs == Con x' _ vs' = x == x' && vs == vs' Pi a b == Pi a' b' = a == a' && b == b' Sort s == Sort s' = s == s' Level l == Level l' = l == l' MetaV m vs == MetaV m' vs' = m == m' && vs == vs' DontCare _ == DontCare _ = True Dummy{} == Dummy{} = True _ == _ = False instance Eq a => Eq (Pattern' a) where VarP _ x == VarP _ y = x == y DotP _ u == DotP _ v = u == v ConP c _ ps == ConP c' _ qs = c == c && ps == qs LitP l == LitP l' = l == l' ProjP _ f == ProjP _ g = f == g IApplyP _ u v x == IApplyP _ u' v' y = u == u' && v == v' && x == y DefP _ f ps == DefP _ g qs = f == g && ps == qs _ == _ = False instance Ord Term where Var a b `compare` Var x y = compare x a `thenCmp` compare b y -- sort de Bruijn indices down (#2765) Var{} `compare` _ = LT _ `compare` Var{} = GT Def a b `compare` Def x y = compare (a, b) (x, y) Def{} `compare` _ = LT _ `compare` Def{} = GT Con a _ b `compare` Con x _ y = compare (a, b) (x, y) Con{} `compare` _ = LT _ `compare` Con{} = GT Lit a `compare` Lit x = compare a x Lit{} `compare` _ = LT _ `compare` Lit{} = GT Lam a b `compare` Lam x y = compare (a, b) (x, y) Lam{} `compare` _ = LT _ `compare` Lam{} = GT Pi a b `compare` Pi x y = compare (a, b) (x, y) Pi{} `compare` _ = LT _ `compare` Pi{} = GT Sort a `compare` Sort x = compare a x Sort{} `compare` _ = LT _ `compare` Sort{} = GT Level a `compare` Level x = compare a x Level{} `compare` _ = LT _ `compare` Level{} = GT MetaV a b `compare` MetaV x y = compare (a, b) (x, y) MetaV{} `compare` _ = LT _ `compare` MetaV{} = GT DontCare{} `compare` DontCare{} = EQ DontCare{} `compare` _ = LT _ `compare` DontCare{} = GT Dummy{} `compare` Dummy{} = EQ -- Andreas, 2017-10-04, issue #2775, ignore irrelevant arguments during with-abstraction. -- -- For reasons beyond my comprehension, the following Eq instances are not employed -- by with-abstraction in TypeChecking.Abstract.isPrefixOf. -- Instead, I modified the general Eq instance for Arg to ignore the argument -- if irrelevant. -- -- | Ignore irrelevant arguments in equality check. -- -- Also ignore origin. -- instance {-# OVERLAPPING #-} Eq (Arg Term) where -- a@(Arg (ArgInfo h r _o) t) == a'@(Arg (ArgInfo h' r' _o') t') = trace ("Eq (Arg Term) on " ++ show a ++ " and " ++ show a') $ -- h == h' && ((r == Irrelevant) || (r' == Irrelevant) || (t == t')) -- -- Andreas, 2017-10-04: According to Syntax.Common, equality on Arg ignores Relevance and Origin. -- instance {-# OVERLAPPING #-} Eq Args where -- us == vs = length us == length vs && and (zipWith (==) us vs) -- instance {-# OVERLAPPING #-} Eq Elims where -- us == vs = length us == length vs && and (zipWith (==) us vs) -- | Equality of binders relies on weakening -- which is a special case of renaming -- which is a special case of substitution. instance (Subst t a, Eq a) => Eq (Abs a) where NoAbs _ a == NoAbs _ b = a == b Abs _ a == Abs _ b = a == b a == b = absBody a == absBody b instance (Subst t a, Ord a) => Ord (Abs a) where NoAbs _ a `compare` NoAbs _ b = a `compare` b Abs _ a `compare` Abs _ b = a `compare` b a `compare` b = absBody a `compare` absBody b instance (Subst t a, Eq a) => Eq (Elim' a) where Apply a == Apply b = a == b Proj _ x == Proj _ y = x == y IApply x y r == IApply x' y' r' = x == x' && y == y' && r == r' _ == _ = False instance (Subst t a, Ord a) => Ord (Elim' a) where Apply a `compare` Apply b = a `compare` b Proj _ x `compare` Proj _ y = x `compare` y IApply x y r `compare` IApply x' y' r' = compare x x' `mappend` compare y y' `mappend` compare r r' Apply{} `compare` _ = LT _ `compare` Apply{} = GT Proj{} `compare` _ = LT _ `compare` Proj{} = GT --------------------------------------------------------------------------- -- * Sort stuff --------------------------------------------------------------------------- -- | Get the next higher sort. univSort' :: Maybe Sort -> Sort -> Maybe Sort univSort' univInf (Type l) = Just $ Type $ levelSuc l univSort' univInf (Prop l) = Just $ Type $ levelSuc l univSort' univInf Inf = univInf univSort' univInf s = Nothing univSort :: Maybe Sort -> Sort -> Sort univSort univInf s = fromMaybe (UnivSort s) $ univSort' univInf s univInf :: (HasOptions m) => m (Maybe Sort) univInf = ifM ((optOmegaInOmega <$> pragmaOptions) `or2M` typeInType) {-then-} (return $ Just Inf) {-else-} (return Nothing) -- | Compute the sort of a function type from the sorts of its -- domain and codomain. funSort' :: Sort -> Sort -> Maybe Sort funSort' a b = case (a, b) of (Inf , _ ) -> Just Inf (_ , Inf ) -> Just Inf (Type (Max as) , Type (Max bs)) -> Just $ Type $ levelMax $ as ++ bs (SizeUniv , b ) -> Just b (_ , SizeUniv ) -> Just SizeUniv (Prop (Max as) , Type (Max bs)) -> Just $ Type $ levelMax $ as ++ bs (Type (Max as) , Prop (Max bs)) -> Just $ Prop $ levelMax $ as ++ bs (Prop (Max as) , Prop (Max bs)) -> Just $ Prop $ levelMax $ as ++ bs (a , b ) -> Nothing funSort :: Sort -> Sort -> Sort funSort a b = fromMaybe (PiSort a (NoAbs underscore b)) $ funSort' a b -- | Compute the sort of a pi type from the sorts of its domain -- and codomain. piSort' :: Sort -> Abs Sort -> Maybe Sort piSort' a (NoAbs _ b) = funSort' a b piSort' a bAbs@(Abs _ b) = case occurrence 0 b of -- Andreas, Jesper, AIM XXIX, 2019-03-18, issue #3631 -- Remember the NoAbs here! NoOccurrence -> Just $ funSort a $ noabsApp __IMPOSSIBLE__ bAbs -- Andreas, 2017-01-18, issue #2408: -- The sort of @.(a : A) → Set (f a)@ in context @f : .A → Level@ -- is @dLub Set λ a → Set (lsuc (f a))@, but @DLub@s are not serialized. -- Alternatives: -- 1. -- Irrelevantly -> sLub s1 (absApp b $ DontCare $ Sort Prop) -- We cheat here by simplifying the sort to @Set (lsuc (f *))@ -- where * is a dummy value. The rationale is that @f * = f a@ (irrelevance!) -- and that if we already have a neutral level @f a@ -- it should not hurt to have @f *@ even if type @A@ is empty. -- However: sorts are printed in error messages when sorts do not match. -- Also, sorts with a dummy like Prop would be ill-typed. -- 2. We keep the DLub, and serialize it. -- That's clean and principled, even though DLubs make level solving harder. -- Jesper, 2018-04-20: another alternative: -- 3. Return @Inf@ as in the relevant case. This is conservative and might result -- in more occurrences of @Setω@ than desired, but at least it doesn't pollute -- the sort system with new 'exotic' sorts. Irrelevantly -> Just Inf StronglyRigid -> Just Inf Unguarded -> Just Inf WeaklyRigid -> Just Inf Flexible _ -> Nothing piSort :: Sort -> Abs Sort -> Sort piSort a b = fromMaybe (PiSort a b) $ piSort' a b --------------------------------------------------------------------------- -- * Level stuff --------------------------------------------------------------------------- levelMax :: [PlusLevel] -> Level levelMax as0 = Max $ ns ++ List.sort bs where as = Prelude.concatMap expand as0 -- ns is empty or a singleton ns = case [ n | ClosedLevel n <- as, n > 0 ] of [] -> [] ns -> [ ClosedLevel n | let n = Prelude.maximum ns, n > greatestB ] bs = subsume [ b | b@Plus{} <- as ] greatestB | null bs = 0 | otherwise = Prelude.maximum [ n | Plus n _ <- bs ] expand l@ClosedLevel{} = [l] expand (Plus n l) = map (plus n) $ expand0 $ expandAtom l expand0 [] = [ClosedLevel 0] expand0 as = as expandAtom l = case l of BlockedLevel _ v -> expandTm v NeutralLevel _ v -> expandTm v UnreducedLevel v -> expandTm v MetaLevel{} -> [Plus 0 l] where expandTm v = case v of Level (Max as) -> as Sort (Type (Max as)) -> as _ -> [Plus 0 l] plus n (ClosedLevel m) = ClosedLevel (n + m) plus n (Plus m l) = Plus (n + m) l subsume (ClosedLevel{} : _) = __IMPOSSIBLE__ subsume [] = [] subsume (Plus n a : bs) | not $ null ns = subsume bs | otherwise = Plus n a : subsume [ b | b@(Plus _ a') <- bs, a /= a' ] where ns = [ m | Plus m a' <- bs, a == a', m > n ] levelTm :: Level -> Term levelTm l = case l of Max [Plus 0 l] -> unLevelAtom l _ -> Level l unLevelAtom :: LevelAtom -> Term unLevelAtom (MetaLevel x es) = MetaV x es unLevelAtom (NeutralLevel _ v) = v unLevelAtom (UnreducedLevel v) = v unLevelAtom (BlockedLevel _ v) = v levelSucView :: Level -> Maybe Level levelSucView (Max []) = Nothing levelSucView (Max as) = Max <$> traverse atomPred as where atomPred :: PlusLevel -> Maybe PlusLevel atomPred (ClosedLevel n) | n > 0 = Just $ ClosedLevel (n-1) | otherwise = Nothing atomPred (Plus n l) | n > 0 = Just $ Plus (n-1) l | otherwise = Nothing Agda-2.6.0.1/src/full/Agda/TypeChecking/ProjectionLike.hs0000644000000000000000000004021113466402171021121 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Dropping initial arguments (``parameters'') from a function which can be -- easily reconstructed from its principal argument. -- -- A function which has such parameters is called ``projection-like''. -- -- The motivation for this optimization comes from the use of nested records. -- -- First, let us look why proper projections need not store the parameters: -- The type of a projection @f@ is of the form -- @ -- f : Γ → R Γ → C -- @ -- where @R@ is the record type and @C@ is the type of the field @f@. -- Given a projection application -- @ -- p pars u -- @ -- we know that the type of the principal argument @u@ is -- @ -- u : R pars -- @ -- thus, the parameters @pars@ are redundant in the projection application -- if we can always infer the type of @u@. -- For projections, this is case, because the principal argument @u@ must be -- neutral; otherwise, if it was a record value, we would have a redex, -- yet Agda maintains a β-normal form. -- -- The situation for projections can be generalized to ``projection-like'' -- functions @f@. Conditions: -- -- 1. The type of @f@ is of the form @f : Γ → D Γ → ...@ for some -- type constructor @D@ which can never reduce. -- -- 2. For every reduced welltyped application @f pars u ...@, -- the type of @u@ is inferable. -- -- This then allows @pars@ to be dropped always. -- -- Condition 2 is approximated by a bunch of criteria, for details see function -- 'makeProjection'. -- -- Typical projection-like functions are compositions of projections -- which arise from nested records. -- -- Notes: -- -- 1. This analysis could be dualized to ``constructor-like'' functions -- whose parameters are reconstructable from the target type. -- But such functions would need to be fully applied. -- -- 2. A more general analysis of which arguments are reconstructible -- can be found in -- -- Jason C. Reed, Redundancy elimination for LF -- LFTMP 2004. module Agda.TypeChecking.ProjectionLike where import Control.Monad import qualified Data.Map as Map import Data.Monoid (Any(..), getAny) import Agda.Syntax.Abstract.Name import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Free (runFree, IgnoreSorts(..)) import Agda.TypeChecking.Substitute import Agda.TypeChecking.Positivity import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce (reduce) import Agda.TypeChecking.DropArgs import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | View for a @Def f (Apply a : es)@ where @isProjection f@. -- Used for projection-like @f@s. data ProjectionView = ProjectionView { projViewProj :: QName , projViewSelf :: Arg Term , projViewSpine :: Elims } -- ^ A projection or projection-like function, applied to its -- principal argument | LoneProjectionLike QName ArgInfo -- ^ Just a lone projection-like function, missing its principal -- argument (from which we could infer the parameters). | NoProjection Term -- ^ Not a projection or projection-like thing. -- | Semantics of 'ProjectionView'. unProjView :: ProjectionView -> Term unProjView pv = case pv of ProjectionView f a es -> Def f (Apply a : es) LoneProjectionLike f ai -> Def f [] NoProjection v -> v -- | Top-level 'ProjectionView' (no reduction). {-# SPECIALIZE projView :: Term -> TCM ProjectionView #-} projView :: HasConstInfo m => Term -> m ProjectionView projView v = do let fallback = return $ NoProjection v case v of Def f es -> caseMaybeM (isProjection f) fallback $ \ isP -> do if projIndex isP <= 0 then fallback else do case es of [] -> return $ LoneProjectionLike f $ projArgInfo isP Apply a : es -> return $ ProjectionView f a es -- Since a projection is a function, it cannot be projected itself. Proj{} : _ -> __IMPOSSIBLE__ -- The principal argument of a projection-like cannot be the interval? IApply{} : _ -> __IMPOSSIBLE__ _ -> fallback -- | Reduce away top-level projection like functions. -- (Also reduces projections, but they should not be there, -- since Internal is in lambda- and projection-beta-normal form.) -- reduceProjectionLike :: Term -> TCM Term reduceProjectionLike v = do -- Andreas, 2013-11-01 make sure we do not reduce a constructor -- because that could be folded back into a literal by reduce. pv <- projView v case pv of ProjectionView{} -> onlyReduceProjections $ reduce v -- ordinary reduce, only different for Def's _ -> return v -- | Turn prefix projection-like function application into postfix ones. -- This does just one layer, such that the top spine contains -- the projection-like functions as projections. -- Used in 'compareElims' in @TypeChecking.Conversion@ -- and in "Agda.TypeChecking.CheckInternal". -- -- If the 'Bool' is 'True', a lone projection like function will be -- turned into a lambda-abstraction, expecting the principal argument. -- If the 'Bool' is 'False', it will be returned unaltered. -- -- No precondition. -- Preserves constructorForm, since it really does only something -- on (applications of) projection-like functions. elimView :: Bool -> Term -> TCM Term elimView loneProjToLambda v = do reportSDoc "tc.conv.elim" 30 $ "elimView of " <+> prettyTCM v reportSLn "tc.conv.elim" 50 $ "v = " ++ show v v <- reduceProjectionLike v reportSDoc "tc.conv.elim" 40 $ "elimView (projections reduced) of " <+> prettyTCM v pv <- projView v case pv of NoProjection{} -> return v LoneProjectionLike f ai | loneProjToLambda -> return $ Lam ai $ Abs "r" $ Var 0 [Proj ProjPrefix f] | otherwise -> return v ProjectionView f a es -> (`applyE` (Proj ProjPrefix f : es)) <$> elimView loneProjToLambda (unArg a) -- | Which @Def@types are eligible for the principle argument -- of a projection-like function? eligibleForProjectionLike :: (HasConstInfo m) => QName -> m Bool eligibleForProjectionLike d = eligible . theDef <$> getConstInfo d where eligible = \case Datatype{} -> True Record{} -> True Axiom{} -> True DataOrRecSig{} -> True GeneralizableVar{} -> False Function{} -> False Primitive{} -> False Constructor{} -> __IMPOSSIBLE__ AbstractDefn d -> eligible d -- Andreas, 2017-08-14, issue #2682: -- Abstract records still export the projections. -- Andreas, 2016-10-11 AIM XXIV -- Projection-like at abstract types violates the parameter reconstructibility property. -- See test/Fail/AbstractTypeProjectionLike. -- | Turn a definition into a projection if it looks like a projection. -- -- Conditions for projection-likeness of @f@: -- -- 1. The type of @f@ must be of the shape @Γ → D Γ → C@ for @D@ -- a name (@Def@) which is 'eligibleForProjectionLike': -- @data@ / @record@ / @postulate@. -- -- 2. The application of f should only get stuck if the principal argument -- is inferable (neutral). Thus: -- -- a. @f@ cannot have absurd clauses (which are stuck even if the principal -- argument is a constructor) -- -- b. @f@ cannot be abstract as it does not reduce outside abstract blocks -- (always stuck). -- -- c. @f@ cannot match on other arguments than the principal argument. -- -- d. @f@ cannot match deeply. -- -- e. @f@s body may not mention the paramters. -- -- For internal reasons: -- -- 3. @f@ cannot be constructor headed -- -- 4. @f@ cannot be recursive, since we have not implemented a function -- which goes through the bodies of the @f@ and the mutually recursive -- functions and drops the parameters from all applications of @f@. -- -- Examples for these reasons: see test/Succeed/NotProjectionLike.agda makeProjection :: QName -> TCM () makeProjection x = -- if True then return () else do inTopContext $ do reportSLn "tc.proj.like" 70 $ "Considering " ++ prettyShow x ++ " for projection likeness" defn <- getConstInfo x let t = defType defn reportSDoc "tc.proj.like" 20 $ sep [ "Checking for projection likeness " , prettyTCM x <+> " : " <+> prettyTCM t ] case theDef defn of Function{funClauses = cls} | any (isNothing . clauseBody) cls -> reportSLn "tc.proj.like" 30 $ " projection-like functions cannot have absurd clauses" -- Constructor-headed functions can't be projection-like (at the moment). The reason -- for this is that invoking constructor-headedness will circumvent the inference of -- the dropped arguments. -- Nor can abstract definitions be projection-like since they won't reduce -- outside the abstract block. def@Function{funProjection = Nothing, funClauses = cls, funSplitTree = st0, funCompiled = cc0, funInv = NotInjective, funMutual = Just [], -- Andreas, 2012-09-28: only consider non-mutual funs (or those whose recursion status has not yet been determined) funAbstr = ConcreteDef} -> do ps0 <- filterM validProj $ candidateArgs [] t reportSLn "tc.proj.like" 30 $ if null ps0 then " no candidates found" else " candidates: " ++ show ps0 unless (null ps0) $ do -- Andreas 2012-09-26: only consider non-recursive functions for proj.like. -- Issue 700: problems with recursive funs. in term.checker and reduction ifM recursive (reportSLn "tc.proj.like" 30 $ " recursive functions are not considered for projection-likeness") $ do {- else -} case lastMaybe (filter (checkOccurs cls . snd) ps0) of Nothing -> reportSDoc "tc.proj.like" 50 $ nest 2 $ vcat [ "occurs check failed" , nest 2 $ "clauses =" vcat (map pretty cls) ] Just (d, n) -> do -- Yes, we are projection-like! reportSDoc "tc.proj.like" 10 $ sep [ prettyTCM x <+> " : " <+> prettyTCM t , text $ " is projection like in argument " ++ show n ++ " for type " ++ show d ] __CRASH_WHEN__ "tc.proj.like.crash" 1000 let cls' = map (dropArgs n) cls cc = dropArgs n cc0 st = dropArgs n st0 reportSLn "tc.proj.like" 60 $ " rewrote clauses to\n " ++ show cc -- Andreas, 2013-10-20 build parameter dropping function let pIndex = n + 1 tel = take pIndex $ telToList $ theTel $ telView' t unless (length tel == pIndex) __IMPOSSIBLE__ let projection = Projection { projProper = Nothing , projOrig = x , projFromType = d , projIndex = pIndex , projLams = ProjLams $ map (argFromDom . fmap fst) tel } let newDef = def { funProjection = Just projection , funClauses = cls' , funSplitTree = st , funCompiled = cc , funInv = dropArgs n $ funInv def } addConstant x $ defn { defPolarity = drop n $ defPolarity defn , defArgOccurrences = drop n $ defArgOccurrences defn , defDisplay = [] , theDef = newDef } Function{funInv = Inverse{}} -> reportSLn "tc.proj.like" 30 $ " injective functions can't be projections" Function{funAbstr = AbstractDef} -> reportSLn "tc.proj.like" 30 $ " abstract functions can't be projections" Function{funProjection = Just{}} -> reportSLn "tc.proj.like" 30 $ " already projection like" Function{funMutual = Just (_:_)} -> reportSLn "tc.proj.like" 30 $ " mutual functions can't be projections" Function{funMutual = Nothing} -> reportSLn "tc.proj.like" 30 $ " mutuality check has not run yet" Axiom -> reportSLn "tc.proj.like" 30 $ " not a function, but Axiom" DataOrRecSig{} -> reportSLn "tc.proj.like" 30 $ " not a function, but DataOrRecSig" GeneralizableVar{} -> reportSLn "tc.proj.like" 30 $ " not a function, but GeneralizableVar" AbstractDefn{} -> reportSLn "tc.proj.like" 30 $ " not a function, but AbstractDefn" Constructor{} -> reportSLn "tc.proj.like" 30 $ " not a function, but Constructor" Datatype{} -> reportSLn "tc.proj.like" 30 $ " not a function, but Datatype" Primitive{} -> reportSLn "tc.proj.like" 30 $ " not a function, but Primitive" Record{} -> reportSLn "tc.proj.like" 30 $ " not a function, but Record" where -- @validProj (d,n)@ checks whether the head @d@ of the type of the -- @n@th argument is injective in all args (i.d. being name of data/record/axiom). validProj :: (Arg QName, Int) -> TCM Bool validProj (_, 0) = return False validProj (d, _) = eligibleForProjectionLike (unArg d) -- NOTE: If the following definition turns out to be slow, then -- one could perhaps reuse information computed by the termination -- and/or positivity checkers. recursive = do occs <- computeOccurrences x case Map.lookup (ADef x) occs of Just n | n >= 1 -> return True -- recursive occurrence _ -> return False checkOccurs cls n = all (nonOccur n) cls nonOccur n cl = and [ take n p == [0..n - 1] , onlyMatch n ps -- projection-like functions are only allowed to match on the eliminatee -- otherwise we may end up projecting from constructor applications, in -- which case we can't reconstruct the dropped parameters , checkBody m n b ] where Perm _ p = fromMaybe __IMPOSSIBLE__ $ clausePerm cl ps = namedClausePats cl b = compiledClauseBody cl -- Renumbers variables to match order in patterns -- and includes dot patterns as variables. m = size $ concatMap patternVars ps -- This also counts dot patterns! onlyMatch n ps = all (shallowMatch . namedArg) (take 1 ps1) && noMatches (ps0 ++ drop 1 ps1) where (ps0, ps1) = splitAt n ps shallowMatch (ConP _ _ ps) = noMatches ps shallowMatch _ = True noMatches = all (noMatch . namedArg) noMatch ConP{} = False noMatch DefP{} = False noMatch LitP{} = False noMatch ProjP{}= False noMatch VarP{} = True noMatch DotP{} = True noMatch IApplyP{} = True -- Make sure non of the parameters occurs in the body of the function. checkBody m n b = not . getAny $ runFree badVar IgnoreNot b where badVar x = Any $ m - n <= x && x < m -- @candidateArgs [var 0,...,var(n-1)] t@ adds @(n,d)@ to the output, -- if @t@ is a function-type with domain @t 0 .. (n-1)@ -- (the domain of @t@ is the type of the arg @n@). -- -- This means that from the type of arg @n@ all previous arguments -- can be computed by a simple matching. -- (Provided the @d@ is data/record/postulate, checked in @validProj@). -- -- E.g. f : {x : _}(y : _){z : _} -> D x y z -> ... -- will return (D,3) as a candidate (amongst maybe others). -- candidateArgs :: [Term] -> Type -> [(Arg QName, Int)] candidateArgs vs t = case unEl t of Pi a b | Def d es <- unEl $ unDom a, Just us <- allApplyElims es, vs == map unArg us -> (d <$ argFromDom a, length vs) : candidateRec b | otherwise -> candidateRec b _ -> [] where candidateRec NoAbs{} = [] candidateRec (Abs x t) = candidateArgs (var (size vs) : vs) t Agda-2.6.0.1/src/full/Agda/TypeChecking/Generalize.hs0000644000000000000000000011257313466402171020300 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Generalize ( generalizeType , generalizeType' , generalizeTelescope ) where import Control.Arrow ((***), first, second) import Control.Monad import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Data.List (nub, partition, init, sortBy) import Data.Monoid import Data.Function (on) import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Concrete.Name (LensInScope(..)) import Agda.Syntax.Position import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.Syntax.Literal import Agda.Syntax.Scope.Monad (bindVariable) import Agda.Syntax.Scope.Base (Binder(..)) import Agda.TypeChecking.Monad import Agda.TypeChecking.Abstract import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.Free import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.InstanceArguments (postponeInstanceConstraints) import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Warnings import Agda.Benchmarking (Phase(Typing, Generalize)) import Agda.Utils.Benchmark import Agda.Utils.Except import Agda.Utils.Functor import Agda.Utils.Impossible import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Size import Agda.Utils.Singleton import Agda.Utils.Permutation import qualified Agda.Utils.Graph.TopSort as Graph #include "undefined.h" -- | Generalize a telescope over a set of generalizable variables. generalizeTelescope :: Map QName Name -> (forall a. (Telescope -> TCM a) -> TCM a) -> ([Maybe Name] -> Telescope -> TCM a) -> TCM a generalizeTelescope vars typecheckAction ret | Map.null vars = typecheckAction (ret []) generalizeTelescope vars typecheckAction ret = billTo [Typing, Generalize] $ withGenRecVar $ \ genRecMeta -> do let s = Set.fromList (Map.keys vars) ((cxtNames, tel, letbinds), namedMetas, allmetas) <- createMetasAndTypeCheck s $ typecheckAction $ \ tel -> do cxt <- take (size tel) <$> getContext lbs <- getLetBindings -- This gives let-bindings valid in the current context return (map (fst . unDom) cxt, tel, lbs) -- Translate the QName to the corresponding bound variable (genTel, genTelNames, sub) <- computeGeneralization genRecMeta namedMetas allmetas let boundVar q = fromMaybe __IMPOSSIBLE__ $ Map.lookup q vars genTelVars = (map . fmap) boundVar genTelNames tel' <- applySubst sub <$> instantiateFull tel -- This is not so nice. When changing the context from Γ (r : R) to Γ Δ we need to do this at the -- level of contexts (as a Context -> Context function), so we repeat the name logic here. Take -- care to preserve the name of named generalized variables. let setName name d = first (const name) <$> d cxtEntry (mname, d) = do name <- maybe (setNotInScope <$> freshName_ s) return mname return $ setName name d where s = fst $ unDom d dropCxt err = updateContext (strengthenS err 1) (drop 1) genTelCxt <- dropCxt __IMPOSSIBLE__ $ mapM cxtEntry $ reverse $ zip genTelVars $ telToList genTel -- For the explicit module telescope we get the names from the typecheck -- action. let newTelCxt = zipWith setName cxtNames $ reverse $ telToList tel' -- We are in context Γ (r : R) and should call the continuation in context Γ Δ Θρ passing it Δ Θρ -- We have -- Γ (r : R) ⊢ Θ Θ = tel -- Γ ⊢ Δ Δ = genTel -- Γ Δ ⊢ ρ : Γ (r : R) ρ = sub -- Γ ⊢ Δ Θρ Θρ = tel' -- And we shouldn't forget about the let-bindings (#3470) -- Γ (r : R) Θ ⊢ letbinds -- Γ Δ Θρ ⊢ letbinds' = letbinds(lift |Θ| ρ) letbinds' <- applySubst (liftS (size tel) sub) <$> instantiateFull letbinds let addLet (x, (v, dom)) = addLetBinding' x v dom updateContext sub ((genTelCxt ++) . drop 1) $ updateContext (raiseS (size tel')) (newTelCxt ++) $ foldr addLet (ret genTelVars $ abstract genTel tel') letbinds' -- | Generalize a type over a set of (used) generalizable variables. generalizeType :: Set QName -> TCM Type -> TCM ([Maybe QName], Type) generalizeType s typecheckAction = do (ns, t, _) <- generalizeType' s $ (,()) <$> typecheckAction return (ns, t) -- | Allow returning additional information from the type checking action. generalizeType' :: Set QName -> TCM (Type, a) -> TCM ([Maybe QName], Type, a) generalizeType' s typecheckAction = billTo [Typing, Generalize] $ withGenRecVar $ \ genRecMeta -> do ((t, userdata), namedMetas, allmetas) <- createMetasAndTypeCheck s typecheckAction (genTel, genTelNames, sub) <- computeGeneralization genRecMeta namedMetas allmetas t' <- abstract genTel . applySubst sub <$> instantiateFull t reportSDoc "tc.generalize" 40 $ vcat [ "generalized" , nest 2 $ "t =" <+> escapeContext 1 (prettyTCM t') ] return (genTelNames, t', userdata) -- | Create metas for the generalizable variables and run the type check action. createMetasAndTypeCheck :: Set QName -> TCM a -> TCM (a, Map MetaId QName, IntSet) createMetasAndTypeCheck s typecheckAction = do ((namedMetas, x), allmetas) <- metasCreatedBy $ do (metamap, genvals) <- createGenValues s x <- locallyTC eGeneralizedVars (const genvals) typecheckAction return (metamap, x) return (x, namedMetas, allmetas) -- | Add a placeholder variable that will be substituted with a record value packing up all the -- generalized variables. withGenRecVar :: (Type -> TCM a) -> TCM a withGenRecVar ret = do -- Create a meta type (in Set₀) for the telescope record. It won't -- necessarily fit in Set₀, but since it's only used locally the sort -- shouldn't matter. Another option would be to put it in Setω, which is a -- bit more honest, but this leads to performance problems (see #3306). genRecMeta <- newTypeMeta (mkType 0) addContext (defaultDom ("genTel" :: String, genRecMeta)) $ ret genRecMeta -- | Compute the generalized telescope from metas created when checking the type/telescope to be -- generalized. Called in the context extended with the telescope record variable (whose type is -- the first argument). Returns the telescope of generalized variables and a substitution from -- this telescope to the current context. computeGeneralization :: Type -> Map MetaId name -> IntSet -> TCM (Telescope, [Maybe name], Substitution) computeGeneralization genRecMeta nameMap allmetas = postponeInstanceConstraints $ do -- Pair metas with their metaInfo mvs <- mapM ((\ x -> (x,) <$> lookupMeta x) . MetaId) $ IntSet.toList allmetas constrainedMetas <- Set.unions <.> mapM (constraintMetas . clValue . theConstraint) =<< ((++) <$> useTC stAwakeConstraints <*> useTC stSleepingConstraints) let isConstrained x = Set.member x constrainedMetas -- Note: Always generalize named metas even if they are constrained. We -- freeze them so they won't be instantiated by the constraint, and we do -- want the nice error from checking the constraint after generalization. -- See #3276. isGeneralizable (x, mv) = Map.member x nameMap || not (isConstrained x) && YesGeneralize == unArg (miGeneralizable (mvInfo mv)) isSort = isSortMeta_ . snd isOpen = isOpenMeta . mvInstantiation . snd -- Split the generalizable metas in open and closed let (generalizable, nongeneralizable) = partition isGeneralizable mvs (generalizableOpen', generalizableClosed) = partition isOpen generalizable (openSortMetas, generalizableOpen) = partition isSort generalizableOpen' nongeneralizableOpen = filter isOpen nongeneralizable -- Issue 3301: We can't generalize over sorts case openSortMetas of [] -> return () ms -> warning $ CantGeneralizeOverSorts (map fst ms) -- Any meta in the solution of a generalizable meta should be generalized over (if possible). cp <- viewTC eCurrentCheckpoint let canGeneralize x | isConstrained x = return False canGeneralize x = do mv <- lookupMeta x msub <- enterClosure (miClosRange $ mvInfo mv) $ \ _ -> checkpointSubstitution' cp let sameContext = -- We can only generalize if the metavariable takes the context variables of the -- current context as arguments. This happens either when the context of the meta -- is the same as the current context and there is no pruning, or the meta context -- is a weakening but the extra variables have been pruned. -- It would be possible to generalize also in the case when some context variables -- (other than genTel) have been pruned, but it's hard to construct an example -- where this actually happens. case (msub, mvPermutation mv) of (Just IdS, Perm m xs) -> xs == [0 .. m - 1] (Just (Wk n IdS), Perm m xs) -> xs == [0 .. m - n - 1] _ -> False when (not sameContext) $ do ty <- getMetaType x let Perm m xs = mvPermutation mv reportSDoc "tc.generalize" 20 $ vcat [ text "Don't know how to generalize over" , nest 2 $ prettyTCM x <+> text ":" <+> prettyTCM ty , text "in context" , nest 2 $ inTopContext . prettyTCM =<< getContextTelescope , text "permutation:" <+> text (show (m, xs)) , text "subst:" <+> pretty msub ] return sameContext inherited <- fmap Set.unions $ forM generalizableClosed $ \ (x, mv) -> case mvInstantiation mv of InstV _ v -> do parentName <- getMetaNameSuggestion x metas <- filterM canGeneralize . allMetasList =<< instantiateFull v let suggestNames i [] = return () suggestNames i (m : ms) = do name <- getMetaNameSuggestion m case name of "" -> do setMetaNameSuggestion m (parentName ++ "." ++ show i) suggestNames (i + 1) ms _ -> suggestNames i ms Set.fromList metas <$ suggestNames 1 metas _ -> __IMPOSSIBLE__ let (alsoGeneralize, reallyDontGeneralize) = partition (`Set.member` inherited) $ map fst nongeneralizableOpen generalizeOver = map fst generalizableOpen ++ alsoGeneralize shouldGeneralize = (`Set.member` Set.fromList generalizeOver) -- Sort metas in dependency order. Include open metas that we are not -- generalizing over, since they will need to be pruned appropriately (see -- Issue 3672). allSortedMetas <- sortMetas (generalizeOver ++ reallyDontGeneralize) let sortedMetas = filter shouldGeneralize allSortedMetas let dropCxt err = updateContext (strengthenS err 1) (drop 1) -- Create the pre-record type (we don't yet know the types of the fields) (genRecName, genRecCon, genRecFields) <- dropCxt __IMPOSSIBLE__ $ createGenRecordType genRecMeta sortedMetas -- Solve the generalizable metas. Each generalizable meta is solved by projecting the -- corresponding field from the genTel record. cxtTel <- getContextTelescope let solve m field = do -- m should not be instantiated, but if we don't check constraints -- properly it could be (#3666 and #3667). Fail hard instead of -- generating bogus types. whenM (isInstantiatedMeta m) __IMPOSSIBLE__ assignTerm' m (telToArgs cxtTel) $ Var 0 [Proj ProjSystem field] zipWithM_ solve sortedMetas genRecFields -- Record the named variables in the telescope let telNames = map (`Map.lookup` nameMap) sortedMetas -- Build the telescope of generalized metas teleTypes <- do args <- getContextArgs fmap concat $ forM sortedMetas $ \ m -> do mv <- lookupMeta m let info = getArgInfo $ miGeneralizable $ mvInfo mv HasType{ jMetaType = t } = mvJudgement mv return [(Arg info $ miNameSuggestion $ mvInfo mv, piApply t args)] let genTel = buildGeneralizeTel genRecCon teleTypes reportSDoc "tc.generalize" 40 $ vcat [ text "genTel =" <+> prettyTCM genTel ] -- Now we need to prune the unsolved metas to make sure they respect the new -- dependencies (#3672). Also update interaction points to point to pruned metas. let inscope (ii, InteractionPoint{ipMeta = Just x}) | IntSet.member (metaId x) allmetas = [(x, ii)] inscope _ = [] ips <- Map.fromList . concatMap inscope . Map.toList <$> useTC stInteractionPoints pruneUnsolvedMetas genRecName genRecCon genTel genRecFields ips shouldGeneralize allSortedMetas -- Fill in the missing details of the telescope record. dropCxt __IMPOSSIBLE__ $ fillInGenRecordDetails genRecName genRecCon genRecFields genRecMeta genTel -- Now abstract over the telescope. We need to apply the substitution that subsitutes a record -- value packing up the generalized variables for the genTel variable. let sub = unpackSub genRecCon (map (argInfo . fst) teleTypes) (length teleTypes) return (genTel, telNames, sub) -- | Prune unsolved metas (#3672). The input includes also the generalized metas and is sorted in -- dependency order. The telescope is the generalized telescope. pruneUnsolvedMetas :: QName -> ConHead -> Telescope -> [QName] -> Map MetaId InteractionId -> (MetaId -> Bool) -> [MetaId] -> TCM () pruneUnsolvedMetas genRecName genRecCon genTel genRecFields interactionPoints isGeneralized metas | all isGeneralized metas = return () | otherwise = prune [] genTel metas where prune _ _ [] = return () prune cxt tel (x : xs) | not (isGeneralized x) = do -- If x is a blocked term we shouldn't instantiate it. whenM (not <$> isBlockedTerm x) $ do x <- if size tel > 0 then prePrune x else return x pruneMeta (telFromList $ reverse cxt) x prune cxt tel xs prune cxt (ExtendTel a tel) (x : xs) = prune (fmap (x,) a : cxt) (unAbs tel) xs where x = absName tel prune _ _ _ = __IMPOSSIBLE__ sub = unpackSub genRecCon $ map getArgInfo $ telToList genTel prepruneError :: MetaId -> String -> TCM a prepruneError x code = do r <- getMetaRange x let msg = "Congratulations! You have found an easter egg (#" ++ code ++ "). " ++ "Be the first to submit a self-contained test case (max 50 lines of code) " ++ "producing this error message to https://github.com/agda/agda/issues/3672 " ++ "to receive a small prize." cause = "The error is caused by complicated dependencies between unsolved " ++ "metavariables and generalized variables. In particular, this meta:" genericDocError =<< (fwords msg $+$ sep [fwords cause, nest 2 $ prettyTCM (MetaV x []) <+> "at" <+> pretty r] ) -- If one of the fields depend on this meta, we have to make sure that this meta doesn't depend -- on any variables introduced after the genRec. See test/Fail/Issue3672b.agda for a test case. prePrune x = do cp <- viewTC eCurrentCheckpoint mv <- lookupMeta x (i, _A) <- enterClosure (miClosRange $ mvInfo mv) $ \ _ -> do δ <- checkpointSubstitution cp _A <- case mvJudgement mv of IsSort{} -> return Nothing HasType{} -> Just <$> getMetaTypeInContext x case δ of Wk n IdS -> return (n, _A) IdS -> return (0, _A) _ -> prepruneError x "RFCX" if i == 0 then return x else do reportSDoc "tc.generalize.prune.pre" 40 $ vcat [ "prepruning" , nest 2 $ pretty x <+> ":" <+> pretty (jMetaType $ mvJudgement mv) , nest 2 $ "|Δ| =" <+> pshow i ] -- We have -- Γ (r : GenRec) current context -- Γ (r : GenRec) Δ ⊢ x : A with |Δ| = i -- and we need to get rid of the dependency on Δ. -- We can only do this if A does not depend on Δ, so check this first. case IntSet.minView (allFreeVars _A) of Just (j, _) | j < i -> prepruneError x "FVTY" _ -> return () -- If it doesn't we can strenghten it to the current context (this is done by -- newMetaFromOld). -- Γ (r : GenRec) ⊢ ρ : Γ (r : GenRec) Δ let ρ = strengthenS __IMPOSSIBLE__ i ρ' = raiseS i (y, u) <- newMetaFromOld mv ρ _A let uρ' = applySubst ρ' u reportSDoc "tc.generalize.prune.pre" 40 $ nest 2 $ vcat [ "u =" <+> pretty u , "uρ⁻¹ =" <+> pretty uρ' ] -- To solve it we enter the context of x again enterClosure (miClosRange $ mvInfo mv) $ \ _ -> do -- v is x applied to the context variables v <- case _A of Nothing -> Sort . MetaS x . map Apply <$> getMetaContextArgs mv Just{} -> MetaV x . map Apply <$> getMetaContextArgs mv noConstraints (doPrune x mv _A v uρ') `catchError` \ _ -> prepruneError x "INST" setInteractionPoint x y return y pruneMeta _Θ x = do cp <- viewTC eCurrentCheckpoint mv <- lookupMeta x -- The reason we are doing all this inside the closure of x is so that if x is an interaction -- meta we get the right context for the pruned interaction meta. enterClosure (miClosRange $ mvInfo mv) $ \ _ -> -- If we can't find the generalized record, it's already been pruned and we don't have to do -- anything. whenJustM (findGenRec mv) $ \ i -> do reportSDoc "tc.generalize.prune" 30 $ vcat [ "pruning" , nest 2 $ inTopContext $ prettyTCM (mvJudgement mv) , nest 2 $ "GenRecTel is var" <+> pretty i ] _ΓrΔ <- getContextTelescope let (_Γ, _Δ) = (telFromList gs, telFromList ds) where (gs, _ : ds) = splitAt (size _ΓrΔ - i - 1) (telToList _ΓrΔ) -- Get the type of x. By doing this here we let the checkpoint machinery sort out the _A <- case mvJudgement mv of IsSort{} -> return Nothing HasType{} -> Just <$> getMetaTypeInContext x -- We have -- Γ (r : GenTel) Δ current context -- Γ₀ (r : GenTel) top context -- Γ₀ ⊢ Θ prefix of the generalized telescope currently in scope -- Γ (r : GenTel) Δ ⊢ x : A the meta to prune -- Get the substitution from the point of generalization to the current context. This always -- succeeds since if the meta depends on GenTel it must have been created inside the -- generalization: -- Γ (r : GenTel) Δ ⊢ δ : Γ₀ (r : GenTel) δ <- checkpointSubstitution cp -- v is x applied to the context variables v <- case _A of Nothing -> Sort . MetaS x . map Apply <$> getMetaContextArgs mv Just{} -> MetaV x . map Apply <$> getMetaContextArgs mv -- Now ultimately we want to create the fresh meta in the context -- Γ Θγ Δσ where Γ ⊢ γ : Γ₀ -- Γ Θγ ⊢ σ : Γ (r : GenTel) -- σ is the unpacking substitution (which is polymorphic in Γ) let σ = sub (size _Θ) -- Γ <- Γ (r : GenTel) Δ <- Γ₀ (r : GenTel) <- Γ₀ γ = strengthenS __IMPOSSIBLE__ (i + 1) `composeS` δ `composeS` raiseS 1 _Θγ = applySubst γ _Θ _Δσ = applySubst σ _Δ -- The substitution into the new context is simply lifting σ over Δ: -- Γ Θγ Δσ ⊢ lift i σ : Γ (r : GenTel) Δ let ρ = liftS i σ -- We also need ρ⁻¹, which is a lot easier to construct. ρ' = liftS i $ [ Var 0 [Proj ProjSystem fld] | fld <- reverse $ take (size _Θ) $ genRecFields ] ++# raiseS 1 reportSDoc "tc.generalize.prune" 30 $ nest 2 $ vcat [ "Γ =" <+> pretty _Γ , "Θ =" <+> pretty _Θ , "Δ =" <+> pretty _Δ , "σ =" <+> pretty σ , "γ =" <+> pretty γ , "δ =" <+> pretty δ , "ρ =" <+> pretty ρ , "ρ⁻¹ =" <+> pretty ρ' , "Θγ =" <+> pretty _Θγ , "Δσ =" <+> pretty _Δσ , "_A =" <+> pretty _A ] -- When updating the context we also need to pick names for the variables. Get them from the -- current context and generate fresh ones for the generalized variables in Θ. (newCxt, rΘ) <- do (rΔ, _ : rΓ) <- splitAt i <$> getContext let setName = traverse $ \ (s, ty) -> (,ty) <$> freshName_ s rΘ <- mapM setName $ reverse $ telToList _Θγ let rΔσ = zipWith (\ name dom -> first (const name) <$> dom) (map (fst . unDom) rΔ) (reverse $ telToList _Δσ) return (rΔσ ++ rΘ ++ rΓ, rΘ) -- Now we can enter the new context and create our meta variable. (y, u) <- updateContext ρ (const newCxt) $ localScope $ do -- First, we add the named variables to the scope, to allow -- them to be used in holes (#3341). addNamedVariablesToScope rΘ -- Now we can create the new meta newMetaFromOld mv ρ _A -- Finally we solve x := yρ⁻¹. The reason for solving it this way instead of xρ := y is that -- ρ contains dummy terms for the variables that are not in scope. -- If x has been instantiated by some constraint unblocked by previous pruning or -- generalization, use equalTerm instead of assigning to x. If this fails (see -- test/Fail/Issue3655b.agda for a test case), we need to give an error. This can happen if -- there are dependencies between generalized variables that are hidden by constraints and -- the dependency sorting happens to pick the wrong order. For instance, if we have -- α : Nat (unsolved meta) -- t : F α (named variable) -- n : Nat (named variable) -- and a constraint F α == F n, where F does some pattern matching preventing the constraint -- to be solved when n is still a meta. If t appears before n in the type these will be sorted -- as α, t, n, but we will solve α := n before we get to the pruning here. It's good that we -- solve first though, because that means we can give a more informative error message than -- the "Cannot instantiate..." we would otherwise get. let uρ' = applySubst ρ' u reportSDoc "tc.generalize.prune" 80 $ vcat [ "solving" , nest 2 $ sep [ pretty v <+> "==" , pretty uρ' <+> ":" , pretty _A ] ] noConstraints (doPrune x mv _A v uρ') `catchError` niceError x v reportSDoc "tc.generalize.prune" 80 $ vcat [ "solved" , nest 2 $ "v =" <+> (pretty =<< instantiateFull v) , nest 2 $ "uρ⁻¹ =" <+> (pretty =<< instantiateFull uρ') ] setInteractionPoint x y findGenRec :: MetaVariable -> TCM (Maybe Int) findGenRec mv = do cxt <- instantiateFull =<< getContext let notPruned = [ i | i <- permute (takeP (length cxt) $ mvPermutation mv) $ reverse $ zipWith const [0..] cxt ] case [ i | (i, Dom{unDom = (_, El _ (Def q _))}) <- zip [0..] cxt, q == genRecName, elem i notPruned ] of [] -> return Nothing _:_:_ -> __IMPOSSIBLE__ [i] -> return (Just i) -- Nothing if sort meta newMetaFromOld :: MetaVariable -> Substitution -> Maybe Type -> TCM (MetaId, Term) newMetaFromOld mv ρ mA = setCurrentRange mv $ case mA of Nothing -> do s @ (MetaS y _) <- newSortMeta return (y, Sort s) Just _A -> do let _Aρ = applySubst ρ _A newNamedValueMeta DontRunMetaOccursCheck (miNameSuggestion $ mvInfo mv) _Aρ -- If x is a hole, update the hole to point to y instead. setInteractionPoint x y = whenJust (Map.lookup x interactionPoints) (`connectInteractionPoint` y) doPrune :: MetaId -> MetaVariable -> Maybe Type -> Term -> Term -> TCM () doPrune x mv _A v u = case _A of _ | isOpen -> assign DirEq x (getArgs v) u Nothing -> equalSort (unwrapSort v) (unwrapSort u) Just _A -> equalTerm _A v u where isOpen = isOpenMeta $ mvInstantiation mv getArgs v = case v of Sort (MetaS _ es) -> unApply es MetaV _ es -> unApply es _ -> __IMPOSSIBLE__ where unApply es = fromMaybe __IMPOSSIBLE__ $ allApplyElims es unwrapSort (Sort s) = s unwrapSort _ = __IMPOSSIBLE__ niceError x u err = do u <- instantiateFull u let err' = case err of TypeError{tcErrClosErr = cl} -> -- Remove the 'when' part from the error since it's most like the same as ours. err{ tcErrClosErr = cl{ clEnv = (clEnv cl) { envCall = Nothing } } } _ -> err telList = telToList genTel names = map (fst . unDom) telList late = map (fst . unDom) $ filter (getAny . allMetas (Any . (== x))) telList projs (Proj _ q) | elem q genRecFields = Set.fromList [x | Just x <- [getGeneralizedFieldName q]] projs _ = Set.empty early = Set.toList $ flip foldTerm u $ \ case Var _ es -> foldMap projs es Def _ es -> foldMap projs es MetaV _ es -> foldMap projs es _ -> Set.empty commas [] = __IMPOSSIBLE__ commas [x] = x commas [x, y] = x ++ ", and " ++ y commas (x : xs) = x ++ ", " ++ commas xs cause = "There were unsolved constraints that obscured the " ++ "dependencies between the generalized variables." solution = "The most reliable solution is to provide enough information to make the dependencies " ++ "clear, but simply mentioning the variables in the right order should also work." order = sep [ fwords "Dependency analysis suggested this (likely incorrect) order:", nest 2 $ fwords (unwords names) ] guess = "After constraint solving it looks like " ++ commas late ++ " actually depend" ++ s ++ " on " ++ commas early where s | length late == 1 = "s" | otherwise = "" genericDocError =<< vcat [ fwords $ "Variable generalization failed." , nest 2 $ sep ["- Probable cause", nest 4 $ fwords cause] , nest 2 $ sep ["- Suggestion", nest 4 $ fwords solution] , nest 2 $ sep $ ["- Further information" , nest 2 $ "-" <+> order ] ++ [ nest 2 $ "-" <+> fwords guess | not (null late), not (null early) ] ++ [ nest 2 $ "-" <+> sep [ fwords "The dependency I error is", prettyTCM err' ] ] ] addNamedVariablesToScope cxt = forM_ cxt $ \ Dom{ unDom = (x, _) } -> do -- Recognize named variables by lack of '.' (TODO: hacky!) reportSLn "tc.generalize.eta.scope" 40 $ "Adding (or not) " ++ show (nameConcrete x) ++ " to the scope" when ('.' `notElem` show (nameConcrete x)) $ do reportSLn "tc.generalize.eta.scope" 40 " (added)" bindVariable LambdaBound (nameConcrete x) x -- | Create a substition from a context where the i first record fields are variables to a context -- where you have a single variable of the record type. Packs up the field variables in a record -- constructor and pads with __DUMMY_TERM__s for the missing fields. Important that you apply this -- to terms that only projects the defined fields from the record variable. -- Used with partial record values when building the telescope of generalized variables in which -- case we have done the dependency analysis that guarantees it is safe. unpackSub :: ConHead -> [ArgInfo] -> Int -> Substitution unpackSub con infos i = recSub where ar = length infos appl info v = Apply (Arg info v) recVal = Con con ConOSystem $ zipWith appl infos $ [var j | j <- [i - 1, i - 2..0]] ++ replicate (ar - i) __DUMMY_TERM__ -- want: Γ Δᵢ ⊢ recSub i : Γ (r : R) -- have: -- Γ Δᵢ ⊢ recVal i :# σ : Θ (r : R), if Γ Δᵢ ⊢ σ : Θ -- Γ Δᵢ ⊢ WkS i IdS : Γ recSub = recVal :# Wk i IdS -- | Takes the list of types -- A₁ [] -- A₂ [r.f₁] -- A₃ [r.f₂, r.f₃] -- ... -- And builds the telescope -- (x₁ : A₁ [ r := c _ .. _ ]) -- (x₂ : A₂ [ r := c x₁ _ .. _ ]) -- (x₃ : A₃ [ r := c x₁ x₂ _ .. _ ]) -- ... buildGeneralizeTel :: ConHead -> [(Arg String, Type)] -> Telescope buildGeneralizeTel con xs = go 0 xs where infos = map (argInfo . fst) xs recSub i = unpackSub con infos i go _ [] = EmptyTel go i ((name, ty) : xs) = ExtendTel (dom ty') $ Abs (unArg name) $ go (i + 1) xs where ty' = applySubst (recSub i) ty dom = defaultNamedArgDom (getArgInfo name) (unArg name) -- | Create metas for all used generalizable variables and their dependencies. createGenValues :: Set QName -> TCM (Map MetaId QName, Map QName GeneralizedValue) createGenValues s = do genvals <- locallyTC eGeneralizeMetas (const YesGeneralize) $ forM (sortBy (compare `on` getRange) $ Set.toList s) createGenValue let metaMap = Map.fromList [ (m, x) | (x, m, _) <- genvals ] nameMap = Map.fromList [ (x, v) | (x, _, v) <- genvals ] return (metaMap, nameMap) -- | Create a generalisable meta for a generalisable variable. createGenValue :: QName -> TCM (QName, MetaId, GeneralizedValue) createGenValue x = setCurrentRange x $ do cp <- viewTC eCurrentCheckpoint def <- instantiateDef =<< getConstInfo x -- Only prefix of generalizable arguments (for now?) let nGen = case defArgGeneralizable def of NoGeneralizableArgs -> 0 SomeGeneralizableArgs n -> n ty = defType def TelV tel _ = telView' ty -- Generalizable variables are never explicit, so if they're given as -- explicit we default to hidden. hideExplicit arg | visible arg = hide arg | otherwise = arg argTel = telFromList $ map hideExplicit $ take nGen $ telToList tel args <- newTelMeta argTel let metaType = piApply ty args name = show (nameConcrete $ qnameName x) (m, term) <- newNamedValueMeta DontRunMetaOccursCheck name metaType -- Freeze the meta to prevent named generalizable metas to be instantiated. updateMetaVar m $ \ mv -> mv { mvFrozen = Frozen } -- Set up names of arg metas forM_ (zip3 [1..] (map unArg args) (telToList argTel)) $ \ case (i, MetaV m _, Dom{unDom = (x, _)}) -> do let suf "_" = show i suf "" = show i suf x = x setMetaNameSuggestion m (name ++ "." ++ suf x) _ -> return () -- eta expanded -- Update the ArgInfos for the named meta. The argument metas are -- created with the correct ArgInfo. setMetaArgInfo m $ hideExplicit (defArgInfo def) reportSDoc "tc.generalize" 50 $ vcat [ "created metas for generalized variable" <+> prettyTCM x , nest 2 $ "top =" <+> prettyTCM term , nest 2 $ "args =" <+> prettyTCM args ] case term of MetaV{} -> return () _ -> genericDocError =<< ("Cannot generalize over" <+> prettyTCM x <+> "of eta-expandable type") prettyTCM metaType return (x, m, GeneralizedValue{ genvalCheckpoint = cp , genvalTerm = term , genvalType = metaType }) -- | Sort metas in dependency order. sortMetas :: [MetaId] -> TCM [MetaId] sortMetas metas = do metaGraph <- concat <$> do forM metas $ \ m -> do deps <- allMetas (\ m' -> if m' `elem` metas then singleton m' else mempty) <$> getType m return [ (m, m') | m' <- Set.toList deps ] caseMaybe (Graph.topSort metas metaGraph) (typeError GeneralizeCyclicDependency) return where -- Sort metas don't have types, but we still want to sort them. getType m = do mv <- lookupMeta m case mvJudgement mv of IsSort{} -> return Nothing HasType{ jMetaType = t } -> Just <$> instantiateFull t -- | Create a not-yet correct record type for the generalized telescope. It's not yet correct since -- we haven't computed the telescope yet, and we need the record type to do it. createGenRecordType :: Type -> [MetaId] -> TCM (QName, ConHead, [QName]) createGenRecordType genRecMeta@(El genRecSort _) sortedMetas = do current <- currentModule let freshQName s = qualify current <$> freshName_ (s :: String) mkFieldName = freshQName . (generalizedFieldName ++) <=< getMetaNameSuggestion genRecFields <- mapM (defaultArg <.> mkFieldName) sortedMetas genRecName <- freshQName "GeneralizeTel" genRecCon <- freshQName "mkGeneralizeTel" <&> \ con -> ConHead { conName = con , conInductive = Inductive , conFields = genRecFields } forM_ (zip sortedMetas genRecFields) $ \ (meta, fld) -> do fieldTy <- getMetaType meta let field = unArg fld addConstant field $ defaultDefn (argInfo fld) field fieldTy $ let proj = Projection { projProper = Just genRecName , projOrig = field , projFromType = defaultArg genRecName , projIndex = 1 , projLams = ProjLams [defaultArg "gtel"] } in Function { funClauses = [] , funCompiled = Nothing , funSplitTree = Nothing , funTreeless = Nothing , funInv = NotInjective , funMutual = Just [] , funAbstr = ConcreteDef , funDelayed = NotDelayed , funProjection = Just proj , funFlags = Set.empty , funTerminates = Just True , funExtLam = Nothing , funWith = Nothing , funCopatternLHS = False , funCovering = [] } addConstant (conName genRecCon) $ defaultDefn defaultArgInfo (conName genRecCon) __DUMMY_TYPE__ $ -- Filled in later Constructor { conPars = 0 , conArity = length genRecFields , conSrcCon = genRecCon , conData = genRecName , conAbstr = ConcreteDef , conInd = Inductive , conComp = (emptyCompKit, Nothing) , conForced = [] , conErased = [] } let dummyTel 0 = EmptyTel dummyTel n = ExtendTel (defaultDom __DUMMY_TYPE__) $ Abs "_" $ dummyTel (n - 1) addConstant genRecName $ defaultDefn defaultArgInfo genRecName (sort genRecSort) $ Record { recPars = 0 , recClause = Nothing , recConHead = genRecCon , recNamedCon = False , recFields = genRecFields , recTel = dummyTel (length genRecFields) -- Filled in later , recMutual = Just [] , recEtaEquality' = Inferred YesEta , recInduction = Nothing , recAbstr = ConcreteDef , recComp = emptyCompKit } reportSDoc "tc.generalize" 40 $ vcat [ text "created genRec" <+> text (show genRecFields) ] -- Solve the genRecMeta args <- getContextArgs let genRecTy = El genRecSort $ Def genRecName $ map Apply args noConstraints $ equalType genRecTy genRecMeta return (genRecName, genRecCon, map unArg genRecFields) -- | Once we have the generalized telescope we can fill in the missing details of the record type. fillInGenRecordDetails :: QName -> ConHead -> [QName] -> Type -> Telescope -> TCM () fillInGenRecordDetails name con fields recTy fieldTel = do cxtTel <- fmap hideAndRelParams <$> getContextTelescope let fullTel = cxtTel `abstract` fieldTel -- Field types let mkFieldTypes [] EmptyTel = [] mkFieldTypes (fld : flds) (ExtendTel ty ftel) = abstract cxtTel (El s $ Pi (defaultDom recTy) (Abs "r" $ unDom ty)) : mkFieldTypes flds (absApp ftel proj) where s = PiSort (getSort recTy) (Abs "r" $ getSort ty) proj = Var 0 [Proj ProjSystem fld] mkFieldTypes _ _ = __IMPOSSIBLE__ let fieldTypes = mkFieldTypes fields (raise 1 fieldTel) reportSDoc "tc.generalize" 40 $ text "Field types:" <+> inTopContext (nest 2 $ vcat $ map prettyTCM fieldTypes) zipWithM_ setType fields fieldTypes -- Constructor type let conType = fullTel `abstract` raise (size fieldTel) recTy reportSDoc "tc.generalize" 40 $ text "Final genRecCon type:" <+> inTopContext (prettyTCM conType) setType (conName con) conType -- Record telescope: Includes both parameters and fields. modifyGlobalDefinition name $ \ r -> r { theDef = (theDef r) { recTel = fullTel } } where setType q ty = modifyGlobalDefinition q $ \ d -> d { defType = ty } Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise.hs0000644000000000000000000002016413466402171020125 0ustar0000000000000000 -- Andreas, Makoto, Francesco 2014-10-15 AIM XX: -- -O2 does not have any noticable effect on runtime -- but sabotages cabal repl with -Werror -- (due to a conflict with --interactive warning) -- {-# OPTIONS_GHC -O2 #-} -- | Structure-sharing serialisation of Agda interface files. -- -!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!- -- NOTE: Every time the interface format is changed the interface -- version number should be bumped _in the same patch_. -- -- See 'currentInterfaceVersion' below. -- -- -!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!- module Agda.TypeChecking.Serialise ( encode, encodeFile, encodeInterface , decode, decodeFile, decodeInterface, decodeHashes , EmbPrj ) where import Control.Arrow (second) import Control.DeepSeq import qualified Control.Exception as E import Control.Monad import Control.Monad.Reader import Control.Monad.State.Strict import Data.Array.IArray import Data.Word import qualified Data.ByteString.Lazy as L import qualified Data.HashTable.IO as H import qualified Data.Map as Map import qualified Data.Binary as B import qualified Data.Binary.Get as B import qualified Data.Binary.Put as B import qualified Data.List as List import Data.Function import qualified Codec.Compression.GZip as G import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances () import Agda.TypeChecking.Monad import Agda.Utils.Hash import Agda.Utils.IORef import Agda.Utils.Lens import Agda.Utils.Except -- Note that the Binary instance for Int writes 64 bits, but throws -- away the 32 high bits when reading (at the time of writing, on -- 32-bit machines). Word64 does not have these problems. currentInterfaceVersion :: Word64 currentInterfaceVersion = 20190328 * 10 + 0 -- | Encodes something. To ensure relocatability file paths in -- positions are replaced with module names. encode :: EmbPrj a => a -> TCM L.ByteString encode a = do collectStats <- hasVerbosity "profile.serialize" 20 fileMod <- sourceToModule newD@(Dict nD sD bD iD dD _tD _nameD _qnameD nC sC bC iC dC tC nameC qnameC stats _ _) <- liftIO $ emptyDict collectStats root <- liftIO $ (`runReaderT` newD) $ do icodeFileMod fileMod -- Only fills absPathD from fileMod icode a nL <- benchSort $ l nD sL <- benchSort $ l sD bL <- benchSort $ l bD iL <- benchSort $ l iD dL <- benchSort $ l dD -- Record reuse statistics. verboseS "profile.sharing" 10 $ do statistics "pointers" tC verboseS "profile.serialize" 10 $ do statistics "Integer" iC statistics "String" sC statistics "Text" bC statistics "Double" dC statistics "Node" nC statistics "Shared Term" tC statistics "A.QName" qnameC statistics "A.Name" nameC when collectStats $ do stats <- Map.fromList . map (second toInteger) <$> do liftIO $ H.toList stats modifyStatistics $ Map.union stats -- Encode hashmaps and root, and compress. bits1 <- Bench.billTo [ Bench.Serialization, Bench.BinaryEncode ] $ return $!! B.encode (root, nL, sL, bL, iL, dL) let compressParams = G.defaultCompressParams { G.compressLevel = G.bestSpeed , G.compressStrategy = G.huffmanOnlyStrategy } cbits <- Bench.billTo [ Bench.Serialization, Bench.Compress ] $ return $!! G.compressWith compressParams bits1 let x = B.encode currentInterfaceVersion `L.append` cbits return x where l h = List.map fst . List.sortBy (compare `on` snd) <$> H.toList h benchSort = Bench.billTo [Bench.Serialization, Bench.Sort] . liftIO statistics :: String -> IORef FreshAndReuse -> TCM () statistics kind ioref = do FreshAndReuse fresh reused <- liftIO $ readIORef ioref tickN (kind ++ " (fresh)") $ fromIntegral fresh tickN (kind ++ " (reused)") $ fromIntegral reused -- encode :: EmbPrj a => a -> TCM L.ByteString -- encode a = do -- fileMod <- sourceToModule -- (x, shared, total) <- liftIO $ do -- newD@(Dict nD sD iD dD _ _ _ _ _ stats _) <- emptyDict fileMod -- root <- runReaderT (icode a) newD -- nL <- l nD; sL <- l sD; iL <- l iD; dL <- l dD -- (shared, total) <- readIORef stats -- return (B.encode currentInterfaceVersion `L.append` -- G.compress (B.encode (root, nL, sL, iL, dL)), shared, total) -- verboseS "profile.sharing" 10 $ do -- tickN "pointers (reused)" $ fromIntegral shared -- tickN "pointers" $ fromIntegral total -- return x -- where -- l h = List.map fst . List.sortBy (compare `on` snd) <$> H.toList h -- | Decodes something. The result depends on the include path. -- -- Returns 'Nothing' if the input does not start with the right magic -- number or some other decoding error is encountered. decode :: EmbPrj a => L.ByteString -> TCM (Maybe a) decode s = do mf <- useTC stModuleToSource incs <- getIncludeDirs -- Note that B.runGetState and G.decompress can raise errors if the -- input is malformed. The decoder is (intended to be) strict enough -- to ensure that all such errors can be caught by the handler here. (mf, r) <- liftIO $ E.handle (\(E.ErrorCall s) -> noResult s) $ do (ver, s, _) <- return $ runGetState B.get s 0 if ver /= currentInterfaceVersion then noResult "Wrong interface version." else do ((r, nL, sL, bL, iL, dL), s, _) <- return $ runGetState B.get (G.decompress s) 0 if s /= L.empty -- G.decompress seems to throw away garbage at the end, so -- the then branch is possibly dead code. then noResult "Garbage at end." else do st <- St (ar nL) (ar sL) (ar bL) (ar iL) (ar dL) <$> liftIO H.new <*> return mf <*> return incs (r, st) <- runStateT (runExceptT (value r)) st return (Just $ modFile st, r) case mf of Nothing -> return () Just mf -> stModuleToSource `setTCLens` mf case r of Right x -> return (Just x) Left err -> do reportSLn "import.iface" 5 $ "Error when decoding interface file" -- Andreas, 2014-06-11 deactivated debug printing -- in order to get rid of dependency of Serialize on TCM.Pretty -- reportSDoc "import.iface" 5 $ -- "Error when decoding interface file:" -- $+$ nest 2 (prettyTCM err) return Nothing where ar l = listArray (0, List.genericLength l - 1) l noResult s = return (Nothing, Left $ GenericError s) encodeInterface :: Interface -> TCM L.ByteString encodeInterface i = L.append hashes <$> encode i where hashes :: L.ByteString hashes = B.runPut $ B.put (iSourceHash i) >> B.put (iFullHash i) -- | Encodes something. To ensure relocatability file paths in -- positions are replaced with module names. encodeFile :: FilePath -> Interface -> TCM () encodeFile f i = liftIO . L.writeFile f =<< encodeInterface i -- | Decodes something. The result depends on the include path. -- -- Returns 'Nothing' if the file does not start with the right magic -- number or some other decoding error is encountered. decodeInterface :: L.ByteString -> TCM (Maybe Interface) decodeInterface s = decode $ L.drop 16 s decodeHashes :: L.ByteString -> Maybe (Hash, Hash) decodeHashes s | L.length s < 16 = Nothing | otherwise = Just $ B.runGet getH $ L.take 16 s where getH = (,) <$> B.get <*> B.get decodeFile :: FilePath -> TCM (Maybe Interface) decodeFile f = decodeInterface =<< liftIO (L.readFile f) -- | Store a 'SourceToModule' (map from 'AbsolutePath' to 'TopLevelModuleName') -- as map from 'AbsolutePath' to 'Int32', in order to directly get the identifiers -- from absolute pathes rather than going through top level module names. icodeFileMod :: SourceToModule -- ^ Maps file names to the corresponding module names. -- Must contain a mapping for every file name that is later encountered. -> S () icodeFileMod fileMod = do hmap <- asks absPathD forM_ (Map.toList fileMod) $ \ (absolutePath, topLevelModuleName) -> do i <- icod_ topLevelModuleName liftIO $ H.insert hmap absolutePath i Agda-2.6.0.1/src/full/Agda/TypeChecking/Conversion.hs0000644000000000000000000022760713466402171020345 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Conversion where import Control.Monad import Control.Monad.Reader import Control.Monad.State import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.IntSet as IntSet import Agda.Syntax.Abstract.Views (isSet) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Translation.InternalToAbstract (reify) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.CompiledClause (CompiledClauses'(Fail)) import Agda.TypeChecking.MetaVars import Agda.TypeChecking.MetaVars.Occurs (killArgs,PruneResult(..),rigidVarsNotContainedIn) import Agda.TypeChecking.Names import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import qualified Agda.TypeChecking.SyntacticEquality as SynEq import Agda.TypeChecking.Telescope import Agda.TypeChecking.Constraints import {-# SOURCE #-} Agda.TypeChecking.CheckInternal (infer) import Agda.TypeChecking.Errors import Agda.TypeChecking.Forcing (isForced, nextIsForced) import Agda.TypeChecking.Free import Agda.TypeChecking.Datatypes (getConType, getFullyAppliedConType) import Agda.TypeChecking.Records import Agda.TypeChecking.Pretty import Agda.TypeChecking.Injectivity import Agda.TypeChecking.Polarity import Agda.TypeChecking.SizedTypes import Agda.TypeChecking.Level import Agda.TypeChecking.Implicit (implicitArgs) import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.ProjectionLike (elimView) import Agda.TypeChecking.Primitive import Agda.Interaction.Options import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Functor import Agda.Utils.Monad import Agda.Utils.Maybe import Agda.Utils.Size import Agda.Utils.Tuple import Agda.Utils.Lens #include "undefined.h" import Agda.Utils.Impossible -- | Try whether a computation runs without errors or new constraints -- (may create new metas, though). -- Restores state upon failure. tryConversion :: TCM () -> TCM Bool tryConversion = isJust <.> tryConversion' -- | Try whether a computation runs without errors or new constraints -- (may create new metas, though). -- Return 'Just' the result upon success. -- Return 'Nothing' and restore state upon failure. tryConversion' :: TCM a -> TCM (Maybe a) tryConversion' m = tryMaybe $ noConstraints m -- | Check if to lists of arguments are the same (and all variables). -- Precondition: the lists have the same length. sameVars :: Elims -> Elims -> Bool sameVars xs ys = and $ zipWith same xs ys where same (Apply (Arg _ (Var n []))) (Apply (Arg _ (Var m []))) = n == m same _ _ = False -- | @intersectVars us vs@ checks whether all relevant elements in @us@ and @vs@ -- are variables, and if yes, returns a prune list which says @True@ for -- arguments which are different and can be pruned. intersectVars :: Elims -> Elims -> Maybe [Bool] intersectVars = zipWithM areVars where -- ignore irrelevant args areVars (Apply u) v | isIrrelevant u = Just False -- do not prune areVars (Apply (Arg _ (Var n []))) (Apply (Arg _ (Var m []))) = Just $ n /= m -- prune different vars areVars _ _ = Nothing equalTerm :: Type -> Term -> Term -> TCM () equalTerm = compareTerm CmpEq equalAtom :: Type -> Term -> Term -> TCM () equalAtom = compareAtom CmpEq equalType :: Type -> Type -> TCM () equalType = compareType CmpEq {- Comparing in irrelevant context always succeeds. However, we might want to dig for solutions of irrelevant metas. To this end, we can just ignore errors during conversion checking. -} -- convError :: MonadTCM tcm => TypeError -> tcm a -- | Ignore errors in irrelevant context. convError :: TypeError -> TCM () convError err = ifM ((==) Irrelevant <$> asksTC envRelevance) (return ()) $ typeError err -- | Type directed equality on values. -- compareTerm :: Comparison -> Type -> Term -> Term -> TCM () -- If one term is a meta, try to instantiate right away. This avoids unnecessary unfolding. -- Andreas, 2012-02-14: This is UNSOUND for subtyping! compareTerm cmp a u v = do reportSDoc "tc.conv.term" 10 $ sep [ "compareTerm" , nest 2 $ prettyTCM u <+> prettyTCM cmp <+> prettyTCM v , nest 2 $ ":" <+> prettyTCM a ] -- Check syntactic equality. This actually saves us quite a bit of work. ((u, v), equal) <- SynEq.checkSyntacticEquality u v -- OLD CODE, traverses the *full* terms u v at each step, even if they -- are different somewhere. Leads to infeasibility in issue 854. -- (u, v) <- instantiateFull (u, v) -- let equal = u == v if equal then verboseS "profile.sharing" 20 $ tick "equal terms" else do verboseS "profile.sharing" 20 $ tick "unequal terms" reportSDoc "tc.conv.term" 15 $ sep [ "compareTerm (not syntactically equal)" , nest 2 $ prettyTCM u <+> prettyTCM cmp <+> prettyTCM v , nest 2 $ ":" <+> prettyTCM a ] -- If we are at type Size, we cannot short-cut comparison -- against metas by assignment. -- Andreas, 2014-04-12: this looks incomplete. -- It seems to assume we are never comparing -- at function types into Size. let fallback = compareTerm' cmp a u v unlessSubtyping cont = if cmp == CmpEq then cont else do -- Andreas, 2014-04-12 do not short cut if type is blocked. ifBlockedType a (\ _ _ -> fallback) {-else-} $ \ _ a -> do -- do not short circuit size comparison! caseMaybeM (isSizeType a) cont (\ _ -> fallback) dir = fromCmp cmp rid = flipCmp dir -- The reverse direction. Bad name, I know. case (u, v) of (MetaV x us, MetaV y vs) | x /= y -> unlessSubtyping $ solve1 `orelse` solve2 `orelse` compareTerm' cmp a u v | otherwise -> fallback where (solve1, solve2) | x > y = (assign dir x us v, assign rid y vs u) | otherwise = (assign rid y vs u, assign dir x us v) (MetaV x us, _) -> unlessSubtyping $ assign dir x us v `orelse` fallback (_, MetaV y vs) -> unlessSubtyping $ assign rid y vs u `orelse` fallback _ -> fallback where assign dir x es v = do -- Andreas, 2013-10-19 can only solve if no projections reportSDoc "tc.conv.term.shortcut" 20 $ sep [ "attempting shortcut" , nest 2 $ prettyTCM (MetaV x es) <+> ":=" <+> prettyTCM v ] ifM (isInstantiatedMeta x) patternViolation {-else-} $ do assignE dir x es v $ compareTermDir dir a reportSDoc "tc.conv.term.shortcut" 50 $ "shortcut successful" $$ nest 2 ("result:" <+> (pretty =<< instantiate (MetaV x es))) -- Should be ok with catchError_ but catchError is much safer since we don't -- rethrow errors. orelse m h = catchError m (\_ -> h) -- | Try to assign meta. If meta is projected, try to eta-expand -- and run conversion check again. assignE :: CompareDirection -> MetaId -> Elims -> Term -> (Term -> Term -> TCM ()) -> TCM () assignE dir x es v comp = assignWrapper dir x es v $ do case allApplyElims es of Just vs -> assignV dir x vs v Nothing -> do reportSDoc "tc.conv.assign" 30 $ sep [ "assigning to projected meta " , prettyTCM x <+> sep (map prettyTCM es) <+> text (":" ++ show dir) <+> prettyTCM v ] etaExpandMeta [Records] x res <- isInstantiatedMeta' x case res of Just u -> do reportSDoc "tc.conv.assign" 30 $ sep [ "seems like eta expansion instantiated meta " , prettyTCM x <+> text (":" ++ show dir) <+> prettyTCM u ] let w = u `applyE` es comp w v Nothing -> do reportSLn "tc.conv.assign" 30 "eta expansion did not instantiate meta" patternViolation -- nothing happened, give up compareTermDir :: CompareDirection -> Type -> Term -> Term -> TCM () compareTermDir dir a = dirToCmp (`compareTerm'` a) dir compareTerm' :: Comparison -> Type -> Term -> Term -> TCM () compareTerm' cmp a m n = verboseBracket "tc.conv.term" 20 "compareTerm" $ do a' <- reduce a catchConstraint (ValueCmp cmp a' m n) $ do reportSDoc "tc.conv.term" 30 $ fsep [ "compareTerm", prettyTCM m, prettyTCM cmp, prettyTCM n, ":", prettyTCM a' ] propIrr <- isPropEnabled isSize <- isJust <$> isSizeType a' s <- reduce $ getSort a' mlvl <- tryMaybe primLevel reportSDoc "tc.conv.level" 60 $ nest 2 $ sep [ "a' =" <+> pretty a' , "mlvl =" <+> pretty mlvl , text $ "(Just (unEl a') == mlvl) = " ++ show (Just (unEl a') == mlvl) ] case s of Prop{} | propIrr -> compareIrrelevant a' m n _ | isSize -> compareSizes cmp m n _ -> case unEl a' of a | Just a == mlvl -> do a <- levelView m b <- levelView n equalLevel a b a@Pi{} -> equalFun s a m n Lam _ _ -> __IMPOSSIBLE__ Def r es -> do isrec <- isEtaRecord r if isrec then do sig <- getSignature let ps = fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- Andreas, 2010-10-11: allowing neutrals to be blocked things does not seem -- to change Agda's behavior -- isNeutral Blocked{} = False isNeutral (NotBlocked _ Con{}) = return False -- Andreas, 2013-09-18 / 2015-06-29: a Def by copatterns is -- not neutral if it is blocked (there can be missing projections -- to trigger a reduction. isNeutral (NotBlocked r (Def q _)) = do -- Andreas, 2014-12-06 optimize this using r !! not <$> usesCopatterns q -- a def by copattern can reduce if projected isNeutral _ = return True isMeta (NotBlocked _ MetaV{}) = True isMeta _ = False reportSDoc "tc.conv.term" 30 $ prettyTCM a <+> "is eta record type" m <- reduceB m mNeutral <- isNeutral m n <- reduceB n nNeutral <- isNeutral n case (m, n) of _ | isMeta m || isMeta n -> compareAtom cmp a' (ignoreBlocking m) (ignoreBlocking n) _ | mNeutral && nNeutral -> do -- Andreas 2011-03-23: (fixing issue 396) -- if we are dealing with a singleton record, -- we can succeed immediately isSing <- isSingletonRecordModuloRelevance r ps case isSing of Right True -> return () -- do not eta-expand if comparing two neutrals _ -> compareAtom cmp a' (ignoreBlocking m) (ignoreBlocking n) _ -> do (tel, m') <- etaExpandRecord r ps $ ignoreBlocking m (_ , n') <- etaExpandRecord r ps $ ignoreBlocking n -- No subtyping on record terms c <- getRecordConstructor r -- Record constructors are covariant (see test/succeed/CovariantConstructors). compareArgs (repeat $ polFromCmp cmp) [] (telePi_ tel __DUMMY_TYPE__) (Con c ConOSystem []) m' n' else (do pathview <- pathView a' equalPath pathview a' m n) _ -> compareAtom cmp a' m n where -- equality at function type (accounts for eta) equalFun :: Sort -> Term -> Term -> Term -> TCM () equalFun s a@(Pi dom b) m n | domFinite dom = do mp <- fmap getPrimName <$> getBuiltin' builtinIsOne case unEl $ unDom dom of Def q [Apply phi] | Just q == mp -> compareTermOnFace cmp (unArg phi) (El s (Pi (dom {domFinite = False}) b)) m n _ -> equalFun s (Pi (dom{domFinite = False}) b) m n equalFun _ (Pi dom@Dom{domInfo = info} b) m n | not $ domFinite dom = do name <- freshName_ $ suggest (absName b) ("x" :: String) addContext (name, dom) $ compareTerm cmp (absBody b) m' n' where (m',n') = raise 1 (m,n) `apply` [Arg info $ var 0] equalFun _ _ _ _ = __IMPOSSIBLE__ equalPath :: PathView -> Type -> Term -> Term -> TCM () equalPath (PathType s _ l a x y) _ m n = do name <- freshName_ ("i" :: String) interval <- el primInterval let (m',n') = raise 1 (m, n) `applyE` [IApply (raise 1 $ unArg x) (raise 1 $ unArg y) (var 0)] addContext (name, defaultDom interval) $ compareTerm cmp (El (raise 1 s) $ (raise 1 $ unArg a) `apply` [argN $ var 0]) m' n' equalPath OType{} a' m n = cmpDef a' m n cmpDef a'@(El s ty) m n = do mI <- getBuiltinName' builtinInterval mIsOne <- getBuiltinName' builtinIsOne mGlue <- getPrimitiveName' builtinGlue mSub <- getBuiltinName' builtinSub case ty of Def q es | Just q == mIsOne -> return () Def q es | Just q == mGlue, Just args@(l:_:a:phi:_) <- allApplyElims es -> do ty <- el' (pure $ unArg l) (pure $ unArg a) unglue <- prim_unglue let mkUnglue m = apply unglue $ map (setHiding Hidden) args ++ [argN m] reportSDoc "conv.glue" 20 $ prettyTCM (ty,mkUnglue m,mkUnglue n) compareTermOnFace cmp (unArg phi) ty m n compareTerm cmp ty (mkUnglue m) (mkUnglue n) Def q es | Just q == mSub, Just args@(l:a:_) <- allApplyElims es -> do ty <- el' (pure $ unArg l) (pure $ unArg a) out <- primSubOut let mkOut m = apply out $ map (setHiding Hidden) args ++ [argN m] compareTerm cmp ty (mkOut m) (mkOut n) Def q [] | Just q == mI -> compareInterval cmp a' m n _ -> compareAtom cmp a' m n -- | @compareTel t1 t2 cmp tel1 tel1@ checks whether pointwise -- @tel1 \`cmp\` tel2@ and complains that @t2 \`cmp\` t1@ failed if -- not. compareTel :: Type -> Type -> Comparison -> Telescope -> Telescope -> TCM () compareTel t1 t2 cmp tel1 tel2 = verboseBracket "tc.conv.tel" 20 "compareTel" $ catchConstraint (TelCmp t1 t2 cmp tel1 tel2) $ case (tel1, tel2) of (EmptyTel, EmptyTel) -> return () (EmptyTel, _) -> bad (_, EmptyTel) -> bad (ExtendTel dom1{-@(Dom i1 a1)-} tel1, ExtendTel dom2{-@(Dom i2 a2)-} tel2) -> do compareDom cmp dom1 dom2 tel1 tel2 bad bad $ compareTel t1 t2 cmp (absBody tel1) (absBody tel2) where -- Andreas, 2011-05-10 better report message about types bad = typeError $ UnequalTypes cmp t2 t1 -- switch t2 and t1 because of contravariance! -- | Raise 'UnequalTerms' if there is no hope that by -- meta solving and subsequent eta-contraction these -- terms could become equal. -- Precondition: the terms are in reduced form -- (with no top-level pointer) and -- failed to be equal in the 'compareAtom' check. -- -- By eta-contraction, a lambda or a record constructor term -- can become anything. etaInequal :: Comparison -> Type -> Term -> Term -> TCM () etaInequal cmp t m n = do let inequal = typeError $ UnequalTerms cmp m n t dontKnow = do reportSDoc "tc.conv.inequal" 20 $ hsep [ "etaInequal: postponing " , prettyTCM m , " != " , prettyTCM n ] patternViolation -- if type is not blocked, then we would have tried eta already flip (ifBlockedType t) (\ _ _ -> inequal) $ \ _ _ -> do -- type is blocked case (m, n) of (Con{}, _) -> dontKnow (_, Con{}) -> dontKnow (Lam{}, _) -> dontKnow (_, Lam{}) -> dontKnow _ -> inequal compareAtomDir :: CompareDirection -> Type -> Term -> Term -> TCM () compareAtomDir dir a = dirToCmp (`compareAtom` a) dir -- | Compute the head type of an elimination. For projection-like functions -- this requires inferring the type of the principal argument. computeElimHeadType :: QName -> Elims -> Elims -> TCM Type computeElimHeadType f es es' = do def <- getConstInfo f -- To compute the type @a@ of a projection-like @f@, -- we have to infer the type of its first argument. if projectionArgs (theDef def) <= 0 then return $ defType def else do -- Find an first argument to @f@. let arg = case (es, es') of (Apply arg : _, _) -> arg (_, Apply arg : _) -> arg _ -> __IMPOSSIBLE__ -- Infer its type. reportSDoc "tc.conv.infer" 30 $ "inferring type of internal arg: " <+> prettyTCM arg targ <- infer $ unArg arg reportSDoc "tc.conv.infer" 30 $ "inferred type: " <+> prettyTCM targ -- getDefType wants the argument type reduced. -- Andreas, 2016-02-09, Issue 1825: The type of arg might be -- a meta-variable, e.g. in interactive development. -- In this case, we postpone. fromMaybeM patternViolation $ getDefType f =<< reduce targ -- | Syntax directed equality on atomic values -- compareAtom :: Comparison -> Type -> Term -> Term -> TCM () compareAtom cmp t m n = verboseBracket "tc.conv.atom" 20 "compareAtom" $ -- if a PatternErr is thrown, rebuild constraint! catchConstraint (ValueCmp cmp t m n) $ do reportSDoc "tc.conv.atom" 50 $ "compareAtom" <+> fsep [ prettyTCM m <+> prettyTCM cmp , prettyTCM n , ":" <+> prettyTCM t ] -- Andreas: what happens if I cut out the eta expansion here? -- Answer: Triggers issue 245, does not resolve 348 (mb',nb') <- ifM (asksTC envCompareBlocked) ((notBlocked -*- notBlocked) <$> reduce (m,n)) $ do mb' <- etaExpandBlocked =<< reduceB m nb' <- etaExpandBlocked =<< reduceB n return (mb', nb') -- constructorForm changes literal to constructors -- only needed if the other side is not a literal (mb'', nb'') <- case (ignoreBlocking mb', ignoreBlocking nb') of (Lit _, Lit _) -> return (mb', nb') _ -> (,) <$> traverse constructorForm mb' <*> traverse constructorForm nb' mb <- traverse unLevel mb'' nb <- traverse unLevel nb'' let m = ignoreBlocking mb n = ignoreBlocking nb postpone = addConstraint $ ValueCmp cmp t m n checkSyntacticEquality = ifNotM (optSyntacticEquality <$> pragmaOptions) postpone $ do n <- normalise n -- is this what we want? m <- normalise m if m == n then return () -- Check syntactic equality for blocked terms else postpone dir = fromCmp cmp rid = flipCmp dir -- The reverse direction. Bad name, I know. assign dir x es v = assignE dir x es v $ compareAtomDir dir t reportSDoc "tc.conv.atom" 30 $ "compareAtom" <+> fsep [ prettyTCM mb <+> prettyTCM cmp , prettyTCM nb , ":" <+> prettyTCM t ] reportSDoc "tc.conv.atom" 80 $ "compareAtom" <+> fsep [ (text . show) mb <+> prettyTCM cmp , (text . show) nb , ":" <+> (text . show) t ] case (mb, nb) of -- equate two metas x and y. if y is the younger meta, -- try first y := x and then x := y (NotBlocked _ (MetaV x xArgs), NotBlocked _ (MetaV y yArgs)) | x == y -> case intersectVars xArgs yArgs of -- all relevant arguments are variables Just kills -> do -- kills is a list with 'True' for each different var killResult <- killArgs kills x case killResult of NothingToPrune -> return () PrunedEverything -> return () PrunedNothing -> postpone PrunedSomething -> postpone -- not all relevant arguments are variables Nothing -> checkSyntacticEquality -- Check syntactic equality on meta-variables -- (same as for blocked terms) | otherwise -> do [p1, p2] <- mapM getMetaPriority [x,y] -- First try the one with the highest priority. If that doesn't -- work, try the low priority one. let (solve1, solve2) | (p1, x) > (p2, y) = (l1, r2) | otherwise = (r1, l2) where l1 = assign dir x xArgs n r1 = assign rid y yArgs m -- Careful: the first attempt might prune the low -- priority meta! (Issue #2978) l2 = ifM (isInstantiatedMeta x) (compareTermDir dir t m n) l1 r2 = ifM (isInstantiatedMeta y) (compareTermDir rid t n m) r1 try m h = m `catchError_` \err -> case err of PatternErr{} -> h _ -> throwError err try solve1 solve2 -- one side a meta, the other an unblocked term (NotBlocked _ (MetaV x es), _) -> assign dir x es n (_, NotBlocked _ (MetaV x es)) -> assign rid x es m (Blocked{}, Blocked{}) -> checkSyntacticEquality (Blocked{}, _) -> useInjectivity (fromCmp cmp) t m n -- The blocked term goes first (_, Blocked{}) -> useInjectivity (flipCmp $ fromCmp cmp) t n m _ -> do -- -- Andreas, 2013-10-20 put projection-like function -- -- into the spine, to make compareElims work. -- -- 'False' means: leave (Def f []) unchanged even for -- -- proj-like funs. -- m <- elimView False m -- n <- elimView False n -- Andreas, 2015-07-01, actually, don't put them into the spine. -- Polarity cannot be communicated properly if projection-like -- functions are post-fix. case (m, n) of (Pi{}, Pi{}) -> equalFun m n (Sort s1, Sort s2) -> compareSort CmpEq s1 s2 (Lit l1, Lit l2) | l1 == l2 -> return () (Var i es, Var i' es') | i == i' -> do a <- typeOfBV i -- Variables are invariant in their arguments compareElims [] [] a (var i) es es' -- The case of definition application: (Def f es, Def f' es') -> do -- 1. All absurd lambdas are equal. unlessM (bothAbsurd f f') $ do -- 2. If the heads are unequal, the only chance is subtyping between SIZE and SIZELT. if f /= f' then trySizeUniv cmp t m n f es f' es' else do -- 3. If the heads are equal: -- 3a. If there are no arguments, we are done. unless (null es && null es') $ do -- 3b. If some cubical magic kicks in, we are done. unlessM (compareEtaPrims f es es') $ do -- 3c. Oh no, we actually have to work and compare the eliminations! a <- computeElimHeadType f es es' -- The polarity vector of projection-like functions -- does not include the parameters. pol <- getPolarity' cmp f compareElims pol [] a (Def f []) es es' -- Due to eta-expansion, these constructors are fully applied. (Con x ci xArgs, Con y _ yArgs) | x == y -> do -- Get the type of the constructor instantiated to the datatype parameters. a' <- conType x t forcedArgs <- getForcedArgs $ conName x -- Constructors are covariant in their arguments -- (see test/succeed/CovariantConstructors). compareElims (repeat $ polFromCmp cmp) forcedArgs a' (Con x ci []) xArgs yArgs _ -> etaInequal cmp t m n -- fixes issue 856 (unsound conversion error) where -- returns True in case we handled the comparison already. compareEtaPrims :: QName -> Elims -> Elims -> TCM Bool compareEtaPrims q es es' = do munglue <- getPrimitiveName' builtin_unglue msubout <- getPrimitiveName' builtinSubOut case () of _ | Just q == munglue -> compareUnglueApp q es es' _ | Just q == msubout -> compareSubApp q es es' _ -> return False compareSubApp q es es' = do let (as,bs) = splitAt 5 es; (as',bs') = splitAt 5 es' case (allApplyElims as, allApplyElims as') of (Just [a,bA,phi,u,x], Just [a',bA',phi',u',x']) -> do tSub <- primSub -- Andrea, 28-07-16: -- comparing the types is most probably wasteful, -- since b and b' should be neutral terms, but it's a -- precondition for the compareAtom call to make -- sense. equalType (El Inf $ apply tSub $ [a] ++ map (setHiding NotHidden) [bA,phi,u]) (El Inf $ apply tSub $ [a] ++ map (setHiding NotHidden) [bA',phi',u']) compareAtom cmp (El Inf $ apply tSub $ [a] ++ map (setHiding NotHidden) [bA,phi,u]) (unArg x) (unArg x') compareElims [] [] (El (tmSort (unArg a)) (unArg bA)) (Def q as) bs bs' return True _ -> return False compareUnglueApp q es es' = do let (as,bs) = splitAt 7 es; (as',bs') = splitAt 7 es' case (allApplyElims as, allApplyElims as') of (Just [la,lb,bA,phi,bT,e,b], Just [la',lb',bA',phi',bT',e',b']) -> do tGlue <- getPrimitiveTerm builtinGlue -- Andrea, 28-07-16: -- comparing the types is most probably wasteful, -- since b and b' should be neutral terms, but it's a -- precondition for the compareAtom call to make -- sense. -- equalType (El (tmSort (unArg lb)) $ apply tGlue $ [la,lb] ++ map (setHiding NotHidden) [bA,phi,bT,e]) -- (El (tmSort (unArg lb')) $ apply tGlue $ [la',lb'] ++ map (setHiding NotHidden) [bA',phi',bT',e']) compareAtom cmp (El (tmSort (unArg lb)) $ apply tGlue $ [la,lb] ++ map (setHiding NotHidden) [bA,phi,bT,e]) (unArg b) (unArg b') compareElims [] [] (El (tmSort (unArg la)) (unArg bA)) (Def q as) bs bs' return True _ -> return False -- Andreas, 2013-05-15 due to new postponement strategy, type can now be blocked conType c t = ifBlockedType t (\ _ _ -> patternViolation) $ \ _ t -> do let impossible = do reportSDoc "impossible" 10 $ "expected data/record type, found " <+> prettyTCM t reportSDoc "impossible" 70 $ nest 2 $ "raw =" <+> pretty t -- __IMPOSSIBLE__ -- Andreas, 2013-10-20: in case termination checking fails -- we might get some unreduced types here. -- In issue 921, this happens during the final attempt -- to solve left-over constraints. -- Thus, instead of crashing, just give up gracefully. patternViolation maybe impossible (return . snd) =<< getFullyAppliedConType c t equalFun t1 t2 = case (t1, t2) of (Pi dom1 b1, Pi dom2 b2) -> do verboseBracket "tc.conv.fun" 15 "compare function types" $ do reportSDoc "tc.conv.fun" 20 $ nest 2 $ vcat [ "t1 =" <+> prettyTCM t1 , "t2 =" <+> prettyTCM t2 ] compareDom cmp dom2 dom1 b1 b2 errH errR $ compareType cmp (absBody b1) (absBody b2) where errH = typeError $ UnequalHiding t1 t2 errR = typeError $ UnequalRelevance cmp t1 t2 _ -> __IMPOSSIBLE__ -- | Check whether @a1 `cmp` a2@ and continue in context extended by @a1@. compareDom :: Free c => Comparison -- ^ @cmp@ The comparison direction -> Dom Type -- ^ @a1@ The smaller domain. -> Dom Type -- ^ @a2@ The other domain. -> Abs b -- ^ @b1@ The smaller codomain. -> Abs c -- ^ @b2@ The bigger codomain. -> TCM () -- ^ Continuation if mismatch in 'Hiding'. -> TCM () -- ^ Continuation if mismatch in 'Relevance'. -> TCM () -- ^ Continuation if comparison is successful. -> TCM () compareDom cmp dom1@(Dom{domInfo = i1, unDom = a1}) dom2@(Dom{domInfo = i2, unDom = a2}) b1 b2 errH errR cont | not (sameHiding dom1 dom2) = errH | not $ compareRelevance cmp (getRelevance dom1) (getRelevance dom2) = errR | otherwise = do let r = max (getRelevance dom1) (getRelevance dom2) -- take "most irrelevant" dependent = (r /= Irrelevant) && isBinderUsed b2 pid <- newProblem_ $ compareType cmp a1 a2 dom <- if dependent then (\ a -> dom1 {unDom = a}) <$> blockTypeOnProblem a1 pid else return dom1 -- We only need to require a1 == a2 if b2 is dependent -- If it's non-dependent it doesn't matter what we add to the context. name <- freshName_ $ suggest b1 b2 addContext (name, dom) $ cont stealConstraints pid -- Andreas, 2013-05-15 Now, comparison of codomains is not -- blocked any more by getting stuck on domains. -- Only the domain type in context will be blocked. -- But see issue #1258. compareRelevance :: Comparison -> Relevance -> Relevance -> Bool compareRelevance CmpEq = (==) compareRelevance CmpLeq = (<=) -- | When comparing argument spines (in compareElims) where the first arguments -- don't match, we keep going, substituting the anti-unification of the two -- terms in the telescope. More precisely: -- -- @@ -- (u = v : A)[pid] w = antiUnify pid A u v us = vs : Δ[w/x] -- ------------------------------------------------------------- -- u us = v vs : (x : A) Δ -- @@ -- -- The simplest case of anti-unification is to return a fresh metavariable -- (created by blockTermOnProblem), but if there's shared structure between -- the two terms we can expose that. -- -- This is really a crutch that lets us get away with things that otherwise -- would require heterogenous conversion checking. See for instance issue -- #2384. antiUnify :: ProblemId -> Type -> Term -> Term -> TCM Term antiUnify pid a u v = do ((u, v), eq) <- SynEq.checkSyntacticEquality u v if eq then return u else do (u, v) <- reduce (u, v) case (u, v) of (Pi ua ub, Pi va vb) -> do wa0 <- antiUnifyType pid (unDom ua) (unDom va) let wa = wa0 <$ ua wb <- addContext wa $ antiUnifyType pid (unAbs ub) (unAbs vb) return $ Pi wa (wb <$ ub) (Lam i u, Lam _ v) -> case unEl a of Pi a b -> Lam i . (<$ u) <$> addContext a (antiUnify pid (unAbs b) (unAbs u) (unAbs v)) _ -> fallback (Var i us, Var j vs) | i == j -> maybeGiveUp $ do a <- typeOfBV i antiUnifyElims pid a (var i) us vs -- Andreas, 2017-07-27: -- It seems that nothing guarantees here that the constructors are fully -- applied!? Thus, @a@ could be a function type and we need the robust -- @getConType@ here. -- (Note that @patternViolation@ swallows exceptions coming from @getConType@ -- thus, we would not see clearly if we used @getFullyAppliedConType@ instead.) (Con x ci us, Con y _ vs) | x == y -> maybeGiveUp $ do a <- maybe patternViolation (return . snd) =<< getConType x a antiUnifyElims pid a (Con x ci []) us vs (Def f us, Def g vs) | f == g, length us == length vs -> maybeGiveUp $ do a <- computeElimHeadType f us vs antiUnifyElims pid a (Def f []) us vs _ -> fallback where fallback = blockTermOnProblem a u pid maybeGiveUp m = m `catchError_` \ err -> case err of PatternErr{} -> fallback _ -> throwError err antiUnifyType :: ProblemId -> Type -> Type -> TCM Type antiUnifyType pid (El s a) (El _ b) = El s <$> antiUnify pid (sort s) a b antiUnifyElims :: ProblemId -> Type -> Term -> Elims -> Elims -> TCM Term antiUnifyElims pid a self [] [] = return self antiUnifyElims pid a self (Proj o f : es1) (Proj _ g : es2) | f == g = do res <- projectTyped self a o f case res of Just (_, self, a) -> antiUnifyElims pid a self es1 es2 Nothing -> patternViolation -- can fail for projection like antiUnifyElims pid a self (Apply u : es1) (Apply v : es2) = do case unEl a of Pi a b -> do w <- antiUnify pid (unDom a) (unArg u) (unArg v) antiUnifyElims pid (b `lazyAbsApp` w) (apply self [w <$ u]) es1 es2 _ -> patternViolation antiUnifyElims _ _ _ _ _ = patternViolation -- trigger maybeGiveUp in antiUnify -- | @compareElims pols a v els1 els2@ performs type-directed equality on eliminator spines. -- @t@ is the type of the head @v@. compareElims :: [Polarity] -> [IsForced] -> Type -> Term -> [Elim] -> [Elim] -> TCM () compareElims pols0 fors0 a v els01 els02 = catchConstraint (ElimCmp pols0 fors0 a v els01 els02) $ do let v1 = applyE v els01 v2 = applyE v els02 failure = typeError $ UnequalTerms CmpEq v1 v2 a -- Andreas, 2013-03-15 since one of the spines is empty, @a@ -- is the correct type here. unless (null els01) $ do reportSDoc "tc.conv.elim" 25 $ "compareElims" $$ do nest 2 $ vcat [ "a =" <+> prettyTCM a , "pols0 (truncated to 10) =" <+> sep (map prettyTCM $ take 10 pols0) , "fors0 (truncated to 10) =" <+> sep (map prettyTCM $ take 10 fors0) , "v =" <+> prettyTCM v , "els01 =" <+> prettyTCM els01 , "els02 =" <+> prettyTCM els02 ] case (els01, els02) of ([] , [] ) -> return () ([] , Proj{}:_ ) -> failure -- not impossible, see issue 821 (Proj{} : _, [] ) -> failure -- could be x.p =?= x for projection p ([] , Apply{} : _) -> failure -- not impossible, see issue 878 (Apply{} : _, [] ) -> failure ([] , IApply{} : _) -> failure (IApply{} : _, [] ) -> failure (Apply{} : _, Proj{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True -- NB: popped up in issue 889 (Proj{} : _, Apply{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True -- but should be impossible (but again in issue 1467) (IApply{} : _, Proj{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True (Proj{} : _, IApply{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True (IApply{} : _, Apply{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True (Apply{} : _, IApply{} : _) -> __IMPOSSIBLE__ <$ solveAwakeConstraints' True (e@(IApply x1 y1 r1) : els1, IApply x2 y2 r2 : els2) -> do reportSDoc "tc.conv.elim" 25 $ "compareElims IApply" -- Andrea: copying stuff from the Apply case.. let (pol, pols) = nextPolarity pols0 ifBlockedType a (\ m t -> patternViolation) $ \ _ a -> do va <- pathView a reportSDoc "tc.conv.elim.iapply" 60 $ "compareElims IApply" $$ do nest 2 $ "va =" <+> text (show (isPathType va)) case va of PathType s path l bA x y -> do b <- elInf primInterval compareWithPol pol (flip compareTerm b) r1 r2 -- TODO: compare (x1,x2) and (y1,y2) ? let r = r1 -- TODO Andrea: do blocking codom <- el' (pure . unArg $ l) ((pure . unArg $ bA) <@> pure r) compareElims pols [] codom -- Path non-dependent (codom `lazyAbsApp` unArg arg) (applyE v [e]) els1 els2 -- We allow for functions (i : I) -> ... to also be heads of a IApply, -- because @etaContract@ can produce such terms OType t@(El _ Pi{}) -> compareElims pols0 fors0 t v (Apply (defaultArg r1) : els1) (Apply (defaultArg r2) : els2) OType{} -> patternViolation (Apply arg1 : els1, Apply arg2 : els2) -> verboseBracket "tc.conv.elim" 20 "compare Apply" $ do reportSDoc "tc.conv.elim" 10 $ nest 2 $ vcat [ "a =" <+> prettyTCM a , "v =" <+> prettyTCM v , "arg1 =" <+> prettyTCM arg1 , "arg2 =" <+> prettyTCM arg2 ] reportSDoc "tc.conv.elim" 50 $ nest 2 $ vcat [ "raw:" , "a =" <+> pretty a , "v =" <+> pretty v , "arg1 =" <+> pretty arg1 , "arg2 =" <+> pretty arg2 ] let (pol, pols) = nextPolarity pols0 (for, fors) = nextIsForced fors0 ifBlockedType a (\ m t -> patternViolation) $ \ _ a -> do reportSLn "tc.conv.elim" 90 $ "type is not blocked" case unEl a of (Pi (Dom{domInfo = info, unDom = b}) codom) -> do reportSLn "tc.conv.elim" 90 $ "type is a function type" mlvl <- tryMaybe primLevel let freeInCoDom (Abs _ c) = 0 `freeInIgnoringSorts` c freeInCoDom _ = False dependent = (Just (unEl b) /= mlvl) && freeInCoDom codom -- Level-polymorphism (x : Level) -> ... does not count as dependency here -- NB: we could drop the free variable test and still be sound. -- It is a trade-off between the administrative effort of -- creating a blocking and traversing a term for free variables. -- Apparently, it is believed that checking free vars is cheaper. -- Andreas, 2013-05-15 -- NEW, Andreas, 2013-05-15 -- compare arg1 and arg2 pid <- newProblem_ $ applyModalityToContext info $ if isForced for then reportSLn "tc.conv.elim" 90 $ "argument is forced" else if isIrrelevant info then do reportSLn "tc.conv.elim" 90 $ "argument is irrelevant" compareIrrelevant b (unArg arg1) (unArg arg2) else do reportSLn "tc.conv.elim" 90 $ "argument has polarity " ++ show pol compareWithPol pol (flip compareTerm b) (unArg arg1) (unArg arg2) -- if comparison got stuck and function type is dependent, block arg solved <- isProblemSolved pid reportSLn "tc.conv.elim" 90 $ "solved = " ++ show solved arg <- if dependent && not solved then do arg <- (arg1 $>) <$> antiUnify pid b (unArg arg1) (unArg arg2) reportSDoc "tc.conv.elims" 30 $ hang "Anti-unification:" 2 (prettyTCM arg) reportSDoc "tc.conv.elims" 70 $ nest 2 $ "raw:" <+> pretty arg return arg else return arg1 -- continue, possibly with blocked instantiation compareElims pols fors (codom `lazyAbsApp` unArg arg) (apply v [arg]) els1 els2 -- any left over constraints of arg are associated to the comparison reportSLn "tc.conv.elim" 90 $ "stealing constraints from problem " ++ show pid stealConstraints pid {- Stealing solves this issue: Does not create enough blocked tc-problems, see test/fail/DontPrune. (There are remaining problems which do not show up as yellow.) Need to find a way to associate pid also to result of compareElims. -} a -> do reportSDoc "impossible" 10 $ "unexpected type when comparing apply eliminations " <+> prettyTCM a reportSDoc "impossible" 50 $ "raw type:" <+> pretty a patternViolation -- Andreas, 2013-10-22 -- in case of disabled reductions (due to failing termination check) -- we might get stuck, so do not crash, but fail gently. -- __IMPOSSIBLE__ -- case: f == f' are projections (Proj o f : els1, Proj _ f' : els2) | f /= f' -> typeError . GenericError . show =<< prettyTCM f <+> "/=" <+> prettyTCM f' | otherwise -> ifBlockedType a (\ m t -> patternViolation) $ \ _ a -> do res <- projectTyped v a o f -- fails only if f is proj.like but parameters cannot be retrieved case res of Just (_, u, t) -> do -- Andreas, 2015-07-01: -- The arguments following the principal argument of a projection -- are invariant. (At least as long as we have no explicit polarity -- annotations.) compareElims [] [] t u els1 els2 Nothing -> do reportSDoc "tc.conv.elims" 30 $ sep [ text $ "projection " ++ show f , text "applied to value " <+> prettyTCM v , text "of unexpected type " <+> prettyTCM a ] patternViolation -- | "Compare" two terms in irrelevant position. This always succeeds. -- However, we can dig for solutions of irrelevant metas in the -- terms we compare. -- (Certainly not the systematic solution, that'd be proof search...) compareIrrelevant :: Type -> Term -> Term -> TCM () {- 2012-04-02 DontCare no longer present compareIrrelevant t (DontCare v) w = compareIrrelevant t v w compareIrrelevant t v (DontCare w) = compareIrrelevant t v w -} compareIrrelevant t v w = do reportSDoc "tc.conv.irr" 20 $ vcat [ "compareIrrelevant" , nest 2 $ "v =" <+> prettyTCM v , nest 2 $ "w =" <+> prettyTCM w ] reportSDoc "tc.conv.irr" 50 $ vcat [ nest 2 $ "v =" <+> pretty v , nest 2 $ "w =" <+> pretty w ] try v w $ try w v $ return () where try (MetaV x es) w fallback = do mv <- lookupMeta x let rel = getMetaRelevance mv inst = case mvInstantiation mv of InstV{} -> True _ -> False reportSDoc "tc.conv.irr" 20 $ vcat [ nest 2 $ text $ "rel = " ++ show rel , nest 2 $ "inst =" <+> pretty inst ] if not (isIrrelevant rel) || inst then fallback -- Andreas, 2016-08-08, issue #2131: -- Mining for solutions for irrelevant metas is not definite. -- Thus, in case of error, leave meta unsolved. else (assignE DirEq x es w $ compareIrrelevant t) `catchError` \ _ -> fallback -- the value of irrelevant or unused meta does not matter try v w fallback = fallback compareWithPol :: Polarity -> (Comparison -> a -> a -> TCM ()) -> a -> a -> TCM () compareWithPol Invariant cmp x y = cmp CmpEq x y compareWithPol Covariant cmp x y = cmp CmpLeq x y compareWithPol Contravariant cmp x y = cmp CmpLeq y x compareWithPol Nonvariant cmp x y = return () polFromCmp :: Comparison -> Polarity polFromCmp CmpLeq = Covariant polFromCmp CmpEq = Invariant -- | Type-directed equality on argument lists -- compareArgs :: [Polarity] -> [IsForced] -> Type -> Term -> Args -> Args -> TCM () compareArgs pol for a v args1 args2 = compareElims pol for a v (map Apply args1) (map Apply args2) --------------------------------------------------------------------------- -- * Types --------------------------------------------------------------------------- -- | Equality on Types compareType :: Comparison -> Type -> Type -> TCM () compareType cmp ty1@(El s1 a1) ty2@(El s2 a2) = verboseBracket "tc.conv.type" 20 "compareType" $ catchConstraint (TypeCmp cmp ty1 ty2) $ do reportSDoc "tc.conv.type" 50 $ vcat [ "compareType" <+> sep [ prettyTCM ty1 <+> prettyTCM cmp , prettyTCM ty2 ] , hsep [ " sorts:", prettyTCM s1, " and ", prettyTCM s2 ] ] -- Andreas, 2011-4-27 should not compare sorts, but currently this is needed -- for solving sort and level metas compareSort CmpEq s1 s2 `catchError` \err -> case err of TypeError _ e -> do reportSDoc "tc.conv.type" 30 $ vcat [ "sort comparison failed" , nest 2 $ vcat [ "s1 =" <+> prettyTCM s1 , "s2 =" <+> prettyTCM s2 ] ] -- This error will probably be more informative compareTerm cmp (sort s1) a1 a2 -- Throw the original error if the above doesn't -- give an error (for instance, due to pending -- constraints). -- Or just ignore it... We run into this with irrelevant levels -- which may show up in sort constraints, causing them to fail. -- In any case it's not safe to ignore the error, for instance -- a1 might be Set and a2 a meta of type Set, in which case we -- really need the sort comparison to fail, instead of silently -- instantiating the meta. -- Andreas, 2013-10-31 Maybe the error went away -- when we compared the types. So we try the sort comparison -- again, this time not catching the error. (see Issue 930) -- throwError err compareSort CmpEq s1 s2 _ -> throwError err compareTerm cmp (sort s1) a1 a2 return () leqType :: Type -> Type -> TCM () leqType = compareType CmpLeq -- | @coerce v a b@ coerces @v : a@ to type @b@, returning a @v' : b@ -- with maybe extra hidden applications or hidden abstractions. -- -- In principle, this function can host coercive subtyping, but -- currently it only tries to fix problems with hidden function types. -- -- Precondition: @a@ and @b@ are reduced. coerce :: Comparison -> Term -> Type -> Type -> TCM Term coerce cmp v t1 t2 = blockTerm t2 $ do verboseS "tc.conv.coerce" 10 $ do (a1,a2) <- reify (t1,t2) let dbglvl = if isSet a1 && isSet a2 then 50 else 10 reportSDoc "tc.conv.coerce" dbglvl $ "coerce" <+> vcat [ "term v =" <+> prettyTCM v , "from type t1 =" <+> prettyTCM a1 , "to type t2 =" <+> prettyTCM a2 , "comparison =" <+> prettyTCM cmp ] reportSDoc "tc.conv.coerce" 70 $ "coerce" <+> vcat [ "term v =" <+> pretty v , "from type t1 =" <+> pretty t1 , "to type t2 =" <+> pretty t2 , "comparison =" <+> pretty cmp ] -- v <$ do workOnTypes $ leqType t1 t2 -- take off hidden/instance domains from t1 and t2 TelV tel1 b1 <- telViewUpTo' (-1) notVisible t1 TelV tel2 b2 <- telViewUpTo' (-1) notVisible t2 let n = size tel1 - size tel2 -- the crude solution would be -- v' = λ {tel2} → v {tel1} -- however, that may introduce unneccessary many function types -- If n > 0 and b2 is not blocked, it is safe to -- insert n many hidden args if n <= 0 then fallback else do ifBlockedType b2 (\ _ _ -> fallback) $ \ _ _ -> do (args, t1') <- implicitArgs n notVisible t1 let v' = v `apply` args v' <$ coerceSize (compareType cmp) v' t1' t2 where fallback = v <$ coerceSize (compareType cmp) v t1 t2 -- | Account for situations like @k : (Size< j) <= (Size< k + 1)@ -- -- Actually, the semantics is -- @(Size<= k) ∩ (Size< j) ⊆ rhs@ -- which gives a disjunctive constraint. Mmmh, looks like stuff -- TODO. -- -- For now, we do a cheap heuristics. -- -- Precondition: types are reduced. coerceSize :: (Type -> Type -> TCM ()) -> Term -> Type -> Type -> TCM () coerceSize leqType v t1 t2 = verboseBracket "tc.conv.size.coerce" 45 "coerceSize" $ workOnTypes $ do reportSDoc "tc.conv.size.coerce" 70 $ "coerceSize" <+> vcat [ "term v =" <+> pretty v , "from type t1 =" <+> pretty t1 , "to type t2 =" <+> pretty t2 ] let fallback = leqType t1 t2 done = caseMaybeM (isSizeType t1) fallback $ \ _ -> return () -- Andreas, 2015-07-22, Issue 1615: -- If t1 is a meta and t2 a type like Size< v2, we need to make sure we do not miss -- the constraint v < v2! caseMaybeM (isSizeType t2) fallback $ \ b2 -> do -- Andreas, 2017-01-20, issue #2329: -- If v is not a size suitable for the solver, like a neutral term, -- we can only rely on the type. mv <- sizeMaxView v if any (\case{ DOtherSize{} -> True; _ -> False }) mv then fallback else do -- Andreas, 2015-02-11 do not instantiate metas here (triggers issue 1203). unlessM (tryConversion $ dontAssignMetas $ leqType t1 t2) $ do -- A (most probably weaker) alternative is to just check syn.eq. -- ifM (snd <$> checkSyntacticEquality t1 t2) (return v) $ {- else -} do reportSDoc "tc.conv.size.coerce" 20 $ "coercing to a size type" case b2 of -- @t2 = Size@. We are done! BoundedNo -> done -- @t2 = Size< v2@ BoundedLt v2 -> do sv2 <- sizeView v2 case sv2 of SizeInf -> done OtherSize{} -> do -- Andreas, 2014-06-16: -- Issue 1203: For now, just treat v < v2 as suc v <= v2 -- TODO: Need proper < comparison vinc <- sizeSuc 1 v compareSizes CmpLeq vinc v2 done -- @v2 = a2 + 1@: In this case, we can try @v <= a2@ SizeSuc a2 -> do compareSizes CmpLeq v a2 done -- to pass Issue 1136 --------------------------------------------------------------------------- -- * Sorts and levels --------------------------------------------------------------------------- compareLevel :: Comparison -> Level -> Level -> TCM () compareLevel CmpLeq u v = leqLevel u v compareLevel CmpEq u v = equalLevel u v compareSort :: Comparison -> Sort -> Sort -> TCM () compareSort CmpEq = equalSort compareSort CmpLeq = leqSort -- | Check that the first sort is less or equal to the second. -- -- We can put @SizeUniv@ below @Inf@, but otherwise, it is -- unrelated to the other universes. -- leqSort :: Sort -> Sort -> TCM () leqSort s1 s2 = catchConstraint (SortCmp CmpLeq s1 s2) $ do (s1,s2) <- reduce (s1,s2) let postpone = addConstraint (SortCmp CmpLeq s1 s2) no = typeError $ NotLeqSort s1 s2 yes = return () reportSDoc "tc.conv.sort" 30 $ sep [ "leqSort" , nest 2 $ fsep [ prettyTCM s1 <+> "=<" , prettyTCM s2 ] ] propEnabled <- isPropEnabled let fvsRHS = IntSet.toList $ allFreeVars s2 badRigid <- s1 `rigidVarsNotContainedIn` fvsRHS case (s1, s2) of -- Andreas, 2018-09-03: crash on dummy sort (DummyS s, _) -> impossibleSort s (_, DummyS s) -> impossibleSort s -- The most basic rule: @Set l =< Set l'@ iff @l =< l'@ (Type a , Type b ) -> leqLevel a b -- Likewise for @Prop@ (Prop a , Prop b ) -> leqLevel a b -- @Prop l@ is below @Set l@ (Prop a , Type b ) -> leqLevel a b (Type a , Prop b ) -> no -- Setω is the top sort (_ , Inf ) -> yes (Inf , _ ) -> equalSort s1 s2 -- @SizeUniv@ and @Prop0@ are bottom sorts. -- So is @Set0@ if @Prop@ is not enabled. (_ , SizeUniv) -> equalSort s1 s2 (_ , Prop (Max [])) -> equalSort s1 s2 (_ , Type (Max [])) | not propEnabled -> equalSort s1 s2 -- SizeUniv is unrelated to any @Set l@ or @Prop l@ (SizeUniv, Type{} ) -> no (SizeUniv, Prop{} ) -> no -- If the first sort rigidly depends on a variable and the second -- sort does not mention this variable, the second sort must be Inf. (_ , _ ) | badRigid -> equalSort s2 Inf -- This shouldn't be necessary (UnivSort Inf , UnivSort Inf) -> yes -- PiSort, UnivSort and MetaS might reduce once we instantiate -- more metas, so we postpone. (PiSort{}, _ ) -> postpone (_ , PiSort{}) -> postpone (UnivSort{}, _ ) -> postpone (_ , UnivSort{}) -> postpone (MetaS{} , _ ) -> postpone (_ , MetaS{} ) -> postpone -- DefS are postulated sorts, so they do not reduce. (DefS d es , DefS d' es') | d == d' -> postpone (DefS{} , _ ) -> no (_ , DefS{}) -> no where impossibleSort s = do reportSLn "impossible" 10 $ unlines [ "leqSort: found dummy sort with description:" , s ] __IMPOSSIBLE__ leqLevel :: Level -> Level -> TCM () leqLevel a b = liftTCM $ do reportSDoc "tc.conv.nat" 30 $ "compareLevel" <+> sep [ prettyTCM a <+> "=<" , prettyTCM b ] -- Andreas, 2015-12-28 Issue 1757 -- We normalize both sides to make the syntactic equality check (==) stronger. -- See case for `same term` below. a <- normalise a b <- normalise b leqView a b where -- Andreas, 2016-09-28 -- If we have to postpone a constraint, then its simplified form! leqView a@(Max as) b@(Max bs) = catchConstraint (LevelCmp CmpLeq a b) $ do reportSDoc "tc.conv.nat" 30 $ "compareLevelView" <+> sep [ pretty a <+> "=<" , pretty b ] wrap $ case (as, bs) of -- same term _ | as == bs -> ok -- 0 ≤ any ([], _) -> ok -- as ≤ 0 (as, []) -> sequence_ [ equalLevel' (Max [a]) (Max []) | a <- as ] (as, [ClosedLevel 0]) -> sequence_ [ equalLevel' (Max [a]) (Max []) | a <- as ] -- Andreas, 2016-09-28, @[ClosedLevel 0]@ is possible if we come from case -- "reduce constants" where we run @subtr@ on both sides. -- See test/Succeed/LevelMetaLeqZero.agda. -- as ≤ [b] (as@(_:_:_), [b]) -> sequence_ [ leqView (Max [a]) (Max [b]) | a <- as ] -- reduce constants (as, bs) | minN > 0 -> leqView (Max $ map (subtr minN) as) (Max $ map (subtr minN) bs) where ns = map constant as ms = map constant bs minN = minimum (ns ++ ms) -- remove subsumed -- Andreas, 2014-04-07: This is ok if we do not go back to equalLevel (as, bs) | not $ null subsumed -> leqView (Max $ as List.\\ subsumed) (Max bs) where subsumed = [ a | a@(Plus m l) <- as, n <- findN l, m <= n ] -- @findN a@ finds the unique(?) term @Plus n a@ in @bs@, if any. -- Andreas, 2014-04-07 Why must there be a unique term? findN a = case [ n | Plus n b <- bs, b == a ] of [n] -> [n] _ -> [] -- Andreas, 2012-10-02 raise error on unsolvable constraint ([ClosedLevel n], [ClosedLevel m]) -> if n <= m then ok else notok -- closed ≤ bs ([ClosedLevel n], bs) | n <= maximum (map constant bs) -> ok -- as ≤ neutral (as, bs) | neutralB && maxA > maxB -> notok | neutralB && any (\a -> neutral a && not (isInB a)) as -> notok | neutralB && neutralA -> maybeok $ all (\a -> constant a <= findN a) as where maxA = maximum $ map constant as maxB = maximum $ map constant bs neutralA = all neutral as neutralB = all neutral bs isInB a = elem (unneutral a) $ map unneutral bs findN a = case [ n | b@(Plus n _) <- bs, unneutral b == unneutral a ] of [n] -> n _ -> __IMPOSSIBLE__ -- Andreas, 2016-09-28: This simplification loses the solution lzero. -- Thus, it is invalid. -- See test/Succeed/LevelMetaLeqNeutralLevel.agda. -- -- [a] ≤ [neutral] -- ([a@(Plus n _)], [b@(Plus m NeutralLevel{})]) -- | m == n -> equalLevel' (Max [a]) (Max [b]) -- -- Andreas, 2014-04-07: This call to equalLevel is ok even if we removed -- -- subsumed terms from the lhs. -- anything else _ -> postpone where ok = return () notok = unlessM typeInType $ typeError $ NotLeqSort (Type a) (Type b) postpone = patternViolation wrap m = catchError m $ \e -> case e of TypeError{} -> notok _ -> throwError e maybeok True = ok maybeok False = notok neutral (Plus _ NeutralLevel{}) = True neutral _ = False meta (Plus _ MetaLevel{}) = True meta _ = False unneutral (Plus _ (NeutralLevel _ v)) = v unneutral _ = __IMPOSSIBLE__ constant (ClosedLevel n) = n constant (Plus n _) = n subtr m (ClosedLevel n) = ClosedLevel (n - m) subtr m (Plus n l) = Plus (n - m) l -- choice [] = patternViolation -- choice (m:ms) = noConstraints m `catchError` \_ -> choice ms -- case e of -- PatternErr{} -> choice ms -- _ -> throwError e equalLevel :: Level -> Level -> TCM () equalLevel a b = do -- Andreas, 2013-10-31 Use normalization to make syntactic equality stronger (a, b) <- normalise (a, b) equalLevel' a b -- | Precondition: levels are 'normalise'd. equalLevel' :: Level -> Level -> TCM () equalLevel' a b = do reportSDoc "tc.conv.level" 50 $ sep [ "equalLevel", nest 2 $ parens $ pretty a, nest 2 $ parens $ pretty b ] liftTCM $ catchConstraint (LevelCmp CmpEq a b) $ check a b where check a@(Max as) b@(Max bs) = do -- Jesper, 2014-02-02 remove terms that certainly do not contribute -- to the maximum as <- return $ [ a | a <- as, not $ a `isStrictlySubsumedBy` bs ] bs <- return $ [ b | b <- bs, not $ b `isStrictlySubsumedBy` as ] -- Andreas, 2013-10-31 remove common terms (that don't contain metas!) -- THAT's actually UNSOUND when metas are instantiated, because -- max a b == max a c does not imply b == c -- as <- return $ Set.fromList $ closed0 as -- bs <- return $ Set.fromList $ closed0 bs -- let cs = Set.filter (not . hasMeta) $ Set.intersection as bs -- as <- return $ Set.toList $ as Set.\\ cs -- bs <- return $ Set.toList $ bs Set.\\ cs as <- return $ List.sort $ closed0 as bs <- return $ List.sort $ closed0 bs reportSDoc "tc.conv.level" 40 $ sep [ "equalLevel" , vcat [ nest 2 $ sep [ prettyTCM a <+> "==" , prettyTCM b ] , "reduced" , nest 2 $ sep [ prettyTCM (Max as) <+> "==" , prettyTCM (Max bs) ] ] ] reportSDoc "tc.conv.level" 50 $ sep [ text "equalLevel" , vcat [ nest 2 $ sep [ pretty (Max as) <+> "==" , pretty (Max bs) ] ] ] case (as, bs) of _ | as == bs -> ok | any isBlocked (as ++ bs) -> do lvl <- levelType liftTCM $ addConstraint $ ValueCmp CmpEq lvl (Level a) (Level b) -- closed == closed ([ClosedLevel n], [ClosedLevel m]) | n == m -> ok | otherwise -> notok -- closed == neutral ([ClosedLevel{}], _) | any isNeutral bs -> notok (_, [ClosedLevel{}]) | any isNeutral as -> notok -- 0 == any ([ClosedLevel 0], bs@(_:_:_)) -> sequence_ [ equalLevel' (Max []) (Max [b]) | b <- bs ] (as@(_:_:_), [ClosedLevel 0]) -> sequence_ [ equalLevel' (Max [a]) (Max []) | a <- as ] -- Andreas, 2014-04-07 Why should the following be ok? -- X (suc a) could be different from X (suc (suc a)) -- -- Same meta -- ([Plus n (MetaLevel x _)], [Plus m (MetaLevel y _)]) -- | n == m && x == y -> ok -- meta == any ([Plus n (MetaLevel x as)], _) | any (isThisMeta x) bs -> postpone (_, [Plus n (MetaLevel x bs)]) | any (isThisMeta x) as -> postpone ([Plus n (MetaLevel x as')], [Plus m (MetaLevel y bs')]) -- lexicographic comparison intended! | (n, y) < (m, x) -> meta n x as' bs | otherwise -> meta m y bs' as ([Plus n (MetaLevel x as')],_) -> meta n x as' bs (_,[Plus m (MetaLevel y bs')]) -> meta m y bs' as -- any other metas -- Andreas, 2013-10-31: There could be metas in neutral levels (see Issue 930). -- Should not we postpone there as well? Yes! _ | any hasMeta (as ++ bs) -> postpone -- neutral/closed == neutral/closed _ | all isNeutralOrClosed (as ++ bs) -> do reportSLn "tc.conv.level" 60 $ "equalLevel: all are neutral or closed" if length as == length bs then zipWithM_ (\a b -> [a] =!= [b]) as bs else notok -- more cases? _ -> postpone where a === b = unlessM typeInType $ do lvl <- levelType equalAtom lvl a b as =!= bs = levelTm (Max as) === levelTm (Max bs) ok = return () notok = unlessM typeInType notOk notOk = typeError $ UnequalSorts (Type a) (Type b) postpone = do reportSDoc "tc.conv.level" 30 $ hang "postponing:" 2 $ hang (pretty a <+> "==") 0 (pretty b) patternViolation closed0 [] = [ClosedLevel 0] closed0 as = as -- perform assignment (Plus n (MetaLevel x as)) := bs meta n x as bs = do reportSLn "tc.meta.level" 30 $ "Assigning meta level" reportSDoc "tc.meta.level" 50 $ "meta" <+> sep [prettyList $ map pretty as, prettyList $ map pretty bs] bs' <- mapM (subtr n) bs assignE DirEq x as (levelTm (Max bs')) (===) -- fallback: check equality as atoms -- Make sure to give a sensible error message wrap m = m `catchError` \err -> case err of TypeError{} -> notok _ -> throwError err subtr n (ClosedLevel m) | m >= n = return $ ClosedLevel (m - n) | otherwise = ifM typeInType (return $ ClosedLevel 0) $ notOk subtr n (Plus m a) | m >= n = return $ Plus (m - n) a subtr _ (Plus _ BlockedLevel{}) = postpone subtr _ (Plus _ MetaLevel{}) = postpone subtr _ (Plus _ NeutralLevel{}) = postpone subtr _ (Plus _ UnreducedLevel{}) = __IMPOSSIBLE__ isNeutral (Plus _ NeutralLevel{}) = True isNeutral _ = False isClosed ClosedLevel{} = True isClosed _ = False isNeutralOrClosed l = isClosed l || isNeutral l isBlocked (Plus _ BlockedLevel{}) = True isBlocked _ = False hasMeta ClosedLevel{} = False hasMeta (Plus _ MetaLevel{}) = True hasMeta (Plus _ (BlockedLevel _ v)) = isJust $ firstMeta v hasMeta (Plus _ (NeutralLevel _ v)) = isJust $ firstMeta v hasMeta (Plus _ (UnreducedLevel v)) = isJust $ firstMeta v isThisMeta x (Plus _ (MetaLevel y _)) = x == y isThisMeta _ _ = False constant (ClosedLevel n) = n constant (Plus n _) = n (ClosedLevel m) `isStrictlySubsumedBy` [] = m == 0 (ClosedLevel m) `isStrictlySubsumedBy` ys = m < maximum (map constant ys) (Plus m x) `isStrictlySubsumedBy` ys = not $ null $ [ n | Plus n y <- ys, x == y, m < n ] -- | Check that the first sort equal to the second. equalSort :: Sort -> Sort -> TCM () equalSort s1 s2 = do catchConstraint (SortCmp CmpEq s1 s2) $ do (s1,s2) <- reduce (s1,s2) let postpone = addConstraint (SortCmp CmpEq s1 s2) yes = return () no = typeError $ UnequalSorts s1 s2 synEq = ifNotM (optSyntacticEquality <$> pragmaOptions) postpone $ do ((s1,s2) , equal) <- SynEq.checkSyntacticEquality s1 s2 if | equal -> yes | otherwise -> postpone reportSDoc "tc.conv.sort" 30 $ sep [ "equalSort" , vcat [ nest 2 $ fsep [ prettyTCM s1 <+> "==" , prettyTCM s2 ] , nest 2 $ fsep [ pretty s1 <+> "==" , pretty s2 ] ] ] propEnabled <- isPropEnabled typeInTypeEnabled <- typeInType case (s1, s2) of -- Andreas, 2018-09-03: crash on dummy sort (DummyS s, _) -> impossibleSort s (_, DummyS s) -> impossibleSort s -- one side is a meta sort: try to instantiate -- In case both sides are meta sorts, instantiate the -- bigger (i.e. more recent) one. (MetaS x es , MetaS y es') | x == y -> synEq | x < y -> meta y es' s1 | otherwise -> meta x es s2 (MetaS x es , _ ) -> meta x es s2 (_ , MetaS x es ) -> meta x es s1 -- Other blocked sorts: check syntactic equality (PiSort{} , PiSort{} ) -> synEq (UnivSort{} , UnivSort{} ) -> synEq -- diagonal cases for rigid sorts (Type a , Type b ) -> equalLevel a b (SizeUniv , SizeUniv ) -> yes (Prop a , Prop b ) -> equalLevel a b (Inf , Inf ) -> yes -- if --type-in-type is enabled, Setω is equal to any Set ℓ (see #3439) (Type{} , Inf ) | typeInTypeEnabled -> yes (Inf , Type{} ) | typeInTypeEnabled -> yes -- if @PiSort a b == Set0@, then @b == Set0@ -- we use this fact to solve metas in @b@, -- hopefully allowing the @PiSort@ to reduce. (Type (Max []) , PiSort a b ) | not propEnabled -> piSortEqualsBottom set0 a b (PiSort a b , Type (Max [])) | not propEnabled -> piSortEqualsBottom set0 a b (Prop (Max []) , PiSort a b ) -> piSortEqualsBottom prop0 a b (PiSort a b , Prop (Max [])) -> piSortEqualsBottom prop0 a b -- @PiSort a b == SizeUniv@ iff @b == SizeUniv@ (SizeUniv , PiSort a b ) -> underAbstraction_ b $ equalSort SizeUniv (PiSort a b , SizeUniv ) -> underAbstraction_ b $ equalSort SizeUniv -- @Prop0@ and @SizeUniv@ don't contain any universes, -- so they cannot be a UnivSort (Prop (Max []) , UnivSort s ) -> no (UnivSort s , Prop (Max [])) -> no (SizeUniv , UnivSort s ) -> no (UnivSort s , SizeUniv ) -> no -- PiSort and UnivSort could compute later, so we postpone (PiSort{} , _ ) -> postpone (_ , PiSort{} ) -> postpone (UnivSort{} , _ ) -> postpone (_ , UnivSort{} ) -> postpone -- postulated sorts can only be equal if they have the same head (DefS d es , DefS d' es') | d == d' -> synEq -- any other combinations of sorts are not equal (_ , _ ) -> no where -- perform assignment (MetaS x es) := s meta x es s = do reportSLn "tc.meta.sort" 30 $ "Assigning meta sort" reportSDoc "tc.meta.sort" 50 $ "meta" <+> sep [pretty x, prettyList $ map pretty es, pretty s] assignE DirEq x es (Sort s) __IMPOSSIBLE__ set0 = Type $ Max [] prop0 = Prop $ Max [] -- equate @piSort a b@ to @s0@, which is assumed to be a (closed) bottom sort -- i.e. @piSort a b == s0@ implies @b == s0@. piSortEqualsBottom s0 a b = do underAbstraction_ b $ equalSort s0 -- we may have instantiated some metas, so @a@ could reduce a <- reduce a case funSort' a s0 of Just s -> equalSort s s0 Nothing -> addConstraint $ SortCmp CmpEq (funSort a s0) s0 impossibleSort s = do reportSLn "impossible" 10 $ unlines [ "equalSort: found dummy sort with description:" , s ] __IMPOSSIBLE__ -- -- This should probably represent face maps with a more precise type -- toFaceMaps :: Term -> TCM [[(Int,Term)]] -- toFaceMaps t = do -- view <- intervalView' -- iz <- primIZero -- io <- primIOne -- ineg <- (\ q t -> Def q [Apply $ Arg defaultArgInfo t]) <$> fromMaybe __IMPOSSIBLE__ <$> getPrimitiveName' "primINeg" -- let f IZero = mzero -- f IOne = return [] -- f (IMin x y) = do xs <- (f . view . unArg) x; ys <- (f . view . unArg) y; return (xs ++ ys) -- f (IMax x y) = msum $ map (f . view . unArg) [x,y] -- f (INeg x) = map (id -*- not) <$> (f . view . unArg) x -- f (OTerm (Var i [])) = return [(i,True)] -- f (OTerm _) = return [] -- what about metas? we should suspend? maybe no metas is a precondition? -- isConsistent xs = all (\ xs -> length xs == 1) . map nub . Map.elems $ xs -- optimize by not doing generate + filter -- as = map (map (id -*- head) . Map.toAscList) . filter isConsistent . map (Map.fromListWith (++) . map (id -*- (:[]))) $ (f (view t)) -- xs <- mapM (mapM (\ (i,b) -> (,) i <$> intervalUnview (if b then IOne else IZero))) as -- return xs forallFaceMaps :: Term -> (Map.Map Int Bool -> MetaId -> Term -> TCM a) -> (Substitution -> TCM a) -> TCM [a] forallFaceMaps t kb k = do reportSDoc "conv.forall" 20 $ fsep ["forallFaceMaps" , prettyTCM t ] as <- decomposeInterval t boolToI <- do io <- primIOne iz <- primIZero return (\b -> if b then io else iz) forM as $ \ (ms,ts) -> do ifBlockeds ts (kb ms) $ \ _ _ -> do let xs = map (id -*- boolToI) $ Map.toAscList ms cxt <- getContext reportSDoc "conv.forall" 20 $ fsep ["substContextN" , prettyTCM cxt , prettyTCM xs ] (cxt',sigma) <- substContextN cxt xs resolved <- forM xs (\ (i,t) -> (,) <$> lookupBV i <*> return (applySubst sigma t)) updateContext sigma (const cxt') $ addBindings resolved $ do cl <- buildClosure () tel <- getContextTelescope m <- currentModule sub <- getModuleParameterSub m reportSLn "conv.forall" 10 $ unlines [replicate 10 '-' , show (envCurrentModule $ clEnv cl) , show (envLetBindings $ clEnv cl) , show tel -- (toTelescope $ envContext $ clEnv cl) , show sigma , show m , show sub] k sigma where -- TODO Andrea: inefficient because we try to reduce the ts which we know are in whnf ifBlockeds ts blocked unblocked = do and <- getPrimitiveTerm "primIMin" io <- primIOne let t = foldr (\ x r -> and `apply` [argN x,argN r]) io ts ifBlocked t blocked unblocked addBindings [] m = m addBindings ((Dom{domInfo = info,unDom = (nm,ty)},t):bs) m = addLetBinding info nm t ty (addBindings bs m) substContextN :: Context -> [(Int,Term)] -> TCM (Context , Substitution) substContextN c [] = return (c, idS) substContextN c ((i,t):xs) = do (c', sigma) <- substContext i t c (c'', sigma') <- substContextN c' (map (subtract 1 -*- applySubst sigma) xs) return (c'', applySubst sigma' sigma) -- assumes the term can be typed in the shorter telescope -- the terms we get from toFaceMaps are closed. substContext :: Int -> Term -> Context -> TCM (Context , Substitution) substContext i t [] = __IMPOSSIBLE__ substContext i t (x:xs) | i == 0 = return $ (xs , singletonS 0 t) substContext i t (x:xs) | i > 0 = do reportSDoc "conv.forall" 20 $ fsep ["substContext" , text (show (i-1)) , prettyTCM t , prettyTCM xs ] (c,sigma) <- substContext (i-1) t xs let e = applySubst sigma x return (e:c, liftS 1 sigma) substContext i t (x:xs) = __IMPOSSIBLE__ compareInterval :: Comparison -> Type -> Term -> Term -> TCM () compareInterval cmp i t u = do reportSDoc "tc.conv.interval" 15 $ sep [ "{ compareInterval" <+> prettyTCM t <+> "=" <+> prettyTCM u ] tb <- reduceB t ub <- reduceB u let t = ignoreBlocking tb u = ignoreBlocking ub it <- decomposeInterval' t iu <- decomposeInterval' u case () of _ | blockedOrMeta tb || blockedOrMeta ub -> do -- in case of metas we wouldn't be able to make progress by how we deal with de morgan laws. -- (because the constraints generated by decomposition are sufficient but not necessary). -- but we could still prune/solve some metas by comparing the terms as atoms. -- also if blocked we won't find the terms conclusively unequal(?) so compareAtom -- won't report type errors when we should accept. interval <- elInf $ primInterval compareAtom CmpEq interval t u _ | otherwise -> do x <- leqInterval it iu y <- leqInterval iu it let final = isCanonical it && isCanonical iu if x && y then reportSDoc "tc.conv.interval" 15 $ "Ok! }" else if final then typeError $ UnequalTerms cmp t u i else do reportSDoc "tc.conv.interval" 15 $ "Giving up! }" patternViolation where blockedOrMeta Blocked{} = True blockedOrMeta (NotBlocked _ (MetaV{})) = True blockedOrMeta _ = False type Conj = (Map.Map Int (Set.Set Bool),[Term]) isCanonical :: [Conj] -> Bool isCanonical = all (null . snd) -- | leqInterval r q = r ≤ q in the I lattice. -- (∨ r_i) ≤ (∨ q_j) iff ∀ i. ∃ j. r_i ≤ q_j leqInterval :: [Conj] -> [Conj] -> TCM Bool leqInterval r q = and <$> forM r (\ r_i -> or <$> forM q (\ q_j -> leqConj r_i q_j)) -- TODO shortcut -- | leqConj r q = r ≤ q in the I lattice, when r and q are conjuctions. -- ' (∧ r_i) ≤ (∧ q_j) iff -- ' (∧ r_i) ∧ (∧ q_j) = (∧ r_i) iff -- ' {r_i | i} ∪ {q_j | j} = {r_i | i} iff -- ' {q_j | j} ⊆ {r_i | i} leqConj :: Conj -> Conj -> TCM Bool leqConj (rs,rst) (qs,qst) = do case toSet qs `Set.isSubsetOf` toSet rs of False -> return False True -> do interval <- elInf $ primInterval -- we don't want to generate new constraints here because -- 1) in some situations the same constraint would get generated twice. -- 2) unless things are completely accepted we are going to -- throw patternViolation in compareInterval. let eqT t u = tryConversion (compareAtom CmpEq interval t u) let listSubset ts us = and <$> forM ts (\ t -> or <$> forM us (\ u -> eqT t u)) -- TODO shortcut listSubset qst rst where toSet m = Set.fromList [ (i,b) | (i,bs) <- Map.toList m, b <- Set.toList bs] -- | equalTermOnFace φ A u v = _ , φ ⊢ u = v : A equalTermOnFace :: Term -> Type -> Term -> Term -> TCM () equalTermOnFace = compareTermOnFace CmpEq compareTermOnFace :: Comparison -> Term -> Type -> Term -> Term -> TCM () compareTermOnFace = compareTermOnFace' compareTerm compareTermOnFace' :: (Comparison -> Type -> Term -> Term -> TCM ()) -> Comparison -> Term -> Type -> Term -> Term -> TCM () compareTermOnFace' k cmp phi ty u v = do phi <- reduce phi _ <- forallFaceMaps phi postponed $ \ alpha -> k cmp (applySubst alpha ty) (applySubst alpha u) (applySubst alpha v) return () where postponed ms i psi = do phi <- runNamesT [] $ do imin <- cl $ getPrimitiveTerm "primIMin" ineg <- cl $ getPrimitiveTerm "primINeg" psi <- open psi let phi = foldr (\ (i,b) r -> do i <- open (var i); pure imin <@> (if b then i else pure ineg <@> i) <@> r) psi (Map.toList ms) -- TODO Andrea: make a view? phi addConstraint (ValueCmpOnFace cmp phi ty u v) --------------------------------------------------------------------------- -- * Definitions --------------------------------------------------------------------------- bothAbsurd :: QName -> QName -> TCM Bool bothAbsurd f f' | isAbsurdLambdaName f, isAbsurdLambdaName f' = do -- Double check we are really dealing with absurd lambdas: -- Their functions should not have bodies. def <- getConstInfo f def' <- getConstInfo f' case (theDef def, theDef def') of (Function{ funClauses = [Clause{ clauseBody = Nothing }] }, Function{ funClauses = [Clause{ clauseBody = Nothing }] }) -> return True _ -> return False | otherwise = return False Agda-2.6.0.1/src/full/Agda/TypeChecking/Abstract.hs0000644000000000000000000001760413466402171017755 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- | Functions for abstracting terms over other terms. module Agda.TypeChecking.Abstract where import Control.Monad import Control.Monad.State import Data.Function import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (equalityUnview) import Agda.TypeChecking.Substitute import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.Conversion import Agda.TypeChecking.Constraints import Agda.TypeChecking.Pretty import Agda.Utils.Functor import Agda.Utils.List (splitExactlyAt) import Agda.Utils.Size import Agda.Utils.Except import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Impossible #include "undefined.h" typeOf :: Type -> Type typeOf = sort . getSort -- | @abstractType a v b[v] = b@ where @a : v@. abstractType :: Type -> Term -> Type -> TCM Type abstractType a v (El s b) = El (absTerm v s) <$> abstractTerm a v (sort s) b -- | @piAbstractTerm v a b[v] = (w : a) -> b[w]@ piAbstractTerm :: Term -> Type -> Type -> TCM Type piAbstractTerm v a b = do fun <- mkPi (defaultDom ("w", a)) <$> abstractType a v b reportSDoc "tc.abstract" 50 $ sep [ "piAbstract" <+> sep [ prettyTCM v <+> ":", nest 2 $ prettyTCM a ] , nest 2 $ "from" <+> prettyTCM b , nest 2 $ "-->" <+> prettyTCM fun ] reportSDoc "tc.abstract" 70 $ sep [ "piAbstract" <+> sep [ (text . show) v <+> ":", nest 2 $ (text . show) a ] , nest 2 $ "from" <+> (text . show) b , nest 2 $ "-->" <+> (text . show) fun ] return fun -- | @piAbstract (v, a) b[v] = (w : a) -> b[w]@ -- -- For @rewrite@, it does something special: -- -- @piAbstract (prf, Eq a v v') b[v,prf] = (w : a) (w' : Eq a w v') -> b[w,w']@ piAbstract :: (Term, EqualityView) -> Type -> TCM Type piAbstract (v, OtherType a) b = piAbstractTerm v a b piAbstract (prf, eqt@(EqualityType _ _ _ (Arg _ a) v _)) b = do s <- inferSort a let prfTy = equalityUnview eqt vTy = El s a b <- abstractType prfTy prf b b <- addContext ("w" :: String, defaultDom prfTy) $ abstractType (raise 1 vTy) (unArg $ raise 1 v) b return . funType vTy . funType eqTy' . swap01 $ b where funType a = mkPi $ defaultDom ("w", a) -- Abstract the lhs (@a@) of the equality only. eqt1 = raise 1 eqt eqTy' = equalityUnview $ eqt1 { eqtLhs = eqtLhs eqt1 $> var 0 } -- | @isPrefixOf u v = Just es@ if @v == u `applyE` es@. class IsPrefixOf a where isPrefixOf :: a -> a -> Maybe Elims instance IsPrefixOf Elims where isPrefixOf us vs = do (vs1, vs2) <- splitExactlyAt (length us) vs guard $ us == vs1 return vs2 instance IsPrefixOf Args where isPrefixOf us vs = do (vs1, vs2) <- splitExactlyAt (length us) vs guard $ us == vs1 return $ map Apply vs2 instance IsPrefixOf Term where isPrefixOf u v = case (u, v) of (Var i us, Var j vs) | i == j -> us `isPrefixOf` vs (Def f us, Def g vs) | f == g -> us `isPrefixOf` vs (Con c _ us, Con d _ vs) | c == d -> us `isPrefixOf` vs (MetaV x us, MetaV y vs) | x == y -> us `isPrefixOf` vs (u, v) -> guard (u == v) >> return [] -- Type-based abstraction. Needed if u is a constructor application (#745). abstractTerm :: Type -> Term -> Type -> Term -> TCM Term abstractTerm a u@Con{} b v = do reportSDoc "tc.abstract" 50 $ sep [ "Abstracting" , nest 2 $ sep [ prettyTCM u <+> ":", nest 2 $ prettyTCM a ] , "over" , nest 2 $ sep [ prettyTCM v <+> ":", nest 2 $ prettyTCM b ] ] reportSDoc "tc.abstract" 70 $ sep [ "Abstracting" , nest 2 $ sep [ (text . show) u <+> ":", nest 2 $ (text . show) a ] , "over" , nest 2 $ sep [ (text . show) v <+> ":", nest 2 $ (text . show) b ] ] hole <- qualify <$> currentModule <*> freshName_ ("hole" :: String) noMutualBlock $ addConstant hole $ defaultDefn defaultArgInfo hole a Axiom args <- map Apply <$> getContextArgs let n = length args let abstr b v = do m <- getContextSize let (a', u') = raise (m - n) (a, u) case isPrefixOf u' v of Nothing -> return v Just es -> do -- Check that the types match. s <- getTC do noConstraints $ equalType a' b putTC s return $ Def hole (raise (m - n) args ++ es) `catchError` \ _ -> do reportSDoc "tc.abstract.ill-typed" 50 $ sep [ "Skipping ill-typed abstraction" , nest 2 $ sep [ prettyTCM v <+> ":", nest 2 $ prettyTCM b ] ] return v -- #2763: This can fail if the user is with-abstracting incorrectly (for -- instance, abstracting over a first component of a sigma without also -- abstracting the second component). In this case we skip abstraction -- altogether and let the type check of the final with-function type produce -- the error message. res <- catchError_ (checkInternal' (defaultAction { preAction = abstr }) v b) $ \ err -> do reportSDoc "tc.abstract.ill-typed" 40 $ "Skipping typed abstraction over ill-typed term" (prettyTCM v (":" <+> prettyTCM b)) return v reportSDoc "tc.abstract" 50 $ "Resulting abstraction" prettyTCM res modifySignature $ updateDefinitions $ HMap.delete hole return $ absTerm (Def hole args) res abstractTerm _ u _ v = return $ absTerm u v -- Non-constructors can use untyped abstraction class AbsTerm a where -- | @subst u . absTerm u == id@ absTerm :: Term -> a -> a instance AbsTerm Term where absTerm u v | Just es <- u `isPrefixOf` v = Var 0 $ absT es | otherwise = case v of -- Andreas, 2013-10-20: the original impl. works only at base types -- v | u == v -> Var 0 [] -- incomplete see succeed/WithOfFunctionType Var i vs -> Var (i + 1) $ absT vs Lam h b -> Lam h $ absT b Def c vs -> Def c $ absT vs Con c ci vs -> Con c ci $ absT vs Pi a b -> uncurry Pi $ absT (a, b) Lit l -> Lit l Level l -> Level $ absT l Sort s -> Sort $ absT s MetaV m vs -> MetaV m $ absT vs DontCare mv -> DontCare $ absT mv Dummy s -> Dummy s where absT x = absTerm u x instance AbsTerm Type where absTerm u (El s v) = El (absTerm u s) (absTerm u v) instance AbsTerm Sort where absTerm u s = case s of Type n -> Type $ absS n Prop n -> Prop $ absS n Inf -> Inf SizeUniv -> SizeUniv PiSort s1 s2 -> PiSort (absS s1) (absS s2) UnivSort s -> UnivSort $ absS s MetaS x es -> MetaS x $ absS es DefS d es -> DefS d $ absS es DummyS{} -> s where absS x = absTerm u x instance AbsTerm Level where absTerm u (Max as) = Max $ absTerm u as instance AbsTerm PlusLevel where absTerm u l@ClosedLevel{} = l absTerm u (Plus n l) = Plus n $ absTerm u l instance AbsTerm LevelAtom where absTerm u l = case l of MetaLevel m vs -> UnreducedLevel $ absTerm u (MetaV m vs) NeutralLevel r v -> NeutralLevel r $ absTerm u v BlockedLevel _ v -> UnreducedLevel $ absTerm u v -- abstracting might remove the blockage UnreducedLevel v -> UnreducedLevel $ absTerm u v instance AbsTerm a => AbsTerm (Elim' a) where absTerm = fmap . absTerm instance AbsTerm a => AbsTerm (Arg a) where absTerm = fmap . absTerm instance AbsTerm a => AbsTerm (Dom a) where absTerm = fmap . absTerm instance AbsTerm a => AbsTerm [a] where absTerm = fmap . absTerm instance AbsTerm a => AbsTerm (Maybe a) where absTerm = fmap . absTerm instance (Subst Term a, AbsTerm a) => AbsTerm (Abs a) where absTerm u (NoAbs x v) = NoAbs x $ absTerm u v absTerm u (Abs x v) = Abs x $ swap01 $ absTerm (raise 1 u) v instance (AbsTerm a, AbsTerm b) => AbsTerm (a, b) where absTerm u (x, y) = (absTerm u x, absTerm u y) -- | This swaps @var 0@ and @var 1@. swap01 :: (Subst Term a) => a -> a swap01 = applySubst $ var 1 :# liftS 1 (raiseS 1) Agda-2.6.0.1/src/full/Agda/TypeChecking/Errors.hs0000644000000000000000000020701413466402171017462 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Errors ( prettyError , prettyWarning , tcErrString , prettyTCWarnings' , prettyTCWarnings , tcWarningsToError , applyFlagsToTCWarnings' , applyFlagsToTCWarnings , dropTopLevelModule , stringTCErr , sayWhen ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Monad.Reader import Control.Monad.State import Data.Function import Data.List (nub, sortBy, intersperse, isInfixOf, dropWhileEnd) import Data.Maybe import Data.Char (toLower) import qualified Data.Set as Set import qualified Data.Map as Map import qualified Text.PrettyPrint.Boxes as Boxes import {-# SOURCE #-} Agda.Interaction.Imports (MainInterface(..)) import Agda.Interaction.Options import Agda.Interaction.Options.Warnings import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Position import qualified Agda.Syntax.Info as A import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Concrete.Definitions as D import Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views (deepUnscope) import Agda.Syntax.Internal as I import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Translation.AbstractToConcrete import Agda.Syntax.Scope.Monad (isDatatypeModule, withContextPrecedence) import Agda.Syntax.Scope.Base import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Closure import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.MetaVars import Agda.TypeChecking.Positivity import Agda.TypeChecking.Pretty import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope ( ifPiType ) import Agda.TypeChecking.Reduce (instantiate) import Agda.TypeChecking.Warnings import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.FileName import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.NonemptyList import Agda.Utils.Pretty ( prettyShow ) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Top level function --------------------------------------------------------------------------- {-# SPECIALIZE prettyError :: TCErr -> TCM String #-} prettyError :: MonadTCM tcm => TCErr -> tcm String prettyError err = liftTCM $ show <$> prettyError' err [] where prettyError' :: TCErr -> [TCErr] -> TCM Doc prettyError' err errs | length errs > 3 = fsep ( pwords "total panic: error when printing error from printing error from printing error." ++ pwords "I give up! Approximations of errors (original error last):" ) $$ vcat (map (text . tcErrString) errs) | otherwise = applyUnless (null errs) ("panic: error when printing error!" $$) $ do (prettyTCM err $$ vcat (map (text . ("when printing error " ++) . tcErrString) errs)) `catchError` \ err' -> prettyError' err' (err:errs) --------------------------------------------------------------------------- -- * Warnings --------------------------------------------------------------------------- instance PrettyTCM TCWarning where prettyTCM = return . tcWarningPrintedWarning instance PrettyTCM Warning where prettyTCM = prettyWarning {-# SPECIALIZE prettyWarning :: Warning -> TCM Doc #-} prettyWarning :: MonadTCM tcm => Warning -> tcm Doc prettyWarning wng = liftTCM $ case wng of UnsolvedMetaVariables ms -> fsep ( pwords "Unsolved metas at the following locations:" ) $$ nest 2 (vcat $ map prettyTCM ms) UnsolvedInteractionMetas is -> fsep ( pwords "Unsolved interaction metas at the following locations:" ) $$ nest 2 (vcat $ map prettyTCM is) UnsolvedConstraints cs -> fsep ( pwords "Failed to solve the following constraints:" ) $$ nest 2 (P.vcat . nub <$> mapM prettyConstraint cs) where prettyConstraint :: ProblemConstraint -> TCM Doc prettyConstraint c = f (prettyTCM c) where r = getRange c f d = if null $ P.pretty r then d else d $$ nest 4 ("[ at" <+> prettyTCM r <+> "]") TerminationIssue because -> do dropTopLevel <- topLevelModuleDropper fwords "Termination checking failed for the following functions:" $$ (nest 2 $ fsep $ punctuate comma $ map (pretty . dropTopLevel) $ concatMap termErrFunctions because) $$ fwords "Problematic calls:" $$ (nest 2 $ fmap (P.vcat . nub) $ mapM prettyTCM $ sortBy (compare `on` callInfoRange) $ concatMap termErrCalls because) UnreachableClauses f pss -> fsep $ pwords "Unreachable" ++ pwords (plural (length pss) "clause") where plural 1 thing = thing plural n thing = thing ++ "s" CoverageIssue f pss -> fsep ( pwords "Incomplete pattern matching for" ++ [prettyTCM f <> "."] ++ pwords "Missing cases:") $$ nest 2 (vcat $ map display pss) where display (tel, ps) = prettyTCM $ NamedClause f True $ empty { clauseTel = tel, namedClausePats = ps } CoverageNoExactSplit f cs -> vcat $ [ fsep $ pwords "Exact splitting is enabled, but the following" ++ pwords (singPlural cs "clause" "clauses") ++ pwords "could not be preserved as definitional equalities in the translation to a case tree:" ] ++ map (nest 2 . prettyTCM . NamedClause f True) cs NotStrictlyPositive d ocs -> fsep $ [prettyTCM d] ++ pwords "is not strictly positive, because it occurs" ++ [prettyTCM ocs] CantGeneralizeOverSorts ms -> vcat [ text "Cannot generalize over unsolved sort metas:" , nest 2 $ vcat [ prettyTCM x <+> text "at" <+> (pretty =<< getMetaRange x) | x <- ms ] , fsep $ pwords "Suggestion: add a `variable Any : Set _` and replace unsolved metas by Any" ] AbsurdPatternRequiresNoRHS ps -> fwords $ "The right-hand side must be omitted if there " ++ "is an absurd pattern, () or {}, in the left-hand side." OldBuiltin old new -> fwords $ "Builtin " ++ old ++ " no longer exists. " ++ "It is now bound by BUILTIN " ++ new EmptyRewritePragma -> fsep . pwords $ "Empty REWRITE pragma" IllformedAsClause s -> fsep . pwords $ "`as' must be followed by an identifier" ++ s UselessPublic -> fwords $ "Keyword `public' is ignored here" UselessInline q -> fsep $ pwords "It is pointless for INLINE'd function" ++ [prettyTCM q] ++ pwords "to have a separate Haskell definition" WrongInstanceDeclaration -> fwords "Terms marked as eligible for instance search should end with a name, so `instance' is ignored here." InstanceWithExplicitArg q -> fsep $ pwords "Instance declarations with explicit arguments are never considered by instance search," ++ pwords "so making" ++ [prettyTCM q] ++ pwords "into an instance has no effect." InstanceNoOutputTypeName b -> fsep $ pwords "Instance arguments whose type does not end in a named or variable type are never considered by instance search," ++ pwords "so having an instance argument" ++ [return b] ++ pwords "has no effect." InstanceArgWithExplicitArg b -> fsep $ pwords "Instance arguments with explicit arguments are never considered by instance search," ++ pwords "so having an instance argument" ++ [return b] ++ pwords "has no effect." InversionDepthReached f -> do maxDepth <- maxInversionDepth fsep $ pwords "Refusing to invert pattern matching of" ++ [prettyTCM f] ++ pwords ("because the maximum depth (" ++ show maxDepth ++ ") has been reached.") ++ pwords "Most likely this means you have an unsatisfiable constraint, but it could" ++ pwords "also mean that you need to increase the maximum depth using the flag" ++ pwords "--inversion-max-depth=N" GenericWarning d -> return d GenericNonFatalError d -> return d SafeFlagPostulate e -> fsep $ pwords "Cannot postulate" ++ [pretty e] ++ pwords "with safe flag" SafeFlagPragma xs -> let plural | length xs == 1 = "" | otherwise = "s" in fsep $ [fwords ("Cannot set OPTIONS pragma" ++ plural)] ++ map text xs ++ [fwords "with safe flag."] SafeFlagNonTerminating -> fsep $ pwords "Cannot use NON_TERMINATING pragma with safe flag." SafeFlagTerminating -> fsep $ pwords "Cannot use TERMINATING pragma with safe flag." SafeFlagWithoutKFlagPrimEraseEquality -> fsep (pwords "Cannot use primEraseEquality with safe and without-K flags.") WithoutKFlagPrimEraseEquality -> fsep (pwords "Using primEraseEquality implies K, but you have the without-K flag enabled.") SafeFlagNoPositivityCheck -> fsep $ pwords "Cannot use NO_POSITIVITY_CHECK pragma with safe flag." SafeFlagPolarity -> fsep $ pwords "Cannot use POLARITY pragma with safe flag." SafeFlagNoUniverseCheck -> fsep $ pwords "Cannot use NO_UNIVERSE_CHECK pragma with safe flag." ParseWarning pw -> pretty pw DeprecationWarning old new version -> fsep $ [text old] ++ pwords "has been deprecated. Use" ++ [text new] ++ pwords "instead. This will be an error in Agda" ++ [text version <> "."] NicifierIssue w -> sayWhere (getRange w) $ pretty w UserWarning str -> text str ModuleDoesntExport m xs -> fsep $ pwords "The module" ++ [pretty m] ++ pwords "doesn't export the following:" ++ punctuate comma (map pretty xs) LibraryWarning lw -> pretty lw InfectiveImport o m -> fsep $ pwords "Importing module" ++ [pretty m] ++ pwords "using the" ++ [pretty o] ++ pwords "flag from a module which does not." CoInfectiveImport o m -> fsep $ pwords "Importing module" ++ [pretty m] ++ pwords "not using the" ++ [pretty o] ++ pwords "flag from a module which does." prettyTCWarnings :: [TCWarning] -> TCM String prettyTCWarnings = fmap (unlines . intersperse "") . prettyTCWarnings' prettyTCWarnings' :: [TCWarning] -> TCM [String] prettyTCWarnings' = mapM (fmap show . prettyTCM) -- | Turns all warnings into errors. tcWarningsToError :: [TCWarning] -> TCM a tcWarningsToError ws = typeError $ case ws of [] -> SolvedButOpenHoles _ -> NonFatalErrors ws -- | Depending which flags are set, one may happily ignore some -- warnings. applyFlagsToTCWarnings' :: MainInterface -> [TCWarning] -> TCM [TCWarning] applyFlagsToTCWarnings' isMain ws = do -- For some reason some SafeFlagPragma seem to be created multiple times. -- This is a way to collect all of them and remove duplicates. let pragmas w = case tcWarning w of { SafeFlagPragma ps -> ([w], ps); _ -> ([], []) } let sfp = case fmap nub (foldMap pragmas ws) of (TCWarning r w p b:_, sfp) -> [TCWarning r (SafeFlagPragma sfp) p b] _ -> [] warnSet <- do opts <- pragmaOptions let warnSet = optWarningMode opts ^. warningSet pure $ if isMain /= NotMainInterface then Set.union warnSet unsolvedWarnings else warnSet -- filter out the warnings the flags told us to ignore let cleanUp w = let wName = warningName w in wName /= SafeFlagPragma_ && wName `elem` warnSet && case w of UnsolvedMetaVariables ums -> not $ null ums UnsolvedInteractionMetas uis -> not $ null uis UnsolvedConstraints ucs -> not $ null ucs _ -> True return $ sfp ++ filter (cleanUp . tcWarning) ws applyFlagsToTCWarnings :: [TCWarning] -> TCM [TCWarning] applyFlagsToTCWarnings = applyFlagsToTCWarnings' NotMainInterface --------------------------------------------------------------------------- -- * Helpers --------------------------------------------------------------------------- sayWhere :: HasRange a => a -> TCM Doc -> TCM Doc sayWhere x d = applyUnless (null r) (prettyTCM r $$) d where r = getRange x sayWhen :: Range -> Maybe (Closure Call) -> TCM Doc -> TCM Doc sayWhen r Nothing m = sayWhere r m sayWhen r (Just cl) m = sayWhere r (m $$ prettyTCM cl) panic :: String -> TCM Doc panic s = fwords $ "Panic: " ++ s nameWithBinding :: QName -> TCM Doc nameWithBinding q = (prettyTCM q <+> "bound at") prettyTCM r where r = nameBindingSite $ qnameName q tcErrString :: TCErr -> String tcErrString err = show (getRange err) ++ " " ++ case err of TypeError _ cl -> errorString $ clValue cl Exception r s -> show r ++ " " ++ show s IOException _ r e -> show r ++ " " ++ show e PatternErr{} -> "PatternErr" stringTCErr :: String -> TCErr stringTCErr = Exception noRange . P.text errorString :: TypeError -> String errorString err = case err of AmbiguousModule{} -> "AmbiguousModule" AmbiguousName{} -> "AmbiguousName" AmbiguousParseForApplication{} -> "AmbiguousParseForApplication" AmbiguousParseForLHS{} -> "AmbiguousParseForLHS" -- AmbiguousParseForPatternSynonym{} -> "AmbiguousParseForPatternSynonym" AmbiguousTopLevelModuleName {} -> "AmbiguousTopLevelModuleName" BadArgumentsToPatternSynonym{} -> "BadArgumentsToPatternSynonym" TooFewArgumentsToPatternSynonym{} -> "TooFewArgumentsToPatternSynonym" CannotResolveAmbiguousPatternSynonym{} -> "CannotResolveAmbiguousPatternSynonym" BothWithAndRHS -> "BothWithAndRHS" BuiltinInParameterisedModule{} -> "BuiltinInParameterisedModule" BuiltinMustBeConstructor{} -> "BuiltinMustBeConstructor" ClashingDefinition{} -> "ClashingDefinition" ClashingFileNamesFor{} -> "ClashingFileNamesFor" ClashingImport{} -> "ClashingImport" ClashingModule{} -> "ClashingModule" ClashingModuleImport{} -> "ClashingModuleImport" CompilationError{} -> "CompilationError" ConstructorPatternInWrongDatatype{} -> "ConstructorPatternInWrongDatatype" CyclicModuleDependency{} -> "CyclicModuleDependency" DataMustEndInSort{} -> "DataMustEndInSort" -- UNUSED: DataTooManyParameters{} -> "DataTooManyParameters" CantResolveOverloadedConstructorsTargetingSameDatatype{} -> "CantResolveOverloadedConstructorsTargetingSameDatatype" DoesNotConstructAnElementOf{} -> "DoesNotConstructAnElementOf" DuplicateBuiltinBinding{} -> "DuplicateBuiltinBinding" DuplicateConstructors{} -> "DuplicateConstructors" DuplicateFields{} -> "DuplicateFields" DuplicateImports{} -> "DuplicateImports" FieldOutsideRecord -> "FieldOutsideRecord" FileNotFound{} -> "FileNotFound" GenericError{} -> "GenericError" GenericDocError{} -> "GenericDocError" InstanceNoCandidate{} -> "InstanceNoCandidate" IlltypedPattern{} -> "IlltypedPattern" IllformedProjectionPattern{} -> "IllformedProjectionPattern" CannotEliminateWithPattern{} -> "CannotEliminateWithPattern" IllegalLetInTelescope{} -> "IllegalLetInTelescope" -- UNUSED: IncompletePatternMatching{} -> "IncompletePatternMatching" InternalError{} -> "InternalError" InvalidPattern{} -> "InvalidPattern" LocalVsImportedModuleClash{} -> "LocalVsImportedModuleClash" MetaCannotDependOn{} -> "MetaCannotDependOn" MetaOccursInItself{} -> "MetaOccursInItself" MetaIrrelevantSolution{} -> "MetaIrrelevantSolution" ModuleArityMismatch{} -> "ModuleArityMismatch" ModuleDefinedInOtherFile {} -> "ModuleDefinedInOtherFile" ModuleNameUnexpected{} -> "ModuleNameUnexpected" ModuleNameDoesntMatchFileName {} -> "ModuleNameDoesntMatchFileName" NeedOptionCopatterns{} -> "NeedOptionCopatterns" NeedOptionRewriting{} -> "NeedOptionRewriting" NeedOptionProp{} -> "NeedOptionProp" GeneralizeNotSupportedHere{} -> "GeneralizeNotSupportedHere" GeneralizeCyclicDependency{} -> "GeneralizeCyclicDependency" GeneralizeUnsolvedMeta{} -> "GeneralizeUnsolvedMeta" MultipleFixityDecls{} -> "MultipleFixityDecls" MultiplePolarityPragmas{} -> "MultiplePolarityPragmas" NoBindingForBuiltin{} -> "NoBindingForBuiltin" NoParseForApplication{} -> "NoParseForApplication" NoParseForLHS{} -> "NoParseForLHS" -- NoParseForPatternSynonym{} -> "NoParseForPatternSynonym" NoRHSRequiresAbsurdPattern{} -> "NoRHSRequiresAbsurdPattern" NoSuchBuiltinName{} -> "NoSuchBuiltinName" NoSuchModule{} -> "NoSuchModule" DuplicatePrimitiveBinding{} -> "DuplicatePrimitiveBinding" NoSuchPrimitiveFunction{} -> "NoSuchPrimitiveFunction" NotAModuleExpr{} -> "NotAModuleExpr" NotAProperTerm -> "NotAProperTerm" InvalidType{} -> "InvalidType" InvalidTypeSort{} -> "InvalidTypeSort" FunctionTypeInSizeUniv{} -> "FunctionTypeInSizeUniv" NotAValidLetBinding{} -> "NotAValidLetBinding" NotValidBeforeField{} -> "NotValidBeforeField" NotAnExpression{} -> "NotAnExpression" NotImplemented{} -> "NotImplemented" NotSupported{} -> "NotSupported" AbstractConstructorNotInScope{} -> "AbstractConstructorNotInScope" NotInScope{} -> "NotInScope" NotLeqSort{} -> "NotLeqSort" NothingAppliedToHiddenArg{} -> "NothingAppliedToHiddenArg" NothingAppliedToInstanceArg{} -> "NothingAppliedToInstanceArg" OverlappingProjects {} -> "OverlappingProjects" OperatorInformation {} -> "OperatorInformation" PatternShadowsConstructor {} -> "PatternShadowsConstructor" PropMustBeSingleton -> "PropMustBeSingleton" RepeatedVariablesInPattern{} -> "RepeatedVariablesInPattern" ShadowedModule{} -> "ShadowedModule" ShouldBeASort{} -> "ShouldBeASort" ShouldBeApplicationOf{} -> "ShouldBeApplicationOf" ShouldBeAppliedToTheDatatypeParameters{} -> "ShouldBeAppliedToTheDatatypeParameters" ShouldBeEmpty{} -> "ShouldBeEmpty" ShouldBePi{} -> "ShouldBePi" ShouldBePath{} -> "ShouldBePath" ShouldBeRecordType{} -> "ShouldBeRecordType" ShouldBeRecordPattern{} -> "ShouldBeRecordPattern" NotAProjectionPattern{} -> "NotAProjectionPattern" ShouldEndInApplicationOfTheDatatype{} -> "ShouldEndInApplicationOfTheDatatype" SplitError{} -> "SplitError" ImpossibleConstructor{} -> "ImpossibleConstructor" TooManyFields{} -> "TooManyFields" TooManyPolarities{} -> "TooManyPolarities" SplitOnIrrelevant{} -> "SplitOnIrrelevant" -- UNUSED: -- SplitOnErased{} -> "SplitOnErased" SplitOnNonVariable{} -> "SplitOnNonVariable" DefinitionIsIrrelevant{} -> "DefinitionIsIrrelevant" VariableIsIrrelevant{} -> "VariableIsIrrelevant" VariableIsErased{} -> "VariableIsErased" UnequalBecauseOfUniverseConflict{} -> "UnequalBecauseOfUniverseConflict" UnequalRelevance{} -> "UnequalRelevance" UnequalHiding{} -> "UnequalHiding" -- UnequalLevel{} -> "UnequalLevel" -- UNUSED UnequalSorts{} -> "UnequalSorts" UnequalTerms{} -> "UnequalTerms" UnequalTypes{} -> "UnequalTypes" -- UnequalTelescopes{} -> "UnequalTelescopes" -- UNUSED WithOnFreeVariable{} -> "WithOnFreeVariable" UnexpectedWithPatterns{} -> "UnexpectedWithPatterns" UninstantiatedDotPattern{} -> "UninstantiatedDotPattern" ForcedConstructorNotInstantiated{} -> "ForcedConstructorNotInstantiated" SolvedButOpenHoles{} -> "SolvedButOpenHoles" UnusedVariableInPatternSynonym -> "UnusedVariableInPatternSynonym" UnquoteFailed{} -> "UnquoteFailed" DeBruijnIndexOutOfScope{} -> "DeBruijnIndexOutOfScope" WithClausePatternMismatch{} -> "WithClausePatternMismatch" WrongHidingInApplication{} -> "WrongHidingInApplication" WrongHidingInLHS{} -> "WrongHidingInLHS" WrongHidingInLambda{} -> "WrongHidingInLambda" WrongIrrelevanceInLambda{} -> "WrongIrrelevanceInLambda" WrongQuantityInLambda{} -> "WrongQuantityInLambda" WrongNamedArgument{} -> "WrongNamedArgument" WrongNumberOfConstructorArguments{} -> "WrongNumberOfConstructorArguments" HidingMismatch{} -> "HidingMismatch" RelevanceMismatch{} -> "RelevanceMismatch" NonFatalErrors{} -> "NonFatalErrors" InstanceSearchDepthExhausted{} -> "InstanceSearchDepthExhausted" TriedToCopyConstrainedPrim{} -> "TriedToCopyConstrainedPrim" instance PrettyTCM TCErr where prettyTCM err = case err of -- Gallais, 2016-05-14 -- Given where `NonFatalErrors` are created, we know for a -- fact that ̀ws` is non-empty. TypeError _ Closure{ clValue = NonFatalErrors ws } -> foldr1 ($$) $ fmap prettyTCM ws -- Andreas, 2014-03-23 -- This use of localState seems ok since we do not collect -- Benchmark info during printing errors. TypeError s e -> localTCState $ do putTC s sayWhen (envRange $ clEnv e) (envCall $ clEnv e) $ prettyTCM e Exception r s -> sayWhere r $ return s IOException _ r e -> sayWhere r $ fwords $ show e PatternErr{} -> sayWhere err $ panic "uncaught pattern violation" instance PrettyTCM CallInfo where prettyTCM c = do let call = prettyTCM $ callInfoCall c r = callInfoRange c if null $ P.pretty r then call else call $$ nest 2 ("(at" <+> prettyTCM r <> ")") -- | Drops given amount of leading components of the qualified name. dropTopLevelModule' :: Int -> QName -> QName dropTopLevelModule' k (QName (MName ns) n) = QName (MName (drop k ns)) n -- | Drops the filename component of the qualified name. dropTopLevelModule :: QName -> TCM QName dropTopLevelModule q = ($ q) <$> topLevelModuleDropper -- | Produces a function which drops the filename component of the qualified name. topLevelModuleDropper :: TCM (QName -> QName) topLevelModuleDropper = do caseMaybeM (asksTC envCurrentPath) (return id) $ \ f -> do m <- fromMaybe __IMPOSSIBLE__ <$> lookupModuleFromSource f return $ dropTopLevelModule' $ size m instance PrettyTCM TypeError where prettyTCM err = case err of InternalError s -> panic s NotImplemented s -> fwords $ "Not implemented: " ++ s NotSupported s -> fwords $ "Not supported: " ++ s CompilationError s -> sep [fwords "Compilation error:", text s] GenericError s -> fwords s GenericDocError d -> return d PropMustBeSingleton -> fwords "Datatypes in Prop must have at most one constructor when proof irrelevance is enabled" DataMustEndInSort t -> fsep $ pwords "The type of a datatype must end in a sort." ++ [prettyTCM t] ++ pwords "isn't a sort." {- UNUSED: DataTooManyParameters -> fsep $ pwords "Too many parameters given to data type." -} ShouldEndInApplicationOfTheDatatype t -> fsep $ pwords "The target of a constructor must be the datatype applied to its parameters," ++ [prettyTCM t] ++ pwords "isn't" ShouldBeAppliedToTheDatatypeParameters s t -> fsep $ pwords "The target of the constructor should be" ++ [prettyTCM s] ++ pwords "instead of" ++ [prettyTCM t] ShouldBeApplicationOf t q -> fsep $ pwords "The pattern constructs an element of" ++ [prettyTCM q] ++ pwords "which is not the right datatype" ShouldBeRecordType t -> fsep $ pwords "Expected non-abstract record type, found " ++ [prettyTCM t] ShouldBeRecordPattern p -> fsep $ pwords "Expected record pattern" -- ", found " ++ [prettyTCM p] NotAProjectionPattern p -> fsep $ pwords "Not a valid projection for a copattern: " ++ [ prettyA p ] WrongHidingInLHS -> fwords "Unexpected implicit argument" WrongHidingInLambda t -> fwords "Found an implicit lambda where an explicit lambda was expected" WrongIrrelevanceInLambda -> fwords "Found a non-strict lambda where a irrelevant lambda was expected" WrongQuantityInLambda -> fwords "Incorrect quantity annotation in lambda" WrongNamedArgument a -> fsep $ pwords "Function does not accept argument " ++ [prettyTCM a] -- ++ pwords " (wrong argument name)" WrongHidingInApplication t -> fwords "Found an implicit application where an explicit application was expected" HidingMismatch h h' -> fwords $ "Expected " ++ verbalize (Indefinite h') ++ " argument, but found " ++ verbalize (Indefinite h) ++ " argument" RelevanceMismatch r r' -> fwords $ "Expected " ++ verbalize (Indefinite r') ++ " argument, but found " ++ verbalize (Indefinite r) ++ " argument" UninstantiatedDotPattern e -> fsep $ pwords "Failed to infer the value of dotted pattern" ForcedConstructorNotInstantiated p -> fsep $ pwords "Failed to infer that constructor pattern " ++ [prettyA p] ++ pwords " is forced" IlltypedPattern p a -> do let ho _ _ = fsep $ pwords "Cannot pattern match on functions" ifPiType a ho $ {- else -} \ _ -> do fsep $ pwords "Type mismatch" IllformedProjectionPattern p -> fsep $ pwords "Ill-formed projection pattern " ++ [prettyA p] CannotEliminateWithPattern p a -> do let isProj = isJust (isProjP p) fsep $ pwords "Cannot eliminate type" ++ prettyTCM a : if | isProj -> pwords "with projection pattern" ++ [prettyA p] | A.ProjP _ _ f <- namedArg p -> pwords "with pattern" ++ [prettyA p] ++ pwords "(suggestion: write" ++ [".(" <> prettyA (A.Proj ProjPrefix f) <> ")"] ++ pwords "for a dot pattern," ++ pwords "or remove the braces for a postfix projection)" | otherwise -> "with" : text (kindOfPattern (namedArg p)) : "pattern" : prettyA p : pwords "(did you supply too many arguments?)" where kindOfPattern = \case A.VarP{} -> "variable" A.ConP{} -> "constructor" A.ProjP{} -> __IMPOSSIBLE__ A.DefP{} -> __IMPOSSIBLE__ A.WildP{} -> "wildcard" A.DotP{} -> "dot" A.AbsurdP{} -> "absurd" A.LitP{} -> "literal" A.RecP{} -> "record" A.WithP{} -> "with" A.EqualP{} -> "equality" A.AsP _ _ p -> kindOfPattern p A.PatternSynP{} -> __IMPOSSIBLE__ WrongNumberOfConstructorArguments c expect given -> fsep $ pwords "The constructor" ++ [prettyTCM c] ++ pwords "expects" ++ [prettyTCM expect] ++ pwords "arguments (including hidden ones), but has been given" ++ [prettyTCM given] ++ pwords "(including hidden ones)" CantResolveOverloadedConstructorsTargetingSameDatatype d cs -> fsep $ pwords "Can't resolve overloaded constructors targeting the same datatype" ++ [(parens $ prettyTCM (qnameToConcrete d)) <> colon] ++ map pretty cs DoesNotConstructAnElementOf c t -> fsep $ pwords "The constructor" ++ [prettyTCM c] ++ pwords "does not construct an element of" ++ [prettyTCM t] ConstructorPatternInWrongDatatype c d -> fsep $ [prettyTCM c] ++ pwords "is not a constructor of the datatype" ++ [prettyTCM d] ShadowedModule x [] -> __IMPOSSIBLE__ ShadowedModule x ms@(m0 : _) -> do -- Clash! Concrete module name x already points to the abstract names ms. (r, m) <- do -- Andreas, 2017-07-28, issue #719. -- First, we try to find whether one of the abstract names @ms@ points back to @x@ scope <- getScope -- Get all pairs (y,m) such that y points to some m ∈ ms. let xms0 = ms >>= \ m -> map (,m) $ inverseScopeLookupModule m scope reportSLn "scope.clash.error" 30 $ "candidates = " ++ prettyShow xms0 -- Try to find x (which will have a different Range, if it has one (#2649)). let xms = filter ((\ y -> not (null $ getRange y) && y == C.QName x) . fst) xms0 reportSLn "scope.class.error" 30 $ "filtered candidates = " ++ prettyShow xms -- If we found a copy of x with non-empty range, great! ifJust (headMaybe xms) (\ (x', m) -> return (getRange x', m)) $ {-else-} do -- If that failed, we pick the first m from ms which has a nameBindingSite. let rms = ms >>= \ m -> map (,m) $ filter (noRange /=) $ map nameBindingSite $ reverse $ mnameToList m -- Andreas, 2017-07-25, issue #2649 -- Take the first nameBindingSite we can get hold of. reportSLn "scope.class.error" 30 $ "rangeful clashing modules = " ++ prettyShow rms -- If even this fails, we pick the first m and give no range. return $ fromMaybe (noRange, m0) $ headMaybe rms fsep $ pwords "Duplicate definition of module" ++ [prettyTCM x <> "."] ++ pwords "Previous definition of" ++ [help m] ++ pwords "module" ++ [prettyTCM x] ++ pwords "at" ++ [prettyTCM r] where help m = caseMaybeM (isDatatypeModule m) empty $ \case IsData -> "(datatype)" IsRecord -> "(record)" ModuleArityMismatch m EmptyTel args -> fsep $ pwords "The module" ++ [prettyTCM m] ++ pwords "is not parameterized, but is being applied to arguments" ModuleArityMismatch m tel@(ExtendTel _ _) args -> fsep $ pwords "The arguments to " ++ [prettyTCM m] ++ pwords "do not fit the telescope" ++ [prettyTCM tel] ShouldBeEmpty t [] -> fsep $ [prettyTCM t] ++ pwords "should be empty, but that's not obvious to me" ShouldBeEmpty t ps -> fsep ( [prettyTCM t] ++ pwords "should be empty, but the following constructor patterns are valid:" ) $$ nest 2 (vcat $ map (prettyPat 0) ps) ShouldBeASort t -> fsep $ [prettyTCM t] ++ pwords "should be a sort, but it isn't" ShouldBePi t -> fsep $ [prettyTCM t] ++ pwords "should be a function type, but it isn't" ShouldBePath t -> fsep $ [prettyTCM t] ++ pwords "should be a Path or PathP type, but it isn't" NotAProperTerm -> fwords "Found a malformed term" InvalidTypeSort s -> fsep $ [prettyTCM s] ++ pwords "is not a valid type" InvalidType v -> fsep $ [prettyTCM v] ++ pwords "is not a valid type" FunctionTypeInSizeUniv v -> fsep $ pwords "Functions may not return sizes, thus, function type " ++ [ prettyTCM v ] ++ pwords " is illegal" SplitOnIrrelevant t -> fsep $ pwords "Cannot pattern match against" ++ [text $ verbalize $ getRelevance t] ++ pwords "argument of type" ++ [prettyTCM $ unDom t] -- UNUSED: -- SplitOnErased t -> fsep $ -- pwords "Cannot pattern match against" ++ [text $ verbalize $ getQuantity t] ++ -- pwords "argument of type" ++ [prettyTCM $ unDom t] SplitOnNonVariable v t -> fsep $ pwords "Cannot pattern match because the (refined) argument " ++ [ prettyTCM v ] ++ pwords " is not a variable." DefinitionIsIrrelevant x -> fsep $ "Identifier" : prettyTCM x : pwords "is declared irrelevant, so it cannot be used here" VariableIsIrrelevant x -> fsep $ "Variable" : prettyTCM (nameConcrete x) : pwords "is declared irrelevant, so it cannot be used here" VariableIsErased x -> fsep $ "Variable" : prettyTCM (nameConcrete x) : pwords "is declared erased, so it cannot be used here" UnequalBecauseOfUniverseConflict cmp s t -> fsep $ [prettyTCM s, notCmp cmp, prettyTCM t, "because this would result in an invalid use of Setω" ] UnequalTerms cmp s t a -> case (s,t) of (Sort s1 , Sort s2 ) | CmpEq <- cmp -> prettyTCM $ UnequalSorts s1 s2 | CmpLeq <- cmp -> prettyTCM $ NotLeqSort s1 s2 (Sort MetaS{} , t ) -> prettyTCM $ ShouldBeASort $ El Inf t (s , Sort MetaS{} ) -> prettyTCM $ ShouldBeASort $ El Inf s (Sort DefS{} , t ) -> prettyTCM $ ShouldBeASort $ El Inf t (s , Sort DefS{} ) -> prettyTCM $ ShouldBeASort $ El Inf s (_ , _ ) -> do (d1, d2, d) <- prettyInEqual s t fsep $ [return d1, notCmp cmp, return d2] ++ pwords "of type" ++ [prettyTCM a] ++ [return d] -- UnequalLevel is UNUSED -- UnequalLevel cmp s t -> fsep $ -- [prettyTCM s, notCmp cmp, prettyTCM t] -- UnequalTelescopes is UNUSED -- UnequalTelescopes cmp a b -> fsep $ -- [prettyTCM a, notCmp cmp, prettyTCM b] UnequalTypes cmp a b -> prettyUnequal a (notCmp cmp) b -- fsep $ [prettyTCM a, notCmp cmp, prettyTCM b] UnequalRelevance cmp a b -> fsep $ [prettyTCM a, notCmp cmp, prettyTCM b] ++ pwords "because one is a relevant function type and the other is an irrelevant function type" UnequalHiding a b -> fsep $ [prettyTCM a, "!=", prettyTCM b] ++ pwords "because one is an implicit function type and the other is an explicit function type" UnequalSorts s1 s2 -> fsep $ [prettyTCM s1, "!=", prettyTCM s2] NotLeqSort s1 s2 -> fsep $ [prettyTCM s1] ++ pwords "is not less or equal than" ++ [prettyTCM s2] TooManyFields r missing xs -> fsep $ pwords "The record type" ++ [prettyTCM r] ++ pwords "does not have the fields" ++ punctuate comma (map pretty xs) ++ if null missing then [] else pwords "but it would have the fields" ++ punctuate comma (map pretty missing) DuplicateConstructors xs -> fsep $ pwords "Duplicate constructors" ++ punctuate comma (map pretty xs) ++ pwords "in datatype" DuplicateFields xs -> fsep $ pwords "Duplicate fields" ++ punctuate comma (map pretty xs) ++ pwords "in record" WithOnFreeVariable e v -> do de <- prettyA e dv <- prettyTCM v if show de == show dv then fsep $ pwords "Cannot `with` on variable" ++ [return dv] ++ pwords " bound in a module telescope (or patterns of a parent clause)" else fsep $ pwords "Cannot `with` on expression" ++ [return de] ++ pwords "which reduces to variable" ++ [return dv] ++ pwords " bound in a module telescope (or patterns of a parent clause)" UnexpectedWithPatterns ps -> fsep $ pwords "Unexpected with patterns" ++ (punctuate " |" $ map prettyA ps) WithClausePatternMismatch p q -> fsep $ pwords "With clause pattern " ++ [prettyA p] ++ pwords " is not an instance of its parent pattern " ++ [P.fsep <$> prettyTCMPatterns [q]] MetaCannotDependOn m ps i -> fsep $ pwords "The metavariable" ++ [prettyTCM $ MetaV m []] ++ pwords "cannot depend on" ++ [pvar i] ++ pwords "because it" ++ deps where pvar = prettyTCM . I.var deps = case map pvar ps of [] -> pwords "does not depend on any variables" [x] -> pwords "only depends on the variable" ++ [x] xs -> pwords "only depends on the variables" ++ punctuate comma xs MetaOccursInItself m -> fsep $ pwords "Cannot construct infinite solution of metavariable" ++ [prettyTCM $ MetaV m []] MetaIrrelevantSolution m _ -> fsep $ pwords "Cannot instantiate the metavariable because (part of) the" ++ pwords "solution was created in an irrelevant context." BuiltinMustBeConstructor s e -> fsep $ [prettyA e] ++ pwords "must be a constructor in the binding to builtin" ++ [text s] NoSuchBuiltinName s -> fsep $ pwords "There is no built-in thing called" ++ [text s] DuplicateBuiltinBinding b x y -> fsep $ pwords "Duplicate binding for built-in thing" ++ [text b <> comma] ++ pwords "previous binding to" ++ [prettyTCM x] NoBindingForBuiltin x | elem x [builtinZero, builtinSuc] -> fsep $ pwords "No binding for builtin " ++ [text x <> comma] ++ pwords ("use {-# BUILTIN " ++ builtinNat ++ " name #-} to bind builtin natural " ++ "numbers to the type 'name'") | otherwise -> fsep $ pwords "No binding for builtin thing" ++ [text x <> comma] ++ pwords ("use {-# BUILTIN " ++ x ++ " name #-} to bind it to 'name'") DuplicatePrimitiveBinding b x y -> fsep $ pwords "Duplicate binding for primitive thing" ++ [text b <> comma] ++ pwords "previous binding to" ++ [prettyTCM x] NoSuchPrimitiveFunction x -> fsep $ pwords "There is no primitive function called" ++ [text x] BuiltinInParameterisedModule x -> fwords $ "The BUILTIN pragma cannot appear inside a bound context " ++ "(for instance, in a parameterised module or as a local declaration)" IllegalLetInTelescope tb -> fsep $ -- pwords "The binding" ++ [pretty tb] ++ pwords " is not allowed in a telescope here." NoRHSRequiresAbsurdPattern ps -> fwords $ "The right-hand side can only be omitted if there " ++ "is an absurd pattern, () or {}, in the left-hand side." LocalVsImportedModuleClash m -> fsep $ pwords "The module" ++ [prettyTCM m] ++ pwords "can refer to either a local module or an imported module" SolvedButOpenHoles -> fsep $ pwords "Module cannot be imported since it has open interaction points" ++ pwords "(consider adding {-# OPTIONS --allow-unsolved-metas #-} to this module)" CyclicModuleDependency ms -> fsep (pwords "cyclic module dependency:") $$ nest 2 (vcat $ map pretty ms) FileNotFound x files -> fsep ( pwords "Failed to find source of module" ++ [pretty x] ++ pwords "in any of the following locations:" ) $$ nest 2 (vcat $ map (text . filePath) files) OverlappingProjects f m1 m2 -> fsep ( pwords "The file" ++ [text (filePath f)] ++ pwords "can be accessed via several project roots. Both" ++ [pretty m1] ++ pwords "and" ++ [pretty m2] ++ pwords "point to this file." ) AmbiguousTopLevelModuleName x files -> fsep ( pwords "Ambiguous module name. The module name" ++ [pretty x] ++ pwords "could refer to any of the following files:" ) $$ nest 2 (vcat $ map (text . filePath) files) ClashingFileNamesFor x files -> fsep ( pwords "Multiple possible sources for module" ++ [prettyTCM x] ++ pwords "found:" ) $$ nest 2 (vcat $ map (text . filePath) files) ModuleDefinedInOtherFile mod file file' -> fsep $ pwords "You tried to load" ++ [text (filePath file)] ++ pwords "which defines the module" ++ [pretty mod <> "."] ++ pwords "However, according to the include path this module should" ++ pwords "be defined in" ++ [text (filePath file') <> "."] ModuleNameUnexpected given expected -> fsep $ pwords "The name of the top level module does not match the file name. The module" ++ [ pretty given ] ++ pwords "should probably be named" ++ [ pretty expected ] ModuleNameDoesntMatchFileName given files -> fsep (pwords "The name of the top level module does not match the file name. The module" ++ [ pretty given ] ++ pwords "should be defined in one of the following files:") $$ nest 2 (vcat $ map (text . filePath) files) BothWithAndRHS -> fsep $ pwords "Unexpected right hand side" AbstractConstructorNotInScope q -> fsep $ [ "Constructor" , prettyTCM q ] ++ pwords "is abstract, thus, not in scope here" NotInScope xs -> do inscope <- Set.toList . concreteNamesInScope <$> getScope fsep (pwords "Not in scope:") $$ nest 2 (vcat $ map (name inscope) xs) where name inscope x = fsep [ pretty x , "at" <+> prettyTCM (getRange x) , suggestion inscope x ] suggestion inscope x = nest 2 $ par $ [ "did you forget space around the ':'?" | elem ':' s ] ++ [ "did you forget space around the '->'?" | isInfixOf "->" s ] ++ [ sep [ "did you mean" , nest 2 $ vcat (punctuate " or" $ map (\ y -> text $ "'" ++ y ++ "'") ys) <> "?" ] | not $ null ys ] where s = P.prettyShow x par [] = empty par [d] = parens d par ds = parens $ vcat ds strip x = map toLower $ filter (/= '_') $ P.prettyShow $ C.unqualify x maxDist n = div n 3 close a b = editDistance a b <= maxDist (length a) ys = map P.prettyShow $ filter (close (strip x) . strip) inscope NoSuchModule x -> fsep $ pwords "No module" ++ [pretty x] ++ pwords "in scope" AmbiguousName x ys -> vcat [ fsep $ pwords "Ambiguous name" ++ [pretty x <> "."] ++ pwords "It could refer to any one of" , nest 2 $ vcat $ map nameWithBinding (toList ys) , fwords "(hint: Use C-c C-w (in Emacs) if you want to know why)" ] AmbiguousModule x ys -> vcat [ fsep $ pwords "Ambiguous module name" ++ [pretty x <> "."] ++ pwords "It could refer to any one of" , nest 2 $ vcat $ map help (toList ys) , fwords "(hint: Use C-c C-w (in Emacs) if you want to know why)" ] where help :: ModuleName -> TCM Doc help m = do anno <- caseMaybeM (isDatatypeModule m) (return empty) $ \case IsData -> return $ "(datatype module)" IsRecord -> return $ "(record module)" sep [prettyTCM m, anno ] ClashingDefinition x y -> fsep $ pwords "Multiple definitions of" ++ [pretty x <> "."] ++ pwords "Previous definition at" ++ [prettyTCM $ nameBindingSite $ qnameName y] ClashingModule m1 m2 -> fsep $ pwords "The modules" ++ [prettyTCM m1, "and", prettyTCM m2] ++ pwords "clash." ClashingImport x y -> fsep $ pwords "Import clash between" ++ [pretty x, "and", prettyTCM y] ClashingModuleImport x y -> fsep $ pwords "Module import clash between" ++ [pretty x, "and", prettyTCM y] PatternShadowsConstructor x c -> fsep $ pwords "The pattern variable" ++ [prettyTCM x] ++ pwords "has the same name as the constructor" ++ [prettyTCM c] DuplicateImports m xs -> fsep $ pwords "Ambiguous imports from module" ++ [pretty m] ++ pwords "for" ++ punctuate comma (map pretty xs) NotAModuleExpr e -> fsep $ pwords "The right-hand side of a module definition must have the form 'M e1 .. en'" ++ pwords "where M is a module name. The expression" ++ [pretty e, "doesn't."] FieldOutsideRecord -> fsep $ pwords "Field appearing outside record declaration." InvalidPattern p -> fsep $ pretty p : pwords "is not a valid pattern" RepeatedVariablesInPattern xs -> fsep $ pwords "Repeated variables in pattern:" ++ map pretty xs NotAnExpression e -> fsep $ [pretty e] ++ pwords "is not a valid expression." NotAValidLetBinding nd -> fwords $ "Not a valid let-declaration" NotValidBeforeField nd -> fwords $ "This declaration is illegal in a record before the last field" NothingAppliedToHiddenArg e -> fsep $ [pretty e] ++ pwords "cannot appear by itself. It needs to be the argument to" ++ pwords "a function expecting an implicit argument." NothingAppliedToInstanceArg e -> fsep $ [pretty e] ++ pwords "cannot appear by itself. It needs to be the argument to" ++ pwords "a function expecting an instance argument." NoParseForApplication es -> fsep ( pwords "Could not parse the application" ++ [pretty $ C.RawApp noRange es]) AmbiguousParseForApplication es es' -> fsep ( pwords "Don't know how to parse" ++ [pretty_es <> "."] ++ pwords "Could mean any one of:" ) $$ nest 2 (vcat $ map pretty' es') where pretty_es :: TCM Doc pretty_es = pretty $ C.RawApp noRange es pretty' :: C.Expr -> TCM Doc pretty' e = do p1 <- pretty_es p2 <- pretty e if show p1 == show p2 then unambiguous e else pretty e unambiguous :: C.Expr -> TCM Doc unambiguous e@(C.OpApp r op _ xs) | all (isOrdinary . namedArg) xs = pretty $ foldl (C.App r) (C.Ident op) $ (map . fmap . fmap) fromOrdinary xs | any (isPlaceholder . namedArg) xs = pretty e <+> "(section)" unambiguous e = pretty e isOrdinary :: MaybePlaceholder (C.OpApp e) -> Bool isOrdinary (NoPlaceholder _ (C.Ordinary _)) = True isOrdinary _ = False fromOrdinary :: MaybePlaceholder (C.OpApp e) -> e fromOrdinary (NoPlaceholder _ (C.Ordinary e)) = e fromOrdinary _ = __IMPOSSIBLE__ isPlaceholder :: MaybePlaceholder a -> Bool isPlaceholder Placeholder{} = True isPlaceholder NoPlaceholder{} = False BadArgumentsToPatternSynonym x -> fsep $ pwords "Bad arguments to pattern synonym " ++ [prettyTCM $ headAmbQ x] TooFewArgumentsToPatternSynonym x -> fsep $ pwords "Too few arguments to pattern synonym " ++ [prettyTCM $ headAmbQ x] CannotResolveAmbiguousPatternSynonym defs -> vcat [ fsep $ pwords "Cannot resolve overloaded pattern synonym" ++ [prettyTCM x <> comma] ++ pwords "since candidates have different shapes:" , nest 2 $ vcat $ map prDef (toList defs) , fsep $ pwords "(hint: overloaded pattern synonyms must be equal up to variable and constructor names)" ] where (x, _) = headNe defs prDef (x, (xs, p)) = prettyA (A.PatternSynDef x xs p) ("at" <+> pretty r) where r = nameBindingSite $ qnameName x UnusedVariableInPatternSynonym -> fsep $ pwords "Unused variable in pattern synonym." NoParseForLHS IsLHS p -> fsep ( pwords "Could not parse the left-hand side" ++ [pretty p]) NoParseForLHS IsPatSyn p -> fsep ( pwords "Could not parse the pattern synonym" ++ [pretty p]) {- UNUSED NoParseForPatternSynonym p -> fsep $ pwords "Could not parse the pattern synonym" ++ [pretty p] -} AmbiguousParseForLHS lhsOrPatSyn p ps -> fsep ( pwords "Don't know how to parse" ++ [pretty_p <> "."] ++ pwords "Could mean any one of:" ) $$ nest 2 (vcat $ map pretty' ps) where pretty_p :: TCM Doc pretty_p = pretty p pretty' :: C.Pattern -> TCM Doc pretty' p' = do p1 <- pretty_p p2 <- pretty p' pretty $ if show p1 == show p2 then unambiguousP p' else p' -- the entire pattern is shown, not just the ambiguous part, -- so we need to dig in order to find the OpAppP's. unambiguousP :: C.Pattern -> C.Pattern unambiguousP (C.AppP x y) = C.AppP (unambiguousP x) $ (fmap.fmap) unambiguousP y unambiguousP (C.HiddenP r x) = C.HiddenP r $ fmap unambiguousP x unambiguousP (C.InstanceP r x) = C.InstanceP r $ fmap unambiguousP x unambiguousP (C.ParenP r x) = C.ParenP r $ unambiguousP x unambiguousP (C.AsP r n x) = C.AsP r n $ unambiguousP x unambiguousP (C.OpAppP r op _ xs) = foldl C.AppP (C.IdentP op) xs unambiguousP e = e OperatorInformation sects err -> prettyTCM err $+$ fsep (pwords "Operators used in the grammar:") $$ nest 2 (if null sects then "None" else vcat (map text $ lines $ Boxes.render $ (\(col1, col2, col3) -> Boxes.hsep 1 Boxes.top $ map (Boxes.vcat Boxes.left) [col1, col2, col3]) $ unzip3 $ map prettySect $ sortBy (compare `on` show . notaName . sectNotation) $ filter (not . closedWithoutHoles) sects)) where trimLeft = dropWhile isNormalHole trimRight = dropWhileEnd isNormalHole closedWithoutHoles sect = sectKind sect == NonfixNotation && null [ () | NormalHole {} <- trimLeft $ trimRight $ notation (sectNotation sect) ] prettyName n = Boxes.text $ P.render (P.pretty n) ++ " (" ++ P.render (P.pretty (nameBindingSite n)) ++ ")" prettySect sect = ( Boxes.text (P.render (P.pretty section)) Boxes.// strut , Boxes.text ("(" ++ kind ++ " " ++ (if notaIsOperator nota then "operator" else "notation") ++ (if sectIsSection sect then " section" else "") ++ (case sectLevel sect of Nothing -> "" Just Unrelated -> ", unrelated" Just (Related n) -> ", level " ++ show n) ++ ")") Boxes.// strut , "[" Boxes.<> Boxes.vcat Boxes.left (map (\n -> prettyName n Boxes.<> ",") names ++ [prettyName name Boxes.<> "]"]) ) where nota = sectNotation sect section = qualifyFirstIdPart (foldr (\x s -> C.nameToRawName x ++ "." ++ s) "" (init (C.qnameParts (notaName nota)))) (trim (notation nota)) qualifyFirstIdPart _ [] = [] qualifyFirstIdPart q (IdPart x : ps) = IdPart (fmap (q ++) x) : ps qualifyFirstIdPart q (p : ps) = p : qualifyFirstIdPart q ps trim = case sectKind sect of InfixNotation -> trimLeft . trimRight PrefixNotation -> trimRight PostfixNotation -> trimLeft NonfixNotation -> id NoNotation -> __IMPOSSIBLE__ (names, name) = case Set.toList $ notaNames nota of [] -> __IMPOSSIBLE__ ns -> (init ns, last ns) strut = Boxes.emptyBox (length names) 0 kind = case sectKind sect of PrefixNotation -> "prefix" PostfixNotation -> "postfix" NonfixNotation -> "closed" NoNotation -> __IMPOSSIBLE__ InfixNotation -> case fixityAssoc $ notaFixity nota of NonAssoc -> "infix" LeftAssoc -> "infixl" RightAssoc -> "infixr" {- UNUSED AmbiguousParseForPatternSynonym p ps -> fsep ( pwords "Don't know how to parse" ++ [pretty p <> "."] ++ pwords "Could mean any one of:" ) $$ nest 2 (vcat $ map pretty ps) -} {- UNUSED IncompletePatternMatching v args -> fsep $ pwords "Incomplete pattern matching for" ++ [prettyTCM v <> "."] ++ pwords "No match for" ++ map prettyTCM args -} SplitError e -> prettyTCM e ImpossibleConstructor c neg -> fsep $ pwords "The case for the constructor " ++ [prettyTCM c] ++ pwords " is impossible" ++ [prettyTCM neg] ++ pwords "Possible solution: remove the clause, or use an absurd pattern ()." TooManyPolarities x n -> fsep $ pwords "Too many polarities given in the POLARITY pragma for" ++ [prettyTCM x] ++ pwords "(at most" ++ [text (show n)] ++ pwords "allowed)." InstanceNoCandidate t errs -> vcat $ [ fsep $ pwords "No instance of type" ++ [prettyTCM t] ++ pwords "was found in scope." , vcat $ map prCand errs ] where prCand (term, err) = text "-" <+> vcat [ prettyTCM term text "was ruled out because" , prettyTCM err ] UnquoteFailed e -> case e of BadVisibility msg arg -> fsep $ pwords $ "Unable to unquote the argument. It should be `" ++ msg ++ "'." ConInsteadOfDef x def con -> fsep $ pwords ("Use " ++ con ++ " instead of " ++ def ++ " for constructor") ++ [prettyTCM x] DefInsteadOfCon x def con -> fsep $ pwords ("Use " ++ def ++ " instead of " ++ con ++ " for non-constructor") ++ [prettyTCM x] NonCanonical kind t -> fwords ("Cannot unquote non-canonical " ++ kind) $$ nest 2 (prettyTCM t) BlockedOnMeta _ m -> fsep $ pwords $ "Unquote failed because of unsolved meta variables." UnquotePanic err -> __IMPOSSIBLE__ DeBruijnIndexOutOfScope i EmptyTel [] -> fsep $ pwords $ "de Bruijn index " ++ show i ++ " is not in scope in the empty context" DeBruijnIndexOutOfScope i cxt names -> sep [ text ("de Bruijn index " ++ show i ++ " is not in scope in the context") , inTopContext $ addContext ("_" :: String) $ prettyTCM cxt' ] where cxt' = cxt `abstract` raise (size cxt) (nameCxt names) nameCxt [] = EmptyTel nameCxt (x : xs) = ExtendTel (defaultDom (El __DUMMY_SORT__ $ I.var 0)) $ NoAbs (P.prettyShow x) $ nameCxt xs NeedOptionCopatterns -> fsep $ pwords "Option --copatterns needed to enable destructor patterns" NeedOptionRewriting -> fsep $ pwords "Option --rewriting needed to add and use rewrite rules" NeedOptionProp -> fsep $ pwords "Universe Prop is disabled (use options --prop and --no-prop to enable/disable Prop)" GeneralizeNotSupportedHere x -> fsep $ pwords $ "Generalizable variable " ++ show x ++ " is not supported here" GeneralizeCyclicDependency -> fsep $ pwords "Cyclic dependency between generalized variables" GeneralizeUnsolvedMeta -> fsep $ pwords "Unsolved meta not generalized" MultipleFixityDecls xs -> sep [ fsep $ pwords "Multiple fixity or syntax declarations for" , vcat $ map f xs ] where f (x, fs) = pretty x <> ": " <+> fsep (map pretty fs) MultiplePolarityPragmas xs -> fsep $ pwords "Multiple polarity pragmas for" ++ map pretty xs NonFatalErrors ws -> foldr1 ($$) $ fmap prettyTCM ws InstanceSearchDepthExhausted c a d -> fsep $ pwords ("Instance search depth exhausted (max depth: " ++ show d ++ ") for candidate") ++ [hang (prettyTCM c <+> ":") 2 (prettyTCM a)] TriedToCopyConstrainedPrim q -> fsep $ pwords "Cannot create a module containing a copy of" ++ [prettyTCM q] where mpar n args | n > 0 && not (null args) = parens | otherwise = id prettyArg :: Arg (I.Pattern' a) -> TCM Doc prettyArg (Arg info x) = case getHiding info of Hidden -> braces $ prettyPat 0 x Instance{} -> dbraces $ prettyPat 0 x NotHidden -> prettyPat 1 x prettyPat :: Integer -> (I.Pattern' a) -> TCM Doc prettyPat _ (I.VarP _ _) = "_" prettyPat _ (I.DotP _ _) = "._" prettyPat n (I.ConP c _ args) = mpar n args $ prettyTCM c <+> fsep (map (prettyArg . fmap namedThing) args) prettyPat n (I.DefP o q args) = mpar n args $ prettyTCM q <+> fsep (map (prettyArg . fmap namedThing) args) prettyPat _ (I.LitP l) = prettyTCM l prettyPat _ (I.ProjP _ p) = "." <> prettyTCM p prettyPat _ (I.IApplyP _ _ _ _) = "_" notCmp :: Comparison -> TCM Doc notCmp cmp = "!" <> prettyTCM cmp -- | Print two terms that are supposedly unequal. -- If they print to the same identifier, add some explanation -- why they are different nevertheless. prettyInEqual :: Term -> Term -> TCM (Doc, Doc, Doc) prettyInEqual t1 t2 = do d1 <- prettyTCM t1 d2 <- prettyTCM t2 (d1, d2,) <$> do -- if printed differently, no extra explanation needed if P.render d1 /= P.render d2 then empty else do (v1, v2) <- instantiate (t1, t2) case (v1, v2) of (I.Var i1 _, I.Var i2 _) | i1 == i2 -> generic -- possible, see issue 1826 | otherwise -> varVar i1 i2 (I.Def{}, I.Con{}) -> __IMPOSSIBLE__ -- ambiguous identifiers (I.Con{}, I.Def{}) -> __IMPOSSIBLE__ (I.Var{}, I.Def{}) -> varDef (I.Def{}, I.Var{}) -> varDef (I.Var{}, I.Con{}) -> varCon (I.Con{}, I.Var{}) -> varCon _ -> empty where varDef, varCon, generic :: TCM Doc varDef = parens $ fwords "because one is a variable and one a defined identifier" varCon = parens $ fwords "because one is a variable and one a constructor" generic = parens $ fwords $ "although these terms are looking the same, " ++ "they contain different but identically rendered identifiers somewhere" varVar :: Int -> Int -> TCM Doc varVar i j = parens $ fwords $ "because one has de Bruijn index " ++ show i ++ " and the other " ++ show j class PrettyUnequal a where prettyUnequal :: a -> TCM Doc -> a -> TCM Doc instance PrettyUnequal Term where prettyUnequal t1 ncmp t2 = do (d1, d2, d) <- prettyInEqual t1 t2 fsep $ return d1 : ncmp : return d2 : return d : [] instance PrettyUnequal Type where prettyUnequal t1 ncmp t2 = prettyUnequal (unEl t1) ncmp (unEl t2) instance PrettyTCM SplitError where prettyTCM err = case err of NotADatatype t -> enterClosure t $ \ t -> fsep $ pwords "Cannot split on argument of non-datatype" ++ [prettyTCM t] IrrelevantDatatype t -> enterClosure t $ \ t -> fsep $ pwords "Cannot split on argument of irrelevant datatype" ++ [prettyTCM t] ErasedDatatype t -> enterClosure t $ \ t -> fsep $ pwords "Cannot branch on erased argument of datatype" ++ [prettyTCM t] CoinductiveDatatype t -> enterClosure t $ \ t -> fsep $ pwords "Cannot pattern match on the coinductive type" ++ [prettyTCM t] {- UNUSED NoRecordConstructor t -> fsep $ pwords "Cannot pattern match on record" ++ [prettyTCM t] ++ pwords "because it has no constructor" -} UnificationStuck c tel cIxs gIxs errs | length cIxs /= length gIxs -> __IMPOSSIBLE__ | otherwise -> vcat $ [ fsep $ pwords "I'm not sure if there should be a case for the constructor" ++ [prettyTCM c <> ","] ++ pwords "because I get stuck when trying to solve the following" ++ pwords "unification problems (inferred index ≟ expected index):" ] ++ zipWith (\c g -> nest 2 $ addContext tel $ prettyTCM c <+> "≟" <+> prettyTCM g) cIxs gIxs ++ if null errs then [] else [ fsep $ pwords "Possible" ++ pwords (singPlural errs "reason" "reasons") ++ pwords "why unification failed:" ] ++ map (nest 2 . prettyTCM) errs CosplitCatchall -> fsep $ pwords "Cannot split into projections because not all clauses have a projection copattern" CosplitNoTarget -> fsep $ pwords "Cannot split into projections because target type is unknown" CosplitNoRecordType t -> enterClosure t $ \t -> fsep $ pwords "Cannot split into projections because the target type " ++ [prettyTCM t] ++ pwords " is not a record type" CannotCreateMissingClause f cl msg t -> fsep ( pwords "Cannot generate inferred clause for" ++ [prettyTCM f <> "."] ++ pwords "Case to handle:") $$ nest 2 (vcat $ [display cl]) $$ (pure msg <+> enterClosure t displayAbs <> ".") where displayAbs (Abs x t) = addContext x $ prettyTCM t displayAbs (NoAbs x t) = prettyTCM t display (tel, ps) = prettyTCM $ NamedClause f True $ empty { clauseTel = tel, namedClausePats = ps } GenericSplitError s -> fsep $ pwords "Split failed:" ++ pwords s instance PrettyTCM NegativeUnification where prettyTCM err = case err of UnifyConflict tel u v -> addContext tel $ vcat $ [ fsep $ pwords "because unification ended with a conflicting equation " , nest 2 $ prettyTCM u <+> "≟" <+> prettyTCM v ] UnifyCycle tel i u -> addContext tel $ vcat $ [ fsep $ pwords "because unification ended with a cyclic equation " , nest 2 $ prettyTCM (var i) <+> "≟" <+> prettyTCM u ] instance PrettyTCM UnificationFailure where prettyTCM err = case err of UnifyIndicesNotVars tel a u v ixs -> addContext tel $ fsep $ pwords "Cannot apply injectivity to the equation" ++ [prettyTCM u] ++ pwords "=" ++ [prettyTCM v] ++ pwords "of type" ++ [prettyTCM a] ++ pwords "because I cannot generalize over the indices" ++ [prettyList (map prettyTCM ixs) <> "."] UnifyRecursiveEq tel a i u -> addContext tel $ fsep $ pwords "Cannot solve variable " ++ [prettyTCM (var i)] ++ pwords " of type " ++ [prettyTCM a] ++ pwords " with solution " ++ [prettyTCM u] ++ pwords " because the variable occurs in the solution," ++ pwords " or in the type of one of the variables in the solution." UnifyReflexiveEq tel a u -> addContext tel $ fsep $ pwords "Cannot eliminate reflexive equation" ++ [prettyTCM u] ++ pwords "=" ++ [prettyTCM u] ++ pwords "of type" ++ [prettyTCM a] ++ pwords "because K has been disabled." instance PrettyTCM Call where prettyTCM c = withContextPrecedence TopCtx $ case c of CheckClause t cl -> do reportSLn "error.checkclause" 60 $ "prettyTCM CheckClause: cl = " ++ show (deepUnscope cl) clc <- abstractToConcrete_ cl reportSLn "error.checkclause" 40 $ "cl (Concrete) = " ++ show clc fsep $ pwords "when checking that the clause" ++ [prettyA cl] ++ pwords "has type" ++ [prettyTCM t] CheckPattern p tel t -> addContext tel $ fsep $ pwords "when checking that the pattern" ++ [prettyA p] ++ pwords "has type" ++ [prettyTCM t] CheckLetBinding b -> fsep $ pwords "when checking the let binding" ++ [prettyA b] InferExpr e -> fsep $ pwords "when inferring the type of" ++ [prettyA e] CheckExprCall cmp e t -> fsep $ pwords "when checking that the expression" ++ [prettyA e] ++ pwords "has type" ++ [prettyTCM t] IsTypeCall e s -> fsep $ pwords "when checking that the expression" ++ [prettyA e] ++ pwords "is a type of sort" ++ [prettyTCM s] IsType_ e -> fsep $ pwords "when checking that the expression" ++ [prettyA e] ++ pwords "is a type" CheckProjection _ x t -> fsep $ pwords "when checking the projection" ++ [ sep [ prettyTCM x <+> ":" , nest 2 $ prettyTCM t ] ] CheckArguments r es t0 t1 -> fsep $ pwords "when checking that" ++ map hPretty es ++ pwords (singPlural es "is a valid argument" "are valid arguments") ++ pwords "to a function of type" ++ [prettyTCM t0] CheckTargetType r infTy expTy -> sep [ "when checking that the inferred type of an application" , nest 2 $ prettyTCM infTy , "matches the expected type" , nest 2 $ prettyTCM expTy ] CheckRecDef _ x ps cs -> fsep $ pwords "when checking the definition of" ++ [prettyTCM x] CheckDataDef _ x ps cs -> fsep $ pwords "when checking the definition of" ++ [prettyTCM x] CheckConstructor d _ _ (A.Axiom _ _ _ _ c _) -> fsep $ pwords "when checking the constructor" ++ [prettyTCM c] ++ pwords "in the declaration of" ++ [prettyTCM d] CheckConstructor{} -> __IMPOSSIBLE__ CheckConstructorFitsIn c t s -> fsep $ pwords "when checking that the type" ++ [prettyTCM t] ++ pwords "of the constructor" ++ [prettyTCM c] ++ pwords "fits in the sort" ++ [prettyTCM s] ++ pwords "of the datatype." CheckFunDefCall _ f _ -> fsep $ pwords "when checking the definition of" ++ [prettyTCM f] CheckPragma _ p -> fsep $ pwords "when checking the pragma" ++ [prettyA $ RangeAndPragma noRange p] CheckPrimitive _ x e -> fsep $ pwords "when checking that the type of the primitive function" ++ [prettyTCM x] ++ pwords "is" ++ [prettyA e] CheckWithFunctionType a -> fsep $ pwords "when checking that the type" ++ [prettyTCM a] ++ pwords "of the generated with function is well-formed" CheckDotPattern e v -> fsep $ pwords "when checking that the given dot pattern" ++ [prettyA e] ++ pwords "matches the inferred value" ++ [prettyTCM v] CheckPatternShadowing c -> fsep $ pwords "when checking the clause" ++ [prettyA c] CheckNamedWhere m -> fsep $ pwords "when checking the named where block" ++ [prettyA m] InferVar x -> fsep $ pwords "when inferring the type of" ++ [prettyTCM x] InferDef x -> fsep $ pwords "when inferring the type of" ++ [prettyTCM x] CheckIsEmpty r t -> fsep $ pwords "when checking that" ++ [prettyTCM t] ++ pwords "has no constructors" ScopeCheckExpr e -> fsep $ pwords "when scope checking" ++ [pretty e] ScopeCheckDeclaration d -> fwords ("when scope checking the declaration" ++ suffix) $$ nest 2 (vcat $ map pretty ds) where ds = D.notSoNiceDeclarations d suffix = case ds of [_] -> "" _ -> "s" ScopeCheckLHS x p -> fsep $ pwords "when scope checking the left-hand side" ++ [pretty p] ++ pwords "in the definition of" ++ [pretty x] NoHighlighting -> empty SetRange r -> fsep (pwords "when doing something at") <+> prettyTCM r CheckSectionApplication _ m1 modapp -> fsep $ pwords "when checking the module application" ++ [prettyA $ A.Apply info m1 modapp initCopyInfo defaultImportDir] where info = A.ModuleInfo noRange noRange Nothing Nothing Nothing ModuleContents -> fsep $ pwords "when retrieving the contents of a module" where hPretty :: Arg (Named_ Expr) -> TCM Doc hPretty a = withContextPrecedence (ArgumentCtx PreferParen) $ pretty =<< abstractToConcreteHiding a a --------------------------------------------------------------------------- -- * Natural language --------------------------------------------------------------------------- class Verbalize a where verbalize :: a -> String instance Verbalize Hiding where verbalize h = case h of Hidden -> "hidden" NotHidden -> "visible" Instance{} -> "instance" instance Verbalize Relevance where verbalize r = case r of Relevant -> "relevant" Irrelevant -> "irrelevant" NonStrict -> "shape-irrelevant" instance Verbalize Quantity where verbalize = \case Quantity0 -> "erased" Quantity1 -> "linear" Quantityω -> "unrestricted" -- | Indefinite article. data Indefinite a = Indefinite a instance Verbalize a => Verbalize (Indefinite a) where verbalize (Indefinite a) = case verbalize a of "" -> "" w@(c:cs) | c `elem` ['a','e','i','o'] -> "an " ++ w | otherwise -> "a " ++ w -- Aarne Ranta would whip me if he saw this. singPlural :: Sized a => a -> c -> c -> c singPlural xs singular plural = if size xs == 1 then singular else plural Agda-2.6.0.1/src/full/Agda/TypeChecking/Unquote.hs0000644000000000000000000006354513466402171017657 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Unquote where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Arrow (first, second) import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer hiding ((<>)) import Control.Monad.Trans (lift) import Data.Char import Data.Maybe (fromMaybe) import Data.Traversable (traverse) import Data.Word import Agda.Syntax.Common import Agda.Syntax.Internal as I import qualified Agda.Syntax.Reflected as R import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Fixity import Agda.Syntax.Info import Agda.Syntax.Translation.ReflectedToAbstract import Agda.TypeChecking.Constraints import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.Env import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Quote import Agda.TypeChecking.Conversion import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Primitive import {-# SOURCE #-} Agda.TypeChecking.Rules.Term import {-# SOURCE #-} Agda.TypeChecking.Rules.Def import Agda.Utils.Except ( mkExceptT , MonadError(catchError, throwError) , ExceptT , runExceptT ) import Agda.Utils.Either import Agda.Utils.FileName import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Pretty (prettyShow) import Agda.Utils.String ( Str(Str), unStr ) import qualified Agda.Interaction.Options.Lenses as Lens #include "undefined.h" import Agda.Utils.Impossible agdaTermType :: TCM Type agdaTermType = El (mkType 0) <$> primAgdaTerm agdaTypeType :: TCM Type agdaTypeType = agdaTermType qNameType :: TCM Type qNameType = El (mkType 0) <$> primQName data Dirty = Dirty | Clean deriving (Eq) -- Keep track of the original context. We need to use that when adding new -- definitions. Also state snapshot from last commit and whether the state is -- dirty (definitions have been added). type UnquoteState = (Dirty, TCState) type UnquoteM = ReaderT Context (StateT UnquoteState (WriterT [QName] (ExceptT UnquoteError TCM))) type UnquoteRes a = Either UnquoteError ((a, UnquoteState), [QName]) unpackUnquoteM :: UnquoteM a -> Context -> UnquoteState -> TCM (UnquoteRes a) unpackUnquoteM m cxt s = runExceptT $ runWriterT $ runStateT (runReaderT m cxt) s packUnquoteM :: (Context -> UnquoteState -> TCM (UnquoteRes a)) -> UnquoteM a packUnquoteM f = ReaderT $ \ cxt -> StateT $ \ s -> WriterT $ mkExceptT $ f cxt s runUnquoteM :: UnquoteM a -> TCM (Either UnquoteError (a, [QName])) runUnquoteM m = do cxt <- asksTC envContext s <- getTC z <- unpackUnquoteM m cxt (Clean, s) case z of Left err -> return $ Left err Right ((x, _), decls) -> Right (x, decls) <$ mapM_ isDefined decls where isDefined x = do def <- theDef <$> getConstInfo x case def of Function{funClauses = []} -> genericError $ "Missing definition for " ++ prettyShow x _ -> return () liftU1 :: (TCM (UnquoteRes a) -> TCM (UnquoteRes b)) -> UnquoteM a -> UnquoteM b liftU1 f m = packUnquoteM $ \ cxt s -> f (unpackUnquoteM m cxt s) liftU2 :: (TCM (UnquoteRes a) -> TCM (UnquoteRes b) -> TCM (UnquoteRes c)) -> UnquoteM a -> UnquoteM b -> UnquoteM c liftU2 f m1 m2 = packUnquoteM $ \ cxt s -> f (unpackUnquoteM m1 cxt s) (unpackUnquoteM m2 cxt s) inOriginalContext :: UnquoteM a -> UnquoteM a inOriginalContext m = packUnquoteM $ \ cxt s -> modifyContext (const cxt) $ unpackUnquoteM m cxt s isCon :: ConHead -> TCM Term -> UnquoteM Bool isCon con tm = do t <- liftTCM tm case t of Con con' _ _ -> return (con == con') _ -> return False isDef :: QName -> TCM Term -> UnquoteM Bool isDef f tm = do t <- liftTCM $ etaContract =<< normalise =<< tm case t of Def g _ -> return (f == g) _ -> return False reduceQuotedTerm :: Term -> UnquoteM Term reduceQuotedTerm t = do b <- ifBlocked t {-then-} (\ m _ -> pure $ Left m) {-else-} (\ _ t -> pure $ Right t) case b of Left m -> do s <- gets snd; throwError $ BlockedOnMeta s m Right t -> return t class Unquote a where unquote :: I.Term -> UnquoteM a unquoteN :: Unquote a => Arg Term -> UnquoteM a unquoteN a | visible a && isRelevant a = unquote $ unArg a unquoteN a = throwError $ BadVisibility "visible" a choice :: Monad m => [(m Bool, m a)] -> m a -> m a choice [] dflt = dflt choice ((mb, mx) : mxs) dflt = ifM mb mx $ choice mxs dflt ensureDef :: QName -> UnquoteM QName ensureDef x = do i <- either (const Axiom) theDef <$> getConstInfo' x -- for recursive unquoteDecl case i of Constructor{} -> do def <- liftTCM $ prettyTCM =<< primAgdaTermDef con <- liftTCM $ prettyTCM =<< primAgdaTermCon throwError $ ConInsteadOfDef x (show def) (show con) _ -> return x ensureCon :: QName -> UnquoteM QName ensureCon x = do i <- either (const Axiom) theDef <$> getConstInfo' x -- for recursive unquoteDecl case i of Constructor{} -> return x _ -> do def <- liftTCM $ prettyTCM =<< primAgdaTermDef con <- liftTCM $ prettyTCM =<< primAgdaTermCon throwError $ DefInsteadOfCon x (show def) (show con) pickName :: R.Type -> String pickName a = case a of R.Pi{} -> "f" R.Sort{} -> "A" R.Def d _ | c:_ <- show (qnameName d), isAlpha c -> [toLower c] _ -> "_" -- TODO: reflect Quantity instance Unquote Modality where unquote t = (`Modality` defaultQuantity) <$> unquote t instance Unquote ArgInfo where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [h,r] <- allApplyElims es -> do choice [(c `isCon` primArgArgInfo, ArgInfo <$> unquoteN h <*> unquoteN r <*> pure Reflected <*> pure unknownFreeVariables)] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "arg info" t instance Unquote a => Unquote (Arg a) where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [info,x] <- allApplyElims es -> do choice [(c `isCon` primArgArg, Arg <$> unquoteN info <*> unquoteN x)] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "arg" t -- Andreas, 2013-10-20: currently, post-fix projections are not part of the -- quoted syntax. instance Unquote R.Elim where unquote t = R.Apply <$> unquote t instance Unquote Bool where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> choice [ (c `isCon` primTrue, pure True) , (c `isCon` primFalse, pure False) ] __IMPOSSIBLE__ _ -> throwError $ NonCanonical "boolean" t instance Unquote Integer where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitNat _ n) -> return n _ -> throwError $ NonCanonical "integer" t instance Unquote Word64 where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitWord64 _ n) -> return n _ -> throwError $ NonCanonical "word64" t instance Unquote Double where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitFloat _ x) -> return x _ -> throwError $ NonCanonical "float" t instance Unquote Char where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitChar _ x) -> return x _ -> throwError $ NonCanonical "char" t instance Unquote Str where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitString _ x) -> return (Str x) _ -> throwError $ NonCanonical "string" t unquoteString :: Term -> UnquoteM String unquoteString x = unStr <$> unquote x unquoteNString :: Arg Term -> UnquoteM String unquoteNString x = unStr <$> unquoteN x data ErrorPart = StrPart String | TermPart R.Term | NamePart QName instance PrettyTCM ErrorPart where prettyTCM (StrPart s) = text s prettyTCM (TermPart t) = prettyTCM t prettyTCM (NamePart x) = prettyTCM x instance Unquote ErrorPart where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [x] <- allApplyElims es -> choice [ (c `isCon` primAgdaErrorPartString, StrPart <$> unquoteNString x) , (c `isCon` primAgdaErrorPartTerm, TermPart <$> unquoteN x) , (c `isCon` primAgdaErrorPartName, NamePart <$> unquoteN x) ] __IMPOSSIBLE__ _ -> throwError $ NonCanonical "error part" t instance Unquote a => Unquote [a] where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [x,xs] <- allApplyElims es -> do choice [(c `isCon` primCons, (:) <$> unquoteN x <*> unquoteN xs)] __IMPOSSIBLE__ Con c _ [] -> do choice [(c `isCon` primNil, return [])] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "list" t instance Unquote Hiding where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> do choice [(c `isCon` primHidden, return Hidden) ,(c `isCon` primInstance, return (Instance NoOverlap)) ,(c `isCon` primVisible, return NotHidden)] __IMPOSSIBLE__ Con c _ vs -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "visibility" t instance Unquote Relevance where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> do choice [(c `isCon` primRelevant, return Relevant) ,(c `isCon` primIrrelevant, return Irrelevant)] __IMPOSSIBLE__ Con c _ vs -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "relevance" t instance Unquote QName where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitQName _ x) -> return x _ -> throwError $ NonCanonical "name" t instance Unquote a => Unquote (R.Abs a) where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [x,y] <- allApplyElims es -> do choice [(c `isCon` primAbsAbs, R.Abs <$> (hint <$> unquoteNString x) <*> unquoteN y)] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "abstraction" t where hint x | not (null x) = x | otherwise = "_" instance Unquote MetaId where unquote t = do t <- reduceQuotedTerm t case t of Lit (LitMeta r f x) -> liftTCM $ do live <- (f ==) <$> getCurrentPath unless live $ do m <- fromMaybe __IMPOSSIBLE__ <$> lookupModuleFromSource f typeError . GenericDocError =<< sep [ "Can't unquote stale metavariable" , pretty m <> "." <> pretty x ] return x _ -> throwError $ NonCanonical "meta variable" t instance Unquote a => Unquote (Dom a) where unquote t = domFromArg <$> unquote t instance Unquote R.Sort where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> do choice [(c `isCon` primAgdaSortUnsupported, return R.UnknownS)] __IMPOSSIBLE__ Con c _ es | Just [u] <- allApplyElims es -> do choice [(c `isCon` primAgdaSortSet, R.SetS <$> unquoteN u) ,(c `isCon` primAgdaSortLit, R.LitS <$> unquoteN u)] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "sort" t instance Unquote Literal where unquote t = do t <- reduceQuotedTerm t let litMeta r x = do file <- getCurrentPath return $ LitMeta r file x case t of Con c _ es | Just [x] <- allApplyElims es -> choice [ (c `isCon` primAgdaLitNat, LitNat noRange <$> unquoteN x) , (c `isCon` primAgdaLitFloat, LitFloat noRange <$> unquoteN x) , (c `isCon` primAgdaLitChar, LitChar noRange <$> unquoteN x) , (c `isCon` primAgdaLitString, LitString noRange <$> unquoteNString x) , (c `isCon` primAgdaLitQName, LitQName noRange <$> unquoteN x) , (c `isCon` primAgdaLitMeta, litMeta noRange =<< unquoteN x) ] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "literal" t instance Unquote R.Term where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> choice [ (c `isCon` primAgdaTermUnsupported, return R.Unknown) ] __IMPOSSIBLE__ Con c _ es | Just [x] <- allApplyElims es -> do choice [ (c `isCon` primAgdaTermSort, R.Sort <$> unquoteN x) , (c `isCon` primAgdaTermLit, R.Lit <$> unquoteN x) ] __IMPOSSIBLE__ Con c _ es | Just [x, y] <- allApplyElims es -> choice [ (c `isCon` primAgdaTermVar, R.Var <$> (fromInteger <$> unquoteN x) <*> unquoteN y) , (c `isCon` primAgdaTermCon, R.Con <$> (ensureCon =<< unquoteN x) <*> unquoteN y) , (c `isCon` primAgdaTermDef, R.Def <$> (ensureDef =<< unquoteN x) <*> unquoteN y) , (c `isCon` primAgdaTermMeta, R.Meta <$> unquoteN x <*> unquoteN y) , (c `isCon` primAgdaTermLam, R.Lam <$> unquoteN x <*> unquoteN y) , (c `isCon` primAgdaTermPi, mkPi <$> unquoteN x <*> unquoteN y) , (c `isCon` primAgdaTermExtLam, R.ExtLam <$> unquoteN x <*> unquoteN y) ] __IMPOSSIBLE__ where mkPi :: Dom R.Type -> R.Abs R.Type -> R.Term -- TODO: implement Free for reflected syntax so this works again --mkPi a (R.Abs "_" b) = R.Pi a (R.Abs x b) -- where x | 0 `freeIn` b = pickName (unDom a) -- | otherwise = "_" mkPi a (R.Abs "_" b) = R.Pi a (R.Abs (pickName (unDom a)) b) mkPi a b = R.Pi a b Con{} -> __IMPOSSIBLE__ Lit{} -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "term" t instance Unquote R.Pattern where unquote t = do t <- reduceQuotedTerm t case t of Con c _ [] -> do choice [ (c `isCon` primAgdaPatAbsurd, return R.AbsurdP) , (c `isCon` primAgdaPatDot, return R.DotP) ] __IMPOSSIBLE__ Con c _ es | Just [x] <- allApplyElims es -> do choice [ (c `isCon` primAgdaPatVar, R.VarP <$> unquoteNString x) , (c `isCon` primAgdaPatProj, R.ProjP <$> unquoteN x) , (c `isCon` primAgdaPatLit, R.LitP <$> unquoteN x) ] __IMPOSSIBLE__ Con c _ es | Just [x, y] <- allApplyElims es -> do choice [ (c `isCon` primAgdaPatCon, R.ConP <$> unquoteN x <*> unquoteN y) ] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "pattern" t instance Unquote R.Clause where unquote t = do t <- reduceQuotedTerm t case t of Con c _ es | Just [x] <- allApplyElims es -> do choice [ (c `isCon` primAgdaClauseAbsurd, R.AbsurdClause <$> unquoteN x) ] __IMPOSSIBLE__ Con c _ es | Just [x, y] <- allApplyElims es -> do choice [ (c `isCon` primAgdaClauseClause, R.Clause <$> unquoteN x <*> unquoteN y) ] __IMPOSSIBLE__ Con c _ _ -> __IMPOSSIBLE__ _ -> throwError $ NonCanonical "clause" t -- Unquoting TCM computations --------------------------------------------- -- | Argument should be a term of type @Term → TCM A@ for some A. Returns the -- resulting term of type @A@. The second argument is the term for the hole, -- which will typically be a metavariable. This is passed to the computation -- (quoted). unquoteTCM :: I.Term -> I.Term -> UnquoteM I.Term unquoteTCM m hole = do qhole <- liftTCM $ quoteTerm hole evalTCM (m `apply` [defaultArg qhole]) evalTCM :: I.Term -> UnquoteM I.Term evalTCM v = do v <- reduceQuotedTerm v liftTCM $ reportSDoc "tc.unquote.eval" 90 $ "evalTCM" <+> prettyTCM v let failEval = throwError $ NonCanonical "type checking computation" v case v of I.Def f [] -> choice [ (f `isDef` primAgdaTCMGetContext, tcGetContext) , (f `isDef` primAgdaTCMCommit, tcCommit) ] failEval I.Def f [u] -> choice [ (f `isDef` primAgdaTCMInferType, tcFun1 tcInferType u) , (f `isDef` primAgdaTCMNormalise, tcFun1 tcNormalise u) , (f `isDef` primAgdaTCMReduce, tcFun1 tcReduce u) , (f `isDef` primAgdaTCMGetType, tcFun1 tcGetType u) , (f `isDef` primAgdaTCMGetDefinition, tcFun1 tcGetDefinition u) , (f `isDef` primAgdaTCMIsMacro, tcFun1 tcIsMacro u) , (f `isDef` primAgdaTCMFreshName, tcFun1 tcFreshName u) ] failEval I.Def f [u, v] -> choice [ (f `isDef` primAgdaTCMUnify, tcFun2 tcUnify u v) , (f `isDef` primAgdaTCMCheckType, tcFun2 tcCheckType u v) , (f `isDef` primAgdaTCMDeclareDef, uqFun2 tcDeclareDef u v) , (f `isDef` primAgdaTCMDeclarePostulate, uqFun2 tcDeclarePostulate u v) , (f `isDef` primAgdaTCMDefineFun, uqFun2 tcDefineFun u v) ] failEval I.Def f [l, a, u] -> choice [ (f `isDef` primAgdaTCMReturn, return (unElim u)) , (f `isDef` primAgdaTCMTypeError, tcFun1 tcTypeError u) , (f `isDef` primAgdaTCMQuoteTerm, tcQuoteTerm (unElim u)) , (f `isDef` primAgdaTCMUnquoteTerm, tcFun1 (tcUnquoteTerm (mkT (unElim l) (unElim a))) u) , (f `isDef` primAgdaTCMBlockOnMeta, uqFun1 tcBlockOnMeta u) , (f `isDef` primAgdaTCMDebugPrint, tcFun3 tcDebugPrint l a u) , (f `isDef` primAgdaTCMNoConstraints, tcNoConstraints (unElim u)) , (f `isDef` primAgdaTCMRunSpeculative, tcRunSpeculative (unElim u)) ] failEval I.Def f [_, _, u, v] -> choice [ (f `isDef` primAgdaTCMCatchError, tcCatchError (unElim u) (unElim v)) , (f `isDef` primAgdaTCMWithNormalisation, tcWithNormalisation (unElim u) (unElim v)) , (f `isDef` primAgdaTCMExtendContext, tcExtendContext (unElim u) (unElim v)) , (f `isDef` primAgdaTCMInContext, tcInContext (unElim u) (unElim v)) ] failEval I.Def f [_, _, _, _, m, k] -> choice [ (f `isDef` primAgdaTCMBind, tcBind (unElim m) (unElim k)) ] failEval _ -> failEval where unElim = unArg . fromMaybe __IMPOSSIBLE__ . isApplyElim tcBind m k = do v <- evalTCM m evalTCM (k `apply` [defaultArg v]) process :: (InstantiateFull a, Normalise a) => a -> TCM a process v = do norm <- viewTC eUnquoteNormalise if norm then normalise v else instantiateFull v mkT l a = El s a where s = Type $ Max [Plus 0 $ UnreducedLevel l] -- Don't catch Unquote errors! tcCatchError :: Term -> Term -> UnquoteM Term tcCatchError m h = liftU2 (\ m1 m2 -> m1 `catchError` \ _ -> m2) (evalTCM m) (evalTCM h) tcWithNormalisation :: Term -> Term -> UnquoteM Term tcWithNormalisation b m = do v <- unquote b liftU1 (locallyTC eUnquoteNormalise $ const v) (evalTCM m) uqFun1 :: Unquote a => (a -> UnquoteM b) -> Elim -> UnquoteM b uqFun1 fun a = do a <- unquote (unElim a) fun a tcFun1 :: Unquote a => (a -> TCM b) -> Elim -> UnquoteM b tcFun1 fun = uqFun1 (liftTCM . fun) uqFun2 :: (Unquote a, Unquote b) => (a -> b -> UnquoteM c) -> Elim -> Elim -> UnquoteM c uqFun2 fun a b = do a <- unquote (unElim a) b <- unquote (unElim b) fun a b uqFun3 :: (Unquote a, Unquote b, Unquote c) => (a -> b -> c -> UnquoteM d) -> Elim -> Elim -> Elim -> UnquoteM d uqFun3 fun a b c = do a <- unquote (unElim a) b <- unquote (unElim b) c <- unquote (unElim c) fun a b c tcFun2 :: (Unquote a, Unquote b) => (a -> b -> TCM c) -> Elim -> Elim -> UnquoteM c tcFun2 fun = uqFun2 (\ x y -> liftTCM (fun x y)) tcFun3 :: (Unquote a, Unquote b, Unquote c) => (a -> b -> c -> TCM d) -> Elim -> Elim -> Elim -> UnquoteM d tcFun3 fun = uqFun3 (\ x y z -> liftTCM (fun x y z)) tcFreshName :: Str -> TCM Term tcFreshName s = do m <- currentModule quoteName . qualify m <$> freshName_ (unStr s) tcUnify :: R.Term -> R.Term -> TCM Term tcUnify u v = do (u, a) <- inferExpr =<< toAbstract_ u v <- flip checkExpr a =<< toAbstract_ v equalTerm a u v primUnitUnit tcBlockOnMeta :: MetaId -> UnquoteM Term tcBlockOnMeta x = do s <- gets snd throwError (BlockedOnMeta s x) tcCommit :: UnquoteM Term tcCommit = do dirty <- gets fst when (dirty == Dirty) $ typeError $ GenericError "Cannot use commitTC after declaring new definitions." s <- getTC modify (second $ const s) liftTCM primUnitUnit tcTypeError :: [ErrorPart] -> TCM a tcTypeError err = typeError . GenericDocError =<< fsep (map prettyTCM err) tcDebugPrint :: Str -> Integer -> [ErrorPart] -> TCM Term tcDebugPrint (Str s) n msg = do reportSDoc s (fromIntegral n) $ fsep (map prettyTCM msg) primUnitUnit tcNoConstraints :: Term -> UnquoteM Term tcNoConstraints m = liftU1 noConstraints (evalTCM m) tcInferType :: R.Term -> TCM Term tcInferType v = do (_, a) <- inferExpr =<< toAbstract_ v quoteType =<< process a tcCheckType :: R.Term -> R.Type -> TCM Term tcCheckType v a = do a <- isType_ =<< toAbstract_ a e <- toAbstract_ v v <- checkExpr e a quoteTerm =<< process v tcQuoteTerm :: Term -> UnquoteM Term tcQuoteTerm v = liftTCM $ quoteTerm =<< process v tcUnquoteTerm :: Type -> R.Term -> TCM Term tcUnquoteTerm a v = do e <- toAbstract_ v v <- checkExpr e a return v tcNormalise :: R.Term -> TCM Term tcNormalise v = do (v, _) <- inferExpr =<< toAbstract_ v quoteTerm =<< normalise v tcReduce :: R.Term -> TCM Term tcReduce v = do (v, _) <- inferExpr =<< toAbstract_ v quoteTerm =<< reduce =<< instantiateFull v tcGetContext :: UnquoteM Term tcGetContext = liftTCM $ do as <- map (fmap snd) <$> getContext as <- etaContract =<< process as buildList <*> mapM quoteDom as extendCxt :: Arg R.Type -> UnquoteM a -> UnquoteM a extendCxt a m = do a <- liftTCM $ traverse (isType_ <=< toAbstract_) a liftU1 (addContext (domFromArg a :: Dom Type)) m tcExtendContext :: Term -> Term -> UnquoteM Term tcExtendContext a m = do a <- unquote a extendCxt a (evalTCM m) tcInContext :: Term -> Term -> UnquoteM Term tcInContext c m = do c <- unquote c liftU1 inTopContext $ go c (evalTCM m) where go :: [Arg R.Type] -> UnquoteM Term -> UnquoteM Term go [] m = m go (a : as) m = go as (extendCxt a m) constInfo :: QName -> TCM Definition constInfo x = either err return =<< getConstInfo' x where err _ = genericError $ "Unbound name: " ++ prettyShow x tcGetType :: QName -> TCM Term tcGetType x = quoteType . defType =<< constInfo x tcIsMacro :: QName -> TCM Term tcIsMacro x = do true <- primTrue false <- primFalse let qBool True = true qBool False = false qBool . isMacro . theDef <$> constInfo x tcGetDefinition :: QName -> TCM Term tcGetDefinition x = quoteDefn =<< constInfo x setDirty :: UnquoteM () setDirty = modify (first $ const Dirty) tcDeclareDef :: Arg QName -> R.Type -> UnquoteM Term tcDeclareDef (Arg i x) a = inOriginalContext $ do setDirty let r = getRelevance i when (hidden i) $ liftTCM $ typeError . GenericDocError =<< "Cannot declare hidden function" <+> prettyTCM x tell [x] liftTCM $ do reportSDoc "tc.unquote.decl" 10 $ sep [ "declare" <+> prettyTCM x <+> ":" , nest 2 $ prettyTCM a ] a <- isType_ =<< toAbstract_ a alreadyDefined <- isRight <$> getConstInfo' x when alreadyDefined $ genericError $ "Multiple declarations of " ++ prettyShow x addConstant x $ defaultDefn i x a emptyFunction when (isInstance i) $ addTypedInstance x a primUnitUnit tcDeclarePostulate :: Arg QName -> R.Type -> UnquoteM Term tcDeclarePostulate (Arg i x) a = inOriginalContext $ do clo <- commandLineOptions when (Lens.getSafeMode clo) $ liftTCM $ typeError . GenericDocError =<< "Cannot postulate '" <+> prettyTCM x <+> ":" <+> prettyTCM a <+> "' with safe flag" setDirty let r = getRelevance i when (hidden i) $ liftTCM $ typeError . GenericDocError =<< "Cannot declare hidden function" <+> prettyTCM x tell [x] liftTCM $ do reportSDoc "tc.unquote.decl" 10 $ sep [ "declare Postulate" <+> prettyTCM x <+> ":" , nest 2 $ prettyTCM a ] a <- isType_ =<< toAbstract_ a alreadyDefined <- isRight <$> getConstInfo' x when alreadyDefined $ genericError $ "Multiple declarations of " ++ prettyShow x addConstant x $ defaultDefn i x a Axiom when (isInstance i) $ addTypedInstance x a primUnitUnit tcDefineFun :: QName -> [R.Clause] -> UnquoteM Term tcDefineFun x cs = inOriginalContext $ (setDirty >>) $ liftTCM $ do whenM (isLeft <$> getConstInfo' x) $ genericError $ "Missing declaration for " ++ prettyShow x cs <- mapM (toAbstract_ . QNamed x) cs reportSDoc "tc.unquote.def" 10 $ vcat $ map prettyA cs let i = mkDefInfo (nameConcrete $ qnameName x) noFixity' PublicAccess ConcreteDef noRange checkFunDef NotDelayed i x cs primUnitUnit tcRunSpeculative :: Term -> UnquoteM Term tcRunSpeculative mu = do oldState <- getTC u <- reduce =<< evalTCM mu case u of Con _ _ [Apply (Arg { unArg = x }), Apply (Arg { unArg = b })] -> do unlessM (unquote b) $ putTC oldState return x _ -> liftTCM $ typeError . GenericDocError =<< "Should be a pair: " <+> prettyTCM u Agda-2.6.0.1/src/full/Agda/TypeChecking/Level.hs0000644000000000000000000001267413466402171017263 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Level where import Data.Maybe import qualified Data.List as List import Data.Traversable (Traversable,traverse) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad () import Agda.TypeChecking.Monad.Builtin import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Maybe ( caseMaybeM, allJustM ) import Agda.Utils.Monad ( tryMaybe ) #include "undefined.h" import Agda.Utils.Impossible data LevelKit = LevelKit { lvlType :: Term , lvlSuc :: Term -> Term , lvlMax :: Term -> Term -> Term , lvlZero :: Term , typeName :: QName , sucName :: QName , maxName :: QName , zeroName :: QName } -- | Get the 'primLevel' as a 'Type'. levelType :: TCM Type levelType = El (mkType 0) <$> primLevel levelSucFunction :: TCM (Term -> Term) levelSucFunction = apply1 <$> primLevelSuc {-# SPECIALIZE builtinLevelKit :: TCM LevelKit #-} {-# SPECIALIZE builtinLevelKit :: ReduceM LevelKit #-} builtinLevelKit :: (HasBuiltins m) => m LevelKit builtinLevelKit = do level@(Def l []) <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevel zero@(Def z []) <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelZero suc@(Def s []) <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelSuc max@(Def m []) <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelMax return $ LevelKit { lvlType = level , lvlSuc = \ a -> suc `apply1` a , lvlMax = \ a b -> max `applys` [a, b] , lvlZero = zero , typeName = l , sucName = s , maxName = m , zeroName = z } -- | Raises an error if no level kit is available. requireLevels :: TCM LevelKit requireLevels = builtinLevelKit -- | Checks whether level kit is fully available. haveLevels :: TCM Bool haveLevels = caseMaybeM (allJustM $ map getBuiltin' levelBuiltins) (return False) (\ _bs -> return True) where levelBuiltins = [ builtinLevel , builtinLevelZero , builtinLevelSuc , builtinLevelMax ] {-# SPECIALIZE unLevel :: Term -> TCM Term #-} {-# SPECIALIZE unLevel :: Term -> ReduceM Term #-} unLevel :: (HasBuiltins m) => Term -> m Term unLevel (Level l) = reallyUnLevelView l unLevel v = return v {-# SPECIALIZE reallyUnLevelView :: Level -> TCM Term #-} {-# SPECIALIZE reallyUnLevelView :: Level -> ReduceM Term #-} reallyUnLevelView :: (HasBuiltins m) => Level -> m Term reallyUnLevelView nv = do suc <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelSuc zer <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelZero case nv of Max [] -> return zer Max [Plus 0 a] -> return $ unLevelAtom a Max [a] -> do return $ unPlusV zer (apply1 suc) a _ -> (`unlevelWithKit` nv) <$> builtinLevelKit unlevelWithKit :: LevelKit -> Level -> Term unlevelWithKit LevelKit{ lvlZero = zer, lvlSuc = suc, lvlMax = max } (Max as) = case map (unPlusV zer suc) as of [a] -> a [] -> zer as -> foldl1 max as unPlusV :: Term -> (Term -> Term) -> PlusLevel -> Term unPlusV zer suc (ClosedLevel n) = foldr (.) id (List.genericReplicate n suc) zer unPlusV _ suc (Plus n a) = foldr (.) id (List.genericReplicate n suc) (unLevelAtom a) maybePrimCon :: TCM Term -> TCM (Maybe ConHead) maybePrimCon prim = tryMaybe $ do Con c ci [] <- prim return c maybePrimDef :: TCM Term -> TCM (Maybe QName) maybePrimDef prim = tryMaybe $ do Def f [] <- prim return f levelView :: (HasBuiltins m, MonadReduce m, MonadDebug m) => Term -> m Level levelView a = do reportSLn "tc.level.view" 50 $ "{ levelView " ++ show a v <- levelView' a reportSLn "tc.level.view" 50 $ " view: " ++ show v ++ "}" return v levelView' :: (HasBuiltins m, MonadReduce m, MonadDebug m) => Term -> m Level levelView' a = do Def lzero [] <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelZero Def lsuc [] <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelSuc Def lmax [] <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevelMax let view a = do a <- reduce a case a of Level l -> return l Def s [Apply arg] | s == lsuc -> inc <$> view (unArg arg) Def z [] | z == lzero -> return $ closed 0 Def m [Apply arg1, Apply arg2] | m == lmax -> levelLub <$> view (unArg arg1) <*> view (unArg arg2) _ -> mkAtom a v <- view a return v where mkAtom a = do b <- reduceB a return $ case b of NotBlocked _ (MetaV m as) -> atom $ MetaLevel m as NotBlocked r _ -> atom $ NeutralLevel r $ ignoreBlocking b Blocked m _ -> atom $ BlockedLevel m $ ignoreBlocking b atom a = Max [Plus 0 a] closed n = Max [ClosedLevel n | n > 0] inc (Max as) = Max $ map inc' as where inc' (ClosedLevel n) = ClosedLevel $ n + 1 inc' (Plus n a) = Plus (n + 1) a levelLub :: Level -> Level -> Level levelLub (Max as) (Max bs) = levelMax $ as ++ bs subLevel :: Integer -> Level -> Maybe Level subLevel n (Max ls) = Max <$> traverse sub ls where sub :: PlusLevel -> Maybe PlusLevel sub (ClosedLevel j) | j >= n = Just $ ClosedLevel $ j - n | otherwise = Nothing sub (Plus j l) | j >= n = Just $ Plus (j - n) l | otherwise = Nothing Agda-2.6.0.1/src/full/Agda/TypeChecking/Pretty.hs-boot0000644000000000000000000000142013466402171020427 0ustar0000000000000000{-# LANGUAGE FlexibleInstances #-} module Agda.TypeChecking.Pretty where -- import Agda.Syntax.Common import Agda.Syntax.Internal -- import Agda.Syntax.Literal import Agda.TypeChecking.Monad.Base import Agda.Utils.Pretty (Doc) -- import qualified Agda.Utils.Pretty as P text :: String -> TCM Doc sep, fsep, hsep, vcat :: [TCM Doc] -> TCM Doc ($$), (<>), (<+>) :: TCM Doc -> TCM Doc -> TCM Doc class PrettyTCM a where prettyTCM :: a -> TCM Doc instance PrettyTCM a => PrettyTCM (Closure a) instance PrettyTCM a => PrettyTCM [a] instance PrettyTCM Name instance PrettyTCM QName instance PrettyTCM Term instance PrettyTCM Elim instance PrettyTCM Type instance PrettyTCM Sort instance PrettyTCM DisplayTerm instance PrettyTCM DBPatVar Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes/0000755000000000000000000000000013466402171017751 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes/Syntax.hs0000644000000000000000000002367613466402171021611 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UndecidableInstances #-} -- | Syntax of size expressions and constraints. module Agda.TypeChecking.SizedTypes.Syntax where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Data.Maybe import Data.Foldable (Foldable) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable (Traversable) import Agda.TypeChecking.SizedTypes.Utils import Agda.Utils.Functor import Agda.Utils.Null import Agda.Utils.Pretty -- * Syntax -- | Constant finite sizes @n >= 0@. newtype Offset = O Int deriving (Eq, Ord, Num, Enum) -- This Show instance is ok because of the Enum constraint. instance Show Offset where show (O n) = show n instance Pretty Offset where pretty (O n) = pretty n instance MeetSemiLattice Offset where meet = min instance Plus Offset Offset Offset where plus (O x) (O y) = O (plus x y) -- | Fixed size variables @i@. newtype Rigid = RigidId { rigidId :: String } deriving (Eq, Ord) instance Show Rigid where show (RigidId s) = "RigidId " ++ show s instance Pretty Rigid where pretty = text . rigidId -- | Size meta variables @X@ to solve for. newtype Flex = FlexId { flexId :: String } deriving (Eq, Ord) instance Show Flex where show (FlexId s) = "FlexId " ++ show s instance Pretty Flex where pretty = text . flexId -- | Size expressions appearing in constraints. data SizeExpr' rigid flex = Const { offset :: Offset } -- ^ Constant number @n@. | Rigid { rigid :: rigid, offset :: Offset } -- ^ Variable plus offset @i + n@. | Infty -- ^ Infinity @∞@. | Flex { flex :: flex, offset :: Offset } -- ^ Meta variable @X + n@. deriving (Show, Eq, Ord, Functor, Foldable, Traversable) type SizeExpr = SizeExpr' Rigid Flex -- | Comparison operator, e.g. for size expression. data Cmp = Lt -- ^ @<@. | Le -- ^ @≤@. deriving (Show, Eq, Bounded, Enum) instance Dioid Cmp where compose = min unitCompose = Le -- | Comparison operator is ordered @'Lt' < 'Le'@. instance Ord Cmp where Lt <= x = True Le <= Lt = False Le <= Le = True instance MeetSemiLattice Cmp where meet = min instance Top Cmp where top = Le -- | Constraint: an inequation between size expressions, -- e.g. @X < ∞@ or @i + 3 ≤ j@. data Constraint' rigid flex = Constraint { leftExpr :: SizeExpr' rigid flex , cmp :: Cmp , rightExpr :: SizeExpr' rigid flex } deriving (Show, Functor, Foldable, Traversable) type Constraint = Constraint' Rigid Flex -- * Polarities to specify solutions. ------------------------------------------------------------------------ -- | What type of solution are we looking for? data Polarity = Least | Greatest deriving (Eq, Ord) -- | Assigning a polarity to a flexible variable. data PolarityAssignment flex = PolarityAssignment Polarity flex -- | Type of solution wanted for each flexible. type Polarities flex = Map flex Polarity emptyPolarities :: Polarities flex emptyPolarities = Map.empty polaritiesFromAssignments :: Ord flex => [PolarityAssignment flex] -> Polarities flex polaritiesFromAssignments = Map.fromList . map (\ (PolarityAssignment p x) -> (x,p)) -- | Default polarity is 'Least'. getPolarity :: Ord flex => Polarities flex -> flex -> Polarity getPolarity pols x = Map.findWithDefault Least x pols -- * Solutions. ------------------------------------------------------------------------ -- | Partial substitution from flexible variables to size expression. newtype Solution rigid flex = Solution { theSolution :: Map flex (SizeExpr' rigid flex) } deriving (Show, Null) instance (Pretty r, Pretty f) => Pretty (Solution r f) where pretty (Solution sol) = prettyList $ for (Map.toList sol) $ \ (x, e) -> pretty x <+> ":=" <+> pretty e emptySolution :: Solution r f emptySolution = Solution Map.empty -- | Executing a substitution. class Substitute r f a where subst :: Solution r f -> a -> a instance Ord f => Substitute r f (SizeExpr' r f) where subst (Solution sol) e = case e of Flex x n -> maybe e (`plus` n) $ Map.lookup x sol _ -> e instance Ord f => Substitute r f (Constraint' r f) where subst sol (Constraint e cmp e') = Constraint (subst sol e) cmp (subst sol e') instance Substitute r f a => Substitute r f [a] where subst = map . subst instance Substitute r f a => Substitute r f (Map k a) where subst = fmap . subst instance Ord f => Substitute r f (Solution r f) where subst s = Solution . subst s . theSolution -- | Add offset to size expression. instance Plus (SizeExpr' r f) Offset (SizeExpr' r f) where plus e m = case e of Const n -> Const $ n + m Rigid i n -> Rigid i $ n + m Flex x n -> Flex x $ n + m Infty -> Infty -- * Constraint simplification type CTrans r f = Constraint' r f -> Either String [Constraint' r f] -- | Returns an error message if we have a contradictory constraint. simplify1 :: (Pretty f, Pretty r, Eq r) => CTrans r f -> CTrans r f simplify1 test c = do let err = Left $ "size constraint " ++ prettyShow c ++ " is inconsistent" case c of -- rhs is Infty Constraint a Le Infty -> return [] Constraint Const{} Lt Infty -> return [] Constraint Infty Lt Infty -> err Constraint (Rigid i n) Lt Infty -> test $ Constraint (Rigid i 0) Lt Infty Constraint a@Flex{} Lt Infty -> return [c { leftExpr = a { offset = 0 }}] -- rhs is Const Constraint (Const n) cmp (Const m) -> if compareOffset n cmp m then return [] else err Constraint Infty cmp Const{} -> err Constraint (Rigid i n) cmp (Const m) -> if compareOffset n cmp m then test (Constraint (Rigid i 0) Le (Const (m - n - ifLe cmp 0 1))) else err Constraint (Flex x n) cmp (Const m) -> if compareOffset n cmp m then return [Constraint (Flex x 0) Le (Const (m - n - ifLe cmp 0 1))] else err -- rhs is Rigid Constraint Infty cmp Rigid{} -> err Constraint (Const m) cmp (Rigid i n) -> if compareOffset m cmp n then return [] else test (Constraint (Const $ m - n) cmp (Rigid i 0)) Constraint (Rigid j m) cmp (Rigid i n) | i == j -> if compareOffset m cmp n then return [] else err Constraint (Rigid j m) cmp (Rigid i n) -> test c Constraint (Flex x m) cmp (Rigid i n) -> if compareOffset m cmp n then return [Constraint (Flex x 0) Le (Rigid i (n - m - ifLe cmp 0 1))] else return [Constraint (Flex x $ m - n + ifLe cmp 0 1) Le (Rigid i 0)] -- rhs is Flex Constraint Infty Le (Flex x n) -> return [Constraint Infty Le (Flex x 0)] Constraint Infty Lt (Flex x n) -> err Constraint (Const m) cmp (Flex x n) -> if compareOffset m cmp n then return [] else return [Constraint (Const $ m - n + ifLe cmp 0 1) Le (Flex x 0)] Constraint (Rigid i m) cmp (Flex x n) -> if compareOffset m cmp n then return [Constraint (Rigid i 0) cmp (Flex x $ n - m)] else return [Constraint (Rigid i $ m - n) cmp (Flex x 0)] Constraint (Flex y m) cmp (Flex x n) -> if compareOffset m cmp n then return [Constraint (Flex y 0) cmp (Flex x $ n - m)] else return [Constraint (Flex y $ m - n) cmp (Flex x 0)] -- | 'Le' acts as 'True', 'Lt' as 'False'. ifLe :: Cmp -> a -> a -> a ifLe Le a b = a ifLe Lt a b = b -- | Interpret 'Cmp' as relation on 'Offset'. compareOffset :: Offset -> Cmp -> Offset -> Bool compareOffset n Le m = n <= m compareOffset n Lt m = n < m -- * Printing instance (Pretty r, Pretty f) => Pretty (SizeExpr' r f) where pretty (Const n) = pretty n pretty (Infty) = "∞" pretty (Rigid i 0) = pretty i pretty (Rigid i n) = pretty i <> text ("+" ++ show n) pretty (Flex x 0) = pretty x pretty (Flex x n) = pretty x <> text ("+" ++ show n) instance Pretty Polarity where pretty Least = "-" pretty Greatest = "+" instance Pretty flex => Pretty (PolarityAssignment flex) where pretty (PolarityAssignment pol flex) = pretty pol <> pretty flex instance Pretty Cmp where pretty Le = "≤" pretty Lt = "<" instance (Pretty r, Pretty f) => Pretty (Constraint' r f) where pretty (Constraint a cmp b) = pretty a <+> pretty cmp <+> pretty b -- * Wellformedness -- | Offsets @+ n@ must be non-negative class ValidOffset a where validOffset :: a -> Bool instance ValidOffset Offset where validOffset = (>= 0) instance ValidOffset (SizeExpr' r f) where validOffset e = case e of Infty -> True _ -> validOffset (offset e) -- | Make offsets non-negative by rounding up. class TruncateOffset a where truncateOffset :: a -> a instance TruncateOffset Offset where truncateOffset n | n >= 0 = n | otherwise = 0 instance TruncateOffset (SizeExpr' r f) where truncateOffset e = case e of Infty -> e Const n -> Const $ truncateOffset n Rigid i n -> Rigid i $ truncateOffset n Flex x n -> Flex x $ truncateOffset n -- * Computing variable sets -- | The rigid variables contained in a pice of syntax. class Rigids r a where rigids :: a -> Set r instance (Ord r, Rigids r a) => Rigids r [a] where rigids as = Set.unions (map rigids as) instance Rigids r (SizeExpr' r f) where rigids (Rigid x _) = Set.singleton x rigids _ = Set.empty instance Ord r => Rigids r (Constraint' r f) where rigids (Constraint l _ r) = Set.union (rigids l) (rigids r) -- | The flexibe variables contained in a pice of syntax. class Flexs flex a | a -> flex where flexs :: a -> Set flex instance (Ord flex, Flexs flex a) => Flexs flex [a] where flexs as = Set.unions (map flexs as) instance Flexs flex (SizeExpr' rigid flex) where flexs (Flex x _) = Set.singleton x flexs _ = Set.empty instance (Ord flex) => Flexs flex (Constraint' rigid flex) where flexs (Constraint l _ r) = Set.union (flexs l) (flexs r) Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes/Utils.hs0000644000000000000000000000162013466402171021404 0ustar0000000000000000 module Agda.TypeChecking.SizedTypes.Utils where import Data.IORef import qualified Debug.Trace as Debug import System.IO.Unsafe import Agda.Utils.Function {-# NOINLINE debug #-} debug :: IORef Bool debug = unsafePerformIO $ newIORef False setDebugging :: Bool -> IO () setDebugging = writeIORef debug trace :: String -> a -> a trace s = applyWhen (unsafePerformIO $ readIORef debug) $ Debug.trace s traceM :: Applicative f => String -> f () traceM s = trace s $ pure () class Eq a => Top a where top :: a isTop :: a -> Bool isTop = (==top) class Plus a b c where plus :: a -> b -> c instance Plus Int Int Int where plus = (+) class MeetSemiLattice a where meet :: a -> a -> a -- | Semiring with idempotent '+' == dioid class (MeetSemiLattice a, Top a) => Dioid a where compose :: a -> a -> a -- ^ E.g. + unitCompose :: a -- ^ neutral element of @compose@, e.g. zero Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes/Solve.hs0000644000000000000000000007566313466402171021416 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} -- | Solving size constraints under hypotheses. -- -- The size solver proceeds as follows: -- -- 1. Get size constraints, cluster into connected components. -- -- All size constraints that mention the same metas go into the same -- cluster. Each cluster can be solved by itself. -- -- Constraints that do not fit our format are ignored. -- We check whether our computed solution fulfills them as well -- in the last step. -- -- 2. Find a joint context for each cluster. -- -- Each constraint comes with its own typing context, which -- contains size hypotheses @j : Size< i@. We need to find a -- common super context in which all constraints of a cluster live, -- and raise all constraints to this context. -- -- There might not be a common super context. Then we are screwed, -- since our solver is not ready to deal with such a situation. We -- will blatantly refuse to solve this cluster and blame it on the -- user. -- -- 3. Convert the joint context into a hypothesis graph. -- -- This is straightforward. Each de Bruijn index becomes a -- rigid variable, each typing assumption @j : Size< i@ becomes an -- arc. -- -- 4. Convert the constraints into a constraint graph. -- -- Here we need to convert @MetaV@s into flexible variables. -- -- 5. Run the solver -- -- 6. Convert the solution into meta instantiations. -- -- 7. Double-check whether the constraints are solved. -- Opportunities for optimization: -- -- - NamedRigids has some cost to retrieve variable names -- just for the sake of debug printing. module Agda.TypeChecking.SizedTypes.Solve where import Prelude hiding (null) import Control.Monad hiding (forM, forM_) import Control.Monad.Trans.Maybe import Control.Monad.Reader (asks) import Data.Foldable (Foldable, foldMap, forM_) import qualified Data.Foldable as Fold import Data.Function import qualified Data.List as List import Data.Monoid import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Traversable as Trav import Data.Traversable (Traversable, forM) import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad as TCM hiding (Offset) import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Free import Agda.TypeChecking.Reduce import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Conversion import Agda.TypeChecking.Constraints as C import qualified Agda.TypeChecking.SizedTypes as S import Agda.TypeChecking.SizedTypes.Syntax as Size import Agda.TypeChecking.SizedTypes.Utils import Agda.TypeChecking.SizedTypes.WarshallSolver as Size import Agda.Utils.Cluster import Agda.Utils.Either import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.NonemptyList as NeList import qualified Agda.Utils.List as List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty (Pretty, prettyShow) import qualified Agda.Utils.Pretty as P import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.Tuple import qualified Agda.Utils.VarSet as VarSet #include "undefined.h" import Agda.Utils.Impossible type CC = Closure TCM.Constraint -- | Flag to control the behavior of size solver. data DefaultToInfty = DefaultToInfty -- ^ Instantiate all unconstrained size variables to ∞. | DontDefaultToInfty -- ^ Leave unconstrained size variables unsolved. deriving (Eq, Ord, Show) -- | Solve size constraints involving hypotheses. solveSizeConstraints :: DefaultToInfty -> TCM () solveSizeConstraints flag = do -- 1. Take out the size constraints normalised. cs0 <- mapM (mapClosure normalise) =<< S.takeSizeConstraints -- NOTE: this deletes the size constraints from the constraint set! unless (null cs0) $ reportSDoc "tc.size.solve" 40 $ vcat $ [ text $ "Solving constraints (" ++ show flag ++ ")" ] ++ map prettyTCM cs0 let -- Error for giving up cannotSolve = typeError . GenericDocError =<< vcat ("Cannot solve size constraints" : map prettyTCM cs0) -- 2. Cluster the constraints by common size metas. -- Get all size metas. sizeMetaSet <- Set.fromList . map (\ (x, _t, _tel) -> x) <$> S.getSizeMetas True -- Pair each constraint with its list of size metas occurring in it. cms <- forM cs0 $ \ cl -> enterClosure cl $ \ c -> do -- @allMetas@ does not reduce or instantiate; -- this is why we require the size constraints to be normalised. return (cl, map metaId . Set.toList $ sizeMetaSet `Set.intersection` allMetas singleton c) -- Now, some constraints may have no metas (clcs), the others have at least one (othercs). let classify :: (a, [b]) -> Either a (a, NonemptyList b) classify (cl, []) = Left cl classify (cl, (x:xs)) = Right (cl, x :! xs) let (clcs, othercs) = List.mapEither classify cms -- We cluster the constraints by their metas. let ccs = cluster' othercs -- 3. Solve each cluster -- Solve the closed constraints, one by one. forM_ clcs $ \ c -> () <$ solveSizeConstraints_ flag [c] -- Solve the clusters. constrainedMetas <- Set.unions <$> do forM (ccs) $ \ (cs :: NonemptyList CC) -> do -- Convert each constraint in the cluster to the largest context. -- (Keep fingers crossed). enterClosure (Fold.maximumBy (compare `on` (length . envContext . clEnv)) cs) $ \ _ -> do -- Get all constraints that can be cast to the longest context. cs' :: [TCM.Constraint] <- catMaybes <$> do mapM (runMaybeT . castConstraintToCurrentContext) $ toList cs reportSDoc "tc.size.solve" 20 $ vcat $ [ "converted size constraints to context: " <+> do tel <- getContextTelescope inTopContext $ prettyTCM tel ] ++ map (nest 2 . prettyTCM) cs' -- Solve the converted constraints. solveSizeConstraints_ flag =<< mapM buildClosure cs' -- 4. Possibly set remaining metas to infinity. -- Andreas, issue 1862: do not default to ∞ always, could be too early. when (flag == DefaultToInfty) $ do -- let constrainedMetas = Set.fromList $ concat $ -- for cs0 $ \ Closure{ clValue = ValueCmp _ _ u v } -> -- allMetas u ++ allMetas v -- Set the unconstrained, open size metas to ∞. ms <- S.getSizeMetas False -- do not get interaction metas unless (null ms) $ do inf <- primSizeInf forM_ ms $ \ (m, t, tel) -> do unless (m `Set.member` constrainedMetas) $ do unlessM (isFrozen m) $ do reportSDoc "tc.size.solve" 20 $ "solution " <+> prettyTCM (MetaV m []) <+> " := " <+> prettyTCM inf assignMeta 0 m t (List.downFrom $ size tel) inf -- -- Double check. -- unless (null cs0 && null ms) $ do -- flip catchError (const cannotSolve) $ -- noConstraints $ -- forM_ cs0 $ \ cl -> enterClosure cl solveConstraint -- 5. Make sure we did not lose any constraints. -- This is necessary since we have removed the size constraints. forM_ cs0 $ \ cl -> enterClosure cl solveConstraint -- | TODO: this does not actually work! -- -- We would like to use a constraint @c@ created in context @Δ@ from module @N@ -- in the current context @Γ@ and current module @M@. -- -- @Δ@ is module tel @Δ₁@ of @N@ extended by some local bindings @Δ₂@. -- @Γ@ is the current context. -- The module parameter substitution from current @M@ to @N@ be -- @Γ ⊢ σ : Δ₁@. -- -- If @M == N@, we do not need the parameter substitution. We try raising. -- -- We first strengthen @Δ ⊢ c@ to live in @Δ₁@ and obtain @c₁ = strengthen Δ₂ c@. -- We then transport @c₁@ to @Γ@ and obtain @c₂ = applySubst σ c₁@. -- -- This works for different modules, but if @M == N@ we should not strengthen -- and then weaken, because strengthening is a partial operation. -- We should rather lift the substitution @σ@ by @Δ₂@ and then -- raise by @Γ₂ - Δ₂@. -- This "raising" might be a strengthening if @Γ₂@ is shorter than @Δ₂@. -- -- (TODO: If the module substitution does not exist, because @N@ is not -- a parent of @M@, we cannot use the constraint, as it has been created -- in an unrelated context.) castConstraintToCurrentContext' :: Closure TCM.Constraint -> MaybeT TCM TCM.Constraint castConstraintToCurrentContext' cl = do let modN = envCurrentModule $ clEnv cl delta = envContext $ clEnv cl -- The module telescope of the constraint. -- The constraint could come from the module telescope of the top level module. -- In this case, it does not live in any module! -- Thus, getSection can return Nothing. delta1 <- liftTCM $ maybe empty (^. secTelescope) <$> getSection modN -- The number of locals of the constraint. let delta2 = size delta - size delta1 unless (delta2 >= 0) __IMPOSSIBLE__ -- The current module M and context Γ. modM <- currentModule gamma <- liftTCM $ getContextSize -- The current module telescope. -- Could also be empty, if we are in the front matter or telescope of the top-level module. gamma1 <-liftTCM $ maybe empty (^. secTelescope) <$> getSection modM -- The current locals. let gamma2 = gamma - size gamma1 -- Γ ⊢ σ : Δ₁ sigma <- liftTCM $ getModuleParameterSub modN -- Debug printing. reportSDoc "tc.constr.cast" 40 $ "casting constraint" $$ do tel <- getContextTelescope inTopContext $ nest 2 $ vcat $ [ "current module = " <+> prettyTCM modM , "current module telescope = " <+> prettyTCM gamma1 , "current context = " <+> prettyTCM tel , "constraint module = " <+> prettyTCM modN , "constraint module telescope = " <+> prettyTCM delta1 , "constraint context = " <+> (prettyTCM =<< enterClosure cl (const $ getContextTelescope)) , "constraint = " <+> enterClosure cl prettyTCM , "module parameter substitution = " <+> prettyTCM sigma ] -- If gamma2 < 0, we must be in the wrong context. -- E.g. we could have switched to the empty context even though -- we are still inside a module with parameters. -- In this case, we cannot safely convert the constraint, -- since the module parameter substitution may be wrong. guard (gamma2 >= 0) -- Shortcut for modN == modM: -- Raise constraint from Δ to Γ, if possible. -- This might save us some strengthening. if modN == modM then raiseMaybe (gamma - size delta) $ clValue cl else do -- Strengthen constraint to Δ₁ ⊢ c c <- raiseMaybe (-delta2) $ clValue cl -- Ulf, 2016-11-09: I don't understand what this function does when M and N -- are not related. Certainly things can go terribly wrong (see -- test/Succeed/Issue2223b.agda) fv <- liftTCM $ getModuleFreeVars modN guard $ fv == size delta1 -- Γ ⊢ c[σ] return $ applySubst sigma c where raiseMaybe n c = do -- Fine if we have to weaken or strengthening is safe. guard $ n >= 0 || List.all (>= -n) (VarSet.toList $ allVars $ freeVars c) return $ raise n c -- | A hazardous hack, may the Gods have mercy on us. -- -- To cast to the current context, we match the context of the -- given constraint by 'CtxId', and as fallback, by variable name (douh!). -- -- This hack lets issue 2046 go through. castConstraintToCurrentContext :: Closure TCM.Constraint -> MaybeT TCM TCM.Constraint castConstraintToCurrentContext cl = do -- The checkpoint of the contraint let cp = envCurrentCheckpoint $ clEnv cl sigma <- caseMaybeM (viewTC $ eCheckpoints . key cp) (do -- We are not in a descendant of the constraint checkpoint. -- Here be dragons!! gamma <- asksTC envContext -- The target context let findInGamma (Dom {unDom = (x, t)}) = -- match by name (hazardous) -- This is one of the seven deadly sins (not respecting alpha). List.findIndex ((x ==) . fst . unDom) gamma let delta = envContext $ clEnv cl cand = map findInGamma delta -- The domain of our substitution let coveredVars = VarSet.fromList $ catMaybes $ zipWith ($>) cand [0..] -- Check that all the free variables of the constraint are contained in -- coveredVars. -- We ignore the free variables occurring in sorts. guard $ getAll $ runFree (All . (`VarSet.member` coveredVars)) IgnoreAll (clValue cl) -- Turn cand into a substitution. -- Since we ignored the free variables in sorts, we better patch up -- the substitution with some dummy term rather than __IMPOSSIBLE__. return $ parallelS $ map (maybe __DUMMY_TERM__ var) cand ) return -- Phew, we've got the checkpoint! All is well. -- Apply substitution to constraint and pray that the Gods are merciful on us. return $ applySubst sigma (clValue cl) -- Note: the resulting constraint may not well-typed. -- Even if it is, it may map variables to their wrong counterpart. -- | Return the size metas occurring in the simplified constraints. -- A constraint like @↑ _j =< ∞ : Size@ simplifies to nothing, -- so @_j@ would not be in this set. solveSizeConstraints_ :: DefaultToInfty -> [CC] -> TCM (Set MetaId) solveSizeConstraints_ flag cs0 = do -- Pair constraints with their representation as size constraints. -- Discard constraints that do not have such a representation. ccs :: [(CC,HypSizeConstraint)] <- catMaybes <$> do forM cs0 $ \ c0 -> fmap (c0,) <$> computeSizeConstraint c0 -- Simplify constraints and check for obvious inconsistencies. ccs' <- concat <$> do forM ccs $ \ (c0, HypSizeConstraint cxt hids hs sc) -> do case simplify1 (\ sc -> return [sc]) sc of Left _ -> typeError . GenericDocError =<< do "Contradictory size constraint" <+> prettyTCM c0 Right cs -> return $ (c0,) . HypSizeConstraint cxt hids hs <$> cs -- Cluster constraints according to the meta variables they mention. -- @csNoM@ are the constraints that do not mention any meta. let (csNoM, csMs) = (`List.partitionMaybe` ccs') $ \ p@(c0, c) -> fmap (p,) $ NeList.fromList $ map (metaId . sizeMetaId) $ Set.toList $ flexs c -- @css@ are the clusters of constraints. css :: [NonemptyList (CC,HypSizeConstraint)] css = cluster' csMs -- Check that the closed constraints are valid. whenJust (NeList.fromList csNoM) $ solveCluster flag -- Now, process the clusters. forM_ css $ solveCluster flag return $ Set.mapMonotonic sizeMetaId $ flexs $ map (snd . fst) csMs -- | Solve a cluster of constraints sharing some metas. -- solveCluster :: DefaultToInfty -> NonemptyList (CC,HypSizeConstraint) -> TCM () solveCluster flag ccs = do let cs = fmap snd ccs let prettyCs = map prettyTCM $ NeList.toList cs let err reason = typeError . GenericDocError =<< do vcat $ [ text $ "Cannot solve size constraints" ] ++ prettyCs ++ [ text $ "Reason: " ++ reason ] reportSDoc "tc.size.solve" 20 $ vcat $ [ "Solving constraint cluster" ] ++ prettyCs -- Find the super context of all contexts. {- -- We use the @'ctxId'@s. let cis@(ci:cis') = for cs $ \ c -> (c, reverse $ map ctxId $ sizeContext c) -- let cis@(ci:cis') = for cs $ \ c -> (c, reverse $ sizeHypIds c) max a@Left{} _ = a max a@(Right ci@(c,is)) ci'@(c',is') = case preOrSuffix is is' of -- No common context: IsNofix -> Left (ci, ci') IsPrefix{} -> Right ci' _ -> a res = foldl' max (Right ci) cis' noContext ((c,is),(c',is')) = typeError . GenericDocError =<< vcat [ "Cannot solve size constraints; the following constraints have no common typing context:" , prettyTCM c , prettyTCM c' ] flip (either noContext) res $ \ (HypSizeConstraint gamma hids hs _, _) -> do -} -- We rely on the fact that contexts are only extended... -- Just take the longest context. let HypSizeConstraint gamma hids hs _ = Fold.maximumBy (compare `on` (length . sizeContext)) cs -- Length of longest context. let n = size gamma -- Now convert all size constraints to the largest context. csL = for cs $ \ (HypSizeConstraint cxt _ _ c) -> raise (n - size cxt) c -- Canonicalize the constraints. -- This is unsound in the presence of hypotheses. csC :: [SizeConstraint] csC = applyWhen (null hs) (mapMaybe canonicalizeSizeConstraint) $ NeList.toList csL reportSDoc "tc.size.solve" 30 $ vcat $ [ "Size hypotheses" ] ++ map (prettyTCM . HypSizeConstraint gamma hids hs) hs ++ [ "Canonicalized constraints" ] ++ map (prettyTCM . HypSizeConstraint gamma hids hs) csC -- -- ALT: -- -- Now convert all size constraints to de Bruijn levels. -- -- To get from indices in a context of length m <= n -- -- to levels into the target context of length n, -- -- we apply the following substitution: -- -- Index m-1 needs to be mapped to level 0, -- -- index m-2 needs to be mapped to level 1, -- -- index 0 needs to be mapped to level m-1, -- -- so the desired substitution is @downFrom m@. -- let sub m = applySubst $ parallelS $ map var $ downFrom m -- -- We simply reverse the context to get to de Bruijn levels. -- -- Of course, all types in the context are broken, but -- -- only need it for pretty printing constraints. -- gamma <- return $ reverse gamma -- -- We convert the hypotheses to de Bruijn levels. -- hs <- return $ sub n hs -- -- We get a form for pretty-printing -- let prettyC = prettyTCM . HypSizeConstraint gamma hids hs -- -- We convert the constraints to de Bruijn level format. -- let csC :: [SizeConstraint] -- csC = for cs $ \ (HypSizeConstraint cxt _ _ c) -> sub (size cxt) c -- reportSDoc "tc.size.solve" 30 $ vcat $ -- [ "Size hypotheses" ] ++ map prettyC hs ++ -- [ "Canonicalized constraints" ] ++ map prettyC csC -- Convert size metas to flexible vars. let metas :: [SizeMeta] metas = concat $ map (foldMap (:[])) csC csF :: [Size.Constraint' NamedRigid Int] csF = map (fmap (metaId . sizeMetaId)) csC -- Construct the hypotheses graph. let hyps = map (fmap (metaId . sizeMetaId)) hs -- There cannot be negative cycles in hypotheses graph due to scoping. let hg = fromRight __IMPOSSIBLE__ $ hypGraph (rigids csF) hyps -- -- Construct the constraint graph. -- -- g :: Size.Graph NamedRigid Int Label -- g <- either err return $ constraintGraph csF hg -- reportSDoc "tc.size.solve" 40 $ vcat $ -- [ "Constraint graph" -- , text (show g) -- ] -- sol :: Solution NamedRigid Int <- either err return $ solveGraph Map.empty hg g -- either err return $ verifySolution hg csF sol -- Andreas, 2016-07-13, issue 2096. -- Running the solver once might result in unsolvable left-over constraints. -- We need to iterate the solver to detect this. sol :: Solution NamedRigid Int <- either err return $ iterateSolver Map.empty hg csF emptySolution -- Convert solution to meta instantiation. solved <- fmap Set.unions $ forM (Map.assocs $ theSolution sol) $ \ (m, a) -> do unless (validOffset a) __IMPOSSIBLE__ -- Solution does not contain metas u <- unSizeExpr $ fmap __IMPOSSIBLE__ a let x = MetaId m let SizeMeta _ xs = fromMaybe __IMPOSSIBLE__ $ List.find ((m==) . metaId . sizeMetaId) metas -- Check that solution is well-scoped let ys = rigidIndex <$> Set.toList (rigids a) ok = all (`elem` xs) ys -- TODO: more efficient -- unless ok $ err "ill-scoped solution for size meta variable" u <- if ok then return u else primSizeInf t <- getMetaType x reportSDoc "tc.size.solve" 20 $ inTopContext $ modifyContext (const gamma) $ do let args = map (Apply . defaultArg . var) xs "solution " <+> prettyTCM (MetaV x args) <+> " := " <+> prettyTCM u reportSDoc "tc.size.solve" 60 $ vcat [ text $ " xs = " ++ show xs , text $ " u = " ++ show u ] ifM (isFrozen x `or2M` (not <$> asksTC envAssignMetas)) (return Set.empty) $ do assignMeta n x t xs u return $ Set.singleton x -- WRONG: -- let partialSubst = List.sort $ zip xs $ map var $ downFrom n -- assignMeta' n x t (length xs) partialSubst u -- WRONG: assign DirEq x (map (defaultArg . var) xs) u -- Possibly set remaining size metas to ∞ (issue 1862) -- unless we have an interaction meta in the cluster (issue 2095). ims <- Set.fromList <$> getInteractionMetas -- ms = unsolved size metas from cluster let ms = Set.fromList (map sizeMetaId metas) Set.\\ solved -- Make sure they do not contain an interaction point let noIP = Set.null $ Set.intersection ims ms unless (null ms) $ reportSDoc "tc.size.solve" 30 $ fsep $ [ "cluster did not solve these size metas: " ] ++ map prettyTCM (Set.toList ms) solvedAll <- do -- If no metas are left, we have solved this cluster completely. if Set.null ms then return True else do -- Otherwise, we can solve it completely if we are allowed to set to ∞. if flag == DontDefaultToInfty then return False else do -- Which is only the case when we have no interaction points in the cluster. if not noIP then return False else do -- Try to set all unconstrained size metas to ∞. inf <- primSizeInf and <$> do forM (Set.toList ms) $ \ m -> do -- If one variable is frozen, we cannot set it (and hence not all) to ∞ let no = do reportSDoc "tc.size.solve" 30 $ prettyTCM (MetaV m []) <+> "is frozen, cannot set it to ∞" return False ifM (isFrozen m `or2M` do not <$> asksTC envAssignMetas) no $ {-else-} do reportSDoc "tc.size.solve" 20 $ "solution " <+> prettyTCM (MetaV m []) <+> " := " <+> prettyTCM inf t <- jMetaType . mvJudgement <$> lookupMeta m TelV tel core <- telView t unlessM (isJust <$> isSizeType core) __IMPOSSIBLE__ assignMeta 0 m t (List.downFrom $ size tel) inf return True -- Double check. when solvedAll $ do let cs0 = map fst $ toList ccs -- Error for giving up cannotSolve = typeError . GenericDocError =<< vcat ("Cannot solve size constraints" : map prettyTCM cs0) flip catchError (const cannotSolve) $ noConstraints $ forM_ cs0 $ \ cl -> enterClosure cl solveConstraint -- | Collect constraints from a typing context, looking for SIZELT hypotheses. getSizeHypotheses :: Context -> TCM [(Nat, SizeConstraint)] getSizeHypotheses gamma = inTopContext $ modifyContext (const gamma) $ do (_, msizelt) <- getBuiltinSize caseMaybe msizelt (return []) $ \ sizelt -> do -- Traverse the context from newest to oldest de Bruijn Index catMaybes <$> do forM (zip [0..] gamma) $ \ (i, ce) -> do -- Get name and type of variable i. let (x, t) = unDom ce s = prettyShow x t <- reduce . raise (1 + i) . unEl $ t case t of Def d [Apply u] | d == sizelt -> do caseMaybeM (sizeExpr $ unArg u) (return Nothing) $ \ a -> return $ Just $ (i, Constraint (Rigid (NamedRigid s i) 0) Lt a) _ -> return Nothing -- | Convert size constraint into form where each meta is applied -- to indices @n-1,...,1,0@ where @n@ is the arity of that meta. -- -- @X[σ] <= t@ becomes @X[id] <= t[σ^-1]@ -- -- @X[σ] ≤ Y[τ]@ becomes @X[id] ≤ Y[τ[σ^-1]]@ or @X[σ[τ^1]] ≤ Y[id]@ -- whichever is defined. If none is defined, we give up. -- -- Cf. @SizedTypes.oldCanonicalizeSizeConstraint@. -- -- Fixes (the rather artificial) issue 300. -- But it is unsound when pruned metas occur and triggers issue 1914. -- Thus we deactivate it. -- This needs to be properly implemented, possibly using the -- metaPermuatation of each meta variable. canonicalizeSizeConstraint :: SizeConstraint -> Maybe (SizeConstraint) canonicalizeSizeConstraint c@(Constraint a cmp b) = Just c {- case (a,b) of -- Case flex-flex (Flex (SizeMeta m xs) n, Flex (SizeMeta l ys) n') -- try to invert xs on ys | let len = size xs , Just ys' <- mapM (\ y -> (len-1 -) <$> findIndex (==y) xs) ys -> return $ Constraint (Flex (SizeMeta m $ downFrom len) n) cmp (Flex (SizeMeta l ys') n') -- try to invert ys on xs | let len = size ys , Just xs' <- mapM (\ x -> (len-1 -) <$> findIndex (==x) ys) xs -> return $ Constraint (Flex (SizeMeta m xs') n) cmp (Flex (SizeMeta l $ downFrom len) n') -- give up | otherwise -> Nothing -- Case flex-rigid (Flex (SizeMeta m xs) n, Rigid (NamedRigid x i) n') -> do let len = size xs j <- (len-1 -) <$> findIndex (==i) xs return $ Constraint (Flex (SizeMeta m $ downFrom len) n) cmp (Rigid (NamedRigid x j) n') -- Case rigid-flex (Rigid (NamedRigid x i) n, Flex (SizeMeta m xs) n') -> do let len = size xs j <- (len-1 -) <$> findIndex (==i) xs return $ Constraint (Rigid (NamedRigid x j) n) cmp (Flex (SizeMeta m $ downFrom len) n') -- Case flex-const (Flex (SizeMeta m xs) n, _) -> return $ Constraint (Flex (SizeMeta m $ downFrom $ size xs) n) cmp b -- Case const-flex (_, Flex (SizeMeta m xs) n') -> do return $ Constraint a cmp (Flex (SizeMeta m $ downFrom $ size xs) n') -- Case no flex _ -> return c -} -- | Identifiers for rigid variables. data NamedRigid = NamedRigid { rigidName :: String -- ^ Name for printing in debug messages. , rigidIndex :: Int -- ^ De Bruijn index. } deriving (Show) instance Eq NamedRigid where (==) = (==) `on` rigidIndex instance Ord NamedRigid where compare = compare `on` rigidIndex instance Pretty NamedRigid where pretty = P.text . rigidName instance Plus NamedRigid Int NamedRigid where plus (NamedRigid x i) j = NamedRigid x (i + j) -- | Size metas in size expressions. data SizeMeta = SizeMeta { sizeMetaId :: MetaId -- TODO to fix issue 300? -- , sizeMetaPerm :: Permutation -- ^ Permutation from the current context -- -- to the context of the meta. , sizeMetaArgs :: [Int] -- ^ De Bruijn indices. } deriving (Show) -- | An equality which ignores the meta arguments. instance Eq SizeMeta where (==) = (==) `on` sizeMetaId -- | An order which ignores the meta arguments. instance Ord SizeMeta where compare = compare `on` sizeMetaId instance Pretty SizeMeta where pretty = P.pretty . sizeMetaId instance PrettyTCM SizeMeta where prettyTCM (SizeMeta x es) = prettyTCM (MetaV x $ map (Apply . defaultArg . var) es) instance Subst Term SizeMeta where applySubst sigma (SizeMeta x es) = SizeMeta x (map raise es) where raise i = case lookupS sigma i of Var j [] -> j _ -> __IMPOSSIBLE__ -- | Size expression with de Bruijn indices. type DBSizeExpr = SizeExpr' NamedRigid SizeMeta -- deriving instance Functor (SizeExpr' Int) -- deriving instance Foldable (SizeExpr' Int) -- deriving instance Traversable (SizeExpr' Int) -- | Only for 'raise'. instance Subst Term (SizeExpr' NamedRigid SizeMeta) where applySubst sigma a = case a of Infty -> a Const{} -> a Flex x n -> Flex (applySubst sigma x) n Rigid r n -> case lookupS sigma $ rigidIndex r of Var j [] -> Rigid r{ rigidIndex = j } n _ -> __IMPOSSIBLE__ type SizeConstraint = Constraint' NamedRigid SizeMeta instance Subst Term SizeConstraint where applySubst sigma (Constraint a cmp b) = Constraint (applySubst sigma a) cmp (applySubst sigma b) -- | Assumes we are in the right context. instance PrettyTCM (SizeConstraint) where prettyTCM (Constraint a cmp b) = do u <- unSizeExpr a v <- unSizeExpr b prettyTCM u <+> pretty cmp <+> prettyTCM v -- | Size constraint with de Bruijn indices. data HypSizeConstraint = HypSizeConstraint { sizeContext :: Context , sizeHypIds :: [Nat] -- ^ DeBruijn indices , sizeHypotheses :: [SizeConstraint] -- ^ Living in @Context@. , sizeConstraint :: SizeConstraint -- ^ Living in @Context@. } instance Flexs SizeMeta HypSizeConstraint where flexs (HypSizeConstraint _ _ hs c) = flexs hs `mappend` flexs c instance PrettyTCM HypSizeConstraint where prettyTCM (HypSizeConstraint cxt _ hs c) = inTopContext $ modifyContext (const cxt) $ do let cxtNames = reverse $ map (fst . unDom) cxt -- text ("[#cxt=" ++ show (size cxt) ++ "]") <+> do prettyList (map prettyTCM cxtNames) <+> do applyUnless (null hs) (((hcat $ punctuate ", " $ map prettyTCM hs) <+> "|-") <+>) (prettyTCM c) -- | Turn a constraint over de Bruijn indices into a size constraint. computeSizeConstraint :: Closure TCM.Constraint -> TCM (Maybe HypSizeConstraint) computeSizeConstraint c = do let cxt = envContext $ clEnv c inTopContext $ modifyContext (const cxt) $ do case clValue c of ValueCmp CmpLeq _ u v -> do reportSDoc "tc.size.solve" 50 $ sep $ [ "converting size constraint" , prettyTCM c ] ma <- sizeExpr u mb <- sizeExpr v (hids, hs) <- unzip <$> getSizeHypotheses cxt let mk a b = HypSizeConstraint cxt hids hs $ Size.Constraint a Le b -- We only create a size constraint if both terms can be -- parsed to our format of size expressions. return $ mk <$> ma <*> mb _ -> __IMPOSSIBLE__ -- | Turn a term into a size expression. -- -- Returns 'Nothing' if the term isn't a proper size expression. sizeExpr :: Term -> TCM (Maybe DBSizeExpr) sizeExpr u = do u <- reduce u -- Andreas, 2009-02-09. -- This is necessary to surface the solutions of metavariables. reportSDoc "tc.conv.size" 60 $ "sizeExpr:" <+> prettyTCM u s <- sizeView u case s of SizeInf -> return $ Just Infty SizeSuc u -> fmap (`plus` (1 :: Offset)) <$> sizeExpr u OtherSize u -> case u of Var i [] -> (\ x -> Just $ Rigid (NamedRigid x i) 0) . prettyShow <$> nameOfBV i -- MetaV m es -> return $ Just $ Flex (SizeMeta m es) 0 MetaV m es | Just xs <- mapM isVar es, List.fastDistinct xs -> return $ Just $ Flex (SizeMeta m xs) 0 _ -> return Nothing where isVar (Proj{}) = Nothing isVar (IApply _ _ v) = isVar (Apply (defaultArg v)) isVar (Apply v) = case unArg v of Var i [] -> Just i _ -> Nothing -- | Turn a de size expression into a term. unSizeExpr :: DBSizeExpr -> TCM Term unSizeExpr a = case a of Infty -> primSizeInf Rigid r (O n) -> do unless (n >= 0) __IMPOSSIBLE__ sizeSuc n $ var $ rigidIndex r Flex (SizeMeta x es) (O n) -> do unless (n >= 0) __IMPOSSIBLE__ sizeSuc n $ MetaV x $ map (Apply . defaultArg . var) es Const{} -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/TypeChecking/SizedTypes/WarshallSolver.hs0000644000000000000000000011007213466402171023256 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Agda.TypeChecking.SizedTypes.WarshallSolver where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null, truncate ) #else import Prelude hiding ( null, truncate ) #endif import Control.Applicative hiding (Const, empty) import Control.Monad import Data.Function (on) import qualified Data.List as List import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Agda.TypeChecking.SizedTypes.Syntax import Agda.TypeChecking.SizedTypes.Utils import Agda.Utils.Graph.AdjacencyMap.Unidirectional (Edge(..), Nodes(..), nodes, computeNodes) -- (Edge'(..), allNodes, emptyGraph, insertEdge, graphToList, graphFromList, nodes, lookupEdge, outgoing, incoming, diagonal, transClos) import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as Graph import Agda.Utils.Functor import Agda.Utils.Null import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible type Graph r f a = Graph.Graph (Node r f) a type Edge' r f a = Graph.Edge (Node r f) a type Key r f = Edge' r f () type Nodes r f = Graph.Nodes (Node r f) type LabelledEdge r f = Edge' r f Label src :: Edge n e -> n src = Graph.source dest :: Edge n e -> n dest = Graph.target lookupEdge :: Ord n => Graph.Graph n e -> n -> n -> Maybe e lookupEdge g s t = Graph.lookup s t g graphToList :: Graph.Graph n e -> [Edge n e] graphToList = Graph.edges graphFromList :: Ord n => [Edge n e] -> Graph.Graph n e graphFromList = Graph.fromEdges insertEdge :: (Ord n, MeetSemiLattice e, Top e) => Edge n e -> Graph.Graph n e -> Graph.Graph n e insertEdge e g | isTop (label e) = g | otherwise = Graph.insertEdgeWith meet e g -- | Compute list of edges that start in a given node. outgoing :: (Ord r, Ord f) => Graph r f a -> Node r f -> [Edge' r f a] outgoing g s = Graph.edgesFrom g [s] -- | Compute list of edges that target a given node. -- -- Note: expensive for unidirectional graph representations. incoming :: (Ord r, Ord f) => Graph r f a -> Node r f -> [Edge' r f a] incoming g t = Graph.edgesTo g [t] -- | @Set.foldl@ does not exist in legacy versions of the @containers@ package. setFoldl :: (b -> a -> b) -> b -> Set a -> b setFoldl step start = List.foldl' step start . Set.toAscList -- setFoldl = Set.foldl' -- | Floyd-Warshall algorithm. transClos :: forall n a . (Ord n, Dioid a) => Graph.Graph n a -> Graph.Graph n a transClos g = setFoldl step g $ allNodes ns where ns = computeNodes g srcs = Set.toAscList $ srcNodes ns dests = Set.toAscList $ tgtNodes ns -- @step g v@ adds all intermediate edges @u --> w@ via @v@ to @g@ -- step :: (Ord n, Dioid a) => Graph.Graph n n a -> n -> Graph.Graph n n a step g v = foldl (flip insertEdge) g $ [ Edge u w $ l1 `compose` l2 | u <- srcs , w <- dests , l1 <- maybeToList $ lookupEdge g u v , l2 <- maybeToList $ lookupEdge g v w ] -- * Edge weights data Weight = Offset Offset | Infinity deriving (Eq, Show) instance Pretty Weight where pretty (Offset x) = pretty x pretty Infinity = "∞" instance Ord Weight where x <= Infinity = True Infinity <= y = False Offset x <= Offset y = x <= y instance MeetSemiLattice Weight where meet = min instance Top Weight where top = Infinity instance Enum Weight where succ (Offset x) = Offset (succ x) succ (Infinity) = Infinity pred (Offset x) = Offset (pred x) pred (Infinity) = Infinity toEnum = Offset . toEnum fromEnum (Offset x) = fromEnum x fromEnum (Infinity) = __IMPOSSIBLE__ -- | Partial implementation of @Num@. instance Num Weight where Infinity + y = Infinity x + Infinity = Infinity Offset x + Offset y = Offset $ x + y Infinity - Offset y = Infinity Offset x - Offset y = Offset $ x - y x - Infinity = __IMPOSSIBLE__ abs (Offset x) = Offset $ abs x abs Infinity = Infinity signum (Offset x) = Offset $ signum x signum Infinity = Offset $ 1 fromInteger x = Offset (fromInteger x) x * y = __IMPOSSIBLE__ instance Plus Weight Offset Weight where plus w k = w + (Offset k) -- | Test for negativity, used to detect negative cycles. class Negative a where negative :: a -> Bool {- leads to Undecidable/OverlappingInstances: instance (Ord a, Num a) => Negative a where negative = (< 0) -} instance Negative Int where negative = (< 0) instance Negative Offset where negative (O x) = negative x instance Negative Weight where negative Infinity = False negative (Offset x) = negative x -- * Edge labels -- | Going from @Lt@ to @Le@ is @pred@, going from @Le@ to @Lt@ is @succ@. -- -- @X --(R,n)--> Y@ -- means @X (R) Y + n@. -- [ ... if @n@ positive -- and @X + (-n) (R) Y@ if @n@ negative. ] data Label = Label { lcmp :: Cmp, loffset :: Offset } | LInf -- ^ Nodes not connected. deriving (Show) -- | Convert a label to a weight, decrementing in case of 'Lt'. toWeight :: Label -> Weight toWeight (Label Le w) = Offset w toWeight (Label Lt w) = Offset $ pred w toWeight LInf = Infinity instance Negative Label where negative = negative . toWeight instance Eq Label where Label cmp w == Label cmp' w' = cmp == cmp' && w == w' LInf == LInf = True _ == _ = False instance Ord Label where Label Lt w <= Label Lt w' = w <= w' Label Le w <= Label Le w' = w <= w' Label Lt w <= Label Le w' = pred w <= w' Label Le w <= Label Lt w' = succ w <= w' _ <= LInf = True LInf{} <= Label{} = False instance Pretty Label where pretty (Label cmp w) = pretty cmp <> pretty w pretty LInf = "∞" instance MeetSemiLattice Label where -- one label is neutral LInf `meet` l = l l `meet` LInf = l -- other cases Label Lt w `meet` Label Lt w' = Label Lt $ w `meet` w' Label Le w `meet` Label Le w' = Label Le $ w `meet` w' Label Lt w `meet` Label Le w' = Label Lt $ w `meet` succ w' Label Le w `meet` Label Lt w' = Label Lt $ succ w `meet` w' instance Top Label where top = LInf isTop Label{} = False isTop LInf = True -- * Semiring with idempotent '+' == dioid instance Dioid Weight where compose = (+) unitCompose = 0 instance Dioid Label where compose (Label Lt w) (Label Lt w') = Label Lt $ pred $ w + w' compose (Label cmp w) (Label cmp' w') = Label (compose cmp cmp') $ w + w' compose _ LInf = LInf compose LInf _ = LInf unitCompose = Label Le 0 -- * Graphs -- ** Nodes data Node rigid flex = NodeZero | NodeInfty | NodeRigid rigid | NodeFlex flex deriving (Show, Eq, Ord) instance (Pretty rigid, Pretty flex) => Pretty (Node rigid flex) where pretty NodeZero = "0" pretty NodeInfty = "∞" pretty (NodeRigid x) = pretty x pretty (NodeFlex x) = pretty x isFlexNode :: Node rigid flex -> Maybe flex isFlexNode (NodeFlex x) = Just x isFlexNode _ = Nothing isZeroNode :: Node rigid flex -> Bool isZeroNode NodeZero{} = True isZeroNode _ = False isInftyNode :: Node rigid flex -> Bool isInftyNode NodeInfty{} = True isInftyNode _ = False nodeToSizeExpr :: Node rigid flex -> SizeExpr' rigid flex nodeToSizeExpr n = case n of NodeZero -> Const 0 NodeInfty -> Infty NodeRigid i -> Rigid i 0 NodeFlex x -> Flex x 0 -- ** Edges -- | An edge is negative if its label is. instance Negative a => Negative (Edge' r f a) where negative = negative . label -- instance Show a => Show (Edge' a) where -- show (Edge u v l) = show u ++ " -(" ++ show l ++ ")-> " ++ show v instance (Ord r, Ord f, MeetSemiLattice a) => MeetSemiLattice (Edge' r f a) where e@(Edge u v l) `meet` e'@(Edge u' v' l') | u == u' && v == v' = Edge u v $ l `meet` l' | otherwise = __IMPOSSIBLE__ -- error $ show e ++ " `meet` " ++ show e' instance (Ord r, Ord f, Top a) => Top (Edge' r f a) where top = __IMPOSSIBLE__ isTop e = isTop (label e) instance (Ord r, Ord f, Dioid a) => Dioid (Edge' r f a) where e@(Edge u v l) `compose` e'@(Edge v' w l') | v == v' = Edge u w $ l `compose` l' | otherwise = __IMPOSSIBLE__ -- error $ show e ++ " `compose` " ++ show e' unitCompose = __IMPOSSIBLE__ -- ** Graphs -- | A graph forest. type Graphs r f a = [Graph r f a] emptyGraphs :: Graphs r f a emptyGraphs = [] -- | Split a list of graphs @gs@ into those that mention node @n@ and those that do not. -- If @n@ is zero or infinity, we regard it as "not mentioned". mentions :: (Ord r, Ord f) => Node r f -> Graphs r f a -> (Graphs r f a, Graphs r f a) mentions NodeZero gs = ([], gs) mentions NodeInfty gs = ([], gs) mentions NodeRigid{} gs = ([], gs) mentions n gs = List.partition (Set.member n . nodes) gs -- | Add an edge to a graph forest. -- Graphs that share a node with the edge are joined. addEdge :: (Ord r, Ord f, MeetSemiLattice a, Top a) => Edge' r f a -> Graphs r f a -> Graphs r f a addEdge e@(Edge src dest l) gs = -- Note: If we started from an empty forest -- and only added edges via @addEdge@, then -- @gsSrc@ and @gsDest@ contain each at most one graph. let (gsSrc , gsNotSrc) = mentions src gs (gsDest, gsNotDest) = mentions dest gsNotSrc in insertEdge e (Graph.unionsWith meet $ gsSrc ++ gsDest) : gsNotDest -- | Reflexive closure. Add edges @0 -> n -> n -> oo@ for all nodes @n@. reflClos :: (Ord r, Ord f, Dioid a) => Set (Node r f) -> Graph r f a -> Graph r f a reflClos ns g = setFoldl step g ns' where -- have at least the nodes in @ns@ ns' = nodes g `Set.union` ns -- add the trivial edges for all nodes ns' step g n = foldl (flip insertEdge) g es where es = [ Edge NodeZero n unitCompose , Edge n n unitCompose , Edge n NodeInfty unitCompose ] -- UNUSED -- -- | Reflexive-transitive closure. -- complete :: (Pretty a, Dioid a) => Graph r f a -> Graph r f a -- complete = transClos . reflClos -- | A graph is 'negative' if it contains a negative loop (diagonal edge). -- Makes sense on transitive graphs. instance (Ord r, Ord f, Negative a) => Negative (Graph r f a) where negative = any negative . Graph.diagonal instance (Ord r, Ord f, Negative a) => Negative (Graphs r f a) where negative = any negative -- | @h `implies` g@ if any edge in @g@ between rigids and constants -- is implied by a corresponding edge in @h@, which means that -- the edge in @g@ carries at most the information of the one in @h@. -- -- Application: Constraint implication: Constraints are compatible -- with hypotheses. implies :: (Ord r, Ord f, Pretty r, Pretty f, Pretty a, Top a, Ord a, Negative a) => Graph r f a -> Graph r f a -> Bool -- iterate 'test' over all edges in g implies h g = and $ map test $ graphToList g -- NB: doing the @test k l@ before the recursive @b@ gives -- opportunity to short-cut the conjunction @&&@. where -- test :: Key -> a -> Bool test k@(Edge src dest l) | isZeroNode src, not (negative l) = True | isInftyNode dest = True | isJust $ isFlexNode src = True | isJust $ isFlexNode dest = True | isTop l = True | otherwise = case lookupEdge h src dest of Nothing -> False Just l' -> if l' <= l then True else trace ("edge " ++ prettyShow (l <$ k) ++ " not implied by " ++ prettyShow (l' <$ k)) $ False -- implies h g = Map.foldlWithKey (\ b k l -> test k l && b) True g -- -- NB: doing the @test k l@ before the recursive @b@ gives -- -- opportunity to short-cut the conjunction @&&@. -- where -- -- test :: Key -> a -> Bool -- test k@(Edge src dest ()) l -- | isZeroNode src, not (negative l) = True -- | isInftyNode dest = True -- | isJust $ isFlexNode src = True -- | isJust $ isFlexNode dest = True -- | isTop l = True -- | otherwise = case lookupEdge h src dest of -- Nothing -> False -- Just l' -> if l' <= l then True else -- trace ("edge " ++ show (l <$ k) ++ " not implied by " ++ show (l' <$ k)) $ -- False nodeFromSizeExpr :: SizeExpr' rigid flex -> (Node rigid flex, Offset) nodeFromSizeExpr e = case e of Const n -> (NodeZero , n) Rigid i n -> (NodeRigid i, n) Flex x n -> (NodeFlex x , n) Infty -> (NodeInfty , 0) edgeFromConstraint :: Constraint' rigid flex -> LabelledEdge rigid flex edgeFromConstraint (Constraint lexp cmp rexp) = let (leftNode , n) = nodeFromSizeExpr lexp (rightNode, m) = nodeFromSizeExpr rexp in Edge leftNode rightNode (Label cmp $ m - n) -- | Build a graph from list of simplified constraints. graphFromConstraints :: (Ord rigid, Ord flex) => [Constraint' rigid flex] -> Graph rigid flex Label graphFromConstraints cs = let -- convert to edges edges = map edgeFromConstraint cs -- build a graph from the edges g = foldl (flip insertEdge) Graph.empty edges in g -- | Build a graph from list of simplified constraints. graphsFromConstraints :: (Ord rigid, Ord flex) => [Constraint' rigid flex] -> Graphs rigid flex Label graphsFromConstraints cs = let -- convert to edges edges = map edgeFromConstraint cs -- get all the flexibles mentioned in constraints xs = Set.toList $ flexs cs -- for each flexible X, add edges 0 <= X and X <= oo fedges = concat $ forM xs $ \ x -> [ Edge NodeZero (NodeFlex x) (Label Le 0) , Edge (NodeFlex x) NodeInfty (Label Le 0) ] -- build a graph from the edges gs = foldl (flip addEdge) emptyGraphs (fedges ++ edges) in gs -- Build hypotheses graph, complete it, check for negative loops. type Hyp = Constraint type Hyp' = Constraint' type HypGraph r f = Graph r f Label hypGraph :: (Ord rigid, Ord flex, Pretty rigid, Pretty flex) => Set rigid -> [Hyp' rigid flex] -> Either String (HypGraph rigid flex) hypGraph is hyps0 = do -- get a list of hypothesis from a list of constraints hyps <- concat <$> mapM (simplify1 $ \ c -> return [c]) hyps0 let g = transClos $ reflClos (Set.mapMonotonic NodeRigid is) $ graphFromConstraints hyps when (negative g) $ Left "size hypotheses graph has negative loop" return g hypConn :: (Ord r, Ord f) => HypGraph r f -> Node r f -> Node r f -> Label -- hypConn hg NodeZero n2 = Label Le 0 -- WRONG: not the best information -- hypConn hg n1 NodeInfty = Label Le 0 hypConn hg n1 n2 | n1 == n2 = Label Le 0 | Just l <- lookupEdge hg n1 n2 = l | otherwise = top simplifyWithHypotheses :: (Ord rigid, Ord flex, Pretty rigid, Pretty flex) => HypGraph rigid flex -> [Constraint' rigid flex] -> Either String [Constraint' rigid flex] simplifyWithHypotheses hg cons = concat <$> mapM (simplify1 test) cons where -- Test whether a constraint is compatible with the hypotheses: -- Succeeds, if constraint is implied by hypotheses, -- fails otherwise. test c = do let Edge n1 n2 l = edgeFromConstraint c l' = hypConn hg n1 n2 -- l' <- lookupEdge hg n1 n2 unless (l' <= l) $ Left $ "size constraint " ++ prettyShow c ++ " not consistent with size hypotheses" return [c] -- if (l' <= l) then Just [c] else Nothing -- Build constraint graph, complete it, check for negative loops. -- Check that hypotheses graph implies constraint graphs (rigids). type ConGraph r f = Graph r f Label constraintGraph :: (Ord r, Ord f, Pretty r, Pretty f) => [Constraint' r f] -> HypGraph r f -> Either String (ConGraph r f) constraintGraph cons0 hg = do traceM $ "original constraints cons0 = " ++ prettyShow cons0 -- Simplify constraints, ensure they are locally consistent with -- hypotheses. cons <- simplifyWithHypotheses hg cons0 traceM $ "simplified constraints cons = " ++ prettyShow cons -- Build a transitive graph from constraints. let g = transClos $ graphFromConstraints cons traceM $ "transitive graph g = " ++ prettyShow (graphToList g) -- Ensure it has no negative loops. when (negative g) $ Left $ "size constraint graph has negative loops" -- Ensure it does not constrain the hypotheses. unless (hg `implies` g) $ Left $ "size constraint graph constrains size hypotheses" return g type ConGraphs r f = Graphs r f Label constraintGraphs :: (Ord r, Ord f, Pretty r, Pretty f) => [Constraint' r f] -> HypGraph r f -> Either String ([f], ConGraphs r f) constraintGraphs cons0 hg = do traceM $ "original constraints cons0 = " ++ prettyShow cons0 -- Simplify constraints, ensure they are locally consistent with -- hypotheses. cons <- simplifyWithHypotheses hg cons0 traceM $ "simplified constraints cons = " ++ prettyShow cons -- Build a transitive graph forest from constraints. let gs0 = graphsFromConstraints cons traceM $ "constraint forest gs0 = " ++ prettyShow (map graphToList gs0) let gs1 = map transClos gs0 traceM $ "transitive forest gs1 = " ++ prettyShow (map graphToList gs1) -- Check for flexibles to be set to infinity let (xss,gs) = unzip $ map infinityFlexs gs1 xs = concat xss unless (null xs) $ do traceM $ "flexibles to set to oo = " ++ prettyShow xs traceM $ "forest after oo-subst = " ++ prettyShow (map graphToList gs) -- Ensure none has negative loops. when (negative gs) $ Left $ "size constraint graph has negative loop" traceM $ "we are free of negative loops" -- Ensure it does not constrain the hypotheses. forM_ gs $ \ g -> unless (hg `implies` g) $ Left $ "size constraint graph constrains size hypotheses" traceM $ "any constraint between rigids is implied by the hypotheses" return (xs, gs) -- | If we have an edge @X + n <= X@ (with n >= 0), we must set @X = oo@. infinityFlexs :: (Ord r, Ord f) => ConGraph r f -> ([f], ConGraph r f) infinityFlexs g = (infFlexs, setToInfty infFlexs g) where -- get the flexibles that need to be set to infinity infFlexs = mapMaybe flexNeg $ Graph.diagonal g flexNeg e = do guard $ negative e isFlexNode (src e) class SetToInfty f a where setToInfty :: [f] -> a -> a instance (Eq f) => SetToInfty f (Node r f) where setToInfty xs (NodeFlex x) | x `elem` xs = NodeInfty setToInfty xs n = n instance (Eq f) => SetToInfty f (Edge' r f a) where setToInfty xs (Edge n1 n2 l) = Edge (setToInfty xs n1) (setToInfty xs n2) l instance (Ord r, Ord f) => SetToInfty f (ConGraph r f) where setToInfty xs = graphFromList . filter h . map (setToInfty xs) . graphToList where -- filter out edges @oo + k <= oo@ h (Edge NodeInfty NodeInfty (Label Le _)) = False h _ = True -- * Compute solution from constraint graph. instance Plus Offset Weight Weight where plus e Infinity = Infinity plus e (Offset x) = Offset $ plus e x instance Plus (SizeExpr' r f) Weight (SizeExpr' r f) where plus e Infinity = Infty plus e (Offset x) = plus e x instance Plus (SizeExpr' r f) Label (SizeExpr' r f) where plus e l = plus e (toWeight l) -- | Lower or upper bound for a flexible variable type Bound r f = Map f (Set (SizeExpr' r f)) emptyBound :: Bound r f emptyBound = Map.empty data Bounds r f = Bounds { lowerBounds :: Bound r f , upperBounds :: Bound r f , mustBeFinite :: Set f -- ^ These metas are < ∞. } -- | Compute a lower bound for a flexible from an edge. edgeToLowerBound :: LabelledEdge r f -> Maybe (f, SizeExpr' r f) edgeToLowerBound e = case e of (Edge n1 n2 LInf) -> __IMPOSSIBLE__ (Edge NodeZero (NodeFlex x) (Label Le o)) | o >= 0 -> Just (x, Const 0) (Edge NodeZero (NodeFlex x) (Label Lt o)) | o >= 1 -> Just (x, Const 0) (Edge n1 (NodeFlex x) l) -> Just (x, nodeToSizeExpr n1 `plus` (- (toWeight l))) _ -> Nothing -- | Compute an upper bound for a flexible from an edge. edgeToUpperBound :: LabelledEdge r f -> Maybe (f, Cmp, SizeExpr' r f) edgeToUpperBound e = case e of (Edge n1 n2 LInf) -> __IMPOSSIBLE__ (Edge n1 NodeInfty (Label Le _)) -> Nothing (Edge (NodeFlex x) NodeInfty (Label Lt _)) -> Just (x, Lt, Infty) (Edge (NodeFlex x) n2 l ) -> Just (x, Le, nodeToSizeExpr n2 `plus` (toWeight l)) _ -> Nothing -- | Compute the lower bounds for all flexibles in a graph. graphToLowerBounds :: (Ord r, Ord f) => [LabelledEdge r f] -> Bound r f graphToLowerBounds = flip foldl emptyBound $ \ bs e -> case edgeToLowerBound e of Nothing -> bs Just (x, Flex{}) -> bs -- ignore flexible bounds Just (x, a) -> Map.insertWith Set.union x (Set.singleton a) bs -- | Compute the upper bounds for all flexibles in a graph. graphToUpperBounds :: (Ord r, Ord f) => [LabelledEdge r f] -> (Bound r f, Set f) graphToUpperBounds = flip foldl (emptyBound, Set.empty) $ \ (bs, fs) e -> case edgeToUpperBound e of Nothing -> (bs, fs) Just (x, _, Flex{}) -> (bs, fs) -- ignore flexible bounds Just (x, Lt, Infty) -> (bs, Set.insert x fs) Just (x, Le, a) -> (Map.insertWith Set.union x (Set.singleton a) bs, fs) _ -> __IMPOSSIBLE__ -- | Compute the bounds for all flexibles in a graph. bounds :: (Ord r, Ord f) => ConGraph r f -> Bounds r f bounds g = Bounds lbs ubs fs where edges = graphToList g lbs = graphToLowerBounds edges (ubs, fs) = graphToUpperBounds edges -- | Compute the relative minima in a set of nodes (those that do not have -- a predecessor in the set). smallest ::(Ord r, Ord f) => HypGraph r f -> [Node r f] -> [Node r f] smallest hg ns | NodeZero `elem` ns = [NodeZero] | otherwise = filter hasNoPred ns where hasNoPred NodeInfty = False hasNoPred n = null $ mapMaybe strictEdge ns where -- is there an edge n -l-> n' with l <= 0 strictEdge n' = do guard (n /= n') -- exclude loops l <- lookupEdge hg n' n guard (toWeight l <= 0) return () -- | Compute the relative maxima in a set of nodes (those that do not have -- a successor in the set). largest ::(Ord r, Ord f) => HypGraph r f -> [Node r f] -> [Node r f] largest hg ns | NodeInfty `elem` ns = [NodeInfty] | otherwise = filter hasNoSucc ns where hasNoSucc NodeZero = False hasNoSucc n = null $ mapMaybe strictEdge ns where -- is there an edge n -l-> n' with l <= 0 strictEdge n' = do guard (n /= n') -- exclude loops l <- lookupEdge hg n n' guard (toWeight l <= 0) return () {-| Given source nodes n1,n2,... find all target nodes m1,m2, such that for all j, there are edges n_i --l_ij--> m_j for all i. Return these edges as a map from target notes to a list of edges. We assume the graph is reflexive-transitive. -} commonSuccs :: (Ord r, Ord f) => Graph r f a -> [Node r f] -> Map (Node r f) [Edge' r f a] commonSuccs hg srcs = intersectAll $ map (buildmap . outgoing hg) srcs where buildmap = Map.fromList . map (\ e -> (dest e, [e])) intersectAll [] = Map.empty intersectAll (m:ms) = foldl (Map.intersectionWith (++)) m ms {-| Given target nodes m1,m2,... find all source nodes n1,n2, such that for all j, there are edges n_i --l_ij--> m_j for all i. Return these edges as a map from target notes to a list of edges. We assume the graph is reflexive-transitive. -} commonPreds :: (Ord r, Ord f) => Graph r f a -> [Node r f] -> Map (Node r f) [Edge' r f a] commonPreds hg tgts = intersectAll $ map (buildmap . incoming hg) tgts where buildmap = Map.fromList . map (\ e -> (src e, [e])) intersectAll [] = Map.empty intersectAll (m:ms) = foldl (Map.intersectionWith (++)) m ms -- | Compute the sup of two different rigids or a rigid and a constant. lub' :: forall r f . (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => HypGraph r f -> (Node r f, Offset) -> (Node r f, Offset) -> Maybe (SizeExpr' r f) lub' hg (node1, n) (node2, m) = do let sucs = commonSuccs hg [node1, node2] sucNodes = smallest hg $ Map.keys sucs traceM ("lub': sucs = " ++ show sucs) -- FIXME: prettyShow case sucNodes of -- there is a unique smallest common successor n0 of node1 and node2 [n0] -> do -- then there are exactly two edges node1 --l1--> n0 and node2 --l2--> n0 -- Andreas, 2017-04-28, issue #2558: The following invariant does not hold always -- -- with non-positive weights l1, l2 let es = fromMaybe __IMPOSSIBLE__ $ Map.lookup n0 sucs case es of [ Edge node1x n1 l1 , Edge node2x n2 l2 ] -> do unless (n0 == n1) __IMPOSSIBLE__ unless (n0 == n2) __IMPOSSIBLE__ unless (node1 == node1x) __IMPOSSIBLE__ unless (node2 == node2x) __IMPOSSIBLE__ -- Andreas, 2017-04-28, issue #2558: The following invariant does not hold always -- unless (toWeight l1 <= 0) __IMPOSSIBLE__ -- unless (toWeight l2 <= 0) __IMPOSSIBLE__ let o :: Weight o = max (n `plus` toWeight l1) (m `plus` toWeight l2) return $ nodeToSizeExpr n0 `plus` o _ -> __IMPOSSIBLE__ -- otherwise, we cannot compute the sup _ -> do let a1 :: SizeExpr' r f = nodeToSizeExpr node1 `plus` n let a2 :: SizeExpr' r f = nodeToSizeExpr node2 `plus` m traceM ("cannot compute lub of " ++ prettyShow a1 ++ " and " ++ prettyShow a2 ++ " because sucNodes = " ++ prettyShow sucNodes) Nothing -- | Compute the inf of two different rigids or a rigid and a constant. glb' :: forall r f . (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => HypGraph r f -> (Node r f, Offset) -> (Node r f, Offset) -> Maybe (SizeExpr' r f) glb' hg (node1, n) (node2, m) = do let preds = commonPreds hg [node1, node2] predNodes = largest hg $ Map.keys preds traceM ("glb': preds = " ++ show preds) -- FIXME: prettyShow case predNodes of -- there is a unique greatest common predecessor n0 of node1 and node2 [n0] -> do -- then there are exactly two edges n0 --l1--> node1 and n0 --l2--> node2 -- Andreas, 2017-04-28, issue #2558: The following invariant may not hold always -- -- with non-positive weigths l1, l2 let es = fromMaybe __IMPOSSIBLE__ $ Map.lookup n0 preds case es of [ Edge n1 node1x l1 , Edge n2 node2x l2] -> do unless (n0 == n1) __IMPOSSIBLE__ unless (n0 == n2) __IMPOSSIBLE__ unless (node1 == node1x) __IMPOSSIBLE__ unless (node2 == node2x) __IMPOSSIBLE__ -- Andreas, 2017-04-28, issue #2558: The following invariant may not hold always -- unless (toWeight l1 <= 0) __IMPOSSIBLE__ -- unless (toWeight l2 <= 0) __IMPOSSIBLE__ let o :: Weight o = max (n `plus` toWeight l1) (m `plus` toWeight l2) return $ nodeToSizeExpr n0 `plus` o _ -> __IMPOSSIBLE__ -- otherwise, we cannot compute the sup _ -> do let a1 :: SizeExpr' r f = nodeToSizeExpr node1 `plus` n let a2 :: SizeExpr' r f = nodeToSizeExpr node2 `plus` m traceM ("cannot compute glb of " ++ prettyShow a1 ++ " and " ++ prettyShow a2 ++ " because predNodes = " ++ prettyShow predNodes) Nothing -- | Compute the least upper bound (sup). lub :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => HypGraph r f -> SizeExpr' r f -> SizeExpr' r f -> Maybe (SizeExpr' r f) lub hg a1 a2 = case (a1, a2) of (Flex{}, _) -> __IMPOSSIBLE__ (_, Flex{}) -> __IMPOSSIBLE__ (Infty, a2) -> Just Infty (a1, Infty) -> Just Infty (Const n , Const m ) -> Just $ Const $ max n m (Const n , Rigid j m) | m >= n -> Just a2 | otherwise -> lub' hg (NodeZero, n) (NodeRigid j, m) (Rigid i n, Const m ) | n >= m -> Just a1 | otherwise -> lub' hg (NodeRigid i, n) (NodeZero, m) (Rigid i n, Rigid j m) | i == j -> Just $ Rigid i $ max n m | otherwise -> lub' hg (NodeRigid i, n) (NodeRigid j, m) {- Finding the glb of two rigid size expressions in hypotheses graph a1 = Rigid i n a2 = Rigid j m Find the topological predecessors of (NodeRigid i) Find the topological predecessors of (NodeRigid j) -} -- | Compute the greatest lower bound (inf) of size expressions relative -- to a hypotheses graph. glb :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => HypGraph r f -> SizeExpr' r f -> SizeExpr' r f -> Maybe (SizeExpr' r f) glb hg a1 a2 = case (a1, a2) of (Flex{}, _) -> __IMPOSSIBLE__ (_, Flex{}) -> __IMPOSSIBLE__ (Infty, a2) -> Just a2 (a1, Infty) -> Just a1 (Const n , Const m ) -> Just $ Const $ min n m (Const n , Rigid i m) | n <= m -> Just a1 | otherwise -> glb' hg (NodeZero, n) (NodeRigid i, m) (Rigid i n, Const m ) | m <= n -> Just a2 | otherwise -> glb' hg (NodeRigid i, n) (NodeZero, m) (Rigid i n, Rigid j m) | i == j -> Just $ Rigid i $ min n m | otherwise -> glb' hg (NodeRigid i, n) (NodeRigid j, m) {- (Rigid i n, Rigid j m) -> do let iLeqj = Map.lookup (Edge (NodeRigid i) (NodeRigid j) ()) hg jLeqi = Map.lookup (Edge (NodeRigid j) (NodeRigid i) ()) hg case (iLeqj, jLeqi) of (Nothing, Nothing) -> Nothing -- maximum as size expression (Just l, Nothing) | Offset k <- toWeight l -> if k + n <= m then Just a1 else Nothing -- no guaranteed infimum (Nothing, Just l) | Offset k <- toWeight l -> if k + m <= n then Just a2 else Nothing (Just{}, Just{}) -> Nothing {- let lbi = incoming hg (NodeRigid i) lbj = incoming hg (NodeRigid j) srci = Set.fromList $ map src lbi srcj = Set.fromList $ map src lbj srcs = Set.intersection srci srcj -} _ -> trace ("cannot compute glb of " ++ prettyShow a1 ++ " and " ++ prettyShow a2) $ Nothing -- TODO! -} findRigidBelow :: (Ord r, Ord f) => HypGraph r f -> (SizeExpr' r f) -> Maybe (SizeExpr' r f) findRigidBelow hg (Rigid i m) | m < 0 = do let v = NodeRigid i preds = incoming hg v filt e@(Edge n n' l) | n' == v = case toWeight l of Infinity -> Nothing Offset o -> if o <= m then Just (n, o) else Nothing | otherwise = __IMPOSSIBLE__ -- error $ "findRigidBelow: impossible: " ++ prettyShow e cands = mapMaybe filt preds (n, o) <- do case cands of [] -> Nothing [c] -> return c _ -> return $ List.maximumBy (compare `on` snd) $ filter ((NodeZero /=) . fst) cands let offset = m - o unless (offset >= 0) __IMPOSSIBLE__ return $ nodeToSizeExpr n `plus` offset findRigidBelow hg e = __IMPOSSIBLE__ -- error $ "findRigidBelow: impossible: " ++ prettyShow e solveGraph :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => Polarities f -> HypGraph r f -> ConGraph r f -> Either String (Solution r f) solveGraph pols hg g = do let (Bounds lbs ubs fs) = bounds g -- flexibles to solve for xs = Set.toAscList $ Set.unions [ Map.keysSet lbs, Map.keysSet ubs, fs ] -- iterate over all flexible variables xas <- catMaybes <$> do forM xs $ \ x -> do -- get lower and upper bounds for flexible x let lx = Set.toList $ Map.findWithDefault Set.empty x lbs ux = Set.toList $ Map.findWithDefault Set.empty x ubs traceM ("lower bounds for " ++ prettyShow x ++ ": " ++ prettyShow lx) traceM ("upper bounds for " ++ prettyShow x ++ ": " ++ prettyShow ux) -- compute maximum of lower bounds lb <- do case lx of [] -> return $ Nothing (a:as) -> do case foldM (lub hg) a as of Nothing -> Left $ "inconsistent lower bound for " ++ prettyShow x Just l -> return $ Just $ truncateOffset l -- compute minimum of upper bounds ub <- do case ux of [] -> return $ Nothing (a:as) -> do case foldM (glb hg) a as of Just l | validOffset l -> return $ Just l | Just l' <- findRigidBelow hg l -> return $ Just l' _ -> Left $ "inconsistent upper bound for " ++ prettyShow x case (lb, ub) of (Just l, Nothing) -> return $ Just (x, l) -- solve x = lower bound (Nothing, Just u) -> return $ Just (x, u) -- solve x = upper bound (Just l, Just u) -> do traceM ("lower bound for " ++ prettyShow x ++ ": " ++ prettyShow l) traceM ("upper bound for " ++ prettyShow x ++ ": " ++ prettyShow u) case getPolarity pols x of Least -> return $ Just (x, l) Greatest -> return $ Just (x, u) _ -> return Nothing return $ Solution $ Map.fromList xas -- | Solve a forest of constraint graphs relative to a hypotheses graph. -- Concatenate individual solutions. solveGraphs :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => Polarities f -> HypGraph r f -> ConGraphs r f -> Either String (Solution r f) solveGraphs pols hg gs = Solution . Map.unions <$> mapM (theSolution <.> solveGraph pols hg) gs -- * Verify solution -- | Check that after substitution of the solution, -- constraints are implied by hypotheses. verifySolution :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => HypGraph r f -> [Constraint' r f] -> Solution r f -> Either String () verifySolution hg cs sol = do cs <- return $ subst sol cs traceM $ "substituted constraints " ++ prettyShow cs cs <- -- maybe (Left "solution produces inconsistency") Right $ concat <$> mapM (simplify1 $ \ c -> return [c]) cs traceM $ "simplified substituted constraints " ++ prettyShow cs -- cs <- maybe (Left "solution produces inconsistency") Right $ -- simplifyWithHypotheses hg cs let g = graphFromConstraints cs unless (hg `implies` g) $ Left "solution not implied by hypotheses" {- case simplifyWithHypotheses hg $ subst sol cs of Nothing -> Left "solution produces inconsistency" Just [] -> Right () Just cs -> Left $ "solution leaves constraints " ++ prettyShow cs -} -- | Iterate solver until no more metas can be solved. -- -- This might trigger a (wanted) error on the second iteration (see Issue 2096) -- which would otherwise go unnoticed. iterateSolver :: (Ord r, Ord f, Pretty r, Pretty f, Show r, Show f) => Polarities f -- ^ Meta variable polarities (prefer lower or upper solution?). -> HypGraph r f -- ^ Hypotheses (assumed to have no metas, so, fixed during iteration). -> [Constraint' r f] -- ^ Constraints to solve. -> Solution r f -- ^ Previous substitution (already applied to constraints). -> Either String (Solution r f) -- ^ Accumulated substition. iterateSolver pols hg cs sol0 = do g <- constraintGraph cs hg sol <- solveGraph pols hg g traceM $ "(partial) solution " ++ prettyShow sol if null sol then return sol0 else iterateSolver pols hg (subst sol cs) $ Solution $ Map.unionWith __IMPOSSIBLE__ (theSolution sol) $ theSolution $ subst sol sol0 -- * Tests testSuccs :: Ord f => Map (Node [Char] f) [Edge' [Char] f Label] testSuccs = commonSuccs hg [n1,n2] where n1 = NodeRigid "i" n2 = NodeRigid "j" n3 = NodeRigid "k" n4 = NodeRigid "l" n5 = NodeRigid "m" hg = Graph.fromEdges [ Graph.Edge n1 n3 $ Label Le 1 , Graph.Edge n1 n4 $ Label Le 2 , Graph.Edge n1 n5 $ Label Le 3 , Graph.Edge n2 n3 $ Label Le 4 , Graph.Edge n2 n4 $ Label Le 5 , Graph.Edge n2 n5 $ Label Le 6 ] -- testLub = smallest hg $ Map.keys $ commonSuccs hg [n1,n2] -- testLub :: (Pretty f, Ord f, Show f) => Maybe (SizeExpr' [Char] f) testLub = lub hg (Rigid "i" 0) (Rigid "j" 2) where n1 = NodeRigid "i" n2 = NodeRigid "j" n3 = NodeRigid "k" n4 = NodeRigid "l" n5 = NodeRigid "m" hg = Graph.fromEdges [ Graph.Edge n1 n3 $ Label Le 0 , Graph.Edge n1 n4 $ Label Le 2 , Graph.Edge n1 n5 $ Label Le 4 , Graph.Edge n2 n3 $ Label Le 1 , Graph.Edge n2 n4 $ Label Le 3 , Graph.Edge n2 n5 $ Label Le 5 , Graph.Edge n3 n4 $ Label Le 0 , Graph.Edge n3 n5 $ Label Lt 0 ] Agda-2.6.0.1/src/full/Agda/TypeChecking/Free/0000755000000000000000000000000013466402171016527 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Free/Precompute.hs0000644000000000000000000001134113466402171021206 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- | Precompute free variables in a term (and store in 'ArgInfo'). module Agda.TypeChecking.Free.Precompute ( PrecomputeFreeVars, precomputeFreeVars , precomputedFreeVars, precomputeFreeVars_ ) where import Control.Monad.Writer import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Traversable (Traversable, traverse) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Utils.Functor import Agda.Utils.Impossible #include "undefined.h" type FV = Writer IntSet precomputeFreeVars_ :: PrecomputeFreeVars a => a -> a precomputeFreeVars_ = fst . runWriter . precomputeFreeVars precomputedFreeVars :: PrecomputeFreeVars a => a -> IntSet precomputedFreeVars = snd . runWriter . precomputeFreeVars class PrecomputeFreeVars a where precomputeFreeVars :: a -> FV a default precomputeFreeVars :: (Traversable c, PrecomputeFreeVars x, a ~ c x) => a -> FV a precomputeFreeVars = traverse precomputeFreeVars -- The instances where things actually happen: Arg, Abs and Term. maybePrecomputed :: PrecomputeFreeVars a => ArgInfo -> a -> FV (ArgInfo, a) maybePrecomputed i x = case getFreeVariables i of KnownFVs fv -> (i, x) <$ tell fv UnknownFVs -> do (x', fv) <- listen $ precomputeFreeVars x return (setFreeVariables (KnownFVs fv) i, x') instance PrecomputeFreeVars a => PrecomputeFreeVars (Arg a) where precomputeFreeVars arg@(Arg i x) = uncurry Arg <$> maybePrecomputed i x -- Note that we don't store free variables in the Dom. The reason is that the -- ArgInfo in the Dom tends to get reused during type checking for the argument -- of that domain type, and it would be tedious and error prone to ensure that -- we don't accidentally inherit also the free variables. Moreover we don't -- really need the free variables of the Dom. instance PrecomputeFreeVars a => PrecomputeFreeVars (Dom a) where instance PrecomputeFreeVars a => PrecomputeFreeVars (Abs a) where precomputeFreeVars (NoAbs x b) = NoAbs x <$> precomputeFreeVars b precomputeFreeVars (Abs x b) = censor (IntSet.map (subtract 1) . IntSet.delete 0) $ Abs x <$> precomputeFreeVars b instance PrecomputeFreeVars Term where precomputeFreeVars t = case t of Var x es -> do tell (IntSet.singleton x) Var x <$> precomputeFreeVars es Lam i b -> Lam i <$> precomputeFreeVars b Lit{} -> pure t Def f es -> Def f <$> precomputeFreeVars es Con c i es -> Con c i <$> precomputeFreeVars es Pi a b -> uncurry Pi <$> precomputeFreeVars (a, b) Sort s -> Sort <$> precomputeFreeVars s Level l -> Level <$> precomputeFreeVars l MetaV x es -> MetaV x <$> precomputeFreeVars es DontCare t -> DontCare <$> precomputeFreeVars t Dummy{} -> pure t -- The other instances are boilerplate. instance PrecomputeFreeVars Sort where precomputeFreeVars s = case s of Type a -> Type <$> precomputeFreeVars a Prop a -> Prop <$> precomputeFreeVars a Inf -> pure s SizeUniv -> pure s PiSort s1 s2 -> uncurry PiSort <$> precomputeFreeVars (s1, s2) UnivSort s -> UnivSort <$> precomputeFreeVars s MetaS x es -> MetaS x <$> precomputeFreeVars es DefS d es -> DefS d <$> precomputeFreeVars es DummyS{} -> pure s instance PrecomputeFreeVars Level where precomputeFreeVars (Max ls) = Max <$> precomputeFreeVars ls instance PrecomputeFreeVars PlusLevel where precomputeFreeVars l@ClosedLevel{} = pure l precomputeFreeVars (Plus n l) = Plus n <$> precomputeFreeVars l instance PrecomputeFreeVars LevelAtom where precomputeFreeVars l = case l of MetaLevel x es -> MetaLevel x <$> precomputeFreeVars es BlockedLevel x t -> BlockedLevel x <$> precomputeFreeVars t NeutralLevel b t -> NeutralLevel b <$> precomputeFreeVars t UnreducedLevel t -> UnreducedLevel <$> precomputeFreeVars t instance PrecomputeFreeVars Type where precomputeFreeVars (El s t) = uncurry El <$> precomputeFreeVars (s, t) -- Note: don't use default instance, since that bypasses the 'Arg' in 'Apply'. instance PrecomputeFreeVars a => PrecomputeFreeVars (Elim' a) where precomputeFreeVars e = case e of Apply x -> Apply <$> precomputeFreeVars x IApply a x y -> IApply <$> precomputeFreeVars a <*> precomputeFreeVars x <*> precomputeFreeVars y Proj{} -> pure e -- The very boilerplate instances instance PrecomputeFreeVars a => PrecomputeFreeVars [a] where instance PrecomputeFreeVars a => PrecomputeFreeVars (Maybe a) where instance (PrecomputeFreeVars a, PrecomputeFreeVars b) => PrecomputeFreeVars (a, b) where precomputeFreeVars (x, y) = (,) <$> precomputeFreeVars x <*> precomputeFreeVars y Agda-2.6.0.1/src/full/Agda/TypeChecking/Free/Reduce.hs0000644000000000000000000001471213466402171020277 0ustar0000000000000000-- | Free variable check that reduces the subject to make certain variables not -- free. Used when pruning metavariables in Agda.TypeChecking.MetaVars.Occurs. module Agda.TypeChecking.Free.Reduce ( ForceNotFree , forceNotFree , IsFree(..) ) where import Control.Monad.Reader import Control.Monad.State import qualified Data.IntMap as IntMap import Data.IntMap (IntMap) import qualified Data.IntSet as IntSet import Data.IntSet (IntSet) import qualified Data.Set as Set import Data.Set (Set) import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.TypeChecking.Free.Precompute import Agda.Utils.Monad -- | A variable can either not occur (`NotFree`) or it does occur -- (`MaybeFree`). In the latter case, the occurrence may disappear -- depending on the instantiation of some set of metas. data IsFree = MaybeFree MetaSet | NotFree deriving (Eq, Show) -- | Try to enforce a set of variables not occurring in a given -- type. Returns a possibly reduced version of the type and for each -- of the given variables whether it is either not free, or -- maybe free depending on some metavariables. forceNotFree :: (ForceNotFree a, Reduce a, MonadReduce m) => IntSet -> a -> m (IntMap IsFree, a) forceNotFree xs a = do -- Initially, all variables are marked as `NotFree`. This is changed -- to `MaybeFree` when we find an occurrence. let mxs = IntMap.fromSet (const NotFree) xs (a, mxs) <- runStateT (runReaderT (forceNotFreeR $ precomputeFreeVars_ a) Set.empty) mxs return (mxs, a) type MonadFreeRed m = ( MonadReader MetaSet m , MonadState (IntMap IsFree) m , MonadReduce m ) class (PrecomputeFreeVars a, Subst Term a) => ForceNotFree a where -- Reduce the argument if necessary, to make as many as possible of -- the variables in the state not free. Updates the state, marking -- the variables that couldn't be make not free as `MaybeFree`. By -- updating the state as soon as a variable can not be reduced away, -- we avoid trying to get rid of it in other places. forceNotFree' :: (MonadFreeRed m) => a -> m a -- Return the set of variables for which there is still hope that they -- may not occur. varsToForceNotFree :: (MonadFreeRed m) => m IntSet varsToForceNotFree = IntMap.keysSet . (IntMap.filter (== NotFree)) <$> get -- Reduce the argument if there are offending free variables. Doesn't call the -- continuation when no reduction is required. reduceIfFreeVars :: (Reduce a, ForceNotFree a, MonadFreeRed m) => (a -> m a) -> a -> m a reduceIfFreeVars k a = do xs <- varsToForceNotFree let fvs = precomputedFreeVars a notfree = IntSet.null $ IntSet.intersection xs fvs if | notfree -> return a | otherwise -> k . precomputeFreeVars_ =<< reduce a -- Careful not to define forceNotFree' = forceNotFreeR since that would loop. forceNotFreeR :: (Reduce a, ForceNotFree a, MonadFreeRed m) => a -> m a forceNotFreeR = reduceIfFreeVars forceNotFree' instance (Reduce a, ForceNotFree a) => ForceNotFree (Arg a) where -- Precomputed free variables are stored in the Arg so reduceIf outside the -- traverse. forceNotFree' = reduceIfFreeVars (traverse forceNotFree') instance (Reduce a, ForceNotFree a) => ForceNotFree (Dom a) where forceNotFree' = traverse forceNotFreeR instance (Reduce a, ForceNotFree a) => ForceNotFree (Abs a) where -- Reduction stops at abstractions (lambda/pi) so do reduceIf/forceNotFreeR here. forceNotFree' a@NoAbs{} = traverse forceNotFreeR a forceNotFree' a@Abs{} = -- Shift variables up when going under the abstraction and back down when -- coming out of it. Since we never add new indices to the state -- there's no danger of getting negative indices. reduceIfFreeVars (bracket_ (modify $ IntMap.mapKeys succ) (\ _ -> modify $ IntMap.mapKeys pred) . traverse forceNotFree') a instance ForceNotFree a => ForceNotFree [a] where forceNotFree' = traverse forceNotFree' instance (Reduce a, ForceNotFree a) => ForceNotFree (Elim' a) where -- There's an Arg inside Elim' which stores precomputed free vars, so let's -- not skip over that. forceNotFree' (Apply arg) = Apply <$> forceNotFree' arg forceNotFree' e@Proj{} = return e forceNotFree' (IApply x y r) = IApply <$> forceNotFreeR x <*> forceNotFreeR y <*> forceNotFreeR r instance ForceNotFree Type where forceNotFree' (El s t) = El <$> forceNotFree' s <*> forceNotFree' t instance ForceNotFree Term where forceNotFree' t = case t of Var x es -> do metas <- ask modify $ IntMap.adjust (const $ MaybeFree metas) x Var x <$> forceNotFree' es Def f es -> Def f <$> forceNotFree' es Con c h es -> Con c h <$> forceNotFree' es MetaV x es -> local (Set.insert x) $ MetaV x <$> forceNotFree' es Lam h b -> Lam h <$> forceNotFree' b Pi a b -> Pi <$> forceNotFree' a <*> forceNotFree' b -- Dom and Abs do reduceIf so not needed here Sort s -> Sort <$> forceNotFree' s Level l -> Level <$> forceNotFree' l DontCare t -> DontCare <$> forceNotFreeR t -- Reduction stops at DontCare so reduceIf Lit{} -> return t Dummy{} -> return t instance ForceNotFree Level where forceNotFree' (Max as) = Max <$> forceNotFree' as instance ForceNotFree PlusLevel where forceNotFree' l = case l of ClosedLevel{} -> return l Plus k a -> Plus k <$> forceNotFree' a instance ForceNotFree LevelAtom where forceNotFree' l = case l of MetaLevel x es -> local (Set.insert x) $ MetaLevel x <$> forceNotFree' es BlockedLevel x t -> BlockedLevel x <$> forceNotFree' t NeutralLevel b t -> NeutralLevel b <$> forceNotFree' t UnreducedLevel t -> UnreducedLevel <$> forceNotFreeR t -- Already reduce in the cases above instance ForceNotFree Sort where -- Reduce for sorts already goes under all sort constructors, so we can get -- away without forceNotFreeR here. forceNotFree' s = case s of Type l -> Type <$> forceNotFree' l Prop l -> Prop <$> forceNotFree' l PiSort a b -> PiSort <$> forceNotFree' a <*> forceNotFree' b UnivSort s -> UnivSort <$> forceNotFree' s MetaS x es -> MetaS x <$> forceNotFree' es DefS d es -> DefS d <$> forceNotFree' es Inf -> return s SizeUniv -> return s DummyS{} -> return s Agda-2.6.0.1/src/full/Agda/TypeChecking/Free/Lazy.hs0000644000000000000000000003060113466402171020002 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE UndecidableInstances #-} -- | Computing the free variables of a term lazily. -- -- We implement a reduce (traversal into monoid) over internal syntax -- for a generic collection (monoid with singletons). This should allow -- a more efficient test for the presence of a particular variable. -- -- Worst-case complexity does not change (i.e. the case when a variable -- does not occur), but best case-complexity does matter. For instance, -- see 'Agda.TypeChecking.Substitute.mkAbs': each time we construct -- a dependent function type, we check it is actually dependent. -- -- The distinction between rigid and strongly rigid occurrences comes from: -- Jason C. Reed, PhD thesis, 2009, page 96 (see also his LFMTP 2009 paper) -- -- The main idea is that x = t(x) is unsolvable if x occurs strongly rigidly -- in t. It might have a solution if the occurrence is not strongly rigid, e.g. -- -- x = \f -> suc (f (x (\ y -> k))) has x = \f -> suc (f (suc k)) -- -- [Jason C. Reed, PhD thesis, page 106] -- -- Under coinductive constructors, occurrences are never strongly rigid. -- Also, function types and lambdas do not establish strong rigidity. -- Only inductive constructors do so. -- (See issue 1271). module Agda.TypeChecking.Free.Lazy where import Control.Applicative hiding (empty) import Control.Monad.Reader import Data.Foldable (foldMap) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Monoid ( Monoid, mempty, mappend, mconcat ) import Data.Semigroup ( Semigroup, (<>) ) import Data.Set (Set) import Agda.Syntax.Common import Agda.Syntax.Internal -- import Agda.TypeChecking.Irrelevance import Agda.Utils.Functor import Agda.Utils.Monad import Agda.Utils.Singleton import Agda.Utils.Size type MetaSet = Set MetaId -- | Depending on the surrounding context of a variable, -- it's occurrence can be classified as flexible or rigid, -- with finer distinctions. -- -- The constructors are listed in increasing order (wrt. information content). data FlexRig = Flexible MetaSet -- ^ In arguments of metas. -- The set of metas is used by ''Agda.TypeChecking.Rewriting.NonLinMatch'' -- to generate the right blocking information. | WeaklyRigid -- ^ In arguments to variables and definitions. | Unguarded -- ^ In top position, or only under inductive record constructors. | StronglyRigid -- ^ Under at least one and only inductive constructors. deriving (Eq, Ord, Show) -- | 'FlexRig' composition. For accumulating the context of a variable. -- -- 'Flexible' is dominant. Once we are under a meta, we are flexible -- regardless what else comes. -- -- 'WeaklyRigid' is next in strength. Destroys strong rigidity. -- -- 'StronglyRigid' is still dominant over 'Unguarded'. -- -- 'Unguarded' is the unit. It is the top (identity) context. composeFlexRig :: FlexRig -> FlexRig -> FlexRig composeFlexRig o o' = case (o, o') of (Flexible ms1, Flexible ms2) -> Flexible $ ms1 `mappend` ms2 (Flexible ms1, _) -> Flexible ms1 (_, Flexible ms2) -> Flexible ms2 (WeaklyRigid, _) -> WeaklyRigid (_, WeaklyRigid) -> WeaklyRigid (StronglyRigid, _) -> StronglyRigid (_, StronglyRigid) -> StronglyRigid (Unguarded, Unguarded) -> Unguarded -- -- | 'FlexRig' supremum. Extract the most information about a variable. -- -- -- -- We make this the default 'Monoid' for 'FlexRig'. -- instance Monoid FlexRig where -- mempty = minBound -- mappend = max -- | Occurrence of free variables is classified by several dimensions. -- Currently, we have 'FlexRig' and 'Relevance'. data VarOcc = VarOcc { varFlexRig :: FlexRig , varRelevance :: Relevance } deriving (Eq, Show) -- | When we extract information about occurrence, we care most about -- about 'StronglyRigid' 'Relevant' occurrences. maxVarOcc :: VarOcc -> VarOcc -> VarOcc maxVarOcc (VarOcc o r) (VarOcc o' r') = VarOcc (max o o') (min r r') topVarOcc :: VarOcc topVarOcc = VarOcc StronglyRigid Relevant botVarOcc :: VarOcc botVarOcc = VarOcc (Flexible mempty) Irrelevant -- | First argument is the outer occurrence and second is the inner. composeVarOcc :: VarOcc -> VarOcc -> VarOcc composeVarOcc (VarOcc o r) (VarOcc o' r') = VarOcc (composeFlexRig o o') (max r r') instance LensRelevance VarOcc where getRelevance = varRelevance setRelevance rel (VarOcc x _) = VarOcc x rel -- | Any representation of a set of variables need to be able to be modified by -- a variable occurrence. This is to ensure that free variable analysis is -- compositional. For instance, it should be possible to compute `fv (v [u/x])` -- from `fv v` and `fv u`. class (Semigroup a, Monoid a) => IsVarSet a where -- | Laws -- * Respects monoid operations: -- ``` -- withVarOcc o mempty == mempty -- withVarOcc o (x <> y) == withVarOcc o x <> withVarOcc o y -- ``` -- * Respects VarOcc composition -- ``` -- withVarOcc (composeVarOcc o1 o2) = withVarOcc o1 . withVarOcc o2 -- ``` withVarOcc :: VarOcc -> a -> a type TheVarMap = IntMap VarOcc newtype VarMap = VarMap { theVarMap :: TheVarMap } deriving (Show, Singleton (Variable, VarOcc)) mapVarMap :: (TheVarMap -> TheVarMap) -> VarMap -> VarMap mapVarMap f = VarMap . f . theVarMap instance Semigroup VarMap where VarMap m <> VarMap m' = VarMap $ IntMap.unionWith maxVarOcc m m' -- Andreas & Jesper, 2018-05-11, issue #3052: -- | Proper monoid instance for @VarMap@ rather than inheriting the broken one from IntMap. -- We combine two occurrences of a variable using 'maxVarOcc'. instance Monoid VarMap where mempty = VarMap IntMap.empty mappend = (<>) mconcat = VarMap . IntMap.unionsWith maxVarOcc . map theVarMap instance IsVarSet VarMap where withVarOcc o = mapVarMap $ fmap $ composeVarOcc o -- * Collecting free variables. -- | Where should we skip sorts in free variable analysis? data IgnoreSorts = IgnoreNot -- ^ Do not skip. | IgnoreInAnnotations -- ^ Skip when annotation to a type. | IgnoreAll -- ^ Skip unconditionally. deriving (Eq, Show) -- | The current context. data FreeEnv c = FreeEnv { feIgnoreSorts :: !IgnoreSorts -- ^ Ignore free variables in sorts. , feFlexRig :: !FlexRig -- ^ Are we flexible or rigid? , feRelevance :: !Relevance -- ^ What is the current relevance? , feSingleton :: Maybe Variable -> c -- ^ Method to return a single variable. } type Variable = Int type SingleVar c = Variable -> c -- | The initial context. initFreeEnv :: Monoid c => SingleVar c -> FreeEnv c initFreeEnv sing = FreeEnv { feIgnoreSorts = IgnoreNot , feFlexRig = Unguarded , feRelevance = Relevant , feSingleton = maybe mempty sing } type FreeM c = Reader (FreeEnv c) c -- | Run function for FreeM. runFreeM :: IsVarSet c => SingleVar c -> IgnoreSorts -> FreeM c -> c runFreeM single i m = runReader m $ (initFreeEnv single) { feIgnoreSorts = i } instance Semigroup c => Semigroup (FreeM c) where (<>) = liftA2 (<>) instance (Semigroup c, Monoid c) => Monoid (FreeM c) where mempty = pure mempty mappend = (<>) mconcat = mconcat <.> sequence -- instance Singleton a c => Singleton a (FreeM c) where -- singleton = pure . singleton -- | Base case: a variable. variable :: IsVarSet c => Int -> FreeM c variable n = do o <- asks feFlexRig r <- asks feRelevance s <- asks feSingleton pure $ withVarOcc (VarOcc o r) (s $ Just n) -- | Subtract, but return Nothing if result is negative. subVar :: Int -> Maybe Variable -> Maybe Variable subVar n x = x >>= \ i -> (i - n) <$ guard (n <= i) -- | Going under a binder. bind :: FreeM a -> FreeM a bind = bind' 1 bind' :: Nat -> FreeM a -> FreeM a bind' n = local $ \ e -> e { feSingleton = feSingleton e . subVar n } -- | Changing the 'FlexRig' context. go :: FlexRig -> FreeM a -> FreeM a go o = local $ \ e -> e { feFlexRig = composeFlexRig o $ feFlexRig e } -- | Changing the 'Relevance'. goRel :: Relevance-> FreeM a -> FreeM a goRel r = local $ \ e -> e { feRelevance = composeRelevance r $ feRelevance e } -- | What happens to the variables occurring under a constructor? underConstructor :: ConHead -> FreeM a -> FreeM a underConstructor (ConHead c i fs) = case (i,fs) of -- Coinductive (record) constructors admit infinite cycles: (CoInductive, _) -> go WeaklyRigid -- Inductive data constructors do not admit infinite cycles: (Inductive, []) -> go StronglyRigid -- Inductive record constructors do not admit infinite cycles, -- but this cannot be proven inside Agda. -- Thus, unification should not prove it either. (Inductive, (_:_)) -> id -- | Gather free variables in a collection. class Free a where -- Misplaced SPECIALIZE pragma: -- {-# SPECIALIZE freeVars' :: a -> FreeM Any #-} -- So you cannot specialize all instances in one go. :( freeVars' :: IsVarSet c => a -> FreeM c instance Free Term where -- SPECIALIZE instance does not work as well, see -- https://ghc.haskell.org/trac/ghc/ticket/10434#ticket -- {-# SPECIALIZE instance Free Term All #-} -- {-# SPECIALIZE freeVars' :: Term -> FreeM Any #-} -- {-# SPECIALIZE freeVars' :: Term -> FreeM All #-} -- {-# SPECIALIZE freeVars' :: Term -> FreeM VarSet #-} freeVars' t = case t of Var n ts -> variable n `mappend` do go WeaklyRigid $ freeVars' ts -- λ is not considered guarding, as -- we cannot prove that x ≡ λy.x is impossible. Lam _ t -> freeVars' t Lit _ -> mempty Def _ ts -> go WeaklyRigid $ freeVars' ts -- because we are not in TCM -- we cannot query whether we are dealing with a data/record (strongly r.) -- or a definition by pattern matching (weakly rigid) -- thus, we approximate, losing that x = List x is unsolvable Con c _ ts -> underConstructor c $ freeVars' ts -- Pi is not guarding, since we cannot prove that A ≡ B → A is impossible. -- Even as we do not permit infinite type expressions, -- we cannot prove their absence (as Set is not inductive). -- Also, this is incompatible with univalence (HoTT). Pi a b -> freeVars' (a,b) Sort s -> freeVars' s Level l -> freeVars' l MetaV m ts -> go (Flexible $ singleton m) $ freeVars' ts DontCare mt -> goRel Irrelevant $ freeVars' mt Dummy{} -> mempty instance Free a => Free (Type' a) where freeVars' (El s t) = ifM ((IgnoreNot ==) <$> asks feIgnoreSorts) {- then -} (freeVars' (s, t)) {- else -} (freeVars' t) instance Free Sort where freeVars' s = ifM ((IgnoreAll ==) <$> asks feIgnoreSorts) mempty $ {- else -} case s of Type a -> freeVars' a Prop a -> freeVars' a Inf -> mempty SizeUniv -> mempty PiSort s1 s2 -> go WeaklyRigid $ freeVars' (s1, s2) UnivSort s -> go WeaklyRigid $ freeVars' s MetaS x es -> go (Flexible $ singleton x) $ freeVars' es DefS _ es -> go WeaklyRigid $ freeVars' es DummyS{} -> mempty instance Free Level where freeVars' (Max as) = freeVars' as instance Free PlusLevel where freeVars' ClosedLevel{} = mempty freeVars' (Plus _ l) = freeVars' l instance Free LevelAtom where freeVars' l = case l of MetaLevel m vs -> go (Flexible $ singleton m) $ freeVars' vs NeutralLevel _ v -> freeVars' v BlockedLevel _ v -> freeVars' v UnreducedLevel v -> freeVars' v instance Free a => Free [a] where freeVars' = foldMap freeVars' instance Free a => Free (Maybe a) where freeVars' = foldMap freeVars' instance (Free a, Free b) => Free (a, b) where freeVars' (x,y) = freeVars' x `mappend` freeVars' y instance Free a => Free (Elim' a) where freeVars' (Apply a) = freeVars' a freeVars' (Proj{} ) = mempty freeVars' (IApply x y r) = mconcat $ map freeVars' [x,y,r] instance Free a => Free (Arg a) where freeVars' a = goRel (getRelevance a) $ freeVars' $ unArg a instance Free a => Free (Dom a) where freeVars' = freeVars' . unDom instance Free a => Free (Abs a) where freeVars' (Abs _ b) = bind $ freeVars' b freeVars' (NoAbs _ b) = freeVars' b instance Free a => Free (Tele a) where freeVars' EmptyTel = mempty freeVars' (ExtendTel a tel) = freeVars' (a, tel) instance Free Clause where freeVars' cl = bind' (size $ clauseTel cl) $ freeVars' $ clauseBody cl instance Free EqualityView where freeVars' (OtherType t) = freeVars' t freeVars' (EqualityType s _eq l t a b) = freeVars' s `mappend` freeVars' (l ++ [t, a, b]) Agda-2.6.0.1/src/full/Agda/TypeChecking/Free/Old.hs0000644000000000000000000002740513466402171017611 0ustar0000000000000000 -- | Computing the free variables of a term. -- -- This is the old version of ''Agda.TypeChecking.Free'', using -- 'IntSet's for the separate variable categories. -- We keep it as a specification. -- -- The distinction between rigid and strongly rigid occurrences comes from: -- Jason C. Reed, PhD thesis, 2009, page 96 (see also his LFMTP 2009 paper) -- -- The main idea is that x = t(x) is unsolvable if x occurs strongly rigidly -- in t. It might have a solution if the occurrence is not strongly rigid, e.g. -- -- x = \f -> suc (f (x (\ y -> k))) has x = \f -> suc (f (suc k)) -- -- [Jason C. Reed, PhD thesis, page 106] -- -- Under coinductive constructors, occurrences are never strongly rigid. -- Also, function types and lambdas do not establish strong rigidity. -- Only inductive constructors do so. -- (See issue 1271). module Agda.TypeChecking.Free.Old ( FreeVars(..) , Free , IgnoreSorts(..) , freeVars , freeVarsIgnore , allVars , relevantVars , rigidVars , freeIn, isBinderUsed , freeInIgnoringSorts, freeInIgnoringSortAnn , relevantIn, relevantInIgnoringSortAnn , Occurrence(..) , occurrence ) where import Control.Applicative hiding (empty) import Control.Monad.Reader import Data.Foldable (foldMap) import Data.Monoid ( Monoid, mempty, mappend, mconcat ) import Data.Semigroup ( Semigroup, (<>) ) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Utils.Functor import Agda.Utils.Monad import Agda.Utils.Size import Agda.Utils.VarSet (VarSet) import qualified Agda.Utils.VarSet as Set -- | Free variables of a term, (disjointly) partitioned into strongly and -- and weakly rigid variables, flexible variables and irrelevant variables. data FreeVars = FV { stronglyRigidVars :: VarSet -- ^ Variables under only and at least one inductive constructor(s). , unguardedVars :: VarSet -- ^ Variables at top or only under inductive record constructors -- λs and Πs. -- The purpose of recording these separately is that they -- can still become strongly rigid if put under a constructor -- whereas weakly rigid ones stay weakly rigid. , weaklyRigidVars :: VarSet -- ^ Ordinary rigid variables, e.g., in arguments of variables. , flexibleVars :: VarSet -- ^ Variables occuring in arguments of metas. -- These are only potentially free, depending how the meta variable is instantiated. , irrelevantVars :: VarSet -- ^ Variables in irrelevant arguments and under a @DontCare@, i.e., -- in irrelevant positions. } deriving (Eq, Show) -- | Rigid variables: either strongly rigid, unguarded, or weakly rigid. rigidVars :: FreeVars -> VarSet rigidVars fv = Set.unions [ stronglyRigidVars fv , unguardedVars fv , weaklyRigidVars fv ] -- | All but the irrelevant variables. relevantVars :: FreeVars -> VarSet relevantVars fv = Set.unions [rigidVars fv, flexibleVars fv] -- | @allVars fv@ includes irrelevant variables. allVars :: FreeVars -> VarSet allVars fv = Set.unions [relevantVars fv, irrelevantVars fv] data Occurrence = NoOccurrence | Irrelevantly | StronglyRigid -- ^ Under at least one and only inductive constructors. | Unguarded -- ^ In top position, or only under inductive record constructors. | WeaklyRigid -- ^ In arguments to variables and definitions. | Flexible -- ^ In arguments of metas. deriving (Eq,Show) {- NO LONGER -- | @occurrence x fv@ ignores irrelevant variables in @fv@ -} occurrence :: Nat -> FreeVars -> Occurrence occurrence x fv | x `Set.member` stronglyRigidVars fv = StronglyRigid | x `Set.member` unguardedVars fv = Unguarded | x `Set.member` weaklyRigidVars fv = WeaklyRigid | x `Set.member` flexibleVars fv = Flexible | x `Set.member` irrelevantVars fv = Irrelevantly | otherwise = NoOccurrence -- | Mark variables as flexible. Useful when traversing arguments of metas. flexible :: FreeVars -> FreeVars flexible fv = fv { stronglyRigidVars = Set.empty , unguardedVars = Set.empty , weaklyRigidVars = Set.empty , flexibleVars = relevantVars fv } -- | Mark rigid variables as non-strongly. Useful when traversion arguments of variables. weakly :: FreeVars -> FreeVars weakly fv = fv { stronglyRigidVars = Set.empty , unguardedVars = Set.empty , weaklyRigidVars = rigidVars fv } -- | Mark unguarded variables as strongly rigid. Useful when traversion arguments of inductive constructors. strongly :: FreeVars -> FreeVars strongly fv = fv { stronglyRigidVars = stronglyRigidVars fv `Set.union` unguardedVars fv , unguardedVars = Set.empty } -- | What happens to the variables occurring under a constructor? underConstructor :: ConHead -> FreeVars -> FreeVars underConstructor (ConHead c i fs) = case (i,fs) of -- Coinductive (record) constructors admit infinite cycles: (CoInductive, _) -> weakly -- Inductive data constructors do not admit infinite cycles: (Inductive, []) -> strongly -- Inductive record constructors do not admit infinite cycles, -- but this cannot be proven inside Agda. -- Thus, unification should not prove it either. (Inductive, (_:_)) -> id -- | Mark all free variables as irrelevant. irrelevantly :: FreeVars -> FreeVars irrelevantly fv = empty { irrelevantVars = allVars fv } -- | Pointwise union. union :: FreeVars -> FreeVars -> FreeVars union (FV sv1 gv1 rv1 fv1 iv1) (FV sv2 gv2 rv2 fv2 iv2) = FV (Set.union sv1 sv2) (Set.union gv1 gv2) (Set.union rv1 rv2) (Set.union fv1 fv2) (Set.union iv1 iv2) unions :: [FreeVars] -> FreeVars unions = foldr union empty empty :: FreeVars empty = FV Set.empty Set.empty Set.empty Set.empty Set.empty -- | Free variable sets form a monoid under 'union'. instance Semigroup FreeVars where (<>) = union instance Monoid FreeVars where mempty = empty mappend = (<>) mconcat = unions -- | @delete x fv@ deletes variable @x@ from variable set @fv@. delete :: Nat -> FreeVars -> FreeVars delete n (FV sv gv rv fv iv) = FV (Set.delete n sv) (Set.delete n gv) (Set.delete n rv) (Set.delete n fv) (Set.delete n iv) -- | @subtractFV n fv@ subtracts $n$ from each free variable in @fv@. subtractFV :: Nat -> FreeVars -> FreeVars subtractFV n (FV sv gv rv fv iv) = FV (Set.subtract n sv) (Set.subtract n gv) (Set.subtract n rv) (Set.subtract n fv) (Set.subtract n iv) -- | A single unguarded variable. singleton :: Nat -> FreeVars singleton x = empty { unguardedVars = Set.singleton x } -- * Collecting free variables. -- | Where should we skip sorts in free variable analysis? data IgnoreSorts = IgnoreNot -- ^ Do not skip. | IgnoreInAnnotations -- ^ Skip when annotation to a type. | IgnoreAll -- ^ Skip unconditionally. deriving (Eq, Show) data FreeConf = FreeConf { fcIgnoreSorts :: !IgnoreSorts -- ^ Ignore free variables in sorts. , fcContext :: !Int -- ^ Under how many binders have we stepped? } initFreeConf :: FreeConf initFreeConf = FreeConf { fcIgnoreSorts = IgnoreNot , fcContext = 0 } -- | Doesn't go inside solved metas, but collects the variables from a -- metavariable application @X ts@ as @flexibleVars@. freeVars :: Free a => a -> FreeVars freeVars t = freeVars' t `runReader` initFreeConf freeVarsIgnore :: Free a => IgnoreSorts -> a -> FreeVars freeVarsIgnore i t = freeVars' t `runReader` initFreeConf{ fcIgnoreSorts = i } -- | Return type of fold over syntax. type FreeT = Reader FreeConf FreeVars instance Semigroup FreeT where (<>) = liftA2 mappend instance Monoid FreeT where mempty = pure mempty mappend = (<>) mconcat = mconcat <.> sequence -- | Base case: a variable. variable :: Int -> FreeT variable n = do m <- (n -) <$> asks fcContext if m >= 0 then pure $ singleton m else mempty -- | Going under a binder. bind :: FreeT -> FreeT bind = bind' 1 -- | Going under n binders. bind' :: Nat -> FreeT -> FreeT bind' n = local $ \ e -> e { fcContext = n + fcContext e } class Free a where freeVars' :: a -> FreeT instance Free Term where freeVars' t = case t of Var n ts -> variable n `mappend` do weakly <$> freeVars' ts -- λ is not considered guarding, as -- we cannot prove that x ≡ λy.x is impossible. Lam _ t -> freeVars' t Lit _ -> mempty Def _ ts -> weakly <$> freeVars' ts -- because we are not in TCM -- we cannot query whether we are dealing with a data/record (strongly r.) -- or a definition by pattern matching (weakly rigid) -- thus, we approximate, losing that x = List x is unsolvable Con c _ ts -> underConstructor c <$> freeVars' ts -- Pi is not guarding, since we cannot prove that A ≡ B → A is impossible. -- Even as we do not permit infinite type expressions, -- we cannot prove their absence (as Set is not inductive). -- Also, this is incompatible with univalence (HoTT). Pi a b -> freeVars' (a,b) Sort s -> freeVars' s Level l -> freeVars' l MetaV _ ts -> flexible <$> freeVars' ts DontCare mt -> irrelevantly <$> freeVars' mt Dummy{} -> mempty instance Free Type where freeVars' (El s t) = ifM ((IgnoreNot ==) <$> asks fcIgnoreSorts) {- then -} (freeVars' (s, t)) {- else -} (freeVars' t) instance Free Sort where freeVars' s = ifM ((IgnoreAll ==) <$> asks fcIgnoreSorts) mempty $ {- else -} case s of Type a -> freeVars' a Prop a -> freeVars' a Inf -> mempty SizeUniv -> mempty PiSort s1 s2 -> weakly <$> freeVars' (s1, s2) UnivSort s -> weakly <$> freeVars' s MetaS x es -> flexible <$> freeVars' es DefS _ es -> weakly <$> freeVars' es DummyS{} -> mempty instance Free Level where freeVars' (Max as) = freeVars' as instance Free PlusLevel where freeVars' ClosedLevel{} = mempty freeVars' (Plus _ l) = freeVars' l instance Free LevelAtom where freeVars' l = case l of MetaLevel _ vs -> flexible <$> freeVars' vs NeutralLevel _ v -> freeVars' v BlockedLevel _ v -> freeVars' v UnreducedLevel v -> freeVars' v instance Free a => Free [a] where freeVars' = foldMap freeVars' instance Free a => Free (Maybe a) where freeVars' = foldMap freeVars' instance (Free a, Free b) => Free (a,b) where freeVars' (x,y) = freeVars' x `mappend` freeVars' y instance Free a => Free (Elim' a) where freeVars' (Apply a) = freeVars' a freeVars' (Proj{} ) = mempty freeVars' (IApply x y r) = mconcat $ map freeVars' [x,y,r] instance Free a => Free (Arg a) where freeVars' a = f <$> freeVars' (unArg a) where f = case getRelevance a of Irrelevant -> irrelevantly _ -> id instance Free a => Free (Dom a) where freeVars' = freeVars' . unDom instance Free a => Free (Abs a) where freeVars' (Abs _ b) = bind $ freeVars' b freeVars' (NoAbs _ b) = freeVars' b instance Free a => Free (Tele a) where freeVars' EmptyTel = mempty freeVars' (ExtendTel a tel) = freeVars' (a, tel) instance Free Clause where freeVars' cl = bind' (size $ clauseTel cl) $ freeVars' $ clauseBody cl freeIn :: Free a => Nat -> a -> Bool freeIn v t = v `Set.member` allVars (freeVars t) freeInIgnoringSorts :: Free a => Nat -> a -> Bool freeInIgnoringSorts v t = v `Set.member` allVars (freeVarsIgnore IgnoreAll t) freeInIgnoringSortAnn :: Free a => Nat -> a -> Bool freeInIgnoringSortAnn v t = v `Set.member` allVars (freeVarsIgnore IgnoreInAnnotations t) relevantInIgnoringSortAnn :: Free a => Nat -> a -> Bool relevantInIgnoringSortAnn v t = v `Set.member` relevantVars (freeVarsIgnore IgnoreInAnnotations t) relevantIn :: Free a => Nat -> a -> Bool relevantIn v t = v `Set.member` relevantVars (freeVarsIgnore IgnoreAll t) -- | Is the variable bound by the abstraction actually used? isBinderUsed :: Free a => Abs a -> Bool isBinderUsed NoAbs{} = False isBinderUsed (Abs _ x) = 0 `freeIn` x Agda-2.6.0.1/src/full/Agda/TypeChecking/MetaVars/0000755000000000000000000000000013466402171017370 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/MetaVars/Occurs.hs0000644000000000000000000010515713466402171021173 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE UndecidableInstances #-} {- | The occurs check for unification. Does pruning on the fly. When hitting a meta variable: - Compute flex/rigid for its arguments. - Compare to allowed variables. - Mark arguments with rigid occurrences of disallowed variables for deletion. - Attempt to delete marked arguments. - We don't need to check for success, we can just continue occurs checking. -} module Agda.TypeChecking.MetaVars.Occurs where import Control.Monad import Control.Monad.Reader import Data.Foldable (foldMap) import Data.Monoid import Data.Set (Set) import qualified Data.Set as Set import qualified Data.IntMap as IntMap import Data.IntMap (IntMap) import qualified Data.IntSet as IntSet import Data.IntSet (IntSet) import Data.Traversable (traverse) import qualified Agda.Benchmarking as Bench import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Reduce import Agda.TypeChecking.Pretty import Agda.TypeChecking.Free hiding (Occurrence(..)) import Agda.TypeChecking.Free.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Records import {-# SOURCE #-} Agda.TypeChecking.MetaVars import Agda.Utils.Either import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.Lens import Agda.Utils.List (downFrom) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible {- To address issue 585 (meta var occurrences in mutual defs) data B : Set where inn : A -> B out : B -> A out (inn a) = a postulate P : (y : A) (z : Unit -> B) → Set p : (x : Unit -> B) → P (out (x unit)) x mutual d : Unit -> B d unit = inn _ -- Y g : P (out (d unit)) d g = p _ -- X -- Agda solves d unit = inn (out (d unit)) -- -- out (X unit) = out (d unit) = out (inn Y) = Y -- X = d When doing the occurs check on d, we need to look at the definition of d to discover that it mentions X. To this end, we extend the state by names of definitions that have to be checked when they occur. At the beginning, this is initialized with the names in the current mutual block. Each time we encounter a name in the list during occurs check, we delete it (if check is successful). This way, we do not duplicate work. -} modifyOccursCheckDefs :: (Set QName -> Set QName) -> TCM () modifyOccursCheckDefs f = stOccursCheckDefs `modifyTCLens` f -- | Set the names of definitions to be looked at -- to the defs in the current mutual block. initOccursCheck :: MetaVariable -> TCM () initOccursCheck mv = modifyOccursCheckDefs . const =<< if (miMetaOccursCheck (mvInfo mv) == DontRunMetaOccursCheck) then do reportSLn "tc.meta.occurs" 20 $ "initOccursCheck: we do not look into definitions" return Set.empty else do reportSLn "tc.meta.occurs" 20 $ "initOccursCheck: we look into the following definitions:" mb <- asksTC envMutualBlock case mb of Nothing -> do reportSLn "tc.meta.occurs" 20 $ "(none)" return Set.empty Just b -> do ds <- mutualNames <$> lookupMutualBlock b reportSDoc "tc.meta.occurs" 20 $ sep $ map prettyTCM $ Set.toList ds return ds -- | Is a def in the list of stuff to be checked? defNeedsChecking :: QName -> TCM Bool defNeedsChecking d = Set.member d <$> useTC stOccursCheckDefs -- | Remove a def from the list of defs to be looked at. tallyDef :: QName -> TCM () tallyDef d = modifyOccursCheckDefs $ \ s -> Set.delete d s data OccursCtx = Flex -- ^ We are in arguments of a meta. | Rigid -- ^ We are not in arguments of a meta but a bound var. | StronglyRigid -- ^ We are at the start or in the arguments of a constructor. | Irrel -- ^ We are in an irrelevant argument. deriving (Eq, Show) data UnfoldStrategy = YesUnfold | NoUnfold deriving (Eq, Show) defArgs :: UnfoldStrategy -> OccursCtx -> OccursCtx defArgs NoUnfold _ = Flex defArgs YesUnfold ctx = weakly ctx unfold :: UnfoldStrategy -> Term -> TCM (Blocked Term) unfold NoUnfold v = notBlocked <$> instantiate v unfold YesUnfold v = reduceB v -- | Leave the strongly rigid position. weakly :: OccursCtx -> OccursCtx weakly StronglyRigid = Rigid weakly ctx = ctx strongly :: OccursCtx -> OccursCtx strongly Rigid = StronglyRigid strongly ctx = ctx patternViolation' :: Int -> String -> TCM a patternViolation' n err = do reportSLn "tc.meta.occurs" n err patternViolation abort :: OccursCtx -> TypeError -> TCM a abort StronglyRigid err = typeError err -- here, throw an uncatchable error (unsolvable constraint) abort Flex err = patternViolation' 70 (show err) -- throws a PatternErr, which leads to delayed constraint abort Rigid err = patternViolation' 70 (show err) abort Irrel err = patternViolation' 70 (show err) -- | Distinguish relevant, irrelevant and nonstrict variables in occurs check. type Vars = ([Nat],[Nat],[Nat]) -- TODO: refactor this into an actual datatype goIrrelevant :: Vars -> Vars goIrrelevant (relVs, nonstrictVs, irrVs) = (irrVs ++ nonstrictVs ++ relVs, [], []) goNonStrict :: Vars -> Vars goNonStrict (relVs, nonstrictVs, irrVs) = (nonstrictVs ++ relVs, [], irrVs) allowedVar :: Nat -> Vars -> Bool allowedVar i (relVs, nonstrictVs, irrVs) = i `elem` relVs takeRelevant :: Vars -> [Nat] takeRelevant (relVs, nonstrictVs, irrVs) = relVs takeAll :: Vars -> [Nat] takeAll (rel, nst, irr) = rel ++ nst ++ irr liftUnderAbs :: Vars -> Vars liftUnderAbs (relVs, nonstrictVs, irrVs) = (0 : map (1+) relVs, map (+1) nonstrictVs, map (1+) irrVs) -- | Extended occurs check. class Occurs t where occurs :: UnfoldStrategy -> OccursCtx -> MetaId -> Vars -> t -> TCM t metaOccurs :: MetaId -> t -> TCM () -- raise exception if meta occurs in t -- | When assigning @m xs := v@, check that @m@ does not occur in @v@ -- and that the free variables of @v@ are contained in @xs@. occursCheck :: (Occurs a, InstantiateFull a, PrettyTCM a) => MetaId -> Vars -> a -> TCM a occursCheck m xs v = Bench.billTo [ Bench.Typing, Bench.OccursCheck ] $ do mv <- lookupMeta m let ctx = if isIrrelevant (getMetaRelevance mv) then Irrel else StronglyRigid initOccursCheck mv -- TODO: Can we do this in a better way? let redo m = m -- First try without normalising the term redo (occurs NoUnfold ctx m xs v) `catchError` \_ -> do initOccursCheck mv redo (occurs YesUnfold ctx m xs v) `catchError` \err -> case err of -- Produce nicer error messages TypeError _ cl -> case clValue cl of MetaOccursInItself{} -> typeError . GenericError . show =<< fsep [ text ("Refuse to construct infinite term by instantiating " ++ prettyShow m ++ " to") , prettyTCM =<< instantiateFull v ] MetaCannotDependOn _ _ i -> ifM (isSortMeta m `and2M` (not <$> hasUniversePolymorphism)) ( typeError . GenericError . show =<< fsep [ text ("Cannot instantiate the metavariable " ++ prettyShow m ++ " to") , prettyTCM v , "since universe polymorphism is disabled" ] ) {- else -} ( typeError . GenericError . show =<< fsep [ text ("Cannot instantiate the metavariable " ++ prettyShow m ++ " to solution") , prettyTCM v , "since it contains the variable" , enterClosure cl $ \_ -> prettyTCM (Var i []) , text $ "which is not in scope of the metavariable or irrelevant in the metavariable but relevant in the solution" ] ) MetaIrrelevantSolution _ _ -> typeError . GenericError . show =<< fsep [ text ("Cannot instantiate the metavariable " ++ prettyShow m ++ " to solution") , prettyTCM v , "since (part of) the solution was created in an irrelevant context." ] _ -> throwError err _ -> throwError err instance Occurs Term where occurs red ctx m xs v = do v <- unfold red v -- occurs' ctx $ ignoreBlocking v -- fails test/succeed/DontPruneBlocked case v of -- Don't fail on blocked terms or metas NotBlocked _ v -> occurs' ctx v -- Blocked _ v@MetaV{} -> occurs' ctx v -- does not help with issue 856 Blocked _ v -> occurs' Flex v where occurs' ctx v = do reportSDoc "tc.meta.occurs" 45 $ text ("occursCheck " ++ prettyShow m ++ " (" ++ show ctx ++ ") of ") <+> prettyTCM v reportSDoc "tc.meta.occurs" 70 $ nest 2 $ text $ show v case v of Var i es -> do if (i `allowedVar` xs) then Var i <$> occ (weakly ctx) es else do -- if the offending variable is of singleton type, -- eta-expand it away reportSDoc "tc.meta.occurs" 35 $ "offending variable: " <+> prettyTCM (var i) t <- typeOfBV i reportSDoc "tc.meta.occurs" 35 $ nest 2 $ "of type " <+> prettyTCM t isST <- isSingletonType t reportSDoc "tc.meta.occurs" 35 $ nest 2 $ "(after singleton test)" case isST of -- cannot decide, blocked by meta-var Left mid -> patternViolation' 70 $ "Disallowed var " ++ show i ++ " not obviously singleton" -- not a singleton type Right Nothing -> -- abort Rigid turns this error into PatternErr abort (strongly ctx) $ MetaCannotDependOn m (takeRelevant xs) i -- is a singleton type with unique inhabitant sv Right (Just sv) -> return $ sv `applyE` es Lam h f -> Lam h <$> occ ctx f Level l -> Level <$> occ ctx l Lit l -> return v Dummy{} -> return v DontCare v -> if ctx == Irrel then dontCare <$> occurs red ctx m xs v else abort (strongly ctx) $ MetaIrrelevantSolution m v Def d es -> do drel <- relOfConst d unless (usableRelevance drel || ctx == Irrel) $ do reportSDoc "tc.meta.occurs" 35 $ text ("relevance of definition: " ++ show drel) abort ctx $ MetaIrrelevantSolution m $ Def d [] Def d <$> occDef d ctx es Con c ci vs -> Con c ci <$> occ ctx vs -- if strongly rigid, remain so Pi a b -> uncurry Pi <$> occ ctx (a,b) Sort s -> Sort <$> occurs red ctx m (goNonStrict xs) s MetaV m' es -> do -- Check for loop -- don't fail hard on this, since we might still be on the top-level -- after some killing (Issue 442) -- -- Andreas, 2013-02-18 Issue 795 demonstrates that a recursive -- occurrence of a meta could be solved by the identity. -- ? (Q A) = Q (? A) -- So, do not throw an error. -- I guess the error was there from times when occurrence check -- was done after the "lhs=linear variables" check, but now -- occurrence check comes first. -- WAS: -- when (m == m') $ if ctx == Top then patternViolation else -- abort ctx $ MetaOccursInItself m' when (m == m') $ patternViolation' 50 $ "occursCheck failed: Found " ++ prettyShow m -- The arguments of a meta are in a flexible position (MetaV m' <$> occurs red Flex m xs es) `catchError` \err -> do reportSDoc "tc.meta.kill" 25 $ vcat [ text $ "error during flexible occurs check, we are " ++ show ctx , text $ show err ] case err of -- On pattern violations try to remove offending -- flexible occurrences (if not already in a flexible context) PatternErr{} | ctx /= Flex -> do reportSLn "tc.meta.kill" 20 $ "oops, pattern violation for " ++ prettyShow m' -- Andreas, 2014-03-02, see issue 1070: -- Do not prune when meta is projected! caseMaybe (allApplyElims es) (throwError err) $ \ vs -> do killResult <- prune m' vs (takeAll xs) if (killResult == PrunedEverything) -- after successful pruning, restart occurs check then occurs red ctx m xs =<< instantiate (MetaV m' es) else throwError err _ -> throwError err where occ ctx v = occurs red ctx m xs v -- a data or record type constructor propagates strong occurrences -- since e.g. x = List x is unsolvable occDef d ctx vs = do metaOccurs m d ifM (isJust <$> isDataOrRecordType d) {-then-} (occ ctx vs) {-else-} (occ (defArgs red ctx) vs) metaOccurs m v = do v <- instantiate v case v of Var i vs -> metaOccurs m vs Lam h f -> metaOccurs m f Level l -> metaOccurs m l Lit l -> return () Dummy{} -> return () DontCare v -> metaOccurs m v Def d vs -> metaOccurs m d >> metaOccurs m vs Con c _ vs -> metaOccurs m vs Pi a b -> metaOccurs m (a,b) Sort s -> metaOccurs m s MetaV m' vs | m == m' -> patternViolation' 50 $ "Found occurrence of " ++ prettyShow m | otherwise -> metaOccurs m vs instance Occurs QName where occurs red ctx m xs d = __IMPOSSIBLE__ metaOccurs m d = whenM (defNeedsChecking d) $ do tallyDef d reportSLn "tc.meta.occurs" 30 $ "Checking for occurrences in " ++ show d metaOccursQName m d metaOccursQName :: MetaId -> QName -> TCM () metaOccursQName m x = metaOccurs m . theDef =<< do ignoreAbstractMode $ getConstInfo x -- Andreas, 2019-05-03, issue #3742: -- ignoreAbstractMode necessary, as abstract -- constructors are also called up. instance Occurs Defn where occurs red ctx m xs def = __IMPOSSIBLE__ metaOccurs m Axiom{} = return () metaOccurs m DataOrRecSig{} = return () metaOccurs m Function{ funClauses = cls } = metaOccurs m cls -- since a datatype is isomorphic to the sum of its constructor types -- we check the constructor types metaOccurs m Datatype{ dataCons = cs } = mapM_ (metaOccursQName m) cs metaOccurs m Record{ recConHead = c } = metaOccursQName m $ conName c metaOccurs m Constructor{} = return () metaOccurs m Primitive{} = return () metaOccurs m AbstractDefn{} = __IMPOSSIBLE__ metaOccurs m GeneralizableVar{} = __IMPOSSIBLE__ instance Occurs Clause where occurs red ctx m xs cl = __IMPOSSIBLE__ metaOccurs m = metaOccurs m . clauseBody instance Occurs Level where occurs red ctx m xs (Max as) = Max <$> occurs red ctx m xs as metaOccurs m (Max as) = metaOccurs m as instance Occurs PlusLevel where occurs red ctx m xs l@ClosedLevel{} = return l occurs red ctx m xs (Plus n l) = Plus n <$> occurs red ctx m xs l metaOccurs m ClosedLevel{} = return () metaOccurs m (Plus n l) = metaOccurs m l instance Occurs LevelAtom where occurs red ctx m xs l = do l <- case red of YesUnfold -> reduce l NoUnfold -> instantiate l case l of MetaLevel m' args -> do MetaV m' args <- occurs red ctx m xs (MetaV m' args) return $ MetaLevel m' args NeutralLevel r v -> NeutralLevel r <$> occurs red ctx m xs v BlockedLevel m' v -> BlockedLevel m' <$> occurs red Flex m xs v UnreducedLevel v -> UnreducedLevel <$> occurs red ctx m xs v metaOccurs m l = do l <- instantiate l case l of MetaLevel m' args -> metaOccurs m $ MetaV m' args NeutralLevel _ v -> metaOccurs m v BlockedLevel _ v -> metaOccurs m v UnreducedLevel v -> metaOccurs m v instance Occurs Type where occurs red ctx m xs (El s v) = uncurry El <$> occurs red ctx m xs (s,v) metaOccurs m (El s v) = metaOccurs m (s,v) instance Occurs Sort where occurs red ctx m xs s = do s' <- case red of YesUnfold -> reduce s NoUnfold -> instantiate s case s' of PiSort s1 s2 -> uncurry PiSort <$> occurs red (weakly ctx) m xs (s1,s2) Type a -> Type <$> occurs red ctx m xs a Prop a -> Prop <$> occurs red ctx m xs a Inf -> return s' SizeUniv -> return s' UnivSort s -> UnivSort <$> occurs red (weakly ctx) m xs s MetaS x es -> do MetaV x es <- occurs red ctx m xs (MetaV x es) return $ MetaS x es DefS x es -> do Def x es <- occurs red ctx m xs (Def x es) return $ DefS x es DummyS{} -> return s metaOccurs m s = do s <- instantiate s case s of PiSort s1 s2 -> metaOccurs m (s1,s2) Type a -> metaOccurs m a Prop a -> metaOccurs m a Inf -> return () SizeUniv -> return () UnivSort s -> metaOccurs m s MetaS x es -> metaOccurs m $ MetaV x es DefS d es -> metaOccurs m $ Def d es DummyS{} -> return () instance Occurs a => Occurs (Elim' a) where occurs red ctx m xs e@(Proj _ f) = do frel <- relOfConst f unless (usableRelevance frel || ctx == Irrel) $ do reportSDoc "tc.meta.occurs" 35 $ text ("relevance of projection: " ++ show frel) abort ctx $ MetaIrrelevantSolution m $ Def f [] return e occurs red ctx m xs (Apply a) = Apply <$> occurs red ctx m xs a occurs red ctx m xs (IApply x y a) = IApply <$> occurs red ctx m xs x <*> occurs red ctx m xs y <*> occurs red ctx m xs a metaOccurs m (Proj{} ) = return () metaOccurs m (Apply a) = metaOccurs m a metaOccurs m (IApply x y a) = metaOccurs m (x,(y,a)) instance (Occurs a, Subst t a) => Occurs (Abs a) where occurs red ctx m xs b@(Abs s x) = Abs s <$> underAbstraction_ b (occurs red ctx m (liftUnderAbs xs)) occurs red ctx m xs b@(NoAbs s x) = NoAbs s <$> occurs red ctx m xs x metaOccurs m (Abs s x) = metaOccurs m x metaOccurs m (NoAbs s x) = metaOccurs m x instance Occurs a => Occurs (Arg a) where occurs red ctx m xs (Arg info x) | isIrrelevant info = Arg info <$> occurs red Irrel m (goIrrelevant xs) x occurs red ctx m xs (Arg info x) | isNonStrict info = Arg info <$> occurs red ctx m (goNonStrict xs) x occurs red ctx m xs (Arg info x) = Arg info <$> occurs red ctx m xs x metaOccurs m a = metaOccurs m (unArg a) instance Occurs a => Occurs (Dom a) where occurs red ctx m xs = traverse $ occurs red ctx m xs metaOccurs m = metaOccurs m . unDom instance (Occurs a, Occurs b) => Occurs (a,b) where occurs red ctx m xs (x,y) = (,) <$> occurs red ctx m xs x <*> occurs red ctx m xs y metaOccurs m (x,y) = metaOccurs m x >> metaOccurs m y instance Occurs a => Occurs [a] where occurs red ctx m xs ys = mapM (occurs red ctx m xs) ys metaOccurs m ys = mapM_ (metaOccurs m) ys instance Occurs a => Occurs (Maybe a) where occurs red ctx m mx my = traverse (occurs red ctx m mx) my metaOccurs m = maybe (return ()) (metaOccurs m) -- * Getting rid of flexible occurrences -- | @prune m' vs xs@ attempts to remove all arguments from @vs@ whose -- free variables are not contained in @xs@. -- If successful, @m'@ is solved by the new, pruned meta variable and we -- return @True@ else @False@. -- -- Issue 1147: -- If any of the meta args @vs@ is matchable, e.g., is a constructor term, -- we cannot prune, because the offending variables could be removed by -- reduction for a suitable instantiation of the meta variable. prune :: MetaId -> Args -> [Nat] -> TCM PruneResult prune m' vs xs = do caseEitherM (runExceptT $ mapM (hasBadRigid xs) $ map unArg vs) (const $ return PrunedNothing) $ \ kills -> do reportSDoc "tc.meta.kill" 10 $ vcat [ "attempting kills" , nest 2 $ vcat [ "m' =" <+> pretty m' , "xs =" <+> prettyList (map (prettyTCM . var) xs) , "vs =" <+> prettyList (map prettyTCM vs) , "kills =" <+> text (show kills) ] ] killArgs kills m' -- | @hasBadRigid xs v = Just True@ iff one of the rigid variables in @v@ is not in @xs@. -- Actually we can only prune if a bad variable is in the head. See issue 458. -- Or in a non-eliminateable position (see succeed/PruningNonMillerPattern). -- -- @hasBadRigid xs v = Nothing@ means that -- we cannot prune at all as one of the meta args is matchable. -- (See issue 1147.) hasBadRigid :: [Nat] -> Term -> ExceptT () TCM Bool hasBadRigid xs t = do -- We fail if we encounter a matchable argument. let failure = throwError () tb <- liftTCM $ reduceB t let t = ignoreBlocking tb case t of Var x _ -> return $ notElem x xs -- Issue 1153: A lambda has to be considered matchable. -- Lam _ v -> hasBadRigid (0 : map (+1) xs) (absBody v) Lam _ v -> failure DontCare v -> hasBadRigid xs v -- The following types of arguments cannot be eliminated by a pattern -- match: data, record, Pi, levels, sorts -- Thus, their offending rigid variables are bad. v@(Def f es) -> ifNotM (isNeutral tb f es) failure $ {- else -} do es `rigidVarsNotContainedIn` xs -- Andreas, 2012-05-03: There is room for further improvement. -- We could also consider a defined f which is not blocked by a meta. Pi a b -> (a,b) `rigidVarsNotContainedIn` xs Level v -> v `rigidVarsNotContainedIn` xs Sort s -> s `rigidVarsNotContainedIn` xs -- Since constructors can be eliminated by pattern-matching, -- offending variables under a constructor could be removed by -- the right instantiation of the meta variable. -- Thus, they are not rigid. Con c _ es | Just args <- allApplyElims es -> do ifM (liftTCM $ isEtaCon (conName c)) -- in case of a record con, we can in principle prune -- (but not this argument; the meta could become a projection!) (and <$> mapM (hasBadRigid xs . unArg) args) -- not andM, we need to force the exceptions! failure Con c _ es | otherwise -> failure Lit{} -> failure -- matchable MetaV{} -> failure -- potentially matchable Dummy{} -> return False -- | Check whether a term @Def f es@ is finally stuck. -- Currently, we give only a crude approximation. isNeutral :: MonadTCM tcm => Blocked t -> QName -> Elims -> tcm Bool isNeutral b f es = liftTCM $ do let yes = return True no = return False def <- getConstInfo f if defMatchable def then no else do case theDef def of AbstractDefn{} -> yes Axiom{} -> yes Datatype{} -> yes Record{} -> yes Function{} -> case b of NotBlocked StuckOn{} _ -> yes NotBlocked AbsurdMatch _ -> yes _ -> no GeneralizableVar{} -> __IMPOSSIBLE__ _ -> no -- | Check whether any of the variables (given as de Bruijn indices) -- occurs *definitely* in the term in a rigid position. -- Reduces the term successively to remove variables in dead subterms. -- This fixes issue 1386. rigidVarsNotContainedIn :: (MonadTCM tcm, FoldRigid a) => a -> [Nat] -> tcm Bool rigidVarsNotContainedIn v is = liftTCM $ do n0 <- getContextSize let -- allowed variables as de Bruijn levels levels = Set.fromList $ map (n0-1 -) is -- test if index is forbidden by converting it to level test i = do n <- getContextSize -- get de Bruijn level for i let l = n-1 - i -- If l >= n0 then it is a bound variable and can be -- ignored. Otherwise, it has to be in the allowed levels. forbidden = l < n0 && not (l `Set.member` levels) when forbidden $ reportSLn "tc.meta.kill" 20 $ "found forbidden de Bruijn level " ++ show l return $ Any forbidden getAny <$> foldRigid test v -- | Collect the *definitely* rigid variables in a monoid. -- We need to successively reduce the expression to do this. class FoldRigid a where -- foldRigid :: (MonadTCM tcm, Monoid (tcm m)) => (Nat -> tcm m) -> a -> tcm m foldRigid :: (Monoid (TCM m)) => (Nat -> TCM m) -> a -> TCM m instance FoldRigid Term where foldRigid f t = do b <- liftTCM $ reduceB t case ignoreBlocking b of -- Upon entry, we are in rigid position, thus, -- bound variables are rigid ones. Var i es -> f i `mappend` fold es Lam _ t -> fold t Lit{} -> mempty Def _ es -> case b of -- If the definition is blocked by a meta, its arguments -- may be in flexible positions. Blocked{} -> mempty -- If the definition is incomplete, arguments might disappear -- by reductions that come with more clauses, thus, these -- arguments are not rigid. NotBlocked MissingClauses _ -> mempty -- _ -> mempty -- breaks: ImproveInertRHS, Issue442, PruneRecord, PruningNonMillerPattern _ -> fold es Con _ _ ts -> fold ts Pi a b -> fold (a,b) Sort s -> fold s Level l -> fold l MetaV{} -> mempty DontCare{} -> mempty Dummy{} -> mempty where fold = foldRigid f instance FoldRigid Type where foldRigid f (El s t) = foldRigid f (s,t) instance FoldRigid Sort where foldRigid f s = case s of Type l -> fold l Prop l -> fold l Inf -> mempty SizeUniv -> mempty PiSort s1 s2 -> mempty UnivSort s -> fold s MetaS{} -> mempty DefS{} -> mempty DummyS{} -> mempty where fold = foldRigid f instance FoldRigid Level where foldRigid f (Max ls) = foldRigid f ls instance FoldRigid PlusLevel where foldRigid f ClosedLevel{} = mempty foldRigid f (Plus _ l) = foldRigid f l instance FoldRigid LevelAtom where foldRigid f l = case l of MetaLevel{} -> mempty NeutralLevel MissingClauses _ -> mempty NeutralLevel _ l -> fold l BlockedLevel _ l -> fold l UnreducedLevel l -> fold l where fold = foldRigid f instance (Subst t a, FoldRigid a) => FoldRigid (Abs a) where foldRigid f b = underAbstraction_ b $ foldRigid f instance FoldRigid a => FoldRigid (Arg a) where foldRigid f a = case getRelevance a of -- Irrelevant arguments are definitionally equal to -- values, so the variables there are not considered -- "definitely rigid". Irrelevant -> mempty _ -> foldRigid f $ unArg a instance FoldRigid a => FoldRigid (Dom a) where foldRigid f dom = foldRigid f $ unDom dom instance FoldRigid a => FoldRigid (Elim' a) where foldRigid f (Apply a) = foldRigid f a foldRigid f (IApply x y a) = foldRigid f (x,(y,a)) foldRigid f Proj{} = mempty instance FoldRigid a => FoldRigid [a] where foldRigid f = foldMap $ foldRigid f instance (FoldRigid a, FoldRigid b) => FoldRigid (a,b) where foldRigid f (a,b) = foldRigid f a `mappend` foldRigid f b data PruneResult = NothingToPrune -- ^ the kill list is empty or only @False@s | PrunedNothing -- ^ there is no possible kill (because of type dep.) | PrunedSomething -- ^ managed to kill some args in the list | PrunedEverything -- ^ all prescribed kills where performed deriving (Eq, Show) -- | @killArgs [k1,...,kn] X@ prunes argument @i@ from metavar @X@ if @ki==True@. -- Pruning is carried out whenever > 0 arguments can be pruned. killArgs :: [Bool] -> MetaId -> TCM PruneResult killArgs kills _ | not (or kills) = return NothingToPrune -- nothing to kill killArgs kills m = do mv <- lookupMeta m allowAssign <- asksTC envAssignMetas if mvFrozen mv == Frozen || not allowAssign then return PrunedNothing else do -- Andreas 2011-04-26, we allow pruning in MetaV and MetaS let a = jMetaType $ mvJudgement mv TelV tel b <- telView' <$> instantiateFull a let args = zip (telToList tel) (kills ++ repeat False) (kills', a') <- killedType args b dbg kills' a a' -- If there is any prunable argument, perform the pruning if not (any unArg kills') then return PrunedNothing else do performKill kills' m a' -- Only successful if all occurrences were killed -- Andreas, 2011-05-09 more precisely, check that at least -- the in 'kills' prescribed kills were carried out return $ if (and $ zipWith implies kills $ map unArg kills') then PrunedEverything else PrunedSomething where implies :: Bool -> Bool -> Bool implies False _ = True implies True x = x dbg kills' a a' = reportSDoc "tc.meta.kill" 10 $ vcat [ "after kill analysis" , nest 2 $ vcat [ "metavar =" <+> prettyTCM m , "kills =" <+> text (show kills) , "kills' =" <+> text (show kills') , "oldType =" <+> prettyTCM a , "newType =" <+> prettyTCM a' ] ] -- | @killedType [((x1,a1),k1)..((xn,an),kn)] b = ([k'1..k'n],t')@ -- (ignoring @Dom@). Let @t' = (xs:as) -> b@. -- Invariant: @k'i == True@ iff @ki == True@ and pruning the @i@th argument from -- type @b@ is possible without creating unbound variables. -- @t'@ is type @t@ after pruning all @k'i==True@. killedType :: [(Dom (ArgName, Type), Bool)] -> Type -> TCM ([Arg Bool], Type) killedType args b = do -- Turn list of bools into an IntSet containing the variables we want to kill -- (indices relative to b). let tokill = IntSet.fromList [ i | ((_, True), i) <- zip (reverse args) [0..] ] -- First, check the free variables of b to see if they prevent any kills. (tokill, b) <- reallyNotFreeIn tokill b -- Then recurse over the telescope (right-to-left), building up the final type. (killed, b) <- go (reverse $ map fst args) tokill b -- Turn the IntSet of killed variables into the list of Arg Bool's to return. let kills = [ Arg (getArgInfo dom) (IntSet.member i killed) | (i, (dom, _)) <- reverse $ zip [0..] $ reverse args ] return (kills, b) where down = IntSet.map pred up = IntSet.map succ -- go Δ xs B -- Invariants: -- - Δ ⊢ B -- - Δ is represented as a list in right-to-left order -- - xs are deBruijn indices into Δ -- - xs ∩ FV(B) = Ø -- Result: (ys, Δ' → B') -- where Δ' ⊆ Δ (possibly reduced to remove dependencies, see #3177) -- ys ⊆ xs are the variables that were dropped from Δ -- B' = strengthen ys B go :: [Dom (ArgName, Type)] -> IntSet -> Type -> TCM (IntSet, Type) go [] xs b | IntSet.null xs = return (xs, b) | otherwise = __IMPOSSIBLE__ go (arg : args) xs b -- go (Δ (x : A)) xs B, (x = deBruijn index 0) | IntSet.member 0 xs = do -- Case x ∈ xs. We know x ∉ FV(B), so we can safely drop x from the -- telescope. Drop x from xs (and shift indices) and recurse with -- `strengthen x B`. let ys = down (IntSet.delete 0 xs) (ys, b) <- go args ys $ strengthen __IMPOSSIBLE__ b -- We need to return a set of killed variables relative to Δ (x : A), so -- shift ys and add x back in. return (IntSet.insert 0 $ up ys, b) | otherwise = do -- Case x ∉ xs. We either can't or don't want to get rid of x. In -- this case we have to check A for potential dependencies preventing -- us from killing variables in xs. let xs' = down xs -- Shift to make relative to Δ ⊢ A (name, a) = unDom arg (ys, a) <- reallyNotFreeIn xs' a -- Recurse on Δ, ys, and (x : A') → B, where A reduces to A' and ys ⊆ xs' -- not free in A'. We already know ys not free in B. (zs, b) <- go args ys (mkPi ((name, a) <$ arg) b) -- Shift back up to make it relative to Δ (x : A) again. return (up zs, b) reallyNotFreeIn :: IntSet -> Type -> TCM (IntSet, Type) reallyNotFreeIn xs a | IntSet.null xs = return (xs, a) -- Shortcut reallyNotFreeIn xs a = do let fvs = freeVars a anywhere = allVars fvs rigid = IntSet.unions [stronglyRigidVars fvs, unguardedVars fvs] nonrigid = IntSet.difference anywhere rigid hasNo = IntSet.null . IntSet.intersection xs if | hasNo nonrigid -> -- No non-rigid occurrences. We can't do anything about the rigid -- occurrences so drop those and leave `a` untouched. return (IntSet.difference xs rigid, a) | otherwise -> do -- If there are non-rigid occurrences we need to reduce a to see if -- we can get rid of them (#3177). (fvs , a) <- forceNotFree (IntSet.difference xs rigid) a let xs = IntMap.keysSet $ IntMap.filter (== NotFree) fvs return (xs , a) -- | Instantiate a meta variable with a new one that only takes -- the arguments which are not pruneable. performKill :: [Arg Bool] -- ^ Arguments to old meta var in left to right order -- with @Bool@ indicating whether they can be pruned. -> MetaId -- ^ The old meta var to receive pruning. -> Type -- ^ The pruned type of the new meta var. -> TCM () performKill kills m a = do mv <- lookupMeta m when (mvFrozen mv == Frozen) __IMPOSSIBLE__ -- Arity of the old meta. let n = size kills -- The permutation of the new meta picks the arguments -- which are not pruned in left to right order -- (de Bruijn level order). let perm = Perm n [ i | (i, Arg _ False) <- zip [0..] kills ] judg = case mvJudgement mv of HasType{} -> HasType __IMPOSSIBLE__ a IsSort{} -> IsSort __IMPOSSIBLE__ a m' <- newMeta Instantiable (mvInfo mv) (mvPriority mv) perm judg -- Andreas, 2010-10-15 eta expand new meta variable if necessary etaExpandMetaSafe m' let -- Arguments to new meta (de Bruijn indices) -- in left to right order. vars = [ Arg info (var i) | (i, Arg info False) <- zip (downFrom n) kills ] u = MetaV m' $ map Apply vars -- Arguments to the old meta (just arg infos and name hints) -- in left to right order. tel = map ("v" <$) kills dbg m' u assignTerm m tel u -- m tel := u where dbg m' u = reportSDoc "tc.meta.kill" 10 $ vcat [ "actual killing" , nest 2 $ vcat [ "new meta:" <+> pretty m' , "kills :" <+> text (show kills) , "inst :" <+> pretty m <+> ":=" <+> prettyTCM u ] ] Agda-2.6.0.1/src/full/Agda/TypeChecking/MetaVars/Mention.hs0000644000000000000000000001044013466402171021334 0ustar0000000000000000 module Agda.TypeChecking.MetaVars.Mention where import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad class MentionsMeta t where mentionsMeta :: MetaId -> t -> Bool instance MentionsMeta Term where mentionsMeta x v = case v of Var _ args -> mm args Lam _ b -> mm b Lit{} -> False Def _ args -> mm args Con _ _ args -> mm args Pi a b -> mm (a, b) Sort s -> mm s Level l -> mm l Dummy{} -> False DontCare v -> False -- we don't have to look inside don't cares when deciding to wake constraints MetaV y args -> x == y || mm args -- TODO: we really only have to look one level deep at meta args where mm v = mentionsMeta x v instance MentionsMeta Level where mentionsMeta x (Max as) = mentionsMeta x as instance MentionsMeta PlusLevel where mentionsMeta x ClosedLevel{} = False mentionsMeta x (Plus _ a) = mentionsMeta x a instance MentionsMeta LevelAtom where mentionsMeta x l = case l of MetaLevel m vs -> x == m || mentionsMeta x vs BlockedLevel m _ -> x == m -- if it's blocked on a different meta it doesn't matter if it mentions the meta somewhere else UnreducedLevel l -> mentionsMeta x l NeutralLevel _ l -> mentionsMeta x l instance MentionsMeta Type where mentionsMeta x (El s t) = mentionsMeta x (s, t) instance MentionsMeta Sort where mentionsMeta x s = case s of Type l -> mentionsMeta x l Prop l -> mentionsMeta x l Inf -> False SizeUniv -> False PiSort s1 s2 -> mentionsMeta x (s1, s2) UnivSort s -> mentionsMeta x s MetaS m es -> x == m || mentionsMeta x es DefS d es -> mentionsMeta x es DummyS{} -> False instance MentionsMeta t => MentionsMeta (Abs t) where mentionsMeta x = mentionsMeta x . unAbs instance MentionsMeta t => MentionsMeta (Arg t) where mentionsMeta x a | isIrrelevant a = False -- ^ we don't have to look inside irrelevant arguments when deciding to wake constraints mentionsMeta x a = mentionsMeta x (unArg a) instance MentionsMeta t => MentionsMeta (Dom t) where mentionsMeta x = mentionsMeta x . unDom instance MentionsMeta t => MentionsMeta [t] where mentionsMeta x = any (mentionsMeta x) instance MentionsMeta t => MentionsMeta (Maybe t) where mentionsMeta x = maybe False (mentionsMeta x) instance (MentionsMeta a, MentionsMeta b) => MentionsMeta (a, b) where mentionsMeta x (a, b) = mentionsMeta x a || mentionsMeta x b instance (MentionsMeta a, MentionsMeta b, MentionsMeta c) => MentionsMeta (a, b, c) where mentionsMeta x (a, b, c) = mentionsMeta x a || mentionsMeta x b || mentionsMeta x c instance MentionsMeta a => MentionsMeta (Closure a) where mentionsMeta x cl = mentionsMeta x (clValue cl) instance MentionsMeta Elim where mentionsMeta x Proj{} = False mentionsMeta x (Apply v) = mentionsMeta x v mentionsMeta x (IApply y0 y1 v) = mentionsMeta x (y0,y1,v) instance MentionsMeta a => MentionsMeta (Tele a) where mentionsMeta x EmptyTel = False mentionsMeta x (ExtendTel a b) = mentionsMeta x (a, b) instance MentionsMeta ProblemConstraint where mentionsMeta x = mentionsMeta x . theConstraint instance MentionsMeta Constraint where mentionsMeta x c = case c of ValueCmp _ t u v -> mm (t, u, v) ValueCmpOnFace _ p t u v -> mm ((p,t), u, v) ElimCmp _ _ t v as bs -> mm ((t, v), (as, bs)) LevelCmp _ u v -> mm (u, v) TypeCmp _ a b -> mm (a, b) TelCmp a b _ u v -> mm ((a, b), (u, v)) SortCmp _ a b -> mm (a, b) Guarded{} -> False -- This gets woken up when the problem it's guarded by is solved UnBlock _ -> True -- this might be a postponed typechecking -- problem and we don't have a handle on -- what metas it depends on FindInstance{} -> True -- this needs to be woken up for any meta IsEmpty r t -> mm t CheckSizeLtSat t -> mm t CheckFunDef{} -> True -- not sure what metas this depends on HasBiggerSort a -> mm a HasPTSRule a b -> mm (a, b) UnquoteTactic bl tac hole goal -> Just x == bl where mm v = mentionsMeta x v -- instance (Ord k, MentionsMeta e) => MentionsMeta (Map k e) where -- mentionsMeta = traverse mentionsMeta Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause/0000755000000000000000000000000013466402171020537 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause/Match.hs0000644000000000000000000002251613466402171022135 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.CompiledClause.Match where import Control.Monad.Reader (asks) import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import Agda.Syntax.Internal import Agda.Syntax.Common import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (getBuiltinName', builtinIZero, builtinIOne) import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad as RedM import Agda.TypeChecking.Substitute import Agda.Utils.Maybe #include "undefined.h" import Agda.Utils.Impossible matchCompiled :: CompiledClauses -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Args) Term) matchCompiled c args = do r <- matchCompiledE c $ map (fmap Apply) args case r of YesReduction simpl v -> return $ YesReduction simpl v NoReduction bes -> return $ NoReduction $ fmap (map (fromMaybe __IMPOSSIBLE__ . isApplyElim)) bes -- | @matchCompiledE c es@ takes a function given by case tree @c@ and -- and a spine @es@ and tries to apply the function to @es@. matchCompiledE :: CompiledClauses -> MaybeReducedElims -> ReduceM (Reduced (Blocked Elims) Term) matchCompiledE c args = match' [(c, args, id)] -- | A stack entry is a triple consisting of -- 1. the part of the case tree to continue matching, -- 2. the current argument vector, and -- 3. a patch function taking the current argument vector back -- to the original argument vector. type Frame = (CompiledClauses, MaybeReducedElims, Elims -> Elims) type Stack = [Frame] -- | @match'@ tries to solve the matching problems on the @Stack@. -- In each iteration, the top problem is removed and handled. -- -- If the top problem was a @Done@, we succeed. -- -- If the top problem was a @Case n@ and the @n@th argument of the problem -- is not a constructor or literal, we are stuck, thus, fail. -- -- If we have a branch for the constructor/literal, we put it on the stack -- to continue. -- If we do not have a branch, we fall through to the next problem, which -- should be the corresponding catch-all branch. -- -- An empty stack is an exception that can come only from an incomplete -- function definition. -- TODO: literal/constructor pattern conflict (for Nat) match' :: Stack -> ReduceM (Reduced (Blocked Elims) Term) match' ((c, es, patch) : stack) = do let no blocking es = return $ NoReduction $ blocking $ patch $ map ignoreReduced es yes t = flip YesReduction t <$> asksTC envSimplification do case c of -- impossible case Fail -> no (NotBlocked AbsurdMatch) es -- done matching Done xs t -- if the function was partially applied, return a lambda | m < n -> yes $ applySubst (toSubst es) $ foldr lam t (drop m xs) -- otherwise, just apply instantiation to body -- apply the result to any extra arguments | otherwise -> yes $ applySubst (toSubst es0) t `applyE` map ignoreReduced es1 where n = length xs m = length es -- at least the first @n@ elims must be @Apply@s, so we can -- turn them into a subsitution toSubst = parallelS . reverse . map (unArg . fromMaybe __IMPOSSIBLE__ . isApplyElim . ignoreReduced) (es0, es1) = splitAt n es lam x t = Lam (argInfo x) (Abs (unArg x) t) -- splitting on an eta-record constructor Case (Arg _ n) Branches{etaBranch = Just (c, cc), catchAllBranch = ca} -> case splitAt n es of (_, []) -> no (NotBlocked Underapplied) es (es0, MaybeRed _ e@(Apply (Arg _ v0)) : es1) -> let projs = [ MaybeRed NotReduced $ Apply $ Arg ai $ relToDontCare ai $ v0 `applyE` [Proj ProjSystem f] | Arg ai f <- fs ] catchAllFrame stack = maybe stack (\c -> (c, es, patch) : stack) ca in match' $ (content cc, es0 ++ projs ++ es1, patchEta) : catchAllFrame stack where fs = conFields c patchEta es = patch (es0 ++ [e] ++ es1) where (es0, es') = splitAt n es (_, es1) = splitAt (length fs) es' _ -> __IMPOSSIBLE__ -- splitting on the @n@th elimination Case (Arg _ n) bs -> do case splitAt n es of -- if the @n@th elimination is not supplied, no match (_, []) -> no (NotBlocked Underapplied) es -- if the @n@th elimination is @e0@ (es0, MaybeRed red e0 : es1) -> do -- get the reduced form of @e0@ eb :: Blocked Elim <- do case red of Reduced b -> return $ e0 <$ b NotReduced -> unfoldCorecursionE e0 let e = ignoreBlocking eb -- replace the @n@th argument by its reduced form es' = es0 ++ [MaybeRed (Reduced $ () <$ eb) e] ++ es1 -- if a catch-all clause exists, put it on the stack catchAllFrame stack = maybe stack (\c -> (c, es', patch) : stack) (catchAllBranch bs) -- If our argument is @Lit l@, we push @litFrame l@ onto the stack. litFrame l stack = case Map.lookup l (litBranches bs) of Nothing -> stack Just cc -> (cc, es0 ++ es1, patchLit) : stack -- If our argument (or its constructor form) is @Con c ci vs@ -- we push @conFrame c vs@ onto the stack. conFrame c ci vs stack = conFrame' (conName c) (Con c ci) vs stack conFrame' q f vs stack = case Map.lookup q (conBranches bs) of Nothing -> stack Just cc -> ( content cc , es0 ++ map (MaybeRed NotReduced) vs ++ es1 , patchCon f (length vs) ) : stack -- If our argument is @Proj p@, we push @projFrame p@ onto the stack. projFrame p stack = case Map.lookup p (conBranches bs) of Nothing -> stack Just cc -> (content cc, es0 ++ es1, patchLit) : stack -- The new patch function restores the @n@th argument to @v@: -- In case we matched a literal, just put @v@ back. patchLit es = patch (es0 ++ [e] ++ es1) where (es0, es1) = splitAt n es -- In case we matched constructor @c@ with @m@ arguments, -- contract these @m@ arguments @vs@ to @Con c ci vs@. -- patchCon c ci m es = patch (es0 ++ [Con c ci vs <$ e] ++ es2) patchCon f m es = patch (es0 ++ [f vs <$ e] ++ es2) where (es0, rest) = splitAt n es (es1, es2) = splitAt m rest vs = es1 -- zo <- do -- mi <- getBuiltinName' builtinIZero -- mo <- getBuiltinName' builtinIOne -- return $ Set.fromList $ catMaybes [mi,mo] fallThrough <- return $ fromMaybe False (fallThrough bs) && isJust (catchAllBranch bs) let isCon b = case ignoreBlocking b of Apply a | c@Con{} <- unArg a -> Just c _ -> Nothing -- Now do the matching on the @n@ths argument: id $ case eb of -- In case of a literal, try also its constructor form NotBlocked _ (Apply (Arg info v@(Lit l))) -> performedSimplification $ do cv <- constructorForm v let cFrame stack = case cv of Con c ci vs -> conFrame c ci vs stack _ -> stack match' $ litFrame l $ cFrame $ catchAllFrame stack NotBlocked _ (Apply (Arg info v@(Def q vs))) | Just{} <- Map.lookup q (conBranches bs) -> performedSimplification $ do match' $ conFrame' q (Def q) vs $ catchAllFrame $ stack -- In case of a constructor, push the conFrame b | Just (Con c ci vs) <- isCon b -> performedSimplification $ match' $ conFrame c ci vs $ catchAllFrame $ stack -- In case of a projection, push the projFrame NotBlocked _ (Proj _ p) -> performedSimplification $ match' $ projFrame p $ stack -- catchAllFrame $ stack -- Issue #1986: no catch-all for copattern matching! _ | fallThrough -> match' $ catchAllFrame $ stack Blocked x _ -> no (Blocked x) es' NotBlocked _ (Apply (Arg info (MetaV x _))) -> no (Blocked x) es' -- Otherwise, we are stuck. If we were stuck before, -- we keep the old reason, otherwise we give reason StuckOn here. NotBlocked blocked e -> no (NotBlocked $ stuckOn e blocked) es' -- If we reach the empty stack, then pattern matching was incomplete match' [] = {- new line here since __IMPOSSIBLE__ does not like the ' in match' -} caseMaybeM (asksTC envAppDef) __IMPOSSIBLE__ $ \ f -> do pds <- getPartialDefs if f `elem` pds then return (NoReduction $ NotBlocked MissingClauses []) else do traceSLn "impossible" 10 ("Incomplete pattern matching when applying " ++ show f) __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause/Compile.hs-boot0000644000000000000000000000045013466402171023423 0ustar0000000000000000module Agda.TypeChecking.CompiledClause.Compile where import Agda.Syntax.Internal import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Monad.Base compileClauses :: Maybe (QName, Type) -> [Clause] -> TCM (Maybe SplitTree, CompiledClauses) Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause/Compile.hs0000644000000000000000000003520413466402171022467 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.CompiledClause.Compile where import Prelude hiding (null) import Control.Applicative import Control.Arrow (first, second) import Control.Monad import Data.Maybe import Data.Monoid import qualified Data.Map as Map import Data.List (nubBy, findIndex) import Data.Function import qualified Data.IntSet as IntSet import Data.Traversable (traverse) import Debug.Trace import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Forcing import Agda.TypeChecking.Monad import Agda.TypeChecking.RecordPatterns import Agda.TypeChecking.Substitute import Agda.TypeChecking.Pretty import Agda.TypeChecking.Free import Agda.TypeChecking.Free.Precompute import Agda.TypeChecking.Reduce import Agda.Utils.Functor import Agda.Utils.Maybe import Agda.Utils.Null import Agda.Utils.List import qualified Agda.Utils.Pretty as P #include "undefined.h" import Agda.Utils.Impossible data RunRecordPatternTranslation = RunRecordPatternTranslation | DontRunRecordPatternTranslation deriving (Eq) compileClauses' :: RunRecordPatternTranslation -> [Clause] -> Maybe SplitTree -> TCM CompiledClauses compileClauses' recpat cs mSplitTree = do -- Apply forcing translation. This only shuffles the deBruijn variables -- so doesn't affect the right hand side. cs <- sequence [ forcingTranslation ps <&> \ qs -> c{ namedClausePats = qs } | c@Clause{ namedClausePats = ps } <- cs ] -- Throw away the unreachable clauses (#2723). let notUnreachable = (Just True /=) . clauseUnreachable cs <- map unBruijn <$> normaliseProjP (filter notUnreachable cs) let translate | recpat == RunRecordPatternTranslation = translateCompiledClauses | otherwise = return translate $ caseMaybe mSplitTree (compile cs) $ \splitTree -> compileWithSplitTree splitTree cs -- | Process function clauses into case tree. -- This involves: -- 1. Coverage checking, generating a split tree. -- 2. Translation of lhs record patterns into rhs uses of projection. -- Update the split tree. -- 3. Generating a case tree from the split tree. -- Phases 1. and 2. are skipped if @Nothing@. compileClauses :: Maybe (QName, Type) -- ^ Translate record patterns and coverage check with given type? -> [Clause] -> TCM (Maybe SplitTree, CompiledClauses) compileClauses mt cs = do -- Construct clauses with pattern variables bound in left-to-right order. -- Discard de Bruijn indices in patterns. case mt of Nothing -> (Nothing,) . compile . map unBruijn <$> normaliseProjP cs Just (q, t) -> do splitTree <- coverageCheck q t cs reportSDoc "tc.cc.tree" 20 $ vcat [ "split tree from coverage check " , return $ P.pretty splitTree ] -- The coverage checker might have added some clauses (#2288)! -- Throw away the unreachable clauses (#2723). let notUnreachable = (Just True /=) . clauseUnreachable cs <- normaliseProjP =<< instantiateFull =<< filter notUnreachable . defClauses <$> getConstInfo q let cls = map unBruijn cs reportSDoc "tc.cc" 30 $ sep $ do "clauses patterns before compilation" : do map (prettyTCM . map unArg . clPats) cls reportSDoc "tc.cc" 50 $ "clauses before compilation" pretty cs let cc = compileWithSplitTree splitTree cls reportSDoc "tc.cc" 20 $ sep [ "compiled clauses (still containing record splits)" , nest 2 $ return $ P.pretty cc ] cc <- translateCompiledClauses cc reportSDoc "tc.cc" 12 $ sep [ "compiled clauses" , nest 2 $ return $ P.pretty cc ] return (Just splitTree, fmap precomputeFreeVars_ cc) -- | Stripped-down version of 'Agda.Syntax.Internal.Clause' -- used in clause compiler. data Cl = Cl { clPats :: [Arg Pattern] -- ^ Pattern variables are considered in left-to-right order. , clBody :: Maybe Term } deriving (Show) instance P.Pretty Cl where pretty (Cl ps b) = P.prettyList ps P.<+> "->" P.<+> maybe "_|_" P.pretty b type Cls = [Cl] -- | Strip down a clause. Don't forget to apply the substitution to the dot -- patterns! unBruijn :: Clause -> Cl unBruijn c = Cl (applySubst sub $ (map . fmap) (fmap dbPatVarName . namedThing) $ namedClausePats c) (applySubst sub $ clauseBody c) where sub = renamingR $ fromMaybe __IMPOSSIBLE__ (clausePerm c) compileWithSplitTree :: SplitTree -> Cls -> CompiledClauses compileWithSplitTree t cs = case t of SplitAt i ts -> Case i $ compiles ts $ splitOn (length ts == 1) (unArg i) cs -- if there is just one case, we force expansion of catch-alls -- this is needed to generate a sound tree on which we can -- collapse record pattern splits SplittingDone n -> compile cs -- after end of split tree, continue with left-to-right strategy where compiles :: SplitTrees -> Case Cls -> Case CompiledClauses compiles ts br@Branches{ projPatterns = cop , conBranches = cons , etaBranch = Nothing , litBranches = lits , fallThrough = fT , catchAllBranch = catchAll } = br{ conBranches = updCons cons , etaBranch = Nothing , litBranches = updLits lits , fallThrough = fT , catchAllBranch = updCatchall catchAll } where updCons = Map.mapWithKey $ \ c cl -> caseMaybe (lookup (SplitCon c) ts) compile compileWithSplitTree <$> cl -- When the split tree is finished, we continue with @compile@. updLits = Map.mapWithKey $ \ l cl -> caseMaybe (lookup (SplitLit l) ts) compile compileWithSplitTree cl updCatchall = fmap $ caseMaybe (lookup SplitCatchall ts) compile compileWithSplitTree compiles _ Branches{etaBranch = Just{}} = __IMPOSSIBLE__ -- we haven't inserted eta matches yet compile :: Cls -> CompiledClauses compile [] = Fail compile cs = case nextSplit cs of Just (isRecP, n) -> Case n $ fmap compile $ splitOn isRecP (unArg n) cs Nothing -> case clBody c of -- It's possible to get more than one clause here due to -- catch-all expansion. Just t -> Done (map (fmap name) $ clPats c) t Nothing -> Fail where -- If there are more than one clauses, take the first one. c = headWithDefault __IMPOSSIBLE__ cs name (VarP _ x) = x name (DotP _ _) = underscore name ConP{} = __IMPOSSIBLE__ name DefP{} = __IMPOSSIBLE__ name LitP{} = __IMPOSSIBLE__ name ProjP{} = __IMPOSSIBLE__ name (IApplyP _ _ _ x) = x -- | Get the index of the next argument we need to split on. -- This the number of the first pattern that does a (non-lazy) match in the first clause. -- Or the first lazy match where all clauses agree on the constructor, if there are no -- non-lazy matches. nextSplit :: Cls -> Maybe (Bool, Arg Int) nextSplit [] = __IMPOSSIBLE__ nextSplit (Cl ps _ : cs) = findSplit nonLazy ps <|> findSplit allAgree ps where nonLazy _ (ConP _ cpi _) = not $ conPLazy cpi nonLazy _ _ = True findSplit okPat ps = headMaybe (catMaybes $ zipWith (\ (Arg ai p) n -> (, Arg ai n) <$> properSplit p <* guard (okPat n p)) ps [0..]) allAgree i (ConP c _ _) = all ((== Just (conName c)) . getCon . map unArg . drop i . clPats) cs allAgree _ _ = False getCon (ConP c _ _ : _) = Just $ conName c getCon _ = Nothing -- | Is is not a variable pattern? -- And if yes, is it a record pattern and/or a fallThrough one? properSplit :: Pattern' a -> Maybe Bool properSplit (ConP _ cpi _) = Just (Just PatORec == conPRecord cpi || conPFallThrough cpi) properSplit DefP{} = Just False properSplit LitP{} = Just False properSplit ProjP{} = Just False properSplit IApplyP{} = Nothing properSplit VarP{} = Nothing properSplit DotP{} = Nothing -- | Is this a variable pattern? -- -- Maintain invariant: @isVar = isNothing . properSplit@! isVar :: Pattern' a -> Bool isVar IApplyP{} = True isVar VarP{} = True isVar DotP{} = True isVar ConP{} = False isVar DefP{} = False isVar LitP{} = False isVar ProjP{} = False -- | @splitOn single n cs@ will force expansion of catch-alls -- if @single@. splitOn :: Bool -> Int -> Cls -> Case Cls splitOn single n cs = mconcat $ map (fmap (:[]) . splitC n) $ -- (\ cs -> trace ("splitting on " ++ show n ++ " after expandCatchAlls " ++ show single ++ ": " ++ prettyShow (P.prettyList cs)) cs) $ expandCatchAlls single n cs splitC :: Int -> Cl -> Case Cl splitC n (Cl ps b) = caseMaybe mp fallback $ \case ProjP _ d -> projCase d $ Cl (ps0 ++ ps1) b IApplyP{} -> fallback ConP c i qs -> (conCase (conName c) (conPFallThrough i) $ WithArity (length qs) $ Cl (ps0 ++ map (fmap namedThing) qs ++ ps1) b) { lazyMatch = conPLazy i } DefP o q qs -> (conCase q False $ WithArity (length qs) $ Cl (ps0 ++ map (fmap namedThing) qs ++ ps1) b) { lazyMatch = False } LitP l -> litCase l $ Cl (ps0 ++ ps1) b VarP{} -> fallback DotP{} -> fallback where (ps0, rest) = splitAt n ps mp = unArg <$> headMaybe rest ps1 = drop 1 rest fallback = catchAll $ Cl ps b -- | Expand catch-alls that appear before actual matches. -- -- Example: -- -- @ -- true y -- x false -- false y -- @ -- -- will expand the catch-all @x@ to @false@. -- -- Catch-alls need also to be expanded if -- they come before/after a record pattern, otherwise we get into -- trouble when we want to eliminate splits on records later. -- -- Another example (see Issue 1650): -- @ -- f (x, (y, z)) true = a -- f _ false = b -- @ -- Split tree: -- @ -- 0 (first argument of f) -- \- 1 (second component of the pair) -- \- 3 (last argument of f) -- \-- true -> a -- \- false -> b -- @ -- We would like to get the following case tree: -- @ -- case 0 of -- _,_ -> case 1 of -- _,_ -> case 3 of true -> a; false -> b -- _ -> case 3 of true -> a; false -> b -- _ -> case 3 of true -> a; false -> b -- @ -- -- Example from issue #2168: -- @ -- f x false = a -- f false = \ _ -> b -- f x true = c -- @ -- case tree: -- @ -- f x y = case y of -- true -> case x of -- true -> c -- false -> b -- false -> a -- @ -- -- Example from issue #3628: -- @ -- f i j k (i = i0)(k = i1) = base -- f i j k (j = i1) = base -- @ -- case tree: -- @ -- f i j k o = case i of -- i0 -> case k of -- i1 -> base -- _ -> case j of -- i1 -> base -- _ -> case j of -- i1 -> base -- @ expandCatchAlls :: Bool -> Int -> Cls -> Cls expandCatchAlls single n cs = -- Andreas, 2013-03-22 -- if there is a single case (such as for record splits) -- we force expansion if single then doExpand =<< cs else case cs of _ | all (isCatchAllNth . clPats) cs -> cs c@(Cl ps b) : cs | not (isCatchAllNth ps) -> c : expandCatchAlls False n cs | otherwise -> map (expand c) expansions ++ c : expandCatchAlls False n cs _ -> __IMPOSSIBLE__ where -- In case there is only one branch in the split tree, we expand all -- catch-alls for this position -- The @expansions@ are collected from all the clauses @cs@ then. -- Note: @expansions@ could be empty, so we keep the orignal clause. doExpand c@(Cl ps _) | exCatchAllNth ps = map (expand c) expansions ++ [c] | otherwise = [c] -- True if nth pattern is variable or there are less than n patterns. isCatchAllNth ps = all (isVar . unArg) $ take 1 $ drop n ps -- True if nth pattern exists and is variable. exCatchAllNth ps = any (isVar . unArg) $ take 1 $ drop n ps classify (LitP l) = Left l classify (ConP c _ _) = Right (Left c) classify (DefP _ q _) = Right (Right q) classify _ = __IMPOSSIBLE__ -- All non-catch-all patterns following this one (at position n). -- These are the cases the wildcard needs to be expanded into. expansions = nubBy ((==) `on` (classify . unArg . snd)) . mapMaybe (notVarNth . clPats) $ cs notVarNth :: [Arg Pattern] -> Maybe ([Arg Pattern] -- First @n@ patterns. , Arg Pattern) -- @n+1@st pattern, not a variable notVarNth ps = do let (ps1, ps2) = splitAt n ps p <- headMaybe ps2 guard $ not $ isVar $ unArg p return (ps1, p) expand cl (qs, q) = case unArg q of ConP c mt qs' -> Cl (ps0 ++ [q $> ConP c mt conPArgs] ++ ps1) (substBody n' m (Con c ci (map Apply conArgs)) b) where ci = fromConPatternInfo mt m = length qs' -- replace all direct subpatterns of q by _ -- TODO Andrea: might need these to sometimes be IApply? conPArgs = map (fmap ($> varP "_")) qs' conArgs = zipWith (\ q' i -> q' $> var i) qs' $ downFrom m LitP l -> Cl (ps0 ++ [q $> LitP l] ++ ps1) (substBody n' 0 (Lit l) b) DefP o d qs' -> Cl (ps0 ++ [q $> DefP o d conPArgs] ++ ps1) (substBody n' m (Def d (map Apply conArgs)) b) where m = length qs' -- replace all direct subpatterns of q by _ conPArgs = map (fmap ($> varP "_")) qs' conArgs = zipWith (\ q' i -> q' $> var i) qs' $ downFrom m _ -> __IMPOSSIBLE__ where -- Andreas, 2016-09-19 issue #2168 -- Due to varying function arity, some clauses might be eta-contracted. -- Thus, we eta-expand them. Cl ps b = ensureNPatterns (n + 1) (map getArgInfo $ qs ++ [q]) cl -- The following pattern match cannot fail (by construction of @ps@). (ps0, _:ps1) = splitAt n ps n' = countPatternVars ps1 -- | Make sure (by eta-expansion) that clause has arity at least @n@ -- where @n@ is also the length of the provided list. ensureNPatterns :: Int -> [ArgInfo] -> Cl -> Cl ensureNPatterns n ais0 cl@(Cl ps b) | m <= 0 = cl | otherwise = Cl (ps ++ ps') (raise m b `apply` args) where k = length ps ais = drop k ais0 -- m = Number of arguments to add m = n - k ps' = for ais $ \ ai -> Arg ai $ varP "_" args = zipWith (\ i ai -> Arg ai $ var i) (downFrom m) ais substBody :: (Subst t a) => Int -> Int -> t -> a -> a substBody n m v = applySubst $ liftS n $ v :# raiseS m instance PrecomputeFreeVars a => PrecomputeFreeVars (CompiledClauses' a) where Agda-2.6.0.1/src/full/Agda/TypeChecking/CompiledClause/Match.hs-boot0000644000000000000000000000057413466402171023076 0ustar0000000000000000 module Agda.TypeChecking.CompiledClause.Match where -- import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.CompiledClause matchCompiled :: CompiledClauses -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Args) Term) matchCompiledE :: CompiledClauses -> MaybeReducedElims -> ReduceM (Reduced (Blocked [Elim]) Term) Agda-2.6.0.1/src/full/Agda/TypeChecking/Telescope/0000755000000000000000000000000013466402171017571 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Telescope/Path.hs0000644000000000000000000000605613466402171021030 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Telescope.Path where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad (unless, guard) import Data.Foldable (forM_, find) import qualified Data.List as List import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Position import Agda.TypeChecking.Free import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | In an ambient context Γ, @telePiPath f Δ t bs@ builds a type that -- can be @telViewPathBoundaryP'ed@ into (TelV Δ t, bs'). -- Γ.Δ ⊢ t -- bs = [(i,u_i)] -- Δ = Δ0,(i : I),Δ1 -- ∀ b ∈ {0,1}. Γ.Δ0 | u_i .b : (telePiPath f Δ1 t bs)(i = b) -- Γ ⊢ telePiPath f Δ t bs telePiPath :: (Abs Type -> Abs Type) -> Telescope -> Type -> Boundary -> TCM Type telePiPath reAbs tel t bs = do pp <- primPathP io <- primIOne let argN = Arg defaultArgInfo argH = Arg $ setHiding Hidden defaultArgInfo getLevel :: Abs Type -> TCM Level getLevel b = do s <- reduce $ getSort <$> b case s of NoAbs _ (Type l) -> return l Abs n (Type l) | NoOccurrence <- occurrence 0 s -> return $ noabsApp __IMPOSSIBLE__ (Abs n l) _ -> typeError . GenericError . show =<< (text "The type is non-fibrant or its sort depends on an interval variable" <+> prettyTCM (unAbs b)) -- TODO better Type Error telePiPath :: [Int] -> Telescope -> TCM Type telePiPath [] EmptyTel = pure $ t telePiPath (x:xs) (ExtendTel a tel) = case List.find (\ (t,_) -> t == var x) bs of Just (_,u) -> do -- assume a = 𝕀 b <- b l <- getLevel b return $ El (Type l) $ pp `apply` [ argH (Level l) , argN (Lam defaultArgInfo (unEl <$> b)) , argN $ fst u , argN $ snd u ] Nothing -> do b <- b return $ El (piSort (getSort a) (getSort <$> b)) (Pi a (reAbs b)) where b = traverse (telePiPath xs) tel telePiPath _ EmptyTel = __IMPOSSIBLE__ telePiPath [] _ = __IMPOSSIBLE__ telePiPath (downFrom (size tel)) tel iApplyVars :: DeBruijn a => [NamedArg (Pattern' a)] -> [Int] iApplyVars ps = flip concatMap (map namedArg ps) $ \case IApplyP _ t u x -> [fromMaybe __IMPOSSIBLE__ (deBruijnView x)] VarP{} -> [] ProjP{}-> [] LitP{} -> [] DotP{} -> [] DefP _ _ ps -> iApplyVars ps ConP _ _ ps -> iApplyVars ps Agda-2.6.0.1/src/full/Agda/TypeChecking/Primitive/0000755000000000000000000000000013466402171017616 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Primitive/Cubical.hs0000644000000000000000000001072313466402171021517 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Primitive.Cubical where import Prelude hiding (null, (!!)) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Internal import Control.Monad import Control.Monad.Reader import Control.Monad.Trans ( lift ) import Agda.TypeChecking.Names import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Free import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import Agda.TypeChecking.Telescope import Agda.Utils.Except #include "undefined.h" import Agda.Utils.Impossible -- | Tries to @primTransp@ a whole telescope of arguments, following the rule for Σ types. -- If a type in the telescope does not support transp, @transpTel@ throws it as an exception. transpTel :: Abs Telescope -- Γ ⊢ i.Δ -> Term -- Γ ⊢ φ : F -- i.Δ const on φ -> Args -- Γ ⊢ δ : Δ[0] -> ExceptT (Closure (Abs Type)) TCM Args -- Γ ⊢ Δ[1] transpTel delta phi args = do tTransp <- liftTCM primTrans imin <- liftTCM primIMin imax <- liftTCM primIMax ineg <- liftTCM primINeg let noTranspError t = lift . throwError =<< liftTCM (buildClosure t) bapp :: (Applicative m, Subst t a) => m (Abs a) -> m t -> m a bapp t u = lazyAbsApp <$> t <*> u gTransp (Just l) t phi a = pure tTransp <#> l <@> (Lam defaultArgInfo . fmap unEl <$> t) <@> phi <@> a gTransp Nothing t phi a = do -- Γ ⊢ i.Ξ xi <- (open =<<) $ do bind "i" $ \ i -> do TelV xi _ <- (liftTCM . telView =<<) $ t `bapp` i return xi argnames <- do teleArgNames . unAbs <$> xi glamN argnames $ \ xi_args -> do b' <- bind "i" $ \ i -> do ti <- t `bapp` i xin <- bind "i" $ \ i -> xi `bapp` (pure ineg <@> i) xi_args <- xi_args ni <- pure ineg <@> i phi <- phi lift $ piApplyM ti =<< trFillTel xin phi xi_args ni axi <- do a <- a xif <- bind "i" $ \ i -> xi `bapp` (pure ineg <@> i) phi <- phi xi_args <- xi_args lift $ apply a <$> transpTel xif phi xi_args s <- reduce $ getSort (absBody b') case s of Type l -> do l <- open $ lam_i (Level l) b' <- open b' axi <- open axi gTransp (Just l) b' phi axi Inf -> case 0 `freeIn` (raise 1 b' `lazyAbsApp` var 0) of False -> return axi True -> noTranspError b' _ -> noTranspError b' lam_i = Lam defaultArgInfo . Abs "i" go :: Telescope -> Term -> Args -> ExceptT (Closure (Abs Type)) TCM Args go EmptyTel _ [] = return [] go (ExtendTel t delta) phi (a:args) = do -- Γ,i ⊢ t -- Γ,i ⊢ (x : t). delta -- Γ ⊢ a : t[0] s <- reduce $ getSort t -- Γ ⊢ b : t[1], Γ,i ⊢ b : t[i] (b,bf) <- runNamesT [] $ do l <- case s of Inf -> return Nothing Type l -> Just <$> open (lam_i (Level l)) _ -> noTranspError (Abs "i" (unDom t)) t <- open $ Abs "i" (unDom t) [phi,a] <- mapM open [phi, unArg a] b <- gTransp l t phi a bf <- bind "i" $ \ i -> do gTransp ((<$> l) $ \ l -> lam "j" $ \ j -> l <@> (pure imin <@> i <@> j)) (bind "j" $ \ j -> t `bapp` (pure imin <@> i <@> j)) (pure imax <@> (pure ineg <@> i) <@> phi) a return (b, absBody bf) (:) (b <$ a) <$> go (lazyAbsApp delta bf) phi args go (ExtendTel t delta) phi [] = __IMPOSSIBLE__ go EmptyTel _ (_:_) = __IMPOSSIBLE__ go (absBody delta) phi args -- | Like @transpTel@ but performing a transpFill. trFillTel :: Abs Telescope -- Γ ⊢ i.Δ -> Term -> Args -- Γ ⊢ δ : Δ[0] -> Term -- Γ ⊢ r : I -> ExceptT (Closure (Abs Type)) TCM Args -- Γ ⊢ Δ[r] trFillTel delta phi args r = do imin <- liftTCM primIMin imax <- liftTCM primIMax ineg <- liftTCM primINeg transpTel (Abs "j" $ raise 1 delta `lazyAbsApp` (imin `apply` (map argN [var 0, raise 1 r]))) (imax `apply` [argN $ ineg `apply` [argN r], argN phi]) args Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/0000755000000000000000000000000013466402171016740 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Def.hs0000644000000000000000000013411313466402171017775 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Def where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), mapM, null ) #else import Prelude hiding ( mapM, null ) #endif import Control.Arrow ((***),first,second) import Control.Monad.State hiding (forM, mapM) import Control.Monad.Reader hiding (forM, mapM) import Data.Function import qualified Data.List as List import Data.Maybe import Data.Traversable (Traversable, traverse, forM, mapM) import qualified Data.Map as Map import qualified Data.Set as Set import Data.Semigroup (Semigroup((<>))) import Agda.Interaction.Options import Agda.Syntax.Common import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete (exprFieldA) import Agda.Syntax.Position import Agda.Syntax.Abstract.Pattern as A import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Abstract.Views as A import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern as I import qualified Agda.Syntax.Info as Info import Agda.Syntax.Fixity import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Info import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Warnings ( warning ) import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Inlining import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Reduce import Agda.TypeChecking.Patterns.Abstract (expandPatternSynonyms) import Agda.TypeChecking.Pretty hiding ((<>)) import qualified Agda.TypeChecking.Pretty as Pr import Agda.TypeChecking.Substitute import Agda.TypeChecking.Free import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.With import Agda.TypeChecking.Telescope import Agda.TypeChecking.Injectivity import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.SizedTypes.Solve import Agda.TypeChecking.RecordPatterns import Agda.TypeChecking.Records import Agda.TypeChecking.CompiledClause (CompiledClauses'(..), hasProjectionPatterns) import Agda.TypeChecking.CompiledClause.Compile import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Rules.Term import Agda.TypeChecking.Rules.LHS ( checkLeftHandSide, LHSResult(..), bindAsPatterns ) import Agda.TypeChecking.Rules.LHS.Problem ( AsBinding(..) ) import {-# SOURCE #-} Agda.TypeChecking.Rules.Decl ( checkDecls ) import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe ( whenNothing ) import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty ( prettyShow ) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Definitions by pattern matching --------------------------------------------------------------------------- checkFunDef :: Delayed -> Info.DefInfo -> QName -> [A.Clause] -> TCM () checkFunDef delayed i name cs = do -- Get the type and relevance of the function t <- typeOfConst name info <- flip setRelevance defaultArgInfo <$> relOfConst name case isAlias cs t of Just (e, mc, x) -> traceCall (CheckFunDefCall (getRange i) name cs) $ do -- Andreas, 2012-11-22: if the alias is in an abstract block -- it has been frozen. We unfreeze it to enable type inference. -- See issue 729. whenM (isFrozen x) $ unfreezeMeta x checkAlias t info delayed i name e mc _ -> checkFunDef' t info delayed Nothing Nothing i name cs -- If it's a macro check that it ends in Term → TC ⊤ ismacro <- isMacro . theDef <$> getConstInfo name when (ismacro || Info.defMacro i == MacroDef) $ checkMacroType t `catchIlltypedPatternBlockedOnMeta` \ (err, x) -> do reportSDoc "tc.def" 20 $ vcat $ [ "checking function definition got stuck on meta: " <+> text (show x) ] addConstraint $ CheckFunDef delayed i name cs checkMacroType :: Type -> TCM () checkMacroType t = do t' <- normalise t TelV tel tr <- telView t' let telList = telToList tel resType = abstract (telFromList (drop (length telList - 1) telList)) tr expectedType <- el primAgdaTerm --> el (primAgdaTCM <#> primLevelZero <@> primUnit) equalType resType expectedType `catchError` \ _ -> typeError . GenericDocError =<< sep [ "Result type of a macro must be" , nest 2 $ prettyTCM expectedType ] -- | A single clause without arguments and without type signature is an alias. isAlias :: [A.Clause] -> Type -> Maybe (A.Expr, Maybe C.Expr, MetaId) isAlias cs t = case trivialClause cs of -- if we have just one clause without pattern matching and -- without a type signature, then infer, to allow -- "aliases" for things starting with hidden abstractions Just (e, mc) | Just x <- isMeta (unEl t) -> Just (e, mc, x) _ -> Nothing where isMeta (MetaV x _) = Just x isMeta _ = Nothing trivialClause [A.Clause (A.LHS i (A.LHSHead f [])) _ (A.RHS e mc) (A.WhereDecls _ []) _] = Just (e, mc) trivialClause _ = Nothing -- | Check a trivial definition of the form @f = e@ checkAlias :: Type -> ArgInfo -> Delayed -> Info.DefInfo -> QName -> A.Expr -> Maybe C.Expr -> TCM () checkAlias t ai delayed i name e mc = atClause name 0 (A.RHS e mc) $ do reportSDoc "tc.def.alias" 10 $ "checkAlias" <+> vcat [ text (prettyShow name) <+> colon <+> prettyTCM t , text (prettyShow name) <+> equals <+> prettyTCM e ] -- Infer the type of the rhs. -- Andreas, 2018-06-09, issue #2170. -- The context will only be resurrected if we have --irrelevant-projections. v <- applyModalityToContextFunBody ai $ checkDontExpandLast CmpLeq e t reportSDoc "tc.def.alias" 20 $ "checkAlias: finished checking" solveSizeConstraints DontDefaultToInfty v <- instantiateFull v -- if we omit this, we loop (stdlib: Relation.Binary.Sum) -- or the termination checker might stumble over levels in sorts -- that cannot be converted to expressions without the level built-ins -- (test/succeed/Issue655.agda) -- compute body modification for irrelevant definitions, see issue 610 let bodyMod = case getRelevance ai of Irrelevant -> dontCare _ -> id -- Add the definition addConstant name $ defaultDefn ai name t $ set funMacro (Info.defMacro i == MacroDef) $ emptyFunction { funClauses = [ Clause -- trivial clause @name = v@ { clauseLHSRange = getRange i , clauseFullRange = getRange i , clauseTel = EmptyTel , namedClausePats = [] , clauseBody = Just $ bodyMod v , clauseType = Just $ Arg ai t , clauseCatchall = False , clauseUnreachable = Just False } ] , funCompiled = Just $ Done [] $ bodyMod v , funSplitTree = Just $ SplittingDone 0 , funDelayed = delayed , funAbstr = Info.defAbstract i } -- Andreas, 2017-01-01, issue #2372: -- Add the definition to the instance table, if needed, to update its type. when (Info.defInstance i == InstanceDef) $ do addTypedInstance name t reportSDoc "tc.def.alias" 20 $ "checkAlias: leaving" -- | Type check a definition by pattern matching. checkFunDef' :: Type -- ^ the type we expect the function to have -> ArgInfo -- ^ is it irrelevant (for instance) -> Delayed -- ^ are the clauses delayed (not unfolded willy-nilly) -> Maybe ExtLamInfo -- ^ does the definition come from an extended lambda -- (if so, we need to know some stuff about lambda-lifted args) -> Maybe QName -- ^ is it a with function (if so, what's the name of the parent function) -> Info.DefInfo -- ^ range info -> QName -- ^ the name of the function -> [A.Clause] -- ^ the clauses to check -> TCM () checkFunDef' t ai delayed extlam with i name cs = checkFunDefS t ai delayed extlam with i name Nothing cs -- | Type check a definition by pattern matching. checkFunDefS :: Type -- ^ the type we expect the function to have -> ArgInfo -- ^ is it irrelevant (for instance) -> Delayed -- ^ are the clauses delayed (not unfolded willy-nilly) -> Maybe ExtLamInfo -- ^ does the definition come from an extended lambda -- (if so, we need to know some stuff about lambda-lifted args) -> Maybe QName -- ^ is it a with function (if so, what's the name of the parent function) -> Info.DefInfo -- ^ range info -> QName -- ^ the name of the function -> Maybe Substitution -- ^ substitution (from with abstraction) that needs to be applied to module parameters -> [A.Clause] -- ^ the clauses to check -> TCM () checkFunDefS t ai delayed extlam with i name withSub cs = do traceCall (CheckFunDefCall (getRange i) name cs) $ do reportSDoc "tc.def.fun" 10 $ sep [ "checking body of" <+> prettyTCM name , nest 2 $ ":" <+> prettyTCM t , nest 2 $ "full type:" <+> (prettyTCM . defType =<< getConstInfo name) ] reportSDoc "tc.def.fun" 70 $ sep $ [ "clauses:" ] ++ map (nest 2 . text . show . A.deepUnscope) cs cs <- return $ map A.lhsToSpine cs reportSDoc "tc.def.fun" 70 $ sep $ [ "spine clauses:" ] ++ map (nest 2 . text . show . A.deepUnscope) cs -- Ensure that all clauses have the same number of trailing hidden patterns -- This is necessary since trailing implicits are no longer eagerly inserted. -- Andreas, 2013-10-13 -- Since we have flexible function arity, it is no longer necessary -- to patch clauses to same arity -- cs <- trailingImplicits t cs -- Check the clauses cs <- traceCall NoHighlighting $ do -- To avoid flicker. forM (zip cs [0..]) $ \ (c, clauseNo) -> do atClause name clauseNo (A.clauseRHS c) $ do (c,b) <- applyModalityToContextFunBody ai $ do checkClause t withSub c -- Andreas, 2013-11-23 do not solve size constraints here yet -- in case we are checking the body of an extended lambda. -- 2014-04-24: The size solver requires each clause to be -- checked individually, since otherwise we get constraints -- in typing contexts which are not prefixes of each other. whenNothing extlam $ solveSizeConstraints DontDefaultToInfty -- Andreas, 2013-10-27 add clause as soon it is type-checked -- TODO: instantiateFull? inTopContext $ addClauses name [c] return (c,b) (cs, CPC isOneIxs) <- return $ (second mconcat . unzip) cs let isSystem = not . null $ isOneIxs canBeSystem <- do -- allow VarP and ConP i0/i1 fallThrough = yes, DotP let pss = map namedClausePats cs allowed p = case p of VarP{} -> True -- pattern inserted by splitPartial ConP _ cpi [] | conPFallThrough cpi -> True DotP{} -> True _ -> False return $! all (allowed . namedArg) (concat pss) when isSystem $ unless canBeSystem $ typeError $ GenericError "no pattern matching or path copatterns in systems!" reportSDoc "tc.def.fun" 70 $ inTopContext $ do sep $ [ "checked clauses:" ] ++ map (nest 2 . text . show) cs -- After checking, remove the clauses again. -- (Otherwise, @checkInjectivity@ loops for issue 801). modifyFunClauses name (const []) reportSDoc "tc.cc" 25 $ inTopContext $ do sep [ "clauses before injectivity test" , nest 2 $ prettyTCM $ map (QNamed name) cs -- broken, reify (QNamed n cl) expect cl to live at top level ] reportSDoc "tc.cc" 60 $ inTopContext $ do sep [ "raw clauses: " , nest 2 $ sep $ map (text . show . QNamed name) cs ] -- Systems have their own coverage and "coherence" check, we -- also add an absurd clause for the cases not needed. (cs,sys) <- if not isSystem then return (cs, Nothing) else do fullType <- flip abstract t <$> getContextTelescope sys <- inTopContext $ checkSystemCoverage name isOneIxs fullType cs tel <- getContextTelescope let c = Clause { clauseFullRange = noRange , clauseLHSRange = noRange , clauseTel = tel , namedClausePats = teleNamedArgs tel , clauseBody = Nothing , clauseType = Just (defaultArg t) , clauseCatchall = False , clauseUnreachable = Just False } return (cs ++ [c], Just sys) -- Annotate the clauses with which arguments are actually used. cs <- instantiateFull {- =<< mapM rebindClause -} cs -- Andreas, 2010-11-12 -- rebindClause is the identity, and instantiateFull eta-contracts -- removing this eta-contraction fixes issue 361 -- however, Data.Star.Decoration.gmapAll no longer type-checks -- possibly due to missing eta-contraction!? -- Check if the function is injective. -- Andreas, 2015-07-01 we do it here in order to resolve metas -- in mutual definitions, e.g. the U/El definition in succeed/Issue439.agda -- We do it again for the mutual block after polarity analysis, see Rules.Decl. reportSLn "tc.inj.def" 20 $ "checkFunDef': checking injectivity..." inv <- Bench.billTo [Bench.Injectivity] $ checkInjectivity name cs reportSDoc "tc.cc" 15 $ inTopContext $ do sep [ "clauses before compilation" , nest 2 $ sep $ map (prettyTCM . QNamed name) cs ] reportSDoc "tc.cc.raw" 65 $ do sep [ "clauses before compilation" , nest 2 $ sep $ map (text . show) cs ] -- add clauses for the coverage checker (needs to reduce) inTopContext $ addClauses name cs reportSDoc "tc.cc.type" 60 $ " type : " <+> (text . prettyShow) t reportSDoc "tc.cc.type" 60 $ " context: " <+> (text . prettyShow =<< getContextTelescope) fullType <- flip telePi t <$> getContextTelescope reportSLn "tc.cc.type" 80 $ show fullType -- Coverage check and compile the clauses (mst, cc) <- Bench.billTo [Bench.Coverage] $ inTopContext $ compileClauses (if isSystem then Nothing else (Just (name, fullType))) cs -- Clause compilation runs the coverage checker, which might add -- some extra clauses. cs <- defClauses <$> getConstInfo name reportSDoc "tc.cc" 60 $ inTopContext $ do sep [ "compiled clauses of" <+> prettyTCM name , nest 2 $ pretty cc ] -- The macro tag might be on the type signature ismacro <- isMacro . theDef <$> getConstInfo name covering <- funCovering . theDef <$> getConstInfo name -- Add the definition inTopContext $ addConstant name =<< do -- If there was a pragma for this definition, we can set the -- funTerminates field directly. defn <- autoInline $ set funMacro (ismacro || Info.defMacro i == MacroDef) $ emptyFunction { funClauses = cs , funCompiled = Just cc , funSplitTree = mst , funDelayed = delayed , funInv = inv , funAbstr = Info.defAbstract i , funExtLam = (\ e -> e { extLamSys = sys }) <$> extlam , funWith = with , funCopatternLHS = hasProjectionPatterns cc , funCovering = covering } useTerPragma $ defaultDefn ai name fullType defn reportSDoc "tc.def.fun" 10 $ do sep [ "added " <+> prettyTCM name <+> ":" , nest 2 $ prettyTCM . defType =<< getConstInfo name ] -- | Set 'funTerminates' according to termination info in 'TCEnv', -- which comes from a possible termination pragma. useTerPragma :: Definition -> TCM Definition useTerPragma def@Defn{ defName = name, theDef = fun@Function{}} = do tc <- asksTC envTerminationCheck let terminates = case tc of NonTerminating -> Just False Terminating -> Just True _ -> Nothing reportSLn "tc.fundef" 30 $ unlines $ [ "funTerminates of " ++ prettyShow name ++ " set to " ++ show terminates , " tc = " ++ show tc ] return $ def { theDef = fun { funTerminates = terminates }} useTerPragma def = return def -- | Insert some with-patterns into the with-clauses LHS of the given RHS. -- (Used for @rewrite@.) insertPatterns :: [A.Pattern] -> A.RHS -> A.RHS insertPatterns pats = \case A.WithRHS aux es cs -> A.WithRHS aux es $ for cs $ \ (A.Clause (A.LHS info core) spats rhs ds catchall) -> A.Clause (A.LHS info (insertPatternsLHSCore pats core)) spats (insertPatterns pats rhs) ds catchall A.RewriteRHS qes spats rhs wh -> A.RewriteRHS qes spats (insertPatterns pats rhs) wh rhs@A.AbsurdRHS -> rhs rhs@A.RHS{} -> rhs -- | Insert with-patterns before the trailing with patterns. -- If there are none, append the with-patterns. insertPatternsLHSCore :: [A.Pattern] -> A.LHSCore -> A.LHSCore insertPatternsLHSCore pats = \case A.LHSWith core wps [] -> A.LHSWith core (pats ++ wps) [] core -> A.LHSWith core pats [] -- | Parameters for creating a @with@-function. data WithFunctionProblem = NoWithFunction | WithFunction { wfParentName :: QName -- ^ Parent function name. , wfName :: QName -- ^ With function name. , wfParentType :: Type -- ^ Type of the parent function. , wfParentTel :: Telescope -- ^ Context of the parent patterns. , wfBeforeTel :: Telescope -- ^ Types of arguments to the with function before the with expressions (needed vars). , wfAfterTel :: Telescope -- ^ Types of arguments to the with function after the with expressions (unneeded vars). , wfExprs :: [Term] -- ^ With and rewrite expressions. , wfExprTypes :: [EqualityView] -- ^ Types of the with and rewrite expressions. , wfRHSType :: Type -- ^ Type of the right hand side. , wfParentPats :: [NamedArg DeBruijnPattern] -- ^ Parent patterns. , wfParentParams :: Nat -- ^ Number of module parameters in parent patterns , wfPermSplit :: Permutation -- ^ Permutation resulting from splitting the telescope into needed and unneeded vars. , wfPermParent :: Permutation -- ^ Permutation reordering the variables in the parent pattern. , wfPermFinal :: Permutation -- ^ Final permutation (including permutation for the parent clause). , wfClauses :: [A.Clause] -- ^ The given clauses for the with function } checkSystemCoverage :: QName -> [Int] -> Type -> [Clause] -> TCM System checkSystemCoverage f [n] t cs = do reportSDoc "tc.sys.cover" 10 $ text (show (n , length cs)) <+> prettyTCM t TelV gamma t <- telViewUpTo n t addContext gamma $ do TelV (ExtendTel a _) _ <- telViewUpTo 1 t a <- reduce $ unEl $ unDom a case a of Def q [Apply phi] -> do [iz,io] <- mapM getBuiltinName' [builtinIZero, builtinIOne] ineg <- primINeg imin <- primIMin imax <- primIMax i0 <- primIZero i1 <- primIOne let isDir (ConP q _ []) | Just (conName q) == iz = Just False isDir (ConP q _ []) | Just (conName q) == io = Just True isDir _ = Nothing collectDirs :: [Int] -> [DeBruijnPattern] -> [(Int,Bool)] collectDirs [] [] = [] collectDirs (i : is) (p : ps) | Just d <- isDir p = (i,d) : collectDirs is ps | otherwise = collectDirs is ps collectDirs _ _ = __IMPOSSIBLE__ dir :: (Int,Bool) -> Term dir (i,False) = ineg `apply` [argN $ var i] dir (i,True) = var i -- andI and orI have cases for singletons to improve error messages. andI, orI :: [Term] -> Term andI [] = i1 andI [t] = t andI (t:ts) = (\ x -> imin `apply` [argN t, argN x]) $ andI ts orI [] = i0 orI [t] = t orI (t:ts) = imax `apply` [argN t, argN (orI ts)] let pats = map (take n . map (namedThing . unArg) . namedClausePats) cs alphas :: [[(Int,Bool)]] -- the face maps corresponding to each clause alphas = map (collectDirs (downFrom n)) pats phis :: [Term] -- the φ terms for each clause (i.e. the alphas as terms) phis = map andI $ map (map dir) alphas psi = orI $ phis pcs = zip phis cs boolToI True = i1 boolToI False = i0 reportSDoc "tc.sys.cover" 20 $ fsep $ map prettyTCM pats interval <- elInf primInterval reportSDoc "tc.sys.cover" 10 $ "equalTerm " <+> prettyTCM (unArg phi) <+> prettyTCM psi equalTerm interval (unArg phi) psi forM_ (init $ init $ List.tails pcs) $ \ ((phi1,cl1):pcs') -> do forM_ pcs' $ \ (phi2,cl2) -> do phi12 <- reduce (imin `apply` [argN phi1, argN phi2]) forallFaceMaps phi12 (\ _ _ -> __IMPOSSIBLE__) $ \ sigma -> do let args = sigma `applySubst` teleArgs gamma t' = sigma `applySubst` t fromReduced (YesReduction _ x) = x fromReduced (NoReduction x) = ignoreBlocking x body cl = do let extra = length (drop n $ namedClausePats cl) TelV delta _ <- telViewUpTo extra t' fmap (abstract delta) $ addContext delta $ do fmap fromReduced $ runReduceM $ appDef' (Def f []) [cl] [] (map notReduced $ raise (size delta) args ++ teleArgs delta) v1 <- body cl1 v2 <- body cl2 equalTerm t' v1 v2 sys <- forM (zip alphas cs) $ \ (alpha,cl) -> do let -- Δ = Γ_α , Δ'α delta = clauseTel cl -- Δ ⊢ b Just b = clauseBody cl -- Δ ⊢ ps : Γ , o : [φ] , Δ' -- we assume that there's no pattern matching other -- than from the system ps = namedClausePats cl extra = length (drop (size gamma + 1) ps) -- size Δ'α = size Δ' = extra -- Γ , α ⊢ u takeLast n xs = drop (length xs - n) xs weak [] = idS weak (i:is) = weak is `composeS` liftS i (raiseS 1) tel = telFromList (takeLast extra (telToList delta)) u = abstract tel (liftS extra (weak $ List.sort $ map fst alpha) `applySubst` b) return (map (first var) alpha,u) reportSDoc "tc.sys.cover.sys" 20 $ fsep $ prettyTCM gamma : map prettyTCM sys reportSDoc "tc.sys.cover.sys" 40 $ fsep $ (text . show) gamma : map (text . show) sys return (System gamma sys) -- gamma uses names from the type, not the patterns, could we do better? _ -> __IMPOSSIBLE__ checkSystemCoverage _ _ t cs = __IMPOSSIBLE__ -- * Info that is needed after all clauses have been processed. data ClausesPostChecks = CPC { cpcPartialSplits :: [Int] -- ^ Which argument indexes have a partial split. } instance Semigroup ClausesPostChecks where (<>) (CPC xs) (CPC xs') = CPC (List.nub $ mappend xs xs') instance Monoid ClausesPostChecks where mempty = CPC [] mappend = (<>) -- | Type check a function clause. checkClause :: Type -- ^ Type of function defined by this clause. -> Maybe Substitution -- ^ Module parameter substitution arising from with-abstraction. -> A.SpineClause -- ^ Clause. -> TCM (Clause,ClausesPostChecks) -- ^ Type-checked clause checkClause t withSub c@(A.Clause (A.SpineLHS i x aps) strippedPats rhs0 wh catchall) = do reportSDoc "tc.lhs.top" 30 $ "Checking clause" $$ prettyA c unlessNull (trailingWithPatterns aps) $ \ withPats -> do typeError $ UnexpectedWithPatterns $ map namedArg withPats traceCall (CheckClause t c) $ do aps <- expandPatternSynonyms aps cxtNames <- reverse . map (fst . unDom) <$> getContext when (not $ null strippedPats) $ reportSDoc "tc.lhs.top" 50 $ "strippedPats:" <+> vcat [ prettyA p <+> "=" <+> prettyTCM v <+> ":" <+> prettyTCM a | A.ProblemEq p v a <- strippedPats ] closed_t <- flip abstract t <$> getContextTelescope checkLeftHandSide (CheckPatternShadowing c) (Just x) aps t withSub strippedPats $ \ lhsResult@(LHSResult npars delta ps absurdPat trhs patSubst asb psplit) -> do -- Note that we might now be in irrelevant context, -- in case checkLeftHandSide walked over an irrelevant projection pattern. -- Subtle: checkRHS expects the function type to be the lambda lifted -- type. If we're checking a with-function that's already the case, -- otherwise we need to abstract over the module telescope. t' <- case withSub of Just{} -> return t Nothing -> do theta <- lookupSection (qnameModule x) return $ abstract theta t -- At this point we should update the named dots potential with-clauses -- in the right-hand side. When checking a clause we expect the named -- dots to live in the context of the closest parent lhs, but the named -- dots added by buildWithFunction live in the context of the -- with-function arguments before pattern matching. That's what we need -- patSubst for. let rhs = updateRHS rhs0 updateRHS rhs@A.RHS{} = rhs updateRHS rhs@A.AbsurdRHS{} = rhs updateRHS (A.WithRHS q es cs) = A.WithRHS q es (map updateClause cs) updateRHS (A.RewriteRHS qes spats rhs wh) = A.RewriteRHS qes (applySubst patSubst spats) (updateRHS rhs) wh updateClause (A.Clause f spats rhs wh ca) = A.Clause f (applySubst patSubst spats) (updateRHS rhs) wh ca (body, with) <- bindAsPatterns asb $ checkWhere wh $ checkRHS i x aps t' lhsResult rhs -- Note that the with function doesn't necessarily share any part of -- the context with the parent (but withSub will take you from parent -- to child). inTopContext $ Bench.billTo [Bench.Typing, Bench.With] $ checkWithFunction cxtNames with whenM (optDoubleCheck <$> pragmaOptions) $ case body of Just v -> do reportSDoc "tc.lhs.top" 30 $ vcat [ "double checking rhs" , nest 2 (prettyTCM v <+> " : " <+> prettyTCM (unArg trhs)) ] noConstraints $ dontAssignMetas $ checkInternal v $ unArg trhs Nothing -> return () reportSDoc "tc.lhs.top" 10 $ vcat [ "Clause before translation:" , nest 2 $ vcat [ "delta =" <+> do escapeContext (size delta) $ prettyTCM delta , "ps =" <+> do P.fsep <$> prettyTCMPatterns ps , "body =" <+> maybe "_|_" prettyTCM body , "type =" <+> prettyTCM t ] ] reportSDoc "tc.lhs.top" 60 $ escapeContext (size delta) $ vcat [ "Clause before translation (raw):" , nest 2 $ vcat [ "ps =" <+> text (show ps) , "body =" <+> text (show body) , "type =" <+> text (show t) ] ] -- check naturality wrt the interval. let iApplyVars :: [NamedArg DeBruijnPattern] -> [(Int, (Term,Term))] iApplyVars ps = flip concatMap (map namedArg ps) $ \case IApplyP _ t u x -> [(dbPatVarIndex x,(t,u))] VarP{} -> [] ProjP{}-> [] LitP{} -> [] DotP{} -> [] DefP _ _ ps -> iApplyVars ps ConP _ _ ps -> iApplyVars ps -- compute body modification for irrelevant definitions, see issue 610 rel <- asksTC envRelevance let bodyMod body = case rel of Irrelevant -> dontCare <$> body _ -> body -- absurd clauses don't define computational behaviour, so it's fine to -- treat them as catchalls. let catchall' = catchall || isNothing body return $ (, CPC psplit) Clause { clauseLHSRange = getRange i , clauseFullRange = getRange c , clauseTel = killRange delta , namedClausePats = ps , clauseBody = bodyMod body , clauseType = Just trhs , clauseCatchall = catchall' , clauseUnreachable = Nothing -- we don't know yet } -- | Type check the @with@ and @rewrite@ lhss and/or the rhs. checkRHS :: LHSInfo -- ^ Range of lhs. -> QName -- ^ Name of function. -> [NamedArg A.Pattern] -- ^ Patterns in lhs. -> Type -- ^ Top-level type of function. -> LHSResult -- ^ Result of type-checking patterns -> A.RHS -- ^ Rhs to check. -> TCM (Maybe Term, WithFunctionProblem) -- Note: the as-bindings are already bound (in checkClause) checkRHS i x aps t lhsResult@(LHSResult _ delta ps absurdPat trhs _ _asb _) rhs0 = handleRHS rhs0 where handleRHS rhs = case rhs of -- Case: ordinary RHS A.RHS e _ -> Bench.billTo [Bench.Typing, Bench.CheckRHS] $ do -- If there is an absurd pattern, we do not need a RHS. If we have -- one we complain, ignore it and return the same @(Nothing, NoWithFunction)@ -- as the case dealing with @A.AbsurdRHS@. mv <- if absurdPat then Nothing <$ setCurrentRange rhs (warning $ AbsurdPatternRequiresNoRHS ps) else Just <$> checkExpr e (unArg trhs) return (mv, NoWithFunction) -- Case: no RHS A.AbsurdRHS -> do unless absurdPat $ typeError $ NoRHSRequiresAbsurdPattern aps return (Nothing, NoWithFunction) -- Case: @rewrite@ -- Andreas, 2014-01-17, Issue 1402: -- If the rewrites are discarded since lhs=rhs, then -- we can actually have where clauses. A.RewriteRHS [] strippedPats rhs wh -> checkWhere wh $ handleRHS rhs A.RewriteRHS ((qname,eq):qes) strippedPats rhs wh -> do -- Action for skipping this rewrite. -- We do not want to create unsolved metas in case of -- a futile rewrite with a reflexive equation. -- Thus, we restore the state in this case, -- unless the rewrite expression contains questionmarks. st <- getTC let recurse = do st' <- getTC -- Comparing the whole stInteractionPoints maps is a bit -- wasteful, but we assume -- 1. rewriting with a reflexive equality to happen rarely, -- 2. especially with ?-holes in the rewrite expression -- 3. and a large overall number of ?s. let sameIP = (==) `on` (^.stInteractionPoints) when (sameIP st st') $ putTC st handleRHS $ A.RewriteRHS qes strippedPats rhs wh -- Get value and type of rewrite-expression. (proof, eqt) <- inferExpr eq -- Andreas, 2016-04-14, see also Issue #1796 -- Run the size constraint solver to improve with-abstraction -- in case the with-expression contains size metas. solveSizeConstraints DefaultToInfty -- Check that the type is actually an equality (lhs ≡ rhs) -- and extract lhs, rhs, and their type. t' <- reduce =<< instantiateFull eqt (eqt,rewriteType,rewriteFrom,rewriteTo) <- equalityView t' >>= \case eqt@(EqualityType _s _eq _params (Arg _ dom) a b) -> do s <- inferSort dom return (eqt, El s dom, unArg a, unArg b) -- Note: the sort _s of the equality need not be the sort of the type @dom@! OtherType{} -> typeError . GenericDocError =<< do "Cannot rewrite by equation of type" <+> prettyTCM t' -- Get the name of builtin REFL. Con reflCon _ [] <- primRefl reflInfo <- fmap (setOrigin Inserted) <$> getReflArgInfo reflCon -- Andreas, 2017-01-11: -- The test for refl is obsolete after fixes of #520 and #1740. -- -- Andreas, 2014-05-17 Issue 1110: -- -- Rewriting with @refl@ has no effect, but gives an -- -- incomprehensible error message about the generated -- -- with clause. Thus, we rather do simply nothing if -- -- rewriting with @refl@ is attempted. -- let isReflProof = do -- v <- reduce proof -- case v of -- Con c _ [] | c == reflCon -> return True -- _ -> return False -- ifM isReflProof recurse $ {- else -} do -- Process 'rewrite' clause like a suitable 'with' clause. -- The REFL constructor might have an argument let reflPat = A.ConP (ConPatInfo ConOCon patNoRange ConPatEager) (unambiguous $ conName reflCon) $ maybeToList $ fmap (\ ai -> Arg ai $ unnamed $ A.WildP patNoRange) reflInfo -- Andreas, 2015-12-25 Issue #1740: -- After the fix of #520, rewriting with a reflexive equation -- has to be desugared as matching against refl. let isReflexive = tryConversion $ dontAssignMetas $ equalTerm rewriteType rewriteFrom rewriteTo (pats, withExpr, withType) <- do ifM isReflexive {-then-} (return ([ reflPat ], proof, OtherType t')) {-else-} (return ([ A.WildP patNoRange, reflPat ], proof, eqt)) let rhs' = insertPatterns pats rhs (rhs'', outerWhere) -- the where clauses should go on the inner-most with | null qes = (rhs', wh) | otherwise = (A.RewriteRHS qes strippedPats rhs' wh, A.noWhereDecls) -- Andreas, 2014-03-05 kill range of copied patterns -- since they really do not have a source location. cl = A.Clause (A.LHS i $ insertPatternsLHSCore pats $ A.LHSHead x $ killRange aps) strippedPats rhs'' outerWhere False reportSDoc "tc.rewrite" 60 $ vcat [ "rewrite" , " rhs' = " Pr.<> (text . show) rhs' ] checkWithRHS x qname t lhsResult [withExpr] [withType] [cl] -- Case: @with@ A.WithRHS aux es cs -> do reportSDoc "tc.with.top" 15 $ vcat [ "TC.Rules.Def.checkclause reached A.WithRHS" , sep $ prettyA aux : map (parens . prettyA) es ] reportSDoc "tc.with.top" 20 $ do nfv <- getCurrentModuleFreeVars m <- currentModule sep [ "with function module:" <+> prettyList (map prettyTCM $ mnameToList m) , text $ "free variables: " ++ show nfv ] -- Infer the types of the with expressions (vs0, as) <- unzip <$> mapM inferExprForWith es -- Andreas, 2016-01-23, Issue #1796 -- Run the size constraint solver to improve with-abstraction -- in case the with-expression contains size metas. solveSizeConstraints DefaultToInfty checkWithRHS x aux t lhsResult vs0 (map OtherType as) cs checkWithRHS :: QName -- ^ Name of function. -> QName -- ^ Name of the with-function. -> Type -- ^ Type of function. -> LHSResult -- ^ Result of type-checking patterns -> [Term] -- ^ With-expressions. -> [EqualityView] -- ^ Types of with-expressions. -> [A.Clause] -- ^ With-clauses to check. -> TCM (Maybe Term, WithFunctionProblem) -- Note: as-bindings already bound (in checkClause) checkWithRHS x aux t (LHSResult npars delta ps _absurdPat trhs _ _asb _) vs0 as cs = Bench.billTo [Bench.Typing, Bench.With] $ do let withArgs = withArguments vs0 as perm = fromMaybe __IMPOSSIBLE__ $ dbPatPerm ps (vs, as) <- normalise (vs0, as) -- Andreas, 2012-09-17: for printing delta, -- we should remove it from the context first reportSDoc "tc.with.top" 25 $ escapeContext (size delta) $ vcat [ "delta =" <+> prettyTCM delta ] reportSDoc "tc.with.top" 25 $ vcat [ "vs =" <+> prettyTCM vs , "as =" <+> prettyTCM as , "perm =" <+> text (show perm) ] -- Split the telescope into the part needed to type the with arguments -- and all the other stuff (delta1, delta2, perm', t', as, vs) <- return $ splitTelForWith delta (unArg trhs) as vs let finalPerm = composeP perm' perm reportSLn "tc.with.top" 75 $ "delta = " ++ show delta -- Andreas, 2012-09-17: for printing delta, -- we should remove it from the context first reportSDoc "tc.with.top" 25 $ escapeContext (size delta) $ vcat [ "delta1 =" <+> prettyTCM delta1 , "delta2 =" <+> addContext delta1 (prettyTCM delta2) ] reportSDoc "tc.with.top" 25 $ vcat [ "perm' =" <+> text (show perm') , "fPerm =" <+> text (show finalPerm) ] -- Create the body of the original function -- All the context variables us <- getContextArgs let n = size us m = size delta -- First the variables bound outside this definition (us0, us1') = splitAt (n - m) us -- Then permute the rest and grab those needed to for the with arguments (us1, us2) = splitAt (size delta1) $ permute perm' us1' -- Now stuff the with arguments in between and finish with the remaining variables v = Def aux $ map Apply $ us0 ++ us1 ++ map defaultArg withArgs ++ us2 -- Andreas, 2013-02-26 add with-name to signature for printing purposes addConstant aux =<< do useTerPragma $ defaultDefn defaultArgInfo aux __DUMMY_TYPE__ emptyFunction -- Andreas, 2013-02-26 separate msgs to see which goes wrong reportSDoc "tc.with.top" 20 $ " with arguments" <+> do escapeContext (size delta) $ addContext delta1 $ prettyList (map prettyTCM vs) reportSDoc "tc.with.top" 20 $ " types" <+> do escapeContext (size delta) $ addContext delta1 $ prettyList (map prettyTCM as) reportSDoc "tc.with.top" 20 $ "with function call" <+> prettyTCM v reportSDoc "tc.with.top" 20 $ " context" <+> (prettyTCM =<< getContextTelescope) reportSDoc "tc.with.top" 20 $ " delta" <+> do escapeContext (size delta) $ prettyTCM delta reportSDoc "tc.with.top" 20 $ " delta1" <+> do escapeContext (size delta) $ prettyTCM delta1 reportSDoc "tc.with.top" 20 $ " delta2" <+> do escapeContext (size delta) $ addContext delta1 $ prettyTCM delta2 reportSDoc "tc.with.top" 20 $ " body" <+> prettyTCM v return (Just v, WithFunction x aux t delta delta1 delta2 vs as t' ps npars perm' perm finalPerm cs) -- | Invoked in empty context. checkWithFunction :: [Name] -> WithFunctionProblem -> TCM () checkWithFunction _ NoWithFunction = return () checkWithFunction cxtNames (WithFunction f aux t delta delta1 delta2 vs as b qs npars perm' perm finalPerm cs) = do let -- Δ₁ ws Δ₂ ⊢ withSub : Δ′ (where Δ′ is the context of the parent lhs) withSub :: Substitution withSub = liftS (size delta2) (wkS (countWithArgs as) idS) `composeS` renaming __IMPOSSIBLE__ (reverseP perm') reportSDoc "tc.with.top" 10 $ vcat [ "checkWithFunction" , nest 2 $ vcat [ "delta1 =" <+> prettyTCM delta1 , "delta2 =" <+> addContext delta1 (prettyTCM delta2) , "t =" <+> prettyTCM t , "as =" <+> addContext delta1 (prettyTCM as) , "vs =" <+> do addContext delta1 $ prettyTCM vs , "b =" <+> do addContext delta1 $ addContext delta2 $ prettyTCM b , "qs =" <+> do addContext delta $ prettyTCMPatternList qs , "perm' =" <+> text (show perm') , "perm =" <+> text (show perm) , "fperm =" <+> text (show finalPerm) , "withSub=" <+> text (show withSub) ] ] -- Add the type of the auxiliary function to the signature -- Generate the type of the with function delta1 <- normalise delta1 -- Issue 1332: checkInternal is picky about argInfo -- but module application is sloppy. -- We normalise to get rid of Def's coming -- from module applications. (withFunType, n) <- withFunctionType delta1 vs as delta2 b reportSDoc "tc.with.type" 10 $ sep [ "with-function type:", nest 2 $ prettyTCM withFunType ] reportSDoc "tc.with.type" 50 $ sep [ "with-function type:", nest 2 $ pretty withFunType ] -- Andreas, 2013-10-21 -- Check generated type directly in internal syntax. setCurrentRange cs $ traceCall NoHighlighting $ -- To avoid flicker. traceCall (CheckWithFunctionType withFunType) $ checkType withFunType -- With display forms are closed df <- safeInTopContext $ makeOpen =<< withDisplayForm f aux delta1 delta2 n qs perm' perm reportSLn "tc.with.top" 20 "created with display form" case dget df of Display n ts dt -> reportSDoc "tc.with.top" 20 $ "Display" <+> fsep [ text (show n) , prettyList $ map prettyTCM ts , prettyTCM dt ] addConstant aux =<< do useTerPragma $ (defaultDefn defaultArgInfo aux withFunType emptyFunction) { defDisplay = [df] } -- solveSizeConstraints -- Andreas, 2012-10-16 does not seem necessary reportSDoc "tc.with.top" 10 $ sep [ "added with function" <+> (prettyTCM aux) <+> "of type" , nest 2 $ prettyTCM withFunType , nest 2 $ "-|" <+> (prettyTCM =<< getContextTelescope) ] reportSDoc "tc.with.top" 70 $ vcat [ nest 2 $ text $ "raw with func. type = " ++ show withFunType ] -- Construct the body for the with function cs <- return $ map (A.lhsToSpine) cs cs <- buildWithFunction cxtNames f aux t delta qs npars withSub finalPerm (size delta1) n cs cs <- return $ map (A.spineToLhs) cs -- Check the with function checkFunDefS withFunType defaultArgInfo NotDelayed Nothing (Just f) info aux (Just withSub) cs where info = Info.mkDefInfo (nameConcrete $ qnameName aux) noFixity' PublicAccess ConcreteDef (getRange cs) -- | Type check a where clause. checkWhere :: A.WhereDeclarations -- ^ Where-declarations to check. -> TCM a -- ^ Continuation. -> TCM a checkWhere wh@(A.WhereDecls whmod ds) ret = do ensureNoNamedWhereInRefinedContext whmod loop ds where loop ds = case ds of [] -> ret [A.ScopedDecl scope ds] -> withScope_ scope $ loop ds [A.Section _ m tel ds] -> newSection m tel $ do localTC (\ e -> e { envCheckingWhere = True }) $ do checkDecls ds ret _ -> __IMPOSSIBLE__ -- #2897: We can't handle named where-modules in refined contexts. ensureNoNamedWhereInRefinedContext Nothing = return () ensureNoNamedWhereInRefinedContext (Just m) = traceCall (CheckNamedWhere m) $ do args <- map unArg <$> (moduleParamsToApply =<< currentModule) unless (isWeakening args) $ -- weakened contexts are fine genericDocError =<< do names <- map (argNameToString . fst . unDom) . telToList <$> (lookupSection =<< currentModule) let pr x v = text (x ++ " =") <+> prettyTCM v vcat [ fsep (pwords $ "Named where-modules are not allowed when module parameters have been refined by pattern matching. " ++ "See https://github.com/agda/agda/issues/2897.") , text $ "In this case the module parameter" ++ (if length args > 0 then "s have" else " has") ++ " been refined to" , nest 2 $ vcat (zipWith pr names args) ] where isWeakening [] = True isWeakening (Var i [] : args) = isWk (i - 1) args where isWk i [] = True isWk i (Var j [] : args) = i == j && isWk (i - 1) args isWk _ _ = False isWeakening _ = False -- | Enter a new section during type-checking. newSection :: ModuleName -> A.GeneralizeTelescope -> TCM a -> TCM a newSection m gtel@(A.GeneralizeTel _ tel) cont = do reportSDoc "tc.section" 10 $ "checking section" <+> prettyTCM m <+> fsep (map prettyA tel) checkGeneralizeTelescope gtel $ \ _ tel' -> do reportSDoc "tc.section" 10 $ "adding section:" <+> prettyTCM m <+> text (show (size tel')) addSection m reportSDoc "tc.section" 10 $ inTopContext $ nest 4 $ "actual tele:" <+> do prettyTCM =<< lookupSection m withCurrentModule m cont -- | Set the current clause number. atClause :: QName -> Int -> A.RHS -> TCM a -> TCM a atClause name i rhs = localTC $ \ e -> e { envClause = IPClause name i rhs } Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Application.hs0000644000000000000000000016327013466402171021550 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Application ( checkArguments , checkArguments_ , checkApplication , inferApplication , checkProjAppToKnownPrincipalArg ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Arrow (first, second) import Control.Monad.Trans import Control.Monad.Trans.Maybe import Control.Monad.Reader import Data.Maybe import qualified Data.List as List import Data.Either (partitionEithers) import Data.Traversable (sequenceA) import Data.Void import qualified Data.IntSet as IntSet import Agda.Interaction.Highlighting.Generate (storeDisambiguatedName) import Agda.Interaction.Options import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views as A import qualified Agda.Syntax.Info as A import Agda.Syntax.Concrete.Pretty () -- only Pretty instances import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Internal as I import Agda.Syntax.Position import Agda.TypeChecking.Conversion import Agda.TypeChecking.Constraints import Agda.TypeChecking.Datatypes import Agda.TypeChecking.Free import Agda.TypeChecking.Implicit import Agda.TypeChecking.Injectivity import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.InstanceArguments (postponeInstanceConstraints) import Agda.TypeChecking.Level import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Names import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Rules.Def import Agda.TypeChecking.Rules.Term import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Either import Agda.Utils.Except import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.NonemptyList import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible ----------------------------------------------------------------------------- -- * Applications ----------------------------------------------------------------------------- -- | Ranges of checked arguments, where present. type MaybeRanges = [Maybe Range] -- | @checkApplication hd args e t@ checks an application. -- Precondition: @Application hs args = appView e@ -- -- @checkApplication@ disambiguates constructors -- (and continues to 'checkConstructorApplication') -- and resolves pattern synonyms. checkApplication :: Comparison -> A.Expr -> A.Args -> A.Expr -> Type -> TCM Term checkApplication cmp hd args e t = postponeInstanceConstraints $ do reportSDoc "tc.check.app" 20 $ vcat [ "checkApplication" , nest 2 $ "hd = " <+> prettyA hd , nest 2 $ "args = " <+> sep (map prettyA args) , nest 2 $ "e = " <+> prettyA e , nest 2 $ "t = " <+> prettyTCM t ] reportSDoc "tc.check.app" 70 $ vcat [ "checkApplication (raw)" , nest 2 $ text $ "hd = " ++ show hd , nest 2 $ text $ "args = " ++ show (deepUnscope args) , nest 2 $ text $ "e = " ++ show (deepUnscope e) , nest 2 $ text $ "t = " ++ show t ] case unScope hd of -- Subcase: unambiguous projection A.Proj _ p | Just _ <- getUnambiguous p -> checkHeadApplication cmp e t hd args -- Subcase: ambiguous projection A.Proj o p -> checkProjApp cmp e o (unAmbQ p) args t -- Subcase: unambiguous constructor A.Con ambC | Just c <- getUnambiguous ambC -> do -- augment c with record fields, but do not revert to original name con <- fromRightM (sigError __IMPOSSIBLE_VERBOSE__ (typeError $ AbstractConstructorNotInScope c)) $ getOrigConHead c checkConstructorApplication cmp e t con args -- Subcase: ambiguous constructor A.Con (AmbQ cs0) -> disambiguateConstructor cs0 t >>= \ case Left unblock -> postponeTypeCheckingProblem (CheckExpr cmp e t) unblock Right c -> checkConstructorApplication cmp e t c args -- Subcase: pattern synonym A.PatternSyn n -> do (ns, p) <- lookupPatternSyn n p <- return $ setRange (getRange n) $ killRange $ vacuous p -- Pattern' Void -> Pattern' Expr -- Expand the pattern synonym by substituting for -- the arguments we have got and lambda-lifting -- over the ones we haven't. let meta r = A.Underscore $ A.emptyMetaInfo{ A.metaRange = r } -- TODO: name suggestion case A.insertImplicitPatSynArgs meta (getRange n) ns args of Nothing -> typeError $ BadArgumentsToPatternSynonym n Just (s, ns) -> do let p' = A.patternToExpr p e' = A.lambdaLiftExpr (map unArg ns) (A.substExpr s p') checkExpr' cmp e' t -- Subcase: macro A.Macro x -> do -- First go: no parameters TelV tel _ <- telView =<< normalise . defType =<< instantiateDef =<< getConstInfo x tTerm <- primAgdaTerm tName <- primQName let argTel = init $ telToList tel -- last argument is the hole term -- inspect macro type to figure out if arguments need to be wrapped in quote/quoteTerm mkArg :: Type -> NamedArg A.Expr -> NamedArg A.Expr mkArg t a | unEl t == tTerm = (fmap . fmap) (A.App (A.defaultAppInfo (getRange a)) (A.QuoteTerm A.exprNoRange) . defaultNamedArg) a mkArg t a | unEl t == tName = (fmap . fmap) (A.App (A.defaultAppInfo (getRange a)) (A.Quote A.exprNoRange) . defaultNamedArg) a mkArg t a | otherwise = a makeArgs :: [Dom (String, Type)] -> [NamedArg A.Expr] -> ([NamedArg A.Expr], [NamedArg A.Expr]) makeArgs [] args = ([], args) makeArgs _ [] = ([], []) makeArgs tel@(d : _) (arg : args) = case insertImplicit arg tel of NoInsertNeeded -> first (mkArg (snd $ unDom d) arg :) $ makeArgs (tail tel) args ImpInsert is -> makeArgs (drop (length is) tel) (arg : args) BadImplicits -> (arg : args, []) -- fail later in checkHeadApplication NoSuchName{} -> (arg : args, []) -- ditto (macroArgs, otherArgs) = makeArgs argTel args unq = A.App (A.defaultAppInfo $ fuseRange x args) (A.Unquote A.exprNoRange) . defaultNamedArg desugared = A.app (unq $ unAppView $ Application (A.Def x) $ macroArgs) otherArgs checkExpr' cmp desugared t -- Subcase: unquote A.Unquote _ | [arg] <- args -> do (_, hole) <- newValueMeta RunMetaOccursCheck t unquoteM (namedArg arg) hole t return hole | arg : args <- args -> do -- Example: unquote v a b : A -- Create meta H : (x : X) (y : Y x) → Z x y for the hole -- Check a : X, b : Y a -- Unify Z a b == A -- Run the tactic on H tel <- metaTel args -- (x : X) (y : Y x) target <- addContext tel newTypeMeta_ -- Z x y let holeType = telePi_ tel target -- (x : X) (y : Y x) → Z x y (Just vs, EmptyTel) <- mapFst allApplyElims <$> checkArguments_ ExpandLast (getRange args) args tel -- a b : (x : X) (y : Y x) let rho = reverse (map unArg vs) ++# IdS -- [x := a, y := b] equalType (applySubst rho target) t -- Z a b == A (_, hole) <- newValueMeta RunMetaOccursCheck holeType unquoteM (namedArg arg) hole holeType return $ apply hole vs where metaTel :: [Arg a] -> TCM Telescope metaTel [] = pure EmptyTel metaTel (arg : args) = do a <- newTypeMeta_ let dom = a <$ domFromArg arg ExtendTel dom . Abs "x" <$> addContext ("x" :: String, dom) (metaTel args) -- Subcase: defined symbol or variable. _ -> do v <- checkHeadApplication cmp e t hd args reportSDoc "tc.term.app" 30 $ vcat [ "checkApplication: checkHeadApplication returned" , nest 2 $ "v = " <+> prettyTCM v ] return v -- | Precondition: @Application hd args = appView e@. inferApplication :: ExpandHidden -> A.Expr -> A.Args -> A.Expr -> TCM (Term, Type) inferApplication exh hd args e | not (defOrVar hd) = do t <- workOnTypes $ newTypeMeta_ v <- checkExpr' CmpEq e t return (v, t) inferApplication exh hd args e = postponeInstanceConstraints $ case unScope hd of A.Proj o p | isAmbiguous p -> inferProjApp e o (unAmbQ p) args _ -> do (f, t0) <- inferHead hd let r = getRange hd res <- runExceptT $ checkArgumentsE exh (getRange hd) args t0 Nothing case res of Right (_, vs, t1, _) -> (,t1) <$> unfoldInlined (f vs) Left problem -> do t <- workOnTypes $ newTypeMeta_ v <- postponeArgs problem exh r args t $ \ _ vs _ _ -> unfoldInlined (f vs) return (v, t) ----------------------------------------------------------------------------- -- * Heads ----------------------------------------------------------------------------- inferHeadDef :: ProjOrigin -> QName -> TCM (Elims -> Term, Type) inferHeadDef o x = do proj <- isProjection x let app = case proj of Nothing -> \ args -> Def x $ map Apply args Just p -> \ args -> projDropParsApply p o args mapFst applyE <$> inferDef app x -- | Infer the type of a head thing (variable, function symbol, or constructor). -- We return a function that applies the head to arguments. -- This is because in case of a constructor we want to drop the parameters. inferHead :: A.Expr -> TCM (Elims -> Term, Type) inferHead e = do case e of A.Var x -> do -- traceCall (InferVar x) $ do (u, a) <- getVarInfo x reportSDoc "tc.term.var" 20 $ hsep [ "variable" , prettyTCM x , "(" , text (show u) , ")" , "has type:" , prettyTCM a ] unless (usableRelevance a) $ typeError $ VariableIsIrrelevant x unless (usableQuantity a) $ typeError $ VariableIsErased x return (applyE u, unDom a) A.Def x -> inferHeadDef ProjPrefix x A.Proj o ambP | Just d <- getUnambiguous ambP -> inferHeadDef o d A.Proj{} -> __IMPOSSIBLE__ -- inferHead will only be called on unambiguous projections A.Con ambC | Just c <- getUnambiguous ambC -> do -- Constructors are polymorphic internally. -- So, when building the constructor term -- we should throw away arguments corresponding to parameters. -- First, inferDef will try to apply the constructor -- to the free parameters of the current context. We ignore that. con <- fromRightM (sigError __IMPOSSIBLE_VERBOSE__ (typeError $ AbstractConstructorNotInScope c)) $ getOrigConHead c (u, a) <- inferDef (\ _ -> Con con ConOCon []) c -- Next get the number of parameters in the current context. Constructor{conPars = n} <- theDef <$> (instantiateDef =<< getConstInfo c) reportSLn "tc.term.con" 7 $ unwords [prettyShow c, "has", show n, "parameters."] -- So when applying the constructor throw away the parameters. return (applyE u . drop n, a) A.Con{} -> __IMPOSSIBLE__ -- inferHead will only be called on unambiguous constructors A.QuestionMark i ii -> inferMeta (newQuestionMark ii) i A.Underscore i -> inferMeta (newValueMeta RunMetaOccursCheck) i e -> do (term, t) <- inferExpr e return (applyE term, t) inferDef :: (Args -> Term) -> QName -> TCM (Term, Type) inferDef mkTerm x = traceCall (InferDef x) $ do -- getConstInfo retrieves the *absolute* (closed) type of x -- instantiateDef relativizes it to the current context d <- instantiateDef =<< getConstInfo x -- irrelevant defs are only allowed in irrelevant position checkRelevance x d case theDef d of GeneralizableVar{} -> do -- Generalizable variables corresponds to metas created -- at the point where they should be generalized. Module parameters -- have already been applied to the meta, so we don't have to do that -- here. val <- fromMaybe __IMPOSSIBLE__ <$> viewTC (eGeneralizedVars . key x) sub <- checkpointSubstitution (genvalCheckpoint val) let (v, t) = applySubst sub (genvalTerm val, genvalType val) debug [] t v return (v, t) _ -> do -- since x is considered living in the top-level, we have to -- apply it to the current context vs <- freeVarsToApply x let t = defType d v = mkTerm vs -- applies x to vs, dropping parameters debug vs t v return (v, t) where debug :: Args -> Type -> Term -> TCM () debug vs t v = do reportSDoc "tc.term.def" 60 $ "freeVarsToApply to def " <+> hsep (map (text . show) vs) reportSDoc "tc.term.def" 10 $ vcat [ "inferred def " <+> prettyTCM x <+> hsep (map prettyTCM vs) , nest 2 $ ":" <+> prettyTCM t , nest 2 $ "-->" <+> prettyTCM v ] -- | The second argument is the definition of the first. checkRelevance :: QName -> Definition -> TCM () checkRelevance x def = maybe (return ()) typeError =<< checkRelevance' x def -- | The second argument is the definition of the first. -- Returns 'Nothing' if ok, otherwise the error message. checkRelevance' :: QName -> Definition -> TCM (Maybe TypeError) checkRelevance' x def = do case defRelevance def of Relevant -> return Nothing -- relevance functions can be used in any context. drel -> do -- Andreas,, 2018-06-09, issue #2170 -- irrelevant projections are only allowed if --irrelevant-projections ifM (return (isJust $ isProjection_ $ theDef def) `and2M` (not .optIrrelevantProjections <$> pragmaOptions)) {-then-} needIrrProj {-else-} $ do rel <- asksTC envRelevance reportSDoc "tc.irr" 50 $ vcat [ "declaration relevance =" <+> text (show drel) , "context relevance =" <+> text (show rel) ] return $ if (drel `moreRelevant` rel) then Nothing else Just $ DefinitionIsIrrelevant x where needIrrProj = Just . GenericDocError <$> do sep [ "Projection " , prettyTCM x, " is irrelevant." , " Turn on option --irrelevant-projections to use it (unsafe)." ] -- | @checkHeadApplication e t hd args@ checks that @e@ has type @t@, -- assuming that @e@ has the form @hd args@. The corresponding -- type-checked term is returned. -- -- If the head term @hd@ is a coinductive constructor, then a -- top-level definition @fresh tel = hd args@ (where the clause is -- delayed) is added, where @tel@ corresponds to the current -- telescope. The returned term is @fresh tel@. -- -- Precondition: The head @hd@ has to be unambiguous, and there should -- not be any need to insert hidden lambdas. checkHeadApplication :: Comparison -> A.Expr -> Type -> A.Expr -> [NamedArg A.Expr] -> TCM Term checkHeadApplication cmp e t hd args = do sharp <- fmap nameOfSharp <$> coinductionKit conId <- getNameOfConstrained builtinConId pOr <- getNameOfConstrained builtinPOr pComp <- getNameOfConstrained builtinComp pHComp <- getNameOfConstrained builtinHComp pTrans <- getNameOfConstrained builtinTrans mglue <- getNameOfConstrained builtin_glue case hd of -- Type checking #. The # that the user can write will be a Def, but the -- sharp we generate in the body of the wrapper is a Con. A.Def c | Just c == sharp -> checkSharpApplication e t c args -- Cubical primitives A.Def c | Just c == pComp -> defaultResult' $ Just $ checkPrimComp c A.Def c | Just c == pHComp -> defaultResult' $ Just $ checkPrimHComp c A.Def c | Just c == pTrans -> defaultResult' $ Just $ checkPrimTrans c A.Def c | Just c == conId -> defaultResult' $ Just $ checkConId c A.Def c | Just c == pOr -> defaultResult' $ Just $ checkPOr c A.Def c | Just c == mglue -> defaultResult' $ Just $ check_glue c _ -> defaultResult where defaultResult :: TCM Term defaultResult = defaultResult' Nothing defaultResult' :: Maybe (MaybeRanges -> Args -> Type -> TCM Args) -> TCM Term defaultResult' mk = do (f, t0) <- inferHead hd expandLast <- asksTC envExpandLast checkArguments expandLast (getRange hd) args t0 t $ \ rs vs t1 checkedTarget -> do let check = do k <- mk as <- allApplyElims vs pure $ k rs as t1 vs <- case check of Just ck -> do map Apply <$> ck Nothing -> do return vs v <- unfoldInlined (f vs) coerce' cmp checkedTarget v t1 t ----------------------------------------------------------------------------- -- * Spines ----------------------------------------------------------------------------- traceCallE :: Call -> ExceptT e TCM r -> ExceptT e TCM r traceCallE call m = do z <- lift $ traceCall call $ runExceptT m case z of Right e -> return e Left err -> throwError err -- | If we've already checked the target type we don't have to call coerce. coerce' :: Comparison -> CheckedTarget -> Term -> Type -> Type -> TCM Term coerce' cmp NotCheckedTarget v inferred expected = coerce cmp v inferred expected coerce' cmp (CheckedTarget Nothing) v _ _ = return v coerce' cmp (CheckedTarget (Just pid)) v _ expected = blockTermOnProblem expected v pid -- | Check a list of arguments: @checkArgs args t0 t1@ checks that -- @t0 = Delta -> t0'@ and @args : Delta@. Inserts hidden arguments to -- make this happen. Returns the evaluated arguments @vs@, the remaining -- type @t0'@ (which should be a subtype of @t1@) and any constraints @cs@ -- that have to be solved for everything to be well-formed. checkArgumentsE :: ExpandHidden -> Range -> [NamedArg A.Expr] -> Type -> Maybe Type -> ExceptT (MaybeRanges, Elims, [NamedArg A.Expr], Type) TCM (MaybeRanges, Elims, Type, CheckedTarget) checkArgumentsE = checkArgumentsE' NotCheckedTarget checkArgumentsE' :: CheckedTarget -- ^ Have we already checked the target? -> ExpandHidden -- ^ Insert trailing hidden arguments? -> Range -- ^ Range of the function. -> [NamedArg A.Expr] -- ^ Arguments. -> Type -- ^ Type of the function. -> Maybe Type -- ^ Type of the application. -> ExceptT (MaybeRanges, Elims, [NamedArg A.Expr], Type) TCM (MaybeRanges, Elims, Type, CheckedTarget) -- Case: no arguments, do not insert trailing hidden arguments: We are done. checkArgumentsE' chk DontExpandLast _ [] t0 _ = return ([], [], t0, chk) -- Case: no arguments, but need to insert trailing hiddens. checkArgumentsE' chk ExpandLast r [] t0 mt1 = traceCallE (CheckArguments r [] t0 mt1) $ lift $ do mt1' <- traverse (unEl <.> reduce) mt1 (us, t) <- implicitArgs (-1) (expand mt1') t0 return (replicate (length us) Nothing, map Apply us, t, chk) where expand (Just (Pi dom _)) Hidden = not (hidden dom) expand _ Hidden = True expand (Just (Pi dom _)) Instance{} = not (isInstance dom) expand _ Instance{} = True expand _ NotHidden = False -- Case: argument given. checkArgumentsE' chk exh r args0@(arg@(Arg info e) : args) t0 mt1 = traceCallE (CheckArguments r args0 t0 mt1) $ do lift $ reportSDoc "tc.term.args" 30 $ sep [ "checkArgumentsE" -- , " args0 =" <+> prettyA args0 , nest 2 $ vcat [ "e =" <+> prettyA e , "t0 =" <+> prettyTCM t0 , "t1 =" <+> maybe "Nothing" prettyTCM mt1 ] ] -- First, insert implicit arguments, depending on current argument @arg@. let hx = getHiding info -- hiding of current argument mx = fmap rangedThing $ nameOf e -- name of current argument -- do not insert visible arguments expand NotHidden y = False -- insert a hidden argument if arg is not hidden or has different name -- insert an instance argument if arg is not instance or has different name expand hy y = not (sameHiding hy hx) || maybe False (y /=) mx reportSDoc "tc.term.args" 30 $ vcat [ "calling implicitNamedArgs" , nest 2 $ "t0 = " <+> prettyTCM t0 , nest 2 $ "hx = " <+> text (show hx) , nest 2 $ "mx = " <+> maybe "nothing" prettyTCM mx ] (nargs, t) <- lift $ implicitNamedArgs (-1) expand t0 -- Separate names from args. let (mxs, us) = unzip $ map (\ (Arg ai (Named mx u)) -> (mx, Apply $ Arg ai u)) nargs xs = catMaybes mxs -- We need a function type here, but we don't know which kind -- (implicit/explicit). But it might be possible to use injectivity to -- force a pi. t <- lift $ forcePiUsingInjectivity t -- We are done inserting implicit args. Now, try to check @arg@. ifBlockedType t (\ m t -> throwError (replicate (length us) Nothing, us, args0, t)) $ \ _ t0' -> do -- What can go wrong? -- 1. We ran out of function types. let shouldBePi -- a) It is an explicit argument, but we ran out of function types. | visible info = lift $ typeError $ ShouldBePi t0' -- b) It is an implicit argument, and we did not insert any implicits. -- Thus, the type was not a function type to start with. | null xs = lift $ typeError $ ShouldBePi t0' -- c) We did insert implicits, but we ran out of implicit function types. -- Then, we should inform the user that we did not find his one. | otherwise = lift $ typeError $ WrongNamedArgument arg -- 2. We have a function type left, but it is the wrong one. -- Our argument must be implicit, case a) is impossible. -- (Otherwise we would have ran out of function types instead.) let wrongPi -- b) We have not inserted any implicits. | null xs = lift $ typeError $ WrongHidingInApplication t0' -- c) We inserted implicits, but did not find his one. | otherwise = lift $ typeError $ WrongNamedArgument arg viewPath <- lift pathView' -- Check the target type if we can get away with it. chk' <- lift $ case (chk, mt1) of (NotCheckedTarget, Just t1) | all visible args0 -> do let n = length args0 TelV tel tgt <- telViewUpTo n t0' let dep = any (< n) $ IntSet.toList $ freeVars tgt vis = all visible (telToList tel) isRigid t | PathType{} <- viewPath t = return False -- Path is not rigid! isRigid (El _ (Pi dom _)) = return $ visible dom isRigid (El _ (Def d _)) = theDef <$> getConstInfo d >>= return . \ case Axiom{} -> True DataOrRecSig{} -> True AbstractDefn{} -> True Function{funClauses = cs} -> null cs Datatype{} -> True Record{} -> True Constructor{} -> __IMPOSSIBLE__ GeneralizableVar{} -> __IMPOSSIBLE__ Primitive{} -> False isRigid _ = return False rigid <- isRigid tgt -- Andreas, 2019-03-28, issue #3248: -- If the target type is SIZELT, we need coerce, leqType is insufficient. -- For example, we have i : Size <= (Size< ↑ i), but not Size <= (Size< ↑ i). isSizeLt <- reduce t1 >>= isSizeType <&> \case Just (BoundedLt _) -> True _ -> False if | dep -> return chk -- must be non-dependent | not rigid -> return chk -- with a rigid target | not vis -> return chk -- and only visible arguments | isSizeLt -> return chk -- Issue #3248, not Size< | otherwise -> do let tgt1 = applySubst (strengthenS __IMPOSSIBLE__ $ size tel) tgt reportSDoc "tc.term.args.target" 30 $ vcat [ "Checking target types first" , nest 2 $ "inferred =" <+> prettyTCM tgt1 , nest 2 $ "expected =" <+> prettyTCM t1 ] traceCall (CheckTargetType (fuseRange r args0) tgt1 t1) $ CheckedTarget <$> ifNoConstraints_ (leqType tgt1 t1) (return Nothing) (return . Just) _ -> return chk -- t0' <- lift $ forcePi (getHiding info) (maybe "_" rangedThing $ nameOf e) t0' case unEl t0' of Pi (Dom{domInfo = info', domName = dname, unDom = a}) b | let name = maybe "_" rangedThing dname, sameHiding info info' && (visible info || maybe True ((name ==) . rangedThing) (nameOf e)) -> do u <- lift $ applyModalityToContext info' $ do -- Andreas, 2014-05-30 experiment to check non-dependent arguments -- after the spine has been processed. Allows to propagate type info -- from ascribed type into extended-lambdas. Would solve issue 1159. -- However, leaves unsolved type checking problems in the test suite. -- I do not know what I am doing wrong here. -- Could be extreme order-sensitivity or my abuse of the postponing -- mechanism. -- Andreas, 2016-02-02: Ulf says unless there is actually some meta -- blocking a postponed type checking problem, we might never retry, -- since the trigger for retrying constraints is solving a meta. -- Thus, the following naive use violates some invariant. -- if not $ isBinderUsed b -- then postponeTypeCheckingProblem (CheckExpr (namedThing e) a) (return True) else let e' = e { nameOf = maybe dname Just (nameOf e) } checkNamedArg (Arg info' e') a -- save relevance info' from domain in argument addCheckedArgs us (getRange e) (Apply $ Arg info' u) $ checkArgumentsE' chk' exh (fuseRange r e) args (absApp b u) mt1 | otherwise -> do reportSDoc "error" 10 $ nest 2 $ vcat [ text $ "info = " ++ show info , text $ "info' = " ++ show info' , text $ "absName b = " ++ absName b , text $ "nameOf e = " ++ show (nameOf e) ] wrongPi _ | visible info , PathType s _ _ bA x y <- viewPath t0' -> do lift $ reportSDoc "tc.term.args" 30 $ text $ show bA u <- lift $ checkExpr (namedThing e) =<< elInf primInterval addCheckedArgs us (getRange e) (IApply (unArg x) (unArg y) u) $ checkArgumentsE exh (fuseRange r e) args (El s $ unArg bA `apply` [argN u]) mt1 _ -> shouldBePi where addCheckedArgs us r u rec = do (rs, vs, t, chk) <- rec let rs' = replicate (length us) Nothing ++ Just r : rs return (rs', us ++ u : vs, t, chk) `catchError` \ (rs, vs, es, t) -> do let rs' = replicate (length us) Nothing ++ Just r : rs throwError (rs', us ++ u : vs, es, t) -- | Check that a list of arguments fits a telescope. -- Inserts hidden arguments as necessary. -- Returns the type-checked arguments and the remaining telescope. checkArguments_ :: ExpandHidden -- ^ Eagerly insert trailing hidden arguments? -> Range -- ^ Range of application. -> [NamedArg A.Expr] -- ^ Arguments to check. -> Telescope -- ^ Telescope to check arguments against. -> TCM (Elims, Telescope) -- ^ Checked arguments and remaining telescope if successful. checkArguments_ exh r args tel = postponeInstanceConstraints $ do z <- runExceptT $ checkArgumentsE exh r args (telePi tel __DUMMY_TYPE__) Nothing case z of Right (_, args, t, _) -> do let TelV tel' _ = telView' t return (args, tel') Left _ -> __IMPOSSIBLE__ -- type cannot be blocked as it is generated by telePi -- | @checkArguments exph r args t0 t k@ tries @checkArgumentsE exph args t0 t@. -- If it succeeds, it continues @k@ with the returned results. If it fails, -- it registers a postponed typechecking problem and returns the resulting new -- meta variable. -- -- Checks @e := ((_ : t0) args) : t@. checkArguments :: ExpandHidden -> Range -> [NamedArg A.Expr] -> Type -> Type -> (MaybeRanges -> Elims -> Type -> CheckedTarget -> TCM Term) -> TCM Term checkArguments exph r args t0 t k = postponeInstanceConstraints $ do z <- runExceptT $ checkArgumentsE exph r args t0 (Just t) case z of Right (rs, vs, t1, pid) -> k rs vs t1 pid -- vs = evaluated args -- t1 = remaining type (needs to be subtype of t) Left problem -> postponeArgs problem exph r args t k -- if unsuccessful, postpone checking until t0 unblocks postponeArgs :: (MaybeRanges, Elims, [NamedArg A.Expr], Type) -> ExpandHidden -> Range -> [NamedArg A.Expr] -> Type -> (MaybeRanges -> Elims -> Type -> CheckedTarget -> TCM Term) -> TCM Term postponeArgs (rs, us, es, t0) exph r args t k = do reportSDoc "tc.term.expr.args" 80 $ sep [ "postponed checking arguments" , nest 4 $ prettyList (map (prettyA . namedThing . unArg) args) , nest 2 $ "against" , nest 4 $ prettyTCM t0 ] $$ sep [ "progress:" , nest 2 $ "checked" <+> prettyList (map prettyTCM us) , nest 2 $ "remaining" <+> sep [ prettyList (map (prettyA . namedThing . unArg) es) , nest 2 $ ":" <+> prettyTCM t0 ] ] postponeTypeCheckingProblem_ (CheckArgs exph r es t0 t $ \ rs' vs t pid -> k (rs ++ rs') (us ++ vs) t pid) ----------------------------------------------------------------------------- -- * Constructors ----------------------------------------------------------------------------- -- | Check the type of a constructor application. This is easier than -- a general application since the implicit arguments can be inserted -- without looking at the arguments to the constructor. checkConstructorApplication :: Comparison -> A.Expr -> Type -> ConHead -> [NamedArg A.Expr] -> TCM Term checkConstructorApplication cmp org t c args = do reportSDoc "tc.term.con" 50 $ vcat [ "entering checkConstructorApplication" , nest 2 $ vcat [ "org =" <+> prettyTCM org , "t =" <+> prettyTCM t , "c =" <+> prettyTCM c , "args =" <+> prettyTCM args ] ] let paramsGiven = checkForParams args if paramsGiven then fallback else do reportSDoc "tc.term.con" 50 $ "checkConstructorApplication: no parameters explicitly supplied, continuing..." cdef <- getConInfo c let Constructor{conData = d, conPars = npars} = theDef cdef reportSDoc "tc.term.con" 50 $ nest 2 $ "d =" <+> prettyTCM d -- Issue 661: t maybe an evaluated form of d .., so we evaluate d -- as well and then check wether we deal with the same datatype t0 <- reduce (Def d []) case (t0, unEl t) of -- Only fully applied constructors get special treatment (Def d0 _, Def d' es) -> do let ~(Just vs) = allApplyElims es reportSDoc "tc.term.con" 50 $ nest 2 $ "d0 =" <+> prettyTCM d0 reportSDoc "tc.term.con" 50 $ nest 2 $ "d' =" <+> prettyTCM d' reportSDoc "tc.term.con" 50 $ nest 2 $ "vs =" <+> prettyTCM vs if d' /= d0 then fallback else do -- Issue 661: d' may take more parameters than d, in particular -- these additional parameters could be a module parameter telescope. -- Since we get the constructor type ctype from d but the parameters -- from t = Def d' vs, we drop the additional parameters. npars' <- getNumberOfParameters d' caseMaybe (sequenceA $ List2 (Just npars, npars')) fallback $ \ (List2 (n, n')) -> do reportSDoc "tc.term.con" 50 $ nest 2 $ text $ "n = " ++ show n reportSDoc "tc.term.con" 50 $ nest 2 $ text $ "n' = " ++ show n' when (n > n') -- preprocessor does not like ', so put on next line __IMPOSSIBLE__ let ps = take n $ drop (n' - n) vs ctype = defType cdef reportSDoc "tc.term.con" 20 $ vcat [ "special checking of constructor application of" <+> prettyTCM c , nest 2 $ vcat [ "ps =" <+> prettyTCM ps , "ctype =" <+> prettyTCM ctype ] ] let ctype' = ctype `piApply` ps reportSDoc "tc.term.con" 20 $ nest 2 $ "ctype' =" <+> prettyTCM ctype' -- get the parameter names let TelV ptel _ = telView'UpTo n ctype let pnames = map (fmap fst) $ telToList ptel -- drop the parameter arguments args' = dropArgs pnames args -- check the non-parameter arguments expandLast <- asksTC envExpandLast checkArguments expandLast (getRange c) args' ctype' t $ \ rs es t' targetCheck -> do reportSDoc "tc.term.con" 20 $ nest 2 $ vcat [ text "es =" <+> prettyTCM es , text "t' =" <+> prettyTCM t' ] coerce' cmp targetCheck (Con c ConOCon es) t' t _ -> do reportSDoc "tc.term.con" 50 $ nest 2 $ "we are not at a datatype, falling back" fallback where fallback = checkHeadApplication cmp org t (A.Con (unambiguous $ conName c)) args -- Check if there are explicitly given hidden arguments, -- in which case we fall back to default type checking. -- We could work harder, but let's not for now. -- -- Andreas, 2012-04-18: if all inital args are underscores, ignore them checkForParams args = let (hargs, rest) = span (not . visible) args notUnderscore A.Underscore{} = False notUnderscore _ = True in any notUnderscore $ map (unScope . namedArg) hargs -- Drop the constructor arguments that correspond to parameters. dropArgs [] args = args dropArgs ps [] = args dropArgs ps args@(arg : args') | Just p <- name, Just ps' <- namedPar p ps = dropArgs ps' args' | Nothing <- name, Just ps' <- unnamedPar h ps = dropArgs ps' args' | otherwise = args where name = fmap rangedThing . nameOf $ unArg arg h = getHiding arg namedPar x = dropPar ((x ==) . unDom) unnamedPar h = dropPar (sameHiding h) dropPar this (p : ps) | this p = Just ps | otherwise = dropPar this ps dropPar _ [] = Nothing -- | Returns an unblocking action in case of failure. disambiguateConstructor :: NonemptyList QName -> Type -> TCM (Either (TCM Bool) ConHead) disambiguateConstructor cs0 t = do reportSLn "tc.check.term.con" 40 $ "Ambiguous constructor: " ++ prettyShow cs0 -- Get the datatypes of the various constructors let getData Constructor{conData = d} = d getData _ = __IMPOSSIBLE__ reportSLn "tc.check.term.con" 40 $ " ranges before: " ++ show (getRange cs0) -- We use the reduced constructor when disambiguating, but -- the original constructor for type checking. This is important -- since they may have different types (different parameters). -- See issue 279. -- Andreas, 2017-08-13, issue #2686: ignore abstract constructors (cs, cons) <- unzip . snd . partitionEithers <$> do forM (toList cs0) $ \ c -> mapRight (c,) <$> getConForm c reportSLn "tc.check.term.con" 40 $ " reduced: " ++ prettyShow cons case cons of [] -> typeError $ AbstractConstructorNotInScope $ headNe cs0 [con] -> do let c = setConName (fromMaybe __IMPOSSIBLE__ $ headMaybe cs) con reportSLn "tc.check.term.con" 40 $ " only one non-abstract constructor: " ++ prettyShow c storeDisambiguatedName $ conName c return (Right c) _ -> do dcs <- zipWithM (\ c con -> (, setConName c con) . getData . theDef <$> getConInfo con) cs cons -- Type error let badCon t = typeError $ flip DoesNotConstructAnElementOf t $ fromMaybe __IMPOSSIBLE__ $ headMaybe cs -- Lets look at the target type at this point let getCon :: TCM (Maybe ConHead) getCon = do TelV tel t1 <- telView t addContext tel $ do reportSDoc "tc.check.term.con" 40 $ nest 2 $ "target type: " <+> prettyTCM t1 ifBlockedType t1 (\ m t -> return Nothing) $ \ _ t' -> caseMaybeM (isDataOrRecord $ unEl t') (badCon t') $ \ d -> case [ c | (d', c) <- dcs, d == d' ] of [c] -> do reportSLn "tc.check.term.con" 40 $ " decided on: " ++ prettyShow c storeDisambiguatedName $ conName c return $ Just c [] -> badCon $ t' $> Def d [] cs -> typeError $ CantResolveOverloadedConstructorsTargetingSameDatatype d $ map conName cs getCon >>= \ case Nothing -> return $ Left $ isJust <$> getCon Just c -> return $ Right c --------------------------------------------------------------------------- -- * Projections --------------------------------------------------------------------------- -- | Inferring the type of an overloaded projection application. -- See 'inferOrCheckProjApp'. inferProjApp :: A.Expr -> ProjOrigin -> NonemptyList QName -> A.Args -> TCM (Term, Type) inferProjApp e o ds args0 = do (v, t, _) <- inferOrCheckProjApp e o ds args0 Nothing return (v, t) -- | Checking the type of an overloaded projection application. -- See 'inferOrCheckProjApp'. checkProjApp :: Comparison -> A.Expr -> ProjOrigin -> NonemptyList QName -> A.Args -> Type -> TCM Term checkProjApp cmp e o ds args0 t = do (v, ti, targetCheck) <- inferOrCheckProjApp e o ds args0 (Just (cmp, t)) coerce' cmp targetCheck v ti t -- | Checking the type of an overloaded projection application. -- See 'inferOrCheckProjAppToKnownPrincipalArg'. checkProjAppToKnownPrincipalArg :: Comparison -> A.Expr -> ProjOrigin -> NonemptyList QName -> A.Args -> Type -> Int -> Term -> Type -> TCM Term checkProjAppToKnownPrincipalArg cmp e o ds args0 t k v0 pt = do (v, ti, targetCheck) <- inferOrCheckProjAppToKnownPrincipalArg e o ds args0 (Just (cmp, t)) k v0 pt coerce' cmp targetCheck v ti t -- | Inferring or Checking an overloaded projection application. -- -- The overloaded projection is disambiguated by inferring the type of its -- principal argument, which is the first visible argument. inferOrCheckProjApp :: A.Expr -- ^ The whole expression which constitutes the application. -> ProjOrigin -- ^ The origin of the projection involved in this projection application. -> NonemptyList QName -- ^ The projection name (potentially ambiguous). -> A.Args -- ^ The arguments to the projection. -> Maybe (Comparison, Type) -- ^ The expected type of the expression (if 'Nothing', infer it). -> TCM (Term, Type, CheckedTarget) -- ^ The type-checked expression and its type (if successful). inferOrCheckProjApp e o ds args mt = do reportSDoc "tc.proj.amb" 20 $ vcat [ "checking ambiguous projection" , text $ " ds = " ++ prettyShow ds , text " args = " <+> sep (map prettyTCM args) , text " t = " <+> caseMaybe mt "Nothing" prettyTCM ] let cmp = caseMaybe mt CmpEq fst -- Postpone the whole type checking problem -- if type of principal argument (or the type where we get it from) -- is blocked by meta m. postpone m = do tc <- caseMaybe mt newTypeMeta_ (return . snd) v <- postponeTypeCheckingProblem (CheckExpr cmp e tc) $ isInstantiatedMeta m return (v, tc, NotCheckedTarget) -- The following cases need to be considered: -- 1. No arguments to the projection. -- 2. Arguments (parameters), but not the principal argument. -- 3. Argument(s) including the principal argument. -- For now, we only allow ambiguous projections if the first visible -- argument is the record value. case filter (visible . snd) $ zip [0..] args of -- Case: we have no visible argument to the projection. -- In inference mode, we really need the visible argument, postponing does not help [] -> caseMaybe mt (refuseProjNotApplied ds) $ \ (cmp , t) -> do -- If we have the type, we can try to get the type of the principal argument. -- It is the first visible argument. TelV _ptel core <- telViewUpTo' (-1) (not . visible) t ifBlockedType core (\ m _ -> postpone m) $ {-else-} \ _ core -> do ifNotPiType core (\ _ -> refuseProjNotApplied ds) $ {-else-} \ dom _b -> do ifBlockedType (unDom dom) (\ m _ -> postpone m) $ {-else-} \ _ ta -> do caseMaybeM (isRecordType ta) (refuseProjNotRecordType ds) $ \ (_q, _pars, defn) -> do case defn of Record { recFields = fs } -> do case forMaybe fs $ \ (Arg _ f) -> List.find (f ==) (toList ds) of [] -> refuseProjNoMatching ds [d] -> do storeDisambiguatedName d -- checkHeadApplication will check the target type (, t, CheckedTarget Nothing) <$> checkHeadApplication cmp e t (A.Proj o $ unambiguous d) args _ -> __IMPOSSIBLE__ _ -> __IMPOSSIBLE__ -- Case: we have a visible argument ((k, arg) : _) -> do (v0, ta) <- inferExpr $ namedArg arg reportSDoc "tc.proj.amb" 25 $ vcat [ " principal arg " <+> prettyTCM arg , " has type " <+> prettyTCM ta ] inferOrCheckProjAppToKnownPrincipalArg e o ds args mt k v0 ta -- | Same arguments 'inferOrCheckProjApp' above but also gets the position, -- value and type of the principal argument. inferOrCheckProjAppToKnownPrincipalArg :: A.Expr -> ProjOrigin -> NonemptyList QName -> A.Args -> Maybe (Comparison, Type) -> Int -> Term -> Type -> TCM (Term, Type, CheckedTarget) inferOrCheckProjAppToKnownPrincipalArg e o ds args mt k v0 ta = do let cmp = caseMaybe mt CmpEq fst postpone m = do tc <- caseMaybe mt newTypeMeta_ (return . snd) v <- postponeTypeCheckingProblem (CheckProjAppToKnownPrincipalArg cmp e o ds args tc k v0 ta) $ isInstantiatedMeta m return (v, tc, NotCheckedTarget) -- ta should be a record type (after introducing the hidden args in v0) (vargs, ta) <- implicitArgs (-1) (not . visible) ta let v = v0 `apply` vargs ifBlockedType ta (\ m _ -> postpone m) {-else-} $ \ _ ta -> do caseMaybeM (isRecordType ta) (refuseProjNotRecordType ds) $ \ (q, _pars0, _) -> do -- try to project it with all of the possible projections let try d = do reportSDoc "tc.proj.amb" 30 $ vcat [ text $ "trying projection " ++ prettyShow d , " td = " <+> caseMaybeM (getDefType d ta) "Nothing" prettyTCM ] -- get the original projection name def <- lift $ getConstInfo d let isP = isProjection_ $ theDef def reportSDoc "tc.proj.amb" 40 $ vcat $ [ text $ " isProjection = " ++ caseMaybe isP "no" (const "yes") ] ++ caseMaybe isP [] (\ Projection{ projProper = proper, projOrig = orig } -> [ text $ " proper = " ++ show proper , text $ " orig = " ++ prettyShow orig ]) -- Andreas, 2017-01-21, issue #2422 -- The scope checker considers inherited projections (from nested records) -- as projections and allows overloading. However, since they are defined -- as *composition* of projections, the type checker does *not* recognize them, -- and @isP@ will be @Nothing@. -- However, we can ignore this, as we only need the @orig@inal projection name -- for removing false ambiguity. Thus, we skip these checks: -- Projection{ projProper = proper, projOrig = orig } <- MaybeT $ return isP -- guard $ isJust proper let orig = caseMaybe isP d projOrig -- try to eliminate (dom, u, tb) <- MaybeT (projectTyped v ta o d `catchError` \ _ -> return Nothing) reportSDoc "tc.proj.amb" 30 $ vcat [ " dom = " <+> prettyTCM dom , " u = " <+> prettyTCM u , " tb = " <+> prettyTCM tb ] (q', pars, _) <- MaybeT $ isRecordType $ unDom dom reportSDoc "tc.proj.amb" 30 $ vcat [ " q = " <+> prettyTCM q , " q' = " <+> prettyTCM q' ] guard (q == q') -- Get the type of the projection and check -- that the first visible argument is the record value. let tfull = defType def TelV tel _ <- lift $ telViewUpTo' (-1) (not . visible) tfull reportSDoc "tc.proj.amb" 30 $ vcat [ text $ " size tel = " ++ show (size tel) , text $ " size pars = " ++ show (size pars) ] -- See issue 1960 for when the following assertion fails for -- the correct disambiguation. -- guard (size tel == size pars) guard =<< do isNothing <$> do lift $ checkRelevance' d def return (orig, (d, (pars, (dom, u, tb)))) cands <- groupOn fst . catMaybes <$> mapM (runMaybeT . try) (toList ds) case cands of [] -> refuseProjNoMatching ds [[]] -> refuseProjNoMatching ds (_:_:_) -> refuseProj ds $ "several matching candidates found: " ++ prettyShow (map (fst . snd) $ concat cands) -- case: just one matching projection d -- the term u = d v -- the type tb is the type of this application [ (_orig, (d, (pars, (_dom,u,tb)))) : _ ] -> do storeDisambiguatedName d -- Check parameters tfull <- typeOfConst d (_,_) <- checkKnownArguments (take k args) pars tfull -- Check remaining arguments let r = getRange e args' = drop (k + 1) args z <- runExceptT $ checkArgumentsE ExpandLast r args' tb (snd <$> mt) case z of Right (rs, us, trest, targetCheck) -> return (u `applyE` us, trest, targetCheck) Left problem -> do -- In the inference case: -- To create a postponed type checking problem, -- we do not use typeDontCare, but create a meta. tc <- caseMaybe mt newTypeMeta_ (return . snd) v <- postponeArgs problem ExpandLast r args' tc $ \ rs us trest targetCheck -> coerce' cmp targetCheck (u `applyE` us) trest tc return (v, tc, NotCheckedTarget) refuseProj :: NonemptyList QName -> String -> TCM a refuseProj ds reason = typeError $ GenericError $ "Cannot resolve overloaded projection " ++ prettyShow (A.nameConcrete $ A.qnameName $ headNe ds) ++ " because " ++ reason refuseProjNotApplied, refuseProjNoMatching, refuseProjNotRecordType :: NonemptyList QName -> TCM a refuseProjNotApplied ds = refuseProj ds "it is not applied to a visible argument" refuseProjNoMatching ds = refuseProj ds "no matching candidate found" refuseProjNotRecordType ds = refuseProj ds "principal argument is not of record type" ----------------------------------------------------------------------------- -- * Coinduction ----------------------------------------------------------------------------- checkSharpApplication :: A.Expr -> Type -> QName -> [NamedArg A.Expr] -> TCM Term checkSharpApplication e t c args = do arg <- case args of [a] | visible a -> return $ namedArg a _ -> typeError $ GenericError $ prettyShow c ++ " must be applied to exactly one argument." -- The name of the fresh function. i <- fresh :: TCM Int let name = filter (/= '_') (prettyShow $ A.nameConcrete $ A.qnameName c) ++ "-" ++ show i kit <- coinductionKit' let flat = nameOfFlat kit inf = nameOfInf kit -- Add the type signature of the fresh function to the -- signature. -- To make sure we can type check the generated function we have to make -- sure that its type is \inf. The reason for this is that we don't yet -- postpone checking of patterns when we don't know their types (Issue480). forcedType <- do lvl <- levelType (_, l) <- newValueMeta RunMetaOccursCheck lvl lv <- levelView l (_, a) <- newValueMeta RunMetaOccursCheck (sort $ Type lv) return $ El (Type lv) $ Def inf [Apply $ setHiding Hidden $ defaultArg l, Apply $ defaultArg a] wrapper <- inFreshModuleIfFreeParams $ do c' <- setRange (getRange c) <$> liftM2 qualify (killRange <$> currentModule) (freshName_ name) -- Define and type check the fresh function. rel <- asksTC envRelevance abs <- aModeToDef <$> asksTC envAbstractMode let info = A.mkDefInfo (A.nameConcrete $ A.qnameName c') noFixity' PublicAccess abs noRange core = A.LHSProj { A.lhsDestructor = unambiguous flat , A.lhsFocus = defaultNamedArg $ A.LHSHead c' [] , A.lhsPats = [] } clause = A.Clause (A.LHS empty core) [] (A.RHS arg Nothing) A.noWhereDecls False i <- currentOrFreshMutualBlock -- If we are in irrelevant position, add definition irrelevantly. -- TODO: is this sufficient? addConstant c' =<< do let ai = setRelevance rel defaultArgInfo useTerPragma $ (defaultDefn ai c' forcedType emptyFunction) { defMutual = i } checkFunDef NotDelayed info c' [clause] reportSDoc "tc.term.expr.coind" 15 $ do def <- theDef <$> getConstInfo c' vcat $ [ "The coinductive wrapper" , nest 2 $ prettyTCM rel <> prettyTCM c' <+> ":" , nest 4 $ prettyTCM t , nest 2 $ prettyA clause , "The definition is" <+> text (show $ funDelayed def) <> "." ] return c' -- The application of the fresh function to the relevant -- arguments. e' <- Def wrapper . map Apply <$> getContextArgs reportSDoc "tc.term.expr.coind" 15 $ vcat $ [ "The coinductive constructor application" , nest 2 $ prettyTCM e , "was translated into the application" , nest 2 $ prettyTCM e' ] blockTerm t $ e' <$ workOnTypes (leqType forcedType t) ----------------------------------------------------------------------------- -- * Cubical ----------------------------------------------------------------------------- -- | "pathAbs (PathView s _ l a x y) t" builds "(\ t) : pv" -- Preconditions: PathView is PathType, and t[i0] = x, t[i1] = y pathAbs :: PathView -> Abs Term -> TCM Term pathAbs (OType _) t = __IMPOSSIBLE__ pathAbs (PathType s path l a x y) t = do return $ Lam defaultArgInfo t -- | @primComp : ∀ {ℓ} (A : (i : I) → Set (ℓ i)) (φ : I) (u : ∀ i → Partial φ (A i)) (a : A i0) → A i1@ -- -- Check: @u i0 = (λ _ → a) : Partial φ (A i0)@. -- checkPrimComp :: QName -> MaybeRanges -> Args -> Type -> TCM Args checkPrimComp c rs vs _ = do case vs of -- WAS: [l, a, phi, u, a0] -> do l : a : phi : u : a0 : rest -> do iz <- Arg defaultArgInfo <$> intervalUnview IZero let lz = unArg l `apply` [iz] az = unArg a `apply` [iz] ty <- elInf $ primPartial <#> (pure $ unArg l `apply` [iz]) <@> (pure $ unArg phi) <@> (pure $ unArg a `apply` [iz]) bAz <- el' (pure $ lz) (pure $ az) a0 <- blockArg bAz (rs !!! 4) a0 $ do equalTerm ty -- (El (getSort t1) (apply (unArg a) [iz])) (Lam defaultArgInfo $ NoAbs "_" $ unArg a0) (apply (unArg u) [iz]) return $ l : a : phi : u : a0 : rest _ -> typeError $ GenericError $ show c ++ " must be fully applied" -- | @primHComp : ∀ {ℓ} {A : Set ℓ} {φ : I} (u : ∀ i → Partial φ A) (a : A) → A@ -- -- Check: @u i0 = (λ _ → a) : Partial φ A@. -- checkPrimHComp :: QName -> MaybeRanges -> Args -> Type -> TCM Args checkPrimHComp c rs vs _ = do case vs of -- WAS: [l, a, phi, u, a0] -> do l : a : phi : u : a0 : rest -> do -- iz = i0 iz <- Arg defaultArgInfo <$> intervalUnview IZero -- ty = Partial φ A ty <- elInf $ primPartial <#> (pure $ unArg l) <@> (pure $ unArg phi) <@> (pure $ unArg a) -- (λ _ → a) = u i0 : ty bA <- el' (pure $ unArg l) (pure $ unArg a) a0 <- blockArg bA (rs !!! 4) a0 $ do equalTerm ty -- (El (getSort t1) (apply (unArg a) [iz])) (Lam defaultArgInfo $ NoAbs "_" $ unArg a0) (apply (unArg u) [iz]) return $ l : a : phi : u : a0 : rest _ -> typeError $ GenericError $ show c ++ " must be fully applied" -- | @transp : ∀{ℓ} (A : (i : I) → Set (ℓ i)) (φ : I) (a0 : A i0) → A i1@ -- -- Check: If φ, then @A i = A i0 : Set (ℓ i)@ must hold for all @i : I@. -- checkPrimTrans :: QName -> MaybeRanges -> Args -> Type -> TCM Args checkPrimTrans c rs vs _ = do case vs of -- Andreas, 2019-03-02, issue #3601, why exactly 4 arguments? -- Only 3 are needed to check the side condition. -- WAS: -- [l, a, phi, a0] -> do l : a : phi : rest -> do iz <- Arg defaultArgInfo <$> intervalUnview IZero -- ty = (i : I) -> Set (l i) ty <- runNamesT [] $ do l <- open $ unArg l nPi' "i" (elInf $ cl primInterval) $ \ i -> (sort . tmSort <$> (l <@> i)) a <- blockArg ty (rs !!! 1) a $ do equalTermOnFace (unArg phi) ty (unArg a) (Lam defaultArgInfo $ NoAbs "_" $ apply (unArg a) [iz]) return $ l : a : phi : rest _ -> typeError $ GenericError $ show c ++ " must be fully applied" blockArg :: HasRange r => Type -> r -> Arg Term -> TCM () -> TCM (Arg Term) blockArg t r a m = setCurrentRange (getRange $ r) $ fmap (a $>) $ blockTerm t $ m >> return (unArg a) checkConId :: QName -> MaybeRanges -> Args -> Type -> TCM Args checkConId c rs vs t1 = do case vs of args@[_, _, _, _, phi, p] -> do iv@(PathType s _ l a x y) <- idViewAsPath t1 let ty = pathUnview iv -- the following duplicates reduction of phi const_x <- blockTerm ty $ do equalTermOnFace (unArg phi) (El s (unArg a)) (unArg x) (unArg y) pathAbs iv (NoAbs (stringToArgName "_") (unArg x)) p <- blockArg ty (rs !!! 5) p $ do equalTermOnFace (unArg phi) ty (unArg p) const_x -- G, phi |- p = \ i . x return $ init args ++ [p] -- phi <- reduce phi -- forallFaceMaps (unArg phi) $ \ alpha -> do -- iv@(PathType s _ l a x y) <- idViewAsPath (applySubst alpha t1) -- let ty = pathUnview iv -- equalTerm (El s (unArg a)) (unArg x) (unArg y) -- precondition for cx being well-typed at ty -- cx <- pathAbs iv (NoAbs (stringToArgName "_") (applySubst alpha (unArg x))) -- equalTerm ty (applySubst alpha (unArg p)) cx -- G, phi |- p = \ i . x _ -> typeError $ GenericError $ show c ++ " must be fully applied" -- The following comment contains silly ' escapes to calm CPP about ∨ (\vee). -- May not be haddock-parseable. -- ' @primPOr : ∀ {ℓ} (φ₁ φ₂ : I) {A : Partial (φ₁ ∨ φ₂) (Set ℓ)} -- ' → (u : PartialP φ₁ (λ (o : IsOne φ₁) → A (IsOne1 φ₁ φ₂ o))) -- ' → (v : PartialP φ₂ (λ (o : IsOne φ₂) → A (IsOne2 φ₁ φ₂ o))) -- ' → PartialP (φ₁ ∨ φ₂) A@ -- ' -- ' Checks: @u = v : PartialP (φ₁ ∨ φ₂) A@ whenever @IsOne (φ₁ ∧ φ₂)@. checkPOr :: QName -> MaybeRanges -> Args -> Type -> TCM Args checkPOr c rs vs _ = do case vs of l : phi1 : phi2 : a : u : v : rest -> do phi <- intervalUnview (IMin phi1 phi2) reportSDoc "tc.term.por" 10 $ text (show phi) -- phi <- reduce phi -- alphas <- toFaceMaps phi -- reportSDoc "tc.term.por" 10 $ text (show alphas) t1 <- runNamesT [] $ do [l,a] <- mapM (open . unArg) [l,a] psi <- open =<< intervalUnview (IMax phi1 phi2) pPi' "o" psi $ \ o -> el' l (a <..> o) tv <- runNamesT [] $ do [l,a,phi1,phi2] <- mapM (open . unArg) [l,a,phi1,phi2] pPi' "o" phi2 $ \ o -> el' l (a <..> (cl primIsOne2 <@> phi1 <@> phi2 <@> o)) v <- blockArg tv (rs !!! 5) v $ do -- ' φ₁ ∧ φ₂ ⊢ u , v : PartialP (φ₁ ∨ φ₂) \ o → a o equalTermOnFace phi t1 (unArg u) (unArg v) return $ l : phi1 : phi2 : a : u : v : rest _ -> typeError $ GenericError $ show c ++ " must be fully applied" -- | @prim^glue : ∀ {ℓ ℓ'} {A : Set ℓ} {φ : I} -- → {T : Partial φ (Set ℓ')} → {e : PartialP φ (λ o → T o ≃ A)} -- → (t : PartialP φ T) → (a : A) → primGlue A T e@ -- -- Check @φ ⊢ a = t 1=1@ or actually the equivalent: @(\ _ → a) = t : PartialP φ T@ check_glue :: QName -> MaybeRanges -> Args -> Type -> TCM Args check_glue c rs vs _ = do case vs of -- WAS: [la, lb, bA, phi, bT, e, t, a] -> do la : lb : bA : phi : bT : e : t : a : rest -> do let iinfo = setRelevance Irrelevant defaultArgInfo v <- runNamesT [] $ do [lb, la, bA, phi, bT, e, t] <- mapM (open . unArg) [lb, la, bA, phi, bT, e, t] let f o = cl primEquivFun <#> lb <#> la <#> (bT <..> o) <#> bA <@> (e <..> o) glam iinfo "o" $ \ o -> f o <@> (t <..> o) ty <- runNamesT [] $ do [lb, phi, bA] <- mapM (open . unArg) [lb, phi, bA] elInf $ cl primPartialP <#> lb <@> phi <@> (glam iinfo "o" $ \ _ -> bA) let a' = Lam iinfo (NoAbs "o" $ unArg a) ta <- el' (pure $ unArg la) (pure $ unArg bA) a <- blockArg ta (rs !!! 7) a $ equalTerm ty a' v return $ la : lb : bA : phi : bT : e : t : a : rest _ -> typeError $ GenericError $ show c ++ " must be fully applied" Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Term.hs0000644000000000000000000020545413466402171020215 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Term where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Monad.Trans import Control.Monad.Trans.Maybe import Control.Monad.State (get, put) import Control.Monad.Reader import Data.Maybe import Data.Either (partitionEithers, lefts) import Data.Monoid (mappend) import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import Agda.Interaction.Options import Agda.Interaction.Highlighting.Generate (disambiguateRecordFields) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views as A import qualified Agda.Syntax.Info as A import Agda.Syntax.Concrete.Pretty () -- only Pretty instances import Agda.Syntax.Concrete (FieldAssignment'(..), nameFieldA) import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Scope.Base ( ThingsInScope, AbstractName , emptyScopeInfo , exportedNamesInScope) import Agda.Syntax.Scope.Monad (getNamedScope, freshAbstractQName) import Agda.Syntax.Translation.InternalToAbstract (reify) import Agda.TypeChecking.Abstract import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Datatypes import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Generalize import Agda.TypeChecking.Implicit import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.IApplyConfluence import Agda.TypeChecking.Level import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Names import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Patterns.Abstract import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive import Agda.TypeChecking.Quote import Agda.TypeChecking.RecordPatterns import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Rules.LHS import Agda.TypeChecking.SizedTypes import Agda.TypeChecking.SizedTypes.Solve import Agda.TypeChecking.Sort import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Unquote import Agda.TypeChecking.Warnings import {-# SOURCE #-} Agda.TypeChecking.Empty ( ensureEmptyType ) import {-# SOURCE #-} Agda.TypeChecking.Rules.Def (checkFunDef', useTerPragma) import {-# SOURCE #-} Agda.TypeChecking.Rules.Decl (checkSectionApplication) import {-# SOURCE #-} Agda.TypeChecking.Rules.Application import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.NonemptyList import Agda.Utils.Pretty ( prettyShow ) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Types --------------------------------------------------------------------------- -- | Check that an expression is a type. isType :: A.Expr -> Sort -> TCM Type isType e s = traceCall (IsTypeCall e s) $ do v <- checkExpr e (sort s) return $ El s v -- | Check that an expression is a type without knowing the sort. isType_ :: A.Expr -> TCM Type isType_ e = traceCall (IsType_ e) $ do let fallback = isType e =<< do workOnTypes $ newSortMeta case unScope e of A.Fun i (Arg info t) b -> do a <- setArgInfo info . defaultDom <$> isType_ t b <- isType_ b s <- inferFunSort (getSort a) (getSort b) let t' = El s $ Pi a $ NoAbs underscore b noFunctionsIntoSize b t' return t' A.Pi _ tel e | null tel -> isType_ e A.Pi _ tel e -> do (t0, t') <- checkPiTelescope tel $ \ tel -> do t0 <- instantiateFull =<< isType_ e tel <- instantiateFull tel return (t0, telePi tel t0) checkTelePiSort t' noFunctionsIntoSize t0 t' return t' -- Setᵢ A.Set _ n -> do return $ sort (mkType n) -- Propᵢ A.Prop _ n -> do unlessM isPropEnabled $ typeError NeedOptionProp return $ sort (mkProp n) -- Set ℓ A.App i s arg | visible arg, A.Set _ 0 <- unScope s -> do unlessM hasUniversePolymorphism $ typeError $ GenericError $ "Use --universe-polymorphism to enable level arguments to Set" -- allow NonStrict variables when checking level -- Set : (NonStrict) Level -> Set\omega applyRelevanceToContext NonStrict $ sort . Type <$> checkLevel arg -- Prop ℓ A.App i s arg | visible arg, A.Prop _ 0 <- unScope s -> do unlessM isPropEnabled $ typeError NeedOptionProp unlessM hasUniversePolymorphism $ typeError $ GenericError $ "Use --universe-polymorphism to enable level arguments to Prop" applyRelevanceToContext NonStrict $ sort . Prop <$> checkLevel arg -- Issue #707: Check an existing interaction point A.QuestionMark minfo ii -> caseMaybeM (lookupInteractionMeta ii) fallback $ \ x -> do -- -- | Just x <- A.metaNumber minfo -> do reportSDoc "tc.ip" 20 $ fsep [ "Rechecking meta " , prettyTCM x , text $ " for interaction point " ++ show ii ] mv <- lookupMeta x let s0 = jMetaType . mvJudgement $ mv -- Andreas, 2016-10-14, issue #2257 -- The meta was created in a context of length @n@. let n = length . envContext . clEnv . miClosRange . mvInfo $ mv (vs, rest) <- splitAt n <$> getContextArgs reportSDoc "tc.ip" 20 $ vcat [ " s0 = " <+> prettyTCM s0 , " vs = " <+> prettyTCM vs , " rest = " <+> prettyTCM rest ] -- We assume the meta variable use here is in an extension of the original context. -- If not we revert to the old buggy behavior of #707 (see test/Succeed/Issue2257b). if (length vs /= n) then fallback else do s1 <- reduce =<< piApplyM s0 vs reportSDoc "tc.ip" 20 $ vcat [ " s1 = " <+> prettyTCM s1 ] reportSDoc "tc.ip" 70 $ vcat [ " s1 = " <+> text (show s1) ] case unEl s1 of Sort s -> return $ El s $ MetaV x $ map Apply vs _ -> __IMPOSSIBLE__ _ -> fallback checkLevel :: NamedArg A.Expr -> TCM Level checkLevel arg = do lvl <- levelType levelView =<< checkNamedArg arg lvl -- | Ensure that a (freshly created) function type does not inhabit 'SizeUniv'. -- Precondition: When @noFunctionsIntoSize t tBlame@ is called, -- we are in the context of @tBlame@ in order to print it correctly. -- Not being in context of @t@ should not matter, as we are only -- checking whether its sort reduces to 'SizeUniv'. noFunctionsIntoSize :: Type -> Type -> TCM () noFunctionsIntoSize t tBlame = do reportSDoc "tc.fun" 20 $ do let El s (Pi dom b) = tBlame sep [ "created function type " <+> prettyTCM tBlame , "with pts rule" <+> prettyTCM (getSort dom, getSort b, s) ] s <- reduce $ getSort t when (s == SizeUniv) $ do -- Andreas, 2015-02-14 -- We have constructed a function type in SizeUniv -- which is illegal to prevent issue 1428. typeError $ FunctionTypeInSizeUniv $ unEl tBlame -- | Check that an expression is a type which is equal to a given type. isTypeEqualTo :: A.Expr -> Type -> TCM Type isTypeEqualTo e0 t = scopedExpr e0 >>= \case A.ScopedExpr{} -> __IMPOSSIBLE__ A.Underscore i | A.metaNumber i == Nothing -> return t e -> workOnTypes $ do t' <- isType e (getSort t) t' <$ leqType t t' leqType_ :: Type -> Type -> TCM () leqType_ t t' = workOnTypes $ leqType t t' --------------------------------------------------------------------------- -- * Telescopes --------------------------------------------------------------------------- checkGeneralizeTelescope :: A.GeneralizeTelescope -> ([Maybe Name] -> Telescope -> TCM a) -> TCM a checkGeneralizeTelescope (A.GeneralizeTel vars tel) k = generalizeTelescope vars (checkTelescope tel) k -- | Type check a (module) telescope. -- Binds the variables defined by the telescope. checkTelescope :: A.Telescope -> (Telescope -> TCM a) -> TCM a checkTelescope = checkTelescope' LamNotPi -- | Type check the telescope of a dependent function type. -- Binds the resurrected variables defined by the telescope. -- The returned telescope is unmodified (not resurrected). checkPiTelescope :: A.Telescope -> (Telescope -> TCM a) -> TCM a checkPiTelescope = checkTelescope' PiNotLam -- | Flag to control resurrection on domains. data LamOrPi = LamNotPi -- ^ We are checking a module telescope. -- We pass into the type world to check the domain type. -- This resurrects the whole context. | PiNotLam -- ^ We are checking a telescope in a Pi-type. -- We stay in the term world, but add resurrected -- domains to the context to check the remaining -- domains and codomain of the Pi-type. deriving (Eq, Show) -- | Type check a telescope. Binds the variables defined by the telescope. checkTelescope' :: LamOrPi -> A.Telescope -> (Telescope -> TCM a) -> TCM a checkTelescope' lamOrPi [] ret = ret EmptyTel checkTelescope' lamOrPi (b : tel) ret = checkTypedBindings lamOrPi b $ \tel1 -> checkTelescope' lamOrPi tel $ \tel2 -> ret $ abstract tel1 tel2 -- | Check a typed binding and extends the context with the bound variables. -- The telescope passed to the continuation is valid in the original context. -- -- Parametrized by a flag wether we check a typed lambda or a Pi. This flag -- is needed for irrelevance. checkTypedBindings :: LamOrPi -> A.TypedBinding -> (Telescope -> TCM a) -> TCM a checkTypedBindings lamOrPi (A.TBind r xs' e) ret = do let xs = (map . fmap . fmap) A.unBind xs' -- Andreas, 2011-04-26 irrelevant function arguments may appear -- non-strictly in the codomain type -- 2011-10-04 if flag --experimental-irrelevance is set experimental <- optExperimentalIrrelevance <$> pragmaOptions t <- modEnv lamOrPi $ isType_ e -- Jesper, 2019-02-12, Issue #3534: warn if the type of an -- instance argument does not have the right shape unlessNull (filter isInstance xs') $ \ixs -> do (tel, target) <- getOutputTypeName t case target of OutputTypeName{} -> return () OutputTypeVar{} -> return () OutputTypeVisiblePi{} -> warning . InstanceArgWithExplicitArg =<< prettyTCM (A.TBind r ixs e) OutputTypeNameNotYetKnown{} -> return () NoOutputTypeName -> warning . InstanceNoOutputTypeName =<< prettyTCM (A.TBind r ixs e) let xs' = (map . mapRelevance) (modRel lamOrPi experimental) xs addContext (xs', t) $ ret $ namedBindsToTel xs t where -- if we are checking a typed lambda, we resurrect before we check the -- types, but do not modify the new context entries -- otherwise, if we are checking a pi, we do not resurrect, but -- modify the new context entries modEnv LamNotPi = workOnTypes modEnv _ = id modRel PiNotLam xp = if xp then irrToNonStrict else id modRel _ _ = id checkTypedBindings lamOrPi (A.TLet _ lbs) ret = do checkLetBindings lbs (ret EmptyTel) ifPath :: Type -> TCM a -> TCM a -> TCM a ifPath ty fallback work = do pv <- pathView ty if isPathType pv then work else fallback checkPath :: A.TypedBinding -> A.Expr -> Type -> TCM Term checkPath b@(A.TBind _ [x'] typ) body ty = do let x = (fmap . fmap) A.unBind x' info = getArgInfo x PathType s path level typ lhs rhs <- pathView ty interval <- elInf primInterval v <- addContext ([x], interval) $ checkExpr body (El (raise 1 s) (raise 1 (unArg typ) `apply` [argN $ var 0])) iZero <- primIZero iOne <- primIOne let lhs' = subst 0 iZero v rhs' = subst 0 iOne v let t = Lam info $ Abs (namedArgName x) v let btyp i = El s (unArg typ `apply` [argN i]) locallyTC eRange (const noRange) $ blockTerm ty $ traceCall (SetRange $ getRange body) $ do equalTerm (btyp iZero) lhs' (unArg lhs) equalTerm (btyp iOne) rhs' (unArg rhs) return t checkPath b body ty = __IMPOSSIBLE__ --------------------------------------------------------------------------- -- * Lambda abstractions --------------------------------------------------------------------------- -- | Type check a lambda expression. -- "checkLambda bs e ty" means (\ bs -> e) : ty checkLambda :: Comparison -> A.TypedBinding -> A.Expr -> Type -> TCM Term checkLambda cmp (A.TLet _ lbs) body target = checkLetBindings lbs (checkExpr body target) checkLambda cmp b@(A.TBind _ xs' typ) body target = do reportSLn "tc.term.lambda" 60 $ "checkLambda xs = " ++ prettyShow xs let numbinds = length xs possiblePath = numbinds == 1 && (case unScope typ of A.Underscore{} -> True _ -> False) && isRelevant info && visible info reportSLn "tc.term.lambda" 60 $ "possiblePath = " ++ show (possiblePath, numbinds, unScope typ, info) TelV tel btyp <- telViewUpTo numbinds target if size tel < numbinds || numbinds /= 1 then (if possiblePath then trySeeingIfPath else dontUseTargetType) else useTargetType tel btyp where xs = (map . fmap . fmap) A.unBind xs' info : _ = map getArgInfo xs trySeeingIfPath = do cubical <- optCubical <$> pragmaOptions reportSLn "tc.term.lambda" 60 $ "trySeeingIfPath for " ++ show xs let postpone' = if cubical then postpone else \ _ _ -> dontUseTargetType ifBlockedType target postpone' $ \ _ t -> do ifPath t dontUseTargetType $ if cubical then checkPath b body t else typeError $ GenericError $ "Option --cubical needed to build a path with a lambda abstraction" postpone m tgt = postponeTypeCheckingProblem_ $ CheckExpr cmp (A.Lam A.exprNoRange (A.DomainFull b) body) tgt dontUseTargetType = do -- Checking λ (xs : argsT) → body : target verboseS "tc.term.lambda" 5 $ tick "lambda-no-target-type" -- First check that argsT is a valid type argsT <- workOnTypes $ isType_ typ -- Andreas, 2015-05-28 Issue 1523 -- If argsT is a SizeLt, it must be non-empty to avoid non-termination. -- TODO: do we need to block checkExpr? checkSizeLtSat $ unEl argsT -- In order to have as much type information as possible when checking -- body, we first unify (xs : argsT) → ?t₁ with the target type. If this -- is inconclusive we need to block the resulting term so we create a -- fresh problem for the check. let tel = namedBindsToTel xs argsT reportSDoc "tc.term.lambda" 60 $ "dontUseTargetType tel =" <+> pretty tel -- DONT USE tel for addContext, as it loses NameIds. -- WRONG: t1 <- addContext tel $ workOnTypes newTypeMeta_ t1 <- addContext (xs, argsT) $ workOnTypes newTypeMeta_ -- Do not coerce hidden lambdas if notVisible info || any notVisible xs then do pid <- newProblem_ $ leqType (telePi tel t1) target -- Now check body : ?t₁ -- WRONG: v <- addContext tel $ checkExpr body t1 v <- addContext (xs, argsT) $ checkExpr' cmp body t1 -- Block on the type comparison blockTermOnProblem target (teleLam tel v) pid else do -- Now check body : ?t₁ -- WRONG: v <- addContext tel $ checkExpr body t1 v <- addContext (xs, argsT) $ checkExpr' cmp body t1 -- Block on the type comparison coerce cmp (teleLam tel v) (telePi tel t1) target useTargetType tel@(ExtendTel dom (Abs y EmptyTel)) btyp = do verboseS "tc.term.lambda" 5 $ tick "lambda-with-target-type" reportSLn "tc.term.lambda" 60 $ "useTargetType y = " ++ y let [x] = xs unless (sameHiding dom info) $ typeError $ WrongHidingInLambda target -- Andreas, 2011-10-01 ignore relevance in lambda if not explicitly given info <- lambdaModalityCheck dom info -- Andreas, 2015-05-28 Issue 1523 -- Ensure we are not stepping under a possibly non-existing size. -- TODO: do we need to block checkExpr? let a = unDom dom checkSizeLtSat $ unEl a -- We only need to block the final term on the argument type -- comparison. The body will be blocked if necessary. We still want to -- compare the argument types first, so we spawn a new problem for that -- check. (pid, argT) <- newProblem $ isTypeEqualTo typ a -- Andreas, Issue 630: take name from function type if lambda name is "_" v <- lambdaAddContext (namedArg x) y (defaultArgDom info argT) $ checkExpr' cmp body btyp blockTermOnProblem target (Lam info $ Abs (namedArgName x) v) pid useTargetType _ _ = __IMPOSSIBLE__ -- | Check that modality info in lambda is compatible with modality -- coming from the function type. -- If lambda has no user-given modality, copy that of function type. lambdaModalityCheck :: LensModality dom => dom -> ArgInfo -> TCM ArgInfo lambdaModalityCheck dom = lambdaQuantityCheck m <=< lambdaIrrelevanceCheck m where m = getModality dom -- | Check that irrelevance info in lambda is compatible with irrelevance -- coming from the function type. -- If lambda has no user-given relevance, copy that of function type. lambdaIrrelevanceCheck :: LensRelevance dom => dom -> ArgInfo -> TCM ArgInfo lambdaIrrelevanceCheck dom info -- Case: no specific user annotation: use relevance of function type | getRelevance info == defaultRelevance = return $ setRelevance (getRelevance dom) info -- Case: explicit user annotation is taken seriously | otherwise = do let rPi = getRelevance dom -- relevance of function type let rLam = getRelevance info -- relevance of lambda -- Andreas, 2017-01-24, issue #2429 -- we should report an error if we try to check a relevant function -- against an irrelevant function type (subtyping violation) unless (moreRelevant rPi rLam) $ do -- @rLam == Relevant@ is impossible here -- @rLam == Irrelevant@ is impossible here (least relevant) -- this error can only happen if @rLam == NonStrict@ and @rPi == Irrelevant@ unless (rLam == NonStrict) __IMPOSSIBLE__ -- separate tests for separate line nums unless (rPi == Irrelevant) __IMPOSSIBLE__ typeError WrongIrrelevanceInLambda return info -- | Check that quantity info in lambda is compatible with quantity -- coming from the function type. -- If lambda has no user-given quantity, copy that of function type. lambdaQuantityCheck :: LensQuantity dom => dom -> ArgInfo -> TCM ArgInfo lambdaQuantityCheck dom info -- Case: no specific user annotation: use quantity of function type | getQuantity info == defaultQuantity = return $ setQuantity (getQuantity dom) info -- Case: explicit user annotation is taken seriously | otherwise = do let qPi = getQuantity dom -- quantity of function type let qLam = getQuantity info -- quantity of lambda unless (moreQuantity qPi qLam) $ do -- the expected use qPi cannot be unrestricted when (qPi == Quantityω) __IMPOSSIBLE__ typeError WrongQuantityInLambda return info lambdaAddContext :: Name -> ArgName -> Dom Type -> TCM a -> TCM a lambdaAddContext x y dom | isNoName x = addContext (y, dom) -- Note: String instance | otherwise = addContext (x, dom) -- Name instance of addContext -- | Checking a lambda whose domain type has already been checked. checkPostponedLambda :: Comparison -> Arg ([WithHiding Name], Maybe Type) -> A.Expr -> Type -> TCM Term checkPostponedLambda cmp args@(Arg _ ([] , _ )) body target = do checkExpr' cmp body target checkPostponedLambda cmp args@(Arg info (WithHiding h x : xs, mt)) body target = do let postpone _ t = postponeTypeCheckingProblem_ $ CheckLambda cmp args body t lamHiding = mappend h $ getHiding info insertHiddenLambdas lamHiding target postpone $ \ t@(El _ (Pi dom b)) -> do -- Andreas, 2011-10-01 ignore relevance in lambda if not explicitly given info' <- setHiding lamHiding <$> lambdaModalityCheck dom info -- We only need to block the final term on the argument type -- comparison. The body will be blocked if necessary. We still want to -- compare the argument types first, so we spawn a new problem for that -- check. mpid <- caseMaybe mt (return Nothing) $ \ ascribedType -> Just <$> do newProblem_ $ leqType (unDom dom) ascribedType -- We type-check the body with the ascribedType given by the user -- to get better error messages. -- Using the type dom from the usage context would be more precise, -- though. let dom' = setRelevance (getRelevance info') . setHiding lamHiding $ maybe dom (dom $>) mt v <- lambdaAddContext x (absName b) dom' $ checkPostponedLambda cmp (Arg info (xs, mt)) body $ absBody b let v' = Lam info' $ Abs (nameToArgName x) v maybe (return v') (blockTermOnProblem t v') mpid -- | Insert hidden lambda until the hiding info of the domain type -- matches the expected hiding info. -- Throws 'WrongHidingInLambda' insertHiddenLambdas :: Hiding -- ^ Expected hiding. -> Type -- ^ Expected to be a function type. -> (MetaId -> Type -> TCM Term) -- ^ Continuation on blocked type. -> (Type -> TCM Term) -- ^ Continuation when expected hiding found. -- The continuation may assume that the @Type@ -- is of the form @(El _ (Pi _ _))@. -> TCM Term -- ^ Term with hidden lambda inserted. insertHiddenLambdas h target postpone ret = do -- If the target type is blocked, we postpone, -- because we do not know if a hidden lambda needs to be inserted. ifBlockedType target postpone $ \ _ t -> do case unEl t of Pi dom b -> do let h' = getHiding dom -- Found expected hiding: return function type. if sameHiding h h' then ret t else do -- Found a visible argument but expected a hidden one: -- That's an error, as we cannot insert a visible lambda. if visible h' then typeError $ WrongHidingInLambda target else do -- Otherwise, we found a hidden argument that we can insert. let x = absName b Lam (domInfo dom) . Abs x <$> do addContext (x, dom) $ insertHiddenLambdas h (absBody b) postpone ret _ -> typeError . GenericDocError =<< do "Expected " <+> prettyTCM target <+> " to be a function type" -- | @checkAbsurdLambda i h e t@ checks absurd lambda against type @t@. -- Precondition: @e = AbsurdLam i h@ checkAbsurdLambda :: Comparison -> A.ExprInfo -> Hiding -> A.Expr -> Type -> TCM Term checkAbsurdLambda cmp i h e t = do t <- instantiateFull t ifBlockedType t (\ m t' -> postponeTypeCheckingProblem_ $ CheckExpr cmp e t') $ \ _ t' -> do case unEl t' of Pi dom@(Dom{domInfo = info', unDom = a}) b | not (sameHiding h info') -> typeError $ WrongHidingInLambda t' | not (noMetas a) -> postponeTypeCheckingProblem (CheckExpr cmp e t') $ noMetas <$> instantiateFull a | otherwise -> blockTerm t' $ do ensureEmptyType (getRange i) a -- Add helper function top <- currentModule aux <- qualify top <$> freshName_ (getRange i, absurdLambdaName) -- if we are in irrelevant position, the helper function -- is added as irrelevant rel <- asksTC envRelevance reportSDoc "tc.term.absurd" 10 $ vcat [ "Adding absurd function" <+> prettyTCM rel <> prettyTCM aux , nest 2 $ "of type" <+> prettyTCM t' ] addConstant aux $ (\ d -> (defaultDefn (setRelevance rel info') aux t' d) { defPolarity = [Nonvariant] , defArgOccurrences = [Unused] }) $ emptyFunction { funClauses = [ Clause { clauseLHSRange = getRange e , clauseFullRange = getRange e , clauseTel = telFromList [fmap (absurdPatternName,) dom] , namedClausePats = [Arg info' $ Named (Just $ unranged $ absName b) $ absurdP 0] , clauseBody = Nothing , clauseType = Just $ setRelevance rel $ defaultArg $ absBody b , clauseCatchall = False , clauseUnreachable = Just True -- absurd clauses are unreachable } ] , funCompiled = Just Fail , funSplitTree = Just $ SplittingDone 0 , funMutual = Just [] , funTerminates = Just True } -- Andreas 2012-01-30: since aux is lifted to toplevel -- it needs to be applied to the current telescope (issue 557) tel <- getContextTelescope return $ Def aux $ map Apply $ teleArgs tel _ -> typeError $ ShouldBePi t' -- | @checkExtendedLambda i di qname cs e t@ check pattern matching lambda. -- Precondition: @e = ExtendedLam i di qname cs@ checkExtendedLambda :: Comparison -> A.ExprInfo -> A.DefInfo -> QName -> [A.Clause] -> A.Expr -> Type -> TCM Term checkExtendedLambda cmp i di qname cs e t = do -- Andreas, 2016-06-16 issue #2045 -- Try to get rid of unsolved size metas before we -- fix the type of the extended lambda auxiliary function solveSizeConstraints DontDefaultToInfty lamMod <- inFreshModuleIfFreeParams currentModule -- #2883: need a fresh module if refined params t <- instantiateFull t ifBlockedType t (\ m t' -> postponeTypeCheckingProblem_ $ CheckExpr cmp e t') $ \ _ t -> do j <- currentOrFreshMutualBlock rel <- asksTC envRelevance let info = setRelevance rel defaultArgInfo reportSDoc "tc.term.exlam" 20 $ text (show $ A.defAbstract di) <+> "extended lambda's implementation \"" <> prettyTCM qname <> "\" has type: " $$ prettyTCM t -- <+> " where clauses: " <+> text (show cs) args <- getContextArgs -- Andreas, Ulf, 2016-02-02: We want to postpone type checking an extended lambda -- in case the lhs checker failed due to insufficient type info for the patterns. -- Issues 480, 1159, 1811. (abstract (A.defAbstract di) $ do -- Andreas, 2013-12-28: add extendedlambda as @Function@, not as @Axiom@; -- otherwise, @addClause@ in @checkFunDef'@ fails (see issue 1009). addConstant qname =<< do useTerPragma $ (defaultDefn info qname t emptyFunction) { defMutual = j } checkFunDef' t info NotDelayed (Just $ ExtLamInfo lamMod Nothing) Nothing di qname cs whenNothingM (asksTC envMutualBlock) $ -- Andrea 10-03-2018: Should other checks be performed here too? e.g. termination/positivity/.. checkIApplyConfluence_ qname return $ Def qname $ map Apply args) where -- Concrete definitions cannot use information about abstract things. abstract ConcreteDef = inConcreteMode abstract AbstractDef = inAbstractMode -- | Run a computation. -- -- * If successful, that's it, we are done. -- -- * If @IlltypedPattern p a@, @NotADatatype a@ or @CannotEliminateWithPattern p a@ -- is thrown and type @a@ is blocked on some meta @x@, -- reset any changes to the state and pass (the error and) @x@ to the handler. -- -- * If @SplitError (UnificationStuck c tel us vs _)@ is thrown and the unification -- problem @us =?= vs : tel@ is blocked on some meta @x@ pass @x@ to the handler. -- -- * If another error was thrown or the type @a@ is not blocked, reraise the error. -- -- Note that the returned meta might only exists in the state where the error was -- thrown, thus, be an invalid 'MetaId' in the current state. -- catchIlltypedPatternBlockedOnMeta :: TCM a -> ((TCErr, MetaId) -> TCM a) -> TCM a catchIlltypedPatternBlockedOnMeta m handle = do -- Andreas, 2016-07-13, issue 2028. -- Save the state to rollback the changes to the signature. st <- getTC m `catchError` \ err -> do let reraise = throwError err -- Get the blocking meta responsible for the type error. -- If we do not find such a meta or the error should not be handled, -- we reraise the error. x <- maybe reraise return =<< do case err of TypeError s cl -> localTCState $ do putTC s enterClosure cl $ \case IlltypedPattern p a -> isBlockedType a SplitError (UnificationStuck c tel us vs _) -> do -- Andreas, 2018-11-23, re issue #3403 -- The following computation of meta-variables and picking -- of the first one, seems a bit brittle. -- I do not understand why there is a single @reduce@ here -- (seems to archieve a bit along @normalize@, but how much??). problem <- reduce =<< instantiateFull (flattenTel tel, us, vs) -- over-approximating the set of metas actually blocking unification return $ firstMeta problem SplitError (NotADatatype aClosure) -> enterClosure aClosure $ \ a -> isBlockedType a -- Andrea: TODO look for blocking meta in tClosure and its Sort. -- SplitError (CannotCreateMissingClause _ _ _ tClosure) -> CannotEliminateWithPattern p a -> isBlockedType a _ -> return Nothing _ -> return Nothing reportSDoc "tc.postpone" 20 $ vcat $ [ "checking definition blocked on meta: " <+> prettyTCM x ] -- Note that we messed up the state a bit. We might want to unroll these state changes. -- However, they are mostly harmless: -- 1. We created a new mutual block id. -- 2. We added a constant without definition. -- In fact, they are not so harmless, see issue 2028! -- Thus, reset the state! putTC st -- The meta might not be known in the reset state, as it could have been created -- somewhere on the way to the type error. lookupMeta' x >>= \case -- Case: we do not know the meta, so we reraise. Nothing -> reraise -- Case: we know the meta here. -- Andreas, 2018-11-23: I do not understand why @InstV@ is necessarily impossible. -- The reasoning is probably that the state @st@ is more advanced that @s@ -- in which @x@ was blocking, thus metas in @st@ should be more instantiated than -- in @s@. But issue #3403 presents a counterexample, so let's play save and reraise -- Just m | InstV{} <- mvInstantiation m -> __IMPOSSIBLE__ -- It cannot be instantiated yet. Just m | InstV{} <- mvInstantiation m -> reraise -- Case: the meta is frozen (and not an interaction meta). -- Postponing doesn't make sense, so we reraise. Just m | Frozen <- mvFrozen m -> isInteractionMeta x >>= \case Nothing -> reraise -- Remaining cases: the meta is known and can still be instantiated. Just{} -> handle (err, x) Just{} -> handle (err, x) --------------------------------------------------------------------------- -- * Records --------------------------------------------------------------------------- -- | Picks up record field assignments from modules that export a definition -- that has the same name as the missing field. expandModuleAssigns :: [Either A.Assign A.ModuleName] -- ^ Modules and field assignments. -> [C.Name] -- ^ Names of fields of the record type. -> TCM A.Assigns -- ^ Completed field assignments from modules. expandModuleAssigns mfs exs = do let (fs , ms) = partitionEithers mfs -- The visible fields of the record that have not been given by field assignments. exs' = exs List.\\ map (view nameFieldA) fs -- Getting assignments for the missing visible fields. fs' <- forM exs' $ \ f -> do -- Get the possible assignments for field f from the modules. pms <- forM ms $ \ m -> do modScope <- getNamedScope m let names :: ThingsInScope AbstractName names = exportedNamesInScope modScope return $ case Map.lookup f names of Just [n] -> Just (m, FieldAssignment f (A.nameExpr n)) _ -> Nothing -- If we have several matching assignments, that's an error. case catMaybes pms of [] -> return Nothing [(_, fa)] -> return (Just fa) mfas -> typeError . GenericDocError =<< do vcat $ [ "Ambiguity: the field" <+> prettyTCM f <+> "appears in the following modules: " ] ++ map (prettyTCM . fst) mfas return (fs ++ catMaybes fs') -- | @checkRecordExpression fs e t@ checks record construction against type @t@. -- Precondition @e = Rec _ fs@. checkRecordExpression :: Comparison -- ^ How do we related the inferred type of the record expression -- to the expected type? Subtype or equal type? -> A.RecordAssigns -- ^ @mfs@: modules and field assignments. -> A.Expr -- ^ Must be @A.Rec _ mfs@. -> Type -- ^ Expected type of record expression. -> TCM Term -- ^ Record value in internal syntax. checkRecordExpression cmp mfs e t = do reportSDoc "tc.term.rec" 10 $ sep [ "checking record expression" , prettyA e ] ifBlockedType t (\ _ t -> guessRecordType t) {-else-} $ \ _ t -> do case unEl t of -- Case: We know the type of the record already. Def r es -> do let ~(Just vs) = allApplyElims es reportSDoc "tc.term.rec" 20 $ text $ " r = " ++ prettyShow r reportSDoc "tc.term.rec" 30 $ " xs = " <> do text =<< prettyShow . map unArg <$> getRecordFieldNames r reportSDoc "tc.term.rec" 30 $ " ftel= " <> do prettyTCM =<< getRecordFieldTypes r reportSDoc "tc.term.rec" 30 $ " con = " <> do text =<< prettyShow <$> getRecordConstructor r def <- getRecordDef r let -- Field names (C.Name) with ArgInfo from record type definition. cxs = recordFieldNames def -- Just field names. xs = map unArg cxs -- Record constructor. con = killRange $ recConHead def reportSDoc "tc.term.rec" 20 $ vcat [ " xs = " <> return (P.pretty xs) , " ftel= " <> prettyTCM (recTel def) , " con = " <> return (P.pretty con) ] -- Andreas, 2018-09-06, issue #3122. -- Associate the concrete record field names used in the record expression -- to their counterpart in the record type definition. disambiguateRecordFields (map _nameFieldA $ lefts mfs) (map unArg $ recFields def) -- Compute the list of given fields, decorated with the ArgInfo from the record def. -- Andreas, 2019-03-18, issue #3122, also pick up non-visible fields from the modules. fs <- expandModuleAssigns mfs (map unArg cxs) -- Compute a list of metas for the missing visible fields. scope <- getScope let re = getRange e meta x = A.Underscore $ A.MetaInfo re scope Nothing (prettyShow x) -- In @es@ omitted explicit fields are replaced by underscores. -- Omitted implicit or instance fields -- are still left out and inserted later by checkArguments_. es <- insertMissingFields r meta fs cxs args <- checkArguments_ ExpandLast re es (recTel def `apply` vs) >>= \case (elims, remainingTel) | null remainingTel , Just args <- allApplyElims elims -> return args _ -> __IMPOSSIBLE__ -- Don't need to block here! reportSDoc "tc.term.rec" 20 $ text $ "finished record expression" return $ Con con ConORec (map Apply args) _ -> typeError $ ShouldBeRecordType t where -- Case: We don't know the type of the record. guessRecordType t = do let fields = [ x | Left (FieldAssignment x _) <- mfs ] rs <- findPossibleRecords fields case rs of -- If there are no records with the right fields we might as well fail right away. [] -> case fields of [] -> typeError $ GenericError "There are no records in scope" [f] -> typeError $ GenericError $ "There is no known record with the field " ++ prettyShow f _ -> typeError $ GenericError $ "There is no known record with the fields " ++ unwords (map prettyShow fields) -- If there's only one record with the appropriate fields, go with that. [r] -> do def <- getConstInfo r let rt = defType def vs <- newArgsMeta rt target <- reduce $ piApply rt vs s <- case unEl target of Sort s -> return s v -> do reportSDoc "impossible" 10 $ vcat [ "The impossible happened when checking record expression against meta" , "Candidate record type r = " <+> prettyTCM r , "Type of r = " <+> prettyTCM rt , "Ends in (should be sort)= " <+> prettyTCM v , text $ " Raw = " ++ show v ] __IMPOSSIBLE__ let inferred = El s $ Def r $ map Apply vs v <- checkExpr e inferred coerce cmp v inferred t -- Andreas 2012-04-21: OLD CODE, WRONG DIRECTION, I GUESS: -- blockTerm t $ v <$ leqType_ t inferred -- If there are more than one possible record we postpone _:_:_ -> do reportSDoc "tc.term.expr.rec" 10 $ sep [ "Postponing type checking of" , nest 2 $ prettyA e <+> ":" <+> prettyTCM t ] postponeTypeCheckingProblem_ $ CheckExpr cmp e t -- | @checkRecordUpdate ei recexpr fs e t@ -- Precondition @e = RecUpdate ei recexpr fs@. checkRecordUpdate :: Comparison -> A.ExprInfo -> A.Expr -> A.Assigns -> A.Expr -> Type -> TCM Term checkRecordUpdate cmp ei recexpr fs e t = do case unEl t of Def r vs -> do v <- checkExpr' cmp recexpr t name <- freshNoName (getRange recexpr) addLetBinding defaultArgInfo name v t $ do projs <- recFields <$> getRecordDef r -- Andreas, 2018-09-06, issue #3122. -- Associate the concrete record field names used in the record expression -- to their counterpart in the record type definition. disambiguateRecordFields (map _nameFieldA fs) (map unArg projs) axs <- getRecordFieldNames r let xs = map unArg axs es <- orderFields r (\ _ -> Nothing) axs $ map (\ (FieldAssignment x e) -> (x, Just e)) fs let es' = zipWith (replaceFields name ei) projs es checkExpr' cmp (A.Rec ei [ Left (FieldAssignment x e) | (x, Just e) <- zip xs es' ]) t MetaV _ _ -> do inferred <- inferExpr recexpr >>= reduce . snd case unEl inferred of MetaV _ _ -> postponeTypeCheckingProblem_ $ CheckExpr cmp e t _ -> do v <- checkExpr' cmp e inferred coerce cmp v inferred t _ -> typeError $ ShouldBeRecordType t where replaceFields :: Name -> A.ExprInfo -> Arg A.QName -> Maybe A.Expr -> Maybe A.Expr replaceFields n ei a@(Arg _ p) Nothing | visible a = Just $ A.App (A.defaultAppInfo $ getRange ei) (A.Def p) $ defaultNamedArg $ A.Var n replaceFields _ _ (Arg _ _) Nothing = Nothing replaceFields _ _ _ (Just e) = Just $ e --------------------------------------------------------------------------- -- * Literal --------------------------------------------------------------------------- checkLiteral :: Literal -> Type -> TCM Term checkLiteral lit t = do t' <- litType lit coerce CmpEq (Lit lit) t' t --------------------------------------------------------------------------- -- * Terms --------------------------------------------------------------------------- -- | Remove top layers of scope info of expression and set the scope accordingly -- in the 'TCState'. scopedExpr :: A.Expr -> TCM A.Expr scopedExpr (A.ScopedExpr scope e) = setScope scope >> scopedExpr e scopedExpr e = return e -- | Type check an expression. checkExpr :: A.Expr -> Type -> TCM Term checkExpr = checkExpr' CmpLeq checkExpr' :: Comparison -> A.Expr -> Type -> TCM Term checkExpr' cmp e t0 = verboseBracket "tc.term.expr.top" 5 "checkExpr" $ traceCall (CheckExprCall cmp e t0) $ localScope $ doExpandLast $ unfoldInlined =<< do reportSDoc "tc.term.expr.top" 15 $ "Checking" <+> sep [ fsep [ prettyTCM e, ":", prettyTCM t0 ] , nest 2 $ "at " <+> (text . prettyShow =<< getCurrentRange) ] reportSDoc "tc.term.expr.top.detailed" 80 $ "Checking" <+> fsep [ prettyTCM e, ":", text (show t0) ] t <- reduce t0 reportSDoc "tc.term.expr.top" 15 $ " --> " <+> prettyTCM t e <- scopedExpr e tryInsertHiddenLambda e t $ case e of A.ScopedExpr scope e -> __IMPOSSIBLE__ -- setScope scope >> checkExpr e t -- a meta variable without arguments: type check directly for efficiency A.QuestionMark i ii -> checkQuestionMark (newValueMeta' RunMetaOccursCheck) t0 i ii A.Underscore i -> checkUnderscore t0 i A.WithApp _ e es -> typeError $ NotImplemented "type checking of with application" -- check |- Set l : t (requires universe polymorphism) A.App i s arg@(Arg ai l) | A.Set _ 0 <- unScope s, visible ai -> ifNotM hasUniversePolymorphism (typeError $ GenericError "Use --universe-polymorphism to enable level arguments to Set") $ {- else -} do -- allow NonStrict variables when checking level -- Set : (NonStrict) Level -> Set\omega n <- applyRelevanceToContext NonStrict $ checkLevel arg -- check that Set (l+1) <= t reportSDoc "tc.univ.poly" 10 $ "checking Set " <+> prettyTCM n <+> "against" <+> prettyTCM t coerce cmp (Sort $ Type n) (sort $ Type $ levelSuc n) t -- check |- Prop l : t (requires universe polymorphism) A.App i s arg@(Arg ai l) | A.Prop _ 0 <- unScope s, visible ai -> ifNotM hasUniversePolymorphism (typeError $ GenericError "Use --universe-polymorphism to enable level arguments to Prop") $ {- else -} do n <- applyRelevanceToContext NonStrict $ checkLevel arg reportSDoc "tc.univ.poly" 10 $ "checking Prop " <+> prettyTCM n <+> "against" <+> prettyTCM t coerce cmp (Sort $ Prop n) (sort $ Type $ levelSuc n) t e0@(A.App i q (Arg ai e)) | A.Quote _ <- unScope q, visible ai -> do let quoted (A.Def x) = return x quoted (A.Macro x) = return x quoted (A.Proj o p) | Just x <- getUnambiguous p = return x quoted (A.Proj o p) = typeError $ GenericError $ "quote: Ambigous name: " ++ prettyShow (unAmbQ p) quoted (A.Con c) | Just x <- getUnambiguous c = return x quoted (A.Con c) = typeError $ GenericError $ "quote: Ambigous name: " ++ prettyShow (unAmbQ c) quoted (A.ScopedExpr _ e) = quoted e quoted _ = typeError $ GenericError $ "quote: not a defined name" x <- quoted (namedThing e) ty <- qNameType coerce cmp (quoteName x) ty t | A.QuoteTerm _ <- unScope q -> do (et, _) <- inferExpr (namedThing e) doQuoteTerm cmp et t A.Quote _ -> typeError $ GenericError "quote must be applied to a defined name" A.QuoteTerm _ -> typeError $ GenericError "quoteTerm must be applied to a term" A.Unquote _ -> typeError $ GenericError "unquote must be applied to a term" A.AbsurdLam i h -> checkAbsurdLambda cmp i h e t A.ExtendedLam i di qname cs -> checkExtendedLambda cmp i di qname cs e t A.Lam i (A.DomainFull b) e -> checkLambda cmp b e t A.Lam i (A.DomainFree x) e0 | isNothing (nameOf $ unArg x) -> checkExpr' cmp (A.Lam i (domainFree (getArgInfo x) $ A.unBind $ namedArg x) e0) t | otherwise -> typeError $ NotImplemented "named arguments in lambdas" A.Lit lit -> checkLiteral lit t A.Let i ds e -> checkLetBindings ds $ checkExpr' cmp e t A.Pi _ tel e | null tel -> checkExpr' cmp e t A.Pi _ tel e -> do (t0, t') <- checkPiTelescope tel $ \ tel -> do t0 <- instantiateFull =<< isType_ e tel <- instantiateFull tel return (t0, telePi tel t0) checkTelePiSort t' noFunctionsIntoSize t0 t' let s = getSort t' v = unEl t' when (s == Inf) $ reportSDoc "tc.term.sort" 20 $ vcat [ text ("reduced to omega:") , nest 2 $ "t =" <+> prettyTCM t' , nest 2 $ "cxt =" <+> (prettyTCM =<< getContextTelescope) ] coerce cmp v (sort s) t A.Generalized s e -> do (_, t') <- generalizeType s $ isType_ e noFunctionsIntoSize t' t' let s = getSort t' v = unEl t' when (s == Inf) $ reportSDoc "tc.term.sort" 20 $ vcat [ text ("reduced to omega:") , nest 2 $ "t =" <+> prettyTCM t' , nest 2 $ "cxt =" <+> (prettyTCM =<< getContextTelescope) ] coerce cmp v (sort s) t A.Fun _ (Arg info a) b -> do a' <- isType_ a b' <- isType_ b s <- inferFunSort (getSort a') (getSort b') let v = Pi (defaultArgDom info a') (NoAbs underscore b') noFunctionsIntoSize b' $ El s v coerce cmp v (sort s) t A.Set _ n -> do coerce cmp (Sort $ mkType n) (sort $ mkType $ n + 1) t A.Prop _ n -> do unlessM isPropEnabled $ typeError NeedOptionProp coerce cmp (Sort $ mkProp n) (sort $ mkType $ n + 1) t A.Rec _ fs -> checkRecordExpression cmp fs e t A.RecUpdate ei recexpr fs -> checkRecordUpdate cmp ei recexpr fs e t A.DontCare e -> -- resurrect vars ifM ((Irrelevant ==) <$> asksTC envRelevance) (dontCare <$> do applyRelevanceToContext Irrelevant $ checkExpr' cmp e t) (internalError "DontCare may only appear in irrelevant contexts") e0@(A.QuoteGoal _ x e) -> do qg <- quoteGoal t case qg of Left metas -> postponeTypeCheckingProblem (CheckExpr cmp e0 t) $ andM $ map isInstantiatedMeta metas Right quoted -> do tmType <- agdaTermType (v, ty) <- addLetBinding defaultArgInfo x quoted tmType (inferExpr e) coerce cmp v ty t e0@(A.QuoteContext _) -> do qc <- quoteContext case qc of Left metas -> postponeTypeCheckingProblem (CheckExpr cmp e0 t) $ andM $ map isInstantiatedMeta metas Right quotedContext -> do ctxType <- el $ list $ primArg <@> (unEl <$> agdaTypeType) coerce cmp quotedContext ctxType t e0@(A.Tactic i e xs ys) -> do qc <- quoteContext qg <- quoteGoal t let postpone metas = postponeTypeCheckingProblem (CheckExpr cmp e0 t) $ andM $ map isInstantiatedMeta metas case (qc, qg) of (Left metas1, Left metas2) -> postpone $ metas1 ++ metas2 (Left metas , Right _ ) -> postpone $ metas (Right _ , Left metas ) -> postpone $ metas (Right quotedCtx, Right quotedGoal) -> do quotedCtx <- defaultNamedArg <$> reify quotedCtx quotedGoal <- defaultNamedArg <$> reify quotedGoal let ai = A.defaultAppInfo (getRange i) tac = foldl (A.App ai) (A.App ai (A.App ai e quotedCtx) quotedGoal) xs result = foldl (A.App ai) (A.Unquote i) (defaultNamedArg tac : ys) checkExpr' cmp result t A.ETel _ -> __IMPOSSIBLE__ A.Dot{} -> typeError $ GenericError $ "Invalid dotted expression" -- Application _ | Application hd args <- appView e -> checkApplication cmp hd args e t `catchIlltypedPatternBlockedOnMeta` \ (err, x) -> do -- We could not check the term because the type of some pattern is blocked. -- It has to be blocked on some meta, so we can postpone, -- being sure it will be retried when a meta is solved -- (which might be the blocking meta in which case we actually make progress). reportSDoc "tc.term" 50 $ vcat $ [ "checking pattern got stuck on meta: " <+> text (show x) ] postponeTypeCheckingProblem (CheckExpr cmp e t) $ isInstantiatedMeta x where -- | Call checkExpr with an hidden lambda inserted if appropriate, -- else fallback. tryInsertHiddenLambda :: A.Expr -> Type -> TCM Term -> TCM Term tryInsertHiddenLambda e t fallback -- Insert hidden lambda if all of the following conditions are met: -- type is a hidden function type, {x : A} -> B or {{x : A}} -> B | Pi (Dom{domInfo = info, unDom = a}) b <- unEl t , let h = getHiding info , notVisible h -- expression is not a matching hidden lambda or question mark , not (hiddenLambdaOrHole h e) = do let proceed = doInsert info $ absName b -- If we skip the lambda insertion for an introduction, -- we will hit a dead end, so proceed no matter what. if definitelyIntroduction then proceed else do -- Andreas, 2017-01-19, issue #2412: -- We do not want to insert a hidden lambda if A is -- possibly empty type of sizes, as this will produce an error. reduce a >>= isSizeType >>= \case Just (BoundedLt u) -> ifBlocked u (\ _ _ -> fallback) $ \ _ v -> do ifM (checkSizeNeverZero v) proceed fallback `catchError` \_ -> fallback _ -> proceed | otherwise = fallback where re = getRange e rx = caseMaybe (rStart re) noRange $ \ pos -> posToRange pos pos doInsert info y = do x <- C.setNotInScope <$> freshName rx y reportSLn "tc.term.expr.impl" 15 $ "Inserting implicit lambda" checkExpr' cmp (A.Lam (A.ExprRange re) (domainFree info x) e) t hiddenLambdaOrHole h e = case e of A.AbsurdLam _ h' -> sameHiding h h' A.ExtendedLam _ _ _ cls -> any hiddenLHS cls A.Lam _ bind _ -> sameHiding h bind A.QuestionMark{} -> True _ -> False hiddenLHS (A.Clause (A.LHS _ (A.LHSHead _ (a : _))) _ _ _ _) = notVisible a hiddenLHS _ = False -- Things with are definitely introductions, -- thus, cannot be of hidden Pi-type, unless they are hidden lambdas. definitelyIntroduction = case e of A.Lam{} -> True A.AbsurdLam{} -> True A.Lit{} -> True A.Pi{} -> True A.Fun{} -> True A.Set{} -> True A.Prop{} -> True A.Rec{} -> True A.RecUpdate{} -> True A.ScopedExpr{} -> __IMPOSSIBLE__ A.ETel{} -> __IMPOSSIBLE__ _ -> False --------------------------------------------------------------------------- -- * Reflection --------------------------------------------------------------------------- doQuoteTerm :: Comparison -> Term -> Type -> TCM Term doQuoteTerm cmp et t = do et' <- etaContract =<< instantiateFull et case allMetasList et' of [] -> do q <- quoteTerm et' ty <- el primAgdaTerm coerce cmp q ty t metas -> postponeTypeCheckingProblem (DoQuoteTerm cmp et t) $ andM $ map isInstantiatedMeta metas -- | Checking `quoteGoal` (deprecated) quoteGoal :: Type -> TCM (Either [MetaId] Term) quoteGoal t = do t' <- etaContract =<< instantiateFull t case allMetasList t' of [] -> do quotedGoal <- quoteTerm (unEl t') return $ Right quotedGoal metas -> return $ Left metas -- | Checking `quoteContext` (deprecated) quoteContext :: TCM (Either [MetaId] Term) quoteContext = do contextTypes <- map (fmap snd) <$> getContext contextTypes <- etaContract =<< instantiateFull contextTypes case allMetasList contextTypes of [] -> do quotedContext <- buildList <*> mapM quoteDom contextTypes return $ Right quotedContext metas -> return $ Left metas -- | Unquote a TCM computation in a given hole. unquoteM :: A.Expr -> Term -> Type -> TCM () unquoteM tacA hole holeType = do tac <- checkExpr tacA =<< (el primAgdaTerm --> el (primAgdaTCM <#> primLevelZero <@> primUnit)) inFreshModuleIfFreeParams $ unquoteTactic tac hole holeType -- | Run a tactic `tac : Term → TC ⊤` in a hole (second argument) of the type -- given by the third argument. Runs the continuation if successful. unquoteTactic :: Term -> Term -> Type -> TCM () unquoteTactic tac hole goal = do ok <- runUnquoteM $ unquoteTCM tac hole case ok of Left (BlockedOnMeta oldState x) -> do putTC oldState mi <- lookupMeta' x (r, meta) <- case mi of Nothing -> do -- fresh meta: need to block on something else! (noRange,) . firstMeta <$> instantiateFull goal -- Remark: -- Nothing: Nothing to block on, leave it yellow. Alternative: fail. -- Just x: range? Just mi -> return (getRange mi, Just x) setCurrentRange r $ addConstraint (UnquoteTactic meta tac hole goal) Left err -> typeError $ UnquoteFailed err Right _ -> return () --------------------------------------------------------------------------- -- * Meta variables --------------------------------------------------------------------------- -- | Check an interaction point without arguments. checkQuestionMark :: (Type -> TCM (MetaId, Term)) -> Type -> A.MetaInfo -> InteractionId -> TCM Term checkQuestionMark new t0 i ii = do reportSDoc "tc.interaction" 20 $ sep [ "Found interaction point" , pretty ii , ":" , prettyTCM t0 ] reportSDoc "tc.interaction" 60 $ sep [ "Raw:" , text (show t0) ] checkMeta (newQuestionMark' new ii) t0 i -- Andreas, 2013-05-22 use unreduced type t0! -- | Check an underscore without arguments. checkUnderscore :: Type -> A.MetaInfo -> TCM Term checkUnderscore = checkMeta (newValueMeta RunMetaOccursCheck) -- | Type check a meta variable. checkMeta :: (Type -> TCM (MetaId, Term)) -> Type -> A.MetaInfo -> TCM Term checkMeta newMeta t i = fst <$> checkOrInferMeta newMeta (Just t) i -- | Infer the type of a meta variable. -- If it is a new one, we create a new meta for its type. inferMeta :: (Type -> TCM (MetaId, Term)) -> A.MetaInfo -> TCM (Elims -> Term, Type) inferMeta newMeta i = mapFst applyE <$> checkOrInferMeta newMeta Nothing i -- | Type check a meta variable. -- If its type is not given, we return its type, or a fresh one, if it is a new meta. -- If its type is given, we check that the meta has this type, and we return the same -- type. checkOrInferMeta :: (Type -> TCM (MetaId, Term)) -> Maybe Type -> A.MetaInfo -> TCM (Term, Type) checkOrInferMeta newMeta mt i = do case A.metaNumber i of Nothing -> do setScope (A.metaScope i) t <- maybe (workOnTypes $ newTypeMeta_) return mt (x, v) <- newMeta t setMetaNameSuggestion x (A.metaNameSuggestion i) return (v, t) -- Rechecking an existing metavariable Just x -> do let v = MetaV x [] reportSDoc "tc.meta.check" 20 $ "checking existing meta " <+> prettyTCM v t' <- jMetaType . mvJudgement <$> lookupMeta x reportSDoc "tc.meta.check" 20 $ nest 2 $ "of type " <+> prettyTCM t' case mt of Nothing -> return (v, t') Just t -> (,t) <$> coerce CmpLeq v t' t -- | Turn a domain-free binding (e.g. lambda) into a domain-full one, -- by inserting an underscore for the missing type. domainFree :: ArgInfo -> A.Name -> A.LamBinding domainFree info x = A.DomainFull $ A.TBind r [unnamedArg info $ A.BindName x] $ A.Underscore underscoreInfo where r = getRange x underscoreInfo = A.MetaInfo { A.metaRange = r , A.metaScope = emptyScopeInfo , A.metaNumber = Nothing , A.metaNameSuggestion = prettyShow $ A.nameConcrete x } -- | Check arguments whose value we already know. -- -- This function can be used to check user-supplied parameters -- we have already computed by inference. -- -- Precondition: The type @t@ of the head has enough domains. checkKnownArguments :: [NamedArg A.Expr] -- ^ User-supplied arguments (hidden ones may be missing). -> Args -- ^ Inferred arguments (including hidden ones). -> Type -- ^ Type of the head (must be Pi-type with enough domains). -> TCM (Args, Type) -- ^ Remaining inferred arguments, remaining type. checkKnownArguments [] vs t = return (vs, t) checkKnownArguments (arg : args) vs t = do (vs', t') <- traceCall (SetRange $ getRange arg) $ checkKnownArgument arg vs t checkKnownArguments args vs' t' -- | Check an argument whose value we already know. checkKnownArgument :: NamedArg A.Expr -- ^ User-supplied argument. -> Args -- ^ Inferred arguments (including hidden ones). -> Type -- ^ Type of the head (must be Pi-type with enough domains). -> TCM (Args, Type) -- ^ Remaining inferred arguments, remaining type. checkKnownArgument arg [] _ = genericDocError =<< do "Invalid projection parameter " <+> prettyA arg checkKnownArgument arg@(Arg info e) (Arg _infov v : vs) t = do (Dom{domInfo = info',unDom = a}, b) <- mustBePi t -- Skip the arguments from vs that do not correspond to e if not (sameHiding info info' && (visible info || maybe True ((absName b ==) . rangedThing) (nameOf e))) -- Continue with the next one then checkKnownArgument arg vs (b `absApp` v) -- Found the right argument else do u <- checkNamedArg arg a equalTerm a u v return (vs, b `absApp` v) -- | Check a single argument. checkNamedArg :: NamedArg A.Expr -> Type -> TCM Term checkNamedArg arg@(Arg info e0) t0 = do let e = namedThing e0 let x = maybe "" rangedThing $ nameOf e0 traceCall (CheckExprCall CmpLeq e t0) $ do reportSDoc "tc.term.args.named" 15 $ do "Checking named arg" <+> sep [ fsep [ prettyTCM arg, ":", prettyTCM t0 ] ] reportSLn "tc.term.args.named" 75 $ " arg = " ++ show (deepUnscope arg) -- Ulf, 2017-03-24: (#2172) Always treat explicit _ and ? as implicit -- argument (i.e. solve with unification). let checkU = checkMeta (newMetaArg (setHiding Hidden info) x) t0 let checkQ = checkQuestionMark (newInteractionMetaArg (setHiding Hidden info) x) t0 if not $ isHole e then checkExpr e t0 else localScope $ do -- Note: we need localScope here, -- as scopedExpr manipulates the scope in the state. -- However, we may not pull localScope over checkExpr! -- This is why we first test for isHole, and only do -- scope manipulations if we actually handle the checking -- of e here (and not pass it to checkExpr). scopedExpr e >>= \case A.Underscore i -> checkU i A.QuestionMark i ii -> checkQ i ii _ -> __IMPOSSIBLE__ where isHole A.Underscore{} = True isHole A.QuestionMark{} = True isHole (A.ScopedExpr _ e) = isHole e isHole _ = False -- | Infer the type of an expression. Implemented by checking against a meta -- variable. Except for neutrals, for them a polymorphic type is inferred. inferExpr :: A.Expr -> TCM (Term, Type) -- inferExpr e = inferOrCheck e Nothing inferExpr = inferExpr' DontExpandLast inferExpr' :: ExpandHidden -> A.Expr -> TCM (Term, Type) inferExpr' exh e = traceCall (InferExpr e) $ do let Application hd args = appView e reportSDoc "tc.infer" 30 $ vcat [ "inferExpr': appView of " <+> prettyA e , " hd = " <+> prettyA hd , " args = " <+> prettyAs args ] reportSDoc "tc.infer" 60 $ vcat [ text $ " hd (raw) = " ++ show hd ] inferApplication exh hd args e defOrVar :: A.Expr -> Bool defOrVar A.Var{} = True defOrVar A.Def{} = True defOrVar A.Proj{} = True defOrVar (A.ScopedExpr _ e) = defOrVar e defOrVar _ = False -- | Used to check aliases @f = e@. -- Switches off 'ExpandLast' for the checking of top-level application. checkDontExpandLast :: Comparison -> A.Expr -> Type -> TCM Term checkDontExpandLast cmp e t = case e of _ | Application hd args <- appView e, defOrVar hd -> traceCall (CheckExprCall cmp e t) $ localScope $ dontExpandLast $ do checkApplication cmp hd args e t _ -> checkExpr' cmp e t -- note that checkExpr always sets ExpandLast -- | Check whether a de Bruijn index is bound by a module telescope. isModuleFreeVar :: Int -> TCM Bool isModuleFreeVar i = do params <- moduleParamsToApply =<< currentModule return $ any ((== Var i []) . unArg) params -- | Infer the type of an expression, and if it is of the form -- @{tel} -> D vs@ for some datatype @D@ then insert the hidden -- arguments. Otherwise, leave the type polymorphic. inferExprForWith :: A.Expr -> TCM (Term, Type) inferExprForWith e = do reportSDoc "tc.with.infer" 20 $ "inferExprforWith " <+> prettyTCM e reportSLn "tc.with.infer" 80 $ "inferExprforWith " ++ show (deepUnscope e) traceCall (InferExpr e) $ do -- With wants type and term fully instantiated! (v, t) <- instantiateFull =<< inferExpr e v0 <- reduce v -- Andreas 2014-11-06, issue 1342. -- Check that we do not `with` on a module parameter! case v0 of Var i [] -> whenM (isModuleFreeVar i) $ do reportSDoc "tc.with.infer" 80 $ vcat [ text $ "with expression is variable " ++ show i , "current modules = " <+> do text . show =<< currentModule , "current module free vars = " <+> do text . show =<< getCurrentModuleFreeVars , "context size = " <+> do text . show =<< getContextSize , "current context = " <+> do prettyTCM =<< getContextTelescope ] typeError $ WithOnFreeVariable e v0 _ -> return () -- Possibly insert hidden arguments. TelV tel t0 <- telViewUpTo' (-1) (not . visible) t case unEl t0 of Def d vs -> do res <- isDataOrRecordType d case res of Nothing -> return (v, t) Just{} -> do (args, t1) <- implicitArgs (-1) notVisible t return (v `apply` args, t1) _ -> return (v, t) --------------------------------------------------------------------------- -- * Let bindings --------------------------------------------------------------------------- checkLetBindings :: [A.LetBinding] -> TCM a -> TCM a checkLetBindings = foldr (.) id . map checkLetBinding checkLetBinding :: A.LetBinding -> TCM a -> TCM a checkLetBinding b@(A.LetBind i info x t e) ret = traceCall (CheckLetBinding b) $ do t <- isType_ t v <- applyModalityToContext info $ checkDontExpandLast CmpLeq e t addLetBinding info (A.unBind x) v t ret checkLetBinding b@(A.LetPatBind i p e) ret = traceCall (CheckLetBinding b) $ do p <- expandPatternSynonyms p (v, t) <- inferExpr' ExpandLast e let -- construct a type t -> dummy for use in checkLeftHandSide t0 = El (getSort t) $ Pi (defaultDom t) (NoAbs underscore __DUMMY_TYPE__) p0 = Arg defaultArgInfo (Named Nothing p) reportSDoc "tc.term.let.pattern" 10 $ vcat [ "let-binding pattern p at type t" , nest 2 $ vcat [ "p (A) =" <+> prettyA p , "t =" <+> prettyTCM t , "cxtRel=" <+> do pretty =<< asksTC envRelevance ] ] fvs <- getContextSize checkLeftHandSide (CheckPattern p EmptyTel t) Nothing [p0] t0 Nothing [] $ \ (LHSResult _ delta0 ps _ _t _ asb _) -> bindAsPatterns asb $ do -- After dropping the free variable patterns there should be a single pattern left. let p = case drop fvs ps of [p] -> namedArg p; _ -> __IMPOSSIBLE__ -- Also strip the context variables from the telescope delta = telFromList $ drop fvs $ telToList delta0 reportSDoc "tc.term.let.pattern" 20 $ nest 2 $ vcat [ "p (I) =" <+> prettyTCM p , "delta =" <+> prettyTCM delta , "cxtRel=" <+> do pretty =<< asksTC envRelevance ] reportSDoc "tc.term.let.pattern" 80 $ nest 2 $ vcat [ "p (I) =" <+> (text . show) p ] -- We translate it into a list of projections. fs <- recordPatternToProjections p -- We remove the bindings for the pattern variables from the context. cxt0 <- getContext let (binds, cxt) = splitAt (size delta) cxt0 toDrop = length binds -- We create a substitution for the let-bound variables -- (unfortunately, we cannot refer to x in internal syntax -- so we have to copy v). sigma = map ($ v) fs -- We apply the types of the let bound-variables to this substitution. -- The 0th variable in a context is the last one, so we reverse. -- Further, we need to lower all other de Bruijn indices by -- the size of delta, so we append the identity substitution. sub = parallelS (reverse sigma) updateContext sub (drop toDrop) $ do reportSDoc "tc.term.let.pattern" 20 $ nest 2 $ vcat [ "delta =" <+> prettyTCM delta , "binds =" <+> prettyTCM binds ] let fdelta = flattenTel delta reportSDoc "tc.term.let.pattern" 20 $ nest 2 $ vcat [ "fdelta =" <+> addContext delta (prettyTCM fdelta) ] let tsl = applySubst sub fdelta -- We get a list of types let ts = map unDom tsl -- and relevances. let infos = map domInfo tsl -- We get list of names of the let-bound vars from the context. let xs = map (fst . unDom) (reverse binds) -- We add all the bindings to the context. foldr (uncurry4 addLetBinding) ret $ List.zip4 infos xs sigma ts checkLetBinding (A.LetApply i x modapp copyInfo _adir) ret = do -- Any variables in the context that doesn't belong to the current -- module should go with the new module. -- Example: @f x y = let open M t in u@. -- There are 2 @new@ variables, @x@ and @y@, going into the anonynous module -- @module _ (x : _) (y : _) = M t@. fv <- getCurrentModuleFreeVars n <- getContextSize let new = n - fv reportSLn "tc.term.let.apply" 10 $ "Applying " ++ show modapp ++ " with " ++ show new ++ " free variables" reportSDoc "tc.term.let.apply" 20 $ vcat [ "context =" <+> (prettyTCM =<< getContextTelescope) , "module =" <+> (prettyTCM =<< currentModule) , "fv =" <+> (text $ show fv) ] checkSectionApplication i x modapp copyInfo withAnonymousModule x new ret -- LetOpen and LetDeclaredVariable are only used for highlighting. checkLetBinding A.LetOpen{} ret = ret checkLetBinding (A.LetDeclaredVariable _) ret = ret Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Term.hs-boot0000644000000000000000000000107213466402171021144 0ustar0000000000000000 module Agda.TypeChecking.Rules.Term where import Agda.Syntax.Common (WithHiding, Arg) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base isType_ :: A.Expr -> TCM Type checkExpr :: A.Expr -> Type -> TCM Term checkExpr' :: Comparison -> A.Expr -> Type -> TCM Term inferExpr :: A.Expr -> TCM (Term, Type) checkPostponedLambda :: Comparison -> Arg ([WithHiding Name], Maybe Type) -> A.Expr -> Type -> TCM Term doQuoteTerm :: Comparison -> Term -> Type -> TCM Term unquoteTactic :: Term -> Term -> Type -> TCM () Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Data.hs0000644000000000000000000014354613466402171020162 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Data where import Control.Monad import Data.List (genericTake) import Data.Maybe (fromMaybe, catMaybes, isJust) import Control.Monad.Trans.Maybe import Control.Monad.Trans import Data.Set (Set) import qualified Data.Set as Set import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Abstract.Views (deepUnscope) import Agda.Syntax.Internal import Agda.Syntax.Common import Agda.Syntax.Position import qualified Agda.Syntax.Info as Info import Agda.Syntax.Scope.Monad import Agda.Syntax.Fixity import {-# SOURCE #-} Agda.TypeChecking.CompiledClause.Compile import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin -- (primLevel) import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.Substitute import Agda.TypeChecking.Generalize import Agda.TypeChecking.Implicit import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Names import Agda.TypeChecking.Reduce import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Free import Agda.TypeChecking.Forcing import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Telescope import Agda.TypeChecking.ProjectionLike import {-# SOURCE #-} Agda.TypeChecking.Rules.Term ( isType_ ) import Agda.Interaction.Options import Agda.Utils.Except import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Datatypes --------------------------------------------------------------------------- -- | Type check a datatype definition. Assumes that the type has already been -- checked. checkDataDef :: Info.DefInfo -> QName -> UniverseCheck -> A.DataDefParams -> [A.Constructor] -> TCM () checkDataDef i name uc (A.DataDefParams gpars ps) cs = traceCall (CheckDataDef (getRange name) name ps cs) $ do -- Add the datatype module addSection (qnameToMName name) -- Look up the type of the datatype. def <- instantiateDef =<< getConstInfo name t <- instantiateFull $ defType def let npars = case theDef def of DataOrRecSig n -> n _ -> __IMPOSSIBLE__ -- Make sure the shape of the type is visible let unTelV (TelV tel a) = telePi tel a t <- unTelV <$> telView t parNames <- getGeneralizedParameters gpars name -- Top level free vars freeVars <- getContextSize -- The parameters are in scope when checking the constructors. dataDef <- bindGeneralizedParameters parNames t $ \ gtel t0 -> bindParameters (npars - length parNames) ps t0 $ \ ptel t0 -> do -- Parameters are always hidden in constructors let tel = abstract gtel ptel tel' = hideAndRelParams <$> tel -- let tel' = hideTel tel -- The type we get from bindParameters is Θ -> s where Θ is the type of -- the indices. We count the number of indices and return s. -- We check that s is a sort. let TelV ixTel s0 = telView' t0 nofIxs = size ixTel s <- workOnTypes $ do -- Andreas, 2016-11-02 issue #2290 -- Trying to unify the sort with a fresh sort meta which is -- defined outside the index telescope is the most robust way -- to check independence of the indices. -- However, it might give the dreaded "Cannot instantiate meta..." -- error which we replace by a more understandable error -- in case of a suspected dependency. s <- newSortMetaBelowInf catchError_ (addContext ixTel $ equalType s0 $ raise nofIxs $ sort s) $ \ err -> if any (`freeIn` s0) [0..nofIxs - 1] then typeError . GenericDocError =<< fsep [ "The sort of" <+> prettyTCM name , "cannot depend on its indices in the type" , prettyTCM t0 ] else throwError err reduce s -- when `--without-K`, all the indices should fit in the -- sort of the datatype (see #3420). let s' = case s of Prop l -> Type l _ -> s whenM withoutKOption $ checkIndexSorts s' ixTel reportSDoc "tc.data.sort" 20 $ vcat [ "checking datatype" <+> prettyTCM name , nest 2 $ vcat [ "type (parameters instantiated): " <+> prettyTCM t0 , "type (full): " <+> prettyTCM t , "sort: " <+> prettyTCM s , "indices:" <+> text (show nofIxs) , "gparams:" <+> text (show parNames) , "params: " <+> text (show $ deepUnscope ps) ] ] let npars = size tel -- Change the datatype from an axiom to a datatype with no constructors. let dataDef = Datatype { dataPars = npars , dataIxs = nofIxs , dataInduction = Inductive , dataClause = Nothing , dataCons = [] -- Constructors are added later , dataSort = s , dataAbstr = Info.defAbstract i , dataMutual = Nothing , dataPathCons = [] -- Path constructors are added later } escapeContext npars $ do addConstant name $ defaultDefn defaultArgInfo name t dataDef -- polarity and argOcc.s determined by the positivity checker -- Check the types of the constructors pathCons <- forM cs $ \ c -> do isPathCons <- checkConstructor name uc tel' nofIxs s c return $ if isPathCons == PathCons then Just (A.axiomName c) else Nothing -- Return the data definition return dataDef{ dataPathCons = catMaybes pathCons } let s = dataSort dataDef cons = map A.axiomName cs -- get constructor names -- Add the datatype to the signature with its constructors. -- It was previously added without them. addConstant name $ defaultDefn defaultArgInfo name t $ dataDef{ dataCons = cons } -- | Ensure that the type is a sort. -- If it is not directly a sort, compare it to a 'newSortMetaBelowInf'. forceSort :: Type -> TCM Sort forceSort t = reduce (unEl t) >>= \case Sort s -> return s _ -> do s <- newSortMetaBelowInf equalType t (sort s) return s -- | Type check a constructor declaration. Checks that the constructor targets -- the datatype and that it fits inside the declared sort. -- Returns the non-linear parameters. checkConstructor :: QName -- ^ Name of data type. -> UniverseCheck -- ^ Check universes? -> Telescope -- ^ Parameter telescope. -> Nat -- ^ Number of indices of the data type. -> Sort -- ^ Sort of the data type. -> A.Constructor -- ^ Constructor declaration (type signature). -> TCM IsPathCons checkConstructor d uc tel nofIxs s (A.ScopedDecl scope [con]) = do setScope scope checkConstructor d uc tel nofIxs s con checkConstructor d uc tel nofIxs s con@(A.Axiom _ i ai Nothing c e) = traceCall (CheckConstructor d tel s con) $ do {- WRONG -- Andreas, 2011-04-26: the following happens to the right of ':' -- we may use irrelevant arguments in a non-strict way in types t' <- workOnTypes $ do -} debugEnter c e -- check that we are relevant case getRelevance ai of Relevant -> return () Irrelevant -> typeError $ GenericError $ "Irrelevant constructors are not supported" NonStrict -> typeError $ GenericError $ "Shape-irrelevant constructors are not supported" -- check that the type of the constructor is well-formed (t, isPathCons) <- checkConstructorType e d -- compute which constructor arguments are forced forcedArgs <- computeForcingAnnotations c t -- check that the sort (universe level) of the constructor type -- is contained in the sort of the data type -- (to avoid impredicative existential types) debugFitsIn s -- To allow propositional squash, we turn @Prop ℓ@ into @Set ℓ@ -- for the purpose of checking the type of the constructors. let s' = case s of Prop l -> Type l _ -> s arity <- traceCall (CheckConstructorFitsIn c t s') $ fitsIn uc forcedArgs t s' -- this may have instantiated some metas in s, so we reduce s <- reduce s debugAdd c t (TelV fields _, boundary) <- telViewUpToPathBoundaryP (-1) t -- We assume that the current context matches the parameters -- of the datatype in an empty context (c.f. getContextSize above). params <- getContextTelescope -- add parameters to constructor type and put into signature let con = ConHead c Inductive [] -- data constructors have no projectable fields and are always inductive escapeContext (size tel) $ do cnames <- if nofIxs /= 0 || (Info.defAbstract i == AbstractDef) then return (emptyCompKit, Nothing) else do inTopContext $ do names <- forM [0 .. size fields - 1] (\ i -> freshAbstractQName'_ (P.prettyShow (A.qnameName c) ++ "-" ++ show i)) -- nofIxs == 0 means the data type can be reconstructed -- by appling the QName d to the parameters. dataT <- El s <$> (pure $ Def d $ map Apply $ teleArgs params) reportSDoc "tc.data.con.comp" 5 $ vcat $ [ "params =" <+> pretty params , "dataT =" <+> pretty dataT , "fields =" <+> pretty fields , "names =" <+> pretty names ] defineProjections d con params names fields dataT comp <- defineCompData d con params names fields dataT boundary return $ (comp, Just names) addConstant c $ defaultDefn defaultArgInfo c (telePi tel t) $ Constructor { conPars = size tel , conArity = arity , conSrcCon = con , conData = d , conAbstr = Info.defAbstract i , conInd = Inductive , conComp = cnames , conForced = forcedArgs , conErased = [] -- computed during compilation to treeless } case snd cnames of Nothing -> return () Just names -> mapM_ makeProjection names -- Add the constructor to the instance table, if needed when (Info.defInstance i == InstanceDef) $ do addNamedInstance c d return isPathCons where -- Issue 3362: we need to do the `constructs` call inside the -- generalization, so unpack the A.Generalize checkConstructorType (A.ScopedExpr s e) d = withScope_ s $ checkConstructorType e d checkConstructorType e d = do let check k e = do t <- workOnTypes $ isType_ e -- check that the type of the constructor ends in the data type n <- getContextSize debugEndsIn t d (n - k) isPathCons <- constructs (n - k) k t d return (t, isPathCons) case e of A.Generalized s e -> do (_, t, isPathCons) <- generalizeType' s (check 1 e) return (t, isPathCons) _ -> check 0 e debugEnter c e = reportSDoc "tc.data.con" 5 $ vcat [ "checking constructor" <+> prettyTCM c <+> ":" <+> prettyTCM e ] debugEndsIn t d n = reportSDoc "tc.data.con" 15 $ vcat [ sep [ "checking that" , nest 2 $ prettyTCM t , "ends in" <+> prettyTCM d ] , nest 2 $ "nofPars =" <+> text (show n) ] debugFitsIn s = reportSDoc "tc.data.con" 15 $ sep [ "checking that the type fits in" , nest 2 $ prettyTCM s ] debugAdd c t = reportSDoc "tc.data.con" 5 $ vcat [ "adding constructor" <+> prettyTCM c <+> ":" <+> prettyTCM t ] checkConstructor _ _ _ _ _ _ = __IMPOSSIBLE__ -- constructors are axioms defineCompData :: QName -- datatype name -> ConHead -> Telescope -- Γ parameters -> [QName] -- projection names -> Telescope -- Γ ⊢ Φ field types -> Type -- Γ ⊢ T target type -> Boundary -- [(i,t_i,b_i)], Γ.Φ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : B_i -> TCM CompKit defineCompData d con params names fsT t boundary = do required <- mapM getTerm' [ builtinInterval , builtinIZero , builtinIOne , builtinIMin , builtinIMax , builtinINeg , builtinPOr , builtinItIsOne ] if not (all isJust required) then return $ emptyCompKit else do hcomp <- whenDefined (null boundary) [builtinHComp,builtinTrans] (defineTranspOrHCompD DoHComp d con params names fsT t boundary) transp <- whenDefined True [builtinTrans] (defineTranspOrHCompD DoTransp d con params names fsT t boundary) return $ CompKit { nameOfTransp = transp , nameOfHComp = hcomp } where -- Δ^I, i : I |- sub Δ : Δ sub tel = parallelS [ var n `apply` [Arg defaultArgInfo $ var 0] | n <- [1..size tel] ] withArgInfo tel = zipWith Arg (map domInfo . telToList $ tel) defineTranspOrHCompD cmd d con params names fsT t boundary = do let project = (\ t p -> apply (Def p []) [argN t]) stuff <- defineTranspOrHCompForFields cmd (guard (not $ null boundary) >> (Just $ Con con ConOSystem $ teleElims fsT boundary)) project d params fsT (map argN names) t caseMaybe stuff (return Nothing) $ \ ((theName, gamma , ty, _cl_types , bodies), theSub) -> do iz <- primIZero body <- do case cmd of DoHComp -> return $ Con con ConOSystem (map Apply $ withArgInfo fsT bodies) DoTransp | null boundary -> return $ Con con ConOSystem (map Apply $ withArgInfo fsT bodies) | otherwise -> do io <- primIOne tIMax <- primIMax tIMin <- primIMin tINeg <- primINeg tPOr <- fromMaybe __IMPOSSIBLE__ <$> getTerm' builtinPOr tHComp <- primHComp -- Δ = params -- Δ ⊢ Φ = fsT -- (δ : Δ) ⊢ T = R δ -- (δ : Δ) ⊢ con : Φ → R δ -- no indexing -- boundary = [(i,t_i,u_i)] -- Δ.Φ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : B_i -- Δ.Φ | PiPath Φ boundary (R δ) |- teleElims fsT boundary : R δ -- Γ = ((δ : Δ^I), φ, us : Φ[δ 0]) = gamma -- Γ ⊢ ty = R (δ i1) -- (γ : Γ) ⊢ cl_types = (flatten Φ)[n ↦ f_n (transpR γ)] -- Γ ⊢ bodies : Φ[δ i1] -- Γ ⊢ t : ty -- Γ, i : I ⊢ theSub : Δ.Φ let -- Δ.Φ ⊢ u = Con con ConOSystem $ teleElims fsT boundary : R δ u = Con con ConOSystem $ teleElims fsT boundary -- Γ ⊢ u the_u = liftS (size fsT) d0 `applySubst` u where -- δ : Δ^I, φ : F ⊢ [δ 0] : Δ d0 :: Substitution d0 = wkS 1 -- Δ^I, φ : F ⊢ Δ (consS iz IdS `composeS` sub params) -- Δ^I ⊢ Δ -- Δ^I , i:I ⊢ sub params : Δ the_phi = raise (size fsT) $ var 0 -- Γ ⊢ sigma : Δ.Φ -- sigma = [δ i1,bodies] sigma = reverse bodies ++# d1 where -- δ i1 d1 :: Substitution d1 = wkS (size gamma - size params) -- Γ ⊢ Δ (consS io IdS `composeS` sub params) -- Δ^I ⊢ Δ -- Δ^I , i:I ⊢ sub params : Δ -- Δ.Φ ⊢ [ (i=0) -> t_i; (i=1) -> u_i ] : R δ bs = fullBoundary fsT boundary -- ψ = sigma `applySubst` map (\ i → i ∨ ~ i) . map fst $ boundary -- Γ ⊢ t : R (δ i1) w1' = Con con ConOSystem $ sigma `applySubst` teleElims fsT boundary -- (δ, φ, u0) : Γ ⊢ -- w1 = hcomp (\ i → R (δ i1)) -- (\ i → [ ψ ↦ α (~ i), φ ↦ u0]) -- w1' imax x y = pure tIMax <@> x <@> y ineg r = pure tINeg <@> r lvlOfType = (\ (Type l) -> Level l) . getSort pOr la i j u0 u1 = pure tPOr <#> (lvlOfType <$> la) <@> i <@> j <#> (ilam "o" $ \ _ -> unEl <$> la) <@> u0 <@> u1 absAp x y = liftM2 absApp x y mkFace (r,(u1,u2)) = runNamesT [] $ do -- Γ phi <- open the_phi -- (δ , φ , us) ⊢ φ -- Γ ⊢ ty = Abs i. R (δ i) ty <- open (Abs "i" $ (liftS 1 (raiseS (size gamma - size params)) `composeS` sub params) `applySubst` t) bind "i" $ \ i -> do -- Γ, i [r,u1,u2] <- mapM (open . applySubst theSub) [r,u1,u2] psi <- imax r (ineg r) let -- Γ, i ⊢ squeeze u = primTrans (\ j -> ty [i := i ∨ j]) (φ ∨ i) u squeeze u = cl primTrans <#> (lam "j" $ \ j -> lvlOfType <$> ty `absAp` (imax i j)) <@> (lam "j" $ \ j -> unEl <$> ty `absAp` (imax i j)) <@> (phi `imax` i) <@> u alpha <- pOr (ty `absAp` i) (ineg r) r (ilam "o" $ \ _ -> squeeze u1) (ilam "o" $ \ _ -> squeeze u2) return $ (psi, alpha) -- Γ ⊢ Abs i. [(ψ_n,α_n : [ψ] → R (δ i))] faces <- mapM mkFace bs runNamesT [] $ do -- Γ w1' <- open w1' phi <- open the_phi u <- open the_u -- R (δ i1) ty <- open ty faces <- mapM (\ x -> liftM2 (,) (open . noabsApp __IMPOSSIBLE__ $ fmap fst x) (open $ fmap snd x)) faces let thePsi = foldl1 imax (map fst faces) hcomp ty phi sys a0 = pure tHComp <#> (lvlOfType <$> ty) <#> (unEl <$> ty) <#> phi <@> sys <@> a0 let sys = lam "i" $ \ i -> do let recurse [(psi,alpha)] = alpha `absAp` (ineg i) recurse ((psi,alpha):xs) = pOr ty psi theOr (alpha `absAp` (ineg i)) (recurse xs) where theOr = foldl1 imax (map fst xs) recurse [] = __IMPOSSIBLE__ sys_alpha = recurse faces pOr ty thePsi phi sys_alpha (ilam "o" $ \ _ -> u) hcomp ty (thePsi `imax` phi) sys w1' let -- δ : Δ^I, φ : F ⊢ [δ 0] : Δ d0 :: Substitution d0 = wkS 1 -- Δ^I, φ : F ⊢ Δ (consS iz IdS `composeS` sub params) -- Δ^I ⊢ Δ -- Δ^I , i:I ⊢ sub params : Δ -- Δ.Φ ⊢ u = Con con ConOSystem $ teleElims fsT boundary : R δ -- u = Con con ConOSystem $ teleElims fsT boundary up = ConP con (ConPatternInfo Nothing False Nothing False) $ telePatterns (d0 `applySubst` fsT) (liftS (size fsT) d0 `applySubst` boundary) -- gamma' = telFromList $ take (size gamma - 1) $ telToList gamma -- (δ , φ , fs : Φ[d0]) ⊢ u[liftS Φ d0] -- (δ , φ, u) : Γ ⊢ body -- Δ ⊢ Φ = fsT -- (δ , φ , fs : Φ[d0]) ⊢ u[liftS Φ d0] `consS` raiseS Φ : Γ -- (tel',theta) = (abstract gamma' (d0 `applySubst` fsT), (liftS (size fsT) d0 `applySubst` u) `consS` raiseS (size fsT)) let clause | null boundary = Clause { clauseTel = gamma , clauseType = Just . argN $ ty , namedClausePats = teleNamedArgs gamma , clauseFullRange = noRange , clauseLHSRange = noRange , clauseCatchall = False , clauseBody = Just $ body , clauseUnreachable = Just False } | otherwise = Clause { clauseTel = gamma , clauseType = Just . argN $ ty , namedClausePats = take (size gamma - size fsT) (teleNamedArgs gamma) ++ [argN $ unnamed $ up] , clauseFullRange = noRange , clauseLHSRange = noRange , clauseCatchall = False , clauseBody = Just $ body , clauseUnreachable = Just False } cs = [clause] addClauses theName cs (mst, cc) <- inTopContext (compileClauses Nothing cs) whenJust mst $ setSplitTree theName setCompiledClauses theName cc setTerminates theName True return $ Just theName whenDefined False _ _ = return Nothing whenDefined True xs m = do xs <- mapM getTerm' xs if all isJust xs then m else return Nothing -- Andrea: TODO handle Irrelevant fields somehow. defineProjections :: QName -- datatype name -> ConHead -> Telescope -- Γ parameters -> [QName] -- projection names -> Telescope -- Γ ⊢ Φ field types -> Type -- Γ ⊢ T target type -> TCM () defineProjections dataname con params names fsT t = do let -- Γ , (d : T) ⊢ Φ[n ↦ proj n d] fieldTypes = ([ Def f [] `apply` [argN $ var 0] | f <- reverse names ] ++# raiseS 1) `applySubst` flattenTel fsT -- Γ , Φ ⊢ Φ -- ⊢ Γ , (d : T) projTel = abstract params (ExtendTel (defaultDom t) (Abs "d" EmptyTel)) forM_ (zip3 (downFrom (size fieldTypes)) names fieldTypes) $ \ (i,projName,ty) -> do let projType = abstract projTel <$> ty inTopContext $ do reportSDoc "tc.data.proj" 20 $ sep [ "proj" <+> prettyTCM (i,ty) , nest 2 $ prettyTCM projType ] let cpi = ConPatternInfo Nothing False (Just $ argN $ raise (size fsT) t) False conp = defaultArg $ ConP con cpi $ teleNamedArgs fsT clause = Clause { clauseTel = abstract params fsT , clauseType = Just . argN $ ([Con con ConOSystem (map Apply $ teleArgs fsT)] ++# raiseS (size fsT)) `applySubst` unDom ty , namedClausePats = raise (size fsT) (teleNamedArgs params) ++ [Named Nothing <$> conp] , clauseFullRange = noRange , clauseLHSRange = noRange , clauseCatchall = False , clauseBody = Just $ var i , clauseUnreachable = Just False } noMutualBlock $ do let cs = [clause] (mst , cc) <- inTopContext $ compileClauses Nothing cs let fun = emptyFunction { funClauses = cs , funTerminates = Just True , funCompiled = Just cc , funSplitTree = mst , funMutual = Just [] } addConstant projName $ (defaultDefn defaultArgInfo projName (unDom projType) fun) { defNoCompilation = True } inTopContext $ do reportSDoc "tc.data.proj.fun" 60 $ sep [ "proj" <+> prettyTCM i, nest 2 $ pretty fun ] freshAbstractQName'_ :: String -> TCM QName freshAbstractQName'_ s = freshAbstractQName noFixity' (C.Name noRange C.InScope [C.Id $ s]) -- * Special cases of Type ----------------------------------------------------------- -- | A @Type@ with sort @Type l@ -- Such a type supports both hcomp and transp. data LType = LEl Level Term deriving (Eq,Show) fromLType :: LType -> Type fromLType (LEl l t) = El (Type l) t lTypeLevel :: LType -> Level lTypeLevel (LEl l t) = l toLType :: MonadReduce m => Type -> m (Maybe LType) toLType ty = do sort <- reduce $ getSort ty case sort of Type l -> return $ Just $ LEl l (unEl ty) _ -> return $ Nothing instance Subst Term LType where applySubst rho (LEl l t) = LEl (applySubst rho l) (applySubst rho t) -- | A @Type@ that either has sort @Type l@ or is a closed definition. -- Such a type supports some version of transp. -- In particular we want to allow the Interval as a @ClosedType@. data CType = ClosedType QName | LType LType deriving (Eq,Show) fromCType :: CType -> Type fromCType (ClosedType q) = El Inf (Def q []) fromCType (LType t) = fromLType t toCType :: MonadReduce m => Type -> m (Maybe CType) toCType ty = do sort <- reduce $ getSort ty case sort of Type l -> return $ Just $ LType (LEl l (unEl ty)) Inf -> do t <- reduce (unEl ty) case t of Def q [] -> return $ Just $ ClosedType q _ -> return $ Nothing _ -> return $ Nothing instance Subst Term CType where applySubst rho t@ClosedType{} = t applySubst rho (LType t) = LType $ applySubst rho t defineTranspOrHCompForFields :: TranspOrHComp -> (Maybe Term) -- ^ PathCons, Δ.Φ ⊢ u : R δ -> (Term -> QName -> Term) -- ^ how to apply a "projection" to a term -> QName -- ^ some name, e.g. record name -> Telescope -- ^ param types Δ -> Telescope -- ^ fields' types Δ ⊢ Φ -> [Arg QName] -- ^ fields' names -> Type -- ^ record type Δ ⊢ T -> TCM (Maybe ((QName, Telescope, Type, [Dom Type], [Term]), Substitution)) defineTranspOrHCompForFields cmd pathCons project name params fsT fns rect = case cmd of DoTransp -> runMaybeT $ do fsT' <- traverse (traverse (MaybeT . toCType)) fsT lift $ defineTranspForFields pathCons project name params fsT' fns rect DoHComp -> runMaybeT $ do fsT' <- traverse (traverse (MaybeT . toLType)) fsT rect' <- MaybeT $ toLType rect lift $ defineHCompForFields project name params fsT' fns rect' -- invariant: resulting tel Γ is such that Γ = ... , (φ : I), (a0 : ...) -- where a0 has type matching the arguments of primTrans. defineTranspForFields :: (Maybe Term) -- ^ PathCons, Δ.Φ ⊢ u : R δ -> (Term -> QName -> Term) -- ^ how to apply a "projection" to a term -> QName -- ^ some name, e.g. record name -> Telescope -- ^ param types Δ -> Tele (Dom CType) -- ^ fields' types Δ ⊢ Φ -> [Arg QName] -- ^ fields' names -> Type -- ^ record type Δ ⊢ T -> TCM ((QName, Telescope, Type, [Dom Type], [Term]), Substitution) defineTranspForFields pathCons applyProj name params fsT fns rect = do interval <- elInf primInterval let deltaI = expTelescope interval params iz <- primIZero io <- primIOne imin <- getPrimitiveTerm "primIMin" imax <- getPrimitiveTerm "primIMax" ineg <- getPrimitiveTerm "primINeg" transp <- getPrimitiveTerm builtinTrans por <- getPrimitiveTerm "primPOr" one <- primItIsOne reportSDoc "trans.rec" 20 $ text $ show params reportSDoc "trans.rec" 20 $ text $ show deltaI reportSDoc "trans.rec" 10 $ text $ show fsT let thePrefix = "transp-" theName <- freshAbstractQName'_ $ thePrefix ++ P.prettyShow (A.qnameName name) reportSLn "trans.rec" 5 $ ("Generated name: " ++ show theName ++ " " ++ showQNameId theName) theType <- (abstract deltaI <$>) $ runNamesT [] $ do rect' <- open (runNames [] $ bind "i" $ \ x -> let _ = x `asTypeOf` pure (undefined :: Term) in pure rect') nPi' "phi" (elInf $ cl primInterval) $ \ phi -> (absApp <$> rect' <*> pure iz) --> (absApp <$> rect' <*> pure io) reportSDoc "trans.rec" 20 $ prettyTCM theType reportSDoc "trans.rec" 60 $ text $ "sort = " ++ show (getSort rect') noMutualBlock $ addConstant theName $ (defaultDefn defaultArgInfo theName theType (emptyFunction { funTerminates = Just True })) { defNoCompilation = True } -- ⊢ Γ = gamma = (δ : Δ^I) (φ : I) (u0 : R (δ i0)) -- Γ ⊢ rtype = R (δ i1) TelV gamma rtype <- telView theType let -- (γ : Γ) ⊢ transpR γ : rtype theTerm = Def theName [] `apply` teleArgs gamma -- (γ : Γ) ⊢ (flatten Φ[δ i1])[n ↦ f_n (transpR γ)] clause_types = parallelS [theTerm `applyProj` (unArg fn) | fn <- reverse fns] `applySubst` flattenTel (singletonS 0 io `applySubst` fsT') -- Γ, Φ[δ i1] ⊢ flatten Φ[δ i1] -- Γ, i : I ⊢ [δ i] : Δ delta_i = (liftS 1 (raiseS (size gamma - size deltaI)) `composeS` sub params) -- Γ, i : I ⊢ Φ[δ i] fsT' = (liftS 1 (raiseS (size gamma - size deltaI)) `composeS` sub params) `applySubst` fsT -- Δ ⊢ Φ lam_i = Lam defaultArgInfo . Abs "i" -- (δ , φ , u0) : Γ ⊢ φ : I -- the_phi = var 1 -- -- (δ , φ , u0) : Γ ⊢ u0 : R (δ i0) -- the_u0 = var 0 -- Γ' = (δ : Δ^I, φ : I) gamma' = telFromList $ take (size gamma - 1) $ telToList gamma -- δ : Δ^I, φ : F ⊢ [δ 0] : Δ d0 :: Substitution d0 = wkS 1 -- Δ^I, φ : F ⊢ Δ (consS iz IdS `composeS` sub params) -- Δ^I ⊢ Δ -- Δ^I , i:I ⊢ sub params : Δ -- Ξ , Ξ ⊢ θ : Γ, Ξ ⊢ φ, Ξ ⊢ u : R (δ i0), Ξ ⊢ us : Φ[δ i0] (tel,theta,the_phi,the_u0, the_fields) = case pathCons of -- (δ : Δ).Φ ⊢ u : R δ Just u -> (abstract gamma' (d0 `applySubst` fmap (fmap fromCType) fsT) -- Ξ = δ : Δ^I, φ : F, _ : Φ[δ i0] , (liftS (size fsT) d0 `applySubst` u) `consS` raiseS (size fsT) , raise (size fsT) (var 0) , (liftS (size fsT) d0 `applySubst` u) , drop (size gamma') $ map unArg $ teleArgs tel) Nothing -> (gamma, IdS, var 1, var 0, map (\ fname -> var 0 `applyProj` unArg fname) fns ) fsT_tel = (liftS 1 (raiseS (size tel - size deltaI)) `composeS` sub params) `applySubst` fsT iMin x y = imin `apply` [argN x, argN y] iMax x y = imax `apply` [argN x, argN y] iNeg x = ineg `apply` [argN x] -- .. ⊢ field : filled_ty' i0 mkBody (field, filled_ty') = do let filled_ty = lam_i $ (unEl . fromCType . unDom) filled_ty' -- Γ ⊢ l : I -> Level of filled_ty -- sort <- reduce $ getSort $ unDom filled_ty' case unDom filled_ty' of LType (LEl l _) -> do let lvl = lam_i $ Level l return $ runNames [] $ do lvl <- open lvl [phi,field] <- mapM open [the_phi,field] pure transp <#> lvl <@> pure filled_ty <@> phi <@> field -- interval arg ClosedType{} -> return $ runNames [] $ do [field] <- mapM open [field] field let -- ' Ξ , i : I ⊢ τ = [(\ j → δ (i ∧ j)), φ ∨ ~ i, u] : Ξ tau = parallelS $ us ++ (phi `iMax` iNeg (var 0)) : map (\ d -> Lam defaultArgInfo $ Abs "i" $ raise 1 d `apply` [argN $ (iMin (var 0) (var 1))]) ds where -- Ξ, i : I (us, phi:ds) = splitAt (size tel - size gamma') $ reverse (raise 1 (map unArg (teleArgs tel))) let go acc [] = return [] go acc ((fname,field_ty) : ps) = do -- Ξ, i : I, Φ[δ i]|_f ⊢ Φ_f = field_ty -- Ξ ⊢ b : field_ty [i := i1][acc] -- Ξ ⊢ parallesS acc : Φ[δ i1]|_f -- Ξ , i : I ⊢ τ = [(\ j → δ (i ∨ j), φ ∨ ~ i, us] : Ξ -- Ξ , i : I ⊢ parallesS (acc[τ]) : Φ[δ i1]|_f -- Ξ, i : I ⊢ field_ty [parallesS (acc[τ])] let filled_ty = parallelS (tau `applySubst` acc) `applySubst` field_ty b <- mkBody (fname,filled_ty) bs <- go (b : acc) ps return $ b : bs bodys <- go [] (zip the_fields (map (fmap snd) $ telToList fsT_tel)) -- ∀ f. Ξ, i : I, Φ[δ i]|_f ⊢ Φ[δ i]_f let -- Ξ, i : I ⊢ ... : Δ.Φ theSubst = reverse (tau `applySubst` bodys) ++# (liftS 1 (raiseS (size tel - size deltaI)) `composeS` sub params) return $ ((theName, tel, theta `applySubst` rtype, map (fmap fromCType) clause_types, bodys), theSubst) where -- record type in 'exponentiated' context -- (params : Δ^I), i : I |- T[params i] rect' = sub params `applySubst` rect -- Δ^I, i : I |- sub Δ : Δ sub tel = parallelS [ var n `apply` [Arg defaultArgInfo $ var 0] | n <- [1..size tel] ] -- given I type, and Δ telescope, build Δ^I such that -- (x : A, y : B x, ...)^I = (x : I → A, y : (i : I) → B (x i), ...) expTelescope :: Type -> Telescope -> Telescope expTelescope int tel = unflattenTel names ys where xs = flattenTel tel names = teleNames tel t = ExtendTel (defaultDom $ raise (size tel) int) (Abs "i" EmptyTel) s = sub tel ys = map (fmap (abstract t) . applySubst s) xs -- invariant: resulting tel Γ is such that Γ = (δ : Δ), (φ : I), (u : ...), (a0 : R δ)) -- where u and a0 have types matching the arguments of primHComp. defineHCompForFields :: (Term -> QName -> Term) -- ^ how to apply a "projection" to a term -> QName -- ^ some name, e.g. record name -> Telescope -- ^ param types Δ -> Tele (Dom LType) -- ^ fields' types Δ ⊢ Φ -> [Arg QName] -- ^ fields' names -> LType -- ^ record type (δ : Δ) ⊢ R[δ] -> TCM ((QName, Telescope, Type, [Dom Type], [Term]),Substitution) defineHCompForFields applyProj name params fsT fns rect = do interval <- elInf primInterval let delta = params iz <- primIZero io <- primIOne imin <- getPrimitiveTerm "primIMin" imax <- getPrimitiveTerm "primIMax" tIMax <- getPrimitiveTerm "primIMax" ineg <- getPrimitiveTerm "primINeg" hcomp <- getPrimitiveTerm builtinHComp transp <- getPrimitiveTerm builtinTrans por <- getPrimitiveTerm "primPOr" one <- primItIsOne reportSDoc "comp.rec" 20 $ text $ show params reportSDoc "comp.rec" 20 $ text $ show delta reportSDoc "comp.rec" 10 $ text $ show fsT let thePrefix = "hcomp-" theName <- freshAbstractQName'_ $ thePrefix ++ P.prettyShow (A.qnameName name) reportSLn "hcomp.rec" 5 $ ("Generated name: " ++ show theName ++ " " ++ showQNameId theName) theType <- (abstract delta <$>) $ runNamesT [] $ do rect <- open $ fromLType rect nPi' "phi" (elInf $ cl primInterval) $ \ phi -> (nPi' "i" (elInf $ cl primInterval) $ \ i -> pPi' "o" phi $ \ _ -> rect) --> rect --> rect reportSDoc "hcomp.rec" 20 $ prettyTCM theType reportSDoc "hcomp.rec" 60 $ text $ "sort = " ++ show (lTypeLevel rect) noMutualBlock $ addConstant theName $ (defaultDefn defaultArgInfo theName theType (emptyFunction { funTerminates = Just True })) { defNoCompilation = True } -- ⊢ Γ = gamma = (δ : Δ) (φ : I) (_ : (i : I) -> Partial φ (R δ)) (_ : R δ) -- Γ ⊢ rtype = R δ TelV gamma rtype <- telView theType let -- Γ ⊢ R δ drect_gamma = raiseS (size gamma - size delta) `applySubst` rect reportSDoc "hcomp.rec" 60 $ text $ "sort = " ++ show (lTypeLevel drect_gamma) let -- (γ : Γ) ⊢ hcompR γ : rtype compTerm = Def theName [] `apply` teleArgs gamma -- (δ, φ, u, u0) : Γ ⊢ φ : I the_phi = var 2 -- (δ, φ, u, u0) : Γ ⊢ u : (i : I) → [φ] → R (δ i) the_u = var 1 -- (δ, φ, u, u0) : Γ ⊢ u0 : R (δ i0) the_u0 = var 0 -- ' (δ, φ, u, u0) : Γ ⊢ fillR Γ : (i : I) → rtype[ δ ↦ (\ j → δ (i ∧ j))] fillTerm = runNames [] $ do rect <- open . unEl . fromLType $ drect_gamma lvl <- open . Level . lTypeLevel $ drect_gamma params <- mapM open $ take (size delta) $ teleArgs gamma [phi,w,w0] <- mapM open [the_phi,the_u,the_u0] -- (δ : Δ, φ : I, w : .., w0 : R δ) ⊢ -- ' fillR Γ = λ i → hcompR δ (φ ∨ ~ i) (\ j → [ φ ↦ w (i ∧ j) , ~ i ↦ w0 ]) w0 -- = hfillR δ φ w w0 lam "i" $ \ i -> do args <- sequence params psi <- pure imax <@> phi <@> (pure ineg <@> i) u <- lam "j" (\ j -> pure por <#> lvl <@> phi <@> (pure ineg <@> i) <#> (lam "_" $ \ o -> rect) <@> (w <@> (pure imin <@> i <@> j)) <@> (lam "_" $ \ o -> w0) -- TODO wait for i = 0 ) u0 <- w0 pure $ Def theName [] `apply` (args ++ [argN psi, argN u, argN u0]) where underArg k m = Arg <$> (argInfo <$> m) <*> (k (unArg <$> m)) -- (γ : Γ) ⊢ (flatten Φ)[n ↦ f_n (compR γ)] clause_types = parallelS [compTerm `applyProj` (unArg fn) | fn <- reverse fns] `applySubst` flattenTel (raiseS (size gamma - size delta) `applySubst` fsT) -- Γ, Φ ⊢ flatten Φ -- Δ ⊢ Φ = fsT -- Γ, i : I ⊢ Φ' fsT' = raiseS ((size gamma - size delta) + 1) `applySubst` fsT -- Γ, i : I ⊢ (flatten Φ')[n ↦ f_n (fillR Γ i)] filled_types = parallelS [raise 1 fillTerm `apply` [argN $ var 0] `applyProj` (unArg fn) | fn <- reverse fns] `applySubst` flattenTel fsT' -- Γ, i : I, Φ' ⊢ flatten Φ' comp <- do let imax i j = pure tIMax <@> i <@> j let forward la bA r u = pure transp <#> (lam "i" $ \ i -> la <@> (i `imax` r)) <@> (lam "i" $ \ i -> bA <@> (i `imax` r)) <@> r <@> u return $ \ la bA phi u u0 -> pure hcomp <#> (la <@> pure io) <#> (bA <@> pure io) <#> phi <@> (lam "i" $ \ i -> ilam "o" $ \ o -> forward la bA i (u <@> i <..> o)) <@> forward la bA (pure iz) u0 let mkBody (fname, filled_ty') = do let proj t = (`applyProj` unArg fname) <$> t filled_ty = Lam defaultArgInfo (Abs "i" $ (unEl . fromLType . unDom) filled_ty') -- Γ ⊢ l : I -> Level of filled_ty l <- reduce $ lTypeLevel $ unDom filled_ty' let lvl = Lam defaultArgInfo (Abs "i" $ Level l) return $ runNames [] $ do lvl <- open lvl [phi,w,w0] <- mapM open [the_phi,the_u,the_u0] filled_ty <- open filled_ty comp lvl filled_ty phi (lam "i" $ \ i -> lam "o" $ \ o -> proj $ w <@> i <@> o) -- TODO wait for phi = 1 (proj w0) reportSDoc "hcomp.rec" 60 $ text $ "filled_types sorts:" ++ show (map (getSort . fromLType . unDom) filled_types) bodys <- mapM mkBody (zip fns filled_types) return $ ((theName, gamma, rtype, map (fmap fromLType) clause_types, bodys),IdS) getGeneralizedParameters :: Set Name -> QName -> TCM [Maybe Name] getGeneralizedParameters gpars name | Set.null gpars = return [] getGeneralizedParameters gpars name = do -- Drop the named parameters that shouldn't be in scope (if the user -- wrote a split data type) let inscope x = x <$ guard (Set.member x gpars) map (>>= inscope) . defGeneralizedParams <$> (instantiateDef =<< getConstInfo name) -- | Bind the named generalized parameters. bindGeneralizedParameters :: [Maybe Name] -> Type -> (Telescope -> Type -> TCM a) -> TCM a bindGeneralizedParameters [] t ret = ret EmptyTel t bindGeneralizedParameters (name : names) t ret = case unEl t of Pi a b -> ext $ bindGeneralizedParameters names (unAbs b) $ \ tel t -> ret (ExtendTel a (tel <$ b)) t where ext | Just x <- name = addContext (x, a) | otherwise = addContext (absName b, a) _ -> __IMPOSSIBLE__ -- | Bind the parameters of a datatype. -- -- We allow omission of hidden parameters at the definition site. -- Example: -- @ -- data D {a} (A : Set a) : Set a -- data D A where -- c : A -> D A -- @ bindParameters :: Int -- ^ Number of parameters -> [A.LamBinding] -- ^ Bindings from definition site. -> Type -- ^ Pi-type of bindings coming from signature site. -> (Telescope -> Type -> TCM a) -- ^ Continuation, accepting parameter telescope and rest of type. -- The parameters are part of the context when the continutation is invoked. -> TCM a bindParameters 0 [] a ret = ret EmptyTel a bindParameters 0 (par : _) _ _ = setCurrentRange par $ typeError . GenericDocError =<< do text "Unexpected parameter" <+> prettyA par bindParameters npars [] t ret = case unEl t of Pi a b | not (visible a) -> do x <- freshName_ (absName b) bindParameter npars [] x a b ret | otherwise -> typeError . GenericDocError =<< sep [ "Expected binding for parameter" , text (absName b) <+> text ":" <+> prettyTCM (unDom a) ] _ -> __IMPOSSIBLE__ bindParameters npars par@(A.DomainFull (A.TBind _ xs e) : bs) a ret = setCurrentRange par $ typeError . GenericDocError =<< do let s | length xs > 1 = "s" | otherwise = "" text ("Unexpected type signature for parameter" ++ s) <+> sep (map prettyA xs) bindParameters _ (A.DomainFull A.TLet{} : _) _ _ = __IMPOSSIBLE__ bindParameters _ (par@(A.DomainFree arg) : ps) _ _ | getModality arg /= defaultModality = setCurrentRange par $ typeError . GenericDocError =<< do text "Unexpected modality/relevance annotation in" <+> prettyA par bindParameters npars ps0@(par@(A.DomainFree arg) : ps) t ret = do let x = namedArg arg TelV tel _ = telView' t case insertImplicit arg $ telToList tel of NoInsertNeeded -> continue ps $ A.unBind x ImpInsert _ -> continue ps0 =<< freshName_ (absName b) BadImplicits -> setCurrentRange par $ typeError . GenericDocError =<< do text "Unexpected parameter" <+> prettyA par NoSuchName x -> setCurrentRange par $ typeError . GenericDocError =<< do text ("No parameter of name " ++ x) where Pi dom@(Dom{domInfo = info', unDom = a}) b = unEl t continue ps x = bindParameter npars ps x dom b ret bindParameter :: Int -> [A.LamBinding] -> Name -> Dom Type -> Abs Type -> (Telescope -> Type -> TCM a) -> TCM a bindParameter npars ps x a b ret = addContext (x, a) $ bindParameters (npars - 1) ps (absBody b) $ \ tel s -> ret (ExtendTel a $ Abs (nameToArgName x) tel) s -- | Check that the arguments to a constructor fits inside the sort of the datatype. -- The third argument is the type of the constructor. -- -- As a side effect, return the arity of the constructor. fitsIn :: UniverseCheck -> [IsForced] -> Type -> Sort -> TCM Int fitsIn uc forceds t s = do reportSDoc "tc.data.fits" 10 $ sep [ "does" <+> prettyTCM t , "of sort" <+> prettyTCM (getSort t) , "fit in" <+> prettyTCM s <+> "?" ] -- The code below would be simpler, but doesn't allow datatypes -- to be indexed by the universe level. -- s' <- instantiateFull (getSort t) -- noConstraints $ s' `leqSort` s vt <- do t <- pathViewAsPi t return $ case t of Left (a,b) -> Just (True ,a,b) Right (El _ t) | Pi a b <- t -> Just (False,a,b) _ -> Nothing case vt of Just (isPath, dom, b) -> do withoutK <- withoutKOption let (forced,forceds') = nextIsForced forceds unless (isForced forced && not withoutK) $ do sa <- reduce $ getSort dom unless (isPath || uc == NoUniverseCheck || sa == SizeUniv) $ sa `leqSort` s addContext (absName b, dom) $ do succ <$> fitsIn uc forceds' (absBody b) (raise 1 s) _ -> do getSort t `leqSort` s return 0 -- | When --without-K is enabled, we should check that the sorts of -- the index types fit into the sort of the datatype. checkIndexSorts :: Sort -> Telescope -> TCM () checkIndexSorts s = \case EmptyTel -> return () ExtendTel a tel' -> do getSort a `leqSort` s underAbstraction a tel' $ checkIndexSorts (raise 1 s) -- | Return the parameters that share variables with the indices -- nonLinearParameters :: Int -> Type -> TCM [Int] -- nonLinearParameters nPars t = data IsPathCons = PathCons | PointCons deriving (Eq,Show) -- | Check that a type constructs something of the given datatype. The first -- argument is the number of parameters to the datatype and the second the -- number of additional non-parameters in the context (1 when generalizing, 0 -- otherwise). -- constructs :: Int -> Int -> Type -> QName -> TCM IsPathCons constructs nofPars nofExtraVars t q = constrT nofExtraVars t where -- The number n counts the proper (non-parameter) constructor arguments. constrT :: Nat -> Type -> TCM IsPathCons constrT n t = do t <- reduce t pathV <- pathViewAsPi'whnf case unEl t of Pi _ (NoAbs _ b) -> constrT n b Pi a b -> underAbstraction a b $ constrT (n + 1) -- OR: addCxtString (absName b) a $ constrT (n + 1) (absBody b) _ | Left ((a,b),_) <- pathV t -> do _ <- case b of NoAbs _ b -> constrT n b b -> underAbstraction a b $ constrT (n + 1) return PathCons Def d es | d == q -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es (pars, ixs) <- normalise $ splitAt nofPars vs -- check that the constructor parameters are the data parameters checkParams n pars return PointCons MetaV{} -> do def <- getConstInfo q -- Analyse the type of q (name of the data type) let td = defType def TelV tel core <- telView td -- Construct the parameter arguments -- The parameters are @n + nofPars - 1 .. n@ let us = zipWith (\ arg x -> var x <$ arg ) (telToArgs tel) $ take nofPars $ downFrom (nofPars + n) -- The indices are fresh metas xs <- newArgsMeta =<< piApplyM td us let t' = El (raise n $ dataSort $ theDef def) $ Def q $ map Apply $ us ++ xs -- Andreas, 2017-11-07, issue #2840 -- We should not postpone here, otherwise we might upset the positivity checker. ifM (tryConversion $ equalType t t') (constrT n t') (typeError $ ShouldEndInApplicationOfTheDatatype t) _ -> typeError $ ShouldEndInApplicationOfTheDatatype t checkParams n vs = zipWithM_ sameVar vs ps where nvs = length vs ps = reverse $ take nvs [n..] sameVar arg i -- skip irrelevant parameters | isIrrelevant arg = return () | otherwise = do t <- typeOfBV i equalTerm t (unArg arg) (var i) {- UNUSED, Andreas 2012-09-13 -- | Force a type to be a specific datatype. forceData :: QName -> Type -> TCM Type forceData d (El s0 t) = liftTCM $ do t' <- reduce t d <- canonicalName d case t' of Def d' _ | d == d' -> return $ El s0 t' | otherwise -> fail $ "wrong datatype " ++ show d ++ " != " ++ show d' MetaV m vs -> do Defn {defType = t, theDef = Datatype{dataSort = s}} <- getConstInfo d ps <- newArgsMeta t noConstraints $ leqType (El s0 t') (El s (Def d ps)) -- TODO: need equalType? reduce $ El s0 t' _ -> typeError $ ShouldBeApplicationOf (El s0 t) d -} -- | Is the type coinductive? Returns 'Nothing' if the answer cannot -- be determined. isCoinductive :: Type -> TCM (Maybe Bool) isCoinductive t = do El s t <- reduce t case t of Def q _ -> do def <- getConstInfo q case theDef def of Axiom {} -> return (Just False) DataOrRecSig{} -> return Nothing Function {} -> return Nothing Datatype { dataInduction = CoInductive } -> return (Just True) Datatype { dataInduction = Inductive } -> return (Just False) Record { recInduction = Just CoInductive } -> return (Just True) Record { recInduction = _ } -> return (Just False) GeneralizableVar{} -> __IMPOSSIBLE__ Constructor {} -> __IMPOSSIBLE__ Primitive {} -> __IMPOSSIBLE__ AbstractDefn{} -> __IMPOSSIBLE__ Var {} -> return Nothing Lam {} -> __IMPOSSIBLE__ Lit {} -> __IMPOSSIBLE__ Level {} -> __IMPOSSIBLE__ Con {} -> __IMPOSSIBLE__ Pi {} -> return (Just False) Sort {} -> return (Just False) MetaV {} -> return Nothing DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Decl.hs-boot0000644000000000000000000000050613466402171021105 0ustar0000000000000000 module Agda.TypeChecking.Rules.Decl where import Agda.Syntax.Info (ModuleInfo) import Agda.Syntax.Abstract import Agda.TypeChecking.Monad.Base (TCM) checkDecls :: [Declaration] -> TCM () checkDecl :: Declaration -> TCM () checkSectionApplication :: ModuleInfo -> ModuleName -> ModuleApplication -> ScopeCopyInfo -> TCM () Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Def.hs-boot0000644000000000000000000000076713466402171020745 0ustar0000000000000000module Agda.TypeChecking.Rules.Def where import Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Info import Agda.TypeChecking.Monad import qualified Agda.Syntax.Internal as I checkFunDef :: Delayed -> DefInfo -> QName -> [Clause] -> TCM () checkFunDef' :: I.Type -> ArgInfo -> Delayed -> Maybe ExtLamInfo -> Maybe QName -> DefInfo -> QName -> [Clause] -> TCM () newSection :: ModuleName -> A.GeneralizeTelescope -> TCM a -> TCM a useTerPragma :: Definition -> TCM Definition Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Record.hs0000644000000000000000000006506113466402171020522 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Record where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad import Data.Maybe import qualified Data.Set as Set import Agda.Interaction.Options import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Position import qualified Agda.Syntax.Info as Info import Agda.Syntax.Scope.Monad (freshAbstractQName) import Agda.Syntax.Fixity import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Names import Agda.TypeChecking.Primitive import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Reduce import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Pretty import Agda.TypeChecking.Polarity import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.CompiledClause (hasProjectionPatterns) import Agda.TypeChecking.CompiledClause.Compile import Agda.TypeChecking.Rules.Data ( getGeneralizedParameters, bindGeneralizedParameters, bindParameters, fitsIn, forceSort, defineCompData, defineTranspOrHCompForFields ) import Agda.TypeChecking.Rules.Term ( isType_ ) import {-# SOURCE #-} Agda.TypeChecking.Rules.Decl (checkDecl) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import qualified Agda.Utils.Pretty as P import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Records --------------------------------------------------------------------------- -- | @checkRecDef i name con ps contel fields@ -- -- [@name@] Record type identifier. -- -- [@con@] Maybe constructor name and info. -- -- [@ps@] Record parameters. -- -- [@contel@] Approximate type of constructor (@fields@ -> Set). -- Does not include record parameters. -- -- [@fields@] List of field signatures. -- checkRecDef :: Info.DefInfo -- ^ Position and other info. -> QName -- ^ Record type identifier. -> UniverseCheck -- ^ Check universes? -> Maybe (Ranged Induction) -- ^ Optional: (co)inductive declaration. -> Maybe HasEta -- ^ Optional: user specified eta/no-eta -> Maybe QName -- ^ Optional: constructor name. -> A.DataDefParams -- ^ Record parameters. -> A.Expr -- ^ Approximate type of constructor (@fields@ -> Set). -- Does not include record parameters. -> [A.Field] -- ^ Field signatures. -> TCM () checkRecDef i name uc ind eta con (A.DataDefParams gpars ps) contel fields = traceCall (CheckRecDef (getRange name) name ps fields) $ do reportSDoc "tc.rec" 10 $ vcat [ "checking record def" <+> prettyTCM name , nest 2 $ "ps =" <+> prettyList (map prettyA ps) , nest 2 $ "contel =" <+> prettyA contel , nest 2 $ "fields =" <+> prettyA (map Constr fields) ] -- get type of record def <- instantiateDef =<< getConstInfo name t <- instantiateFull $ defType def let npars = case theDef def of DataOrRecSig n -> n _ -> __IMPOSSIBLE__ parNames <- getGeneralizedParameters gpars name bindGeneralizedParameters parNames t $ \ gtel t0 -> bindParameters (npars - length parNames) ps t0 $ \ ptel t0 -> do let tel = abstract gtel ptel -- Generate type of constructor from field telescope @contel@, -- which is the approximate constructor type (target missing). -- Check and evaluate field types. reportSDoc "tc.rec" 15 $ "checking fields" contype <- workOnTypes $ instantiateFull =<< isType_ contel reportSDoc "tc.rec" 20 $ vcat [ "contype = " <+> prettyTCM contype ] -- compute the field telescope (does not include record parameters) let TelV ftel _ = telView' contype -- Compute correct type of constructor -- t = tel -> t0 where t0 must be a sort s TelV idxTel s <- telView t0 unless (null idxTel) $ typeError $ ShouldBeASort t0 s <- forceSort s -- needed for impredicative Prop (not implemented yet) -- ftel <- return $ -- if s == Prop -- then telFromList $ map (setRelevance Irrelevant) $ telToList ftel -- else ftel reportSDoc "tc.rec" 20 $ do gamma <- getContextTelescope -- the record params (incl. module params) "gamma = " <+> inTopContext (prettyTCM gamma) -- record type (name applied to parameters) rect <- El s . Def name . map Apply <$> getContextArgs -- Put in @rect@ as correct target of constructor type. -- Andreas, 2011-05-10 use telePi_ instead of telePi to preserve -- even names of non-dependent fields in constructor type (Issue 322). let contype = telePi_ ftel (raise (size ftel) rect) -- NB: contype does not contain the parameter telescope -- Obtain name of constructor (if present). (hasNamedCon, conName, conInfo) <- case con of Just c -> return (True, c, i) Nothing -> do m <- killRange <$> currentModule c <- qualify m <$> freshName_ ("recCon-NOT-PRINTED" :: String) return (False, c, i) -- Add record type to signature. reportSDoc "tc.rec" 15 $ "adding record type to signature" etaenabled <- etaEnabled let getName :: A.Declaration -> [Arg QName] getName (A.Field _ x arg) = [x <$ arg] getName (A.ScopedDecl _ [f]) = getName f getName _ = [] fs = concatMap getName fields -- indCo is what the user wrote: inductive/coinductive/Nothing. -- We drop the Range. indCo = rangedThing <$> ind -- A constructor is inductive unless declared coinductive. conInduction = fromMaybe Inductive indCo -- Andreas, 2016-09-20, issue #2197. -- Eta is inferred by the positivity checker. -- We should turn it off until it is proven to be safe. haveEta = maybe (Inferred NoEta) Specified eta -- haveEta = maybe (Inferred $ conInduction == Inductive && etaenabled) Specified eta con = ConHead conName conInduction fs -- A record is irrelevant if all of its fields are. -- In this case, the associated module parameter will be irrelevant. -- See issue 392. -- Unless it's been declared coinductive or no-eta-equality (#2607). recordRelevance | eta == Just NoEta = Relevant | conInduction == CoInductive = Relevant | otherwise = minimum $ Irrelevant : (map getRelevance $ telToList ftel) -- Andreas, 2017-01-26, issue #2436 -- Disallow coinductive records with eta-equality when (conInduction == CoInductive && theEtaEquality haveEta == YesEta) $ do typeError . GenericDocError =<< do sep [ "Agda doesn't like coinductive records with eta-equality." , "If you must, use pragma" , "{-# ETA" <+> prettyTCM name <+> "#-}" ] reportSDoc "tc.rec" 30 $ "record constructor is " <+> prettyTCM con -- Add the record definition. -- Andreas, 2016-06-17, Issue #2018: -- Do not rely on @addConstant@ to put in the record parameters, -- as they might be renamed in the context. -- By putting them ourselves (e.g. by using the original type @t@) -- we make sure we get the original names! let npars = size tel telh = fmap hideAndRelParams tel escapeContext npars $ do addConstant name $ defaultDefn defaultArgInfo name t $ Record { recPars = npars , recClause = Nothing , recConHead = con , recNamedCon = hasNamedCon , recFields = fs , recTel = telh `abstract` ftel , recAbstr = Info.defAbstract i , recEtaEquality' = haveEta , recInduction = indCo -- We retain the original user declaration [(co)inductive] -- in case the record turns out to be recursive. -- Determined by positivity checker: , recMutual = Nothing , recComp = emptyCompKit -- filled in later } -- Add record constructor to signature addConstant conName $ defaultDefn defaultArgInfo conName (telh `abstract` contype) $ Constructor { conPars = npars , conArity = size fs , conSrcCon = con , conData = name , conAbstr = Info.defAbstract conInfo , conInd = conInduction , conComp = (emptyCompKit, Nothing) -- filled in later , conForced = [] , conErased = [] } -- Declare the constructor as eligible for instance search when (Info.defInstance i == InstanceDef) $ do addNamedInstance conName name -- Check that the fields fit inside the sort _ <- fitsIn uc [] contype s {- Andreas, 2011-04-27 WRONG because field types are checked again and then non-stricts should not yet be irrelevant -- make record parameters hidden and non-stricts irrelevant -- ctx <- (reverse . map hideAndRelParams . take (size tel)) <$> getContext -} {- Andreas, 2013-09-13 DEBUGGING the debug printout reportSDoc "tc.rec" 80 $ sep [ "current module record telescope" , nest 2 $ (prettyTCM =<< getContextTelescope) ] reportSDoc "tc.rec" 80 $ sep [ "current module record telescope" , nest 2 $ (text . show =<< getContextTelescope) ] reportSDoc "tc.rec" 80 $ sep [ "current module record telescope" , nest 2 $ (inTopContext . prettyTCM =<< getContextTelescope) ] reportSDoc "tc.rec" 80 $ sep [ "current module record telescope" , nest 2 $ do tel <- getContextTelescope text (show tel) $+$ do inTopContext $ do prettyTCM tel $+$ do telA <- reify tel text (show telA) $+$ do ctx <- getContextTelescope "should be empty:" <+> prettyTCM ctx ] -} let info = setRelevance recordRelevance defaultArgInfo addRecordVar = addRecordNameContext (setArgInfo info $ defaultDom rect) let m = qnameToMName name -- Name of record module. -- Andreas, 2016-02-09 setting all parameters hidden in the record -- section telescope changes the semantics, see e.g. -- test/Succeed/RecordInParModule. -- Ulf, 2016-03-02 but it's the right thing to do (#1759) modifyContext (map hideOrKeepInstance) $ addRecordVar $ do -- Add the record section. reportSDoc "tc.rec.def" 10 $ sep [ "record section:" , nest 2 $ sep [ prettyTCM m <+> (inTopContext . prettyTCM =<< getContextTelescope) , fsep $ punctuate comma $ map (return . P.pretty . getName) fields ] ] reportSDoc "tc.rec.def" 15 $ nest 2 $ vcat [ "field tel =" <+> escapeContext 1 (prettyTCM ftel) ] addSection m -- Andreas, 2016-02-09, Issue 1815 (see also issue 1759). -- For checking the record declarations, hide the record parameters -- and the parameters of the parent modules. modifyContext (map hideOrKeepInstance) $ addRecordVar $ do -- Check the types of the fields and the other record declarations. withCurrentModule m $ do -- Andreas, 2013-09-13, 2016-01-06. -- Argument telescope for the projections: all parameters are hidden. -- This means parameters of the parent modules and of the current -- record type. -- See test/Succeed/ProjectionsTakeModuleTelAsParameters.agda. tel' <- getContextTelescope setModuleCheckpoint m checkRecordProjections m name hasNamedCon con tel' (raise 1 ftel) fields -- we define composition here so that the projections are already in the signature. escapeContext npars $ do addCompositionForRecord name con tel fs ftel rect return () addCompositionForRecord :: QName -- datatype name -> ConHead -> Telescope -- Γ parameters -> [Arg QName] -- projection names -> Telescope -- Γ ⊢ Φ field types -> Type -- Γ ⊢ T target type -> TCM () addCompositionForRecord name con tel fs ftel rect = do compWays <- do cxt <- getContextTelescope escapeContext (size cxt) $ if null fs then Left . (,Just []) <$> defineCompData name con (abstract cxt tel) [] ftel rect [] else Right <$> ifM (return (any (== Irrelevant) $ map getRelevance fs) `and2M` do not . optIrrelevantProjections <$> pragmaOptions) (return emptyCompKit) (defineCompKitR name (abstract cxt tel) ftel fs rect) case compWays of Right kit -> do modifySignature $ updateDefinition name $ updateTheDef $ \ d -> case d of r@Record{} -> r { recComp = kit } _ -> __IMPOSSIBLE__ Left y -> do modifySignature $ updateDefinition (conName con) $ updateTheDef $ \ d -> case d of r@Constructor{} -> r { conComp = y } _ -> __IMPOSSIBLE__ defineCompKitR :: QName -- ^ some name, e.g. record name -> Telescope -- ^ param types Δ -> Telescope -- ^ fields' types Δ ⊢ Φ -> [Arg QName] -- ^ fields' names -> Type -- ^ record type Δ ⊢ T -> TCM CompKit defineCompKitR name params fsT fns rect = do required <- mapM getTerm' [ builtinInterval , builtinIZero , builtinIOne , builtinIMin , builtinIMax , builtinINeg , builtinPOr , builtinItIsOne ] reportSDoc "tc.rec.cxt" 30 $ prettyTCM params reportSDoc "tc.rec.cxt" 30 $ prettyTCM fsT reportSDoc "tc.rec.cxt" 30 $ pretty rect if not $ all isJust required then return $ emptyCompKit else do transp <- whenDefined [builtinTrans] (defineTranspOrHCompR DoTransp name params fsT fns rect) hcomp <- whenDefined [builtinTrans,builtinHComp] (defineTranspOrHCompR DoHComp name params fsT fns rect) return $ CompKit { nameOfTransp = transp , nameOfHComp = hcomp } where whenDefined xs m = do xs <- mapM getTerm' xs if all isJust xs then m else return Nothing defineTranspOrHCompR :: TranspOrHComp -> QName -- ^ some name, e.g. record name -> Telescope -- ^ param types Δ -> Telescope -- ^ fields' types Δ ⊢ Φ -> [Arg QName] -- ^ fields' names -> Type -- ^ record type Δ ⊢ T -> TCM (Maybe QName) defineTranspOrHCompR cmd name params fsT fns rect = do let project = (\ t fn -> t `applyE` [Proj ProjSystem fn]) stuff <- fmap fst <$> defineTranspOrHCompForFields cmd Nothing project name params fsT fns rect caseMaybe stuff (return Nothing) $ \ (theName, gamma, rtype, clause_types, bodies) -> do -- phi = 1 clause c' <- do io <- primIOne Just io_name <- getBuiltinName' builtinIOne one <- primItIsOne tInterval <- elInf primInterval let (ix,rhs) = case cmd of -- TranspRArgs = phi : I, a0 : .. -- Γ = Δ^I , CompRArgs -- pats = ... | phi = i1 -- body = a0 DoTransp -> (1,Var 0 []) -- HCompRArgs = phi : I, u : .., a0 : .. -- Γ = Δ, CompRArgs -- pats = ... | phi = i1 -- body = u i1 itIsOne DoHComp -> (2,Var 1 [] `apply` [argN io, setRelevance Irrelevant $ argN one]) p = ConP (ConHead io_name Inductive []) (noConPatternInfo { conPType = Just (Arg defaultArgInfo tInterval) , conPFallThrough = True }) [] -- gamma, rtype s = singletonS ix p pats :: [NamedArg DeBruijnPattern] pats = s `applySubst` teleNamedArgs gamma t :: Type t = s `applyPatSubst` rtype gamma' :: Telescope gamma' = unflattenTel (ns0 ++ ns1) $ s `applyPatSubst` (g0 ++ g1) where (g0,_:g1) = splitAt (size gamma - 1 - ix) $ flattenTel gamma (ns0,_:ns1) = splitAt (size gamma - 1 - ix) $ teleNames gamma c = Clause { clauseTel = gamma' , clauseType = Just $ argN t , namedClausePats = pats , clauseFullRange = noRange , clauseLHSRange = noRange , clauseCatchall = False , clauseBody = Just $ rhs , clauseUnreachable = Just False } reportSDoc "trans.rec.face" 17 $ text $ show c return c cs <- flip mapM (zip3 fns clause_types bodies) $ \ (fname, clause_ty, body) -> do let pats = teleNamedArgs gamma ++ [defaultNamedArg $ ProjP ProjSystem $ unArg fname] c = Clause { clauseTel = gamma , clauseType = Just $ argN (unDom clause_ty) , namedClausePats = pats , clauseFullRange = noRange , clauseLHSRange = noRange , clauseCatchall = False , clauseBody = Just body , clauseUnreachable = Just False } reportSDoc "trans.rec" 17 $ text $ show c reportSDoc "trans.rec" 16 $ text "type =" <+> text (show (clauseType c)) reportSDoc "trans.rec" 15 $ prettyTCM $ abstract gamma (unDom clause_ty) reportSDoc "trans.rec" 10 $ text "body =" <+> prettyTCM (abstract gamma body) return c addClauses theName $ c' : cs reportSDoc "trans.rec" 15 $ text $ "compiling clauses for " ++ show theName (mst, cc) <- inTopContext (compileClauses Nothing cs) whenJust mst $ setSplitTree theName setCompiledClauses theName cc reportSDoc "trans.rec" 15 $ text $ "compiled" return $ Just theName {-| @checkRecordProjections m r q tel ftel fs@. [@m@ ] name of the generated module [@r@ ] name of the record type [@con@ ] name of the record constructor [@tel@ ] parameters and record variable r ("self") [@ftel@ ] telescope of fields [@fs@ ] the fields to be checked -} checkRecordProjections :: ModuleName -> QName -> Bool -> ConHead -> Telescope -> Telescope -> [A.Declaration] -> TCM () checkRecordProjections m r hasNamedCon con tel ftel fs = do checkProjs EmptyTel ftel fs where checkProjs :: Telescope -> Telescope -> [A.Declaration] -> TCM () checkProjs _ _ [] = return () checkProjs ftel1 ftel2 (A.ScopedDecl scope fs' : fs) = setScope scope >> checkProjs ftel1 ftel2 (fs' ++ fs) -- Case: projection. checkProjs ftel1 (ExtendTel (dom@Dom{domInfo = ai,unDom = t}) ftel2) (A.Field info x _ : fs) = traceCall (CheckProjection (getRange info) x t) $ do -- Andreas, 2012-06-07: -- Issue 387: It is wrong to just type check field types again -- because then meta variables are created again. -- Instead, we take the field type t from the field telescope. reportSDoc "tc.rec.proj" 5 $ sep [ "checking projection" <+> prettyTCM x , nest 2 $ vcat [ "top =" <+> (inTopContext . prettyTCM =<< getContextTelescope) , "tel =" <+> (inTopContext . prettyTCM $ tel) , "ftel1 =" <+> prettyTCM ftel1 , "t =" <+> prettyTCM t , "ftel2 =" <+> addContext ftel1 (underAbstraction_ ftel2 prettyTCM) , "abstr =" <+> (text . show) (Info.defAbstract info) ] ] -- Andreas, 2010-09-09 The following comments are misleading, TODO: update -- in fact, tel includes the variable of record type as last one -- e.g. for cartesion product it is -- -- tel = {A' : Set} {B' : Set} (r : Prod A' B') -- create the projection functions (instantiate the type with the values -- of the previous fields) {- what are the contexts? Γ, tel ⊢ t Γ, tel, r ⊢ vs Γ, tel, r, ftel₁ ⊢ raiseFrom (size ftel₁) 1 t -} -- The type of the projection function should be -- {tel} -> (r : R Δ) -> t -- where Δ = Γ, tel is the current context let finalt = telePi (replaceEmptyName "r" tel) t projname = qualify m $ qnameName x projcall o = Var 0 [Proj o projname] rel = getRelevance ai -- the recursive call recurse = checkProjs (abstract ftel1 $ ExtendTel dom $ Abs (nameToArgName $ qnameName projname) EmptyTel) (ftel2 `absApp` projcall ProjSystem) fs reportSDoc "tc.rec.proj" 25 $ nest 2 $ "finalt=" <+> do inTopContext $ prettyTCM finalt -- -- Andreas, 2012-02-20 do not add irrelevant projections if -- -- disabled by --no-irrelevant-projections -- ifM (return (rel == Irrelevant) `and2M` do not . optIrrelevantProjections <$> pragmaOptions) recurse $ do -- Andreas, 2018-06-09 issue #2170 -- Always create irrelevant projections (because the scope checker accepts irrelevant fields). -- If --no-irrelevant-projections, then their use should be disallowed by the type checker for expressions. do reportSDoc "tc.rec.proj" 10 $ sep [ "adding projection" , nest 2 $ prettyTCM projname <+> ":" <+> inTopContext (prettyTCM finalt) ] -- The body should be -- P.xi {tel} (r _ .. x .. _) = x -- Ulf, 2011-08-22: actually we're dropping the parameters from the -- projection functions so the body is now -- P.xi (r _ .. x .. _) = x -- Andreas, 2012-01-12: irrelevant projections get translated to -- P.xi (r _ .. x .. _) = irrAxiom {level of t} {t} x -- PROBLEM: because of dropped parameters, cannot refer to t -- 2012-04-02: DontCare instead of irrAxiom -- compute body modification for irrelevant projections let bodyMod = case rel of Relevant -> id NonStrict -> id Irrelevant -> DontCare let -- Andreas, 2010-09-09: comment for existing code -- split the telescope into parameters (ptel) and the type or the record -- (rt) which should be R ptel telList = telToList tel (_ptel,[rt]) = splitAt (size tel - 1) telList cpo = if hasNamedCon then PatOCon else PatORec cpi = ConPatternInfo { conPRecord = Just cpo , conPFallThrough = False , conPType = Just $ argFromDom $ fmap snd rt , conPLazy = True } conp = defaultArg $ ConP con cpi $ [ Arg ai' $ unnamed $ varP ("x" :: String) | Dom{domInfo = ai'} <- telToList ftel ] body = Just $ bodyMod $ var (size ftel2) cltel = ftel clause = Clause { clauseLHSRange = getRange info , clauseFullRange = getRange info , clauseTel = killRange cltel , namedClausePats = [Named Nothing <$> numberPatVars __IMPOSSIBLE__ (idP $ size ftel) conp] , clauseBody = body , clauseType = Just $ Arg ai t , clauseCatchall = False , clauseUnreachable = Just False } let projection = Projection { projProper = Just r , projOrig = projname -- name of the record type: , projFromType = defaultArg r -- index of the record argument (in the type), -- start counting with 1: , projIndex = size tel -- which is @size ptel + 1@ , projLams = ProjLams $ map (argFromDom . fmap fst) telList } reportSDoc "tc.rec.proj" 80 $ sep [ "adding projection" , nest 2 $ prettyTCM projname <+> text (show clause) ] reportSDoc "tc.rec.proj" 70 $ sep [ "adding projection" , nest 2 $ prettyTCM projname <+> text (show (clausePats clause)) <+> "=" <+> inTopContext (addContext ftel (maybe "_|_" prettyTCM (clauseBody clause))) ] reportSDoc "tc.rec.proj" 10 $ sep [ "adding projection" , nest 2 $ prettyTCM (QNamed projname clause) ] -- Record patterns should /not/ be translated when the -- projection functions are defined. Record pattern -- translation is defined in terms of projection -- functions. (mst , cc) <- compileClauses Nothing [clause] reportSDoc "tc.cc" 60 $ do sep [ "compiled clauses of " <+> prettyTCM projname , nest 2 $ text (show cc) ] escapeContext (size tel) $ do addConstant projname $ (defaultDefn ai projname (killRange finalt) emptyFunction { funClauses = [clause] , funCompiled = Just cc , funSplitTree = mst , funProjection = Just projection , funMutual = Just [] -- Projections are not mutually recursive with anything , funTerminates = Just True , funCopatternLHS = hasProjectionPatterns cc }) { defArgOccurrences = [StrictPos] } computePolarity [projname] when (Info.defInstance info == InstanceDef) $ addTypedInstance projname t recurse -- Case: definition. checkProjs ftel1 ftel2 (d : fs) = do checkDecl d checkProjs ftel1 ftel2 fs Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS.hs0000644000000000000000000022312513466402171017727 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.LHS ( checkLeftHandSide , LHSResult(..) , bindAsPatterns , IsFlexiblePattern(..) , checkSortOfSplitVar ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), mapM, null, sequence ) #else import Prelude hiding ( mapM, null, sequence ) #endif import Data.Maybe import Control.Arrow (left) import Control.Monad import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer hiding ((<>)) import Control.Monad.Trans.Maybe import Data.Either (partitionEithers) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (delete, sortBy, stripPrefix, (\\), findIndex) import qualified Data.List as List import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup ) import qualified Data.Semigroup as Semigroup import Data.Map (Map) import qualified Data.Map as Map import Agda.Interaction.Highlighting.Generate (storeDisambiguatedName, disambiguateRecordFields) import Agda.Interaction.Options import Agda.Interaction.Options.Lenses import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern import Agda.Syntax.Abstract (IsProjP(..)) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views (asView, deepUnscope) import Agda.Syntax.Concrete (FieldAssignment'(..),NameInScope(..),LensInScope(..)) import Agda.Syntax.Common as Common import Agda.Syntax.Info as A import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (litType, constructorForm) import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Conversion import Agda.TypeChecking.Constraints import Agda.TypeChecking.CheckInternal (checkInternal) import Agda.TypeChecking.Datatypes hiding (isDataOrRecordType) import Agda.TypeChecking.Errors (dropTopLevelModule) import Agda.TypeChecking.Irrelevance import {-# SOURCE #-} Agda.TypeChecking.Empty import Agda.TypeChecking.Forcing import Agda.TypeChecking.Patterns.Abstract import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records hiding (getRecordConstructor) import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Primitive hiding (Nat) import Agda.TypeChecking.Monad.Builtin import {-# SOURCE #-} Agda.TypeChecking.Rules.Term (checkExpr) import Agda.TypeChecking.Rules.LHS.Problem import Agda.TypeChecking.Rules.LHS.ProblemRest import Agda.TypeChecking.Rules.LHS.Unify import Agda.TypeChecking.Rules.LHS.Implicit import Agda.TypeChecking.Rules.Data import Agda.Utils.Except (MonadError(..), ExceptT, runExceptT) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Singleton import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Compute the set of flexible patterns in a list of patterns. The result is -- the deBruijn indices of the flexible patterns. flexiblePatterns :: [NamedArg A.Pattern] -> TCM FlexibleVars flexiblePatterns nps = do forMaybeM (zip (downFrom $ length nps) nps) $ \ (i, Arg ai p) -> do runMaybeT $ (\ f -> FlexibleVar (getHiding ai) (getOrigin ai) f (Just i) i) <$> maybeFlexiblePattern p -- | A pattern is flexible if it is dotted or implicit, or a record pattern -- with only flexible subpatterns. class IsFlexiblePattern a where maybeFlexiblePattern :: a -> MaybeT TCM FlexibleVarKind isFlexiblePattern :: a -> TCM Bool isFlexiblePattern p = maybe False notOtherFlex <$> runMaybeT (maybeFlexiblePattern p) where notOtherFlex = \case RecordFlex fls -> all notOtherFlex fls ImplicitFlex -> True DotFlex -> True OtherFlex -> False instance IsFlexiblePattern A.Pattern where maybeFlexiblePattern p = do reportSDoc "tc.lhs.flex" 30 $ "maybeFlexiblePattern" <+> prettyA p reportSDoc "tc.lhs.flex" 60 $ "maybeFlexiblePattern (raw) " <+> (text . show . deepUnscope) p case p of A.DotP{} -> return DotFlex A.VarP{} -> return ImplicitFlex A.WildP{} -> return ImplicitFlex A.AsP _ _ p -> maybeFlexiblePattern p A.ConP _ cs qs | Just c <- getUnambiguous cs -> ifM (isNothing <$> isRecordConstructor c) (return OtherFlex) {-else-} (maybeFlexiblePattern qs) A.LitP{} -> return OtherFlex _ -> mzero instance IsFlexiblePattern (I.Pattern' a) where maybeFlexiblePattern p = case p of I.DotP{} -> return DotFlex I.ConP _ i ps | Just PatOSystem <- conPRecord i -> return ImplicitFlex -- expanded from ImplicitP | Just _ <- conPRecord i -> maybeFlexiblePattern ps | otherwise -> mzero I.VarP{} -> mzero I.LitP{} -> mzero I.ProjP{} -> mzero I.IApplyP{} -> mzero I.DefP{} -> mzero -- TODO Andrea check semantics -- | Lists of flexible patterns are 'RecordFlex'. instance IsFlexiblePattern a => IsFlexiblePattern [a] where maybeFlexiblePattern ps = RecordFlex <$> mapM maybeFlexiblePattern ps instance IsFlexiblePattern a => IsFlexiblePattern (Arg a) where maybeFlexiblePattern = maybeFlexiblePattern . unArg instance IsFlexiblePattern a => IsFlexiblePattern (Common.Named name a) where maybeFlexiblePattern = maybeFlexiblePattern . namedThing -- | Update the user patterns in the given problem, simplifying equations -- between constructors where possible. updateProblemEqs :: [ProblemEq] -> TCM [ProblemEq] updateProblemEqs eqs = do reportSDoc "tc.lhs.top" 20 $ vcat [ "updateProblem: equations to update" , nest 2 $ if null eqs then "(none)" else vcat $ map prettyTCM eqs ] eqs' <- updates eqs reportSDoc "tc.lhs.top" 20 $ vcat [ "updateProblem: new equations" , nest 2 $ if null eqs' then "(none)" else vcat $ map prettyTCM eqs' ] return eqs' where updates :: [ProblemEq] -> TCM [ProblemEq] updates = concat <.> traverse update update :: ProblemEq -> TCM [ProblemEq] update eq@(ProblemEq A.WildP{} _ _) = return [] update eq@(ProblemEq p@A.ProjP{} _ _) = typeError $ IllformedProjectionPattern p update eq@(ProblemEq p v a) = reduce v >>= constructorForm >>= \case Con c ci es -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- we should only simplify equations between fully applied constructors contype <- getFullyAppliedConType c =<< reduce (unDom a) caseMaybe contype (return [eq]) $ \((d,_,pars),b) -> do TelV ctel _ <- telViewPath b let bs = instTel ctel (map unArg vs) p <- expandLitPattern p case p of A.AsP info x p' -> (ProblemEq (A.VarP x) v a :) <$> update (ProblemEq p' v a) A.ConP cpi ambC ps -> do (c',_) <- disambiguateConstructor ambC d pars -- Issue #3014: If the constructor is forced but the user wrote a -- different constructor,that's an error. We simply keep the -- problem equation, this will result in a proper error message later. if conName c /= conName c' then return [eq] else do -- Insert implicit patterns ps <- insertImplicitPatterns ExpandLast ps ctel reportSDoc "tc.lhs.imp" 20 $ "insertImplicitPatternsT returned" <+> fsep (map prettyA ps) -- Check argument count and hiding (not just count: #3074) let checkArgs [] [] = return () checkArgs (p : ps) (v : vs) | getHiding p == getHiding v = checkArgs ps vs | otherwise = setCurrentRange p $ genericDocError =<< do fsep $ pwords ("Expected an " ++ which (getHiding v) ++ " argument " ++ "instead of " ++ which (getHiding p) ++ " argument") ++ [ prettyA p ] where which NotHidden = "explicit" which Hidden = "implicit" which Instance{} = "instance" checkArgs [] vs = genericDocError =<< do fsep $ pwords "Too few arguments to constructor" ++ [prettyTCM c <> ","] ++ pwords ("expected " ++ show n ++ " more explicit " ++ arguments) where n = length (filter visible vs) arguments | n == 1 = "argument" | otherwise = "arguments" checkArgs (p : _) [] = setCurrentRange p $ genericDocError =<< do fsep $ pwords "Too many arguments to constructor" ++ [prettyTCM c] checkArgs ps vs updates $ zipWith3 ProblemEq (map namedArg ps) (map unArg vs) bs A.RecP pi fs -> do axs <- recFields . theDef <$> getConstInfo d -- Andreas, 2018-09-06, issue #3122. -- Associate the concrete record field names used in the record pattern -- to their counterpart in the record type definition. disambiguateRecordFields (map _nameFieldA fs) (map unArg axs) let cxs = map (fmap (nameConcrete . qnameName)) axs -- In fs omitted explicit fields are replaced by underscores, -- and the fields are put in the correct order. ps <- insertMissingFields d (const $ A.WildP patNoRange) fs cxs -- We also need to insert missing implicit or instance fields. ps <- insertImplicitPatterns ExpandLast ps ctel let eqs = zipWith3 ProblemEq (map namedArg ps) (map unArg vs) bs updates eqs _ -> return [eq] Lit l | A.LitP l' <- p , l == l' -> return [] _ | A.EqualP{} <- p -> do itisone <- liftTCM primItIsOne ifM (tryConversion $ equalTerm (unDom a) v itisone) (return []) (return [eq]) _ -> return [eq] instTel :: Telescope -> [Term] -> [Dom Type] instTel EmptyTel _ = [] instTel (ExtendTel arg tel) (u : us) = arg : instTel (absApp tel u) us instTel ExtendTel{} [] = __IMPOSSIBLE__ -- | Check if a problem is solved. -- That is, if the patterns are all variables, -- and there is no 'problemRest'. isSolvedProblem :: Problem a -> Bool isSolvedProblem problem = null (problem ^. problemRestPats) && problemAllVariables problem -- | Check if a problem consists only of variable patterns. -- (Includes the 'problemRest'). problemAllVariables :: Problem a -> Bool problemAllVariables problem = all (isSolved . snd . asView) $ map namedArg (problem ^. problemRestPats) ++ problemInPats problem where -- need further splitting: isSolved A.ConP{} = False isSolved A.LitP{} = False isSolved A.RecP{} = False -- record pattern -- solved: isSolved A.VarP{} = True isSolved A.WildP{} = True isSolved A.DotP{} = True isSolved A.AbsurdP{} = True -- impossible: isSolved A.ProjP{} = __IMPOSSIBLE__ isSolved A.DefP{} = __IMPOSSIBLE__ isSolved A.AsP{} = __IMPOSSIBLE__ -- removed by asView isSolved A.PatternSynP{} = __IMPOSSIBLE__ -- expanded before isSolved A.EqualP{} = False -- __IMPOSSIBLE__ isSolved A.WithP{} = __IMPOSSIBLE__ -- | For each user-defined pattern variable in the 'Problem', check -- that the corresponding data type (if any) does not contain a -- constructor of the same name (which is not in scope); this -- \"shadowing\" could indicate an error, and is not allowed. -- -- Precondition: The problem has to be solved. noShadowingOfConstructors :: Call -- ^ Trace, e.g., @CheckPatternShadowing clause@ -> [ProblemEq] -> TCM () noShadowingOfConstructors mkCall eqs = traceCall mkCall $ mapM_ noShadowing eqs where noShadowing (ProblemEq p _ (Dom{domInfo = info, unDom = El _ a})) = case snd $ asView p of A.WildP {} -> return () A.AbsurdP {} -> return () A.DotP {} -> return () A.EqualP {} -> return () A.ConP {} -> __IMPOSSIBLE__ A.RecP {} -> __IMPOSSIBLE__ A.ProjP {} -> __IMPOSSIBLE__ A.DefP {} -> __IMPOSSIBLE__ A.AsP {} -> __IMPOSSIBLE__ -- removed by asView A.LitP {} -> __IMPOSSIBLE__ A.PatternSynP {} -> __IMPOSSIBLE__ A.WithP {} -> __IMPOSSIBLE__ -- Andreas, 2017-12-01, issue #2859. -- Due to parameter refinement, there can be (invisible) variable patterns from module -- parameters that shadow constructors. -- Thus, only complain about user written variable that shadow constructors. A.VarP (A.BindName x) -> when (getOrigin info == UserWritten) $ do reportSDoc "tc.lhs.shadow" 30 $ vcat [ text $ "checking whether pattern variable " ++ prettyShow x ++ " shadows a constructor" , nest 2 $ "type of variable =" <+> prettyTCM a , nest 2 $ "position of variable =" <+> (text . show) (getRange x) ] reportSDoc "tc.lhs.shadow" 70 $ nest 2 $ "a =" <+> pretty a a <- reduce a case a of Def t _ -> do d <- theDef <$> getConstInfo t case d of Datatype { dataCons = cs } -> do case filter ((A.nameConcrete x ==) . A.nameConcrete . A.qnameName) cs of [] -> return () (c : _) -> setCurrentRange x $ typeError $ PatternShadowsConstructor (nameConcrete x) c AbstractDefn{} -> return () -- Abstract constructors cannot be brought into scope, -- even by a bigger import list. -- Thus, they cannot be confused with variables. -- Alternatively, we could do getConstInfo in ignoreAbstractMode, -- then Agda would complain if a variable shadowed an abstract constructor. Axiom {} -> return () DataOrRecSig{} -> return () Function {} -> return () Record {} -> return () Constructor {} -> __IMPOSSIBLE__ GeneralizableVar{} -> __IMPOSSIBLE__ -- TODO: in the future some stuck primitives might allow constructors Primitive {} -> return () Var {} -> return () Pi {} -> return () Sort {} -> return () MetaV {} -> return () -- TODO: If the type is a meta-variable, should the test be -- postponed? If there is a problem, then it will be caught when -- the completed module is type checked, so it is safe to skip -- the test here. However, users may be annoyed if they get an -- error in code which has already passed the type checker. Lam {} -> __IMPOSSIBLE__ Lit {} -> __IMPOSSIBLE__ Level {} -> __IMPOSSIBLE__ Con {} -> __IMPOSSIBLE__ DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- | Check that a dot pattern matches it's instantiation. checkDotPattern :: DotPattern -> TCM () checkDotPattern (Dot e v (Dom{domInfo = info, unDom = a})) = traceCall (CheckDotPattern e v) $ do reportSDoc "tc.lhs.dot" 15 $ sep [ "checking dot pattern" , nest 2 $ prettyA e , nest 2 $ "=" <+> prettyTCM v , nest 2 $ ":" <+> prettyTCM a ] applyModalityToContext info $ do u <- checkExpr e a reportSDoc "tc.lhs.dot" 50 $ sep [ "equalTerm" , nest 2 $ pretty a , nest 2 $ pretty u , nest 2 $ pretty v ] -- Should be ok to do noConstraints here noConstraints $ equalTerm a u v checkAbsurdPattern :: AbsurdPattern -> TCM () checkAbsurdPattern (Absurd r a) = ensureEmptyType r a data LeftoverPatterns = LeftoverPatterns { patternVariables :: IntMap [A.Name] , asPatterns :: [AsBinding] , dotPatterns :: [DotPattern] , absurdPatterns :: [AbsurdPattern] , otherPatterns :: [A.Pattern] } instance Semigroup LeftoverPatterns where x <> y = LeftoverPatterns { patternVariables = IntMap.unionWith (++) (patternVariables x) (patternVariables y) , asPatterns = asPatterns x ++ asPatterns y , dotPatterns = dotPatterns x ++ dotPatterns y , absurdPatterns = absurdPatterns x ++ absurdPatterns y , otherPatterns = otherPatterns x ++ otherPatterns y } instance Monoid LeftoverPatterns where mempty = LeftoverPatterns empty [] [] [] [] mappend = (Semigroup.<>) -- | Classify remaining patterns after splitting is complete into pattern -- variables, as patterns, dot patterns, and absurd patterns. -- Precondition: there are no more constructor patterns. getLeftoverPatterns :: [ProblemEq] -> TCM LeftoverPatterns getLeftoverPatterns eqs = do reportSDoc "tc.lhs.top" 30 $ "classifying leftover patterns" mconcat <$> mapM getLeftoverPattern eqs where patternVariable x i = LeftoverPatterns (singleton (i,[x])) [] [] [] [] asPattern x v a = LeftoverPatterns empty [AsB x v (unDom a)] [] [] [] dotPattern e v a = LeftoverPatterns empty [] [Dot e v a] [] [] absurdPattern info a = LeftoverPatterns empty [] [] [Absurd info a] [] otherPattern p = LeftoverPatterns empty [] [] [] [p] getLeftoverPattern :: ProblemEq -> TCM LeftoverPatterns getLeftoverPattern (ProblemEq p v a) = case p of (A.VarP (A.BindName x)) -> isEtaVar v (unDom a) >>= \case Just i -> return $ patternVariable x i Nothing -> return $ asPattern x v a (A.WildP _) -> return mempty (A.AsP info (A.BindName x) p) -> (asPattern x v a `mappend`) <$> do getLeftoverPattern $ ProblemEq p v a (A.DotP info e) -> return $ dotPattern e v a (A.AbsurdP info) -> return $ absurdPattern (getRange info) (unDom a) _ -> return $ otherPattern p -- | Build a renaming for the internal patterns using variable names from -- the user patterns. If there are multiple user names for the same internal -- variable, the unused ones are returned as as-bindings. getUserVariableNames :: Telescope -> IntMap [A.Name] -> ([Maybe A.Name], [AsBinding]) getUserVariableNames tel names = runWriter $ zipWithM makeVar (flattenTel tel) (downFrom $ size tel) where makeVar :: Dom Type -> Int -> Writer [AsBinding] (Maybe A.Name) makeVar a i | Just (x:xs) <- IntMap.lookup i names = do tell $ map (\y -> AsB y (var i) (unDom a)) xs return $ Just x makeVar a i = return Nothing -- | After splitting is complete, we transfer the origins -- We also transfer the locations of absurd patterns, since these haven't -- been introduced yet in the internal pattern. transferOrigins :: [NamedArg A.Pattern] -> [NamedArg DeBruijnPattern] -> TCM [NamedArg DeBruijnPattern] transferOrigins ps qs = do reportSDoc "tc.lhs.origin" 40 $ vcat [ "transferOrigins" , nest 2 $ vcat [ "ps = " <+> prettyA ps , "qs = " <+> pretty qs ] ] transfers ps qs where transfers :: [NamedArg A.Pattern] -> [NamedArg DeBruijnPattern] -> TCM [NamedArg DeBruijnPattern] transfers [] qs | all notVisible qs = return $ map (setOrigin Inserted) qs | otherwise = __IMPOSSIBLE__ transfers (p : ps) [] = __IMPOSSIBLE__ transfers (p : ps) (q : qs) | matchingArgs p q = do q' <- setOrigin (getOrigin p) <$> (traverse $ traverse $ transfer $ namedArg p) q (q' :) <$> transfers ps qs | otherwise = (setOrigin Inserted q :) <$> transfers (p : ps) qs transfer :: A.Pattern -> DeBruijnPattern -> TCM DeBruijnPattern transfer p q = case (snd (asView p) , q) of (A.ConP pi _ ps , ConP c (ConPatternInfo mo ft mb l) qs) -> do let cpi = ConPatternInfo (mo $> PatOCon) ft mb l ConP c cpi <$> transfers ps qs (A.RecP pi fs , ConP c (ConPatternInfo mo ft mb l) qs) -> do let Def d _ = unEl $ unArg $ fromMaybe __IMPOSSIBLE__ mb axs = map (nameConcrete . qnameName . unArg) (conFields c) `withArgsFrom` qs cpi = ConPatternInfo (mo $> PatORec) ft mb l ps <- insertMissingFields d (const $ A.WildP patNoRange) fs axs ConP c cpi <$> transfers ps qs (p , ConP c (ConPatternInfo mo ft mb l) qs) -> do let cpi = ConPatternInfo (mo $> patOrigin p) ft mb l return $ ConP c cpi qs (p , VarP _ x) -> return $ VarP (patOrigin p) x (p , DotP _ u) -> return $ DotP (patOrigin p) u _ -> return q patOrigin :: A.Pattern -> PatOrigin patOrigin (A.VarP x) = PatOVar (A.unBind x) patOrigin A.DotP{} = PatODot patOrigin A.ConP{} = PatOCon patOrigin A.RecP{} = PatORec patOrigin A.WildP{} = PatOWild patOrigin A.AbsurdP{} = PatOAbsurd patOrigin A.LitP{} = PatOLit patOrigin A.EqualP{} = PatOCon --TODO: origin for EqualP patOrigin A.AsP{} = __IMPOSSIBLE__ patOrigin A.ProjP{} = __IMPOSSIBLE__ patOrigin A.DefP{} = __IMPOSSIBLE__ patOrigin A.PatternSynP{} = __IMPOSSIBLE__ patOrigin A.WithP{} = __IMPOSSIBLE__ matchingArgs :: NamedArg A.Pattern -> NamedArg DeBruijnPattern -> Bool matchingArgs p q -- The arguments match if -- 1. they are both projections, | isJust (A.isProjP p) = isJust (isProjP q) -- 2. or they are both visible, | visible p && visible q = True -- 3. or they have the same hiding and the argument is not named, | sameHiding p q && isNothing (nameOf (unArg p)) = True -- 4. or they have the same hiding and the same name. | sameHiding p q && nameOf (unArg p) == nameOf (unArg q) = True -- Otherwise this argument was inserted by the typechecker. | otherwise = False -- | If a user-written variable occurs more than once, it should be bound -- to the same internal variable (or term) in all positions. -- Returns the list of patterns with the duplicate user patterns removed. checkPatternLinearity :: [ProblemEq] -> TCM [ProblemEq] checkPatternLinearity eqs = do reportSDoc "tc.lhs.linear" 30 $ "Checking linearity of pattern variables" check Map.empty eqs where check :: Map A.BindName Term -> [ProblemEq] -> TCM [ProblemEq] check _ [] = return [] check vars (eq@(ProblemEq p u a) : eqs) = do reportSDoc "tc.lhs.linear" 40 $ sep [ "linearity: checking pattern " , prettyA p , " equal to term " , prettyTCM u ] case p of A.VarP x -> do verboseS "tc.lhs.linear" 60 $ do let y = A.unBind x reportSLn "tc.lhs.linear" 60 $ "pattern variable " ++ show (A.nameConcrete y) ++ " with id " ++ show (A.nameId y) case Map.lookup x vars of Just v -> do noConstraints $ equalTerm (unDom a) u v check vars eqs Nothing -> (eq:) <$> do check (Map.insert x u vars) eqs A.AsP _ x p -> check vars $ [ProblemEq (A.VarP x) u a, ProblemEq p u a] ++ eqs A.WildP{} -> continue A.DotP{} -> continue A.AbsurdP{} -> continue A.ConP{} -> __IMPOSSIBLE__ A.ProjP{} -> __IMPOSSIBLE__ A.DefP{} -> __IMPOSSIBLE__ A.LitP{} -> __IMPOSSIBLE__ A.PatternSynP{} -> __IMPOSSIBLE__ A.RecP{} -> __IMPOSSIBLE__ A.EqualP{} -> __IMPOSSIBLE__ A.WithP{} -> __IMPOSSIBLE__ where continue = (eq:) <$> check vars eqs -- | Construct the context for a left hand side, making up out-of-scope names -- for unnamed variables. computeLHSContext :: [Maybe A.Name] -> Telescope -> TCM Context computeLHSContext = go [] [] where go cxt _ [] tel@ExtendTel{} = do reportSDoc "impossible" 10 $ "computeLHSContext: no patterns left, but tel =" <+> prettyTCM tel __IMPOSSIBLE__ go cxt _ (_ : _) EmptyTel = __IMPOSSIBLE__ go cxt _ [] EmptyTel = return cxt go cxt taken (x : xs) tel0@(ExtendTel a tel) = do name <- maybe (dummyName taken $ absName tel) return x let e = (name,) <$> a go (e : cxt) (name : taken) xs (absBody tel) dummyName taken s = if isUnderscore s then freshNoName_ else setNotInScope <$> freshName_ (argNameToString s) -- | Bind as patterns bindAsPatterns :: [AsBinding] -> TCM a -> TCM a bindAsPatterns [] ret = ret bindAsPatterns (AsB x v a : asb) ret = do reportSDoc "tc.lhs.as" 10 $ "as pattern" <+> prettyTCM x <+> sep [ ":" <+> prettyTCM a , "=" <+> prettyTCM v ] addLetBinding defaultArgInfo x v a $ bindAsPatterns asb ret -- | Since with-abstraction can change the type of a variable, we have to -- recheck the stripped with patterns when checking a with function. recheckStrippedWithPattern :: ProblemEq -> TCM () recheckStrippedWithPattern (ProblemEq p v a) = checkInternal v (unDom a) `catchError` \_ -> typeError . GenericDocError =<< vcat [ "Ill-typed pattern after with abstraction: " <+> prettyA p , "(perhaps you can replace it by `_`?)" ] -- | Result of checking the LHS of a clause. data LHSResult = LHSResult { lhsParameters :: Nat -- ^ The number of original module parameters. These are present in the -- the patterns. , lhsVarTele :: Telescope -- ^ Δ : The types of the pattern variables, in internal dependency order. -- Corresponds to 'clauseTel'. , lhsPatterns :: [NamedArg DeBruijnPattern] -- ^ The patterns in internal syntax. , lhsHasAbsurd :: Bool -- ^ Whether the LHS has at least one absurd pattern. , lhsBodyType :: Arg Type -- ^ The type of the body. Is @bσ@ if @Γ@ is defined. -- 'Irrelevant' to indicate the rhs must be checked in irrelevant mode. , lhsPatSubst :: Substitution -- ^ Substitution version of @lhsPatterns@, only up to the first projection -- pattern. @Δ |- lhsPatSubst : Γ@. Where @Γ@ is the argument telescope of -- the function. This is used to update inherited dot patterns in -- with-function clauses. , lhsAsBindings :: [AsBinding] -- ^ As-bindings from the left-hand side. Return instead of bound since we -- want them in where's and right-hand sides, but not in with-clauses -- (Issue 2303). , lhsPartialSplit :: [Int] -- ^ have we done a partial split? } instance InstantiateFull LHSResult where instantiateFull' (LHSResult n tel ps abs t sub as psplit) = LHSResult n <$> instantiateFull' tel <*> instantiateFull' ps <*> instantiateFull' abs <*> instantiateFull' t <*> instantiateFull' sub <*> instantiateFull' as <*> pure psplit -- | Check a LHS. Main function. -- -- @checkLeftHandSide a ps a ret@ checks that user patterns @ps@ eliminate -- the type @a@ of the defined function, and calls continuation @ret@ -- if successful. checkLeftHandSide :: forall a. Call -- ^ Trace, e.g. @CheckPatternShadowing clause@ -> Maybe QName -- ^ The name of the definition we are checking. -> [NamedArg A.Pattern] -- ^ The patterns. -> Type -- ^ The expected type @a = Γ → b@. -> Maybe Substitution -- ^ Module parameter substitution from with-abstraction. -> [ProblemEq] -- ^ Patterns that have been stripped away by with-desugaring. -- ^ These should not contain any proper matches. -> (LHSResult -> TCM a) -- ^ Continuation. -> TCM a checkLeftHandSide c f ps a withSub' strippedPats = Bench.billToCPS [Bench.Typing, Bench.CheckLHS] $ \ ret -> do -- To allow module parameters to be refined by matching, we're adding the -- context arguments as wildcard patterns and extending the type with the -- context telescope. cxt <- map (setOrigin Inserted) . reverse <$> getContext let tel = telFromList' prettyShow cxt cps = [ unnamed . A.VarP . A.BindName . fst <$> argFromDom d | d <- cxt ] eqs0 = zipWith3 ProblemEq (map namedArg cps) (map var $ downFrom $ size tel) (flattenTel tel) let finalChecks :: LHSState a -> TCM a finalChecks (LHSState delta qs0 (Problem eqs rps _) b psplit) = do reportSDoc "tc.lhs.top" 20 $ vcat [ "lhs: final checks with remaining equations" , nest 2 $ if null eqs then "(none)" else vcat $ map prettyTCM eqs , "qs0 =" <+> addContext delta (prettyTCMPatternList qs0) ] unless (null rps) __IMPOSSIBLE__ -- Update modalities of delta to match the modalities of the variables -- after the forcing translation. We can't perform the forcing translation -- yet, since that would mess with with-clause stripping. delta <- forceTranslateTelescope delta qs0 addContext delta $ do noShadowingOfConstructors c eqs noPatternMatchingOnCodata qs0 -- Compute substitution from the out patterns @qs0@ let notProj ProjP{} = False notProj _ = True numPats = length $ takeWhile (notProj . namedArg) qs0 -- We have two slightly different cases here: normal function and -- with-function. In both cases the goal is to build a substitution -- from the context Γ of the previous checkpoint to the current lhs -- context Δ: -- -- Δ ⊢ paramSub : Γ -- -- * Normal function, f -- -- Γ = cxt = module parameter telescope of f -- Ψ = non-parameter arguments of f (we have f : Γ Ψ → A) -- Δ ⊢ patSub : Γ Ψ -- Γ Ψ ⊢ weakSub : Γ -- paramSub = patSub ∘ weakSub -- -- * With-function -- -- Γ = lhs context of the parent clause (cxt = []) -- Ψ = argument telescope of with-function -- Θ = inserted implicit patterns not in Ψ (#2827) -- (this happens if the goal computes to an implicit -- function type after some matching in the with-clause) -- -- Ψ ⊢ withSub : Γ -- Δ ⊢ patSub : Ψ Θ -- Ψ Θ ⊢ weakSub : Ψ -- paramSub = patSub ∘ weakSub ∘ withSub -- -- To compute Θ we can look at the arity of the with-function -- and compare it to numPats. This works since the with-function -- type is fully reduced. weakSub :: Substitution weakSub | isJust withSub' = wkS (max 0 $ numPats - arity a) idS -- if numPats < arity, Θ is empty | otherwise = wkS (numPats - length cxt) idS withSub = fromMaybe idS withSub' patSub = (map (patternToTerm . namedArg) $ reverse $ take numPats qs0) ++# (EmptyS __IMPOSSIBLE__) paramSub = patSub `composeS` weakSub `composeS` withSub eqs <- addContext delta $ checkPatternLinearity eqs LeftoverPatterns patVars asb0 dots absurds otherPats <- addContext delta $ getLeftoverPatterns eqs unless (null otherPats) __IMPOSSIBLE__ -- Get the user-written names for the pattern variables let (vars, asb1) = getUserVariableNames delta patVars asb = asb0 ++ asb1 -- Rename internal patterns with these names let makeVar = maybe deBruijnVar $ debruijnNamedVar . nameToArgName ren = parallelS $ zipWith makeVar (reverse vars) [0..] qs <- transferOrigins (cps ++ ps) $ applySubst ren qs0 let hasAbsurd = not . null $ absurds let lhsResult = LHSResult (length cxt) delta qs hasAbsurd b patSub asb (catMaybes psplit) -- Debug output reportSDoc "tc.lhs.top" 10 $ vcat [ "checked lhs:" , nest 2 $ vcat [ "delta = " <+> prettyTCM delta , "dots = " <+> addContext delta (brackets $ fsep $ punctuate comma $ map prettyTCM dots) , "asb = " <+> addContext delta (brackets $ fsep $ punctuate comma $ map prettyTCM asb) , "absurds = " <+> addContext delta (brackets $ fsep $ punctuate comma $ map prettyTCM absurds) , "qs = " <+> addContext delta (prettyList $ map pretty qs) ] ] reportSDoc "tc.lhs.top" 30 $ nest 2 $ vcat [ "vars = " <+> text (show vars) ] reportSDoc "tc.lhs.top" 20 $ nest 2 $ "withSub = " <+> pretty withSub reportSDoc "tc.lhs.top" 20 $ nest 2 $ "weakSub = " <+> pretty weakSub reportSDoc "tc.lhs.top" 20 $ nest 2 $ "patSub = " <+> pretty patSub reportSDoc "tc.lhs.top" 20 $ nest 2 $ "paramSub = " <+> pretty paramSub newCxt <- computeLHSContext vars delta updateContext paramSub (const newCxt) $ do reportSDoc "tc.lhs.top" 10 $ "bound pattern variables" reportSDoc "tc.lhs.top" 60 $ nest 2 $ "context = " <+> (pretty =<< getContextTelescope) reportSDoc "tc.lhs.top" 10 $ nest 2 $ "type = " <+> prettyTCM b reportSDoc "tc.lhs.top" 60 $ nest 2 $ "type = " <+> pretty b bindAsPatterns asb $ do -- Check dot patterns mapM_ checkDotPattern dots mapM_ checkAbsurdPattern absurds -- Issue2303: don't bind asb' for the continuation (return in lhsResult instead) ret lhsResult st0 <- initLHSState tel eqs0 ps a finalChecks -- after we have introduced variables, we can add the patterns stripped by -- with-desugaring to the state. let withSub = fromMaybe __IMPOSSIBLE__ withSub' withEqs <- updateProblemEqs $ applySubst withSub strippedPats -- Jesper, 2017-05-13: re-check the stripped patterns here! inTopContext $ addContext (st0 ^. lhsTel) $ forM_ withEqs recheckStrippedWithPattern let st = over (lhsProblem . problemEqs) (++ withEqs) st0 -- doing the splits: (result, block) <- inTopContext $ runWriterT $ (`runReaderT` (size cxt)) $ checkLHS f st return result -- | Determine in which order the splits should be tried by -- reordering/inserting/dropping the problem equations. splitStrategy :: [ProblemEq] -> [ProblemEq] splitStrategy = filter shouldSplit where shouldSplit :: ProblemEq -> Bool shouldSplit (ProblemEq p v a) = case snd $ asView p of A.LitP{} -> True A.RecP{} -> True A.ConP{} -> True A.EqualP{} -> True A.VarP{} -> False A.WildP{} -> False A.DotP{} -> False A.AbsurdP{} -> False A.ProjP{} -> __IMPOSSIBLE__ A.DefP{} -> __IMPOSSIBLE__ A.AsP{} -> __IMPOSSIBLE__ A.PatternSynP{} -> __IMPOSSIBLE__ A.WithP{} -> __IMPOSSIBLE__ -- | The loop (tail-recursive): split at a variable in the problem until problem is solved checkLHS :: forall tcm a. (MonadTCM tcm, MonadReduce tcm, MonadWriter Blocked_ tcm, HasConstInfo tcm, MonadError TCErr tcm, MonadDebug tcm, MonadReader Nat tcm) => Maybe QName -- ^ The name of the definition we are checking. -> LHSState a -- ^ The current state. -> tcm a checkLHS mf = updateRelevance checkLHS_ where -- If the target type is irrelevant or in Prop, -- we need to check the lhs in irr. cxt. (see Issue 939). updateRelevance cont st@(LHSState tel ip problem target psplit) = do let m = getModality target applyModalityToContext m $ do cont $ over (lhsTel . listTel) (map $ inverseApplyModality m) st -- Andreas, 2018-10-23, issue #3309 -- the modalities in the clause telescope also need updating. checkLHS_ st@(LHSState tel ip problem target psplit) = do if isSolvedProblem problem then liftTCM $ (problem ^. problemCont) st else do unlessM (optPatternMatching <$> getsTC getPragmaOptions) $ unless (problemAllVariables problem) $ typeError $ GenericError $ "Pattern matching is disabled" let splitsToTry = splitStrategy $ problem ^. problemEqs foldr trySplit trySplitRest splitsToTry >>= \case Right st' -> checkLHS mf st' -- If no split works, give error from first split. -- This is conservative, but might not be the best behavior. -- It might be better to print all the errors instead. Left (err:_) -> throwError err Left [] -> __IMPOSSIBLE__ where trySplit :: ProblemEq -> tcm (Either [TCErr] (LHSState a)) -> tcm (Either [TCErr] (LHSState a)) trySplit eq tryNextSplit = runExceptT (splitArg eq) >>= \case Right st' -> return $ Right st' Left err -> left (err:) <$> tryNextSplit -- If there are any remaining user patterns, try to split on them trySplitRest :: tcm (Either [TCErr] (LHSState a)) trySplitRest = case problem ^. problemRestPats of [] -> return $ Left [] (p:_) -> left singleton <$> runExceptT (splitRest p) splitArg :: ProblemEq -> ExceptT TCErr tcm (LHSState a) -- Split on constructor/literal pattern splitArg (ProblemEq p v Dom{unDom = a}) = traceCall (CheckPattern p tel a) $ do reportSDoc "tc.lhs.split" 30 $ sep [ "split looking at pattern" , nest 2 $ "p =" <+> prettyA p ] -- in order to split, v must be a variable. i <- liftTCM $ addContext tel $ ifJustM (isEtaVar v a) return $ softTypeError $ SplitOnNonVariable v a let pos = size tel - (i+1) (delta1, tel'@(ExtendTel dom adelta2)) = splitTelescopeAt pos tel p <- liftTCM $ expandLitPattern p case snd $ asView p of (A.LitP l) -> splitLit delta1 dom adelta2 l p@A.RecP{} -> splitCon delta1 dom adelta2 p Nothing p@(A.ConP _ c ps) -> splitCon delta1 dom adelta2 p $ Just c p@(A.EqualP _ ts) -> splitPartial delta1 dom adelta2 ts A.VarP{} -> __IMPOSSIBLE__ A.WildP{} -> __IMPOSSIBLE__ A.DotP{} -> __IMPOSSIBLE__ A.AbsurdP{} -> __IMPOSSIBLE__ A.ProjP{} -> __IMPOSSIBLE__ A.DefP{} -> __IMPOSSIBLE__ A.AsP{} -> __IMPOSSIBLE__ A.PatternSynP{} -> __IMPOSSIBLE__ A.WithP{} -> __IMPOSSIBLE__ splitRest :: NamedArg A.Pattern -> ExceptT TCErr tcm (LHSState a) splitRest p = setCurrentRange p $ do reportSDoc "tc.lhs.split" 20 $ sep [ "splitting problem rest" , nest 2 $ "projection pattern =" <+> prettyA p , nest 2 $ "eliminates type =" <+> prettyTCM target ] reportSDoc "tc.lhs.split" 80 $ sep [ nest 2 $ text $ "projection pattern (raw) = " ++ show p ] -- @p@ should be a projection pattern projection from @target@ (orig, ambProjName) <- ifJust (A.isProjP p) return $ addContext tel $ softTypeError $ CannotEliminateWithPattern p (unArg target) (projName, projType) <- suspendErrors $ do -- Andreas, 2018-10-18, issue #3289: postfix projections do not have hiding -- information for their principal argument; we do not parse @{r}.p@ and the like. let h = if orig == ProjPostfix then Nothing else Just $ getHiding p addContext tel $ disambiguateProjection h ambProjName target -- Compute the new rest type by applying the projection type to 'self'. -- Note: we cannot be in a let binding. f <- ifJust mf return $ hardTypeError $ GenericError "Cannot use copatterns in a let binding" let self = Def f $ patternsToElims ip target' <- traverse (`piApplyM` self) projType -- Compute the new state let projP = applyWhen (orig == ProjPostfix) (setHiding NotHidden) $ target' $> Named Nothing (ProjP orig projName) ip' = ip ++ [projP] -- drop the projection pattern (already splitted) problem' = over problemRestPats tail problem liftTCM $ updateProblemRest (LHSState tel ip' problem' target' psplit) -- | Split a Partial. -- -- Example for splitPartial: -- @ -- g : ∀ i j → Partial (i ∨ j) A -- g i j (i = 1) = a i j -- g i j (j = 1) = b i j -- @ -- leads to, in the first clause: -- @ -- dom = IsOne (i ∨ j) -- ts = [(i, 1)] -- phi = i -- sigma = [1/i] -- @ -- Final clauses: -- @ -- g : ∀ i j → Partial (i ∨ j) A -- g 1? j .itIsOne = a 1 j -- g i 1? .itIsOne = b i 1 -- @ -- Herein, ? indicates a 'conPFallThrough' pattern. -- -- Example for splitPartial: -- @ -- h : ∀ i j → Partial (i & ¬ j) A -- h i j (i = 1) (j = 0) -- -- ALT: h i j (i & ¬ j = 1) -- @ -- gives -- @ -- dom = IsOne (i & ¬ j) -- ts = [(i,1), (j,0)] -- ALT: [(i & ¬ j, 1)] -- phi = i & ¬ j -- sigma = [1/i,0/j] -- @ -- -- Example for splitPartial: -- @ -- g : ∀ i j → Partial (i ∨ j) A -- g i j (i ∨ j = 1) = a i j -- @ -- leads to, in the first clause: -- @ -- dom = IsOne (i ∨ j) -- ts = [(i ∨ j, 1)] -- phi = i ∨ j -- sigma = fails because several substitutions [[1/i],[1/j]] correspond to phi -- @ splitPartial :: Telescope -- ^ The types of arguments before the one we split on -> Dom Type -- ^ The type of the argument we split on -> Abs Telescope -- ^ The types of arguments after the one we split on -> [(A.Expr, A.Expr)] -- ^ [(φ₁ = b1),..,(φn = bn)] -> ExceptT TCErr tcm (LHSState a) splitPartial delta1 dom adelta2 ts = do unless (domFinite dom) $ softTypeError $ GenericError $ "Not a finite domain: " ++ show dom tInterval <- liftTCM $ elInf primInterval names <- liftTCM $ addContext tel $ do LeftoverPatterns{patternVariables = vars} <- getLeftoverPatterns $ problem ^. problemEqs return $ take (size delta1) $ fst $ getUserVariableNames tel vars -- Problem: The context does not match the checkpoints in checkLHS, -- however we still need a proper checkpoint substitution -- for checkExpr below. -- -- Solution: partial splits are not allowed when there are -- constructor patterns (checked in checkDef), so -- newContext is an extension of the definition -- context. -- -- i.e.: Given -- -- Γ = context where def is checked, also last checkpoint. -- -- Then -- -- newContext = Γ Ξ -- cpSub = raiseS |Ξ| -- lhsCxtSize <- ask -- size of the context before checkLHS call. reportSDoc "tc.lhs.split.partial" 10 $ "lhsCxtSize =" <+> prettyTCM lhsCxtSize newContext <- liftTCM $ computeLHSContext names delta1 reportSDoc "tc.lhs.split.partial" 10 $ "newContext =" <+> prettyTCM newContext let cpSub = raiseS $ size newContext - lhsCxtSize (gamma,sigma) <- liftTCM $ updateContext cpSub (const newContext) $ do ts <- forM ts $ \ (t,u) -> do reportSDoc "tc.lhs.split.partial" 10 $ "currentCxt =" <+> (prettyTCM =<< getContext) reportSDoc "tc.lhs.split.partial" 10 $ text "t, u (Expr) =" <+> prettyTCM (t,u) t <- checkExpr t tInterval u <- checkExpr u tInterval reportSDoc "tc.lhs.split.partial" 10 $ text "t, u =" <+> pretty (t, u) u <- intervalView =<< reduce u case u of IZero -> primINeg <@> pure t IOne -> return t _ -> typeError $ GenericError $ "Only 0 or 1 allowed on the rhs of face" -- Example: ts = (i=0) (j=1) will result in phi = ¬ i & j phi <- case ts of [] -> do a <- reduce (unEl $ unDom dom) -- builtinIsOne is defined, since this is a precondition for having Partial isone <- fromMaybe __IMPOSSIBLE__ <$> -- newline because of CPP getBuiltinName' builtinIsOne case a of Def q [Apply phi] | q == isone -> return (unArg phi) _ -> typeError . GenericDocError =<< do prettyTCM a <+> " is not IsOne." _ -> foldl (\ x y -> primIMin <@> x <@> y) primIOne (map pure ts) reportSDoc "tc.lhs.split.partial" 10 $ text "phi =" <+> prettyTCM phi reportSDoc "tc.lhs.split.partial" 30 $ text "phi =" <+> pretty phi phi <- reduce phi reportSDoc "tc.lhs.split.partial" 10 $ text "phi (reduced) =" <+> prettyTCM phi refined <- forallFaceMaps phi (\ bs m t -> typeError $ GenericError $ "face blocked on meta") (\ sigma -> (,sigma) <$> getContextTelescope) case refined of [(gamma,sigma)] -> return (gamma,sigma) [] -> typeError $ GenericError $ "The face constraint is unsatisfiable." _ -> typeError $ GenericError $ "Cannot have disjunctions in a face constraint." itisone <- liftTCM primItIsOne -- substitute the literal in p1 and dpi reportSDoc "tc.lhs.faces" 60 $ text $ show sigma let oix = size adelta2 -- de brujin index of IsOne o_n = fromMaybe __IMPOSSIBLE__ $ flip findIndex ip (\ x -> case namedThing (unArg x) of VarP _ x -> dbPatVarIndex x == oix _ -> False) delta2' = absApp adelta2 itisone delta2 = applySubst sigma delta2' mkConP (Con c _ []) = ConP c (noConPatternInfo { conPType = Just (Arg defaultArgInfo tInterval) , conPFallThrough = True }) [] mkConP (Var i []) = VarP PatOSystem (DBPatVar "x" i) mkConP _ = __IMPOSSIBLE__ rho0 = fmap mkConP sigma rho = liftS (size delta2) $ consS (DotP PatOSystem itisone) rho0 delta' = abstract gamma delta2 eqs' = applyPatSubst rho $ problem ^. problemEqs ip' = applySubst rho ip target' = applyPatSubst rho target -- Compute the new state eqs' <- liftTCM $ addContext delta' $ updateProblemEqs eqs' let problem' = set problemEqs eqs' problem reportSDoc "tc.lhs.split.partial" 60 $ text (show problem') liftTCM $ updateProblemRest (LHSState delta' ip' problem' target' (psplit ++ [Just o_n])) splitLit :: Telescope -- ^ The types of arguments before the one we split on -> Dom Type -- ^ The type of the literal we split on -> Abs Telescope -- ^ The types of arguments after the one we split on -> Literal -- ^ The literal written by the user -> ExceptT TCErr tcm (LHSState a) splitLit delta1 dom@Dom{domInfo = info, unDom = a} adelta2 lit = do let delta2 = absApp adelta2 (Lit lit) delta' = abstract delta1 delta2 rho = singletonS (size delta2) (LitP lit) -- Andreas, 2015-06-13 Literals are closed, so no need to raise them! -- rho = liftS (size delta2) $ singletonS 0 (Lit lit) -- rho = [ var i | i <- [0..size delta2 - 1] ] -- ++ [ raise (size delta2) $ Lit lit ] -- ++ [ var i | i <- [size delta2 ..] ] eqs' = applyPatSubst rho $ problem ^. problemEqs ip' = applySubst rho ip target' = applyPatSubst rho target -- Andreas, 2010-09-07 cannot split on irrelevant args unless (usableRelevance info) $ addContext delta1 $ softTypeError $ SplitOnIrrelevant dom -- Andreas, 2018-10-17, we can however split on erased things -- if there is a single constructor (checked in Coverage). -- -- Thus, no checking of (usableQuantity info) here. -- check that a is indeed the type of lit (otherwise fail softly) -- if not, fail softly since it could be instantiated by a later split. suspendErrors $ equalType a =<< litType lit -- Compute the new state eqs' <- liftTCM $ addContext delta' $ updateProblemEqs eqs' let problem' = set problemEqs eqs' problem liftTCM $ updateProblemRest (LHSState delta' ip' problem' target' psplit) splitCon :: Telescope -- ^ The types of arguments before the one we split on -> Dom Type -- ^ The type of the constructor we split on -> Abs Telescope -- ^ The types of arguments after the one we split on -> A.Pattern -- ^ The pattern written by the user -> Maybe AmbiguousQName -- ^ @Just c@ for a (possibly ambiguous) constructor @c@, or -- @Nothing@ for a record pattern -> ExceptT TCErr tcm (LHSState a) splitCon delta1 dom@Dom{domInfo = info, unDom = a} adelta2 focusPat ambC = do let delta2 = absBody adelta2 reportSDoc "tc.lhs.split" 10 $ vcat [ "checking lhs" , nest 2 $ "tel =" <+> prettyTCM tel , nest 2 $ "rel =" <+> (text $ show $ getRelevance info) ] reportSDoc "tc.lhs.split" 15 $ vcat [ "split problem" , nest 2 $ vcat [ "delta1 = " <+> prettyTCM delta1 , "a = " <+> addContext delta1 (prettyTCM a) , "delta2 = " <+> addContext delta1 (addContext ("x" :: String, dom) (prettyTCM delta2)) ] ] -- We cannot split on (shape-)irrelevant arguments. reportSLn "tc.lhs.split" 30 $ "split ConP: relevance is " ++ show (getRelevance info) unless (usableRelevance info) $ addContext delta1 $ softTypeError $ SplitOnIrrelevant dom -- Andreas, 2018-10-17, we can however split on erased things -- if there is a single constructor (checked in Coverage). -- -- Thus, no checking of (usableQuantity info) here. -- We should be at a data/record type (dr, d, pars, ixs) <- addContext delta1 $ isDataOrRecordType a checkSortOfSplitVar dr a (Just target) -- The constructor should construct an element of this datatype (c, b) <- liftTCM $ addContext delta1 $ case ambC of Just ambC -> disambiguateConstructor ambC d pars Nothing -> getRecordConstructor d pars a -- Don't split on lazy constructor case focusPat of A.ConP cpi _ _ | patLazy cpi == ConPatLazy -> softTypeError $ ForcedConstructorNotInstantiated focusPat _ -> return () -- The type of the constructor will end in an application of the datatype (TelV gamma (El _ ctarget), boundary) <- liftTCM $ telViewPathBoundaryP b let Def d' es' = ctarget cixs = drop (size pars) $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es' -- Δ₁Γ ⊢ boundary reportSDoc "tc.lhs.split.con" 50 $ text " boundary = " <+> prettyTCM boundary unless (d == d') {-'-} __IMPOSSIBLE__ -- Get names for the constructor arguments from the user patterns gamma <- liftTCM $ case focusPat of A.ConP _ _ ps -> do ps <- insertImplicitPatterns ExpandLast ps gamma return $ useNamesFromPattern ps gamma A.RecP _ fs -> do axs <- recordFieldNames . theDef <$> getConstInfo d ps <- insertMissingFields d (const $ A.WildP patNoRange) fs axs ps <- insertImplicitPatterns ExpandLast ps gamma return $ useNamesFromPattern ps gamma _ -> __IMPOSSIBLE__ -- Andreas 2010-09-07 propagate relevance info to new vars -- Andreas 2018-10-17 propagate modality let updMod = composeModality (getModality info) gamma <- return $ mapModality updMod <$> gamma -- Get the type of the datatype. da <- (`piApply` pars) . defType <$> getConstInfo d reportSDoc "tc.lhs.split" 30 $ " da = " <+> prettyTCM da reportSDoc "tc.lhs.top" 15 $ addContext delta1 $ sep [ "preparing to unify" , nest 2 $ vcat [ "c =" <+> prettyTCM c <+> ":" <+> prettyTCM b , "d =" <+> prettyTCM (Def d (map Apply pars)) <+> ":" <+> prettyTCM da , "gamma =" <+> prettyTCM gamma , "pars =" <+> brackets (fsep $ punctuate comma $ map prettyTCM pars) , "ixs =" <+> brackets (fsep $ punctuate comma $ map prettyTCM ixs) , "cixs =" <+> addContext gamma (brackets (fsep $ punctuate comma $ map prettyTCM cixs)) ] ] let delta1Gamma = delta1 `abstract` gamma da' = raise (size gamma) da ixs' = raise (size gamma) ixs -- All variables are flexible. let flex = allFlexVars $ delta1Gamma -- Unify constructor target and given type (in Δ₁Γ) -- Given: Δ₁ ⊢ D pars : Φ → Setᵢ -- Δ₁ ⊢ c : Γ → D pars cixs -- Δ₁ ⊢ ixs : Φ -- Δ₁Γ ⊢ cixs : Φ -- unification of ixs and cixs in context Δ₁Γ gives us a telescope Δ₁' -- and a substitution ρ₀ such that -- Δ₁' ⊢ ρ₀ : Δ₁Γ -- Δ₁' ⊢ (ixs)ρ₀ ≡ (cixs)ρ₀ : Φρ₀ -- We can split ρ₀ into two parts ρ₁ and ρ₂, giving -- Δ₁' ⊢ ρ₁ : Δ₁ -- Δ₁' ⊢ ρ₂ : Γρ₁ -- Application of the constructor c gives -- Δ₁' ⊢ (c Γ)(ρ₀) : (D pars cixs)(ρ₁;ρ₂) -- We have -- cixs(ρ₁;ρ₂) -- ≡ cixs(ρ₀) (since ρ₀=ρ₁;ρ₂) -- ≡ ixs(ρ₀) (by unification) -- ≡ ixs(ρ₁) (since ixs doesn't actually depend on Γ) -- so Δ₁' ⊢ (c Γ)(ρ₀) : (D pars ixs)ρ₁ -- Putting this together with ρ₁ gives ρ₃ = ρ₁;c ρ₂ -- Δ₁' ⊢ ρ₁;(c Γ)(ρ₀) : Δ₁(x : D vs ws) -- and lifting over Δ₂ gives the final substitution ρ = ρ₃;Δ₂ -- from Δ' = Δ₁';Δ₂ρ₃ -- Δ' ⊢ ρ : Δ₁(x : D vs ws)Δ₂ liftTCM (unifyIndices delta1Gamma flex da' cixs ixs') >>= \case -- Mismatch. Report and abort. NoUnify neg -> hardTypeError $ ImpossibleConstructor (conName c) neg -- Unclear situation. Try next split. DontKnow errs -> softTypeError $ SplitError $ UnificationStuck (conName c) (delta1 `abstract` gamma) cixs ixs' errs -- Success. Unifies (delta1',rho0,es) -> do reportSDoc "tc.lhs.top" 15 $ "unification successful" reportSDoc "tc.lhs.top" 20 $ nest 2 $ vcat [ "delta1' =" <+> prettyTCM delta1' , "rho0 =" <+> addContext delta1' (prettyTCM rho0) , "es =" <+> addContext delta1' (prettyTCM $ (fmap . fmap . fmap) patternToTerm es) ] -- split substitution into part for Δ₁ and part for Γ let (rho1,rho2) = splitS (size gamma) rho0 reportSDoc "tc.lhs.top" 20 $ addContext delta1' $ nest 2 $ vcat [ "rho1 =" <+> prettyTCM rho1 , "rho2 =" <+> prettyTCM rho2 ] -- Andreas, 2010-09-09, save the type. -- It is relative to Δ₁, but it should be relative to Δ₁' let a' = applyPatSubst rho1 a -- Also remember if we are a record pattern. isRec <- isRecord d let cpi = ConPatternInfo { conPRecord = isRec $> PatOCon , conPFallThrough = False , conPType = Just $ Arg info a' , conPLazy = False } -- compute final context and substitution let crho = ConP c cpi $ applySubst rho0 $ (telePatterns gamma boundary) rho3 = consS crho rho1 delta2' = applyPatSubst rho3 delta2 delta' = delta1' `abstract` delta2' rho = liftS (size delta2) rho3 reportSDoc "tc.lhs.top" 20 $ addContext delta1' $ nest 2 $ vcat [ "crho =" <+> prettyTCM crho , "rho3 =" <+> prettyTCM rho3 , "delta2' =" <+> prettyTCM delta2' ] reportSDoc "tc.lhs.top" 70 $ addContext delta1' $ nest 2 $ vcat [ "crho =" <+> pretty crho , "rho3 =" <+> pretty rho3 , "delta2' =" <+> pretty delta2' ] reportSDoc "tc.lhs.top" 15 $ nest 2 $ vcat [ "delta' =" <+> prettyTCM delta' , "rho =" <+> addContext delta' (prettyTCM rho) ] -- Compute the new out patterns and target type. let ip' = applySubst rho ip target' = applyPatSubst rho target -- Update the problem equations let eqs' = applyPatSubst rho $ problem ^. problemEqs eqs' <- liftTCM $ addContext delta' $ updateProblemEqs eqs' let problem' = set problemEqs eqs' problem -- if rest type reduces, -- extend the split problem by previously not considered patterns st' <- liftTCM $ updateProblemRest $ LHSState delta' ip' problem' target' psplit reportSDoc "tc.lhs.top" 12 $ sep [ "new problem from rest" , nest 2 $ vcat [ "delta' =" <+> prettyTCM (st' ^. lhsTel) , "eqs' =" <+> addContext (st' ^. lhsTel) (prettyTCM $ st' ^. lhsProblem ^. problemEqs) , "ip' =" <+> addContext (st' ^. lhsTel) (pretty $ st' ^. lhsOutPat) ] ] return st' -- | Ensures that we are not performing pattern matching on codata. noPatternMatchingOnCodata :: [NamedArg DeBruijnPattern] -> TCM () noPatternMatchingOnCodata = mapM_ (check . namedArg) where check (VarP {}) = return () check (DotP {}) = return () check (ProjP{}) = return () check (IApplyP{}) = return () check (LitP {}) = return () -- Literals are assumed not to be coinductive. check (DefP{}) = return () -- we assume we don't generate this for codata. check (ConP con _ ps) = do reportSDoc "tc.lhs.top" 40 $ "checking whether" <+> prettyTCM con <+> "is a coinductive constructor" TelV _ t <- telView' . defType <$> do getConstInfo $ conName con c <- isCoinductive t case c of Nothing -> __IMPOSSIBLE__ Just False -> mapM_ (check . namedArg) ps Just True -> typeError $ GenericError "Pattern matching on coinductive types is not allowed" -- | When working with a monad @m@ implementing @MonadTCM@ and @MonadError TCErr@, -- @suspendErrors f@ performs the TCM action @f@ but catches any errors and throws -- them in the monad @m@ instead. suspendErrors :: (MonadTCM m, MonadError TCErr m) => TCM a -> m a suspendErrors f = do ok <- liftTCM $ (Right <$> f) `catchError` (return . Left) either throwError return ok -- | A more direct implementation of the specification -- @softTypeError err == suspendErrors (typeError err)@ softTypeError :: (MonadTCM m, MonadError TCErr m) => TypeError -> m a softTypeError err = throwError =<< typeError_ err -- | A convenient alias for @liftTCM . typeError@. Throws the error directly -- in the TCM even if there is a surrounding monad also implementing -- @MonadError TCErr@. hardTypeError :: (MonadTCM m) => TypeError -> m a hardTypeError = liftTCM . typeError -- | Check if the type is a data or record type and return its name, -- definition, parameters, and indices. Fails softly if the type could become -- a data/record type by instantiating a variable/metavariable, or fail hard -- otherwise. isDataOrRecordType :: (MonadTCM m, MonadDebug m) => Type -> ExceptT TCErr m (DataOrRecord, QName, Args, Args) isDataOrRecordType a = liftTCM (reduceB a) >>= \case NotBlocked ReallyNotBlocked a -> case unEl a of -- Subcase: split type is a Def. Def d es -> (liftTCM $ theDef <$> getConstInfo d) >>= \case Datatype{dataPars = np} -> do let (pars, ixs) = splitAt np $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es return (IsData, d, pars, ixs) Record{} -> do let pars = fromMaybe __IMPOSSIBLE__ $ allApplyElims es return (IsRecord, d, pars, []) -- Issue #2253: the data type could be abstract. AbstractDefn{} -> hardTypeError . GenericDocError =<< do liftTCM $ "Cannot split on abstract data type" <+> prettyTCM d -- the type could be an axiom Axiom{} -> hardTypeError =<< notData -- Can't match before we have the definition DataOrRecSig{} -> hardTypeError . GenericDocError =<< do liftTCM $ "Cannot split on data type" <+> prettyTCM d <+> "whose definition has not yet been checked" -- Issue #2997: the type could be a Def that does not reduce for some reason -- (abstract, failed termination checking, NON_TERMINATING, ...) Function{} -> hardTypeError =<< notData Constructor{} -> __IMPOSSIBLE__ -- Issue #3620: Some primitives are types too. -- Not data though, at least currently 11/03/2018. Primitive{} -> hardTypeError =<< notData GeneralizableVar{} -> __IMPOSSIBLE__ -- variable or metavariable: fail softly Var{} -> softTypeError =<< notData MetaV{} -> softTypeError =<< notData -- pi or sort: fail hard Pi{} -> hardTypeError =<< notData Sort{} -> hardTypeError =<< notData Lam{} -> __IMPOSSIBLE__ Lit{} -> __IMPOSSIBLE__ Con{} -> __IMPOSSIBLE__ Level{} -> __IMPOSSIBLE__ DontCare{} -> __IMPOSSIBLE__ Dummy s -> __IMPOSSIBLE_VERBOSE__ s -- Type is blocked on a meta or something else: fail softly _ -> softTypeError =<< notData where notData = liftTCM $ SplitError . NotADatatype <$> buildClosure a -- | Get the constructor of the given record type together with its type. -- Throws an error if the type is not a record type. getRecordConstructor :: QName -- ^ Name @d@ of the record type -> Args -- ^ Parameters @pars@ of the record type -> Type -- ^ The record type @Def d pars@ (for error reporting) -> TCM (ConHead, Type) getRecordConstructor d pars a = do con <- (theDef <$> getConstInfo d) >>= \case Record{recConHead = con} -> return $ killRange con _ -> typeError $ ShouldBeRecordType a b <- (`piApply` pars) . defType <$> getConstInfo (conName con) return (con, b) -- | Disambiguate a projection based on the record type it is supposed to be -- projecting from. Returns the unambiguous projection name and its type. -- Throws an error if the type is not a record type. disambiguateProjection :: Maybe Hiding -- ^ Hiding info of the projection's principal argument. -- @Nothing@ if 'Postfix' projection. -> AmbiguousQName -- ^ Name of the projection to be disambiguated. -> Arg Type -- ^ Record type we are projecting from. -> TCM (QName, Arg Type) disambiguateProjection h ambD@(AmbQ ds) b = do -- If the target is not a record type, that's an error. -- It could be a meta, but since we cannot postpone lhs checking, we crash here. caseMaybeM (liftTCM $ isRecordType $ unArg b) notRecord $ \(r, vs, def) -> case def of Record{ recFields = fs } -> do reportSDoc "tc.lhs.split" 20 $ sep [ text $ "we are of record type r = " ++ prettyShow r , text "applied to parameters vs = " <+> prettyTCM vs , text $ "and have fields fs = " ++ prettyShow fs ] -- Try the projection candidates. -- Note that tryProj wraps TCM in an ExceptT, collecting errors -- instead of throwing them to the user immediately. -- First, we try to find a disambiguation that doesn't produce -- any new constraints. disambiguations <- mapM (runExceptT . tryProj False fs r vs) ds case partitionEithers $ toList disambiguations of (_ , (d,a):_) -> do -- From here, we have the correctly disambiguated projection. -- For highlighting, we remember which name we disambiguated to. -- This is safe here (fingers crossed) as we won't decide on a -- different projection even if we backtrack and come here again. liftTCM $ storeDisambiguatedName d return (d,a) (_ , [] ) -> do -- If this fails, we try again with constraints, but we require -- the solution to be unique. disambiguations <- mapM (runExceptT . tryProj True fs r vs) ds case partitionEithers $ toList disambiguations of ([] , [] ) -> __IMPOSSIBLE__ (err:_, [] ) -> throwError err (errs , [(d,a)]) -> do liftTCM $ storeDisambiguatedName d return (d,a) (errs , disambs@((d,a):_)) -> typeError . GenericDocError =<< vcat [ "Ambiguous projection " <> prettyTCM d <> "." , "It could refer to any of" , nest 2 $ vcat $ map showDisamb disambs ] _ -> __IMPOSSIBLE__ where showDisamb (d,_) = let r = head $ filter (noRange /=) $ map nameBindingSite $ reverse $ mnameToList $ qnameModule d in (pretty =<< dropTopLevelModule d) <+> "(introduced at " <> prettyTCM r <> ")" notRecord = wrongProj $ headNe ds wrongProj :: (MonadTCM m, MonadError TCErr m) => QName -> m a wrongProj d = softTypeError =<< do liftTCM $ GenericDocError <$> sep [ "Cannot eliminate type " , prettyTCM (unArg b) , " with projection " , if isAmbiguous ambD then text . prettyShow =<< dropTopLevelModule d else prettyTCM d ] wrongHiding :: (MonadTCM m, MonadError TCErr m) => QName -> m a wrongHiding d = softTypeError =<< do liftTCM $ GenericDocError <$> sep [ "Wrong hiding used for projection " , prettyTCM d ] tryProj :: Bool -- ^ Are we allowed to create new constraints? -> [Arg QName] -- ^ Fields of record type under consideration. -> QName -- ^ Name of record type we are eliminating. -> Args -- ^ Parameters of record type we are eliminating. -> QName -- ^ Candidate projection. -> ExceptT TCErr TCM (QName, Arg Type) tryProj constraintsOk fs r vs d0 = isProjection d0 >>= \case -- Not a projection Nothing -> wrongProj d0 Just proj -> do let d = projOrig proj -- Andreas, 2015-05-06 issue 1413 projProper=Nothing is not impossible qr <- maybe (wrongProj d) return $ projProper proj -- If projIndex==0, then the projection is already applied -- to the record value (like in @open R r@), and then it -- is no longer a projection but a record field. when (null $ projLams proj) $ wrongProj d reportSLn "tc.lhs.split" 90 "we are a projection pattern" -- If the target is not a record type, that's an error. -- It could be a meta, but since we cannot postpone lhs checking, we crash here. reportSDoc "tc.lhs.split" 20 $ sep [ text $ "proj d0 = " ++ prettyShow d0 , text $ "original proj d = " ++ prettyShow d ] -- Get the field decoration. -- If the projection pattern name @d@ is not a field name, -- we have to try the next projection name. -- If this was not an ambiguous projection, that's an error. argd <- maybe (wrongProj d) return $ List.find ((d ==) . unArg) fs let ai = setRelevance (getRelevance argd) $ projArgInfo proj reportSDoc "tc.lhs.split" 20 $ sep [ text $ "original proj relevance = " ++ show (getRelevance argd) ] -- Andreas, 2016-12-31, issue #2374: -- We can also disambiguate by hiding info. -- Andreas, 2018-10-18, issue #3289: postfix projections have no hiding info. unless (caseMaybe h True $ sameHiding ai) $ wrongHiding d -- Andreas, 2016-12-31, issue #1976: Check parameters. suspendErrors $ applyUnless constraintsOk noConstraints $ checkParameters qr r vs -- Get the type of projection d applied to "self" dType <- liftTCM $ defType <$> getConstInfo d -- full type! reportSDoc "tc.lhs.split" 20 $ sep [ "we are being projected by dType = " <+> prettyTCM dType ] projType <- liftTCM $ dType `piApplyM` vs return (d0 , Arg ai projType) -- | Disambiguate a constructor based on the data type it is supposed to be -- constructing. Returns the unambiguous constructor name and its type. -- Precondition: type should be a data/record type. disambiguateConstructor :: AmbiguousQName -- ^ The name of the constructor to be disambiguated. -> QName -- ^ Name of the datatype. -> Args -- ^ Parameters of the datatype -> TCM (ConHead, Type) disambiguateConstructor ambC@(AmbQ cs) d pars = do d <- canonicalName d cons <- theDef <$> getConstInfo d >>= \case def@Datatype{} -> return $ dataCons def def@Record{} -> return $ [conName $ recConHead def] _ -> __IMPOSSIBLE__ disambiguations <- mapM (runExceptT . tryCon False cons d pars) cs -- TODO: be more lazy case partitionEithers $ toList disambiguations of (_ , (c0,c,a):_) -> do -- If constructor pattern was ambiguous, -- remember our choice for highlighting info. when (isAmbiguous ambC) $ liftTCM $ storeDisambiguatedName c0 return (c,a) (_ , [] ) -> do disambiguations <- mapM (runExceptT . tryCon True cons d pars) cs case partitionEithers $ toList disambiguations of ([] , [] ) -> __IMPOSSIBLE__ (err:_, [] ) -> throwError err (errs , [(c0,c,a)]) -> do when (isAmbiguous ambC) $ liftTCM $ storeDisambiguatedName c0 return (c,a) (errs , disambs@((c0,c,a):_)) -> typeError . GenericDocError =<< vcat [ "Ambiguous constructor " <> prettyTCM (qnameName $ conName c) <> "." , "It could refer to any of" , nest 2 $ vcat $ map showDisamb disambs ] where showDisamb (c0,_,_) = let r = head $ filter (noRange /=) $ map nameBindingSite $ reverse $ mnameToList $ qnameModule c0 in (pretty =<< dropTopLevelModule c0) <+> "(introduced at " <> prettyTCM r <> ")" abstractConstructor c = softTypeError $ AbstractConstructorNotInScope c wrongDatatype c d = softTypeError $ ConstructorPatternInWrongDatatype c d tryCon :: Bool -- ^ Are we allowed to create new constraints? -> [QName] -- ^ Constructors of data type under consideration. -> QName -- ^ Name of data/record type we are eliminating. -> Args -- ^ Parameters of data/record type we are eliminating. -> QName -- ^ Candidate constructor. -> ExceptT TCErr TCM (QName, ConHead, Type) tryCon constraintsOk cons d pars c = getConstInfo' c >>= \case Left (SigUnknown err) -> __IMPOSSIBLE__ Left SigAbstract -> abstractConstructor c Right def -> do let con = conSrcCon $ theDef def unless (conName con `elem` cons) $ wrongDatatype c d -- Andreas, 2013-03-22 fixing issue 279 -- To resolve ambiguous constructors, Agda always looks up -- their original definition and reconstructs the parameters -- from the type @Def d vs@ we check against. -- However, the constructor could come from a module instantiation -- with some of the parameters already fixed. -- Agda did not make sure the two parameter lists coincide, -- so we add a check here. -- I guess this issue could be solved more systematically, -- but the extra check here is non-invasive to the existing code. -- Andreas, 2016-12-31 fixing issue #1975 -- Do this also for constructors which were originally ambiguous. suspendErrors $ applyUnless constraintsOk noConstraints $ checkConstructorParameters c d pars -- Get the type from the original constructor cType <- (`piApply` pars) . defType <$> getConInfo con return (c, con, cType) -- | @checkConstructorParameters c d pars@ checks that the data/record type -- behind @c@ is has initial parameters (coming e.g. from a module instantiation) -- that coincide with an prefix of @pars@. checkConstructorParameters :: MonadTCM tcm => QName -> QName -> Args -> tcm () checkConstructorParameters c d pars = do dc <- liftTCM $ getConstructorData c checkParameters dc d pars -- | Check that given parameters match the parameters of the inferred -- constructor/projection. checkParameters :: MonadTCM tcm => QName -- ^ The record/data type name of the chosen constructor/projection. -> QName -- ^ The record/data type name as supplied by the type signature. -> Args -- ^ The parameters. -> tcm () checkParameters dc d pars = liftTCM $ do a <- reduce (Def dc []) case a of Def d0 es -> do -- compare parameters let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es reportSDoc "tc.lhs.split" 40 $ vcat [ nest 2 $ "d =" <+> (text . prettyShow) d , nest 2 $ "d0 (should be == d) =" <+> (text . prettyShow) d0 , nest 2 $ "dc =" <+> (text . prettyShow) dc , nest 2 $ "vs =" <+> prettyTCM vs ] -- when (d0 /= d) __IMPOSSIBLE__ -- d could have extra qualification t <- typeOfConst d compareArgs [] [] t (Def d []) vs (take (length vs) pars) _ -> __IMPOSSIBLE__ checkSortOfSplitVar :: (MonadTCM tcm, MonadReduce tcm, MonadError TCErr tcm, LensSort a) => DataOrRecord -> a -> Maybe (Arg Type) -> tcm () checkSortOfSplitVar dr a mtarget = do infOk <- optOmegaInOmega <$> pragmaOptions liftTCM (reduce $ getSort a) >>= \case Type{} -> return () Prop{} | IsRecord <- dr -> return () | Just target <- mtarget -> unlessM (isPropM target) splitOnPropError | otherwise -> splitOnPropError Inf{} | infOk -> return () _ -> softTypeError =<< do liftTCM $ GenericDocError <$> sep [ "Cannot split on datatype in sort" , prettyTCM (getSort a) ] where splitOnPropError = softTypeError $ GenericError "Cannot split on datatype in Prop unless target is in Prop" Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Decl.hs0000644000000000000000000012376313466402171020157 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Decl where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Monad import Control.Monad.Reader import Control.Monad.State (modify, gets, get) import Control.Monad.Writer (tell) import Data.Either (partitionEithers) import qualified Data.Foldable as Fold import qualified Data.List as List import Data.Maybe import Data.Map (Map) import qualified Data.Sequence as Seq import qualified Data.Set as Set import qualified Data.IntSet as IntSet import qualified Data.Map as Map import Data.Set (Set) import Agda.Interaction.Options import Agda.Interaction.Highlighting.Generate import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views (deepUnscopeDecl, deepUnscopeDecls) import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Internal import qualified Agda.Syntax.Reflected as R import qualified Agda.Syntax.Info as Info import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Literal import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Translation.ReflectedToAbstract import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.IApplyConfluence import Agda.TypeChecking.Errors import Agda.TypeChecking.Generalize import Agda.TypeChecking.Injectivity import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Positivity import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Polarity import Agda.TypeChecking.Pretty import Agda.TypeChecking.Primitive import Agda.TypeChecking.ProjectionLike import Agda.TypeChecking.Quote import Agda.TypeChecking.Unquote import Agda.TypeChecking.Records import Agda.TypeChecking.RecordPatterns import Agda.TypeChecking.Reduce import Agda.TypeChecking.Rewriting import Agda.TypeChecking.SizedTypes.Solve import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Unquote import Agda.TypeChecking.Warnings import Agda.TypeChecking.Rules.Application import Agda.TypeChecking.Rules.Term import Agda.TypeChecking.Rules.Data ( checkDataDef ) import Agda.TypeChecking.Rules.Record ( checkRecDef ) import Agda.TypeChecking.Rules.Def ( checkFunDef, newSection, useTerPragma ) import Agda.TypeChecking.Rules.Builtin import Agda.TypeChecking.Rules.Display ( checkDisplayPragma ) import Agda.Termination.TermCheck import Agda.Utils.Except import Agda.Utils.Functor import Agda.Utils.Function import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Cached checkDecl checkDeclCached :: A.Declaration -> TCM () checkDeclCached d@A.ScopedDecl{} = checkDecl d checkDeclCached d@(A.Section minfo mname (A.GeneralizeTel _ tbinds) _) = do e <- readFromCachedLog -- Can ignore the set of generalizable vars (they occur in the telescope) reportSLn "cache.decl" 10 $ "checkDeclCached: " ++ show (isJust e) case e of Just (EnterSection minfo' mname' tbinds', _) | killRange minfo == killRange minfo' && mname == mname' && tbinds == tbinds' -> do return () _ -> do cleanCachedLog writeToCurrentLog $ EnterSection minfo mname tbinds checkDecl d e' <- readFromCachedLog case e' of Just (LeaveSection mname', _) | mname == mname' -> do return () _ -> do cleanCachedLog writeToCurrentLog $ LeaveSection mname checkDeclCached d = do e <- readFromCachedLog reportSLn "cache.decl" 10 $ "checkDeclCached: " ++ show (isJust e) case e of (Just (Decl d',s)) | compareDecl d d' -> do restorePostScopeState s reportSLn "cache.decl" 50 $ "range: " ++ show (getRange d) printSyntaxInfo (getRange d) _ -> do cleanCachedLog checkDeclWrap d writeToCurrentLog $ Decl d where compareDecl A.Section{} A.Section{} = __IMPOSSIBLE__ compareDecl A.ScopedDecl{} A.ScopedDecl{} = __IMPOSSIBLE__ compareDecl x y = x == y -- changes to CS inside a RecDef or Mutual ought not happen, -- but they do happen, so we discard them. ignoreChanges m = do cs <- getsTC $ stLoadedFileCache . stPersistentState cleanCachedLog _ <- m modifyPersistentState $ \st -> st{stLoadedFileCache = cs} checkDeclWrap d@A.RecDef{} = ignoreChanges $ checkDecl d checkDeclWrap d@A.Mutual{} = ignoreChanges $ checkDecl d checkDeclWrap d = checkDecl d -- | Type check a sequence of declarations. checkDecls :: [A.Declaration] -> TCM () checkDecls ds = do reportSLn "tc.decl" 45 $ "Checking " ++ show (length ds) ++ " declarations..." mapM_ checkDecl ds -- Andreas, 2011-05-30, unfreezing moved to Interaction/Imports -- whenM onTopLevel unfreezeMetas -- | Type check a single declaration. checkDecl :: A.Declaration -> TCM () checkDecl d = setCurrentRange d $ do reportSDoc "tc.decl" 10 $ "checking declaration" debugPrintDecl d reportSDoc "tc.decl" 90 $ (text . show) (deepUnscopeDecl d) reportSDoc "tc.decl" 10 $ prettyA d -- Might loop, see e.g. Issue 1597 -- Issue 418 fix: freeze metas before checking an abstract thing -- when_ isAbstract freezeMetas -- WAS IN PLACE 2012-2016, but too crude -- applyWhen isAbstract withFreezeMetas $ do -- WRONG let -- What kind of final checks/computations should be performed -- if we're not inside a mutual block? none m = m $> Nothing -- skip all checks meta m = m $> Just (return ()) -- do the usual checks mutual i ds m = m <&> Just . uncurry (mutualChecks i d ds) impossible m = m $> __IMPOSSIBLE__ -- We're definitely inside a mutual block. (finalChecks, metas) <- metasCreatedBy $ case d of A.Axiom{} -> meta $ checkTypeSignature d A.Generalize s i info x e -> meta $ inConcreteMode $ checkGeneralize s i info x e A.Field{} -> typeError FieldOutsideRecord A.Primitive i x e -> meta $ checkPrimitive i x e A.Mutual i ds -> mutual i ds $ checkMutual i ds A.Section i x tel ds -> meta $ checkSection i x tel ds A.Apply i x modapp ci _adir -> meta $ checkSectionApplication i x modapp ci A.Import i x _adir -> none $ checkImport i x A.Pragma i p -> none $ checkPragma i p A.ScopedDecl scope ds -> none $ setScope scope >> mapM_ checkDeclCached ds A.FunDef i x delayed cs -> impossible $ check x i $ checkFunDef delayed i x cs A.DataDef i x uc ps cs -> impossible $ check x i $ checkDataDef i x uc ps cs A.RecDef i x uc ind eta c ps tel cs -> impossible $ check x i $ do checkRecDef i x uc ind eta c ps tel cs blockId <- mutualBlockOf x -- Andreas, 2016-10-01 testing whether -- envMutualBlock is set correctly. -- Apparently not. verboseS "tc.decl.mutual" 70 $ do current <- asksTC envMutualBlock unless (Just blockId == current) $ do reportSLn "" 0 $ unlines [ "mutual block id discrepancy for " ++ prettyShow x , " current mut. bl. = " ++ show current , " calculated mut. bl. = " ++ show blockId ] return (blockId, Set.singleton x) A.DataSig i x ps t -> impossible $ checkSig i x ps t A.RecSig i x ps t -> none $ checkSig i x ps t -- A record signature is always followed by a -- record definition. Metas should not be -- frozen until after the definition has been -- checked. NOTE: Metas are not frozen -- immediately after the last field. Perhaps -- they should be (unless we're in a mutual -- block). A.Open{} -> none $ return () A.PatternSynDef{} -> none $ return () -- Open and PatternSynDef are just artifacts -- from the concrete syntax, retained for -- highlighting purposes. A.UnquoteDecl mi i x e -> checkUnquoteDecl mi i x e A.UnquoteDef i x e -> impossible $ checkUnquoteDef i x e whenNothingM (asksTC envMutualBlock) $ do -- Syntax highlighting. highlight_ DontHightlightModuleContents d -- Post-typing checks. whenJust finalChecks $ \ theMutualChecks -> do reportSLn "tc.decl" 20 $ "Attempting to solve constraints before freezing." wakeupConstraints_ -- solve emptiness and instance constraints checkingWhere <- asksTC envCheckingWhere solveSizeConstraints $ if checkingWhere then DontDefaultToInfty else DefaultToInfty wakeupConstraints_ -- Size solver might have unblocked some constraints case d of A.Generalize{} -> pure () _ -> do reportSLn "tc.decl" 20 $ "Freezing all metas." void $ freezeMetas' $ \ (MetaId x) -> IntSet.member x metas theMutualChecks where -- check record or data type signature checkSig i x gtel t = checkTypeSignature' (Just gtel) $ A.Axiom A.NoFunSig i defaultArgInfo Nothing x t check x i m = Bench.billTo [Bench.Definition x] $ do reportSDoc "tc.decl" 5 $ "Checking" <+> prettyTCM x <> "." reportSLn "tc.decl.abstract" 25 $ show (Info.defAbstract i) r <- abstract (Info.defAbstract i) m reportSDoc "tc.decl" 5 $ "Checked" <+> prettyTCM x <> "." return r isAbstract = fmap Info.defAbstract (A.getDefInfo d) == Just AbstractDef -- Concrete definitions cannot use information about abstract things. abstract ConcreteDef = inConcreteMode abstract AbstractDef = inAbstractMode -- Some checks that should be run at the end of a mutual block. The -- set names contains the names defined in the mutual block. mutualChecks :: Info.MutualInfo -> A.Declaration -> [A.Declaration] -> MutualId -> Set QName -> TCM () mutualChecks mi d ds mid names = do -- Andreas, 2014-04-11: instantiate metas in definition types let nameList = Set.toList names mapM_ instantiateDefinitionType nameList -- Andreas, 2017-03-23: check positivity before termination. -- This allows us to reuse the information about SCCs -- to skip termination of non-recursive functions. modifyAllowedReductions (List.delete UnconfirmedReductions) $ checkPositivity_ mi names -- Andreas, 2013-02-27: check termination before injectivity, -- to avoid making the injectivity checker loop. localTC (\ e -> e { envMutualBlock = Just mid }) $ checkTermination_ d revisitRecordPatternTranslation nameList -- Andreas, 2016-11-19 issue #2308 mapM_ checkIApplyConfluence_ nameList -- Andreas, 2015-03-26 Issue 1470: -- Restricting coinduction to recursive does not solve the -- actual problem, and prevents interesting sound applications -- of sized types. -- checkCoinductiveRecords ds -- Andreas, 2012-09-11: Injectivity check stores clauses -- whose 'Relevance' is affected by polarity computation, -- so do it here (again). -- Andreas, 2015-07-01: In particular, 'UnusedArg's of local functions -- are only recognized after the polarity computation. -- See Issue 1366 for an example where injectivity of a local function -- is used to solve metas. It fails if we do injectivity analysis -- before polarity only. checkInjectivity_ names checkProjectionLikeness_ names -- | Check if there is a inferred eta record type in the mutual block. -- If yes, repeat the record pattern translation for all function definitions -- in the block. -- This is necessary since the original record pattern translation will -- have skipped record patterns of the new record types (as eta was off for them). -- See issue #2308 (and #2197). revisitRecordPatternTranslation :: [QName] -> TCM () revisitRecordPatternTranslation qs = do -- rs: inferred eta record types of this mutual block -- qccs: compiled clauses of definitions (rs, qccs) <- partitionEithers . catMaybes <$> mapM classify qs unless (null rs) $ forM_ qccs $ \(q,cc) -> do cc <- translateCompiledClauses cc modifySignature $ updateDefinition q $ updateTheDef $ updateCompiledClauses $ const $ Just cc where -- Walk through the definitions and return the set of inferred eta record types -- and the set of function definitions in the mutual block classify q = inConcreteOrAbstractMode q $ \ def -> do case theDef def of Record{ recEtaEquality' = Inferred YesEta } -> return $ Just $ Left q Function { funProjection = Nothing -- Andreas, 2017-08-10, issue #2664: -- Do not record pattern translate record projection definitions! , funCompiled = Just cc } -> return $ Just $ Right (q, cc) _ -> return Nothing type FinalChecks = Maybe (TCM ()) checkUnquoteDecl :: Info.MutualInfo -> [Info.DefInfo] -> [QName] -> A.Expr -> TCM FinalChecks checkUnquoteDecl mi is xs e = do reportSDoc "tc.unquote.decl" 20 $ "Checking unquoteDecl" <+> sep (map prettyTCM xs) Nothing <$ unquoteTop xs e checkUnquoteDef :: [Info.DefInfo] -> [QName] -> A.Expr -> TCM () checkUnquoteDef _ xs e = do reportSDoc "tc.unquote.decl" 20 $ "Checking unquoteDef" <+> sep (map prettyTCM xs) () <$ unquoteTop xs e -- | Run a reflected TCM computatation expected to define a given list of -- names. unquoteTop :: [QName] -> A.Expr -> TCM [QName] unquoteTop xs e = do tcm <- primAgdaTCM unit <- primUnit lzero <- primLevelZero let vArg = defaultArg hArg = setHiding Hidden . vArg m <- checkExpr e $ El (mkType 0) $ apply tcm [hArg lzero, vArg unit] res <- runUnquoteM $ tell xs >> evalTCM m case res of Left err -> typeError $ UnquoteFailed err Right (_, xs) -> return xs -- | Instantiate all metas in 'Definition' associated to 'QName'. -- Makes sense after freezing metas. Some checks, like free variable -- analysis, are not in 'TCM', so they will be more precise (see issue 1099) -- after meta instantiation. -- Precondition: name has been added to signature already. instantiateDefinitionType :: QName -> TCM () instantiateDefinitionType q = do reportSLn "tc.decl.inst" 20 $ "instantiating type of " ++ prettyShow q t <- defType . fromMaybe __IMPOSSIBLE__ . lookupDefinition q <$> getSignature t' <- instantiateFull t modifySignature $ updateDefinition q $ updateDefType $ const t' reportSDoc "tc.decl.inst" 30 $ vcat [ " t = " <+> prettyTCM t , " t' = " <+> prettyTCM t' ] -- Andreas, 2014-04-11 -- UNUSED, costs a couple of sec on the std-lib -- -- | Instantiate all metas in 'Definition' associated to 'QName'. -- -- Makes sense after freezing metas. -- -- Some checks, like free variable analysis, are not in 'TCM', -- -- so they will be more precise (see issue 1099) after meta instantiation. -- -- -- -- Precondition: name has been added to signature already. -- instantiateDefinition :: QName -> TCM () -- instantiateDefinition q = do -- reportSLn "tc.decl.inst" 20 $ "instantiating " ++ prettyShow q -- sig <- getSignature -- let def = fromMaybe __IMPOSSIBLE__ $ lookupDefinition q sig -- def <- instantiateFull def -- modifySignature $ updateDefinition q $ const def data HighlightModuleContents = DontHightlightModuleContents | DoHighlightModuleContents deriving (Eq) -- | Highlight a declaration. Called after checking a mutual block (to ensure -- we have the right definitions for all names). For modules inside mutual -- blocks we haven't highlighted their contents, but for modules not in a -- mutual block we have. Hence the flag. highlight_ :: HighlightModuleContents -> A.Declaration -> TCM () highlight_ hlmod d = do let highlight d = generateAndPrintSyntaxInfo d Full True Bench.billTo [Bench.Highlighting] $ case d of A.Axiom{} -> highlight d A.Field{} -> __IMPOSSIBLE__ A.Primitive{} -> highlight d A.Mutual i ds -> mapM_ (highlight_ DoHighlightModuleContents) $ deepUnscopeDecls ds A.Apply{} -> highlight d A.Import{} -> highlight d A.Pragma{} -> highlight d A.ScopedDecl{} -> return () A.FunDef{} -> highlight d A.DataDef{} -> highlight d A.DataSig{} -> highlight d A.Open{} -> highlight d A.PatternSynDef{} -> highlight d A.Generalize{} -> highlight d A.UnquoteDecl{} -> highlight d A.UnquoteDef{} -> highlight d A.Section i x tel ds -> do highlight (A.Section i x tel []) when (hlmod == DoHighlightModuleContents) $ mapM_ (highlight_ hlmod) (deepUnscopeDecls ds) A.RecSig{} -> highlight d A.RecDef i x uc ind eta c ps tel cs -> highlight (A.RecDef i x uc ind eta c A.noDataDefParams dummy cs) -- The telescope has already been highlighted. where -- Andreas, 2016-01-22, issue 1790 -- The expression denoting the record constructor type -- is replace by a dummy expression in order to /not/ -- generate highlighting from it. -- Simply because all the highlighting info is wrong -- in the record constructor type: -- * fields become bound variables, -- * declarations become let-bound variables. -- We do not need that crap. dummy = A.Lit $ LitString noRange $ "do not highlight construct(ed/or) type" -- | Termination check a declaration. checkTermination_ :: A.Declaration -> TCM () checkTermination_ d = Bench.billTo [Bench.Termination] $ do reportSLn "tc.decl" 20 $ "checkDecl: checking termination..." termErrs <- termDecl d -- If there are some termination errors, we collect them in the -- state. The termination checker already marked non-terminating -- functions as such. unless (null termErrs) $ do warning $ TerminationIssue termErrs -- | Check a set of mutual names for positivity. checkPositivity_ :: Info.MutualInfo -> Set QName -> TCM () checkPositivity_ mi names = Bench.billTo [Bench.Positivity] $ do -- Positivity checking. reportSLn "tc.decl" 20 $ "checkDecl: checking positivity..." checkStrictlyPositive mi names -- Andreas, 2012-02-13: Polarity computation uses info from -- positivity check, so it needs happen after positivity -- check. computePolarity $ Set.toList names -- | Check that all coinductive records are actually recursive. -- (Otherwise, one can implement invalid recursion schemes just like -- for the old coinduction.) checkCoinductiveRecords :: [A.Declaration] -> TCM () checkCoinductiveRecords ds = forM_ ds $ \case A.RecDef _ q _ (Just (Ranged r CoInductive)) _ _ _ _ _ -> setCurrentRange r $ do unlessM (isRecursiveRecord q) $ typeError $ GenericError $ "Only recursive records can be coinductive" _ -> return () -- | Check a set of mutual names for constructor-headedness. checkInjectivity_ :: Set QName -> TCM () checkInjectivity_ names = Bench.billTo [Bench.Injectivity] $ do reportSLn "tc.decl" 20 $ "checkDecl: checking injectivity..." -- Andreas, 2015-07-01, see Issue1366b: -- Injectivity check needs also to be run for abstract definitions. -- Fold.forM_ names $ \ q -> ignoreAbstractMode $ do -- NOT NECESSARY after all Fold.forM_ names $ \ q -> inConcreteOrAbstractMode q $ \ def -> do -- For abstract q, we should be inAbstractMode, -- otherwise getConstInfo returns Axiom. -- -- Andreas, 2015-07-01: -- Quite surprisingly, inAbstractMode does not allow us to look -- at a local definition (@where@ block) of an abstract definition. -- This is because the local definition is defined in a strict submodule. -- We can only see through abstract definitions in the current module -- or super modules inAbstractMode. -- I changed that in Monad.Signature.treatAbstractly', so we can see -- our own local definitions. case theDef def of d@Function{ funClauses = cs, funTerminates = term } -> do case term of Just True -> do inv <- checkInjectivity q cs modifySignature $ updateDefinition q $ updateTheDef $ const $ d { funInv = inv } _ -> reportSLn "tc.inj.check" 20 $ prettyShow q ++ " is not verified as terminating, thus, not considered for injectivity" _ -> do abstr <- asksTC envAbstractMode reportSLn "tc.inj.check" 20 $ "we are in " ++ show abstr ++ " and " ++ prettyShow q ++ " is abstract or not a function, thus, not considered for injectivity" -- | Check a set of mutual names for projection likeness. -- -- Only a single, non-abstract function can be projection-like. -- Making an abstract function projection-like would break the -- invariant that the type of the principle argument of a projection-like -- function is always inferable. checkProjectionLikeness_ :: Set QName -> TCM () checkProjectionLikeness_ names = Bench.billTo [Bench.ProjectionLikeness] $ do -- Non-mutual definitions can be considered for -- projection likeness let ds = Set.toList names reportSLn "tc.proj.like" 20 $ "checkDecl: checking projection-likeness of " ++ prettyShow ds case ds of [d] -> do def <- getConstInfo d -- For abstract identifiers, getConstInfo returns Axiom. -- Thus, abstract definitions are not considered for projection-likeness. case theDef def of Function{} -> makeProjection (defName def) _ -> reportSLn "tc.proj.like" 25 $ prettyShow d ++ " is abstract or not a function, thus, not considered for projection-likeness" _ -> reportSLn "tc.proj.like" 25 $ "mutual definitions are not considered for projection-likeness" -- | Freeze metas created by given computation if in abstract mode. whenAbstractFreezeMetasAfter :: Info.DefInfo -> TCM a -> TCM a whenAbstractFreezeMetasAfter Info.DefInfo{ defAccess, defAbstract} m = do let pubAbs = defAccess == PublicAccess && defAbstract == AbstractDef if not pubAbs then m else do (a, ms) <- metasCreatedBy m xs <- freezeMetas' $ (`IntSet.member` ms) . metaId reportSDoc "tc.decl.ax" 20 $ vcat [ "Abstract type signature produced new metas: " <+> sep (map prettyTCM $ IntSet.toList ms) , "We froze the following ones of these: " <+> sep (map prettyTCM xs) ] return a checkGeneralize :: Set QName -> Info.DefInfo -> ArgInfo -> QName -> A.Expr -> TCM () checkGeneralize s i info x e = do -- Check the signature and collect the created metas. (telNames, tGen) <- generalizeType s $ locallyTC eGeneralizeMetas (const YesGeneralize) $ workOnTypes $ isType_ e let n = length telNames reportSDoc "tc.decl.gen" 10 $ sep [ "checked type signature of generalizable variable" <+> prettyTCM x <+> ":" , nest 2 $ prettyTCM tGen ] addConstant x $ (defaultDefn info x tGen GeneralizableVar) { defArgGeneralizable = SomeGeneralizableArgs n } -- | Type check an axiom. checkAxiom :: A.Axiom -> Info.DefInfo -> ArgInfo -> Maybe [Occurrence] -> QName -> A.Expr -> TCM () checkAxiom = checkAxiom' Nothing -- | Data and record type signatures need to remember the generalized -- parameters for when checking the corresponding definition, so for these we -- pass in the parameter telescope separately. checkAxiom' :: Maybe A.GeneralizeTelescope -> A.Axiom -> Info.DefInfo -> ArgInfo -> Maybe [Occurrence] -> QName -> A.Expr -> TCM () checkAxiom' gentel funSig i info0 mp x e = whenAbstractFreezeMetasAfter i $ do -- Andreas, 2016-07-19 issues #418 #2102: -- We freeze metas in type signatures of abstract definitions, to prevent -- leakage of implementation details. -- Andreas, 2012-04-18 if we are in irrelevant context, axioms is irrelevant -- even if not declared as such (Issue 610). rel <- max (getRelevance info0) <$> asksTC envRelevance let info = setRelevance rel info0 -- rel <- ifM ((Irrelevant ==) <$> asksTC envRelevance) (return Irrelevant) (return rel0) (genParams, npars, t) <- workOnTypes $ case gentel of Nothing -> ([], 0,) <$> isType_ e Just gentel -> checkGeneralizeTelescope gentel $ \ genParams ptel -> do t <- workOnTypes $ isType_ e return (genParams, size ptel, abstract ptel t) reportSDoc "tc.decl.ax" 10 $ sep [ text $ "checked type signature" , nest 2 $ prettyTCM rel <> prettyTCM x <+> ":" <+> prettyTCM t , nest 2 $ "of sort " <+> prettyTCM (getSort t) ] when (not $ null genParams) $ reportSLn "tc.decl.ax" 40 $ " generalized params: " ++ show genParams -- Jesper, 2018-06-05: should be done AFTER generalizing --whenM (optDoubleCheck <$> pragmaOptions) $ workOnTypes $ do -- checkInternal (unEl t) (sort $ getSort t) -- Andreas, 2015-03-17 Issue 1428: Do not postulate sizes in parametrized -- modules! when (funSig == A.NoFunSig) $ do whenM ((== SizeUniv) <$> do reduce $ getSort t) $ do whenM ((> 0) <$> getContextSize) $ do typeError $ GenericError $ "We don't like postulated sizes in parametrized modules." -- Ensure that polarity pragmas do not contain too many occurrences. (occs, pols) <- case mp of Nothing -> return ([], []) Just occs -> do TelV tel _ <- telView t let n = length (telToList tel) when (n < length occs) $ typeError $ TooManyPolarities x n let pols = map polFromOcc occs reportSLn "tc.polarity.pragma" 10 $ "Setting occurrences and polarity for " ++ prettyShow x ++ ":\n " ++ prettyShow occs ++ "\n " ++ prettyShow pols return (occs, pols) -- Not safe. See Issue 330 -- t <- addForcingAnnotations t addConstant x =<< do useTerPragma $ (defaultDefn info x t $ case funSig of A.FunSig -> set funMacro (Info.defMacro i == MacroDef) emptyFunction A.NoFunSig | isJust gentel -> DataOrRecSig npars A.NoFunSig -> Axiom) -- NB: used also for data and record type sigs { defArgOccurrences = occs , defPolarity = pols , defGeneralizedParams = genParams } -- Add the definition to the instance table, if needed when (Info.defInstance i == InstanceDef) $ do addTypedInstance x t traceCall (IsType_ e) $ do -- need Range for error message -- Andreas, 2016-06-21, issue #2054 -- Do not default size metas to ∞ in local type signatures checkingWhere <- asksTC envCheckingWhere solveSizeConstraints $ if checkingWhere then DontDefaultToInfty else DefaultToInfty -- Andreas, 2011-05-31, that freezing below is probably wrong: -- when_ (Info.defAbstract i == AbstractDef) $ freezeMetas -- | Type check a primitive function declaration. checkPrimitive :: Info.DefInfo -> QName -> A.Expr -> TCM () checkPrimitive i x e = traceCall (CheckPrimitive (getRange i) x e) $ do (name, PrimImpl t' pf) <- lookupPrimitiveFunctionQ x -- Certain "primitive" functions are BUILTIN rather than -- primitive. let builtinPrimitives = [ "primNatPlus" , "primNatMinus" , "primNatTimes" , "primNatDivSucAux" , "primNatModSucAux" , "primNatEquality" , "primNatLess" , "primLevelZero" , "primLevelSuc" , "primLevelMax" , "primSetOmega" ] when (elem name builtinPrimitives) $ typeError $ NoSuchPrimitiveFunction name t <- isType_ e noConstraints $ equalType t t' let s = prettyShow $ qnameName x bindPrimitive s pf addConstant x $ defaultDefn defaultArgInfo x t $ Primitive { primAbstr = Info.defAbstract i , primName = s , primClauses = [] , primInv = NotInjective , primCompiled = Nothing } assertCurrentModule :: QName -> String -> TCM () assertCurrentModule x err = do def <- getConstInfo x m <- currentModule let m' = qnameModule $ defName def unless (m == m' || isSubModuleOf m' m) $ typeError $ GenericError err -- | Check a pragma. checkPragma :: Range -> A.Pragma -> TCM () checkPragma r p = traceCall (CheckPragma r p) $ case p of A.BuiltinPragma x e -> bindBuiltin x e A.BuiltinNoDefPragma b x -> bindBuiltinNoDef b x A.RewritePragma q -> addRewriteRule q A.CompilePragma b x s -> do assertCurrentModule x $ "COMPILE pragmas must appear in the same module " ++ "as their corresponding definitions," addPragma b x s A.StaticPragma x -> do def <- getConstInfo x case theDef def of Function{} -> markStatic x _ -> typeError $ GenericError "STATIC directive only works on functions" A.InjectivePragma x -> markInjective x A.InlinePragma b x -> do def <- getConstInfo x case theDef def of Function{} -> markInline b x _ -> typeError $ GenericError $ sINLINE ++ " directive only works on functions" where sINLINE = if b then "INLINE" else "NOINLINE" A.OptionsPragma{} -> typeError $ GenericError $ "OPTIONS pragma only allowed at beginning of file, before top module declaration" A.DisplayPragma f ps e -> checkDisplayPragma f ps e A.EtaPragma r -> do let noRecord = typeError $ GenericError $ "ETA pragma is only applicable to coinductive records" caseMaybeM (isRecord r) noRecord $ \case Record{ recInduction = ind, recEtaEquality' = eta } -> do unless (ind == Just CoInductive) $ noRecord when (eta == Specified NoEta) $ typeError $ GenericError $ "ETA pragma conflicts with no-eta-equality declaration" _ -> __IMPOSSIBLE__ modifySignature $ updateDefinition r $ updateTheDef $ \case def@Record{} -> def { recEtaEquality' = Specified YesEta } _ -> __IMPOSSIBLE__ -- | Type check a bunch of mutual inductive recursive definitions. -- -- All definitions which have so far been assigned to the given mutual -- block are returned. checkMutual :: Info.MutualInfo -> [A.Declaration] -> TCM (MutualId, Set QName) checkMutual i ds = inMutualBlock $ \ blockId -> do verboseS "tc.decl.mutual" 20 $ do reportSDoc "tc.decl.mutual" 20 $ vcat $ ("Checking mutual block" <+> text (show blockId) <> ":") : map (nest 2 . prettyA) ds insertMutualBlockInfo blockId i localTC (\e -> e { envTerminationCheck = () <$ Info.mutualTermCheck i }) $ mapM_ checkDecl ds (blockId, ) . mutualNames <$> lookupMutualBlock blockId -- | Type check the type signature of an inductive or recursive definition. checkTypeSignature :: A.TypeSignature -> TCM () checkTypeSignature = checkTypeSignature' Nothing checkTypeSignature' :: Maybe A.GeneralizeTelescope -> A.TypeSignature -> TCM () checkTypeSignature' gtel (A.ScopedDecl scope ds) = do setScope scope mapM_ (checkTypeSignature' gtel) ds checkTypeSignature' gtel (A.Axiom funSig i info mp x e) = Bench.billTo [Bench.Definition x] $ Bench.billTo [Bench.Typing, Bench.TypeSig] $ let abstr = case Info.defAccess i of PrivateAccess{} | Info.defAbstract i == AbstractDef -> inAbstractMode -- Issue #2321, only go to AbstractMode for abstract definitions | otherwise -> inConcreteMode PublicAccess -> inConcreteMode OnlyQualified -> __IMPOSSIBLE__ in abstr $ checkAxiom' gtel funSig i info mp x e checkTypeSignature' _ _ = __IMPOSSIBLE__ -- type signatures are always axioms -- | Type check a module. checkSection :: Info.ModuleInfo -> ModuleName -> A.GeneralizeTelescope -> [A.Declaration] -> TCM () checkSection _ x tel ds = newSection x tel $ mapM_ checkDeclCached ds -- | Helper for 'checkSectionApplication'. -- -- Matches the arguments of the module application with the -- module parameters. -- -- Returns the remaining module parameters as an open telescope. -- Warning: the returned telescope is /not/ the final result, -- an actual instantiation of the parameters does not occur. checkModuleArity :: ModuleName -- ^ Name of applied module. -> Telescope -- ^ The module parameters. -> [NamedArg A.Expr] -- ^ The arguments this module is applied to. -> TCM Telescope -- ^ The remaining module parameters (has free de Bruijn indices!). checkModuleArity m tel args = check tel args where bad = typeError $ ModuleArityMismatch m tel args check tel [] = return tel check EmptyTel (_:_) = bad check (ExtendTel dom@Dom{domInfo = info} btel) args0@(Arg info' (Named rname _) : args) = let name = fmap rangedThing rname my = fmap rangedThing $ domName dom tel = absBody btel in case (argInfoHiding info, argInfoHiding info', name) of (Instance{}, NotHidden, _) -> check tel args0 (Instance{}, Hidden, _) -> check tel args0 (Instance{}, Instance{}, Nothing) -> check tel args (Instance{}, Instance{}, Just x) | Just x == my -> check tel args | otherwise -> check tel args0 (Hidden, NotHidden, _) -> check tel args0 (Hidden, Instance{}, _) -> check tel args0 (Hidden, Hidden, Nothing) -> check tel args (Hidden, Hidden, Just x) | Just x == my -> check tel args | otherwise -> check tel args0 (NotHidden, NotHidden, _) -> check tel args (NotHidden, Hidden, _) -> bad (NotHidden, Instance{}, _) -> bad -- | Check an application of a section (top-level function, includes @'traceCall'@). checkSectionApplication :: Info.ModuleInfo -> ModuleName -- ^ Name @m1@ of module defined by the module macro. -> A.ModuleApplication -- ^ The module macro @λ tel → m2 args@. -> A.ScopeCopyInfo -- ^ Imported names and modules -> TCM () checkSectionApplication i m1 modapp copyInfo = traceCall (CheckSectionApplication (getRange i) m1 modapp) $ checkSectionApplication' i m1 modapp copyInfo -- | Check an application of a section. checkSectionApplication' :: Info.ModuleInfo -> ModuleName -- ^ Name @m1@ of module defined by the module macro. -> A.ModuleApplication -- ^ The module macro @λ tel → m2 args@. -> A.ScopeCopyInfo -- ^ Imported names and modules -> TCM () checkSectionApplication' i m1 (A.SectionApp ptel m2 args) copyInfo = do -- Module applications can appear in lets, in which case we treat -- lambda-bound variables as additional parameters to the module. extraParams <- do mfv <- getCurrentModuleFreeVars fv <- getContextSize return (fv - mfv) when (extraParams > 0) $ reportSLn "tc.mod.apply" 30 $ "Extra parameters to " ++ prettyShow m1 ++ ": " ++ show extraParams -- Type-check the LHS (ptel) of the module macro. checkTelescope ptel $ \ ptel -> do -- We are now in the context @ptel@. -- Get the correct parameter telescope of @m2@. This is the fully lifted -- telescope obtained by `lookupSection` instantiated with the module -- parameters of `m2` currently in scope. For instance -- ``` -- module _ (A : Set) where -- module M (B : Set) where ... -- module M' = M B -- ``` -- In the application `M' = M B`, `tel = (A B : Set)` and -- `moduleParamsToApply M = [A]`, so the resulting parameter telescope is -- `tel' = (B : Set)`. tel <- lookupSection m2 vs <- moduleParamsToApply m2 let tel' = apply tel vs -- Compute the remaining parameter telescope after stripping of -- the initial parameters that are determined by the @args@. -- Warning: @etaTel@ is not well-formed in @ptel@, since -- the actual application has not happened. etaTel <- checkModuleArity m2 tel' args -- Take the module parameters that will be instantiated by @args@. let tel'' = telFromList $ take (size tel' - size etaTel) $ telToList tel' reportSDoc "tc.mod.apply" 15 $ vcat [ "applying section" <+> prettyTCM m2 , nest 2 $ "args =" <+> sep (map prettyA args) , nest 2 $ "ptel =" <+> escapeContext (size ptel) (prettyTCM ptel) , nest 2 $ "tel =" <+> prettyTCM tel , nest 2 $ "tel' =" <+> prettyTCM tel' , nest 2 $ "tel''=" <+> prettyTCM tel'' , nest 2 $ "eta =" <+> escapeContext (size ptel) (addContext tel'' $ prettyTCM etaTel) ] -- Now, type check arguments. ts <- (noConstraints $ checkArguments_ DontExpandLast (getRange i) args tel') >>= \case (ts', etaTel') | (size etaTel == size etaTel') , Just ts <- allApplyElims ts' -> return ts _ -> __IMPOSSIBLE__ -- Perform the application of the module parameters. let aTel = tel' `apply` ts reportSDoc "tc.mod.apply" 15 $ vcat [ nest 2 $ "aTel =" <+> prettyTCM aTel ] -- Andreas, 2014-04-06, Issue 1094: -- Add the section with well-formed telescope. addContext (KeepNames aTel) $ do reportSDoc "tc.mod.apply" 80 $ "addSection" <+> prettyTCM m1 <+> (getContextTelescope >>= \ tel -> inTopContext (prettyTCM tel)) addSection m1 reportSDoc "tc.mod.apply" 20 $ vcat [ sep [ "applySection", prettyTCM m1, "=", prettyTCM m2, fsep $ map prettyTCM (vs ++ ts) ] , nest 2 $ pretty copyInfo ] args <- instantiateFull $ vs ++ ts let n = size aTel etaArgs <- inTopContext $ addContext aTel getContextArgs addContext (KeepNames aTel) $ applySection m1 (ptel `abstract` aTel) m2 (raise n args ++ etaArgs) copyInfo checkSectionApplication' i m1 (A.RecordModuleInstance x) copyInfo = do let name = mnameToQName x tel' <- lookupSection x vs <- moduleParamsToApply x let tel = tel' `apply` vs args = teleArgs tel telInst :: Telescope telInst = instFinal tel -- Locate last (rightmost) parameter and make it @Instance@. -- Issue #3463: also name it so it can be given by name. instFinal :: Telescope -> Telescope -- Telescopes do not have @NoAbs@. instFinal (ExtendTel _ NoAbs{}) = __IMPOSSIBLE__ -- Found last parameter: switch it to @Instance@. instFinal (ExtendTel dom (Abs n EmptyTel)) = ExtendTel do' (Abs n EmptyTel) where do' = makeInstance dom { domName = Just $ unranged "r" } -- Otherwise, keep searchinf for last parameter: instFinal (ExtendTel arg (Abs n tel)) = ExtendTel arg (Abs n (instFinal tel)) -- Before instFinal is invoked, we have checked that the @tel@ is not empty. instFinal EmptyTel = __IMPOSSIBLE__ reportSDoc "tc.mod.apply" 20 $ vcat [ sep [ "applySection", prettyTCM name, "{{...}}" ] , nest 2 $ "x =" <+> prettyTCM x , nest 2 $ "name =" <+> prettyTCM name , nest 2 $ "tel =" <+> prettyTCM tel , nest 2 $ "telInst =" <+> prettyTCM telInst , nest 2 $ "vs =" <+> sep (map prettyTCM vs) -- , nest 2 $ "args =" <+> sep (map prettyTCM args) ] reportSDoc "tc.mod.apply" 60 $ vcat [ nest 2 $ "vs =" <+> text (show vs) -- , nest 2 $ "args =" <+> text (show args) ] when (tel == EmptyTel) $ typeError $ GenericError $ prettyShow (qnameToConcrete name) ++ " is not a parameterised section" addContext telInst $ do vs <- moduleParamsToApply x reportSDoc "tc.mod.apply" 20 $ vcat [ nest 2 $ "vs =" <+> sep (map prettyTCM vs) , nest 2 $ "args =" <+> sep (map (parens . prettyTCM) args) ] reportSDoc "tc.mod.apply" 60 $ vcat [ nest 2 $ "vs =" <+> text (show vs) , nest 2 $ "args =" <+> text (show args) ] addSection m1 applySection m1 telInst x (vs ++ args) copyInfo -- | Type check an import declaration. Actually doesn't do anything, since all -- the work is done when scope checking. checkImport :: Info.ModuleInfo -> ModuleName -> TCM () checkImport i x = return () ------------------------------------------------------------------------ -- * Debugging ------------------------------------------------------------------------ class ShowHead a where showHead :: a -> String instance ShowHead A.Declaration where showHead d = case d of A.Axiom {} -> "Axiom" A.Field {} -> "Field" A.Primitive {} -> "Primitive" A.Mutual {} -> "Mutual" A.Section {} -> "Section" A.Apply {} -> "Apply" A.Import {} -> "Import" A.Pragma {} -> "Pragma" A.Open {} -> "Open" A.FunDef {} -> "FunDef" A.DataSig {} -> "DataSig" A.DataDef {} -> "DataDef" A.RecSig {} -> "RecSig" A.RecDef {} -> "RecDef" A.PatternSynDef{} -> "PatternSynDef" A.Generalize {} -> "Generalize" A.UnquoteDecl {} -> "UnquoteDecl" A.ScopedDecl {} -> "ScopedDecl" A.UnquoteDef {} -> "UnquoteDef" debugPrintDecl :: A.Declaration -> TCM () debugPrintDecl d = do verboseS "tc.decl" 45 $ do reportSLn "tc.decl" 45 $ "checking a " ++ showHead d case d of A.Section info mname tel ds -> do reportSLn "tc.decl" 45 $ "section " ++ prettyShow mname ++ " has " ++ show (length $ A.generalizeTel tel) ++ " parameters and " ++ show (length ds) ++ " declarations" reportSDoc "tc.decl" 45 $ prettyA $ A.Section info mname tel [] forM_ ds $ \ d -> do reportSDoc "tc.decl" 45 $ prettyA d _ -> return () Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Builtin.hs0000644000000000000000000013650613466402171020715 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Rules.Builtin ( bindBuiltin , bindBuiltinNoDef , builtinKindOfName , bindPostulatedName , isUntypedBuiltin , bindUntypedBuiltin ) where import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.Reader (ask) import Control.Monad.State (get) import Data.List (find, sortBy) import Data.Function (on) import Agda.Interaction.Options (optSizedTypes) import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Abstract.Views as A import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.SizedTypes ( builtinSizeHook ) import qualified Agda.TypeChecking.CompiledClause as CC import Agda.TypeChecking.Conversion import Agda.TypeChecking.Constraints import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Functions import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Names import Agda.TypeChecking.Primitive import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Rules.Term ( checkExpr , inferExpr ) import Agda.TypeChecking.Warnings import {-# SOURCE #-} Agda.TypeChecking.Rules.Builtin.Coinduction import {-# SOURCE #-} Agda.TypeChecking.Rewriting import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Checking builtin pragmas --------------------------------------------------------------------------- builtinPostulate :: TCM Type -> BuiltinDescriptor builtinPostulate = BuiltinPostulate Relevant builtinPostulateC :: TCM Type -> BuiltinDescriptor builtinPostulateC m = BuiltinPostulate Relevant $ requireCubical >> m findBuiltinInfo :: String -> Maybe BuiltinInfo findBuiltinInfo b = find ((b ==) . builtinName) coreBuiltins coreBuiltins :: [BuiltinInfo] coreBuiltins = [ (builtinList |-> BuiltinData (tset --> tset) [builtinNil, builtinCons]) , (builtinArg |-> BuiltinData (tset --> tset) [builtinArgArg]) , (builtinAbs |-> BuiltinData (tset --> tset) [builtinAbsAbs]) , (builtinArgInfo |-> BuiltinData tset [builtinArgArgInfo]) , (builtinBool |-> BuiltinData tset [builtinTrue, builtinFalse]) , (builtinNat |-> BuiltinData tset [builtinZero, builtinSuc]) , (builtinSigma |-> BuiltinData (runNamesT [] $ hPi' "la" (el $ cl primLevel) $ \ a -> hPi' "lb" (el $ cl primLevel) $ \ b -> nPi' "A" (sort . tmSort <$> a) $ \bA -> nPi' "B" (el' a bA --> (sort . tmSort <$> b)) $ \bB -> ((sort . tmSort) <$> (cl primLevelMax <@> a <@> b)) ) ["SIGMACON"]) , (builtinUnit |-> BuiltinData tset [builtinUnitUnit]) -- actually record, but they are treated the same , (builtinAgdaLiteral |-> BuiltinData tset [builtinAgdaLitNat, builtinAgdaLitWord64, builtinAgdaLitFloat, builtinAgdaLitChar, builtinAgdaLitString, builtinAgdaLitQName, builtinAgdaLitMeta]) , (builtinAgdaPattern |-> BuiltinData tset [builtinAgdaPatVar, builtinAgdaPatCon, builtinAgdaPatDot, builtinAgdaPatLit, builtinAgdaPatProj, builtinAgdaPatAbsurd]) , (builtinAgdaPatVar |-> BuiltinDataCons (tstring --> tpat)) , (builtinAgdaPatCon |-> BuiltinDataCons (tqname --> tlist (targ tpat) --> tpat)) , (builtinAgdaPatDot |-> BuiltinDataCons tpat) , (builtinAgdaPatLit |-> BuiltinDataCons (tliteral --> tpat)) , (builtinAgdaPatProj |-> BuiltinDataCons (tqname --> tpat)) , (builtinAgdaPatAbsurd |-> BuiltinDataCons tpat) , (builtinLevel |-> builtinPostulate tset) , (builtinWord64 |-> builtinPostulate tset) , (builtinInteger |-> BuiltinData tset [builtinIntegerPos, builtinIntegerNegSuc]) , (builtinIntegerPos |-> BuiltinDataCons (tnat --> tinteger)) , (builtinIntegerNegSuc |-> BuiltinDataCons (tnat --> tinteger)) , (builtinFloat |-> builtinPostulate tset) , (builtinChar |-> builtinPostulate tset) , (builtinString |-> builtinPostulate tset) , (builtinQName |-> builtinPostulate tset) , (builtinAgdaMeta |-> builtinPostulate tset) , (builtinIO |-> builtinPostulate (tset --> tset)) , (builtinPath |-> BuiltinUnknown (Just $ requireCubical >> (hPi "a" (el primLevel) $ hPi "A" (return $ sort $ varSort 0) $ (El (varSort 1) <$> varM 0) --> (El (varSort 1) <$> varM 0) --> return (sort $ varSort 1))) verifyPath) , (builtinPathP |-> builtinPostulateC (hPi "a" (el primLevel) $ nPi "A" (tinterval --> (return $ sort $ varSort 0)) $ (El (varSort 1) <$> varM 0 <@> primIZero) --> (El (varSort 1) <$> varM 0 <@> primIOne) --> return (sort $ varSort 1))) , (builtinInterval |-> BuiltinData (requireCubical >> return (sort Inf)) [builtinIZero,builtinIOne]) , (builtinSub |-> builtinPostulateC (runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> nPi' "A" (el' (cl primLevelSuc <@> a) (Sort . tmSort <$> a)) $ \ bA -> nPi' "φ" (elInf $ cl primInterval) $ \ phi -> elInf (cl primPartial <#> a <@> phi <@> bA) --> (return $ sort Inf) )) , (builtinSubIn |-> builtinPostulateC (runNamesT [] $ hPi' "a" (el $ cl primLevel) $ \ a -> hPi' "A" (el' (cl primLevelSuc <@> a) (Sort . tmSort <$> a)) $ \ bA -> hPi' "φ" (elInf $ cl primInterval) $ \ phi -> nPi' "x" (el' (Sort . tmSort <$> a) bA) $ \ x -> elInf $ cl primSub <#> a <@> bA <@> phi <@> (lam "o" $ \ _ -> x))) , (builtinIZero |-> BuiltinDataCons (elInf primInterval)) , (builtinIOne |-> BuiltinDataCons (elInf primInterval)) , (builtinPartial |-> BuiltinPrim "primPartial" (const $ return ())) , (builtinPartialP |-> BuiltinPrim "primPartialP" (const $ return ())) , (builtinIsOne |-> builtinPostulateC (tinterval --> return (sort $ Inf))) , (builtinItIsOne |-> builtinPostulateC (elInf $ primIsOne <@> primIOne)) , (builtinIsOne1 |-> builtinPostulateC (runNamesT [] $ nPi' "i" (cl tinterval) $ \ i -> nPi' "j" (cl tinterval) $ \ j -> nPi' "i1" (elInf $ cl primIsOne <@> i) $ \ i1 -> (elInf $ cl primIsOne <@> (cl primIMax <@> i <@> j)))) , (builtinIsOne2 |-> builtinPostulateC (runNamesT [] $ nPi' "i" (cl tinterval) $ \ i -> nPi' "j" (cl tinterval) $ \ j -> nPi' "j1" (elInf $ cl primIsOne <@> j) $ \ j1 -> (elInf $ cl primIsOne <@> (cl primIMax <@> i <@> j)))) , (builtinIsOneEmpty |-> builtinPostulateC (runNamesT [] $ hPi' "l" (el $ cl primLevel) $ \ l -> hPi' "A" (pPi' "o" (cl primIZero) $ \ _ -> el' (cl primLevelSuc <@> l) (Sort . tmSort <$> l)) $ \ bA -> pPi' "o" (cl primIZero) (\ o -> el' l $ gApply' (setRelevance Irrelevant defaultArgInfo) bA o))) , (builtinId |-> builtinPostulateC (hPi "a" (el primLevel) $ hPi "A" (return $ sort $ varSort 0) $ (El (varSort 1) <$> varM 0) --> (El (varSort 1) <$> varM 0) --> return (sort $ varSort 1))) , (builtinConId |-> builtinPostulateC (hPi "a" (el primLevel) $ hPi "A" (return $ sort $ varSort 0) $ hPi "x" (El (varSort 1) <$> varM 0) $ hPi "y" (El (varSort 2) <$> varM 1) $ tinterval --> (El (varSort 3) <$> primPath <#> varM 3 <#> varM 2 <@> varM 1 <@> varM 0) --> (El (varSort 3) <$> primId <#> varM 3 <#> varM 2 <@> varM 1 <@> varM 0))) , (builtinEquiv |-> BuiltinUnknown (Just $ requireCubical >> runNamesT [] ( hPi' "l" (el $ cl primLevel) $ \ a -> hPi' "l'" (el $ cl primLevel) $ \ b -> nPi' "A" (sort . tmSort <$> a) $ \bA -> nPi' "B" (sort . tmSort <$> b) $ \bB -> ((sort . tmSort) <$> (cl primLevelMax <@> a <@> b)) )) (const $ const $ return ())) , (builtinEquivFun |-> BuiltinUnknown (Just $ requireCubical >> runNamesT [] ( hPi' "l" (el $ cl primLevel) $ \ a -> hPi' "l'" (el $ cl primLevel) $ \ b -> hPi' "A" (sort . tmSort <$> a) $ \bA -> hPi' "B" (sort . tmSort <$> b) $ \bB -> el' (cl primLevelMax <@> a <@> b) (cl primEquiv <#> a <#> b <@> bA <@> bB) --> (el' a bA --> el' b bB) )) (const $ const $ return ())) , (builtinEquivProof |-> BuiltinUnknown (Just $ requireCubical >> runNamesT [] ( hPi' "l" (el $ cl primLevel) $ \ la -> hPi' "l'" (el $ cl primLevel) $ \ lb -> nPi' "A" (sort . tmSort <$> la) $ \ bA -> nPi' "B" (sort . tmSort <$> lb) $ \ bB -> nPi' "e" (el' (cl primLevelMax <@> la <@> lb) (cl primEquiv <#> la <#> lb <@> bA <@> bB)) $ \ e -> do nPi' "b" (el' lb bB) $ \ b -> do let f = cl primEquivFun <#> la <#> lb <#> bA <#> bB <@> e fiber = el' (cl primLevelMax <@> la <@> lb) (cl primSigma <#> la <#> lb <@> bA <@> (lam "a" $ \ a -> cl primPath <#> lb <#> bB <@> (f <@> a) <@> b)) nPi' "φ" (cl tinterval) $ \ phi -> (pPi' "o" phi $ \ o -> fiber) --> fiber )) (const $ const $ return ())) , (builtinPathToEquiv |-> BuiltinUnknown (Just $ requireCubical >> runNamesT [] ( hPi' "l" (cl tinterval --> (el $ cl primLevel)) $ \ a -> nPi' "E" (nPi' "i" (cl tinterval) $ \ i -> (sort . tmSort <$> (a <@> i))) $ \bE -> el' (cl primLevelMax <@> (a <@> cl primIZero) <@> (a <@> cl primIOne)) (cl primEquiv <#> (a <@> cl primIZero) <#> (a <@> cl primIOne) <@> (bE <@> cl primIZero) <@> (bE <@> cl primIOne) ))) (const $ const $ return ())) , (builtinAgdaSort |-> BuiltinData tset [builtinAgdaSortSet, builtinAgdaSortLit, builtinAgdaSortUnsupported]) , (builtinAgdaTerm |-> BuiltinData tset [ builtinAgdaTermVar, builtinAgdaTermLam, builtinAgdaTermExtLam , builtinAgdaTermDef, builtinAgdaTermCon , builtinAgdaTermPi, builtinAgdaTermSort , builtinAgdaTermLit, builtinAgdaTermMeta , builtinAgdaTermUnsupported]) , builtinAgdaErrorPart |-> BuiltinData tset [ builtinAgdaErrorPartString, builtinAgdaErrorPartTerm, builtinAgdaErrorPartName ] , builtinAgdaErrorPartString |-> BuiltinDataCons (tstring --> terrorpart) , builtinAgdaErrorPartTerm |-> BuiltinDataCons (tterm --> terrorpart) , builtinAgdaErrorPartName |-> BuiltinDataCons (tqname --> terrorpart) -- Andreas, 2017-01-12, issue #2386: special handling of builtinEquality -- , (builtinEquality |-> BuiltinData (hPi "a" (el primLevel) $ -- hPi "A" (return $ sort $ varSort 0) $ -- (El (varSort 1) <$> varM 0) --> -- (El (varSort 1) <$> varM 0) --> -- return (sort $ varSort 1)) -- [builtinRefl]) , (builtinHiding |-> BuiltinData tset [builtinHidden, builtinInstance, builtinVisible]) -- Relevance , (builtinRelevance |-> BuiltinData tset [builtinRelevant, builtinIrrelevant]) , (builtinRelevant |-> BuiltinDataCons trelevance) , (builtinIrrelevant |-> BuiltinDataCons trelevance) -- Associativity , builtinAssoc |-> BuiltinData tset [builtinAssocLeft, builtinAssocRight, builtinAssocNon] , builtinAssocLeft |-> BuiltinDataCons tassoc , builtinAssocRight |-> BuiltinDataCons tassoc , builtinAssocNon |-> BuiltinDataCons tassoc -- Precedence , builtinPrecedence |-> BuiltinData tset [builtinPrecRelated, builtinPrecUnrelated] , builtinPrecRelated |-> BuiltinDataCons (tint --> tprec) , builtinPrecUnrelated |-> BuiltinDataCons tprec -- Fixity , builtinFixity |-> BuiltinData tset [builtinFixityFixity] , builtinFixityFixity |-> BuiltinDataCons (tassoc --> tprec --> tfixity) -- Andreas, 2017-01-12, issue #2386: special handling of builtinEquality -- , (builtinRefl |-> BuiltinDataCons (hPi "a" (el primLevel) $ -- hPi "A" (return $ sort $ varSort 0) $ -- hPi "x" (El (varSort 1) <$> varM 0) $ -- El (varSort 2) <$> primEquality <#> varM 2 <#> varM 1 <@> varM 0 <@> varM 0)) , (builtinRewrite |-> BuiltinUnknown Nothing verifyBuiltinRewrite) , (builtinNil |-> BuiltinDataCons (hPi "A" tset (el (list v0)))) , (builtinCons |-> BuiltinDataCons (hPi "A" tset (tv0 --> el (list v0) --> el (list v0)))) , (builtinZero |-> BuiltinDataCons tnat) , (builtinSuc |-> BuiltinDataCons (tnat --> tnat)) , (builtinTrue |-> BuiltinDataCons tbool) , (builtinFalse |-> BuiltinDataCons tbool) , (builtinArgArg |-> BuiltinDataCons (hPi "A" tset (targinfo --> tv0 --> targ tv0))) , (builtinAbsAbs |-> BuiltinDataCons (hPi "A" tset (tstring --> tv0 --> tabs tv0))) , (builtinArgArgInfo |-> BuiltinDataCons (thiding --> trelevance --> targinfo)) , (builtinAgdaTermVar |-> BuiltinDataCons (tnat --> targs --> tterm)) , (builtinAgdaTermLam |-> BuiltinDataCons (thiding --> tabs tterm --> tterm)) , (builtinAgdaTermExtLam |-> BuiltinDataCons (tlist tclause --> targs --> tterm)) , (builtinAgdaTermDef |-> BuiltinDataCons (tqname --> targs --> tterm)) , (builtinAgdaTermCon |-> BuiltinDataCons (tqname --> targs --> tterm)) , (builtinAgdaTermPi |-> BuiltinDataCons (targ ttype --> tabs ttype --> tterm)) , (builtinAgdaTermSort |-> BuiltinDataCons (tsort --> tterm)) , (builtinAgdaTermLit |-> BuiltinDataCons (tliteral --> tterm)) , (builtinAgdaTermMeta |-> BuiltinDataCons (tmeta --> targs --> tterm)) , (builtinAgdaTermUnsupported|-> BuiltinDataCons tterm) , (builtinAgdaLitNat |-> BuiltinDataCons (tnat --> tliteral)) , (builtinAgdaLitWord64 |-> BuiltinDataCons (tword64 --> tliteral)) , (builtinAgdaLitFloat |-> BuiltinDataCons (tfloat --> tliteral)) , (builtinAgdaLitChar |-> BuiltinDataCons (tchar --> tliteral)) , (builtinAgdaLitString |-> BuiltinDataCons (tstring --> tliteral)) , (builtinAgdaLitQName |-> BuiltinDataCons (tqname --> tliteral)) , (builtinAgdaLitMeta |-> BuiltinDataCons (tmeta --> tliteral)) , (builtinHidden |-> BuiltinDataCons thiding) , (builtinInstance |-> BuiltinDataCons thiding) , (builtinVisible |-> BuiltinDataCons thiding) , (builtinSizeUniv |-> builtinPostulate tSizeUniv) -- SizeUniv : SizeUniv -- See comment on tSizeUniv: the following does not work currently. -- , (builtinSizeUniv |-> builtinPostulate tSetOmega) -- SizeUniv : Setω , (builtinSize |-> builtinPostulate tSizeUniv) , (builtinSizeLt |-> builtinPostulate (tsize ..--> tSizeUniv)) , (builtinSizeSuc |-> builtinPostulate (tsize --> tsize)) , (builtinSizeInf |-> builtinPostulate tsize) -- postulate max : {i : Size} -> Size< i -> Size< i -> Size< i , (builtinSizeMax |-> builtinPostulate (tsize --> tsize --> tsize)) -- (hPi "i" tsize $ let a = el $ primSizeLt <@> v0 in (a --> a --> a))) , (builtinAgdaSortSet |-> BuiltinDataCons (tterm --> tsort)) , (builtinAgdaSortLit |-> BuiltinDataCons (tnat --> tsort)) , (builtinAgdaSortUnsupported|-> BuiltinDataCons tsort) , (builtinNatPlus |-> BuiltinPrim "primNatPlus" verifyPlus) , (builtinNatMinus |-> BuiltinPrim "primNatMinus" verifyMinus) , (builtinNatTimes |-> BuiltinPrim "primNatTimes" verifyTimes) , (builtinNatDivSucAux |-> BuiltinPrim "primNatDivSucAux" verifyDivSucAux) , (builtinNatModSucAux |-> BuiltinPrim "primNatModSucAux" verifyModSucAux) , (builtinNatEquals |-> BuiltinPrim "primNatEquality" verifyEquals) , (builtinNatLess |-> BuiltinPrim "primNatLess" verifyLess) , (builtinLevelZero |-> BuiltinPrim "primLevelZero" (const $ return ())) , (builtinLevelSuc |-> BuiltinPrim "primLevelSuc" (const $ return ())) , (builtinLevelMax |-> BuiltinPrim "primLevelMax" verifyMax) , (builtinSetOmega |-> BuiltinPrim "primSetOmega" (const $ return ())) , (builtinAgdaClause |-> BuiltinData tset [builtinAgdaClauseClause, builtinAgdaClauseAbsurd]) , (builtinAgdaClauseClause |-> BuiltinDataCons (tlist (targ tpat) --> tterm --> tclause)) , (builtinAgdaClauseAbsurd |-> BuiltinDataCons (tlist (targ tpat) --> tclause)) , (builtinAgdaDefinition |-> BuiltinData tset [builtinAgdaDefinitionFunDef ,builtinAgdaDefinitionDataDef ,builtinAgdaDefinitionDataConstructor ,builtinAgdaDefinitionRecordDef ,builtinAgdaDefinitionPostulate ,builtinAgdaDefinitionPrimitive]) , (builtinAgdaDefinitionFunDef |-> BuiltinDataCons (tlist tclause --> tdefn)) , (builtinAgdaDefinitionDataDef |-> BuiltinDataCons (tnat --> tlist tqname --> tdefn)) , (builtinAgdaDefinitionDataConstructor |-> BuiltinDataCons (tqname --> tdefn)) , (builtinAgdaDefinitionRecordDef |-> BuiltinDataCons (tqname --> tlist (targ tqname) --> tdefn)) , (builtinAgdaDefinitionPostulate |-> BuiltinDataCons tdefn) , (builtinAgdaDefinitionPrimitive |-> BuiltinDataCons tdefn) , builtinAgdaTCM |-> builtinPostulate (hPi "a" tlevel $ tsetL 0 --> tsetL 0) , builtinAgdaTCMReturn |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ elV 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMBind |-> builtinPostulate (hPi "a" tlevel $ hPi "b" tlevel $ hPi "A" (tsetL 1) $ hPi "B" (tsetL 1) $ tTCM 3 (varM 1) --> (elV 3 (varM 1) --> tTCM 2 (varM 0)) --> tTCM 2 (varM 0)) , builtinAgdaTCMUnify |-> builtinPostulate (tterm --> tterm --> tTCM_ primUnit) , builtinAgdaTCMTypeError |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tlist terrorpart --> tTCM 1 (varM 0)) , builtinAgdaTCMInferType |-> builtinPostulate (tterm --> tTCM_ primAgdaTerm) , builtinAgdaTCMCheckType |-> builtinPostulate (tterm --> ttype --> tTCM_ primAgdaTerm) , builtinAgdaTCMNormalise |-> builtinPostulate (tterm --> tTCM_ primAgdaTerm) , builtinAgdaTCMReduce |-> builtinPostulate (tterm --> tTCM_ primAgdaTerm) , builtinAgdaTCMCatchError |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tTCM 1 (varM 0) --> tTCM 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMGetContext |-> builtinPostulate (tTCM_ (unEl <$> tlist (targ ttype))) , builtinAgdaTCMExtendContext |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ targ ttype --> tTCM 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMInContext |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tlist (targ ttype) --> tTCM 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMFreshName |-> builtinPostulate (tstring --> tTCM_ primQName) , builtinAgdaTCMDeclareDef |-> builtinPostulate (targ tqname --> ttype --> tTCM_ primUnit) , builtinAgdaTCMDeclarePostulate |-> builtinPostulate (targ tqname --> ttype --> tTCM_ primUnit) , builtinAgdaTCMDefineFun |-> builtinPostulate (tqname --> tlist tclause --> tTCM_ primUnit) , builtinAgdaTCMGetType |-> builtinPostulate (tqname --> tTCM_ primAgdaTerm) , builtinAgdaTCMGetDefinition |-> builtinPostulate (tqname --> tTCM_ primAgdaDefinition) , builtinAgdaTCMQuoteTerm |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ elV 1 (varM 0) --> tTCM_ primAgdaTerm) , builtinAgdaTCMUnquoteTerm |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tterm --> tTCM 1 (varM 0)) , builtinAgdaTCMBlockOnMeta |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tmeta --> tTCM 1 (varM 0)) , builtinAgdaTCMCommit |-> builtinPostulate (tTCM_ primUnit) , builtinAgdaTCMIsMacro |-> builtinPostulate (tqname --> tTCM_ primBool) , builtinAgdaTCMWithNormalisation |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tbool --> tTCM 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMDebugPrint |-> builtinPostulate (tstring --> tnat --> tlist terrorpart --> tTCM_ primUnit) , builtinAgdaTCMNoConstraints |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tTCM 1 (varM 0) --> tTCM 1 (varM 0)) , builtinAgdaTCMRunSpeculative |-> builtinPostulate (hPi "a" tlevel $ hPi "A" (tsetL 0) $ tTCM 1 (primSigma <#> varM 1 <#> primLevelZero <@> varM 0 <@> (Lam defaultArgInfo . Abs "_" <$> primBool)) --> tTCM 1 (varM 0)) ] where (|->) = BuiltinInfo v0,v1,v2,v3 :: TCM Term v0 = varM 0 v1 = varM 1 v2 = varM 2 v3 = varM 3 tv0,tv1 :: TCM Type tv0 = el v0 tv1 = el v1 tv2 = el v2 tv3 = el v3 arg :: TCM Term -> TCM Term arg t = primArg <@> t elV x a = El (varSort x) <$> a tsetL l = return $ sort (varSort l) tlevel = el primLevel tlist x = el $ list (fmap unEl x) targ x = el (arg (fmap unEl x)) tabs x = el (primAbs <@> fmap unEl x) targs = el (list (arg primAgdaTerm)) tterm = el primAgdaTerm terrorpart = el primAgdaErrorPart tnat = el primNat tint = el primInteger tword64 = el primWord64 tunit = el primUnit tinteger = el primInteger tfloat = el primFloat tchar = el primChar tstring = el primString tqname = el primQName tmeta = el primAgdaMeta tsize = El sSizeUniv <$> primSize tbool = el primBool thiding = el primHiding trelevance = el primRelevance tassoc = el primAssoc tprec = el primPrecedence tfixity = el primFixity -- tcolors = el (list primAgdaTerm) -- TODO guilhem targinfo = el primArgInfo ttype = el primAgdaTerm tsort = el primAgdaSort tdefn = el primAgdaDefinition tliteral = el primAgdaLiteral tpat = el primAgdaPattern tclause = el primAgdaClause tTCM l a = elV l (primAgdaTCM <#> varM l <@> a) tTCM_ a = el (primAgdaTCM <#> primLevelZero <@> a) tinterval = El Inf <$> primInterval verifyPlus plus = verify ["n","m"] $ \(@@) zero suc (==) (===) choice -> do let m = var 0 n = var 1 x + y = plus @@ x @@ y -- We allow recursion on any argument choice [ do n + zero == n n + suc m == suc (n + m) , do suc n + m == suc (n + m) zero + m == m ] verifyMinus minus = verify ["n","m"] $ \(@@) zero suc (==) (===) choice -> do let m = var 0 n = var 1 x - y = minus @@ x @@ y -- We allow recursion on any argument zero - zero == zero zero - suc m == zero suc n - zero == suc n suc n - suc m == (n - m) verifyTimes times = do plus <- primNatPlus verify ["n","m"] $ \(@@) zero suc (==) (===) choice -> do let m = var 0 n = var 1 x + y = plus @@ x @@ y x * y = times @@ x @@ y choice [ do n * zero == zero choice [ (n * suc m) == (n + (n * m)) , (n * suc m) == ((n * m) + n) ] , do zero * n == zero choice [ (suc n * m) == (m + (n * m)) , (suc n * m) == ((n * m) + m) ] ] verifyDivSucAux dsAux = verify ["k","m","n","j"] $ \(@@) zero suc (==) (===) choice -> do let aux k m n j = dsAux @@ k @@ m @@ n @@ j k = var 0 m = var 1 n = var 2 j = var 3 aux k m zero j == k aux k m (suc n) zero == aux (suc k) m n m aux k m (suc n) (suc j) == aux k m n j verifyModSucAux dsAux = verify ["k","m","n","j"] $ \(@@) zero suc (==) (===) choice -> do let aux k m n j = dsAux @@ k @@ m @@ n @@ j k = var 0 m = var 1 n = var 2 j = var 3 aux k m zero j == k aux k m (suc n) zero == aux zero m n m aux k m (suc n) (suc j) == aux (suc k) m n j verifyEquals eq = verify ["n","m"] $ \(@@) zero suc (==) (===) choice -> do true <- primTrue false <- primFalse let x == y = eq @@ x @@ y m = var 0 n = var 1 (zero == zero ) === true (suc n == suc m) === (n == m) (suc n == zero ) === false (zero == suc n) === false verifyLess leq = verify ["n","m"] $ \(@@) zero suc (==) (===) choice -> do true <- primTrue false <- primFalse let x < y = leq @@ x @@ y m = var 0 n = var 1 (n < zero) === false (suc n < suc m) === (n < m) (zero < suc m) === true verifyMax maxV = return () -- TODO: make max a postulate verify xs = verify' primNat primZero primSuc xs verify' :: TCM Term -> TCM Term -> TCM Term -> [String] -> ( (Term -> Term -> Term) -> Term -> (Term -> Term) -> (Term -> Term -> TCM ()) -> (Term -> Term -> TCM ()) -> ([TCM ()] -> TCM ()) -> TCM a) -> TCM a verify' pNat pZero pSuc xs f = do nat <- El (mkType 0) <$> pNat zero <- pZero s <- pSuc let x == y = noConstraints $ equalTerm nat x y -- Andreas: 2013-10-21 I put primBool here on the inside -- since some Nat-builtins do not require Bool-builtins x === y = do bool <- El (mkType 0) <$> primBool noConstraints $ equalTerm bool x y suc n = s `apply1` n choice = foldr1 (\x y -> x `catchError` \_ -> y) xs <- mapM freshName_ xs addContext (xs, domFromArg $ defaultArg nat) $ f apply1 zero suc (==) (===) choice verifyPath :: Term -> Type -> TCM () verifyPath path t = do let hlam n t = glam (setHiding Hidden defaultArgInfo) n t noConstraints $ equalTerm t path =<< (runNamesT [] $ hlam "l" $ \ l -> hlam "A" $ \ bA -> cl primPathP <#> l <@> (lam "i" $ \ _ -> bA)) -- | Checks that builtin with name @b : String@ of type @t : Term@ -- is a data type or inductive record with @n : Int@ constructors. -- Returns the name of the data/record type. inductiveCheck :: String -> Int -> Term -> TCM (QName, Definition) inductiveCheck b n t = do t <- etaContract =<< normalise t case t of Def q _ -> do def <- getConstInfo q let yes = return (q, def) case theDef def of Datatype { dataInduction = Inductive, dataCons = cs } | length cs == n -> yes | otherwise -> no Record { recInduction = ind } | n == 1 && ind /= Just CoInductive -> yes _ -> no _ -> no where no | n == 1 = typeError $ GenericError $ unwords [ "The builtin", b , "must be a datatype with a single constructor" , "or an (inductive) record type" ] | otherwise = typeError $ GenericError $ unwords [ "The builtin", b , "must be a datatype with", show n , "constructors" ] -- | @bindPostulatedName builtin q m@ checks that @q@ is a postulated -- name, and binds the builtin @builtin@ to the term @m q def@, -- where @def@ is the current 'Definition' of @q@. bindPostulatedName :: String -> ResolvedName -> (QName -> Definition -> TCM Term) -> TCM () bindPostulatedName builtin x m = do q <- getName x def <- getConstInfo q case theDef def of Axiom {} -> bindBuiltinName builtin =<< m q def _ -> err where err = typeError $ GenericError $ "The argument to BUILTIN " ++ builtin ++ " must be a postulated name" getName = \case DefinedName _ d -> return $ anameName d _ -> err addHaskellPragma :: QName -> String -> TCM () addHaskellPragma = addPragma ghcBackendName bindAndSetHaskellCode :: String -> String -> Term -> TCM () bindAndSetHaskellCode b hs t = do d <- fromMaybe __IMPOSSIBLE__ <$> getDef t addHaskellPragma d hs bindBuiltinName b t bindBuiltinBool :: Term -> TCM () bindBuiltinBool = bindAndSetHaskellCode builtinBool "= type Bool" -- | Check that we're not trying to bind true and false to the same -- constructor. checkBuiltinBool :: TCM () checkBuiltinBool = do true <- getBuiltin' builtinTrue false <- getBuiltin' builtinFalse when (true == false) $ genericError "Cannot bind TRUE and FALSE to the same constructor" bindBuiltinInt :: Term -> TCM () bindBuiltinInt = bindAndSetHaskellCode builtinInteger "= type Integer" bindBuiltinNat :: Term -> TCM () bindBuiltinNat t = do bindBuiltinData builtinNat t name <- fromMaybe __IMPOSSIBLE__ <$> getDef t addHaskellPragma name "= type Integer" -- | Only use for datatypes with distinct arities of constructors. -- Binds the constructors together with the datatype. bindBuiltinData :: String -> Term -> TCM () bindBuiltinData s t = do bindBuiltinName s t name <- fromMaybe __IMPOSSIBLE__ <$> getDef t Datatype{ dataCons = cs } <- theDef <$> getConstInfo name let getArity c = do Constructor{ conArity = a } <- theDef <$> getConstInfo c return a getBuiltinArity (BuiltinDataCons t) = arity <$> t getBuiltinArity _ = __IMPOSSIBLE__ sortByM f xs = map fst . sortBy (compare `on` snd) . zip xs <$> mapM f xs -- Order constructurs by arity cs <- sortByM getArity cs -- Do the same for the builtins let bcis = fromMaybe __IMPOSSIBLE__ $ do BuiltinData _ bcs <- builtinDesc <$> findBuiltinInfo s mapM findBuiltinInfo bcs bcis <- sortByM (getBuiltinArity . builtinDesc) bcis unless (length cs == length bcis) __IMPOSSIBLE__ -- we already checked this zipWithM_ (\ c bci -> bindBuiltinInfo bci (A.Con $ unambiguous $ setRange (getRange name) c)) cs bcis bindBuiltinUnit :: Term -> TCM () bindBuiltinUnit t = do unit <- fromMaybe __IMPOSSIBLE__ <$> getDef t def <- theDef <$> getConstInfo unit case def of Record { recFields = [], recConHead = con } -> do bindBuiltinName builtinUnit t bindBuiltinName builtinUnitUnit (Con con ConOSystem []) _ -> genericError "Builtin UNIT must be a singleton record type" bindBuiltinSigma :: Term -> TCM () bindBuiltinSigma t = do sigma <- fromMaybe __IMPOSSIBLE__ <$> getDef t def <- theDef <$> getConstInfo sigma case def of Record { recFields = [fst,snd], recConHead = con } -> do bindBuiltinName builtinSigma t _ -> genericError "Builtin SIGMA must be a record type with two fields" -- | Bind BUILTIN EQUALITY and BUILTIN REFL. bindBuiltinEquality :: ResolvedName -> TCM () bindBuiltinEquality x = do (v, _t) <- inferExpr (A.nameExpr x) -- Equality needs to be a data type with 1 constructor (eq, def) <- inductiveCheck builtinEquality 1 v -- Check that the type is the type of a polymorphic relation, i.e., -- Γ → (A : Set _) → A → A → Set _ TelV eqTel eqCore <- telView $ defType def let no = genericError "The type of BUILTIN EQUALITY must be a polymorphic relation" -- The target is a sort since eq is a data type. unless (isJust $ isSort $ unEl eqCore) __IMPOSSIBLE__ -- The types of the last two arguments must be the third-last argument unless (size eqTel >= 3) no let (a, b) = fromMaybe __IMPOSSIBLE__ $ last2 $ telToList eqTel [a,b] <- reduce $ map (unEl . snd . unDom) [a,b] unless (deBruijnView a == Just 0) no unless (deBruijnView b == Just 1) no -- Get the single constructor. case theDef def of Datatype { dataCons = [c] } -> do bindBuiltinName builtinEquality v -- Check type of REFL. It has to be of the form -- pars → (x : A) → Eq ... x x -- Check the arguments cdef <- getConstInfo c TelV conTel conCore <- telView $ defType cdef ts <- reduce $ map (unEl . snd . unDom) $ drop (conPars $ theDef cdef) $ telToList conTel -- After dropping the parameters, there should be maximally one argument. unless (length ts <= 1) wrongRefl unless (all ((Just 0 ==) . deBruijnView) ts) wrongRefl -- Check the target case unEl conCore of Def _ es -> do let vs = map unArg $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es (a,b) <- reduce $ fromMaybe __IMPOSSIBLE__ $ last2 vs unless (deBruijnView a == Just 0) wrongRefl unless (deBruijnView b == Just 0) wrongRefl bindBuiltinName builtinRefl (Con (ConHead c Inductive []) ConOSystem []) _ -> __IMPOSSIBLE__ _ -> genericError "Builtin EQUALITY must be a data type with a single constructor" where wrongRefl = genericError "Wrong type of constructor of BUILTIN EQUALITY" bindBuiltinInfo :: BuiltinInfo -> A.Expr -> TCM () bindBuiltinInfo (BuiltinInfo s d) e = do case d of BuiltinData t cs -> do v <- checkExpr e =<< t unless (s == builtinUnit) $ do void $ inductiveCheck s (length cs) v if | s == builtinEquality -> __IMPOSSIBLE__ -- bindBuiltinEquality v | s == builtinBool -> bindBuiltinBool v | s == builtinNat -> bindBuiltinNat v | s == builtinInteger -> bindBuiltinInt v | s == builtinUnit -> bindBuiltinUnit v | s == builtinSigma -> bindBuiltinSigma v | s == builtinList -> bindBuiltinData s v | otherwise -> bindBuiltinName s v BuiltinDataCons t -> do let name (Lam h b) = name (absBody b) name (Con c ci _) = Con c ci [] name _ = __IMPOSSIBLE__ v0 <- checkExpr e =<< t case e of A.Con{} -> return () _ -> typeError $ BuiltinMustBeConstructor s e let v@(Con h _ []) = name v0 c = conName h bindBuiltinName s v when (s `elem` [builtinFalse, builtinTrue]) checkBuiltinBool BuiltinPrim pfname axioms -> do case e of A.Def qx -> do PrimImpl t pf <- lookupPrimitiveFunction pfname v <- checkExpr e t axioms v info <- getConstInfo qx let cls = defClauses info a = defAbstract info mcc = defCompiled info inv = defInverse info bindPrimitive pfname $ pf { primFunName = qx } addConstant qx $ info { theDef = Primitive { primAbstr = a , primName = pfname , primClauses = cls , primInv = inv , primCompiled = mcc } } -- needed? yes, for checking equations for mul bindBuiltinName s v _ -> typeError $ GenericError $ "Builtin " ++ s ++ " must be bound to a function" BuiltinPostulate rel t -> do t' <- t v <- applyRelevanceToContext rel $ checkExpr e t' let err = typeError $ GenericError $ "The argument to BUILTIN " ++ s ++ " must be a postulated name" case e of A.Def q -> do def <- getConstInfo q case theDef def of Axiom {} -> do builtinSizeHook s q t' -- And compilation pragmas for base types when (s == builtinChar) $ addHaskellPragma q "= type Char" when (s == builtinString) $ addHaskellPragma q "= type Data.Text.Text" when (s == builtinFloat) $ addHaskellPragma q "= type Double" when (s == builtinWord64) $ addHaskellPragma q "= type MAlonzo.RTE.Word64" when (s == builtinPathP) $ builtinPathPHook q bindBuiltinName s v _ -> err _ -> err BuiltinUnknown mt f -> do (v, t) <- caseMaybe mt (inferExpr e) $ \ tcmt -> do t <- tcmt (,t) <$> checkExpr e t f v t bindBuiltinName s v builtinPathPHook :: QName -> TCM () builtinPathPHook q = modifySignature $ updateDefinition q $ updateDefPolarity id . updateDefArgOccurrences (const [Unused,StrictPos,Mixed,Mixed]) -- | Bind a builtin thing to an expression. bindBuiltin :: String -> ResolvedName -> TCM () bindBuiltin b x = do unlessM ((0 ==) <$> getContextSize) $ do -- Andreas, 2017-11-01, issue #2824 -- Only raise an error if the name for the builtin is defined in a parametrized module. let failure = typeError $ BuiltinInParameterisedModule b -- Get the non-empty list of AbstractName for x xs <- case x of VarName{} -> failure DefinedName _ x -> return $ x :! [] FieldName xs -> return xs ConstructorName xs -> return xs PatternSynResName xs -> failure UnknownName -> failure -- For ambiguous names, we check all of their definitions: unlessM (allM xs $ ((0 ==) . size) <.> lookupSection . qnameModule . anameName) $ failure -- Since the name was define in a parameter-free context, we can switch to the empty context. -- (And we should!) inTopContext $ do if | b == builtinRefl -> warning $ OldBuiltin b builtinEquality | b == builtinZero -> now builtinNat b | b == builtinSuc -> now builtinNat b | b == builtinNil -> now builtinList b | b == builtinCons -> now builtinList b | b == builtinInf -> bindBuiltinInf x | b == builtinSharp -> bindBuiltinSharp x | b == builtinFlat -> bindBuiltinFlat x | b == builtinEquality -> bindBuiltinEquality x | Just i <- findBuiltinInfo b -> bindBuiltinInfo i (A.nameExpr x) | otherwise -> typeError $ NoSuchBuiltinName b where now new b = warning $ OldBuiltin b new isUntypedBuiltin :: String -> Bool isUntypedBuiltin b = elem b [builtinFromNat, builtinFromNeg, builtinFromString] bindUntypedBuiltin :: String -> ResolvedName -> TCM () bindUntypedBuiltin b = \case DefinedName _ x -> bindBuiltinName b (Def (anameName x) []) FieldName (x :! []) -> bindBuiltinName b (Def (anameName x) []) _ -> genericError $ "The argument to BUILTIN " ++ b ++ " must be a defined unambiguous name" -- | Bind a builtin thing to a new name. -- -- Since their type is closed, it does not matter whether we are in a -- parameterized module when we declare them. -- We simply ignore the parameters. bindBuiltinNoDef :: String -> A.QName -> TCM () bindBuiltinNoDef b q = inTopContext $ do when (b `elem` sizeBuiltins) $ unlessM sizedTypesOption $ genericError $ "Cannot declare size BUILTIN " ++ b ++ " with option --no-sized-types" case builtinDesc <$> findBuiltinInfo b of Just (BuiltinPostulate rel mt) -> do -- We start by adding the corresponding postulate t <- mt addConstant q $ defaultDefn (setRelevance rel defaultArgInfo) q t def -- And we then *modify* the definition based on our needs: -- We add polarity information for SIZE-related definitions builtinSizeHook b q t -- Finally, bind the BUILTIN in the environment. bindBuiltinName b $ Def q [] where -- Andreas, 2015-02-14 -- Special treatment of SizeUniv, should maybe be a primitive. def | b == builtinSizeUniv = emptyFunction { funClauses = [ (empty :: Clause) { clauseBody = Just $ Sort sSizeUniv } ] , funCompiled = Just (CC.Done [] $ Sort sSizeUniv) , funMutual = Just [] , funTerminates = Just True } | otherwise = Axiom Just (BuiltinPrim name axioms) -> do PrimImpl t pf <- lookupPrimitiveFunction name bindPrimitive name $ pf { primFunName = q } let v = Def q [] def = Primitive { primAbstr = ConcreteDef , primName = name , primClauses = [] , primInv = NotInjective , primCompiled = Just (CC.Done [] $ Def q []) } addConstant q $ defaultDefn defaultArgInfo q t def axioms v bindBuiltinName b v Just (BuiltinDataCons mt) -> do t <- mt d <- return $! getPrimName $ unEl t let ch = ConHead q Inductive [] def = Constructor 0 0 ch d ConcreteDef Inductive (emptyCompKit, Nothing) [] [] -- Andrea TODO: fix zeros addConstant q $ defaultDefn defaultArgInfo q t def addDataCons d [q] bindBuiltinName b $ Con ch ConOSystem [] Just (BuiltinData mt cs) -> do t <- mt addConstant q $ defaultDefn defaultArgInfo q t def bindBuiltinName b $ Def q [] where def = Datatype { dataPars = 0 , dataIxs = 0 , dataInduction = Inductive , dataClause = Nothing , dataCons = [] -- Constructors are added later , dataSort = Inf , dataAbstr = ConcreteDef , dataMutual = Nothing , dataPathCons = [] } Just{} -> __IMPOSSIBLE__ Nothing -> __IMPOSSIBLE__ -- typeError $ NoSuchBuiltinName b builtinKindOfName :: String -> TCM (Maybe KindOfName) builtinKindOfName b = case find ((b ==) . builtinName) coreBuiltins of Nothing -> return Nothing Just d -> return . Just $ case builtinDesc d of BuiltinDataCons{} -> ConName BuiltinData{} -> DefName BuiltinPrim{} -> DefName BuiltinPostulate{} -> DefName BuiltinUnknown{} -> DefName Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Application.hs-boot0000644000000000000000000000155113466402171022502 0ustar0000000000000000 module Agda.TypeChecking.Rules.Application where import Agda.Syntax.Common (NamedArg, ProjOrigin) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Internal import Agda.Syntax.Position import Agda.TypeChecking.Monad.Base import Agda.Utils.NonemptyList checkArguments :: ExpandHidden -> Range -> [NamedArg A.Expr] -> Type -> Type -> ([Maybe Range] -> Elims -> Type -> CheckedTarget -> TCM Term) -> TCM Term checkArguments_ :: ExpandHidden -> Range -> [NamedArg A.Expr] -> Telescope -> TCM (Elims, Telescope) checkApplication :: Comparison -> A.Expr -> A.Args -> A.Expr -> Type -> TCM Term inferApplication :: ExpandHidden -> A.Expr -> A.Args -> A.Expr -> TCM (Term, Type) checkProjAppToKnownPrincipalArg :: Comparison -> A.Expr -> ProjOrigin -> NonemptyList QName -> A.Args -> Type -> Int -> Term -> Type -> TCM Term Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Display.hs0000644000000000000000000001140213466402171020677 0ustar0000000000000000 module Agda.TypeChecking.Rules.Display (checkDisplayPragma) where import Data.Maybe import qualified Data.List as List import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views import Agda.Syntax.Internal as I import Agda.Syntax.Common import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Pretty import Agda.Utils.NonemptyList checkDisplayPragma :: QName -> [NamedArg A.Pattern] -> A.Expr -> TCM () checkDisplayPragma f ps e = do df <- inTopContext $ do pappToTerm f id ps $ \n args -> do let lhs = map I.Apply args v <- exprToTerm e return $ Display n lhs (DTerm v) reportSLn "tc.display.pragma" 20 $ "Adding display form for " ++ show f ++ "\n " ++ show df addDisplayForm f df -- Compute a left-hand side for a display form. Inserts implicits, but no type -- checking so does the wrong thing if implicitness is computed. Binds variables. displayLHS :: Telescope -> [NamedArg A.Pattern] -> (Int -> [Term] -> TCM a) -> TCM a displayLHS tel ps ret = patternsToTerms tel ps $ \n vs -> ret n (map unArg vs) patternsToTerms :: Telescope -> [NamedArg A.Pattern] -> (Int -> Args -> TCM a) -> TCM a patternsToTerms _ [] ret = ret 0 [] patternsToTerms EmptyTel (p : ps) ret = patternToTerm (namedArg p) $ \n v -> patternsToTerms EmptyTel ps $ \m vs -> ret (n + m) (inheritHiding p v : vs) patternsToTerms (ExtendTel a tel) (p : ps) ret = do let isMatch = sameHiding p a && (visible p || isNothing (nameOf (unArg p)) || Just (absName tel) == (rangedThing <$> nameOf (unArg p))) case isMatch of True -> patternToTerm (namedArg p) $ \n v -> patternsToTerms (unAbs tel) ps $ \m vs -> ret (n + m) (inheritHiding p v : vs) False -> bindWild $ patternsToTerms (unAbs tel) (p : ps) $ \n vs -> ret (1 + n) (inheritHiding a (Var 0 []) : vs) inheritHiding :: LensHiding a => a -> b -> Arg b inheritHiding a b = setHiding (getHiding a) (defaultArg b) pappToTerm :: QName -> (Args -> b) -> [NamedArg A.Pattern] -> (Int -> b -> TCM a) -> TCM a pappToTerm x f ps ret = do def <- getConstInfo x TelV tel _ <- telView $ defType def let dropTel n = telFromList . drop n . telToList pars = case theDef def of Constructor { conPars = p } -> p Function { funProjection = Just Projection{projIndex = i} } | i > 0 -> i - 1 _ -> 0 patternsToTerms (dropTel pars tel) ps $ \n vs -> ret n (f vs) patternToTerm :: A.Pattern -> (Nat -> Term -> TCM a) -> TCM a patternToTerm p ret = case p of A.VarP (A.BindName x) -> bindVar x $ ret 1 (Var 0 []) A.ConP _ cs ps | Just c <- getUnambiguous cs -> pappToTerm c (Con (ConHead c Inductive []) ConOCon . map Apply) ps ret | otherwise -> ambigErr "constructor" cs A.ProjP _ _ ds | Just d <- getUnambiguous ds -> ret 0 (Def d []) | otherwise -> ambigErr "projection" ds A.DefP _ fs ps | Just f <- getUnambiguous fs -> pappToTerm f (Def f . map Apply) ps ret | otherwise -> ambigErr "DefP" fs A.LitP l -> ret 0 (Lit l) A.WildP _ -> bindWild $ ret 1 (Var 0 []) _ -> do doc <- prettyA p typeError $ GenericError $ "Pattern not allowed in DISPLAY pragma:\n" ++ show doc where ambigErr thing (AmbQ xs) = genericDocError =<< do text ("Ambiguous " ++ thing ++ ":") fsep (punctuate comma (map pshow $ toList xs)) bindWild :: TCM a -> TCM a bindWild ret = do x <- freshNoName_ bindVar x ret bindVar :: Name -> TCM a -> TCM a bindVar x ret = addContext x ret exprToTerm :: A.Expr -> TCM Term exprToTerm e = case unScope e of A.Var x -> fst <$> getVarInfo x A.Def f -> pure $ Def f [] A.Con c -> pure $ Con (ConHead (headAmbQ c) Inductive []) ConOCon [] -- Don't care too much about ambiguity here A.Lit l -> pure $ Lit l A.App _ e arg -> apply <$> exprToTerm e <*> ((:[]) . inheritHiding arg <$> exprToTerm (namedArg arg)) A.Proj _ f -> pure $ Def (headAmbQ f) [] -- only for printing so we don't have to worry too much here A.PatternSyn f -> pure $ Def (headAmbQ f) [] A.Macro f -> pure $ Def f [] A.WithApp{} -> notAllowed "with application" A.QuestionMark{} -> notAllowed "holes" A.Underscore{} -> notAllowed "metavariables" A.Lam{} -> notAllowed "lambdas" A.AbsurdLam{} -> notAllowed "lambdas" A.ExtendedLam{} -> notAllowed "lambdas" _ -> typeError $ GenericError $ "TODO: exprToTerm " ++ show e where notAllowed s = typeError $ GenericError $ "Not allowed in DISPLAY pragma right-hand side: " ++ s Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS/0000755000000000000000000000000013466402171017366 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS/ProblemRest.hs0000644000000000000000000001352513466402171022166 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Agda.TypeChecking.Rules.LHS.ProblemRest where import Control.Arrow (first, second) import Control.Monad import Data.Functor ((<$)) import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Abstract.Pattern import qualified Agda.Syntax.Abstract as A import Agda.TypeChecking.Monad import Agda.TypeChecking.Pretty import Agda.TypeChecking.Telescope import Agda.TypeChecking.Substitute import Agda.TypeChecking.Rules.LHS.Problem import Agda.TypeChecking.Rules.LHS.Implicit import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Size import Agda.Utils.Permutation #include "undefined.h" import Agda.Utils.Impossible -- | Rename the variables in a telescope using the names from a given pattern. -- -- If there are not at least as many patterns as entries as in the telescope, -- the names of the remaining entries in the telescope are unchanged. -- If there are too many patterns, there should be a type error later. -- useNamesFromPattern :: [NamedArg A.Pattern] -> Telescope -> Telescope useNamesFromPattern ps tel = telFromList (zipWith ren ps telList ++ telRemaining) where telList = telToList tel telRemaining = drop (length ps) telList -- telescope entries beyond patterns ren (Arg ai (Named nm p)) dom@Dom{ unDom = (y, a) } = case p of -- Andreas, 2017-10-12, issue #2803, also preserve user-written hidden names. -- However, not if the argument is named, because then the name in the telescope -- is significant for implicit insertion. A.VarP (A.BindName x) | not (isNoName x) , visible dom || (getOrigin ai == UserWritten && nm == Nothing) -> dom{ unDom = (nameToArgName x, a) } A.AbsurdP{} | visible dom -> dom{ unDom = (stringToArgName "()", a) } A.PatternSynP{} -> __IMPOSSIBLE__ -- ensure there are no syns left -- Andreas, 2016-05-10, issue 1848: if context variable has no name, call it "x" _ | visible dom && isNoName y -> dom{ unDom = (stringToArgName "x", a) } | otherwise -> dom useOriginFrom :: (LensOrigin a, LensOrigin b) => [a] -> [b] -> [a] useOriginFrom = zipWith $ \x y -> setOrigin (getOrigin y) x -- | Are there any untyped user patterns left? noProblemRest :: Problem a -> Bool noProblemRest (Problem _ rp _) = null rp -- | Construct an initial 'LHSState' from user patterns. -- Example: -- @ -- -- Case : {A : Set} → Maybe A → Set → Set → Set -- Case nothing B C = B -- Case (just _) B C = C -- -- sample : {A : Set} (m : Maybe A) → Case m Bool (Maybe A → Bool) -- sample (just a) (just b) = true -- sample (just a) nothing = false -- sample nothing = true -- @ -- The problem generated for the first clause of @sample@ -- with patterns @just a, just b@ would be: -- @ -- lhsTel = [A : Set, m : Maybe A] -- lhsOutPat = ["A", "m"] -- lhsProblem = Problem ["_", "just a"] [] [] [] -- lhsTarget = "Case m Bool (Maybe A -> Bool)" -- @ initLHSState :: Telescope -- ^ The initial telescope @delta@ of parameters. -> [ProblemEq] -- ^ The problem equations inherited from the parent clause (living in @delta@). -> [NamedArg A.Pattern] -- ^ The user patterns. -> Type -- ^ The type the user patterns eliminate (living in @delta@). -> (LHSState a -> TCM a) -- ^ Continuation for when checking the patterns is complete. -> TCM (LHSState a) -- ^ The initial LHS state constructed from the user patterns. initLHSState delta eqs ps a ret = do let problem = Problem eqs ps ret qs0 = teleNamedArgs delta updateProblemRest $ LHSState delta qs0 problem (defaultArg a) [] -- | Try to move patterns from the problem rest into the problem. -- Possible if type of problem rest has been updated to a function type. updateProblemRest :: LHSState a -> TCM (LHSState a) updateProblemRest st@(LHSState tel0 qs0 p@(Problem oldEqs ps ret) a psplit) = do ps <- addContext tel0 $ insertImplicitPatternsT ExpandLast ps $ unArg a reportSDoc "tc.lhs.imp" 20 $ "insertImplicitPatternsT returned" <+> fsep (map prettyA ps) -- (Issue 734: Do only the necessary telView to preserve clause types as much as possible.) let m = length $ takeWhile (isNothing . A.isProjP) ps (TelV gamma b, boundary) <- telViewUpToPathBoundaryP m $ unArg a forM_ (zip ps (telToList gamma)) $ \(p, a) -> unless (sameHiding p a) $ typeError WrongHidingInLHS let tel1 = useNamesFromPattern ps gamma n = size tel1 (ps1,ps2) = splitAt n ps tel = telFromList $ telToList tel0 ++ telToList tel1 qs1 = telePatterns tel1 boundary newEqs = zipWith3 ProblemEq (map namedArg ps1) (map (patternToTerm . namedArg) qs1) (flattenTel tel1 `useOriginFrom` ps1) tau = raiseS n reportSDoc "tc.lhs.problem" 10 $ addContext tel0 $ vcat [ "checking lhs -- updated split problem:" , nest 2 $ vcat [ "ps =" <+> fsep (map prettyA ps) , "a =" <+> prettyTCM a , "tel1 =" <+> prettyTCM tel1 , "ps1 =" <+> fsep (map prettyA ps1) , "ps2 =" <+> fsep (map prettyA ps2) , "b =" <+> addContext tel1 (prettyTCM b) ] ] reportSDoc "tc.lhs.problem" 60 $ addContext tel0 $ vcat [ nest 2 $ vcat [ "qs1 =" <+> fsep (map pretty qs1) ] ] return $ LHSState { _lhsTel = tel , _lhsOutPat = applySubst tau qs0 ++ qs1 , _lhsProblem = Problem { _problemEqs = applyPatSubst tau oldEqs ++ newEqs , _problemRestPats = ps2 , _problemCont = ret } , _lhsTarget = a $> b , _lhsPartialSplit = psplit } Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS/Implicit.hs0000644000000000000000000001010413466402171021470 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Rules.LHS.Implicit where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad (forM) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Info import Agda.Syntax.Internal as I import Agda.Syntax.Abstract (IsProjP(..)) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Translation.InternalToAbstract (reify) import Agda.TypeChecking.Monad import Agda.TypeChecking.Implicit import Agda.TypeChecking.Substitute import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Telescope import Agda.TypeChecking.Rules.LHS.Problem import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Maybe import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible implicitP :: ArgInfo -> NamedArg A.Pattern implicitP info = Arg (setOrigin Inserted info) $ unnamed $ A.WildP $ PatRange $ noRange -- | Insert implicit patterns in a list of patterns. -- Even if 'DontExpandLast', trailing SIZELT patterns are inserted. insertImplicitPatterns :: ExpandHidden -> [NamedArg A.Pattern] -> Telescope -> TCM [NamedArg A.Pattern] insertImplicitPatterns exh ps tel = insertImplicitPatternsT exh ps (telePi tel __DUMMY_TYPE__) -- | Insert trailing SizeLt patterns, if any. insertImplicitSizeLtPatterns :: Type -> TCM [NamedArg A.Pattern] insertImplicitSizeLtPatterns t = do -- Testing for SizeLt. In case of blocked type, we return no. -- We assume that on the LHS, we know the type. (TODO: Sufficient?) isSize <- isSizeTypeTest let isBounded BoundedNo = False isBounded BoundedLt{} = True isSizeLt t = maybe False isBounded . isSize . unEl <$> reduce t -- Search for the last SizeLt type among the hidden arguments. TelV tel _ <- telView t let ts = takeWhile (not . visible) $ telToList tel keep <- dropWhileEndM (not <.> isSizeLt . snd . unDom) ts -- Insert implicit patterns upto (including) the last SizeLt type. return $ map (implicitP . domInfo) keep -- | Insert implicit patterns in a list of patterns. -- Even if 'DontExpandLast', trailing SIZELT patterns are inserted. insertImplicitPatternsT :: ExpandHidden -> [NamedArg A.Pattern] -> Type -> TCM [NamedArg A.Pattern] insertImplicitPatternsT DontExpandLast [] a = insertImplicitSizeLtPatterns a insertImplicitPatternsT exh ps a = do TelV tel b <- telViewUpTo' (-1) (not . visible) a reportSDoc "tc.lhs.imp" 20 $ vcat [ "insertImplicitPatternsT" , nest 2 $ "ps = " <+> do brackets $ fsep $ punctuate comma $ map prettyA ps , nest 2 $ "tel = " <+> prettyTCM tel , nest 2 $ "b = " <+> addContext tel (prettyTCM b) ] reportSDoc "tc.lhs.imp" 70 $ vcat [ "insertImplicitPatternsT" , nest 2 $ "ps = " <+> (text . show) ps , nest 2 $ "tel = " <+> (text . show) tel , nest 2 $ "b = " <+> (text . show) b ] case ps of [] -> insImp dummy tel p : _ -> do -- Andreas, 2015-05-11. -- If p is a projection pattern, make it visible for the purpose of -- calling insImp / insertImplicit, to get correct behavior. let p' = applyWhen (isJust $ A.isProjP p) (setHiding NotHidden) p hs <- insImp p' tel -- Continue with implicit patterns inserted before @p@. -- The list @hs ++ ps@ cannot be empty. let ps0@(~(p1 : ps1)) = hs ++ ps reduce a >>= piOrPath >>= \case -- If @a@ is a function (or path) type, continue inserting after @p1@. Left (_, b) -> (p1 :) <$> insertImplicitPatternsT exh ps1 (absBody b) -- Otherwise, we are done. Right{} -> return ps0 where dummy = defaultNamedArg (A.VarP __IMPOSSIBLE__) insImp p EmptyTel = return [] insImp p tel = case insertImplicit p $ telToList tel of BadImplicits -> typeError WrongHidingInLHS NoSuchName x -> typeError WrongHidingInLHS ImpInsert n -> return $ map implicitArg n implicitArg h = implicitP $ setHiding h $ defaultArgInfo Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS/Unify.hs0000644000000000000000000013450513466402171021024 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE UndecidableInstances #-} -- | Unification algorithm for specializing datatype indices, as described in -- \"Unifiers as Equivalences: Proof-Relevant Unification of Dependently -- Typed Data\" by Jesper Cockx, Dominique Devriese, and Frank Piessens -- (ICFP 2016). -- -- This is the unification algorithm used for checking the left-hand side -- of clauses (see @Agda.TypeChecking.Rules.LHS@), coverage checking (see -- @Agda.TypeChecking.Coverage@) and indirectly also for interactive case -- splitting (see @Agda.Interaction.MakeCase@). -- -- A unification problem (of type @UnifyState@) consists of: -- 1. A telescope @varTel@ of free variables, some or all of which are -- flexible (as indicated by @flexVars@). -- 2. A telescope @eqTel@ containing the types of the equations. -- 3. Left- and right-hand sides for each equation: -- @varTel ⊢ eqLHS : eqTel@ and @varTel ⊢ eqRHS : eqTel@. -- -- The unification algorithm can end in three different ways: -- (type @UnificationResult@): -- - A *positive success* @Unifies (tel, sigma, ps)@ with @tel ⊢ sigma : varTel@, -- @tel ⊢ eqLHS [ varTel ↦ sigma ] ≡ eqRHS [ varTel ↦ sigma ] : eqTel@, -- and @tel ⊢ ps : eqTel@. In this case, @sigma;ps@ is an *equivalence* -- between the telescopes @tel@ and @varTel(eqLHS ≡ eqRHS)@. -- - A *negative success* @NoUnify err@ means that a conflicting equation -- was found (e.g an equation between two distinct constructors or a cycle). -- - A *failure* @DontKnow err@ means that the unifier got stuck. -- -- The unification algorithm itself consists of two parts: -- 1. A *unification strategy* takes a unification problem and produces a -- list of suggested unification rules (of type @UnifyStep@). Strategies -- can be constructed by composing simpler strategies (see for example the -- definition of @completeStrategyAt@). -- 2. The *unification engine* @unifyStep@ takes a unification rule and tries -- to apply it to the given state, writing the result to the UnifyOutput -- on a success. -- -- The unification steps (of type @UnifyStep@) are the following: -- - *Deletion* removes a reflexive equation @u =?= v : a@ if the left- and -- right-hand side @u@ and @v@ are (definitionally) equal. This rule results -- in a failure if --without-K is enabled (see \"Pattern Matching Without K\" -- by Jesper Cockx, Dominique Devriese, and Frank Piessens (ICFP 2014). -- - *Solution* solves an equation if one side is (eta-equivalent to) a -- flexible variable. In case both sides are flexible variables, the -- unification strategy makes a choice according to the @chooseFlex@ -- function in @Agda.TypeChecking.Rules.LHS.Problem@. -- - *Injectivity* decomposes an equation of the form -- @c us =?= c vs : D pars is@ where @c : Δc → D pars js@ is a constructor -- of the inductive datatype @D@ into a sequence of equations -- @us =?= vs : delta@. In case @D@ is an indexed datatype, -- *higher-dimensional unification* is applied (see below). -- - *Conflict* detects absurd equations of the form -- @c₁ us =?= c₂ vs : D pars is@ where @c₁@ and @c₂@ are two distinct -- constructors of the datatype @D@. -- - *Cycle* detects absurd equations of the form @x =?= v : D pars is@ where -- @x@ is a variable of the datatype @D@ that occurs strongly rigid in @v@. -- - *EtaExpandVar* eta-expands a single flexible variable @x : R@ where @R@ -- is a (eta-expandable) record type, replacing it by one variable for each -- field of @R@. -- - *EtaExpandEquation* eta-expands an equation @u =?= v : R@ where @R@ is a -- (eta-expandable) record type, replacing it by one equation for each field -- of @R@. The left- and right-hand sides of these equations are the -- projections of @u@ and @v@. -- - *LitConflict* detects absurd equations of the form @l₁ =?= l₂ : A@ where -- @l₁@ and @l₂@ are distinct literal terms. -- - *StripSizeSuc* simplifies an equation of the form -- @sizeSuc x =?= sizeSuc y : Size@ to @x =?= y : Size@. -- - *SkipIrrelevantEquation@ removes an equation between irrelevant terms. -- - *TypeConInjectivity* decomposes an equation of the form -- @D us =?= D vs : Set i@ where @D@ is a datatype. This rule is only used -- if --injective-type-constructors is enabled. -- -- Higher-dimensional unification (new, does not yet appear in any paper): -- If an equation of the form @c us =?= c vs : D pars is@ is encountered where -- @c : Δc → D pars js@ is a constructor of an indexed datatype -- @D pars : Φ → Set ℓ@, it is in general unsound to just simplify this -- equation to @us =?= vs : Δc@. For this reason, the injectivity rule in the -- paper restricts the indices @is@ to be distinct variables that are bound in -- the telescope @eqTel@. But we can be more general by introducing new -- variables @ks@ to the telescope @eqTel@ and equating these to @is@: -- @ -- Δ₁(x : D pars is)Δ₂ -- ≃ -- Δ₁(ks : Φ)(x : D pars ks)(ps : is ≡Φ ks)Δ₂ -- @ -- Since @ks@ are distinct variables, it's now possible to apply injectivity -- to the equation @x@, resulting in the following new equation telescope: -- @ -- Δ₁(ys : Δc)(ps : is ≡Φ js[Δc ↦ ys])Δ₂ -- @ -- Now we can solve the equations @ps@ by recursively calling the unification -- algorithm with flexible variables @Δ₁(ys : Δc)@. This is called -- *higher-dimensional unification* since we are unifying equality proofs -- rather than terms. If the higher-dimensional unification succeeds, the -- resulting telescope serves as the new equation telescope for the original -- unification problem. module Agda.TypeChecking.Rules.LHS.Unify ( UnificationResult , UnificationResult'(..) , unifyIndices ) where import Prelude hiding (null) import Control.Arrow ((***)) import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.State import Control.Monad.Trans.Maybe import Control.Monad.Reader import Control.Monad.Writer (WriterT(..), MonadWriter(..), Monoid(..)) import Data.Map (Map) import qualified Data.Map as Map import Data.Semigroup hiding (Arg) import qualified Data.List as List import Data.Foldable (Foldable) import Data.Traversable (Traversable,traverse) import qualified Data.Traversable as Trav import Agda.Interaction.Options (optInjectiveTypeConstructors) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.TypeChecking.Monad import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Monad.Builtin (constructorForm) import Agda.TypeChecking.Conversion -- equalTerm import Agda.TypeChecking.Constraints import Agda.TypeChecking.Datatypes import Agda.TypeChecking.DropArgs import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Level (reallyUnLevelView) import Agda.TypeChecking.Reduce import qualified Agda.TypeChecking.Patterns.Match as Match import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.TypeChecking.SizedTypes (compareSizes) import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Free import Agda.TypeChecking.Free.Reduce import Agda.TypeChecking.Records import Agda.TypeChecking.MetaVars (assignV, newArgsMetaCtx) import Agda.TypeChecking.EtaContract import Agda.Interaction.Options (optInjectiveTypeConstructors) import Agda.TypeChecking.Rules.LHS.Problem -- import Agda.TypeChecking.SyntacticEquality import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Either import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.ListT import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Singleton import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Result of 'unifyIndices'. type UnificationResult = UnificationResult' ( Telescope -- @tel@ , PatternSubstitution -- @sigma@ s.t. @tel ⊢ sigma : varTel@ , [NamedArg DeBruijnPattern] -- @ps@ s.t. @tel ⊢ ps : eqTel @ ) data UnificationResult' a = Unifies a -- ^ Unification succeeded. | NoUnify NegativeUnification -- ^ Terms are not unifiable. | DontKnow [UnificationFailure] -- ^ Some other error happened, unification got stuck. deriving (Show, Functor, Foldable, Traversable) -- | Unify indices. -- -- In @unifyIndices gamma flex us vs@, -- -- @us@ and @vs@ are the argument lists to unify, -- -- @gamma@ is the telescope of free variables in @us@ and @vs@. -- -- @flex@ is the set of flexible (instantiable) variabes in @us@ and @vs@. -- -- The result is the most general unifier of @us@ and @vs@. unifyIndices :: MonadTCM tcm => Telescope -> FlexibleVars -> Type -> Args -> Args -> tcm UnificationResult unifyIndices tel flex a [] [] = return $ Unifies (tel, idS, []) unifyIndices tel flex a us vs = liftTCM $ Bench.billTo [Bench.Typing, Bench.CheckLHS, Bench.UnifyIndices] $ do reportSDoc "tc.lhs.unify" 10 $ sep [ "unifyIndices" , nest 2 $ prettyTCM tel , nest 2 $ addContext tel $ text $ show $ map flexVar flex , nest 2 $ addContext tel $ parens (prettyTCM a) , nest 2 $ addContext tel $ prettyList $ map prettyTCM us , nest 2 $ addContext tel $ prettyList $ map prettyTCM vs ] initialState <- initUnifyState tel flex a us vs reportSDoc "tc.lhs.unify" 20 $ "initial unifyState:" <+> prettyTCM initialState reportSDoc "tc.lhs.unify" 70 $ "initial unifyState:" <+> text (show initialState) (result,output) <- runUnifyM $ unify initialState rightToLeftStrategy let ps = applySubst (unifyProof output) $ teleNamedArgs (eqTel initialState) return $ fmap (\s -> (varTel s , unifySubst output , ps)) result ---------------------------------------------------- -- Equalities ---------------------------------------------------- data Equality = Equal { eqType :: Dom Type , eqLeft :: Term , eqRight :: Term } instance Reduce Equality where reduce' (Equal a u v) = Equal <$> reduce' a <*> reduce' u <*> reduce' v eqConstructorForm :: Equality -> TCM Equality eqConstructorForm (Equal a u v) = Equal a <$> constructorForm u <*> constructorForm v eqUnLevel :: Equality -> TCM Equality eqUnLevel (Equal a u v) = Equal a <$> unLevel u <*> unLevel v where unLevel (Level l) = reallyUnLevelView l unLevel u = return u ---------------------------------------------------- -- Unify state ---------------------------------------------------- data UnifyState = UState { varTel :: Telescope , flexVars :: FlexibleVars , eqTel :: Telescope , eqLHS :: [Arg Term] , eqRHS :: [Arg Term] } deriving (Show) lensVarTel :: Lens' Telescope UnifyState lensVarTel f s = f (varTel s) <&> \ tel -> s { varTel = tel } lensFlexVars :: Lens' FlexibleVars UnifyState lensFlexVars f s = f (flexVars s) <&> \ flex -> s { flexVars = flex } lensEqTel :: Lens' Telescope UnifyState lensEqTel f s = f (eqTel s) <&> \ x -> s { eqTel = x } lensEqLHS :: Lens' Args UnifyState lensEqLHS f s = f (eqLHS s) <&> \ x -> s { eqLHS = x } lensEqRHS :: Lens' Args UnifyState lensEqRHS f s = f (eqRHS s) <&> \ x -> s { eqRHS = x } instance Reduce UnifyState where reduce' (UState var flex eq lhs rhs) = UState <$> reduce' var <*> pure flex <*> reduce' eq <*> reduce' lhs <*> reduce' rhs reduceEqTel :: UnifyState -> TCM UnifyState reduceEqTel = lensEqTel reduce instance Normalise UnifyState where normalise' (UState var flex eq lhs rhs) = UState <$> normalise' var <*> pure flex <*> normalise' eq <*> normalise' lhs <*> normalise' rhs instance PrettyTCM UnifyState where prettyTCM state = "UnifyState" $$ nest 2 (vcat $ [ "variable tel: " <+> prettyTCM gamma , "flexible vars: " <+> prettyTCM (map flexVar $ flexVars state) , "equation tel: " <+> addContext gamma (prettyTCM delta) , "equations: " <+> addContext gamma (prettyList_ (zipWith prettyEquality (eqLHS state) (eqRHS state))) ]) where gamma = varTel state delta = eqTel state prettyEquality x y = prettyTCM x <+> "=?=" <+> prettyTCM y initUnifyState :: Telescope -> FlexibleVars -> Type -> Args -> Args -> TCM UnifyState initUnifyState tel flex a lhs rhs = do let n = size lhs unless (n == size rhs) __IMPOSSIBLE__ TelV eqTel _ <- telView a unless (n == size eqTel) __IMPOSSIBLE__ return $ UState tel flex eqTel lhs rhs -- Andreas, 2019-02-23, issue #3578: do not eagerly reduce -- reduce $ UState tel flex eqTel lhs rhs isUnifyStateSolved :: UnifyState -> Bool isUnifyStateSolved = null . eqTel varCount :: UnifyState -> Int varCount = size . varTel -- | Get the type of the i'th variable in the given state getVarType :: Int -> UnifyState -> Dom Type getVarType i s = indexWithDefault __IMPOSSIBLE__ (flattenTel $ varTel s) i getVarTypeUnraised :: Int -> UnifyState -> Dom Type getVarTypeUnraised i s = snd <$> indexWithDefault __IMPOSSIBLE__ (telToList $ varTel s) i eqCount :: UnifyState -> Int eqCount = size . eqTel -- | Get the k'th equality in the given state. The left- and right-hand sides -- of the equality live in the varTel telescope, and the type of the equality -- lives in the varTel++eqTel telescope getEquality :: Int -> UnifyState -> Equality getEquality k UState { eqTel = eqs, eqLHS = lhs, eqRHS = rhs } = Equal (indexWithDefault __IMPOSSIBLE__ (flattenTel eqs) k) (unArg $ indexWithDefault __IMPOSSIBLE__ lhs k) (unArg $ indexWithDefault __IMPOSSIBLE__ rhs k) -- | As getEquality, but with the unraised type getEqualityUnraised :: Int -> UnifyState -> Equality getEqualityUnraised k UState { eqTel = eqs, eqLHS = lhs, eqRHS = rhs } = Equal (snd <$> indexWithDefault __IMPOSSIBLE__ (telToList eqs) k) (unArg $ indexWithDefault __IMPOSSIBLE__ lhs k) (unArg $ indexWithDefault __IMPOSSIBLE__ rhs k) getEqInfo :: Int -> UnifyState -> ArgInfo getEqInfo k UState { eqTel = eqs } = domInfo $ indexWithDefault __IMPOSSIBLE__ (telToList eqs) k -- | Add a list of equations to the front of the equation telescope addEqs :: Telescope -> [Arg Term] -> [Arg Term] -> UnifyState -> UnifyState addEqs tel us vs s = s { eqTel = tel `abstract` eqTel s , eqLHS = us ++ eqLHS s , eqRHS = vs ++ eqRHS s } where k = size tel addEq :: Type -> Arg Term -> Arg Term -> UnifyState -> UnifyState addEq a u v = addEqs (ExtendTel (defaultDom a) (Abs underscore EmptyTel)) [u] [v] -- | Instantiate the k'th variable with the given value. -- Returns Nothing if there is a cycle. solveVar :: Int -- ^ Index @k@ -> Term -- ^ Solution @u@ -> UnifyState -> Maybe (UnifyState, PatternSubstitution) solveVar k u s = case instantiateTelescope (varTel s) k u of Nothing -> Nothing Just (tel' , sigma , rho) -> Just $ (,sigma) $ UState { varTel = tel' , flexVars = permuteFlex (reverseP rho) $ flexVars s , eqTel = applyPatSubst sigma $ eqTel s , eqLHS = applyPatSubst sigma $ eqLHS s , eqRHS = applyPatSubst sigma $ eqRHS s } where permuteFlex :: Permutation -> FlexibleVars -> FlexibleVars permuteFlex perm = mapMaybe $ \(FlexibleVar h o k p x) -> FlexibleVar h o k p <$> List.findIndex (x==) (permPicks perm) applyUnder :: Int -> Telescope -> Term -> Telescope applyUnder k tel u | k < 0 = __IMPOSSIBLE__ | k == 0 = tel `apply1` u | otherwise = case tel of EmptyTel -> __IMPOSSIBLE__ ExtendTel a tel' -> ExtendTel a $ Abs (absName tel') $ applyUnder (k-1) (absBody tel') u dropAt :: Int -> [a] -> [a] dropAt _ [] = __IMPOSSIBLE__ dropAt k (x:xs) | k < 0 = __IMPOSSIBLE__ | k == 0 = xs | otherwise = x : dropAt (k-1) xs -- | Solve the k'th equation with the given value, which can depend on -- regular variables but not on other equation variables. solveEq :: Int -> Term -> UnifyState -> (UnifyState, PatternSubstitution) solveEq k u s = (,sigma) $ s { eqTel = applyUnder k (eqTel s) u' , eqLHS = dropAt k $ eqLHS s , eqRHS = dropAt k $ eqRHS s } where u' = raise k u n = eqCount s sigma = liftS (n-k-1) $ consS (dotP u') idS -- | Simplify the k'th equation with the given value (which can depend on other -- equation variables). Returns Nothing if there is a cycle. simplifyEq :: Int -> Term -> UnifyState -> Maybe (UnifyState, PatternSubstitution) simplifyEq k u s = case instantiateTelescope (eqTel s) k u of Nothing -> Nothing Just (tel' , sigma , rho) -> Just $ (,sigma) $ UState { varTel = varTel s , flexVars = flexVars s , eqTel = tel' , eqLHS = permute rho $ eqLHS s , eqRHS = permute rho $ eqRHS s } ---------------------------------------------------- -- Unification strategies ---------------------------------------------------- data UnifyStep = Deletion { deleteAt :: Int , deleteType :: Type , deleteLeft :: Term , deleteRight :: Term } | Solution { solutionAt :: Int , solutionType :: Dom Type , solutionVar :: FlexibleVar Int , solutionTerm :: Term } | Injectivity { injectAt :: Int , injectType :: Type , injectDatatype :: QName , injectParameters :: Args , injectIndices :: Args , injectConstructor :: ConHead } | Conflict { conflictAt :: Int , conflictType :: Type , conflictDatatype :: QName , conflictParameters :: Args , conflictLeft :: Term , conflictRight :: Term } | Cycle { cycleAt :: Int , cycleType :: Type , cycleDatatype :: QName , cycleParameters :: Args , cycleVar :: Int , cycleOccursIn :: Term } | EtaExpandVar { expandVar :: FlexibleVar Int , expandVarRecordType :: QName , expandVarParameters :: Args } | EtaExpandEquation { expandAt :: Int , expandRecordType :: QName , expandParameters :: Args } | LitConflict { litConflictAt :: Int , litType :: Type , litConflictLeft :: Literal , litConflictRight :: Literal } | StripSizeSuc { stripAt :: Int , stripArgLeft :: Term , stripArgRight :: Term } | SkipIrrelevantEquation { skipIrrelevantAt :: Int } | TypeConInjectivity { typeConInjectAt :: Int , typeConstructor :: QName , typeConArgsLeft :: Args , typeConArgsRight :: Args } deriving (Show) instance PrettyTCM UnifyStep where prettyTCM step = case step of Deletion k a u v -> "Deletion" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "lhs: " <+> prettyTCM u , "rhs: " <+> prettyTCM v ]) Solution k a i u -> "Solution" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "variable: " <+> text (show i) , "term: " <+> prettyTCM u ]) Injectivity k a d pars ixs c -> "Injectivity" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "datatype: " <+> prettyTCM d , "parameters: " <+> prettyList_ (map prettyTCM pars) , "indices: " <+> prettyList_ (map prettyTCM ixs) , "constructor:" <+> prettyTCM c ]) Conflict k a d pars u v -> "Conflict" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "datatype: " <+> prettyTCM d , "parameters: " <+> prettyList_ (map prettyTCM pars) , "lhs: " <+> prettyTCM u , "rhs: " <+> prettyTCM v ]) Cycle k a d pars i u -> "Cycle" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "datatype: " <+> prettyTCM d , "parameters: " <+> prettyList_ (map prettyTCM pars) , "variable: " <+> text (show i) , "term: " <+> prettyTCM u ]) EtaExpandVar fi r pars -> "EtaExpandVar" $$ nest 2 (vcat $ [ "variable: " <+> text (show fi) , "record type:" <+> prettyTCM r , "parameters: " <+> prettyTCM pars ]) EtaExpandEquation k r pars -> "EtaExpandEquation" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "record type:" <+> prettyTCM r , "parameters: " <+> prettyTCM pars ]) LitConflict k a u v -> "LitConflict" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "type: " <+> prettyTCM a , "lhs: " <+> prettyTCM u , "rhs: " <+> prettyTCM v ]) StripSizeSuc k u v -> "StripSizeSuc" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "lhs: " <+> prettyTCM u , "rhs: " <+> prettyTCM v ]) SkipIrrelevantEquation k -> "SkipIrrelevantEquation" $$ nest 2 (vcat $ [ "position: " <+> text (show k) ]) TypeConInjectivity k d us vs -> "TypeConInjectivity" $$ nest 2 (vcat $ [ "position: " <+> text (show k) , "datatype: " <+> prettyTCM d , "lhs: " <+> prettyList_ (map prettyTCM us) , "rhs: " <+> prettyList_ (map prettyTCM vs) ]) type UnifyStrategy = UnifyState -> ListT TCM UnifyStep leftToRightStrategy :: UnifyStrategy leftToRightStrategy s = msum (for [0..n-1] $ \k -> completeStrategyAt k s) where n = size $ eqTel s rightToLeftStrategy :: UnifyStrategy rightToLeftStrategy s = msum (for (downFrom n) $ \k -> completeStrategyAt k s) where n = size $ eqTel s completeStrategyAt :: Int -> UnifyStrategy completeStrategyAt k s = msum $ map (\strat -> strat k s) $ [ skipIrrelevantStrategy , basicUnifyStrategy , literalStrategy , dataStrategy , etaExpandVarStrategy , etaExpandEquationStrategy , injectiveTypeConStrategy , injectivePragmaStrategy , simplifySizesStrategy , checkEqualityStrategy ] -- | @isHom n x@ returns x lowered by n if the variables 0..n-1 don't occur in x. -- -- This is naturally sensitive to normalization. isHom :: (Free a, Subst Term a) => Int -> a -> Maybe a isHom n x = do guard $ getAll $ runFree (All . (>= n)) IgnoreNot x return $ raise (-n) x findFlexible :: Int -> FlexibleVars -> Maybe (FlexibleVar Nat) findFlexible i flex = let flex' = map flexVar flex flexible i = i `elem` flex' in List.find ((i ==) . flexVar) flex basicUnifyStrategy :: Int -> UnifyStrategy basicUnifyStrategy k s = do Equal dom@Dom{unDom = a} u v <- liftTCM $ eqUnLevel (getEquality k s) -- Andreas, 2019-02-23: reduce equality for the sake of isHom? ha <- fromMaybeMP $ isHom n a (mi, mj) <- liftTCM $ addContext (varTel s) $ (,) <$> isEtaVar u ha <*> isEtaVar v ha liftTCM $ reportSDoc "tc.lhs.unify" 30 $ "isEtaVar results: " <+> text (show [mi,mj]) case (mi, mj) of (Just i, Just j) | i == j -> mzero -- Taken care of by checkEqualityStrategy (Just i, Just j) | Just fi <- findFlexible i flex , Just fj <- findFlexible j flex -> do let choice = chooseFlex fi fj firstTryLeft = msum [ return (Solution k dom{unDom = ha} fi v) , return (Solution k dom{unDom = ha} fj u)] firstTryRight = msum [ return (Solution k dom{unDom = ha} fj u) , return (Solution k dom{unDom = ha} fi v)] liftTCM $ reportSDoc "tc.lhs.unify" 40 $ "fi = " <+> text (show fi) liftTCM $ reportSDoc "tc.lhs.unify" 40 $ "fj = " <+> text (show fj) liftTCM $ reportSDoc "tc.lhs.unify" 40 $ "chooseFlex: " <+> text (show choice) case choice of ChooseLeft -> firstTryLeft ChooseRight -> firstTryRight ExpandBoth -> mzero -- This should be taken care of by etaExpandEquationStrategy ChooseEither -> firstTryRight (Just i, _) | Just fi <- findFlexible i flex -> return $ Solution k dom{unDom = ha} fi v (_, Just j) | Just fj <- findFlexible j flex -> return $ Solution k dom{unDom = ha} fj u _ -> mzero where flex = flexVars s n = eqCount s dataStrategy :: Int -> UnifyStrategy dataStrategy k s = do Equal Dom{unDom = a} u v <- liftTCM $ eqConstructorForm =<< eqUnLevel =<< reduce (getEqualityUnraised k s) case unEl a of Def d es | Type{} <- getSort a -> do npars <- catMaybesMP $ liftTCM $ getNumberOfParameters d let (pars,ixs) = splitAt npars $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es hpars <- fromMaybeMP $ isHom k pars liftTCM $ reportSDoc "tc.lhs.unify" 40 $ addContext (varTel s) $ "Found equation at datatype " <+> prettyTCM d <+> " with (homogeneous) parameters " <+> prettyTCM hpars case (u, v) of (Con c _ _ , Con c' _ _ ) | c == c' -> return $ Injectivity k a d hpars ixs c (Con c _ _ , Con c' _ _ ) -> return $ Conflict k a d hpars u v (Var i [] , v ) -> ifOccursStronglyRigid i v $ return $ Cycle k a d hpars i v (u , Var j [] ) -> ifOccursStronglyRigid j u $ return $ Cycle k a d hpars j u _ -> mzero _ -> mzero where ifOccursStronglyRigid i u ret = do -- Call forceNotFree to reduce u as far as possible -- around any occurrences of i (_ , u) <- liftTCM $ forceNotFree (singleton i) u case occurrence i u of StronglyRigid -> ret _ -> mzero checkEqualityStrategy :: Int -> UnifyStrategy checkEqualityStrategy k s = do let Equal Dom{unDom = a} u v = getEquality k s n = eqCount s ha <- fromMaybeMP $ isHom n a return $ Deletion k ha u v literalStrategy :: Int -> UnifyStrategy literalStrategy k s = do let n = eqCount s Equal Dom{unDom = a} u v <- liftTCM $ eqUnLevel $ getEquality k s ha <- fromMaybeMP $ isHom n a case (u , v) of (Lit l1 , Lit l2) | l1 == l2 -> return $ Deletion k ha u v | otherwise -> return $ LitConflict k ha l1 l2 _ -> mzero etaExpandVarStrategy :: Int -> UnifyStrategy etaExpandVarStrategy k s = do Equal Dom{unDom = a} u v <- liftTCM $ eqUnLevel <=< reduce $ getEquality k s shouldEtaExpand u v a s `mplus` shouldEtaExpand v u a s where -- TODO: use IsEtaVar to check if the term is a variable shouldEtaExpand :: Term -> Term -> Type -> UnifyStrategy shouldEtaExpand (Var i es) v a s = do fi <- fromMaybeMP $ findFlexible i (flexVars s) liftTCM $ reportSDoc "tc.lhs.unify" 50 $ "Found flexible variable " <+> text (show i) -- Issue 2888: Do this if there are projections or if it's a singleton -- record or if it's unified against a record constructor term. Basically -- we need to avoid EtaExpandEquation if EtaExpandVar is possible, or the -- forcing translation is unhappy. b <- reduce $ unDom $ getVarTypeUnraised (varCount s - 1 - i) s (d, pars) <- catMaybesMP $ liftTCM $ isEtaRecordType b ps <- fromMaybeMP $ allProjElims es sing <- liftTCM $ (Right True ==) <$> isSingletonRecord d pars con <- liftTCM $ isRecCon v -- is the other term a record constructor? guard $ not (null ps) || sing || con liftTCM $ reportSDoc "tc.lhs.unify" 50 $ "with projections " <+> prettyTCM (map snd ps) liftTCM $ reportSDoc "tc.lhs.unify" 50 $ "at record type " <+> prettyTCM d return $ EtaExpandVar fi d pars shouldEtaExpand _ _ _ _ = mzero isRecCon (Con c _ _) = isJust <$> isRecordConstructor (conName c) isRecCon _ = return False etaExpandEquationStrategy :: Int -> UnifyStrategy etaExpandEquationStrategy k s = do -- Andreas, 2019-02-23, re #3578, is the following reduce redundant? Equal Dom{unDom = a} u v <- reduce $ getEqualityUnraised k s (d, pars) <- catMaybesMP $ liftTCM $ addContext tel $ isEtaRecordType a sing <- liftTCM $ (Right True ==) <$> isSingletonRecord d pars projLeft <- liftTCM $ shouldProject u projRight <- liftTCM $ shouldProject v guard $ sing || projLeft || projRight return $ EtaExpandEquation k d pars where shouldProject :: Term -> TCM Bool shouldProject u = case u of Def f es -> usesCopatterns f Con c _ _ -> isJust <$> isRecordConstructor (conName c) Var _ _ -> return False Lam _ _ -> __IMPOSSIBLE__ Lit _ -> __IMPOSSIBLE__ Pi _ _ -> __IMPOSSIBLE__ Sort _ -> __IMPOSSIBLE__ Level _ -> __IMPOSSIBLE__ MetaV _ _ -> return False DontCare _ -> return False Dummy s -> __IMPOSSIBLE_VERBOSE__ s tel = varTel s `abstract` telFromList (take k $ telToList $ eqTel s) simplifySizesStrategy :: Int -> UnifyStrategy simplifySizesStrategy k s = do isSizeName <- liftTCM isSizeNameTest Equal Dom{unDom = a} u v <- reduce $ getEquality k s case unEl a of Def d _ -> do guard $ isSizeName d su <- liftTCM $ sizeView u sv <- liftTCM $ sizeView v case (su, sv) of (SizeSuc u, SizeSuc v) -> return $ StripSizeSuc k u v (SizeSuc u, SizeInf ) -> return $ StripSizeSuc k u v (SizeInf , SizeSuc v) -> return $ StripSizeSuc k u v _ -> mzero _ -> mzero injectiveTypeConStrategy :: Int -> UnifyStrategy injectiveTypeConStrategy k s = do injTyCon <- liftTCM $ optInjectiveTypeConstructors <$> pragmaOptions guard injTyCon eq <- liftTCM $ eqUnLevel <=< reduce $ getEquality k s case eq of Equal a u@(Def d es) v@(Def d' es') | d == d' -> do -- d must be a data, record or axiom def <- liftTCM $ getConstInfo d guard $ case theDef def of Datatype{} -> True Record{} -> True Axiom{} -> True DataOrRecSig{} -> True AbstractDefn{} -> False -- True triggers issue #2250 Function{} -> False Primitive{} -> False GeneralizableVar{} -> __IMPOSSIBLE__ Constructor{} -> __IMPOSSIBLE__ -- Never a type! let us = fromMaybe __IMPOSSIBLE__ $ allApplyElims es vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es' return $ TypeConInjectivity k d us vs _ -> mzero injectivePragmaStrategy :: Int -> UnifyStrategy injectivePragmaStrategy k s = do eq <- liftTCM $ eqUnLevel <=< reduce $ getEquality k s case eq of Equal a u@(Def d es) v@(Def d' es') | d == d' -> do -- d must have an injective pragma def <- liftTCM $ getConstInfo d guard $ defInjective def let us = fromMaybe __IMPOSSIBLE__ $ allApplyElims es vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es' return $ TypeConInjectivity k d us vs _ -> mzero skipIrrelevantStrategy :: Int -> UnifyStrategy skipIrrelevantStrategy k s = do let Equal a _ _ = getEquality k s -- reduce not necessary guard =<< isIrrelevantOrPropM a -- reduction takes place here return $ SkipIrrelevantEquation k ---------------------------------------------------- -- Actually doing the unification ---------------------------------------------------- data UnifyLogEntry = UnificationDone UnifyState | UnificationStep UnifyState UnifyStep type UnifyLog = [UnifyLogEntry] data UnifyOutput = UnifyOutput { unifySubst :: PatternSubstitution , unifyProof :: PatternSubstitution , unifyLog :: UnifyLog } instance Semigroup UnifyOutput where x <> y = UnifyOutput { unifySubst = unifySubst y `composeS` unifySubst x , unifyProof = unifyProof y `composeS` unifyProof x , unifyLog = unifyLog x ++ unifyLog y } instance Monoid UnifyOutput where mempty = UnifyOutput IdS IdS [] mappend = (<>) type UnifyM a = WriterT UnifyOutput TCM a tellUnifySubst :: PatternSubstitution -> UnifyM () tellUnifySubst sub = tell $ UnifyOutput sub IdS [] tellUnifyProof :: PatternSubstitution -> UnifyM () tellUnifyProof sub = tell $ UnifyOutput IdS sub [] writeUnifyLog :: UnifyLogEntry -> UnifyM () writeUnifyLog x = tell $ UnifyOutput IdS IdS [x] runUnifyM :: UnifyM a -> TCM (a,UnifyOutput) runUnifyM = runWriterT unifyStep :: UnifyState -> UnifyStep -> UnifyM (UnificationResult' UnifyState) unifyStep s Deletion{ deleteAt = k , deleteType = a , deleteLeft = u , deleteRight = v } = do -- Check definitional equality of u and v isReflexive <- liftTCM $ addContext (varTel s) $ do dontAssignMetas $ noConstraints $ equalTerm a u v return Nothing `catchError` \err -> return $ Just err withoutK <- liftTCM withoutKOption case isReflexive of Just err -> return $ DontKnow [] _ | withoutK -> return $ DontKnow [UnifyReflexiveEq (varTel s) a u] _ -> do let (s', sigma) = solveEq k u s tellUnifyProof sigma Unifies <$> liftTCM (lensEqTel reduce s') unifyStep s Solution{ solutionAt = k , solutionType = dom@Dom{ unDom = a } , solutionVar = fi@FlexibleVar{ flexVar = i } , solutionTerm = u } = do let m = varCount s -- Check that the type of the variable is equal to the type of the equation -- (not just a subtype), otherwise we cannot instantiate (see Issue 2407). let dom'@Dom{ unDom = a' } = getVarType (m-1-i) s equalTypes <- liftTCM $ addContext (varTel s) $ do reportSDoc "tc.lhs.unify" 45 $ "Equation type: " <+> prettyTCM a reportSDoc "tc.lhs.unify" 45 $ "Variable type: " <+> prettyTCM a' dontAssignMetas $ noConstraints $ equalType a a' return Nothing `catchError` \err -> return $ Just err -- The conditions on the relevances are as follows (see #2640): -- - If the type of the equation is relevant, then the solution must be -- usable in a relevant position. -- - If the type of the equation is (shape-)irrelevant, then the solution -- must be usable in a μ-relevant position where μ is the relevance -- of the variable being solved. -- -- Jesper, Andreas, 2018-10-17: the quantity of the equation is morally -- always @Quantity0@, since the indices of the data type are runtime erased. -- This, we need not change the quantity of the solution. let eqrel = getRelevance dom varmod = getModality dom' mod = applyUnless (NonStrict `moreRelevant` eqrel) (setRelevance eqrel) $ varmod reportSDoc "tc.lhs.unify" 65 $ text $ "Equation modality: " ++ show (getModality dom) reportSDoc "tc.lhs.unify" 65 $ text $ "Variable modality: " ++ show varmod reportSDoc "tc.lhs.unify" 65 $ text $ "Solution must be usable in a " ++ show mod ++ " position." -- Andreas, 2018-10-18 -- Currently, the modality check that would correspond to the -- relevance check has problems with meta-variables created in the type signature, -- and thus, in quantity 0, that get into terms using the unifier, -- and there are checked to be non-erased, i.e., have quantity ω. -- Thus, at the moment wo only check relevances, being aware -- that uses of the 0-quantity might create segfaults in the compiled program -- situations analogous to #2640 (issue with projecting forced constructor fields). -- -- usable <- liftTCM $ addContext (varTel s) $ usableMod mod u -- TODO usable <- liftTCM $ addContext (varTel s) $ usableRel (getRelevance mod) u reportSDoc "tc.lhs.unify" 45 $ "Modality ok: " <+> prettyTCM usable unless usable $ reportSLn "tc.lhs.unify" 65 $ "Rejected solution: " ++ show u case equalTypes of Just err -> return $ DontKnow [] Nothing | usable -> caseMaybeM (trySolveVar (m-1-i) u s) -- Case: Nothing (return $ DontKnow [UnifyRecursiveEq (varTel s) a i u]) -- Case: Just $ \ (s', sub) -> do tellUnifySubst sub let (s'', sigma) = solveEq k (applyPatSubst sub u) s' tellUnifyProof sigma return $ Unifies s'' -- Andreas, 2019-02-23, issue #3578: do not eagerly reduce -- Unifies <$> liftTCM (reduce s'') Nothing -> return $ DontKnow [] where trySolveVar i u s = case solveVar i u s of Just x -> return $ Just x Nothing -> do u <- liftTCM $ normalise u s <- liftTCM $ lensVarTel normalise s return $ solveVar i u s unifyStep s (Injectivity k a d pars ixs c) = do ifM (liftTCM $ consOfHIT $ conName c) (return $ DontKnow []) $ do withoutK <- liftTCM withoutKOption let n = eqCount s -- Get constructor telescope and target indices ctype <- (`piApply` pars) . defType <$> liftTCM (getConInfo c) addContext (varTel s) $ reportSDoc "tc.lhs.unify" 40 $ "Constructor type: " <+> prettyTCM ctype TelV ctel ctarget <- liftTCM $ telView ctype let cixs = case unEl ctarget of Def d' es | d == d' -> let args = fromMaybe __IMPOSSIBLE__ $ allApplyElims es in drop (length pars) args _ -> __IMPOSSIBLE__ -- Get index telescope of the datatype dtype <- (`piApply` pars) . defType <$> liftTCM (getConstInfo d) addContext (varTel s) $ reportSDoc "tc.lhs.unify" 40 $ "Datatype type: " <+> prettyTCM dtype -- Split equation telescope into parts before and after current equation let (eqListTel1, _ : eqListTel2) = splitAt k $ telToList $ eqTel s (eqTel1, eqTel2) = (telFromList eqListTel1, telFromList eqListTel2) -- This is where the magic of higher-dimensional unification happens -- We need to generalize the indices `ixs` to the target indices of the -- constructor `cixs`. This is done by calling the unification algorithm -- recursively (this doesn't get stuck in a loop because a type should -- never be indexed over itself). Note the similarity with the -- computeNeighbourhood function in Agda.TypeChecking.Coverage. let hduTel = eqTel1 `abstract` raise (size eqTel1) ctel res <- liftTCM $ addContext (varTel s) $ unifyIndices hduTel (allFlexVars hduTel) (raise (size hduTel) dtype) (raise (size ctel) ixs) (raiseFrom (size ctel) (size eqTel1) cixs) case res of -- Higher-dimensional unification can never end in a conflict, -- because `cong c1 ...` and `cong c2 ...` don't even have the -- same type for distinct constructors c1 and c2. NoUnify _ -> __IMPOSSIBLE__ -- Higher-dimensional unification has failed. If not --without-K, -- we can simply ignore the higher-dimensional equations and -- simplify the equation as in the non-indexed case. DontKnow _ | not withoutK -> do -- using the same variable names as in the case where hdu succeeds. let eqTel1' = eqTel1 `abstract` raise (size eqTel1) ctel rho1 = raiseS (size ctel) ceq = ConP c noConPatternInfo $ teleNamedArgs ctel rho3 = consS ceq rho1 eqTel2' = applyPatSubst rho3 eqTel2 eqTel' = eqTel1' `abstract` eqTel2' rho = liftS (size eqTel2) rho3 tellUnifyProof rho eqTel' <- liftTCM $ reduce eqTel' -- Compute new lhs and rhs by matching the old ones against rho (lhs', rhs') <- liftTCM . reduce =<< do let ps = applySubst rho $ teleNamedArgs $ eqTel s (lhsMatch, _) <- liftTCM $ runReduceM $ Match.matchPatterns ps $ eqLHS s (rhsMatch, _) <- liftTCM $ runReduceM $ Match.matchPatterns ps $ eqRHS s case (lhsMatch, rhsMatch) of (Match.Yes _ lhs', Match.Yes _ rhs') -> return (reverse $ Match.matchedArgs __IMPOSSIBLE__ (size eqTel') lhs', reverse $ Match.matchedArgs __IMPOSSIBLE__ (size eqTel') rhs') _ -> __IMPOSSIBLE__ return $ Unifies $ s { eqTel = eqTel' , eqLHS = lhs' , eqRHS = rhs' } DontKnow _ -> let n = eqCount s Equal Dom{unDom = a} u v = getEquality k s in return $ DontKnow [UnifyIndicesNotVars (varTel s `abstract` eqTel s) a (raise n u) (raise n v) (raise (n-k) ixs)] Unifies (eqTel1', rho0, _) -> do -- Split ps0 into parts for eqTel1 and ctel let (rho1, rho2) = splitS (size ctel) rho0 -- Compute new equation telescope context and substitution let ceq = ConP c noConPatternInfo $ applySubst rho2 $ teleNamedArgs ctel rho3 = consS ceq rho1 eqTel2' = applyPatSubst rho3 eqTel2 eqTel' = eqTel1' `abstract` eqTel2' rho = liftS (size eqTel2) rho3 tellUnifyProof rho eqTel' <- liftTCM $ reduce eqTel' -- Compute new lhs and rhs by matching the old ones against rho (lhs', rhs') <- liftTCM . reduce =<< do let ps = applySubst rho $ teleNamedArgs $ eqTel s (lhsMatch, _) <- liftTCM $ runReduceM $ Match.matchPatterns ps $ eqLHS s (rhsMatch, _) <- liftTCM $ runReduceM $ Match.matchPatterns ps $ eqRHS s case (lhsMatch, rhsMatch) of (Match.Yes _ lhs', Match.Yes _ rhs') -> return (reverse $ Match.matchedArgs __IMPOSSIBLE__ (size eqTel') lhs', reverse $ Match.matchedArgs __IMPOSSIBLE__ (size eqTel') rhs') _ -> __IMPOSSIBLE__ return $ Unifies $ s { eqTel = eqTel' , eqLHS = lhs' , eqRHS = rhs' } unifyStep s Conflict { conflictLeft = u , conflictRight = v } = case u of Con h _ _ -> do ifM (liftTCM $ consOfHIT $ conName h) (return $ DontKnow []) $ do return $ NoUnify $ UnifyConflict (varTel s) u v _ -> __IMPOSSIBLE__ unifyStep s Cycle { cycleVar = i , cycleOccursIn = u } = case u of Con h _ _ -> do ifM (liftTCM $ consOfHIT $ conName h) (return $ DontKnow []) $ do return $ NoUnify $ UnifyCycle (varTel s) i u _ -> __IMPOSSIBLE__ unifyStep s EtaExpandVar{ expandVar = fi, expandVarRecordType = d , expandVarParameters = pars } = do delta <- liftTCM $ (`apply` pars) <$> getRecordFieldTypes d c <- liftTCM $ getRecordConstructor d let nfields = size delta (varTel', rho) = expandTelescopeVar (varTel s) (m-1-i) delta c projectFlexible = [ FlexibleVar (flexHiding fi) (flexOrigin fi) (projFlexKind j) (flexPos fi) (i+j) | j <- [0..nfields-1] ] tellUnifySubst $ rho Unifies <$> liftTCM (reduce $ UState { varTel = varTel' , flexVars = projectFlexible ++ liftFlexibles nfields (flexVars s) , eqTel = applyPatSubst rho $ eqTel s , eqLHS = applyPatSubst rho $ eqLHS s , eqRHS = applyPatSubst rho $ eqRHS s }) where i = flexVar fi m = varCount s n = eqCount s projFlexKind :: Int -> FlexibleVarKind projFlexKind j = case flexKind fi of RecordFlex ks -> indexWithDefault ImplicitFlex ks j ImplicitFlex -> ImplicitFlex DotFlex -> DotFlex OtherFlex -> OtherFlex liftFlexible :: Int -> Int -> Maybe Int liftFlexible n j = if j == i then Nothing else Just (if j > i then j + (n-1) else j) liftFlexibles :: Int -> FlexibleVars -> FlexibleVars liftFlexibles n fs = mapMaybe (traverse $ liftFlexible n) fs unifyStep s EtaExpandEquation{ expandAt = k, expandRecordType = d, expandParameters = pars } = do delta <- liftTCM $ (`apply` pars) <$> getRecordFieldTypes d c <- liftTCM $ getRecordConstructor d lhs <- expandKth $ eqLHS s rhs <- expandKth $ eqRHS s let (tel, sigma) = expandTelescopeVar (eqTel s) k delta c tellUnifyProof sigma Unifies <$> liftTCM (lensEqTel reduce $ s { eqTel = tel , eqLHS = lhs , eqRHS = rhs }) where expandKth us = do let (us1,v:us2) = fromMaybe __IMPOSSIBLE__ $ splitExactlyAt k us vs <- liftTCM $ snd <$> etaExpandRecord d pars (unArg v) vs <- liftTCM $ reduce vs return $ us1 ++ vs ++ us2 unifyStep s LitConflict { litType = a , litConflictLeft = l , litConflictRight = l' } = return $ NoUnify $ UnifyConflict (varTel s) (Lit l) (Lit l') unifyStep s (StripSizeSuc k u v) = do sizeTy <- liftTCM sizeType sizeSu <- liftTCM $ sizeSuc 1 (var 0) let n = eqCount s sub = liftS (n-k-1) $ consS sizeSu $ raiseS 1 eqFlatTel = flattenTel $ eqTel s eqFlatTel' = applySubst sub $ updateAt k (fmap $ const sizeTy) $ eqFlatTel eqTel' = unflattenTel (teleNames $ eqTel s) eqFlatTel' -- TODO: tellUnifyProof sub -- but sizeSu is not a constructor, so sub is not a PatternSubstitution! return $ Unifies $ s { eqTel = eqTel' , eqLHS = updateAt k (const $ defaultArg u) $ eqLHS s , eqRHS = updateAt k (const $ defaultArg v) $ eqRHS s } unifyStep s (SkipIrrelevantEquation k) = do let lhs = eqLHS s (s', sigma) = -- newline because of CPP solveEq k (DontCare $ unArg $ indexWithDefault __IMPOSSIBLE__ lhs k) s tellUnifyProof sigma return $ Unifies s' unifyStep s (TypeConInjectivity k d us vs) = do dtype <- defType <$> liftTCM (getConstInfo d) TelV dtel _ <- liftTCM $ telView dtype let n = eqCount s m = size dtel deq = Def d $ map Apply $ teleArgs dtel -- TODO: tellUnifyProof ??? -- but d is not a constructor... Unifies <$> liftTCM (lensEqTel reduce $ s { eqTel = dtel `abstract` applyUnder k (eqTel s) (raise k deq) , eqLHS = us ++ dropAt k (eqLHS s) , eqRHS = vs ++ dropAt k (eqRHS s) }) unify :: UnifyState -> UnifyStrategy -> UnifyM (UnificationResult' UnifyState) unify s strategy = if isUnifyStateSolved s then return $ Unifies s else tryUnifyStepsAndContinue (strategy s) where tryUnifyStepsAndContinue :: ListT TCM UnifyStep -> UnifyM (UnificationResult' UnifyState) tryUnifyStepsAndContinue steps = do x <- foldListT tryUnifyStep failure $ liftListT lift steps case x of Unifies s' -> unify s' strategy NoUnify err -> return $ NoUnify err DontKnow err -> return $ DontKnow err tryUnifyStep :: UnifyStep -> UnifyM (UnificationResult' UnifyState) -> UnifyM (UnificationResult' UnifyState) tryUnifyStep step fallback = do addContext (varTel s) $ reportSDoc "tc.lhs.unify" 20 $ "trying unifyStep" <+> prettyTCM step x <- unifyStep s step case x of Unifies s' -> do reportSDoc "tc.lhs.unify" 20 $ "unifyStep successful." reportSDoc "tc.lhs.unify" 20 $ "new unifyState:" <+> prettyTCM s' writeUnifyLog $ UnificationStep s step return x NoUnify{} -> return x DontKnow err1 -> do y <- fallback case y of DontKnow err2 -> return $ DontKnow $ err1 ++ err2 _ -> return y failure :: UnifyM (UnificationResult' a) failure = return $ DontKnow [] Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/LHS/Problem.hs0000644000000000000000000002374513466402171021335 0ustar0000000000000000-- {-# LANGUAGE CPP #-} module Agda.TypeChecking.Rules.LHS.Problem ( FlexibleVars , FlexibleVarKind(..) , FlexibleVar(..) , allFlexVars , FlexChoice(..) , ChooseFlex(..) , ProblemEq(..) , Problem(..) , problemEqs , problemRestPats, problemCont, problemInPats , AsBinding(..) , DotPattern(..) , AbsurdPattern(..) , LHSState(..) , lhsTel , lhsOutPat , lhsProblem , lhsTarget ) where import Prelude hiding (null) import Control.Applicative hiding (empty) import Data.Foldable ( Foldable ) import Data.Maybe ( fromMaybe ) import Data.Monoid ( Monoid, mempty, mappend, mconcat ) import Data.Semigroup ( Semigroup, (<>) ) import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Info import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Abstract (ProblemEq(..)) import qualified Agda.Syntax.Abstract as A import Agda.TypeChecking.Monad (TCM) import Agda.TypeChecking.Substitute import Agda.TypeChecking.Reduce import qualified Agda.TypeChecking.Pretty as P import Agda.TypeChecking.Pretty hiding ((<>)) import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Size import qualified Agda.Utils.Pretty as PP type FlexibleVars = [FlexibleVar Nat] -- | When we encounter a flexible variable in the unifier, where did it come from? -- The alternatives are ordered such that we will assign the higher one first, -- i.e., first we try to assign a @DotFlex@, then... data FlexibleVarKind = RecordFlex [FlexibleVarKind] -- ^ From a record pattern ('ConP'). -- Saves the 'FlexibleVarKind' of its subpatterns. | ImplicitFlex -- ^ From a hidden formal argument or underscore ('WildP'). | DotFlex -- ^ From a dot pattern ('DotP'). | OtherFlex -- ^ From a non-record constructor or literal ('ConP' or 'LitP'). deriving (Eq, Show) -- | Flexible variables are equipped with information where they come from, -- in order to make a choice which one to assign when two flexibles are unified. data FlexibleVar a = FlexibleVar { flexHiding :: Hiding , flexOrigin :: Origin , flexKind :: FlexibleVarKind , flexPos :: Maybe Int , flexVar :: a } deriving (Eq, Show, Functor, Foldable, Traversable) instance LensHiding (FlexibleVar a) where getHiding = flexHiding mapHiding f x = x { flexHiding = f (flexHiding x) } instance LensOrigin (FlexibleVar a) where getOrigin = flexOrigin mapOrigin f x = x { flexOrigin = f (flexOrigin x) } -- UNUSED -- defaultFlexibleVar :: a -> FlexibleVar a -- defaultFlexibleVar a = FlexibleVar Hidden Inserted ImplicitFlex Nothing a -- UNUSED -- flexibleVarFromHiding :: Hiding -> a -> FlexibleVar a -- flexibleVarFromHiding h a = FlexibleVar h ImplicitFlex Nothing a allFlexVars :: Telescope -> FlexibleVars allFlexVars tel = zipWith makeFlex (downFrom $ size tel) $ telToList tel where makeFlex i d = FlexibleVar (getHiding d) (getOrigin d) ImplicitFlex (Just i) i data FlexChoice = ChooseLeft | ChooseRight | ChooseEither | ExpandBoth deriving (Eq, Show) instance Semigroup FlexChoice where ExpandBoth <> _ = ExpandBoth _ <> ExpandBoth = ExpandBoth ChooseEither <> y = y x <> ChooseEither = x ChooseLeft <> ChooseRight = ExpandBoth -- If there's dot patterns on both sides, ChooseRight <> ChooseLeft = ExpandBoth -- we need to eta-expand ChooseLeft <> ChooseLeft = ChooseLeft ChooseRight <> ChooseRight = ChooseRight instance Monoid FlexChoice where mempty = ChooseEither mappend = (<>) class ChooseFlex a where chooseFlex :: a -> a -> FlexChoice instance ChooseFlex FlexibleVarKind where chooseFlex DotFlex DotFlex = ChooseEither chooseFlex DotFlex _ = ChooseLeft chooseFlex _ DotFlex = ChooseRight chooseFlex (RecordFlex xs) (RecordFlex ys) = chooseFlex xs ys chooseFlex (RecordFlex xs) y = chooseFlex xs (repeat y) chooseFlex x (RecordFlex ys) = chooseFlex (repeat x) ys chooseFlex ImplicitFlex ImplicitFlex = ChooseEither chooseFlex ImplicitFlex _ = ChooseLeft chooseFlex _ ImplicitFlex = ChooseRight chooseFlex OtherFlex OtherFlex = ChooseEither instance ChooseFlex a => ChooseFlex [a] where chooseFlex xs ys = mconcat $ zipWith chooseFlex xs ys instance ChooseFlex a => ChooseFlex (Maybe a) where chooseFlex Nothing Nothing = ChooseEither chooseFlex Nothing (Just y) = ChooseLeft chooseFlex (Just x) Nothing = ChooseRight chooseFlex (Just x) (Just y) = chooseFlex x y instance ChooseFlex Hiding where chooseFlex Hidden Hidden = ChooseEither chooseFlex Hidden _ = ChooseLeft chooseFlex _ Hidden = ChooseRight chooseFlex Instance{} Instance{} = ChooseEither chooseFlex Instance{} _ = ChooseLeft chooseFlex _ Instance{} = ChooseRight chooseFlex _ _ = ChooseEither instance ChooseFlex Origin where chooseFlex Inserted Inserted = ChooseEither chooseFlex Inserted _ = ChooseLeft chooseFlex _ Inserted = ChooseRight chooseFlex Reflected Reflected = ChooseEither chooseFlex Reflected _ = ChooseLeft chooseFlex _ Reflected = ChooseRight chooseFlex _ _ = ChooseEither instance ChooseFlex Int where chooseFlex x y = case compare x y of LT -> ChooseLeft EQ -> ChooseEither GT -> ChooseRight instance (ChooseFlex a) => ChooseFlex (FlexibleVar a) where chooseFlex (FlexibleVar h1 o1 f1 p1 i1) (FlexibleVar h2 o2 f2 p2 i2) = firstChoice [ chooseFlex f1 f2, chooseFlex o1 o2, chooseFlex h1 h2 , chooseFlex p1 p2, chooseFlex i1 i2] where firstChoice :: [FlexChoice] -> FlexChoice firstChoice [] = ChooseEither firstChoice (ChooseEither : xs) = firstChoice xs firstChoice (x : _ ) = x -- | The user patterns we still have to split on. data Problem a = Problem { _problemEqs :: [ProblemEq] -- ^ User patterns. , _problemRestPats :: [NamedArg A.Pattern] -- ^ List of user patterns which could not yet be typed. -- Example: -- @ -- f : (b : Bool) -> if b then Nat else Nat -> Nat -- f true = zero -- f false zero = zero -- f false (suc n) = n -- @ -- In this sitation, for clause 2, we construct an initial problem -- @ -- problemEqs = [false = b] -- problemRestPats = [zero] -- @ -- As we instantiate @b@ to @false@, the 'targetType' reduces to -- @Nat -> Nat@ and we can move pattern @zero@ over to @problemEqs@. , _problemCont :: LHSState a -> TCM a } deriving Show problemEqs :: Lens' [ProblemEq] (Problem a) problemEqs f p = f (_problemEqs p) <&> \x -> p {_problemEqs = x} problemRestPats :: Lens' [NamedArg A.Pattern] (Problem a) problemRestPats f p = f (_problemRestPats p) <&> \x -> p {_problemRestPats = x} problemCont :: Lens' (LHSState a -> TCM a) (Problem a) problemCont f p = f (_problemCont p) <&> \x -> p {_problemCont = x} problemInPats :: Problem a -> [A.Pattern] problemInPats = map problemInPat . (^. problemEqs) data AsBinding = AsB Name Term Type data DotPattern = Dot A.Expr Term (Dom Type) data AbsurdPattern = Absurd Range Type -- | State worked on during the main loop of checking a lhs. -- [Ulf Norell's PhD, page. 35] data LHSState a = LHSState { _lhsTel :: Telescope -- ^ The types of the pattern variables. , _lhsOutPat :: [NamedArg DeBruijnPattern] -- ^ Patterns after splitting. -- The de Bruijn indices refer to positions in the list of abstract syntax -- patterns in the problem, counted from the back (right-to-left). , _lhsProblem :: Problem a -- ^ User patterns of supposed type @delta@. , _lhsTarget :: Arg Type -- ^ Type eliminated by 'problemRestPats' in the problem. -- Can be 'Irrelevant' to indicate that we came by -- an irrelevant projection and, hence, the rhs must -- be type-checked in irrelevant mode. , _lhsPartialSplit :: ![Maybe Int] -- ^ have we splitted with a PartialFocus? } lhsTel :: Lens' Telescope (LHSState a) lhsTel f p = f (_lhsTel p) <&> \x -> p {_lhsTel = x} lhsOutPat :: Lens' [NamedArg DeBruijnPattern] (LHSState a) lhsOutPat f p = f (_lhsOutPat p) <&> \x -> p {_lhsOutPat = x} lhsProblem :: Lens' (Problem a) (LHSState a) lhsProblem f p = f (_lhsProblem p) <&> \x -> p {_lhsProblem = x} lhsTarget :: Lens' (Arg Type) (LHSState a) lhsTarget f p = f (_lhsTarget p) <&> \x -> p {_lhsTarget = x} lhsPartialSplit :: Lens' [Maybe Int] (LHSState a) lhsPartialSplit f p = f (_lhsPartialSplit p) <&> \x -> p {_lhsPartialSplit = x} instance Subst Term (Problem a) where applySubst rho (Problem eqs rps cont) = Problem (applySubst rho eqs) rps cont instance Subst Term AsBinding where applySubst rho (AsB x v a) = uncurry (AsB x) $ applySubst rho (v, a) instance Subst Term DotPattern where applySubst rho (Dot e v a) = uncurry (Dot e) $ applySubst rho (v, a) instance Subst Term AbsurdPattern where applySubst rho (Absurd r a) = Absurd r $ applySubst rho a instance PrettyTCM ProblemEq where prettyTCM (ProblemEq p v a) = sep [ prettyA p <+> "=" , nest 2 $ prettyTCM v <+> ":" , nest 2 $ prettyTCM a ] instance PrettyTCM AsBinding where prettyTCM (AsB x v a) = sep [ prettyTCM x P.<> "@" P.<> parens (prettyTCM v) , nest 2 $ ":" <+> prettyTCM a ] instance PrettyTCM DotPattern where prettyTCM (Dot e v a) = sep [ prettyA e <+> "=" , nest 2 $ prettyTCM v <+> ":" , nest 2 $ prettyTCM a ] instance PrettyTCM AbsurdPattern where prettyTCM (Absurd r a) = "() :" <+> prettyTCM a instance PP.Pretty AsBinding where pretty (AsB x v a) = PP.pretty x PP.<+> "=" PP.<+> PP.hang (PP.pretty v PP.<+> ":") 2 (PP.pretty a) instance InstantiateFull AsBinding where instantiateFull' (AsB x v a) = AsB x <$> instantiateFull' v <*> instantiateFull' a Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Builtin/0000755000000000000000000000000013466402171020346 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Builtin/Coinduction.hs0000644000000000000000000001505113466402171023162 0ustar0000000000000000-- {-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- | Handling of the INFINITY, SHARP and FLAT builtins. ------------------------------------------------------------------------ module Agda.TypeChecking.Rules.Builtin.Coinduction where import qualified Data.Map as Map import qualified Data.Set as Set import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Level import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Primitive import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.Rules.Builtin import Agda.TypeChecking.Rules.Term import Agda.Utils.Permutation -- | The type of @∞@. typeOfInf :: TCM Type typeOfInf = hPi "a" (el primLevel) $ (return . sort $ varSort 0) --> (return . sort $ varSort 0) -- | The type of @♯_@. typeOfSharp :: TCM Type typeOfSharp = hPi "a" (el primLevel) $ hPi "A" (return . sort $ varSort 0) $ (El (varSort 1) <$> varM 0) --> (El (varSort 1) <$> primInf <#> varM 1 <@> varM 0) -- | The type of @♭@. typeOfFlat :: TCM Type typeOfFlat = hPi "a" (el primLevel) $ hPi "A" (return . sort $ varSort 0) $ (El (varSort 1) <$> primInf <#> varM 1 <@> varM 0) --> (El (varSort 1) <$> varM 0) -- | Binds the INFINITY builtin, but does not change the type's -- definition. bindBuiltinInf :: ResolvedName -> TCM () bindBuiltinInf x = bindPostulatedName builtinInf x $ \inf _ -> instantiateFull =<< checkExpr (A.Def inf) =<< typeOfInf -- | Binds the SHARP builtin, and changes the definitions of INFINITY -- and SHARP. -- The following (no longer supported) definition is used: -- -- codata ∞ {a} (A : Set a) : Set a where -- ♯_ : (x : A) → ∞ A bindBuiltinSharp :: ResolvedName -> TCM () bindBuiltinSharp x = bindPostulatedName builtinSharp x $ \sharp sharpDefn -> do sharpType <- typeOfSharp TelV fieldTel _ <- telView sharpType sharpE <- instantiateFull =<< checkExpr (A.Def sharp) sharpType Def inf _ <- primInf infDefn <- getConstInfo inf addConstant (defName infDefn) $ infDefn { defPolarity = [] -- not monotone , defArgOccurrences = [Unused, StrictPos] , theDef = Record { recPars = 2 , recInduction = Just CoInductive , recClause = Nothing , recConHead = ConHead sharp CoInductive [] -- flat is added later , recNamedCon = True , recFields = [] -- flat is added later , recTel = fieldTel , recEtaEquality' = Inferred NoEta , recMutual = Just [] , recAbstr = ConcreteDef , recComp = emptyCompKit } } addConstant sharp $ sharpDefn { theDef = Constructor { conPars = 2 , conArity = 1 , conSrcCon = ConHead sharp CoInductive [] -- flat is added as field later , conData = defName infDefn , conAbstr = ConcreteDef , conInd = CoInductive , conComp = (emptyCompKit, Nothing) , conForced = [] , conErased = [] } } return sharpE -- | Binds the FLAT builtin, and changes its definition. -- The following (no longer supported) definition is used: -- -- ♭ : ∀ {a} {A : Set a} → ∞ A → A -- ♭ (♯ x) = x bindBuiltinFlat :: ResolvedName -> TCM () bindBuiltinFlat x = bindPostulatedName builtinFlat x $ \ flat flatDefn -> do flatE <- instantiateFull =<< checkExpr (A.Def flat) =<< typeOfFlat Def sharp _ <- primSharp kit <- requireLevels Def inf _ <- primInf let sharpCon = ConHead sharp CoInductive [defaultArg flat] level = El (mkType 0) $ Def (typeName kit) [] tel :: Telescope tel = ExtendTel (domH $ level) $ Abs "a" $ ExtendTel (domH $ sort $ varSort 0) $ Abs "A" $ ExtendTel (domN $ El (varSort 1) $ var 0) $ Abs "x" $ EmptyTel infA = El (varSort 2) $ Def inf [ Apply $ defaultArg $ var 1 ] cpi = noConPatternInfo { conPType = Just $ defaultArg infA , conPLazy = True } let clause = Clause { clauseLHSRange = noRange , clauseFullRange = noRange , clauseTel = tel , namedClausePats = [ argN $ Named Nothing $ ConP sharpCon cpi [ argN $ Named Nothing $ debruijnNamedVar "x" 0 ] ] , clauseBody = Just $ var 0 , clauseType = Just $ defaultArg $ El (varSort 2) $ var 1 , clauseCatchall = False , clauseUnreachable = Just False } cc = Case (defaultArg 0) $ conCase sharp False $ WithArity 1 $ Done [defaultArg "x"] $ var 0 projection = Projection { projProper = Just inf , projOrig = flat , projFromType = defaultArg inf , projIndex = 3 , projLams = ProjLams $ [ argH "a" , argH "A" , argN "x" ] } addConstant flat $ flatDefn { defPolarity = [] , defArgOccurrences = [StrictPos] -- changing that to [Mixed] destroys monotonicity of 'Rec' in test/succeed/GuardednessPreservingTypeConstructors , theDef = emptyFunction { funClauses = [clause] , funCompiled = Just $ cc , funProjection = Just projection , funMutual = Just [] , funTerminates = Just True , funCopatternLHS = hasProjectionPatterns cc } } -- register flat as record field for constructor sharp modifySignature $ updateDefinition sharp $ updateTheDef $ \ def -> def { conSrcCon = sharpCon } modifySignature $ updateDefinition inf $ updateTheDef $ \ def -> def { recConHead = sharpCon, recFields = [defaultArg flat] } return flatE -- The coinductive primitives. -- moved to TypeChecking.Monad.Builtin Agda-2.6.0.1/src/full/Agda/TypeChecking/Rules/Builtin/Coinduction.hs-boot0000644000000000000000000000054613466402171024126 0ustar0000000000000000module Agda.TypeChecking.Rules.Builtin.Coinduction where import Agda.Syntax.Scope.Base import Agda.Syntax.Internal (Type) import Agda.TypeChecking.Monad typeOfInf :: TCM Type typeOfSharp :: TCM Type typeOfFlat :: TCM Type bindBuiltinInf :: ResolvedName -> TCM () bindBuiltinSharp :: ResolvedName -> TCM () bindBuiltinFlat :: ResolvedName -> TCM () Agda-2.6.0.1/src/full/Agda/TypeChecking/Patterns/0000755000000000000000000000000013466402171017446 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Patterns/Match.hs0000644000000000000000000003076313466402171021047 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} -- | Pattern matcher used in the reducer for clauses that -- have not been compiled to case trees yet. module Agda.TypeChecking.Patterns.Match where import Prelude hiding (null) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Monoid import Data.Traversable (traverse) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (getName',builtinHComp) import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Datatypes import Agda.Utils.Empty import Agda.Utils.Functor (for, ($>)) import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | If matching is inconclusive (@DontKnow@) we want to know whether -- it is due to a particular meta variable. data Match a = Yes Simplification (IntMap (Arg a)) | No | DontKnow (Blocked ()) deriving Functor instance Null (Match a) where empty = Yes empty empty null (Yes simpl as) = null simpl && null as null _ = False matchedArgs :: Empty -> Int -> IntMap (Arg a) -> [Arg a] matchedArgs err n vs = map get [0..n-1] where get k = fromMaybe (absurd err) $ IntMap.lookup k vs -- | Builds a proper substitution from an IntMap produced by match(Co)patterns buildSubstitution :: (DeBruijn a) => Empty -> Int -> IntMap (Arg a) -> Substitution' a buildSubstitution err n vs = parallelS $ map unArg $ matchedArgs err n vs -- 'mappend' is UNUSED. -- -- instance Monoid (Match a) where -- mempty = Yes mempty [] -- Yes s us `mappend` Yes s' vs = Yes (s `mappend` s') (us ++ vs) -- Yes _ _ `mappend` No = No -- Yes _ _ `mappend` DontKnow m = DontKnow m -- No `mappend` _ = No -- -- @NotBlocked (StuckOn e)@ means blocked by a variable. -- -- In this case, no instantiation of -- -- meta-variables will make progress. -- DontKnow b `mappend` DontKnow b' = DontKnow $ b `mappend` b' -- -- One could imagine DontKnow _ `mappend` No = No, but would break the -- -- equivalence to case-trees. -- DontKnow m `mappend` _ = DontKnow m -- | Instead of 'zipWithM', we need to use this lazy version -- of combining pattern matching computations. -- Andreas, 2014-05-08, see Issue 1124: -- -- Due to a bug in TypeChecking.Patterns.Match -- a failed match of (C n b) against (C O unit) -- turned into (C n unit). -- This was because all patterns were matched in -- parallel, and evaluations of successfull matches -- (and a record constructor like unit can always -- be successfully matched) were returned, leading -- to a reassembly of (C n b) as (C n unit) which is -- illtyped. -- Now patterns are matched left to right and -- upon failure, no further matching is performed. foldMatch :: forall p v . IsProjP p => (p -> v -> ReduceM (Match Term, v)) -> [p] -> [v] -> ReduceM (Match Term, [v]) foldMatch match = loop where loop :: [p] -> [v] -> ReduceM (Match Term, [v]) loop ps0 vs0 = do case (ps0, vs0) of ([], []) -> return (empty, []) (p : ps, v : vs) -> do (r, v') <- match p v case r of No | Just{} <- isProjP p -> return (No, v' : vs) No -> do -- Issue 2964: Even when the first pattern doesn't match we should -- continue to the next patterns (and potentially block on them) -- because the splitting order in the case tree may not be -- left-to-right. (r', _vs') <- loop ps vs -- Issue 2968: do not use vs' here, because it might -- contain ill-typed terms due to eta-expansion at wrong -- type. let vs1 = v' : vs case r' of Yes s' us' -> return (No , vs1) No -> return (No , vs1) DontKnow m -> return (DontKnow m , vs1) DontKnow m -> return (DontKnow m, v' : vs) Yes s us -> do (r', vs') <- loop ps vs let vs1 = v' : vs' case r' of Yes s' us' -> return (Yes (s `mappend` s') (us `mappend` us'), vs1) No -> return (No , vs1) DontKnow m -> return (DontKnow m , vs1) _ -> __IMPOSSIBLE__ -- TODO refactor matchPattern* to work with Elim instead. mergeElim :: Elim -> Arg Term -> Elim mergeElim Apply{} arg = Apply arg mergeElim (IApply x y _) arg = IApply x y (unArg arg) mergeElim Proj{} _ = __IMPOSSIBLE__ mergeElims :: [Elim] -> [Arg Term] -> [Elim] mergeElims = zipWith mergeElim -- | @matchCopatterns ps es@ matches spine @es@ against copattern spine @ps@. -- -- Returns 'Yes' and a substitution for the pattern variables -- (in form of IntMap Term) if matching was successful. -- -- Returns 'No' if there was a constructor or projection mismatch. -- -- Returns 'DontKnow' if an argument could not be evaluated to -- constructor form because of a blocking meta variable. -- -- In any case, also returns spine @es@ in reduced form -- (with all the weak head reductions performed that were necessary -- to come to a decision). matchCopatterns :: [NamedArg DeBruijnPattern] -> [Elim] -> ReduceM (Match Term, [Elim]) matchCopatterns ps vs = do traceSDoc "tc.match" 50 (vcat [ "matchCopatterns" , nest 2 $ "ps =" <+> fsep (punctuate comma $ map (prettyTCM . namedArg) ps) , nest 2 $ "vs =" <+> fsep (punctuate comma $ map prettyTCM vs) ]) $ do -- Buggy, see issue 1124: -- mapFst mconcat . unzip <$> zipWithM' (matchCopattern . namedArg) ps vs foldMatch (matchCopattern . namedArg) ps vs -- | Match a single copattern. matchCopattern :: DeBruijnPattern -> Elim -> ReduceM (Match Term, Elim) matchCopattern pat@ProjP{} elim@(Proj _ q) = do ProjP _ p <- normaliseProjP pat q <- getOriginalProjection q return $ if p == q then (Yes YesSimplification empty, elim) else (No, elim) -- The following two cases are not impossible, see #2964 matchCopattern ProjP{} elim@Apply{} = return (No , elim) matchCopattern _ elim@Proj{} = return (No , elim) matchCopattern p (Apply v) = mapSnd Apply <$> matchPattern p v matchCopattern p e@(IApply x y r) = mapSnd (mergeElim e) <$> matchPattern p (defaultArg r) matchPatterns :: [NamedArg DeBruijnPattern] -> [Arg Term] -> ReduceM (Match Term, [Arg Term]) matchPatterns ps vs = do reportSDoc "tc.match" 20 $ vcat [ "matchPatterns" , nest 2 $ "ps =" <+> prettyTCMPatternList ps , nest 2 $ "vs =" <+> fsep (punctuate comma $ map prettyTCM vs) ] traceSDoc "tc.match" 50 (vcat [ "matchPatterns" , nest 2 $ "ps =" <+> fsep (punctuate comma $ map (text . show) ps) , nest 2 $ "vs =" <+> fsep (punctuate comma $ map prettyTCM vs) ]) $ do -- Buggy, see issue 1124: -- (ms,vs) <- unzip <$> zipWithM' (matchPattern . namedArg) ps vs -- return (mconcat ms, vs) foldMatch (matchPattern . namedArg) ps vs -- | Match a single pattern. matchPattern :: DeBruijnPattern -> Arg Term -> ReduceM (Match Term, Arg Term) matchPattern p u = case (p, u) of (ProjP{}, _ ) -> __IMPOSSIBLE__ (IApplyP _ _ _ x , arg ) -> return (Yes NoSimplification entry, arg) where entry = singleton (dbPatVarIndex x, arg) (VarP _ x , arg ) -> return (Yes NoSimplification entry, arg) where entry = singleton (dbPatVarIndex x, arg) (DotP _ _ , arg@(Arg _ v)) -> return (Yes NoSimplification empty, arg) (LitP l , arg@(Arg _ v)) -> do w <- reduceB' v let arg' = arg $> ignoreBlocking w case w of NotBlocked _ (Lit l') | l == l' -> return (Yes YesSimplification empty , arg') | otherwise -> return (No , arg') NotBlocked _ (MetaV x _) -> return (DontKnow $ Blocked x () , arg') Blocked x _ -> return (DontKnow $ Blocked x () , arg') NotBlocked r t -> return (DontKnow $ NotBlocked r' () , arg') where r' = stuckOn (Apply arg') r -- Case constructor pattern. (ConP c cpi ps, Arg info v) -> do if isNothing $ conPRecord cpi then fallback c ps (Arg info v) else do isEtaRecordCon (conName c) >>= \case Nothing -> fallback c ps (Arg info v) Just fs -> do -- Case: Eta record constructor. -- This case is necessary if we want to use the clauses before -- record pattern translation (e.g., in type-checking definitions by copatterns). unless (size fs == size ps) __IMPOSSIBLE__ mapSnd (Arg info . Con c (fromConPatternInfo cpi) . map Apply) <$> do matchPatterns ps $ for fs $ \ (Arg ai f) -> Arg ai $ v `applyE` [Proj ProjSystem f] where isEtaRecordCon :: QName -> ReduceM (Maybe [Arg QName]) isEtaRecordCon c = do (theDef <$> getConstInfo c) >>= \case Constructor{ conData = d } -> do (theDef <$> getConstInfo d) >>= \case r@Record{ recFields = fs } | YesEta <- recEtaEquality r -> return $ Just fs _ -> return Nothing _ -> __IMPOSSIBLE__ (DefP o q ps, v) -> do let f (Def q' vs) | q == q' = Just (Def q, vs) f _ = Nothing fallback' f ps v where -- Default: not an eta record constructor. fallback c ps v = do isMatchable <- isMatchable' let f (Con c' ci' vs) | c == c' = Just (Con c' ci',vs) f _ = Nothing fallback' f ps v -- Regardless of blocking, constructors and a properly applied @hcomp@ -- can be matched on. isMatchable' = do mhcomp <- getName' builtinHComp return $ \ r -> case ignoreBlocking r of t@Con{} -> Just t t@(Def q [l,a,phi,u,u0]) | Just q == mhcomp -> Just t _ -> Nothing -- DefP hcomp and ConP matching. fallback' mtc ps (Arg info v) = do isMatchable <- isMatchable' w <- reduceB' v -- Unfold delayed (corecursive) definitions one step. This is -- only necessary if c is a coinductive constructor, but -- 1) it does not hurt to do it all the time, and -- 2) whatInduction c sometimes crashes because c may point to -- an axiom at this stage (if we are checking the -- projection functions for a record type). {- w <- case w of NotBlocked r (Def f es) -> -- Andreas, 2014-06-12 TODO: r == ReallyNotBlocked sufficient? unfoldDefinitionE True reduceB' (Def f []) f es -- reduceB is used here because some constructors -- are actually definitions which need to be -- unfolded (due to open public). _ -> return w -} -- Jesper, 23-06-2016: Note that unfoldCorecursion may destroy -- constructor forms, so we only call constructorForm after. w <- traverse constructorForm =<< case w of NotBlocked r u -> unfoldCorecursion u -- Andreas, 2014-06-12 TODO: r == ReallyNotBlocked sufficient? _ -> return w let v = ignoreBlocking w arg = Arg info v -- the reduced argument case w of b | Just t <- isMatchable b -> case mtc t of Just (bld, vs) -> do (m, vs1) <- yesSimplification <$> matchPatterns ps (fromMaybe __IMPOSSIBLE__ $ allApplyElims vs) return (m, Arg info $ bld (mergeElims vs vs1)) Nothing -> return (No , arg) NotBlocked _ (MetaV x vs) -> return (DontKnow $ Blocked x () , arg) Blocked x _ -> return (DontKnow $ Blocked x () , arg) NotBlocked r _ -> return (DontKnow $ NotBlocked r' () , arg) where r' = stuckOn (Apply arg) r -- ASR (08 November 2014). The type of the function could be -- -- @(Match Term, [Arg Term]) -> (Match Term, [Arg Term])@. yesSimplification :: (Match a, b) -> (Match a, b) yesSimplification (Yes _ vs, us) = (Yes YesSimplification vs, us) yesSimplification r = r Agda-2.6.0.1/src/full/Agda/TypeChecking/Patterns/Internal.hs0000644000000000000000000000341513466402171021561 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Tools to manipulate patterns in internal syntax -- in the TCM (type checking monad). module Agda.TypeChecking.Patterns.Internal where import Control.Monad import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Reduce (reduce, normalise, instantiate, instantiateFull) import Agda.TypeChecking.Substitute.DeBruijn import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- | Convert a term (from a dot pattern) to a DeBruijn pattern. class TermToPattern a b where termToPattern :: a -> TCM b default termToPattern :: (TermToPattern a' b', Traversable f, a ~ f a', b ~ f b') => a -> TCM b termToPattern = traverse termToPattern instance TermToPattern a b => TermToPattern [a] [b] where instance TermToPattern a b => TermToPattern (Arg a) (Arg b) where instance TermToPattern a b => TermToPattern (Named c a) (Named c b) where instance (DeBruijn (Pattern' a)) => TermToPattern Term (Pattern' a) where termToPattern t = (reduce >=> constructorForm) t >>= \case -- Constructors. Con c _ args -> ConP c noConPatternInfo . map (fmap unnamed) <$> termToPattern (fromMaybe __IMPOSSIBLE__ $ allApplyElims args) Var i [] -> return $ deBruijnVar i Lit l -> return $ LitP l t -> return $ dotP t dotPatternsToPatterns :: forall a. (DeBruijn (Pattern' a)) => Pattern' a -> TCM (Pattern' a) dotPatternsToPatterns = postTraversePatternM dotToPat where dotToPat :: Pattern' a -> TCM (Pattern' a) dotToPat = \case DotP o t -> termToPattern t p -> return p Agda-2.6.0.1/src/full/Agda/TypeChecking/Patterns/Match.hs-boot0000644000000000000000000000107713466402171022004 0ustar0000000000000000 module Agda.TypeChecking.Patterns.Match where import Data.IntMap (IntMap) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute (DeBruijn) import Agda.Utils.Empty data Match a = Yes Simplification (IntMap (Arg a)) | No | DontKnow (Blocked ()) buildSubstitution :: (DeBruijn a) => Empty -> Int -> IntMap (Arg a) -> Substitution' a matchPatterns :: [NamedArg DeBruijnPattern] -> Args -> ReduceM (Match Term, Args) matchCopatterns :: [NamedArg DeBruijnPattern] -> Elims -> ReduceM (Match Term, Elims) Agda-2.6.0.1/src/full/Agda/TypeChecking/Patterns/Abstract.hs0000644000000000000000000000771413466402171021556 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- | Tools to manipulate patterns in abstract syntax -- in the TCM (type checking monad). module Agda.TypeChecking.Patterns.Abstract where import qualified Data.List as List import Data.Traversable hiding (mapM, sequence) import Data.Void import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern import Agda.Syntax.Abstract.Views import Agda.Syntax.Concrete (FieldAssignment') import Agda.Syntax.Common import Agda.Syntax.Info as A import Agda.Syntax.Internal as I import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.Utils.Functor #include "undefined.h" import Agda.Utils.Impossible -- | Expand literal integer pattern into suc/zero constructor patterns. -- expandLitPattern :: A.Pattern -> TCM A.Pattern expandLitPattern p = case asView p of (xs, A.LitP (LitNat r n)) | n < 0 -> negLit -- Andreas, issue #2365, negative literals not yet supported. | n > 20 -> tooBig | otherwise -> do Con z _ _ <- primZero Con s _ _ <- primSuc let zero = A.ConP cinfo (unambiguous $ setRange r $ conName z) [] suc p = A.ConP cinfo (unambiguous $ setRange r $ conName s) [defaultNamedArg p] info = A.PatRange r cinfo = A.ConPatInfo ConOCon info ConPatEager p' = foldr ($) zero $ List.genericReplicate n suc return $ foldr (A.AsP info) p' (map A.BindName xs) _ -> return p where tooBig = typeError $ GenericError $ "Matching on natural number literals is done by expanding " ++ "the literal to the corresponding constructor pattern, so " ++ "you probably don't want to do it this way." negLit = typeError $ GenericError $ "Negative literals are not supported in patterns" -- | Expand away (deeply) all pattern synonyms in a pattern. -- Unfortunately, the more general type signature -- -- expandPatternSynonyms :: forall a p . APatternLike a p => p -> TCM p -- -- is rejected by GHC 7.10 -- -- Could not deduce (APatternLike A.Expr p) -- arising from a use of ‘postTraverseAPatternM’ -- -- I am mystified (Andreas, 2017-07-27) -- expandPatternSynonyms :: forall a p . APatternLike a p => p -> TCM p -- As a workaround, we define this function only for a = A.Exp, p = A.Pattern' -- and keep the type class ExpandPatternSynonyms (which would otherwise be superfluous). expandPatternSynonyms' :: forall e. A.Pattern' e -> TCM (A.Pattern' e) expandPatternSynonyms' = postTraverseAPatternM $ \case A.PatternSynP i x as -> setCurrentRange i $ do (ns, p) <- killRange <$> lookupPatternSyn x -- Must expand arguments before instantiating otherwise pattern -- synonyms could get into dot patterns (which is __IMPOSSIBLE__). p <- expandPatternSynonyms' (vacuous p :: A.Pattern' e) case A.insertImplicitPatSynArgs (A.WildP . PatRange) (getRange x) ns as of Nothing -> typeError $ BadArgumentsToPatternSynonym x Just (_, _:_) -> typeError $ TooFewArgumentsToPatternSynonym x Just (s, []) -> do let subE _ = __IMPOSSIBLE__ -- No dot patterns in p return $ setRange (getRange i) $ substPattern' subE s p p -> return p class ExpandPatternSynonyms a where expandPatternSynonyms :: a -> TCM a default expandPatternSynonyms :: (Traversable f, ExpandPatternSynonyms b, f b ~ a) => a -> TCM a expandPatternSynonyms = traverse expandPatternSynonyms instance ExpandPatternSynonyms a => ExpandPatternSynonyms (Maybe a) where instance ExpandPatternSynonyms a => ExpandPatternSynonyms [a] where instance ExpandPatternSynonyms a => ExpandPatternSynonyms (Arg a) where instance ExpandPatternSynonyms a => ExpandPatternSynonyms (Named n a) where instance ExpandPatternSynonyms a => ExpandPatternSynonyms (FieldAssignment' a) where instance ExpandPatternSynonyms (A.Pattern' e) where expandPatternSynonyms = expandPatternSynonyms' Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/0000755000000000000000000000000013466402171017566 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances.hs0000644000000000000000000000152713466402171022056 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} -- Only instances exported module Agda.TypeChecking.Serialise.Instances () where import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Abstract () import Agda.TypeChecking.Serialise.Instances.Common () import Agda.TypeChecking.Serialise.Instances.Compilers () import Agda.TypeChecking.Serialise.Instances.Highlighting () import Agda.TypeChecking.Serialise.Instances.Internal () import Agda.TypeChecking.Serialise.Instances.Errors () instance EmbPrj Interface where icod_ (Interface a b c d e f g h i j k l m n o p q) = icodeN' Interface a b c d e f g h i j k l m n o p q value = vcase valu where valu [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = valuN Interface a b c d e f g h i j k l m n o p q valu _ = malformed Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Base.hs0000644000000000000000000003525213466402171021003 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module Agda.TypeChecking.Serialise.Base where import Control.Exception (evaluate) import Control.Monad import Control.Monad.Catch (catchAll) import Control.Monad.Reader import Control.Monad.State.Strict (StateT, gets) import Data.Proxy import Data.Array.IArray import qualified Data.ByteString.Lazy as L import Data.Hashable import qualified Data.HashTable.IO as H import Data.Int (Int32) import Data.Maybe import qualified Data.Binary as B import qualified Data.Binary.Get as B import Data.Text.Lazy (Text) import Data.Typeable ( cast, Typeable, typeOf, TypeRep ) import Agda.Syntax.Common (NameId) import Agda.Syntax.Internal (Term, QName(..), ModuleName(..), nameId) import Agda.TypeChecking.Monad.Base (TypeError(GenericError), ModuleToSource) import Agda.Utils.FileName import Agda.Utils.IORef import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Pointer import Agda.Utils.Except (ExceptT, throwError) import Agda.Utils.TypeLevel -- | Constructor tag (maybe omitted) and argument indices. type Node = [Int32] -- | The type of hashtables used in this module. -- -- A very limited amount of testing indicates that 'H.CuckooHashTable' -- is somewhat slower than 'H.BasicHashTable', and that -- 'H.LinearHashTable' and the hashtables from "Data.Hashtable" are -- much slower. #if defined(mingw32_HOST_OS) && defined(x86_64_HOST_ARCH) type HashTable k v = H.CuckooHashTable k v #else type HashTable k v = H.BasicHashTable k v #endif -- | Structure providing fresh identifiers for hash map -- and counting hash map hits (i.e. when no fresh identifier required). data FreshAndReuse = FreshAndReuse { farFresh :: !Int32 -- ^ Number of hash map misses. , farReuse :: !Int32 -- ^ Number of hash map hits. } farEmpty :: FreshAndReuse farEmpty = FreshAndReuse 0 0 lensFresh :: Lens' Int32 FreshAndReuse lensFresh f r = f (farFresh r) <&> \ i -> r { farFresh = i } lensReuse :: Lens' Int32 FreshAndReuse lensReuse f r = f (farReuse r) <&> \ i -> r { farReuse = i } -- | Two 'QName's are equal if their @QNameId@ is equal. type QNameId = [NameId] -- | Computing a qualified names composed ID. qnameId :: QName -> QNameId qnameId (QName (MName ns) n) = map nameId $ n:ns -- | State of the the encoder. data Dict = Dict -- Dictionaries which are serialized: { nodeD :: !(HashTable Node Int32) -- ^ Written to interface file. , stringD :: !(HashTable String Int32) -- ^ Written to interface file. , textD :: !(HashTable Text Int32) -- ^ Written to interface file. , integerD :: !(HashTable Integer Int32) -- ^ Written to interface file. , doubleD :: !(HashTable Double Int32) -- ^ Written to interface file. -- Dicitionaries which are not serialized, but provide -- short cuts to speed up serialization: , termD :: !(HashTable (Ptr Term) Int32) -- ^ Not written to interface file. -- Andreas, Makoto, AIM XXI -- Memoizing A.Name does not buy us much if we already memoize A.QName. , nameD :: !(HashTable NameId Int32) -- ^ Not written to interface file. , qnameD :: !(HashTable QNameId Int32) -- ^ Not written to interface file. -- Fresh UIDs and reuse statistics: , nodeC :: !(IORef FreshAndReuse) -- counters for fresh indexes , stringC :: !(IORef FreshAndReuse) , textC :: !(IORef FreshAndReuse) , integerC :: !(IORef FreshAndReuse) , doubleC :: !(IORef FreshAndReuse) , termC :: !(IORef FreshAndReuse) , nameC :: !(IORef FreshAndReuse) , qnameC :: !(IORef FreshAndReuse) , stats :: !(HashTable String Int) , collectStats :: Bool -- ^ If @True@ collect in @stats@ the quantities of -- calls to @icode@ for each @Typeable a@. , absPathD :: !(HashTable AbsolutePath Int32) -- ^ Not written to interface file. } -- | Creates an empty dictionary. emptyDict :: Bool -- ^ Collect statistics for @icode@ calls? -> IO Dict emptyDict collectStats = Dict <$> H.new <*> H.new <*> H.new <*> H.new <*> H.new <*> H.new <*> H.new <*> H.new <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> newIORef farEmpty <*> H.new <*> pure collectStats <*> H.new -- | Universal type, wraps everything. data U = forall a . Typeable a => U !a -- | Univeral memo structure, to introduce sharing during decoding type Memo = HashTable (Int32, TypeRep) U -- (node index, type rep) -- | State of the decoder. data St = St { nodeE :: !(Array Int32 Node) -- ^ Obtained from interface file. , stringE :: !(Array Int32 String) -- ^ Obtained from interface file. , textE :: !(Array Int32 Text) -- ^ Obtained from interface file. , integerE :: !(Array Int32 Integer) -- ^ Obtained from interface file. , doubleE :: !(Array Int32 Double) -- ^ Obtained from interface file. , nodeMemo :: !Memo -- ^ Created and modified by decoder. -- Used to introduce sharing while deserializing objects. , modFile :: !ModuleToSource -- ^ Maps module names to file names. Constructed by the decoder. , includes :: [AbsolutePath] -- ^ The include directories. } -- | Monad used by the encoder. type S a = ReaderT Dict IO a -- | Monad used by the decoder. -- -- 'TCM' is not used because the associated overheads would make -- decoding slower. type R a = ExceptT TypeError (StateT St IO) a -- | Throws an error which is suitable when the data stream is -- malformed. malformed :: R a malformed = throwError $ GenericError "Malformed input." class Typeable a => EmbPrj a where icode :: a -> S Int32 -- ^ Serialization (wrapper). icod_ :: a -> S Int32 -- ^ Serialization (worker). value :: Int32 -> R a -- ^ Deserialization. icode a = do tickICode a icod_ a -- Simple enumeration types can be (de)serialized using (from/to)Enum. default value :: (Enum a) => Int32 -> R a value i = liftIO (evaluate (toEnum (fromIntegral i))) `catchAll` const malformed default icod_ :: (Enum a) => a -> S Int32 icod_ = return . fromIntegral . fromEnum -- | Increase entry for @a@ in 'stats'. tickICode :: forall a. Typeable a => a -> S () tickICode _ = whenM (asks collectStats) $ do let key = "icode " ++ show (typeOf (undefined :: a)) hmap <- asks stats liftIO $ do n <- fromMaybe 0 <$> H.lookup hmap key H.insert hmap key $! n + 1 -- | Data.Binary.runGetState is deprecated in favour of runGetIncremental. -- Reimplementing it in terms of the new function. The new Decoder type contains -- strict byte strings so we need to be careful not to feed the entire lazy byte -- string to the decoder at once. runGetState :: B.Get a -> L.ByteString -> B.ByteOffset -> (a, L.ByteString, B.ByteOffset) runGetState g s n = feed (B.runGetIncremental g) (L.toChunks s) where feed (B.Done s n' x) ss = (x, L.fromChunks (s : ss), n + n') feed (B.Fail _ _ err) _ = error err feed (B.Partial f) (s : ss) = feed (f $ Just s) ss feed (B.Partial f) [] = feed (f Nothing) [] -- Specializing icodeX leads to Warning like -- src/full/Agda/TypeChecking/Serialise.hs:1297:1: Warning: -- RULE left-hand side too complicated to desugar -- case cobox_aQY5 of _ [Occ=Dead] { ghc-prim:GHC.Types.Eq# cobox -> -- icodeX @ String $dEq_aQY3 $dHashable_aQY4 -- } -- -- type ICodeX k -- = (Dict -> HashTable k Int32) -- -> (Dict -> IORef Int32) -- -> k -> S Int32 -- {-# SPECIALIZE icodeX :: ICodeX String #-} -- {-# SPECIALIZE icodeX :: ICodeX Integer #-} -- {-# SPECIALIZE icodeX :: ICodeX Double #-} -- {-# SPECIALIZE icodeX :: ICodeX Node #-} -- Andreas, 2014-10-16 AIM XX: -- Inlining this increases Serialization time by 10% -- Makoto's theory: code size increase might lead to -- instruction cache misses. -- {-# INLINE icodeX #-} icodeX :: (Eq k, Hashable k) => (Dict -> HashTable k Int32) -> (Dict -> IORef FreshAndReuse) -> k -> S Int32 icodeX dict counter key = do d <- asks dict c <- asks counter liftIO $ do mi <- H.lookup d key case mi of Just i -> do modifyIORef' c $ over lensReuse (+1) return i Nothing -> do fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1) H.insert d key fresh return fresh -- Instead of inlining icodeX, we manually specialize it to -- its four uses: Integer, String, Double, Node. -- Not a great gain (hardly noticeable), but not harmful. icodeInteger :: Integer -> S Int32 icodeInteger key = do d <- asks integerD c <- asks integerC liftIO $ do mi <- H.lookup d key case mi of Just i -> do modifyIORef' c $ over lensReuse (+1) return i Nothing -> do fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1) H.insert d key fresh return fresh icodeDouble :: Double -> S Int32 icodeDouble key = do d <- asks doubleD c <- asks doubleC liftIO $ do mi <- H.lookup d key case mi of Just i -> do modifyIORef' c $ over lensReuse (+1) return i Nothing -> do fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1) H.insert d key fresh return fresh icodeString :: String -> S Int32 icodeString key = do d <- asks stringD c <- asks stringC liftIO $ do mi <- H.lookup d key case mi of Just i -> do modifyIORef' c $ over lensReuse (+1) return i Nothing -> do fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1) H.insert d key fresh return fresh icodeNode :: Node -> S Int32 icodeNode key = do d <- asks nodeD c <- asks nodeC liftIO $ do mi <- H.lookup d key case mi of Just i -> do modifyIORef' c $ over lensReuse (+1) return i Nothing -> do fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1) H.insert d key fresh return fresh -- icodeN :: [Int32] -> S Int32 -- icodeN = icodeX nodeD nodeC -- | @icode@ only if thing has not seen before. icodeMemo :: (Ord a, Hashable a) => (Dict -> HashTable a Int32) -- ^ Memo structure for thing of key @a@. -> (Dict -> IORef FreshAndReuse) -- ^ Statistics. -> a -- ^ Key to the thing. -> S Int32 -- ^ Fallback computation to encode the thing. -> S Int32 -- ^ Encoded thing. icodeMemo getDict getCounter a icodeP = do h <- asks getDict mi <- liftIO $ H.lookup h a st <- asks getCounter case mi of Just i -> liftIO $ do modifyIORef' st $ over lensReuse (+ 1) return i Nothing -> do liftIO $ modifyIORef' st $ over lensFresh (+1) i <- icodeP liftIO $ H.insert h a i return i {-# INLINE vcase #-} -- | @vcase value ix@ decodes thing represented by @ix :: Int32@ -- via the @valu@ function and stores it in 'nodeMemo'. -- If @ix@ is present in 'nodeMemo', @valu@ is not used, but -- the thing is read from 'nodeMemo' instead. vcase :: forall a . EmbPrj a => (Node -> R a) -> Int32 -> R a vcase valu = \ix -> do memo <- gets nodeMemo -- compute run-time representation of type a let aTyp = typeOf (undefined :: a) -- to introduce sharing, see if we have seen a thing -- represented by ix before maybeU <- liftIO $ H.lookup memo (ix, aTyp) case maybeU of -- yes, we have seen it before, use the version from memo Just (U u) -> maybe malformed return (cast u) -- no, it's new, so generate it via valu and insert it into memo Nothing -> do v <- valu . (! ix) =<< gets nodeE liftIO $ H.insert memo (ix, aTyp) (U v) return v -- | @icodeArgs proxy (a1, ..., an)@ maps @icode@ over @a1@, ..., @an@ -- and returns the corresponding list of @Int32@. class ICODE t b where icodeArgs :: IsBase t ~ b => All EmbPrj (Domains t) => Proxy t -> Products (Domains t) -> S [Int32] instance IsBase t ~ 'True => ICODE t 'True where icodeArgs _ _ = return [] instance ICODE t (IsBase t) => ICODE (a -> t) 'False where icodeArgs _ (a , as) = icode a >>= \ hd -> (hd :) <$> icodeArgs (Proxy :: Proxy t) as -- | @icodeN tag t a1 ... an@ serialises the arguments @a1@, ..., @an@ of the -- constructor @t@ together with a tag @tag@ picked to disambiguate between -- different constructors. -- It corresponds to @icodeNode . (tag :) =<< mapM icode [a1, ..., an]@ {-# INLINE icodeN #-} icodeN :: forall t. ICODE t (IsBase t) => Currying (Domains t) (S Int32) => All EmbPrj (Domains t) => Int32 -> t -> Arrows (Domains t) (S Int32) icodeN tag _ = currys (Proxy :: Proxy (Domains t)) (Proxy :: Proxy (S Int32)) $ \ args -> icodeNode . (tag :) =<< icodeArgs (Proxy :: Proxy t) args -- | @icodeN'@ is the same as @icodeN@ except that there is no tag {-# INLINE icodeN' #-} icodeN' :: forall t. ICODE t (IsBase t) => Currying (Domains t) (S Int32) => All EmbPrj (Domains t) => t -> Arrows (Domains t) (S Int32) icodeN' _ = currys (Proxy :: Proxy (Domains t)) (Proxy :: Proxy (S Int32)) $ \ args -> icodeNode =<< icodeArgs (Proxy :: Proxy t) args -- Instead of having up to 25 versions of @valu N@, we define -- the class VALU which generates them by typeclass resolution. -- All of these should get inlined at compile time. class VALU t b where valuN' :: b ~ IsBase t => All EmbPrj (Domains t) => t -> Products (Constant Int32 (Domains t)) -> R (CoDomain t) valueArgs :: b ~ IsBase t => All EmbPrj (CoDomain t ': Domains t) => Proxy t -> Node -> Maybe (Products (Constant Int32 (Domains t))) instance VALU t 'True where valuN' c () = return c valueArgs _ xs = case xs of [] -> Just () _ -> Nothing instance VALU t (IsBase t) => VALU (a -> t) 'False where valuN' c (a, as) = value a >>= \ v -> valuN' (c v) as valueArgs _ xs = case xs of (x : xs') -> (x,) <$> valueArgs (Proxy :: Proxy t) xs' _ -> Nothing {-# INLINE valuN #-} valuN :: forall t. VALU t (IsBase t) => Currying (Constant Int32 (Domains t)) (R (CoDomain t)) => All EmbPrj (Domains t) => t -> Arrows (Constant Int32 (Domains t)) (R (CoDomain t)) valuN f = currys (Proxy :: Proxy (Constant Int32 (Domains t))) (Proxy :: Proxy (R (CoDomain t))) (valuN' f) {-# INLINE valueN #-} valueN :: forall t. VALU t (IsBase t) => All EmbPrj (CoDomain t ': Domains t) => t -> Int32 -> R (CoDomain t) valueN t = vcase valu where valu int32s = case valueArgs (Proxy :: Proxy t) int32s of Nothing -> malformed Just vs -> valuN' t vs Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/0000755000000000000000000000000013466402171021515 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Common.hs0000644000000000000000000004053013466402171023303 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Serialise.Instances.Common (SerialisedRange(..)) where import Prelude hiding (mapM) import Control.Monad.Reader hiding (mapM) import Control.Monad.State.Strict (gets, modify) import Control.Exception import Data.Array.IArray import Data.Word import qualified Data.Foldable as Fold import Data.Hashable import qualified Data.HashTable.IO as H import Data.Int (Int32) import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.IntSet as IntSet import Data.IntSet (IntSet) import qualified Data.Set as Set import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Data.Text.Lazy (Text) import Data.Traversable ( mapM ) import Data.Typeable import Data.Void import Agda.Syntax.Common import Agda.Syntax.Concrete.Name as C import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Position as P import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Literal import Agda.Interaction.FindFile import Agda.TypeChecking.Serialise.Base import Agda.Utils.BiMap (BiMap) import qualified Agda.Utils.BiMap as BiMap import Agda.Utils.HashMap (HashMap) import qualified Agda.Utils.HashMap as HMap import Agda.Utils.FileName import Agda.Utils.Maybe import Agda.Utils.NonemptyList import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Trie (Trie(..)) import qualified Agda.Utils.Trie as Trie import Agda.Utils.Except import Agda.Utils.Empty (Empty) import qualified Agda.Utils.Empty as Empty import Agda.Utils.WithDefault #include "undefined.h" import Agda.Utils.Impossible instance {-# OVERLAPPING #-} EmbPrj String where icod_ = icodeString value i = (! i) `fmap` gets stringE instance EmbPrj Text where icod_ = icodeX textD textC value i = (! i) `fmap` gets textE instance EmbPrj Integer where icod_ = icodeInteger value i = (! i) `fmap` gets integerE instance EmbPrj Word64 where icod_ i = icodeN' (undefined :: Int32 -> Int32 -> Int32) (int32 q) (int32 r) where (q, r) = quotRem i (2^32) int32 :: Word64 -> Int32 int32 = fromIntegral value = vcase valu where valu [a, b] = return $ n * mod (fromIntegral a) n + mod (fromIntegral b) n valu _ = malformed n = 2^32 instance EmbPrj Int32 where icod_ i = return i value i = return i instance EmbPrj Int where icod_ i = return (fromIntegral i) value i = return (fromIntegral i) instance EmbPrj Char where icod_ c = return (fromIntegral $ fromEnum c) value i = return (toEnum $ fromInteger $ toInteger i) instance EmbPrj Double where icod_ = icodeDouble value i = (! i) `fmap` gets doubleE instance EmbPrj Void where icod_ = absurd value = vcase valu where valu _ = malformed instance EmbPrj () where icod_ () = icodeN' () value = vcase valu where valu [] = valuN () valu _ = malformed instance (EmbPrj a, EmbPrj b) => EmbPrj (a, b) where icod_ (a, b) = icodeN' (,) a b value = valueN (,) instance (EmbPrj a, EmbPrj b, EmbPrj c) => EmbPrj (a, b, c) where icod_ (a, b, c) = icodeN' (,,) a b c value = valueN (,,) instance (EmbPrj a, EmbPrj b) => EmbPrj (Either a b) where icod_ (Left x) = icodeN 0 Left x icod_ (Right x) = icodeN 1 Right x value = vcase valu where valu [0, x] = valuN Left x valu [1, x] = valuN Right x valu _ = malformed instance EmbPrj a => EmbPrj (Maybe a) where icod_ Nothing = icodeN' Nothing icod_ (Just x) = icodeN' Just x value = vcase valu where valu [] = valuN Nothing valu [x] = valuN Just x valu _ = malformed instance EmbPrj a => EmbPrj (Strict.Maybe a) where icod_ m = icode (Strict.toLazy m) value m = Strict.toStrict `fmap` value m instance EmbPrj Bool where icod_ True = icodeN' True icod_ False = icodeN 0 False value = vcase valu where valu [] = valuN True valu [0] = valuN False valu _ = malformed instance EmbPrj FileType where icod_ AgdaFileType = icodeN' IsData icod_ MdFileType = icodeN 0 IsRecord icod_ RstFileType = icodeN 1 IsRecord icod_ TexFileType = icodeN 2 IsRecord icod_ OrgFileType = icodeN 3 IsRecord value = vcase $ \case [] -> valuN AgdaFileType [0] -> valuN MdFileType [1] -> valuN RstFileType [2] -> valuN TexFileType [3] -> valuN OrgFileType _ -> malformed instance EmbPrj DataOrRecord where icod_ IsData = icodeN' IsData icod_ IsRecord = icodeN 0 IsRecord value = vcase $ \case [] -> valuN IsData [0] -> valuN IsRecord _ -> malformed instance EmbPrj AbsolutePath where icod_ file = do d <- asks absPathD liftIO $ flip fromMaybeM (H.lookup d file) $ do -- The path @file@ should be cached in the dictionary @d@. -- This seems not to be the case, thus, crash here. -- But leave some hints for the posterity why things could go so wrong. -- reportSLn "impossible" 10 -- does not work here putStrLn $ unlines $ [ "Panic while serializing absolute path: " ++ show file , "The path could not be found in the dictionary:" ] putStrLn . show =<< H.toList d __IMPOSSIBLE__ value m = do m :: TopLevelModuleName <- value m mf <- gets modFile incs <- gets includes (r, mf) <- liftIO $ findFile'' incs m mf modify $ \s -> s { modFile = mf } case r of Left err -> throwError $ findErrorToTypeError m err Right f -> return f instance EmbPrj a => EmbPrj (Position' a) where icod_ (P.Pn file pos line col) = icodeN' P.Pn file pos line col value = valueN P.Pn instance Typeable b => EmbPrj (WithDefault b) where icod_ = \case Default -> icodeN' Default Value b -> icodeN' Value b value = vcase $ \case [] -> valuN Default [a] -> valuN Value a _ -> malformed instance EmbPrj TopLevelModuleName where icod_ (TopLevelModuleName a b) = icodeN' TopLevelModuleName a b value = valueN TopLevelModuleName instance {-# OVERLAPPABLE #-} EmbPrj a => EmbPrj [a] where icod_ xs = icodeNode =<< mapM icode xs value = vcase (mapM value) -- icode [] = icode0' -- icode (x : xs) = icode2' x xs -- value = vcase valu where valu [] = valu0 [] -- valu [x, xs] = valu2 (:) x xs -- valu _ = malformed instance EmbPrj a => EmbPrj (NonemptyList a) where icod_ = icod_ . toList value = listCaseNe malformed return <=< value instance (Ord a, Ord b, EmbPrj a, EmbPrj b) => EmbPrj (BiMap a b) where icod_ m = icode (BiMap.toList m) value m = BiMap.fromList <$> value m instance (Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Map a b) where icod_ m = icode (Map.toList m) value m = Map.fromList `fmap` value m instance (Ord a, EmbPrj a) => EmbPrj (Set a) where icod_ s = icode (Set.toList s) value s = Set.fromList `fmap` value s instance EmbPrj IntSet where icod_ s = icode (IntSet.toList s) value s = IntSet.fromList <$> value s instance (Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Trie a b) where icod_ (Trie a b)= icodeN' Trie a b value = valueN Trie instance EmbPrj a => EmbPrj (Seq a) where icod_ s = icode (Fold.toList s) value s = Seq.fromList `fmap` value s instance EmbPrj a => EmbPrj (P.Interval' a) where icod_ (P.Interval p q) = icodeN' P.Interval p q value = valueN P.Interval -- | Ranges are always deserialised as 'noRange'. instance EmbPrj Range where icod_ _ = icodeN' () value _ = return noRange -- | Ranges that should be serialised properly. newtype SerialisedRange = SerialisedRange { underlyingRange :: Range } instance EmbPrj SerialisedRange where icod_ (SerialisedRange r) = icodeN' (undefined :: SrcFile -> [IntervalWithoutFile] -> SerialisedRange) (P.rangeFile r) (P.rangeIntervals r) value = vcase valu where valu [a, b] = SerialisedRange <$> valuN P.intervalsToRange a b valu _ = malformed instance EmbPrj C.Name where icod_ (C.NoName a b) = icodeN 0 C.NoName a b icod_ (C.Name r nis xs) = icodeN 1 C.Name r nis xs value = vcase valu where valu [0, a, b] = valuN C.NoName a b valu [1, r, nis, xs] = valuN C.Name r nis xs valu _ = malformed instance EmbPrj NamePart where icod_ Hole = icodeN' Hole icod_ (Id a) = icodeN' Id a value = vcase valu where valu [] = valuN Hole valu [a] = valuN Id a valu _ = malformed instance EmbPrj NameInScope where icod_ InScope = icodeN' InScope icod_ NotInScope = icodeN 0 NotInScope value = vcase valu where valu [] = valuN InScope valu [0] = valuN NotInScope valu _ = malformed instance EmbPrj C.QName where icod_ (Qual a b) = icodeN' Qual a b icod_ (C.QName a ) = icodeN' C.QName a value = vcase valu where valu [a, b] = valuN Qual a b valu [a] = valuN C.QName a valu _ = malformed instance (EmbPrj a, EmbPrj b) => EmbPrj (ImportedName' a b) where icod_ (ImportedModule a) = icodeN 1 ImportedModule a icod_ (ImportedName a) = icodeN 2 ImportedName a value = vcase valu where valu [1, a] = valuN ImportedModule a valu [2, a] = valuN ImportedName a valu _ = malformed instance EmbPrj Agda.Syntax.Fixity.Associativity where icod_ LeftAssoc = icodeN' LeftAssoc icod_ RightAssoc = icodeN 1 RightAssoc icod_ NonAssoc = icodeN 2 NonAssoc value = vcase valu where valu [] = valuN LeftAssoc valu [1] = valuN RightAssoc valu [2] = valuN NonAssoc valu _ = malformed instance EmbPrj Agda.Syntax.Fixity.PrecedenceLevel where icod_ Unrelated = icodeN' Unrelated icod_ (Related a) = icodeN' Related a value = vcase valu where valu [] = valuN Unrelated valu [a] = valuN Related a valu _ = malformed instance EmbPrj Agda.Syntax.Fixity.Fixity where icod_ (Fixity a b c) = icodeN' Fixity a b c value = valueN Fixity instance EmbPrj Agda.Syntax.Fixity.Fixity' where icod_ (Fixity' a b r) = icodeN' (\ a b -> Fixity' a b r) a b -- discard theNameRange value = valueN (\ f n -> Fixity' f n noRange) instance EmbPrj GenPart where icod_ (BindHole a b) = icodeN 0 BindHole a b icod_ (NormalHole a b) = icodeN 1 NormalHole a b icod_ (WildHole a) = icodeN 2 WildHole a icod_ (IdPart a) = icodeN' IdPart a value = vcase valu where valu [0, a, b] = valuN BindHole a b valu [1, a, b] = valuN NormalHole a b valu [2, a] = valuN WildHole a valu [a] = valuN IdPart a valu _ = malformed instance EmbPrj MetaId where icod_ (MetaId n) = icod_ n value i = MetaId <$> value i instance EmbPrj A.QName where icod_ n@(A.QName a b) = icodeMemo qnameD qnameC (qnameId n) $ icodeN' A.QName a b value = valueN A.QName instance EmbPrj A.AmbiguousQName where icod_ (A.AmbQ a) = icode a value n = A.AmbQ `fmap` value n instance EmbPrj A.ModuleName where icod_ (A.MName a) = icode a value n = A.MName `fmap` value n instance EmbPrj A.Name where icod_ (A.Name a b c d e) = icodeMemo nameD nameC a $ icodeN' (\ a b -> A.Name a b . underlyingRange) a b (SerialisedRange c) d e value = valueN (\a b c -> A.Name a b (underlyingRange c)) instance EmbPrj a => EmbPrj (C.FieldAssignment' a) where icod_ (C.FieldAssignment a b) = icodeN' C.FieldAssignment a b value = valueN C.FieldAssignment instance (EmbPrj s, EmbPrj t) => EmbPrj (Named s t) where icod_ (Named a b) = icodeN' Named a b value = valueN Named instance EmbPrj a => EmbPrj (Ranged a) where icod_ (Ranged r x) = icodeN' Ranged r x value = valueN Ranged instance EmbPrj ArgInfo where icod_ (ArgInfo h r o fv) = icodeN' ArgInfo h r o fv value = valueN ArgInfo instance EmbPrj NameId where icod_ (NameId a b) = icodeN' NameId a b value = valueN NameId instance (Eq k, Hashable k, EmbPrj k, EmbPrj v) => EmbPrj (HashMap k v) where icod_ m = icode (HMap.toList m) value m = HMap.fromList `fmap` value m instance EmbPrj a => EmbPrj (WithHiding a) where icod_ (WithHiding a b) = icodeN' WithHiding a b value = valueN WithHiding instance EmbPrj a => EmbPrj (Arg a) where icod_ (Arg i e) = icodeN' Arg i e value = valueN Arg instance EmbPrj a => EmbPrj (Dom a) where icod_ (Dom a b c d) = icodeN' Dom a b c d value = valueN Dom instance EmbPrj HasEta where icod_ YesEta = icodeN' YesEta icod_ NoEta = icodeN 1 NoEta value = vcase valu where valu [] = valuN YesEta valu [1] = valuN NoEta valu _ = malformed instance EmbPrj Induction where icod_ Inductive = icodeN' Inductive icod_ CoInductive = icodeN 1 CoInductive value = vcase valu where valu [] = valuN Inductive valu [1] = valuN CoInductive valu _ = malformed instance EmbPrj Hiding where icod_ Hidden = return 0 icod_ NotHidden = return 1 icod_ (Instance NoOverlap) = return 2 icod_ (Instance YesOverlap) = return 3 value 0 = return Hidden value 1 = return NotHidden value 2 = return (Instance NoOverlap) value 3 = return (Instance YesOverlap) value _ = malformed instance EmbPrj Quantity where icod_ Quantity0 = return 0 icod_ Quantity1 = return 1 icod_ Quantityω = return 2 value 0 = return Quantity0 value 1 = return Quantity1 value 2 = return Quantityω value _ = malformed instance EmbPrj Modality where icod_ (Modality a b) = icodeN' Modality a b value = vcase $ \case [a, b] -> valuN Modality a b _ -> malformed instance EmbPrj Relevance where icod_ Relevant = return 0 icod_ Irrelevant = return 1 icod_ NonStrict = return 2 value 0 = return Relevant value 1 = return Irrelevant value 2 = return NonStrict value _ = malformed instance EmbPrj Origin where icod_ UserWritten = return 0 icod_ Inserted = return 1 icod_ Reflected = return 2 icod_ CaseSplit = return 3 icod_ Substitution = return 4 value 0 = return UserWritten value 1 = return Inserted value 2 = return Reflected value 3 = return CaseSplit value 4 = return Substitution value _ = malformed instance EmbPrj FreeVariables where icod_ UnknownFVs = icodeN' UnknownFVs icod_ (KnownFVs a) = icodeN' KnownFVs a value = vcase valu where valu [] = valuN UnknownFVs valu [a] = valuN KnownFVs a valu _ = malformed instance EmbPrj ConOrigin where icod_ ConOSystem = return 0 icod_ ConOCon = return 1 icod_ ConORec = return 2 icod_ ConOSplit = return 3 value 0 = return ConOSystem value 1 = return ConOCon value 2 = return ConORec value 3 = return ConOSplit value _ = malformed instance EmbPrj ProjOrigin where icod_ ProjPrefix = return 0 icod_ ProjPostfix = return 1 icod_ ProjSystem = return 2 value 0 = return ProjPrefix value 1 = return ProjPostfix value 2 = return ProjSystem value _ = malformed instance EmbPrj Agda.Syntax.Literal.Literal where icod_ (LitNat a b) = icodeN' LitNat a b icod_ (LitFloat a b) = icodeN 1 LitFloat a b icod_ (LitString a b) = icodeN 2 LitString a b icod_ (LitChar a b) = icodeN 3 LitChar a b icod_ (LitQName a b) = icodeN 5 LitQName a b icod_ (LitMeta a b c) = icodeN 6 LitMeta a b c icod_ (LitWord64 a b) = icodeN 7 LitWord64 a b value = vcase valu where valu [a, b] = valuN LitNat a b valu [1, a, b] = valuN LitFloat a b valu [2, a, b] = valuN LitString a b valu [3, a, b] = valuN LitChar a b valu [5, a, b] = valuN LitQName a b valu [6, a, b, c] = valuN LitMeta a b c valu [7, a, b] = valuN LitWord64 a b valu _ = malformed instance EmbPrj IsAbstract where icod_ AbstractDef = icodeN 0 AbstractDef icod_ ConcreteDef = icodeN' ConcreteDef value = vcase valu where valu [0] = valuN AbstractDef valu [] = valuN ConcreteDef valu _ = malformed instance EmbPrj Delayed where icod_ Delayed = icodeN 0 Delayed icod_ NotDelayed = icodeN' NotDelayed value = vcase valu where valu [0] = valuN Delayed valu [] = valuN NotDelayed valu _ = malformed instance EmbPrj Impossible where icod_ (Impossible a b) = icodeN 0 Impossible a b icod_ (Unreachable a b) = icodeN 1 Unreachable a b icod_ (ImpMissingDefinitions a b) = icodeN 2 ImpMissingDefinitions a b value = vcase valu where valu [0, a, b] = valuN Impossible a b valu [1, a, b] = valuN Unreachable a b valu [2, a, b] = valuN ImpMissingDefinitions a b valu _ = malformed instance EmbPrj Empty where icod_ a = icod_ =<< lift (Empty.toImpossible a) value = fmap throwImpossible . value Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Internal.hs0000644000000000000000000003602113466402171023627 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Serialise.Instances.Internal where import Control.Monad.State.Strict import Agda.Syntax.Internal as I import Agda.Syntax.Position as P import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Common () import Agda.TypeChecking.Serialise.Instances.Compilers () import Agda.TypeChecking.Monad import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Coverage.SplitTree import Agda.Utils.Permutation #include "undefined.h" import Agda.Utils.Impossible instance EmbPrj Signature where icod_ (Sig a b c) = icodeN' Sig a b c value = valueN Sig instance EmbPrj Section where icod_ (Section a) = icodeN' Section a value = valueN Section instance EmbPrj a => EmbPrj (Tele a) where icod_ EmptyTel = icodeN' EmptyTel icod_ (ExtendTel a b) = icodeN' ExtendTel a b value = vcase valu where valu [] = valuN EmptyTel valu [a, b] = valuN ExtendTel a b valu _ = malformed instance EmbPrj Permutation where icod_ (Perm a b) = icodeN' Perm a b value = valueN Perm instance EmbPrj a => EmbPrj (Drop a) where icod_ (Drop a b) = icodeN' Drop a b value = valueN Drop instance EmbPrj a => EmbPrj (Elim' a) where icod_ (Apply a) = icodeN' Apply a icod_ (IApply x y a) = icodeN 0 IApply x y a icod_ (Proj a b) = icodeN 0 Proj a b value = vcase valu where valu [a] = valuN Apply a valu [0,x,y,a] = valuN IApply x y a valu [0, a, b] = valuN Proj a b valu _ = malformed instance EmbPrj I.ConHead where icod_ (ConHead a b c) = icodeN' ConHead a b c value = valueN ConHead instance (EmbPrj a) => EmbPrj (I.Type' a) where icod_ (El a b) = icodeN' El a b value = valueN El instance EmbPrj a => EmbPrj (I.Abs a) where icod_ (NoAbs a b) = icodeN 0 NoAbs a b icod_ (Abs a b) = icodeN' Abs a b value = vcase valu where valu [a, b] = valuN Abs a b valu [0, a, b] = valuN NoAbs a b valu _ = malformed instance EmbPrj I.Term where icod_ (Var a []) = icodeN' (\ a -> Var a []) a icod_ (Var a b) = icodeN 0 Var a b icod_ (Lam a b) = icodeN 1 Lam a b icod_ (Lit a ) = icodeN 2 Lit a icod_ (Def a b) = icodeN 3 Def a b icod_ (Con a b c) = icodeN 4 Con a b c icod_ (Pi a b) = icodeN 5 Pi a b icod_ (Sort a ) = icodeN 7 Sort a icod_ (MetaV a b) = __IMPOSSIBLE__ icod_ (DontCare a ) = icodeN 8 DontCare a icod_ (Level a ) = icodeN 9 Level a icod_ (Dummy s) = __IMPOSSIBLE__ value = vcase valu where valu [a] = valuN var a valu [0, a, b] = valuN Var a b valu [1, a, b] = valuN Lam a b valu [2, a] = valuN Lit a valu [3, a, b] = valuN Def a b valu [4, a, b, c] = valuN Con a b c valu [5, a, b] = valuN Pi a b valu [7, a] = valuN Sort a valu [8, a] = valuN DontCare a valu [9, a] = valuN Level a valu _ = malformed instance EmbPrj Level where icod_ (Max a) = icodeN' Max a value = valueN Max instance EmbPrj PlusLevel where icod_ (ClosedLevel a) = icodeN' ClosedLevel a icod_ (Plus a b) = icodeN' Plus a b value = vcase valu where valu [a] = valuN ClosedLevel a valu [a, b] = valuN Plus a b valu _ = malformed instance EmbPrj LevelAtom where icod_ (NeutralLevel r a) = icodeN' (NeutralLevel r) a icod_ (UnreducedLevel a) = icodeN 1 UnreducedLevel a icod_ (MetaLevel a b) = __IMPOSSIBLE__ icod_ BlockedLevel{} = __IMPOSSIBLE__ value = vcase valu where valu [a] = valuN UnreducedLevel a -- we forget that we are a NeutralLevel, -- since we do not want do (de)serialize -- the reason for neutrality valu [1, a] = valuN UnreducedLevel a valu _ = malformed instance EmbPrj I.Sort where icod_ (Type a ) = icodeN 0 Type a icod_ (Prop a ) = icodeN 1 Prop a icod_ SizeUniv = icodeN 2 SizeUniv icod_ Inf = icodeN 3 Inf icod_ (PiSort a b) = icodeN 4 PiSort a b icod_ (UnivSort a) = icodeN 5 UnivSort a icod_ (MetaS a b) = __IMPOSSIBLE__ icod_ (DefS a b) = icodeN 6 DefS a b icod_ (DummyS s) = __IMPOSSIBLE__ value = vcase valu where valu [0, a] = valuN Type a valu [1, a] = valuN Prop a valu [2] = valuN SizeUniv valu [3] = valuN Inf valu [4, a, b] = valuN PiSort a b valu [5, a] = valuN UnivSort a valu [6, a, b] = valuN DefS a b valu _ = malformed instance EmbPrj DisplayForm where icod_ (Display a b c) = icodeN' Display a b c value = valueN Display instance EmbPrj a => EmbPrj (Open a) where icod_ (OpenThing a b) = icodeN' OpenThing a b value = valueN OpenThing instance EmbPrj CheckpointId where icod_ (CheckpointId a) = icode a value n = CheckpointId `fmap` value n instance EmbPrj DisplayTerm where icod_ (DTerm a ) = icodeN' DTerm a icod_ (DDot a ) = icodeN 1 DDot a icod_ (DCon a b c) = icodeN 2 DCon a b c icod_ (DDef a b) = icodeN 3 DDef a b icod_ (DWithApp a b c) = icodeN 4 DWithApp a b c value = vcase valu where valu [a] = valuN DTerm a valu [1, a] = valuN DDot a valu [2, a, b, c] = valuN DCon a b c valu [3, a, b] = valuN DDef a b valu [4, a, b, c] = valuN DWithApp a b c valu _ = malformed instance EmbPrj MutualId where icod_ (MutId a) = icode a value n = MutId `fmap` value n instance EmbPrj CompKit where icod_ (CompKit a b) = icodeN' CompKit a b value = valueN CompKit instance EmbPrj Definition where icod_ (Defn a b c d e f g h i j k l m n o p) = icodeN' Defn a b (P.killRange c) d e f g h i j k l m n o p value = valueN Defn instance EmbPrj NLPat where icod_ (PVar a b) = icodeN 0 PVar a b icod_ (PWild) = icodeN 1 PWild icod_ (PDef a b) = icodeN 2 PDef a b icod_ (PLam a b) = icodeN 3 PLam a b icod_ (PPi a b) = icodeN 4 PPi a b icod_ (PBoundVar a b) = icodeN 5 PBoundVar a b icod_ (PTerm a) = icodeN 6 PTerm a value = vcase valu where valu [0, a, b] = valuN PVar a b valu [1] = valuN PWild valu [2, a, b] = valuN PDef a b valu [3, a, b] = valuN PLam a b valu [4, a, b] = valuN PPi a b valu [5, a, b] = valuN PBoundVar a b valu [6, a] = valuN PTerm a valu _ = malformed instance EmbPrj NLPType where icod_ (NLPType a b) = icodeN' NLPType a b value = valueN NLPType instance EmbPrj RewriteRule where icod_ (RewriteRule a b c d e f) = icodeN' RewriteRule a b c d e f value = valueN RewriteRule instance EmbPrj Projection where icod_ (Projection a b c d e) = icodeN' Projection a b c d e value = valueN Projection instance EmbPrj ProjLams where icod_ (ProjLams a) = icodeN' ProjLams a value = valueN ProjLams instance EmbPrj System where icod_ (System a b) = icodeN' System a b value = valueN System instance EmbPrj ExtLamInfo where icod_ (ExtLamInfo a b) = icodeN' ExtLamInfo a b value = valueN ExtLamInfo instance EmbPrj Polarity where icod_ Covariant = return 0 icod_ Contravariant = return 1 icod_ Invariant = return 2 icod_ Nonvariant = return 3 value 0 = return Covariant value 1 = return Contravariant value 2 = return Invariant value 3 = return Nonvariant value _ = malformed instance EmbPrj IsForced where icod_ Forced = return 0 icod_ NotForced = return 1 value 0 = return Forced value 1 = return NotForced value _ = malformed instance EmbPrj NumGeneralizableArgs where icod_ NoGeneralizableArgs = icodeN' NoGeneralizableArgs icod_ (SomeGeneralizableArgs a) = icodeN' SomeGeneralizableArgs a value = vcase valu where valu [] = valuN NoGeneralizableArgs valu [a] = valuN SomeGeneralizableArgs a valu _ = malformed instance EmbPrj DoGeneralize where icod_ YesGeneralize = return 0 icod_ NoGeneralize = return 1 value 0 = return YesGeneralize value 1 = return NoGeneralize value _ = malformed instance EmbPrj Occurrence where icod_ StrictPos = return 0 icod_ Mixed = return 1 icod_ Unused = return 2 icod_ GuardPos = return 3 icod_ JustPos = return 4 icod_ JustNeg = return 5 value 0 = return StrictPos value 1 = return Mixed value 2 = return Unused value 3 = return GuardPos value 4 = return JustPos value 5 = return JustNeg value _ = malformed instance EmbPrj EtaEquality where icod_ (Specified a) = icodeN 0 Specified a icod_ (Inferred a) = icodeN 1 Inferred a value = vcase valu where valu [0,a] = valuN Specified a valu [1,a] = valuN Inferred a valu _ = malformed instance EmbPrj Defn where icod_ Axiom = icodeN 0 Axiom icod_ (Function a b s t (_:_) c d e f g h i j k m) = __IMPOSSIBLE__ icod_ (Function a b s t [] c d e f g h i j k m) = icodeN 1 (\ a b s -> Function a b s t []) a b s c d e f g h i j k m icod_ (Datatype a b c d e f g h i) = icodeN 2 Datatype a b c d e f g h i icod_ (Record a b c d e f g h i j k) = icodeN 3 Record a b c d e f g h i j k icod_ (Constructor a b c d e f g h i) = icodeN 4 Constructor a b c d e f g h i icod_ (Primitive a b c d e) = icodeN 5 Primitive a b c d e icod_ AbstractDefn{} = __IMPOSSIBLE__ icod_ GeneralizableVar = icodeN 6 GeneralizableVar icod_ DataOrRecSig{} = __IMPOSSIBLE__ value = vcase valu where valu [0] = valuN Axiom valu [1, a, b, s, c, d, e, f, g, h, i, j, k, m] = valuN (\ a b s -> Function a b s Nothing []) a b s c d e f g h i j k m valu [2, a, b, c, d, e, f, g, h, i] = valuN Datatype a b c d e f g h i valu [3, a, b, c, d, e, f, g, h, i, j, k] = valuN Record a b c d e f g h i j k valu [4, a, b, c, d, e, f, g, h, i] = valuN Constructor a b c d e f g h i valu [5, a, b, c, d, e] = valuN Primitive a b c d e valu [6] = valuN GeneralizableVar valu _ = malformed instance EmbPrj SplitTag where icod_ (SplitCon c) = icodeN 0 SplitCon c icod_ (SplitLit l) = icodeN 1 SplitLit l icod_ SplitCatchall = icodeN' SplitCatchall value = vcase valu where valu [] = valuN SplitCatchall valu [0, c] = valuN SplitCon c valu [1, l] = valuN SplitLit l valu _ = malformed instance EmbPrj a => EmbPrj (SplitTree' a) where icod_ (SplittingDone a) = icodeN' SplittingDone a icod_ (SplitAt a b) = icodeN 0 SplitAt a b value = vcase valu where valu [a] = valuN SplittingDone a valu [0, a, b] = valuN SplitAt a b valu _ = malformed instance EmbPrj FunctionFlag where icod_ FunStatic = icodeN 0 FunStatic icod_ FunInline = icodeN 1 FunInline icod_ FunMacro = icodeN 2 FunMacro value = vcase valu where valu [0] = valuN FunStatic valu [1] = valuN FunInline valu [2] = valuN FunMacro valu _ = malformed instance EmbPrj a => EmbPrj (WithArity a) where icod_ (WithArity a b) = icodeN' WithArity a b value = valueN WithArity instance EmbPrj a => EmbPrj (Case a) where icod_ (Branches a b c d e f g) = icodeN' Branches a b c d e f g value = valueN Branches instance EmbPrj CompiledClauses where icod_ Fail = icodeN' Fail icod_ (Done a b) = icodeN' Done a (P.killRange b) icod_ (Case a b) = icodeN 2 Case a b value = vcase valu where valu [] = valuN Fail valu [a, b] = valuN Done a b valu [2, a, b] = valuN Case a b valu _ = malformed instance EmbPrj a => EmbPrj (FunctionInverse' a) where icod_ NotInjective = icodeN' NotInjective icod_ (Inverse a) = icodeN' Inverse a value = vcase valu where valu [] = valuN NotInjective valu [a] = valuN Inverse a valu _ = malformed instance EmbPrj TermHead where icod_ SortHead = icodeN' SortHead icod_ PiHead = icodeN 1 PiHead icod_ (ConsHead a) = icodeN 2 ConsHead a icod_ (VarHead a) = icodeN 3 VarHead a icod_ UnknownHead = icodeN 4 UnknownHead value = vcase valu where valu [] = valuN SortHead valu [1] = valuN PiHead valu [2, a] = valuN ConsHead a valu [3, a] = valuN VarHead a valu [4] = valuN UnknownHead valu _ = malformed instance EmbPrj I.Clause where icod_ (Clause a b c d e f g h) = icodeN' Clause a b c d e f g h value = valueN Clause instance EmbPrj I.ConPatternInfo where icod_ (ConPatternInfo a b c d) = icodeN' ConPatternInfo a b c d value = valueN ConPatternInfo instance EmbPrj I.DBPatVar where icod_ (DBPatVar a b) = icodeN' DBPatVar a b value = valueN DBPatVar instance EmbPrj I.PatOrigin where icod_ PatOSystem = icodeN' PatOSystem icod_ PatOSplit = icodeN 1 PatOSplit icod_ (PatOVar a) = icodeN 2 PatOVar a icod_ PatODot = icodeN 3 PatODot icod_ PatOWild = icodeN 4 PatOWild icod_ PatOCon = icodeN 5 PatOCon icod_ PatORec = icodeN 6 PatORec icod_ PatOLit = icodeN 7 PatOLit icod_ PatOAbsurd = icodeN 8 PatOAbsurd value = vcase valu where valu [] = valuN PatOSystem valu [1] = valuN PatOSplit valu [2, a] = valuN PatOVar a valu [3] = valuN PatODot valu [4] = valuN PatOWild valu [5] = valuN PatOCon valu [6] = valuN PatORec valu [7] = valuN PatOLit valu [8] = valuN PatOAbsurd valu _ = malformed instance EmbPrj a => EmbPrj (I.Pattern' a) where icod_ (VarP a b ) = icodeN 0 VarP a b icod_ (ConP a b c) = icodeN 1 ConP a b c icod_ (LitP a ) = icodeN 2 LitP a icod_ (DotP a b ) = icodeN 3 DotP a b icod_ (ProjP a b ) = icodeN 4 ProjP a b icod_ (IApplyP a b c d) = icodeN 5 IApplyP a b c d icod_ (DefP a b c) = icodeN 6 DefP a b c value = vcase valu where valu [0, a, b] = valuN VarP a b valu [1, a, b, c] = valuN ConP a b c valu [2, a] = valuN LitP a valu [3, a, b] = valuN DotP a b valu [4, a, b] = valuN ProjP a b valu [5, a, b, c, d] = valuN IApplyP a b c d valu [6, a, b, c] = valuN DefP a b c valu _ = malformed instance EmbPrj a => EmbPrj (Builtin a) where icod_ (Prim a) = icodeN' Prim a icod_ (Builtin a) = icodeN 1 Builtin a value = vcase valu where valu [a] = valuN Prim a valu [1, a] = valuN Builtin a valu _ = malformed instance EmbPrj a => EmbPrj (Substitution' a) where icod_ IdS = icodeN' IdS icod_ (EmptyS a) = icodeN 1 EmptyS a icod_ (a :# b) = icodeN 2 (:#) a b icod_ (Strengthen a b) = icodeN 3 Strengthen a b icod_ (Wk a b) = icodeN 4 Wk a b icod_ (Lift a b) = icodeN 5 Lift a b value = vcase valu where valu [] = valuN IdS valu [1, a] = valuN EmptyS a valu [2, a, b] = valuN (:#) a b valu [3, a, b] = valuN Strengthen a b valu [4, a, b] = valuN Wk a b valu [5, a, b] = valuN Lift a b valu _ = malformed Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Compilers.hs0000644000000000000000000000120213466402171024001 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fwarn-unused-imports #-} module Agda.TypeChecking.Serialise.Instances.Compilers where import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Common import Agda.TypeChecking.Monad instance EmbPrj CompilerPragma where icod_ (CompilerPragma a b) = icodeN' (CompilerPragma . underlyingRange) (SerialisedRange a) b value = valueN (CompilerPragma . underlyingRange) instance EmbPrj ForeignCode where icod_ (ForeignCode r a) = icodeN' (ForeignCode . underlyingRange) (SerialisedRange r) a value = valueN (ForeignCode . underlyingRange) Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Highlighting.hs0000644000000000000000000000775313466402171024472 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Serialise.Instances.Highlighting where import qualified Agda.Interaction.Highlighting.Range as HR import qualified Agda.Interaction.Highlighting.Precise as HP import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Common () instance EmbPrj HR.Range where icod_ (HR.Range a b) = icodeN' HR.Range a b value = valueN HR.Range instance EmbPrj HP.NameKind where icod_ HP.Bound = icodeN' HP.Bound icod_ (HP.Constructor a) = icodeN 1 HP.Constructor a icod_ HP.Datatype = icodeN 2 () icod_ HP.Field = icodeN 3 () icod_ HP.Function = icodeN 4 () icod_ HP.Module = icodeN 5 () icod_ HP.Postulate = icodeN 6 () icod_ HP.Primitive = icodeN 7 () icod_ HP.Record = icodeN 8 () icod_ HP.Argument = icodeN 9 () icod_ HP.Macro = icodeN 10 () icod_ HP.Generalizable = icodeN 11 () value = vcase valu where valu [] = valuN HP.Bound valu [1 , a] = valuN HP.Constructor a valu [2] = valuN HP.Datatype valu [3] = valuN HP.Field valu [4] = valuN HP.Function valu [5] = valuN HP.Module valu [6] = valuN HP.Postulate valu [7] = valuN HP.Primitive valu [8] = valuN HP.Record valu [9] = valuN HP.Argument valu [10] = valuN HP.Macro valu [11] = valuN HP.Generalizable valu _ = malformed instance EmbPrj HP.Aspect where icod_ HP.Comment = icodeN 0 () icod_ HP.Keyword = icodeN 1 () icod_ HP.String = icodeN 2 () icod_ HP.Number = icodeN 3 () icod_ HP.Symbol = icodeN' HP.Symbol icod_ HP.PrimitiveType = icodeN 4 () icod_ (HP.Name mk b) = icodeN 5 HP.Name mk b icod_ HP.Pragma = icodeN 6 () icod_ HP.Background = icodeN 7 () icod_ HP.Markup = icodeN 8 () value = vcase valu where valu [0] = valuN HP.Comment valu [1] = valuN HP.Keyword valu [2] = valuN HP.String valu [3] = valuN HP.Number valu [] = valuN HP.Symbol valu [4] = valuN HP.PrimitiveType valu [5, mk, b] = valuN HP.Name mk b valu [6] = valuN HP.Pragma valu [7] = valuN HP.Background valu [8] = valuN HP.Markup valu _ = malformed instance EmbPrj HP.OtherAspect where icod_ HP.Error = icodeN 0 () icod_ HP.DottedPattern = icodeN' HP.DottedPattern icod_ HP.UnsolvedMeta = icodeN 2 () icod_ HP.TerminationProblem = icodeN 3 () icod_ HP.IncompletePattern = icodeN 4 () icod_ HP.TypeChecks = icodeN 5 () icod_ HP.UnsolvedConstraint = icodeN 6 () icod_ HP.PositivityProblem = icodeN 7 () icod_ HP.Deadcode = icodeN 8 () icod_ HP.CoverageProblem = icodeN 9 () icod_ HP.CatchallClause = icodeN 10 () value = vcase valu where valu [0] = valuN HP.Error valu [] = valuN HP.DottedPattern valu [2] = valuN HP.UnsolvedMeta valu [3] = valuN HP.TerminationProblem valu [4] = valuN HP.IncompletePattern valu [5] = valuN HP.TypeChecks valu [6] = valuN HP.UnsolvedConstraint valu [7] = valuN HP.PositivityProblem valu [8] = valuN HP.Deadcode valu [9] = valuN HP.CoverageProblem valu [10] = valuN HP.CatchallClause valu _ = malformed instance EmbPrj HP.Aspects where icod_ (HP.Aspects a b c d e) = icodeN' HP.Aspects a b c d e value = valueN HP.Aspects instance EmbPrj HP.DefinitionSite where icod_ (HP.DefinitionSite a b c d) = icodeN' HP.DefinitionSite a b c d value = valueN HP.DefinitionSite instance EmbPrj HP.CompressedFile where icod_ (HP.CompressedFile f) = icodeN' HP.CompressedFile f value = valueN HP.CompressedFile instance EmbPrj HP.TokenBased where icod_ HP.TokenBased = icodeN 0 () icod_ HP.NotOnlyTokenBased = icodeN' HP.NotOnlyTokenBased value = vcase valu where valu [0] = valuN HP.TokenBased valu [] = valuN HP.NotOnlyTokenBased valu _ = malformed Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Abstract.hs0000644000000000000000000001543613466402171023625 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Serialise.Instances.Abstract where import qualified Data.Map as Map import qualified Data.Set as Set import Agda.Syntax.Common import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Info import Agda.Syntax.Scope.Base import Agda.Syntax.Position as P import Agda.Syntax.Fixity import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Common () import Agda.TypeChecking.Monad import Agda.Utils.Except #include "undefined.h" import Agda.Utils.Impossible instance EmbPrj A.BindName where icod_ (A.BindName n) = icodeN' A.BindName n value = valueN A.BindName instance EmbPrj Scope where icod_ (Scope a b c d e) = icodeN' Scope a b c d e value = valueN Scope instance EmbPrj NameSpaceId where icod_ PublicNS = icodeN' PublicNS icod_ PrivateNS = icodeN 1 PrivateNS icod_ ImportedNS = icodeN 2 ImportedNS icod_ OnlyQualifiedNS = icodeN 3 OnlyQualifiedNS value = vcase valu where valu [] = valuN PublicNS valu [1] = valuN PrivateNS valu [2] = valuN ImportedNS valu [3] = valuN OnlyQualifiedNS valu _ = malformed instance EmbPrj Access where icod_ (PrivateAccess UserWritten) = icodeN 0 () icod_ PrivateAccess{} = icodeN 1 () icod_ PublicAccess = icodeN' PublicAccess icod_ OnlyQualified = icodeN 2 () value = vcase valu where valu [0] = valuN $ PrivateAccess UserWritten valu [1] = valuN $ PrivateAccess Inserted valu [] = valuN PublicAccess valu [2] = valuN OnlyQualified valu _ = malformed instance EmbPrj NameSpace where icod_ (NameSpace a b c) = icodeN' NameSpace a b c value = valueN NameSpace instance EmbPrj WhyInScope where icod_ Defined = icodeN' Defined icod_ (Opened a b) = icodeN 0 Opened a b icod_ (Applied a b) = icodeN 1 Applied a b value = vcase valu where valu [] = valuN Defined valu [0, a, b] = valuN Opened a b valu [1, a, b] = valuN Applied a b valu _ = malformed instance EmbPrj AbstractName where icod_ (AbsName a b c d) = icodeN' AbsName a b c d value = valueN AbsName instance EmbPrj NameMetadata where icod_ NoMetadata = icodeN' NoMetadata icod_ (GeneralizedVarsMetadata a) = icodeN' GeneralizedVarsMetadata a value = vcase valu where valu [] = valuN NoMetadata valu [a] = valuN GeneralizedVarsMetadata a valu _ = malformed instance EmbPrj AbstractModule where icod_ (AbsModule a b) = icodeN' AbsModule a b value = valueN AbsModule instance EmbPrj KindOfName where icod_ DefName = icodeN' DefName icod_ ConName = icodeN 1 ConName icod_ FldName = icodeN 2 FldName icod_ PatternSynName = icodeN 3 PatternSynName icod_ QuotableName = icodeN 4 QuotableName icod_ MacroName = icodeN 5 MacroName icod_ GeneralizeName = icodeN 6 GeneralizeName icod_ DisallowedGeneralizeName = icodeN 7 DisallowedGeneralizeName value = vcase valu where valu [] = valuN DefName valu [1] = valuN ConName valu [2] = valuN FldName valu [3] = valuN PatternSynName valu [4] = valuN QuotableName valu [5] = valuN MacroName valu [6] = valuN GeneralizeName valu [7] = valuN DisallowedGeneralizeName valu _ = malformed instance EmbPrj Binder where icod_ LambdaBound = icodeN' LambdaBound icod_ PatternBound = icodeN 1 PatternBound icod_ LetBound = icodeN 2 LetBound value = vcase valu where valu [] = valuN LambdaBound valu [1] = valuN PatternBound valu [2] = valuN LetBound valu _ = malformed instance EmbPrj LocalVar where icod_ (LocalVar a b c) = icodeN' LocalVar a b c value = valueN LocalVar instance EmbPrj ConPatInfo where icod_ (ConPatInfo a _ b) = icodeN' (\a b -> ConPatInfo a patNoRange b) a b value = valueN $ \a b -> ConPatInfo a patNoRange b instance EmbPrj ConPatLazy -- Only for pattern synonyms (where a is Void) instance EmbPrj a => EmbPrj (A.Pattern' a) where icod_ (A.VarP a) = icodeN 0 A.VarP a icod_ (A.ConP a b c) = icodeN 1 A.ConP a b c icod_ (A.DefP p a b) = icodeN 2 (A.DefP p) a b icod_ t@(A.WildP p) = icodeN 3 t icod_ (A.AsP p a b) = icodeN 4 (A.AsP p) a b icod_ (A.DotP p a) = icodeN 5 (A.DotP p) a icod_ t@(A.AbsurdP _) = icodeN 6 t icod_ (A.LitP a) = icodeN 7 A.LitP a icod_ (A.ProjP p a b) = icodeN 8 (A.ProjP p) a b icod_ (A.PatternSynP p a b) = icodeN 9 (A.PatternSynP p) a b icod_ (A.RecP p a) = icodeN 10 (A.RecP p) a icod_ (A.EqualP _ a) = __IMPOSSIBLE__ icod_ (A.WithP i a) = icodeN 11 (A.WithP i) a value = vcase valu where valu [0, a] = valuN A.VarP a valu [1, a, b, c] = valuN A.ConP a b c valu [2, a, b] = valuN (A.DefP i) a b valu [3] = valuN (A.WildP i) valu [4, a, b] = valuN (A.AsP i) a b valu [5, a] = valuN (A.DotP i) a valu [6] = valuN (A.AbsurdP i) valu [7, a] = valuN (A.LitP) a valu [8, a, b] = valuN (A.ProjP i) a b valu [9, a, b] = valuN (A.PatternSynP i) a b valu [10, a] = valuN (A.RecP i) a valu [11, a] = valuN (A.WithP i) a valu _ = malformed i = patNoRange instance EmbPrj ParenPreference where icod_ PreferParen = icodeN' PreferParen icod_ PreferParenless = icodeN 1 PreferParenless value = vcase valu where valu [] = valuN PreferParen valu [1] = valuN PreferParenless valu _ = malformed instance EmbPrj Precedence where icod_ TopCtx = icodeN' TopCtx icod_ FunctionSpaceDomainCtx = icodeN 1 FunctionSpaceDomainCtx icod_ (LeftOperandCtx a) = icodeN 2 LeftOperandCtx a icod_ (RightOperandCtx a b) = icodeN 3 RightOperandCtx a b icod_ FunctionCtx = icodeN 4 FunctionCtx icod_ (ArgumentCtx a) = icodeN 5 ArgumentCtx a icod_ InsideOperandCtx = icodeN 6 InsideOperandCtx icod_ WithFunCtx = icodeN 7 WithFunCtx icod_ WithArgCtx = icodeN 8 WithArgCtx icod_ DotPatternCtx = icodeN 9 DotPatternCtx value = vcase valu where valu [] = valuN TopCtx valu [1] = valuN FunctionSpaceDomainCtx valu [2, a] = valuN LeftOperandCtx a valu [3, a, b] = valuN RightOperandCtx a b valu [4] = valuN FunctionCtx valu [5, a] = valuN ArgumentCtx a valu [6] = valuN InsideOperandCtx valu [7] = valuN WithFunCtx valu [8] = valuN WithArgCtx valu [9] = valuN DotPatternCtx valu _ = malformed instance EmbPrj ScopeInfo where icod_ (ScopeInfo a b c d e f g h i j) = icodeN' (\ a b c d e -> ScopeInfo a b c d e f g h i j) a b c d e value = valueN (\ a b c d e -> ScopeInfo a b c d e Map.empty Map.empty Set.empty Map.empty Map.empty) Agda-2.6.0.1/src/full/Agda/TypeChecking/Serialise/Instances/Errors.hs0000644000000000000000000002264413466402171023335 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Serialise.Instances.Errors where import Data.Maybe import Control.Monad import Agda.TypeChecking.Serialise.Base import Agda.TypeChecking.Serialise.Instances.Common import Agda.TypeChecking.Serialise.Instances.Internal () import Agda.TypeChecking.Serialise.Instances.Abstract () import Agda.Syntax.Common import Agda.Syntax.Concrete.Definitions (DeclarationWarning(..)) import Agda.Syntax.Abstract.Name (ModuleName) import Agda.TypeChecking.Monad.Base import Agda.Interaction.Options import Agda.Interaction.Options.Warnings import Agda.Interaction.Library import Agda.Interaction.Library.Parse import Agda.Termination.CutOff import Agda.TypeChecking.Positivity.Occurrence () import Agda.Syntax.Parser.Monad (ParseWarning( OverlappingTokensWarning )) import Agda.Utils.Pretty import Agda.Utils.FileName () import Agda.Utils.Lens #include "undefined.h" import Agda.Utils.Impossible instance EmbPrj TCWarning where icod_ (TCWarning a b c d) = icodeN' TCWarning a b c d value = valueN TCWarning -- We don't need to serialise warnings that turn into errors instance EmbPrj Warning where icod_ (TerminationIssue a) = __IMPOSSIBLE__ icod_ (UnreachableClauses a b) = icodeN 0 UnreachableClauses a b icod_ (CoverageIssue a b) = __IMPOSSIBLE__ icod_ (NotStrictlyPositive a b) = __IMPOSSIBLE__ icod_ (UnsolvedMetaVariables a) = __IMPOSSIBLE__ icod_ (UnsolvedInteractionMetas a) = __IMPOSSIBLE__ icod_ (UnsolvedConstraints a) = __IMPOSSIBLE__ icod_ (OldBuiltin a b) = icodeN 1 OldBuiltin a b icod_ EmptyRewritePragma = icodeN 2 EmptyRewritePragma icod_ UselessPublic = icodeN 3 UselessPublic icod_ (UselessInline a) = icodeN 4 UselessInline a icod_ (GenericWarning a) = icodeN 5 GenericWarning a icod_ (GenericNonFatalError a) = __IMPOSSIBLE__ icod_ (SafeFlagPostulate a) = __IMPOSSIBLE__ icod_ (SafeFlagPragma a) = __IMPOSSIBLE__ icod_ SafeFlagNonTerminating = __IMPOSSIBLE__ icod_ SafeFlagTerminating = __IMPOSSIBLE__ icod_ SafeFlagWithoutKFlagPrimEraseEquality = __IMPOSSIBLE__ icod_ SafeFlagNoPositivityCheck = __IMPOSSIBLE__ icod_ SafeFlagPolarity = __IMPOSSIBLE__ icod_ SafeFlagNoUniverseCheck = __IMPOSSIBLE__ icod_ (ParseWarning a) = __IMPOSSIBLE__ icod_ (DeprecationWarning a b c) = icodeN 6 DeprecationWarning a b c icod_ (NicifierIssue a) = icodeN 7 NicifierIssue a icod_ (InversionDepthReached a) = icodeN 8 InversionDepthReached a icod_ (UserWarning a) = icodeN 9 UserWarning a icod_ (AbsurdPatternRequiresNoRHS a) = icodeN 10 AbsurdPatternRequiresNoRHS a icod_ (ModuleDoesntExport a b) = icodeN 11 ModuleDoesntExport a b icod_ (LibraryWarning a) = icodeN 12 LibraryWarning a icod_ (CoverageNoExactSplit a b) = icodeN 13 CoverageNoExactSplit a b icod_ (CantGeneralizeOverSorts a) = icodeN 14 CantGeneralizeOverSorts a icod_ (IllformedAsClause a) = icodeN 15 IllformedAsClause a icod_ WithoutKFlagPrimEraseEquality = icodeN 16 WithoutKFlagPrimEraseEquality icod_ (InstanceWithExplicitArg a) = icodeN 17 InstanceWithExplicitArg a icod_ (InfectiveImport a b) = icodeN 18 InfectiveImport a b icod_ (CoInfectiveImport a b) = icodeN 19 CoInfectiveImport a b icod_ (InstanceNoOutputTypeName a) = icodeN 20 InstanceNoOutputTypeName a icod_ (InstanceArgWithExplicitArg a) = icodeN 21 InstanceArgWithExplicitArg a icod_ WrongInstanceDeclaration = icodeN 22 WrongInstanceDeclaration value = vcase valu where valu [0, a, b] = valuN UnreachableClauses a b valu [1, a, b] = valuN OldBuiltin a b valu [2] = valuN EmptyRewritePragma valu [3] = valuN UselessPublic valu [4, a] = valuN UselessInline a valu [5, a] = valuN GenericWarning a valu [6, a, b, c] = valuN DeprecationWarning a b c valu [7, a] = valuN NicifierIssue a valu [8, a] = valuN InversionDepthReached a valu [9, a] = valuN UserWarning a valu [10, a] = valuN AbsurdPatternRequiresNoRHS a valu [11, a, b] = valuN ModuleDoesntExport a b valu [12, a] = valuN LibraryWarning a valu [13, a, b] = valuN CoverageNoExactSplit a b valu [14, a] = valuN CantGeneralizeOverSorts a valu [15, a] = valuN IllformedAsClause a valu [16] = valuN WithoutKFlagPrimEraseEquality valu [17, a] = valuN InstanceWithExplicitArg a valu [18, a, b] = valuN InfectiveImport a b valu [19, a, b] = valuN CoInfectiveImport a b valu [20, a] = valuN InstanceNoOutputTypeName a valu [21, a] = valuN InstanceArgWithExplicitArg a valu [22] = valuN WrongInstanceDeclaration valu _ = malformed instance EmbPrj DeclarationWarning where icod_ = \case UnknownNamesInFixityDecl a -> icodeN 0 UnknownNamesInFixityDecl a UnknownNamesInPolarityPragmas a -> icodeN 1 UnknownNamesInPolarityPragmas a PolarityPragmasButNotPostulates a -> icodeN 2 PolarityPragmasButNotPostulates a UselessPrivate a -> icodeN 3 UselessPrivate a UselessAbstract a -> icodeN 4 UselessAbstract a UselessInstance a -> icodeN 5 UselessInstance a EmptyMutual a -> icodeN 6 EmptyMutual a EmptyAbstract a -> icodeN 7 EmptyAbstract a EmptyPrivate a -> icodeN 8 EmptyPrivate a EmptyInstance a -> icodeN 9 EmptyInstance a EmptyMacro a -> icodeN 10 EmptyMacro a EmptyPostulate a -> icodeN 11 EmptyPostulate a InvalidTerminationCheckPragma a -> icodeN 12 InvalidTerminationCheckPragma a InvalidNoPositivityCheckPragma a -> icodeN 13 InvalidNoPositivityCheckPragma a InvalidCatchallPragma a -> icodeN 14 InvalidCatchallPragma a InvalidNoUniverseCheckPragma a -> icodeN 15 InvalidNoUniverseCheckPragma a UnknownFixityInMixfixDecl a -> icodeN 16 UnknownFixityInMixfixDecl a MissingDefinitions a -> icodeN 17 MissingDefinitions a NotAllowedInMutual r a -> icodeN 18 NotAllowedInMutual r a PragmaNoTerminationCheck r -> icodeN 19 PragmaNoTerminationCheck r EmptyGeneralize a -> icodeN 20 EmptyGeneralize a PragmaCompiled r -> icodeN 21 PragmaCompiled r EmptyPrimitive a -> icodeN 22 EmptyPrimitive a value = vcase $ \case [0, a] -> valuN UnknownNamesInFixityDecl a [1, a] -> valuN UnknownNamesInPolarityPragmas a [2, a] -> valuN PolarityPragmasButNotPostulates a [3, a] -> valuN UselessPrivate a [4, a] -> valuN UselessAbstract a [5, a] -> valuN UselessInstance a [6, a] -> valuN EmptyMutual a [7, a] -> valuN EmptyAbstract a [8, a] -> valuN EmptyPrivate a [9, a] -> valuN EmptyInstance a [10,a] -> valuN EmptyMacro a [11,a] -> valuN EmptyPostulate a [12,a] -> valuN InvalidTerminationCheckPragma a [13,a] -> valuN InvalidNoPositivityCheckPragma a [14,a] -> valuN InvalidCatchallPragma a [15,a] -> valuN InvalidNoUniverseCheckPragma a [16,a] -> valuN UnknownFixityInMixfixDecl a [17,a] -> valuN MissingDefinitions a [18,r,a] -> valuN NotAllowedInMutual r a [19,r] -> valuN PragmaNoTerminationCheck r [20,a] -> valuN EmptyGeneralize a [21,a] -> valuN PragmaCompiled a [22,a] -> valuN EmptyPrimitive a _ -> malformed instance EmbPrj LibWarning where icod_ = \case LibWarning a b -> icodeN 0 LibWarning a b value = vcase $ \case [0, a, b] -> valuN LibWarning a b _ -> malformed instance EmbPrj LibWarning' where icod_ = \case UnknownField a -> icodeN 0 UnknownField a value = vcase $ \case [0, a] -> valuN UnknownField a _ -> malformed instance EmbPrj LibPositionInfo where icod_ = \case LibPositionInfo a b c -> icodeN 0 LibPositionInfo a b c value = vcase $ \case [0, a, b, c] -> valuN LibPositionInfo a b c _ -> malformed instance EmbPrj Doc where icod_ d = icodeN' (undefined :: String -> Doc) (render d) value = valueN text instance EmbPrj PragmaOptions where icod_ = \case PragmaOptions a b c d e f g h i j k l m n o p q r s t u v w x y z aa bb cc dd ee ff gg hh ii jj kk ll mm -> icodeN' PragmaOptions a b c d e f g h i j k l m n o p q r s t u v w x y z aa bb cc dd ee ff gg hh ii jj kk ll mm value = vcase $ \case [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm] -> valuN PragmaOptions a b c d e f g h i j k l m n o p q r s t u v w x y z aa bb cc dd ee ff gg hh ii jj kk ll mm _ -> malformed instance EmbPrj WarningMode where icod_ = \case WarningMode a b -> icodeN' WarningMode a b value = vcase $ \case [a, b] -> valuN WarningMode a b _ -> malformed instance EmbPrj WarningName where icod_ x = icod_ (warningName2String x) value = (maybe malformed return . string2WarningName) <=< value instance EmbPrj CutOff where icod_ = \case DontCutOff -> icodeN' DontCutOff CutOff a -> icodeN 0 CutOff a value = vcase valu where valu [] = valuN DontCutOff valu [0,a] = valuN CutOff a valu _ = malformed Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/0000755000000000000000000000000013466402171016704 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Options.hs-boot0000644000000000000000000000056013466402171021635 0ustar0000000000000000module Agda.TypeChecking.Monad.Options where import Control.Monad.Reader import Agda.TypeChecking.Monad.Base import Agda.Utils.FileName getIncludeDirs :: TCM [AbsolutePath] type VerboseKey = String hasVerbosity :: HasOptions m => VerboseKey -> Int -> m Bool verboseS :: (MonadTCEnv m, HasOptions m) => VerboseKey -> Int -> m () -> m () enableCaching :: TCM Bool Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Trace.hs0000644000000000000000000001111613466402171020276 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Trace where import Prelude hiding (null) import Control.Monad.Reader import {-# SOURCE #-} Agda.Interaction.Highlighting.Generate (highlightAsTypeChecked) import Agda.Syntax.Position import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.Utils.Function import Agda.Utils.Maybe import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty (prettyShow) #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Trace --------------------------------------------------------------------------- interestingCall :: Closure Call -> Bool interestingCall cl = case clValue cl of InferVar{} -> False InferDef{} -> False CheckArguments _ [] _ _ -> False SetRange{} -> False NoHighlighting{} -> False _ -> True traceCallM :: (MonadTCM tcm, MonadDebug tcm) => tcm Call -> tcm a -> tcm a traceCallM mkCall m = flip traceCall m =<< mkCall -- | Record a function call in the trace. -- RULE left-hand side too complicated to desugar -- {-# SPECIALIZE traceCall :: Call -> TCM a -> TCM a #-} traceCall :: (MonadTCM tcm, MonadDebug tcm) => Call -> tcm a -> tcm a traceCall mkCall m = do let call = mkCall callRange = getRange call -- Andreas, 2016-09-13 issue #2177 -- Since the fix of #2092 we may report an error outside the current file. -- (For instance, if we import a module which then happens to have the -- wrong name.) -- Thus, we no longer crash, but just report the alien range. -- -- Andreas, 2015-02-09 Make sure we do not set a range -- -- outside the current file verboseS "check.ranges" 90 $ Strict.whenJust (rangeFile callRange) $ \f -> do currentFile <- asksTC envCurrentPath when (currentFile /= Just f) $ do reportSLn "check.ranges" 90 $ prettyShow call ++ " is setting the current range to " ++ show callRange ++ " which is outside of the current file " ++ show currentFile cl <- liftTCM $ buildClosure call let trace = localTC $ foldr (.) id $ [ \e -> e { envCall = Just cl } | interestingCall cl ] ++ [ \e -> e { envHighlightingRange = callRange } | callRange /= noRange && highlightCall call || isNoHighlighting call ] ++ [ \e -> e { envRange = callRange } | callRange /= noRange ] wrap <- ifM (do l <- envHighlightingLevel <$> askTC return (l == Interactive && highlightCall call)) (do oldRange <- envHighlightingRange <$> askTC return $ highlightAsTypeChecked oldRange callRange) (return id) wrap $ trace m where -- | Should the given call trigger interactive highlighting? highlightCall call = case call of CheckClause{} -> True CheckPattern{} -> True CheckLetBinding{} -> True InferExpr{} -> True CheckExprCall{} -> True CheckDotPattern{} -> True CheckPatternShadowing{} -> True IsTypeCall{} -> True IsType_{} -> True InferVar{} -> True InferDef{} -> True CheckArguments{} -> True CheckTargetType{} -> False CheckDataDef{} -> True CheckRecDef{} -> True CheckConstructor{} -> True CheckConstructorFitsIn{} -> False CheckFunDefCall{} -> True CheckPragma{} -> True CheckPrimitive{} -> True CheckIsEmpty{} -> True CheckWithFunctionType{} -> True CheckSectionApplication{} -> True CheckNamedWhere{} -> False ScopeCheckExpr{} -> False ScopeCheckDeclaration{} -> False ScopeCheckLHS{} -> False NoHighlighting{} -> True CheckProjection{} -> False SetRange{} -> False ModuleContents{} -> False isNoHighlighting NoHighlighting{} = True isNoHighlighting _ = False getCurrentRange :: (MonadTCM tcm, MonadDebug tcm) => tcm Range getCurrentRange = asksTC envRange -- | Sets the current range (for error messages etc.) to the range -- of the given object, if it has a range (i.e., its range is not 'noRange'). setCurrentRange :: (MonadTCM tcm, MonadDebug tcm, HasRange x) => x -> tcm a -> tcm a setCurrentRange x = applyUnless (null r) $ traceCall $ SetRange r where r = getRange x Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Debug.hs0000644000000000000000000001112013466402171020261 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Debug where import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.Maybe import Control.Monad.Writer import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup, (<>), Any(..) ) import Data.Traversable import {-# SOURCE #-} Agda.TypeChecking.Errors import Agda.TypeChecking.Monad.Base import {-# SOURCE #-} Agda.TypeChecking.Monad.Options import Agda.Interaction.Response import Agda.Utils.Except import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.ListT import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible class (Functor m, Applicative m, Monad m) => MonadDebug m where displayDebugMessage :: Int -> String -> m () displayDebugMessage n s = traceDebugMessage n s $ return () traceDebugMessage :: Int -> String -> m a -> m a traceDebugMessage n s cont = displayDebugMessage n s >> cont formatDebugMessage :: VerboseKey -> Int -> TCM Doc -> m String instance (MonadIO m) => MonadDebug (TCMT m) where displayDebugMessage n s = liftTCM $ do cb <- getsTC $ stInteractionOutputCallback . stPersistentState cb (Resp_RunningInfo n s) formatDebugMessage k n d = liftTCM $ show <$> d `catchError` \ err -> (\ s -> (sep $ map text [ "Printing debug message" , k ++ ":" ++show n , "failed due to error:" ]) $$ (nest 2 $ text s)) <$> prettyError err instance MonadDebug m => MonadDebug (ExceptT e m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d instance MonadDebug m => MonadDebug (ListT m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d instance MonadDebug m => MonadDebug (MaybeT m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d instance MonadDebug m => MonadDebug (ReaderT r m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d instance MonadDebug m => MonadDebug (StateT s m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d instance (MonadDebug m, Monoid w) => MonadDebug (WriterT w m) where displayDebugMessage n s = lift $ displayDebugMessage n s formatDebugMessage k n d = lift $ formatDebugMessage k n d -- | Conditionally print debug string. {-# SPECIALIZE reportS :: VerboseKey -> Int -> String -> TCM () #-} reportS :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> String -> m () reportS k n s = verboseS k n $ displayDebugMessage n s -- | Conditionally println debug string. {-# SPECIALIZE reportSLn :: VerboseKey -> Int -> String -> TCM () #-} reportSLn :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> String -> m () reportSLn k n s = verboseS k n $ displayDebugMessage n (s ++ "\n") -- | Conditionally render debug 'Doc' and print it. {-# SPECIALIZE reportSDoc :: VerboseKey -> Int -> TCM Doc -> TCM () #-} reportSDoc :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> TCM Doc -> m () reportSDoc k n d = verboseS k n $ do displayDebugMessage n . (++ "\n") =<< formatDebugMessage k n (locallyTC eIsDebugPrinting (const True) d) unlessDebugPrinting :: MonadTCM m => m () -> m () unlessDebugPrinting = unlessM (asksTC envIsDebugPrinting) traceSLn :: (HasOptions m, MonadDebug m) => VerboseKey -> Int -> String -> m a -> m a traceSLn k n s cont = ifNotM (hasVerbosity k n) cont $ {- else -} do traceDebugMessage n (s ++ "\n") cont -- | Conditionally render debug 'Doc', print it, and then continue. traceSDoc :: (HasOptions m, MonadDebug m) => VerboseKey -> Int -> TCM Doc -> m a -> m a traceSDoc k n d cont = ifNotM (hasVerbosity k n) cont $ {- else -} do s <- formatDebugMessage k n $ locallyTC eIsDebugPrinting (const True) d traceDebugMessage n (s ++ "\n") cont -- | Print brackets around debug messages issued by a computation. {-# SPECIALIZE verboseBracket :: VerboseKey -> Int -> String -> TCM a -> TCM a #-} verboseBracket :: (HasOptions m, MonadDebug m, MonadError err m) => VerboseKey -> Int -> String -> m a -> m a verboseBracket k n s m = ifNotM (hasVerbosity k n) m $ {- else -} do displayDebugMessage n $ "{ " ++ s ++ "\n" m `finally` displayDebugMessage n "}\n" Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Signature.hs-boot0000644000000000000000000000243413466402171022145 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Signature where #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.Reader import Agda.Syntax.Abstract.Name (QName) import Agda.Syntax.Internal (ModuleName, Telescope) import Agda.TypeChecking.Monad.Base ( TCM, ReadTCState, HasOptions, TCEnv, MonadTCEnv , Definition, RewriteRules ) import Agda.TypeChecking.Monad.Debug (MonadDebug) import Agda.Utils.Pretty (prettyShow) data SigError = SigUnknown String | SigAbstract class ( Functor m , Applicative m #if __GLASGOW_HASKELL__ < 800 , Monad m #else , Fail.MonadFail m #endif , HasOptions m , MonadDebug m , MonadTCEnv m ) => HasConstInfo m where getConstInfo :: QName -> m Definition getConstInfo q = getConstInfo' q >>= \case Right d -> return d Left (SigUnknown err) -> __IMPOSSIBLE_VERBOSE__ err Left SigAbstract -> __IMPOSSIBLE_VERBOSE__ $ "Abstract, thus, not in scope: " ++ prettyShow q getConstInfo' :: QName -> m (Either SigError Definition) getConstInfo' q = Right <$> getConstInfo q getRewriteRulesFor :: QName -> m RewriteRules inFreshModuleIfFreeParams :: TCM a -> TCM a lookupSection :: (Functor m, ReadTCState m) => ModuleName -> m Telescope Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Context.hs0000644000000000000000000003435113466402171020672 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Context where import Control.Monad.Reader import Control.Monad.State import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid import Agda.Syntax.Abstract.Name import Agda.Syntax.Common import Agda.Syntax.Concrete.Name (LensInScope(..)) import Agda.Syntax.Internal import Agda.Syntax.Scope.Monad (getLocalVars, setLocalVars) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad.Open import Agda.TypeChecking.Monad.Options import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List ((!!!), downFrom) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Utils.Size import Agda.Utils.Impossible #include "undefined.h" -- * Modifying the context -- | Modify a 'Context' in a computation. {-# SPECIALIZE modifyContext :: (Context -> Context) -> TCM a -> TCM a #-} modifyContext :: MonadTCM tcm => (Context -> Context) -> tcm a -> tcm a modifyContext f = localTC $ \e -> e { envContext = f $ envContext e } -- | Change to top (=empty) context. Resets the checkpoints. {-# SPECIALIZE inTopContext :: TCM a -> TCM a #-} safeInTopContext :: MonadTCM tcm => tcm a -> tcm a safeInTopContext cont = do locals <- liftTCM $ getLocalVars liftTCM $ setLocalVars [] a <- modifyContext (const []) $ locallyTC eCurrentCheckpoint (const 0) $ locallyTC eCheckpoints (const $ Map.singleton 0 IdS) cont liftTCM $ setLocalVars locals return a -- | Change to top (=empty) context, but don't update the checkpoints. Totally -- not safe! {-# SPECIALIZE inTopContext :: TCM a -> TCM a #-} inTopContext :: MonadTCM tcm => tcm a -> tcm a inTopContext cont = do locals <- liftTCM $ getLocalVars liftTCM $ setLocalVars [] a <- modifyContext (const []) cont liftTCM $ setLocalVars locals return a -- | Delete the last @n@ bindings from the context. -- -- Doesn't update checkpoints! Use `updateContext rho (drop n)` instead, -- for an appropriate substitution `rho`. {-# SPECIALIZE escapeContext :: Int -> TCM a -> TCM a #-} escapeContext :: MonadTCM tcm => Int -> tcm a -> tcm a escapeContext n = modifyContext $ drop n -- * Manipulating checkpoints -- -- | Add a new checkpoint. Do not use directly! checkpoint :: (MonadDebug tcm, MonadTCM tcm) => Substitution -> tcm a -> tcm a checkpoint sub k = do unlessDebugPrinting $ reportSLn "tc.cxt.checkpoint" 105 $ "New checkpoint {" old <- viewTC eCurrentCheckpoint oldMods <- useTC stModuleCheckpoints chkpt <- fresh unlessDebugPrinting $ verboseS "tc.cxt.checkpoint" 105 $ do cxt <- getContextTelescope cps <- viewTC eCheckpoints let cps' = Map.insert chkpt IdS $ fmap (applySubst sub) cps prCps cps = vcat [ pshow c <+> ": " <+> pretty s | (c, s) <- Map.toList cps ] reportSDoc "tc.cxt.checkpoint" 105 $ return $ nest 2 $ vcat [ "old =" <+> pshow old , "new =" <+> pshow chkpt , "sub =" <+> pretty sub , "cxt =" <+> pretty cxt , "old substs =" <+> prCps cps , "new substs =" prCps cps' ] x <- flip localTC k $ \ env -> env { envCurrentCheckpoint = chkpt , envCheckpoints = Map.insert chkpt IdS $ fmap (applySubst sub) (envCheckpoints env) } newMods <- useTC stModuleCheckpoints -- Set the checkpoint for introduced modules to the old checkpoint when the -- new one goes out of scope. #2897: This isn't actually sound for modules -- created under refined parent parameters, but as long as those modules -- aren't named we shouldn't look at the checkpoint. The right thing to do -- would be to not store these modules in the checkpoint map, but todo.. stModuleCheckpoints `setTCLens` Map.union oldMods (old <$ Map.difference newMods oldMods) unlessDebugPrinting $ reportSLn "tc.cxt.checkpoint" 105 "}" return x -- | Update the context. Requires a substitution from the old context to the -- new. updateContext :: (MonadDebug tcm, MonadTCM tcm) => Substitution -> (Context -> Context) -> tcm a -> tcm a updateContext sub f = modifyContext f . checkpoint sub -- | Get the substitution from the context at a given checkpoint to the current context. checkpointSubstitution :: MonadTCEnv tcm => CheckpointId -> tcm Substitution checkpointSubstitution = maybe __IMPOSSIBLE__ return <=< checkpointSubstitution' -- | Get the substitution from the context at a given checkpoint to the current context. checkpointSubstitution' :: MonadTCEnv tcm => CheckpointId -> tcm (Maybe Substitution) checkpointSubstitution' chkpt = viewTC (eCheckpoints . key chkpt) -- | Get substitution @Γ ⊢ ρ : Γm@ where @Γ@ is the current context -- and @Γm@ is the module parameter telescope of module @m@. -- -- In case the we don't have a checkpoint for @m@ we return the identity -- substitution. -- This is ok for instance if we are outside module @m@ (in which case we -- have to supply all module parameters to any symbol defined within @m@ we -- want to refer). getModuleParameterSub :: (MonadTCEnv m, ReadTCState m) => ModuleName -> m Substitution getModuleParameterSub m = do mcp <- (^. stModuleCheckpoints . key m) <$> getTCState maybe (return IdS) checkpointSubstitution mcp -- * Adding to the context -- | @addCtx x arg cont@ add a variable to the context. -- -- Chooses an unused 'Name'. -- -- Warning: Does not update module parameter substitution! {-# SPECIALIZE addCtx :: Name -> Dom Type -> TCM a -> TCM a #-} addCtx :: (MonadDebug tcm, MonadTCM tcm) => Name -> Dom Type -> tcm a -> tcm a addCtx x a ret = do q <- viewTC eQuantity let ce = (x,) <$> inverseApplyQuantity q a when (not $ isNoName x) $ do registerForShadowing x ys <- getContextNames forM_ ys $ \y -> when (not (isNoName y) && sameRoot x y) $ tellShadowing x y updateContext (raiseS 1) (ce :) ret -- let-bindings keep track of own their context where -- add x to the map of possibly shadowed names registerForShadowing x = modifyTCLens stShadowingNames $ Map.insert x [] -- register the fact that x possibly shadows the name y tellShadowing x y = modifyTCLens stShadowingNames $ Map.adjust (x:) y addRecordNameContext :: (MonadDebug m, MonadTCM m) => Dom Type -> m b -> m b addRecordNameContext dom ret = do x <- setNotInScope <$> freshRecordName addCtx x dom ret -- | Various specializations of @addCtx@. {-# SPECIALIZE addContext :: b -> TCM a -> TCM a #-} class AddContext b where addContext :: (MonadTCM tcm, MonadDebug tcm) => b -> tcm a -> tcm a contextSize :: b -> Nat -- | Wrapper to tell 'addContext' not to mark names as -- 'NotInScope'. Used when adding a user-provided, but already type -- checked, telescope to the context. newtype KeepNames a = KeepNames a instance {-# OVERLAPPABLE #-} AddContext a => AddContext [a] where addContext = flip (foldr addContext) contextSize = sum . map contextSize instance AddContext (Name, Dom Type) where addContext = uncurry addCtx contextSize _ = 1 instance AddContext (Dom (Name, Type)) where addContext = addContext . distributeF contextSize _ = 1 instance AddContext (Dom (String, Type)) where addContext = addContext . distributeF contextSize _ = 1 instance AddContext ([Name], Dom Type) where addContext (xs, dom) = addContext (bindsToTel' id xs dom) contextSize (xs, _) = length xs instance AddContext ([WithHiding Name], Dom Type) where addContext ([] , dom) = id addContext (WithHiding h x : xs, dom) = addContext (x , mapHiding (mappend h) dom) . addContext (xs, raise 1 dom) contextSize (xs, _) = length xs instance AddContext ([Arg Name], Type) where addContext (xs, t) = addContext ((map . fmap) unnamed xs :: [NamedArg Name], t) contextSize (xs, _) = length xs instance AddContext ([NamedArg Name], Type) where addContext ([], _) = id addContext (x : xs, t) = addContext (namedArg x, t <$ domFromNamedArgName x) . addContext (xs, raise 1 t) contextSize (xs, _) = length xs instance AddContext (String, Dom Type) where addContext (s, dom) ret = do x <- setNotInScope <$> freshName_ s addCtx x dom ret contextSize _ = 1 instance AddContext (KeepNames String, Dom Type) where addContext (KeepNames s, dom) ret = do x <- freshName_ s addCtx x dom ret contextSize _ = 1 instance AddContext (Dom Type) where addContext dom = addContext ("_" :: String, dom) contextSize _ = 1 instance AddContext Name where addContext x = addContext (x, __DUMMY_DOM__) contextSize _ = 1 instance {-# OVERLAPPING #-} AddContext String where addContext s = addContext (s, __DUMMY_DOM__) contextSize _ = 1 instance AddContext (KeepNames Telescope) where addContext (KeepNames tel) ret = loop tel where loop EmptyTel = ret loop (ExtendTel t tel) = underAbstraction' KeepNames t tel loop contextSize (KeepNames tel) = size tel instance AddContext Telescope where addContext tel ret = loop tel where loop EmptyTel = ret loop (ExtendTel t tel) = underAbstraction' id t tel loop contextSize = size -- | Go under an abstraction. Do not extend context in case of 'NoAbs'. {-# SPECIALIZE underAbstraction :: Subst t a => Dom Type -> Abs a -> (a -> TCM b) -> TCM b #-} underAbstraction :: (Subst t a, MonadTCM tcm, MonadDebug tcm) => Dom Type -> Abs a -> (a -> tcm b) -> tcm b underAbstraction = underAbstraction' id underAbstraction' :: (Subst t a, MonadTCM tcm, MonadDebug tcm, AddContext (name, Dom Type)) => (String -> name) -> Dom Type -> Abs a -> (a -> tcm b) -> tcm b underAbstraction' _ _ (NoAbs _ v) k = k v underAbstraction' wrap t a k = underAbstractionAbs' wrap t a k -- | Go under an abstraction, treating 'NoAbs' as 'Abs'. underAbstractionAbs :: (Subst t a, MonadTCM tcm, MonadDebug tcm) => Dom Type -> Abs a -> (a -> tcm b) -> tcm b underAbstractionAbs = underAbstractionAbs' id underAbstractionAbs' :: (Subst t a, MonadTCM tcm, MonadDebug tcm, AddContext (name, Dom Type)) => (String -> name) -> Dom Type -> Abs a -> (a -> tcm b) -> tcm b underAbstractionAbs' wrap t a k = addContext (wrap $ realName $ absName a, t) $ k $ absBody a where realName s = if isNoName s then "x" else argNameToString s -- | Go under an abstract without worrying about the type to add to the context. {-# SPECIALIZE underAbstraction_ :: Subst t a => Abs a -> (a -> TCM b) -> TCM b #-} underAbstraction_ :: (Subst t a, MonadTCM tcm, MonadDebug tcm) => Abs a -> (a -> tcm b) -> tcm b underAbstraction_ = underAbstraction __DUMMY_DOM__ getLetBindings :: MonadTCM tcm => tcm [(Name,(Term,Dom Type))] getLetBindings = do bs <- asksTC envLetBindings forM (Map.toList bs) $ \ (n,o) -> (,) n <$> getOpen o -- | Add a let bound variable {-# SPECIALIZE addLetBinding' :: Name -> Term -> Dom Type -> TCM a -> TCM a #-} addLetBinding' :: MonadTCM tcm => Name -> Term -> Dom Type -> tcm a -> tcm a addLetBinding' x v t ret = do vt <- liftTCM $ makeOpen (v, t) flip localTC ret $ \e -> e { envLetBindings = Map.insert x vt $ envLetBindings e } -- | Add a let bound variable {-# SPECIALIZE addLetBinding :: ArgInfo -> Name -> Term -> Type -> TCM a -> TCM a #-} addLetBinding :: MonadTCM tcm => ArgInfo -> Name -> Term -> Type -> tcm a -> tcm a addLetBinding info x v t0 ret = addLetBinding' x v (defaultArgDom info t0) ret -- * Querying the context -- | Get the current context. {-# SPECIALIZE getContext :: TCM [Dom (Name, Type)] #-} getContext :: MonadTCEnv m => m [Dom (Name, Type)] getContext = asksTC envContext -- | Get the size of the current context. {-# SPECIALIZE getContextSize :: TCM Nat #-} getContextSize :: (Applicative m, MonadTCEnv m) => m Nat getContextSize = length <$> asksTC envContext -- | Generate @[var (n - 1), ..., var 0]@ for all declarations in the context. {-# SPECIALIZE getContextArgs :: TCM Args #-} getContextArgs :: (Applicative m, MonadTCEnv m) => m Args getContextArgs = reverse . zipWith mkArg [0..] <$> getContext where mkArg i dom = var i <$ argFromDom dom -- | Generate @[var (n - 1), ..., var 0]@ for all declarations in the context. {-# SPECIALIZE getContextTerms :: TCM [Term] #-} getContextTerms :: (Applicative m, MonadTCEnv m) => m [Term] getContextTerms = map var . downFrom <$> getContextSize -- | Get the current context as a 'Telescope'. {-# SPECIALIZE getContextTelescope :: TCM Telescope #-} getContextTelescope :: (Applicative m, MonadTCEnv m) => m Telescope getContextTelescope = telFromList' nameToArgName . reverse <$> getContext -- | Get the names of all declarations in the context. {-# SPECIALIZE getContextNames :: TCM [Name] #-} getContextNames :: (Applicative m, MonadTCEnv m) => m [Name] getContextNames = map (fst . unDom) <$> getContext -- | get type of bound variable (i.e. deBruijn index) -- {-# SPECIALIZE lookupBV :: Nat -> TCM (Dom (Name, Type)) #-} lookupBV :: MonadTCEnv m => Nat -> m (Dom (Name, Type)) lookupBV n = do ctx <- getContext let failure = fail $ "de Bruijn index out of scope: " ++ show n ++ " in context " ++ prettyShow (map (fst . unDom) ctx) maybe failure (return . fmap (raise $ n + 1)) $ ctx !!! n {-# SPECIALIZE typeOfBV' :: Nat -> TCM (Dom Type) #-} typeOfBV' :: (Applicative m, MonadTCEnv m) => Nat -> m (Dom Type) typeOfBV' n = fmap snd <$> lookupBV n {-# SPECIALIZE typeOfBV :: Nat -> TCM Type #-} typeOfBV :: (Applicative m, MonadTCEnv m) => Nat -> m Type typeOfBV i = unDom <$> typeOfBV' i {-# SPECIALIZE nameOfBV :: Nat -> TCM Name #-} nameOfBV :: (Applicative m, MonadTCEnv m) => Nat -> m Name nameOfBV n = fst . unDom <$> lookupBV n -- | Get the term corresponding to a named variable. If it is a lambda bound -- variable the deBruijn index is returned and if it is a let bound variable -- its definition is returned. {-# SPECIALIZE getVarInfo :: Name -> TCM (Term, Dom Type) #-} getVarInfo :: MonadTCEnv m => Name -> m (Term, Dom Type) getVarInfo x = do ctx <- getContext def <- asksTC envLetBindings case List.findIndex ((==x) . fst . unDom) ctx of Just n -> do t <- typeOfBV' n return (var n, t) _ -> case Map.lookup x def of Just vt -> getOpen vt _ -> fail $ "unbound variable " ++ prettyShow (nameConcrete x) ++ " (id: " ++ prettyShow (nameId x) ++ ")" Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Statistics.hs0000644000000000000000000000542313466402171021376 0ustar0000000000000000-- | Collect statistics. module Agda.TypeChecking.Monad.Statistics ( tick, tickN, tickMax, getStatistics, modifyStatistics, printStatistics ) where import qualified Data.Map as Map import Control.DeepSeq import qualified Text.PrettyPrint.Boxes as Boxes import Agda.Syntax.Concrete.Name as C import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.String -- | Get the statistics. getStatistics :: TCM Statistics getStatistics = useTC stStatistics -- | Modify the statistics via given function. modifyStatistics :: (Statistics -> Statistics) -> TCM () modifyStatistics f = stStatistics `modifyTCLens` f -- | Increase specified counter by @1@. tick :: String -> TCM () tick x = tickN x 1 -- | Increase specified counter by @n@. tickN :: String -> Integer -> TCM () tickN s n = modifyCounter s (n +) -- | Set the specified counter to the maximum of its current value and @n@. tickMax :: String -> Integer -> TCM () tickMax s n = modifyCounter s (max n) -- | Modify specified counter by a function @f@. modifyCounter :: String -> (Integer -> Integer) -> TCM () modifyCounter x f = modifyStatistics $ force . update where -- We need to be strict in the map. -- Andreas, 2014-03-22: Could we take Data.Map.Strict instead of this hack? -- Or force the map by looking up the very element we inserted? -- force m = Map.lookup x m `seq` m -- Or use insertLookupWithKey? -- update m = old `seq` m' where -- (old, m') = Map.insertLookupWithKey (\ _ new old -> f old) x dummy m -- Ulf, 2018-04-10: Neither of these approaches are strict enough in the -- map (nor are they less hacky). It's not enough to be strict in the -- values stored in the map, we also need to be strict in the *structure* -- of the map. A less hacky solution is to deepseq the map. force m = rnf m `seq` m update = Map.insertWith (\ new old -> f old) x dummy dummy = f 0 -- | Print the given statistics if verbosity "profile.ticks" is given. printStatistics :: Int -> Maybe C.TopLevelModuleName -> Statistics -> TCM () printStatistics vl mmname stats = verboseS "profile.ticks" vl $ do unlessNull (Map.toList stats) $ \ stats -> do let -- First column (left aligned) is accounts. col1 = Boxes.vcat Boxes.left $ map (Boxes.text . fst) stats -- Second column (right aligned) is numbers. col2 = Boxes.vcat Boxes.right $ map (Boxes.text . showThousandSep . snd) stats table = Boxes.hsep 1 Boxes.left [col1, col2] reportSLn "profile" 1 $ caseMaybe mmname "Accumulated statistics" $ \ mname -> "Statistics for " ++ prettyShow mname reportSLn "profile" 1 $ Boxes.render table Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/State.hs0000644000000000000000000004057613466402171020334 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} -- | Lenses for 'TCState' and more. module Agda.TypeChecking.Monad.State where import Control.Arrow (first) import qualified Control.Exception as E import Control.Monad.Reader (asks) import Control.Monad.State (put, get, gets, modify, modify', void) import Control.Monad.Trans (liftIO) import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable (traverse) import Agda.Benchmarking -- import {-# SOURCE #-} Agda.Interaction.Response import Agda.Interaction.Response (InteractionOutputCallback, Response) import Agda.Syntax.Common import Agda.Syntax.Scope.Base import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Abstract (PatternSynDefn, PatternSynDefns) import Agda.Syntax.Abstract.PatternSynonyms import Agda.Syntax.Abstract.Name import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Warnings import {-# SOURCE #-} Agda.TypeChecking.Monad.Debug import {-# SOURCE #-} Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.CompiledClause import Agda.Utils.Hash import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.Monad (bracket_) import Agda.Utils.NonemptyList import Agda.Utils.Pretty import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | Resets the non-persistent part of the type checking state. resetState :: TCM () resetState = do pers <- getsTC stPersistentState putTC $ initState { stPersistentState = pers } -- | Resets all of the type checking state. -- -- Keep only 'Benchmark' and backend information. resetAllState :: TCM () resetAllState = do b <- getBenchmark backends <- useTC stBackends putTC $ updatePersistentState (\ s -> s { stBenchmark = b }) initState stBackends `setTCLens` backends -- resetAllState = putTC initState -- | Restore 'TCState' after performing subcomputation. -- -- In contrast to 'Agda.Utils.Monad.localState', the 'Benchmark' -- info from the subcomputation is saved. localTCState :: TCM a -> TCM a localTCState = bracket_ getTC (\ s -> do b <- getBenchmark putTC s modifyBenchmark $ const b) -- | Same as 'localTCState' but also returns the state in which we were just -- before reverting it. localTCStateSaving :: TCM a -> TCM (a, TCState) localTCStateSaving compute = do oldState <- getTC result <- compute newState <- getTC do b <- getBenchmark putTC oldState modifyBenchmark $ const b return (result, newState) data SpeculateResult = SpeculateAbort | SpeculateCommit -- | Allow rolling back the state changes of a TCM computation. speculateTCState :: TCM (a, SpeculateResult) -> TCM a speculateTCState m = do ((x, res), newState) <- localTCStateSaving m case res of SpeculateAbort -> return x SpeculateCommit -> x <$ putTC newState speculateTCState_ :: TCM SpeculateResult -> TCM () speculateTCState_ m = void $ speculateTCState $ ((),) <$> m -- | A fresh TCM instance. -- -- The computation is run in a fresh state, with the exception that -- the persistent state is preserved. If the computation changes the -- state, then these changes are ignored, except for changes to the -- persistent state. (Changes to the persistent state are also ignored -- if errors other than type errors or IO exceptions are encountered.) freshTCM :: TCM a -> TCM (Either TCErr a) freshTCM m = do ps <- useTC lensPersistentState let s = set lensPersistentState ps initState r <- liftIO $ (Right <$> runTCM initEnv s m) `E.catch` (return . Left) case r of Right (a, s) -> do setTCLens lensPersistentState $ s ^. lensPersistentState return $ Right a Left err -> do case err of TypeError { tcErrState = s } -> setTCLens lensPersistentState $ s ^. lensPersistentState IOException s _ _ -> setTCLens lensPersistentState $ s ^. lensPersistentState _ -> return () return $ Left err --------------------------------------------------------------------------- -- * Lens for persistent states and its fields --------------------------------------------------------------------------- lensPersistentState :: Lens' PersistentTCState TCState lensPersistentState f s = f (stPersistentState s) <&> \ p -> s { stPersistentState = p } updatePersistentState :: (PersistentTCState -> PersistentTCState) -> (TCState -> TCState) updatePersistentState f s = s { stPersistentState = f (stPersistentState s) } modifyPersistentState :: (PersistentTCState -> PersistentTCState) -> TCM () modifyPersistentState = modifyTC . updatePersistentState -- | Lens for 'stAccumStatistics'. lensAccumStatisticsP :: Lens' Statistics PersistentTCState lensAccumStatisticsP f s = f (stAccumStatistics s) <&> \ a -> s { stAccumStatistics = a } lensAccumStatistics :: Lens' Statistics TCState lensAccumStatistics = lensPersistentState . lensAccumStatisticsP --------------------------------------------------------------------------- -- * Scope --------------------------------------------------------------------------- -- | Get the current scope. getScope :: TCM ScopeInfo getScope = useTC stScope -- | Set the current scope. setScope :: ScopeInfo -> TCM () setScope scope = modifyScope (const scope) -- | Modify the current scope without updating the inverse maps. modifyScope_ :: (ScopeInfo -> ScopeInfo) -> TCM () modifyScope_ f = stScope `modifyTCLens` f -- | Modify the current scope. modifyScope :: (ScopeInfo -> ScopeInfo) -> TCM () modifyScope f = modifyScope_ (recomputeInverseScopeMaps . f) -- | Run a computation in a local scope. withScope :: ScopeInfo -> TCM a -> TCM (a, ScopeInfo) withScope s m = do s' <- getScope setScope s x <- m s'' <- getScope setScope s' return (x, s'') -- | Same as 'withScope', but discard the scope from the computation. withScope_ :: ScopeInfo -> TCM a -> TCM a withScope_ s m = fst <$> withScope s m -- | Discard any changes to the scope by a computation. localScope :: TCM a -> TCM a localScope m = do scope <- getScope x <- m setScope scope return x -- | Scope error. notInScope :: C.QName -> TCM a notInScope x = do printScope "unbound" 5 "" typeError $ NotInScope [x] -- | Debug print the scope. printScope :: String -> Int -> String -> TCM () printScope tag v s = verboseS ("scope." ++ tag) v $ do scope <- getScope reportSDoc ("scope." ++ tag) v $ return $ vcat [ text s, pretty scope ] --------------------------------------------------------------------------- -- * Signature --------------------------------------------------------------------------- -- ** Lens for 'stSignature' and 'stImports' modifySignature :: (Signature -> Signature) -> TCM () modifySignature f = stSignature `modifyTCLens` f modifyImportedSignature :: (Signature -> Signature) -> TCM () modifyImportedSignature f = stImports `modifyTCLens` f getSignature :: TCM Signature getSignature = useTC stSignature -- | Update a possibly imported definition. Warning: changes made to imported -- definitions (during type checking) will not persist outside the current -- module. This function is currently used to update the compiled -- representation of a function during compilation. modifyGlobalDefinition :: QName -> (Definition -> Definition) -> TCM () modifyGlobalDefinition q f = do modifySignature $ updateDefinition q f modifyImportedSignature $ updateDefinition q f setSignature :: Signature -> TCM () setSignature sig = modifySignature $ const sig -- | Run some computation in a different signature, restore original signature. withSignature :: Signature -> TCM a -> TCM a withSignature sig m = do sig0 <- getSignature setSignature sig r <- m setSignature sig0 return r -- ** Modifiers for rewrite rules addRewriteRulesFor :: QName -> RewriteRules -> [QName] -> Signature -> Signature addRewriteRulesFor f rews matchables = (over sigRewriteRules $ HMap.insertWith mappend f rews) . (updateDefinition f $ updateTheDef setNotInjective) . (foldr (.) id $ map (\g -> updateDefinition g setMatchable) matchables) where setNotInjective def@Function{} = def { funInv = NotInjective } setNotInjective def = def setMatchable def = def { defMatchable = True } -- ** Modifiers for parts of the signature lookupDefinition :: QName -> Signature -> Maybe Definition lookupDefinition q sig = HMap.lookup q $ sig ^. sigDefinitions updateDefinitions :: (Definitions -> Definitions) -> Signature -> Signature updateDefinitions = over sigDefinitions updateDefinition :: QName -> (Definition -> Definition) -> Signature -> Signature updateDefinition q f = updateDefinitions $ HMap.adjust f q updateTheDef :: (Defn -> Defn) -> (Definition -> Definition) updateTheDef f def = def { theDef = f (theDef def) } updateDefType :: (Type -> Type) -> (Definition -> Definition) updateDefType f def = def { defType = f (defType def) } updateDefArgOccurrences :: ([Occurrence] -> [Occurrence]) -> (Definition -> Definition) updateDefArgOccurrences f def = def { defArgOccurrences = f (defArgOccurrences def) } updateDefPolarity :: ([Polarity] -> [Polarity]) -> (Definition -> Definition) updateDefPolarity f def = def { defPolarity = f (defPolarity def) } updateDefCompiledRep :: (CompiledRepresentation -> CompiledRepresentation) -> (Definition -> Definition) updateDefCompiledRep f def = def { defCompiledRep = f (defCompiledRep def) } addCompilerPragma :: BackendName -> CompilerPragma -> Definition -> Definition addCompilerPragma backend pragma = updateDefCompiledRep $ Map.insertWith (++) backend [pragma] updateFunClauses :: ([Clause] -> [Clause]) -> (Defn -> Defn) updateFunClauses f def@Function{ funClauses = cs} = def { funClauses = f cs } updateFunClauses f _ = __IMPOSSIBLE__ updateCovering :: ([Closure Clause] -> [Closure Clause]) -> (Defn -> Defn) updateCovering f def@Function{ funCovering = cs} = def { funCovering = f cs } updateCovering f _ = __IMPOSSIBLE__ updateCompiledClauses :: (Maybe CompiledClauses -> Maybe CompiledClauses) -> (Defn -> Defn) updateCompiledClauses f def@Function{ funCompiled = cc} = def { funCompiled = f cc } updateCompiledClauses f _ = __IMPOSSIBLE__ updateFunCopatternLHS :: (Bool -> Bool) -> Defn -> Defn updateFunCopatternLHS f def@Function{ funCopatternLHS = b } = def { funCopatternLHS = f b } updateFunCopatternLHS f _ = __IMPOSSIBLE__ --------------------------------------------------------------------------- -- * Top level module --------------------------------------------------------------------------- -- | Set the top-level module. This affects the global module id of freshly -- generated names. -- TODO: Is the hash-function collision-free? If not, then the -- implementation of 'setTopLevelModule' should be changed. setTopLevelModule :: C.QName -> TCM () setTopLevelModule x = stFreshNameId `setTCLens` NameId 0 (hashString $ prettyShow x) -- | Use a different top-level module for a computation. Used when generating -- names for imported modules. withTopLevelModule :: C.QName -> TCM a -> TCM a withTopLevelModule x m = do next <- useTC stFreshNameId setTopLevelModule x y <- m stFreshNameId `setTCLens` next return y --------------------------------------------------------------------------- -- * Foreign code --------------------------------------------------------------------------- addForeignCode :: BackendName -> String -> TCM () addForeignCode backend code = do r <- asksTC envRange -- can't use TypeChecking.Monad.Trace.getCurrentRange without cycle modifyTCLens (stForeignCode . key backend) $ Just . (ForeignCode r code :) . fromMaybe [] --------------------------------------------------------------------------- -- * Interaction output callback --------------------------------------------------------------------------- getInteractionOutputCallback :: TCM InteractionOutputCallback getInteractionOutputCallback = getsTC $ stInteractionOutputCallback . stPersistentState appInteractionOutputCallback :: Response -> TCM () appInteractionOutputCallback r = getInteractionOutputCallback >>= \ cb -> cb r setInteractionOutputCallback :: InteractionOutputCallback -> TCM () setInteractionOutputCallback cb = modifyPersistentState $ \ s -> s { stInteractionOutputCallback = cb } --------------------------------------------------------------------------- -- * Pattern synonyms --------------------------------------------------------------------------- getPatternSyns :: TCM PatternSynDefns getPatternSyns = useTC stPatternSyns setPatternSyns :: PatternSynDefns -> TCM () setPatternSyns m = modifyPatternSyns (const m) -- | Lens for 'stPatternSyns'. modifyPatternSyns :: (PatternSynDefns -> PatternSynDefns) -> TCM () modifyPatternSyns f = stPatternSyns `modifyTCLens` f getPatternSynImports :: TCM PatternSynDefns getPatternSynImports = useTC stPatternSynImports -- | Get both local and imported pattern synonyms getAllPatternSyns :: TCM PatternSynDefns getAllPatternSyns = Map.union <$> getPatternSyns <*> getPatternSynImports lookupPatternSyn :: AmbiguousQName -> TCM PatternSynDefn lookupPatternSyn (AmbQ xs) = do defs <- traverse lookupSinglePatternSyn xs case mergePatternSynDefs defs of Just def -> return def Nothing -> typeError $ CannotResolveAmbiguousPatternSynonym (zipNe xs defs) lookupSinglePatternSyn :: QName -> TCM PatternSynDefn lookupSinglePatternSyn x = do s <- getPatternSyns case Map.lookup x s of Just d -> return d Nothing -> do si <- getPatternSynImports case Map.lookup x si of Just d -> return d Nothing -> notInScope $ qnameToConcrete x --------------------------------------------------------------------------- -- * Benchmark --------------------------------------------------------------------------- -- | Lens getter for 'Benchmark' from 'TCState'. theBenchmark :: TCState -> Benchmark theBenchmark = stBenchmark . stPersistentState -- | Lens map for 'Benchmark'. updateBenchmark :: (Benchmark -> Benchmark) -> TCState -> TCState updateBenchmark f = updatePersistentState $ \ s -> s { stBenchmark = f (stBenchmark s) } -- | Lens getter for 'Benchmark' from 'TCM'. getBenchmark :: TCM Benchmark getBenchmark = getsTC $ theBenchmark -- | Lens modify for 'Benchmark'. modifyBenchmark :: (Benchmark -> Benchmark) -> TCM () modifyBenchmark = modifyTC' . updateBenchmark --------------------------------------------------------------------------- -- * Instance definitions --------------------------------------------------------------------------- -- | Look through the signature and reconstruct the instance table. addImportedInstances :: Signature -> TCM () addImportedInstances sig = do let itable = Map.fromListWith Set.union [ (c, Set.singleton i) | (i, Defn{ defInstance = Just c }) <- HMap.toList $ sig ^. sigDefinitions ] stImportedInstanceDefs `modifyTCLens` Map.unionWith Set.union itable -- | Lens for 'stInstanceDefs'. updateInstanceDefs :: (TempInstanceTable -> TempInstanceTable) -> (TCState -> TCState) updateInstanceDefs = over stInstanceDefs modifyInstanceDefs :: (TempInstanceTable -> TempInstanceTable) -> TCM () modifyInstanceDefs = modifyTC . updateInstanceDefs getAllInstanceDefs :: TCM TempInstanceTable getAllInstanceDefs = do (table,xs) <- useTC stInstanceDefs itable <- useTC stImportedInstanceDefs let !table' = Map.unionWith Set.union itable table return (table', xs) getAnonInstanceDefs :: TCM (Set QName) getAnonInstanceDefs = snd <$> getAllInstanceDefs -- | Remove all instances whose type is still unresolved. clearAnonInstanceDefs :: TCM () clearAnonInstanceDefs = modifyInstanceDefs $ mapSnd $ const Set.empty -- | Add an instance whose type is still unresolved. addUnknownInstance :: QName -> TCM () addUnknownInstance x = do reportSLn "tc.decl.instance" 10 $ "adding definition " ++ prettyShow x ++ " to the instance table (the type is not yet known)" modifyInstanceDefs $ mapSnd $ Set.insert x -- | Add instance to some ``class''. addNamedInstance :: QName -- ^ Name of the instance. -> QName -- ^ Name of the class. -> TCM () addNamedInstance x n = do reportSLn "tc.decl.instance" 10 $ "adding definition " ++ prettyShow x ++ " to instance table for " ++ prettyShow n -- Mark x as instance for n. modifySignature $ updateDefinition x $ \ d -> d { defInstance = Just n } -- Add x to n's instances. modifyInstanceDefs $ mapFst $ Map.insertWith Set.union n $ Set.singleton x Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/MetaVars.hs0000644000000000000000000005277013466402171020775 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Monad.MetaVars where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Foldable as Fold import Data.Monoid import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Generic import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Trace import Agda.TypeChecking.Monad.Closure import Agda.TypeChecking.Monad.Debug (reportSLn) import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Substitute import {-# SOURCE #-} Agda.TypeChecking.Telescope import Agda.Utils.Functor ((<.>)) import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty (prettyShow) import Agda.Utils.Tuple import Agda.Utils.Singleton import Agda.Utils.Size import qualified Agda.Utils.Maybe.Strict as Strict #include "undefined.h" import Agda.Utils.Impossible -- | Switch off assignment of metas. dontAssignMetas :: TCM a -> TCM a dontAssignMetas cont = do reportSLn "tc.meta" 45 $ "don't assign metas" localTC (\ env -> env { envAssignMetas = False }) cont -- | Get the meta store. getMetaStore :: TCM MetaStore getMetaStore = useTC stMetaStore modifyMetaStore :: (MetaStore -> MetaStore) -> TCM () modifyMetaStore f = stMetaStore `modifyTCLens` f -- | Run a computation and record which new metas it created. metasCreatedBy :: TCM a -> TCM (a, IntSet) metasCreatedBy m = do before <- IntMap.keysSet <$> useTC stMetaStore a <- m after <- IntMap.keysSet <$> useTC stMetaStore return (a, after IntSet.\\ before) -- | Lookup a meta variable. lookupMeta' :: MetaId -> TCM (Maybe MetaVariable) lookupMeta' m = IntMap.lookup (metaId m) <$> getMetaStore lookupMeta :: MetaId -> TCM MetaVariable lookupMeta m = fromMaybeM failure $ lookupMeta' m where failure = fail $ "no such meta variable " ++ prettyShow m -- | Update the information associated with a meta variable. updateMetaVar :: MetaId -> (MetaVariable -> MetaVariable) -> TCM () updateMetaVar m f = modifyMetaStore $ IntMap.adjust f $ metaId m -- | Insert a new meta variable with associated information into the meta store. insertMetaVar :: MetaId -> MetaVariable -> TCM () insertMetaVar m mv = modifyMetaStore $ IntMap.insert (metaId m) mv getMetaPriority :: MetaId -> TCM MetaPriority getMetaPriority = mvPriority <.> lookupMeta isSortMeta :: MetaId -> TCM Bool isSortMeta m = isSortMeta_ <$> lookupMeta m isSortMeta_ :: MetaVariable -> Bool isSortMeta_ mv = case mvJudgement mv of HasType{} -> False IsSort{} -> True getMetaType :: MetaId -> TCM Type getMetaType m = do mv <- lookupMeta m return $ case mvJudgement mv of HasType{ jMetaType = t } -> t IsSort{} -> __IMPOSSIBLE__ -- | Compute the context variables that a meta should be applied to, accounting -- for pruning. getMetaContextArgs :: MetaVariable -> TCM Args getMetaContextArgs MetaVar{ mvPermutation = p } = do args <- getContextArgs return $ permute (takeP (length args) p) args -- | Given a meta, return the type applied to the current context. getMetaTypeInContext :: MetaId -> TCM Type getMetaTypeInContext m = do mv@MetaVar{ mvJudgement = j } <- lookupMeta m case j of HasType{ jMetaType = t } -> piApplyM t =<< getMetaContextArgs mv IsSort{} -> __IMPOSSIBLE__ -- | Check whether all metas are instantiated. -- Precondition: argument is a meta (in some form) or a list of metas. class IsInstantiatedMeta a where isInstantiatedMeta :: a -> TCM Bool instance IsInstantiatedMeta MetaId where isInstantiatedMeta m = isJust <$> isInstantiatedMeta' m instance IsInstantiatedMeta Term where isInstantiatedMeta = loop where loop v = case v of MetaV x _ -> isInstantiatedMeta x DontCare v -> loop v Level l -> isInstantiatedMeta l Lam _ b -> isInstantiatedMeta b Con _ _ es | Just vs <- allApplyElims es -> isInstantiatedMeta vs _ -> __IMPOSSIBLE__ instance IsInstantiatedMeta Level where isInstantiatedMeta (Max ls) = isInstantiatedMeta ls instance IsInstantiatedMeta PlusLevel where isInstantiatedMeta (Plus n l) | n == 0 = isInstantiatedMeta l isInstantiatedMeta _ = __IMPOSSIBLE__ instance IsInstantiatedMeta LevelAtom where isInstantiatedMeta (MetaLevel x es) = isInstantiatedMeta x isInstantiatedMeta _ = __IMPOSSIBLE__ instance IsInstantiatedMeta a => IsInstantiatedMeta [a] where isInstantiatedMeta = andM . map isInstantiatedMeta instance IsInstantiatedMeta a => IsInstantiatedMeta (Maybe a) where isInstantiatedMeta = isInstantiatedMeta . maybeToList instance IsInstantiatedMeta a => IsInstantiatedMeta (Arg a) where isInstantiatedMeta = isInstantiatedMeta . unArg -- | Does not worry about raising. instance IsInstantiatedMeta a => IsInstantiatedMeta (Abs a) where isInstantiatedMeta = isInstantiatedMeta . unAbs isInstantiatedMeta' :: MetaId -> TCM (Maybe Term) isInstantiatedMeta' m = do mv <- lookupMeta m return $ case mvInstantiation mv of InstV tel v -> Just $ foldr mkLam v tel _ -> Nothing -- | Returns every meta-variable occurrence in the given type, except -- for those in 'Sort's. allMetas :: (TermLike a, Monoid m) => (MetaId -> m) -> a -> m allMetas singl = foldTerm metas where metas (MetaV m _) = singl m metas (Level l) = levelMetas l metas _ = mempty levelMetas (Max as) = foldMap plusLevelMetas as plusLevelMetas ClosedLevel{} = mempty plusLevelMetas (Plus _ l) = levelAtomMetas l levelAtomMetas (MetaLevel m _) = singl m levelAtomMetas _ = mempty -- | Returns 'allMetas' in a list. -- @allMetasList = allMetas (:[])@. -- -- Note: this resulting list is computed via difference lists. -- Thus, use this function if you actually need the whole list of metas. -- Otherwise, use 'allMetas' with a suitable monoid. allMetasList :: TermLike a => a -> [MetaId] allMetasList t = allMetas singleton t `appEndo` [] -- | 'True' if thing contains no metas. -- @noMetas = null . allMetasList@. noMetas :: TermLike a => a -> Bool noMetas = getAll . allMetas (\ _m -> All False) -- | Returns the first meta it find in the thing, if any. -- @firstMeta == headMaybe . allMetasList@. firstMeta :: TermLike a => a -> Maybe MetaId firstMeta = getFirst . allMetas (First . Just) -- | Returns all metavariables in a constraint. Slightly complicated by the -- fact that blocked terms are represented by two meta variables. To find the -- second one we need to look up the meta listeners for the one in the -- UnBlock constraint. constraintMetas :: Constraint -> TCM (Set MetaId) constraintMetas c = metas c where -- We don't use allMetas here since some constraints should not stop us from generalizing. For -- instance CheckSizeLtSat (see #3694). We also have to check meta listeners to get metas of -- UnBlock constraints. metas c = case c of ValueCmp _ t u v -> return $ allMetas Set.singleton (t, u, v) ValueCmpOnFace _ p t u v -> return $ allMetas Set.singleton (p, t, u, v) ElimCmp _ _ t u es es' -> return $ allMetas Set.singleton (t, u, es, es') TypeCmp _ t t' -> return $ allMetas Set.singleton (t, t') LevelCmp _ l l' -> return $ allMetas Set.singleton (l, l') UnquoteTactic m t h g -> return $ Set.fromList [x | Just x <- [m]] `Set.union` allMetas Set.singleton (t, h, g) Guarded c _ -> metas c TelCmp _ _ _ tel1 tel2 -> return $ allMetas Set.singleton (tel1, tel2) SortCmp _ s1 s2 -> return $ allMetas Set.singleton (s1, s2) UnBlock x -> Set.insert x . Set.unions <$> (mapM listenerMetas =<< getMetaListeners x) FindInstance{} -> return mempty -- v Ignore these constraints IsEmpty{} -> return mempty CheckFunDef{} -> return mempty CheckSizeLtSat{} -> return mempty HasBiggerSort{} -> return mempty HasPTSRule{} -> return mempty -- For blocked constant twin variables listenerMetas EtaExpand{} = return Set.empty listenerMetas (CheckConstraint _ c) = constraintMetas (clValue $ theConstraint c) -- | Create 'MetaInfo' in the current environment. createMetaInfo :: TCM MetaInfo createMetaInfo = createMetaInfo' RunMetaOccursCheck createMetaInfo' :: RunMetaOccursCheck -> TCM MetaInfo createMetaInfo' b = do r <- getCurrentRange cl <- buildClosure r gen <- viewTC eGeneralizeMetas return MetaInfo { miClosRange = cl , miMetaOccursCheck = b , miNameSuggestion = "" , miGeneralizable = hide $ defaultArg gen } setValueMetaName :: Term -> MetaNameSuggestion -> TCM () setValueMetaName v s = do case v of MetaV mi _ -> setMetaNameSuggestion mi s u -> do reportSLn "tc.meta.name" 70 $ "cannot set meta name; newMeta returns " ++ show u return () getMetaNameSuggestion :: MetaId -> TCM MetaNameSuggestion getMetaNameSuggestion mi = miNameSuggestion . mvInfo <$> lookupMeta mi setMetaNameSuggestion :: MetaId -> MetaNameSuggestion -> TCM () setMetaNameSuggestion mi s = unless (null s || isUnderscore s) $ do reportSLn "tc.meta.name" 20 $ "setting name of meta " ++ prettyShow mi ++ " to " ++ s updateMetaVar mi $ \ mvar -> mvar { mvInfo = (mvInfo mvar) { miNameSuggestion = s }} setMetaArgInfo :: MetaId -> ArgInfo -> TCM () setMetaArgInfo m i = updateMetaVar m $ \ mv -> mv { mvInfo = (mvInfo mv) { miGeneralizable = setArgInfo i (miGeneralizable (mvInfo mv)) } } updateMetaVarRange :: MetaId -> Range -> TCM () updateMetaVarRange mi r = updateMetaVar mi (setRange r) setMetaOccursCheck :: MetaId -> RunMetaOccursCheck -> TCM () setMetaOccursCheck mi b = updateMetaVar mi $ \ mvar -> mvar { mvInfo = (mvInfo mvar) { miMetaOccursCheck = b } } -- * Query and manipulate interaction points. modifyInteractionPoints :: (InteractionPoints -> InteractionPoints) -> TCM () modifyInteractionPoints f = stInteractionPoints `modifyTCLens` f -- | Register an interaction point during scope checking. -- If there is no interaction id yet, create one. registerInteractionPoint :: Bool -> Range -> Maybe Nat -> TCM InteractionId registerInteractionPoint preciseRange r maybeId = do m <- useTC stInteractionPoints -- If we're given an interaction id we shouldn't look up by range. -- This is important when doing 'refine', since all interaction points -- created by the refine gets the same range. if not preciseRange || isJust maybeId then continue m else do -- If the range does not come from a file, it is not -- precise, so ignore it. Strict.caseMaybe (rangeFile r) (continue m) $ \ _ -> do -- First, try to find the interaction point by Range. caseMaybe (findInteractionPoint_ r m) (continue m) {-else-} return where continue m = do -- We did not find an interaction id with the same Range, so let's create one! ii <- case maybeId of Just i -> return $ InteractionId i Nothing -> fresh let ip = InteractionPoint { ipRange = r, ipMeta = Nothing, ipSolved = False, ipClause = IPNoClause } case Map.insertLookupWithKey (\ key new old -> old) ii ip m of -- If the interaction point is already present, we keep the old ip. -- However, it needs to be at the same range as the new one. (Just ip0, _) | ipRange ip /= ipRange ip0 -> __IMPOSSIBLE__ | otherwise -> return ii (Nothing, m') -> do modifyInteractionPoints (const m') return ii -- | Find an interaction point by 'Range' by searching the whole map. -- -- O(n): linear in the number of registered interaction points. findInteractionPoint_ :: Range -> InteractionPoints -> Maybe InteractionId findInteractionPoint_ r m = do guard $ not $ null r headMaybe $ mapMaybe sameRange $ Map.toList m where sameRange :: (InteractionId, InteractionPoint) -> Maybe InteractionId sameRange (ii, InteractionPoint r' _ _ _) | r == r' = Just ii sameRange _ = Nothing -- | Hook up meta variable to interaction point. connectInteractionPoint :: InteractionId -> MetaId -> TCM () connectInteractionPoint ii mi = do ipCl <- asksTC envClause m <- useTC stInteractionPoints let ip = InteractionPoint { ipRange = __IMPOSSIBLE__, ipMeta = Just mi, ipSolved = False, ipClause = ipCl } -- The interaction point needs to be present already, we just set the meta. case Map.insertLookupWithKey (\ key new old -> new { ipRange = ipRange old }) ii ip m of (Nothing, _) -> __IMPOSSIBLE__ (Just _, m') -> modifyInteractionPoints $ const m' -- | Mark an interaction point as solved. removeInteractionPoint :: InteractionId -> TCM () removeInteractionPoint ii = do stInteractionPoints `modifyTCLens` Map.update (\ ip -> Just ip{ ipSolved = True }) ii -- | Get a list of interaction ids. {-# SPECIALIZE getInteractionPoints :: TCM [InteractionId] #-} getInteractionPoints :: MonadTCM tcm => tcm [InteractionId] getInteractionPoints = Map.keys <$> useTC stInteractionPoints -- | Get all metas that correspond to unsolved interaction ids. getInteractionMetas :: TCM [MetaId] getInteractionMetas = mapMaybe ipMeta . filter (not . ipSolved) . Map.elems <$> useTC stInteractionPoints -- | Get all metas that correspond to unsolved interaction ids. getInteractionIdsAndMetas :: TCM [(InteractionId,MetaId)] getInteractionIdsAndMetas = mapMaybe f . filter (not . ipSolved . snd) . Map.toList <$> useTC stInteractionPoints where f (ii, ip) = (ii,) <$> ipMeta ip -- | Does the meta variable correspond to an interaction point? -- -- Time: @O(n)@ where @n@ is the number of interaction metas. isInteractionMeta :: MetaId -> TCM (Maybe InteractionId) isInteractionMeta x = lookup x . map swap <$> getInteractionIdsAndMetas -- | Get the information associated to an interaction point. {-# SPECIALIZE lookupInteractionPoint :: InteractionId -> TCM InteractionPoint #-} lookupInteractionPoint :: MonadTCM tcm => InteractionId -> tcm InteractionPoint lookupInteractionPoint ii = fromMaybeM err $ Map.lookup ii <$> useTC stInteractionPoints where err = fail $ "no such interaction point: " ++ show ii -- | Get 'MetaId' for an interaction point. -- Precondition: interaction point is connected. lookupInteractionId :: InteractionId -> TCM MetaId lookupInteractionId ii = fromMaybeM err2 $ ipMeta <$> lookupInteractionPoint ii where err2 = typeError $ GenericError $ "No type nor action available for hole " ++ prettyShow ii ++ ". Possible cause: the hole has not been reached during type checking (do you see yellow?)" -- | Check whether an interaction id is already associated with a meta variable. lookupInteractionMeta :: InteractionId -> TCM (Maybe MetaId) lookupInteractionMeta ii = lookupInteractionMeta_ ii <$> useTC stInteractionPoints lookupInteractionMeta_ :: InteractionId -> InteractionPoints -> Maybe MetaId lookupInteractionMeta_ ii m = ipMeta =<< Map.lookup ii m -- | Generate new meta variable. newMeta :: Frozen -> MetaInfo -> MetaPriority -> Permutation -> Judgement a -> TCM MetaId newMeta = newMeta' Open -- | Generate a new meta variable with some instantiation given. -- For instance, the instantiation could be a 'PostponedTypeCheckingProblem'. newMeta' :: MetaInstantiation -> Frozen -> MetaInfo -> MetaPriority -> Permutation -> Judgement a -> TCM MetaId newMeta' inst frozen mi p perm j = do x <- fresh let j' = j { jMetaId = x } -- fill the identifier part of the judgement mv = MetaVar{ mvInfo = mi , mvPriority = p , mvPermutation = perm , mvJudgement = j' , mvInstantiation = inst , mvListeners = Set.empty , mvFrozen = frozen } -- printing not available (import cycle) -- reportSDoc "tc.meta.new" 50 $ "new meta" <+> prettyTCM j' insertMetaVar x mv return x -- | Get the 'Range' for an interaction point. {-# SPECIALIZE getInteractionRange :: InteractionId -> TCM Range #-} getInteractionRange :: MonadTCM tcm => InteractionId -> tcm Range getInteractionRange = ipRange <.> lookupInteractionPoint -- | Get the 'Range' for a meta variable. getMetaRange :: MetaId -> TCM Range getMetaRange = getRange <.> lookupMeta getInteractionScope :: InteractionId -> TCM ScopeInfo getInteractionScope = getMetaScope <.> lookupMeta <=< lookupInteractionId withMetaInfo' :: MetaVariable -> TCM a -> TCM a withMetaInfo' mv = withMetaInfo (miClosRange $ mvInfo mv) withMetaInfo :: Closure Range -> TCM a -> TCM a withMetaInfo mI cont = enterClosure mI $ \ r -> setCurrentRange r cont getMetaVariableSet :: TCM IntSet getMetaVariableSet = IntMap.keysSet <$> getMetaStore getMetaVariables :: (MetaVariable -> Bool) -> TCM [MetaId] getMetaVariables p = do store <- getMetaStore return [ MetaId i | (i, mv) <- IntMap.assocs store, p mv ] getInstantiatedMetas :: TCM [MetaId] getInstantiatedMetas = getMetaVariables (isInst . mvInstantiation) where isInst Open = False isInst OpenInstance = False isInst BlockedConst{} = False isInst PostponedTypeCheckingProblem{} = False isInst InstV{} = True getOpenMetas :: TCM [MetaId] getOpenMetas = getMetaVariables (isOpenMeta . mvInstantiation) isOpenMeta :: MetaInstantiation -> Bool isOpenMeta Open = True isOpenMeta OpenInstance = True isOpenMeta BlockedConst{} = True isOpenMeta PostponedTypeCheckingProblem{} = True isOpenMeta InstV{} = False -- | @listenToMeta l m@: register @l@ as a listener to @m@. This is done -- when the type of l is blocked by @m@. listenToMeta :: Listener -> MetaId -> TCM () listenToMeta l m = updateMetaVar m $ \mv -> mv { mvListeners = Set.insert l $ mvListeners mv } -- | Unregister a listener. unlistenToMeta :: Listener -> MetaId -> TCM () unlistenToMeta l m = updateMetaVar m $ \mv -> mv { mvListeners = Set.delete l $ mvListeners mv } -- | Get the listeners to a meta. getMetaListeners :: MetaId -> TCM [Listener] getMetaListeners m = Set.toList . mvListeners <$> lookupMeta m clearMetaListeners :: MetaId -> TCM () clearMetaListeners m = updateMetaVar m $ \mv -> mv { mvListeners = Set.empty } --------------------------------------------------------------------------- -- * Freezing and unfreezing metas. --------------------------------------------------------------------------- -- | Freeze all so far unfrozen metas for the duration of the given computation. withFreezeMetas :: TCM a -> TCM a withFreezeMetas cont = do ms <- Set.fromList <$> freezeMetas x <- cont unfreezeMetas' (`Set.member` ms) return x -- | Freeze all meta variables and return the list of metas that got frozen. freezeMetas :: TCM [MetaId] freezeMetas = freezeMetas' $ const True -- | Freeze some meta variables and return the list of metas that got frozen. freezeMetas' :: (MetaId -> Bool) -> TCM [MetaId] freezeMetas' p = execWriterT $ modifyTCLensM stMetaStore $ IntMap.traverseWithKey (freeze . MetaId) where freeze :: Monad m => MetaId -> MetaVariable -> WriterT [MetaId] m MetaVariable freeze m mvar | p m && mvFrozen mvar /= Frozen = do tell [m] return $ mvar { mvFrozen = Frozen } | otherwise = return mvar -- | Thaw all meta variables. unfreezeMetas :: TCM () unfreezeMetas = unfreezeMetas' $ const True -- | Thaw some metas, as indicated by the passed condition. unfreezeMetas' :: (MetaId -> Bool) -> TCM () unfreezeMetas' cond = modifyMetaStore $ IntMap.mapWithKey $ unfreeze . MetaId where unfreeze :: MetaId -> MetaVariable -> MetaVariable unfreeze m mvar | cond m = mvar { mvFrozen = Instantiable } | otherwise = mvar isFrozen :: MetaId -> TCM Bool isFrozen x = do mvar <- lookupMeta x return $ mvFrozen mvar == Frozen -- | Unfreeze meta and its type if this is a meta again. -- Does not unfreeze deep occurrences of metas. class UnFreezeMeta a where unfreezeMeta :: a -> TCM () instance UnFreezeMeta MetaId where unfreezeMeta x = do updateMetaVar x $ \ mv -> mv { mvFrozen = Instantiable } unfreezeMeta =<< do jMetaType . mvJudgement <$> lookupMeta x instance UnFreezeMeta Type where unfreezeMeta (El s t) = unfreezeMeta s >> unfreezeMeta t instance UnFreezeMeta Term where unfreezeMeta (MetaV x _) = unfreezeMeta x unfreezeMeta (Sort s) = unfreezeMeta s unfreezeMeta (Level l) = unfreezeMeta l unfreezeMeta (DontCare t) = unfreezeMeta t unfreezeMeta (Lam _ v) = unfreezeMeta v unfreezeMeta _ = return () instance UnFreezeMeta Sort where unfreezeMeta (MetaS x _) = unfreezeMeta x unfreezeMeta _ = return () instance UnFreezeMeta Level where unfreezeMeta (Max ls) = unfreezeMeta ls instance UnFreezeMeta PlusLevel where unfreezeMeta (Plus _ a) = unfreezeMeta a unfreezeMeta ClosedLevel{} = return () instance UnFreezeMeta LevelAtom where unfreezeMeta (MetaLevel x _) = unfreezeMeta x unfreezeMeta (BlockedLevel _ t) = unfreezeMeta t unfreezeMeta (NeutralLevel _ t) = unfreezeMeta t unfreezeMeta (UnreducedLevel t) = unfreezeMeta t instance UnFreezeMeta a => UnFreezeMeta [a] where unfreezeMeta = mapM_ unfreezeMeta instance UnFreezeMeta a => UnFreezeMeta (Abs a) where unfreezeMeta = Fold.mapM_ unfreezeMeta Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Base.hs0000644000000000000000000045053113466402171020122 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.TypeChecking.Monad.Base where import Prelude hiding (null) import qualified Control.Concurrent as C import qualified Control.Exception as E #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer hiding ((<>)) import Control.Monad.Trans.Maybe import Control.Applicative hiding (empty) import Data.Function import Data.Int import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import qualified Data.List as List import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map -- hiding (singleton, null, empty) import Data.Monoid ( Monoid, mempty, mappend ) import Data.Sequence (Seq) import Data.Set (Set) import qualified Data.Set as Set -- hiding (singleton, null, empty) import Data.Semigroup ( Semigroup, (<>), Any(..) ) import Data.Data (Data, toConstr) import Data.Foldable (Foldable) import Data.String import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import Data.Traversable import Data.IORef import qualified System.Console.Haskeline as Haskeline import Agda.Benchmarking (Benchmark, Phase) import Agda.Syntax.Concrete (TopLevelModuleName) import Agda.Syntax.Common import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Definitions (NiceDeclaration, DeclarationWarning, declarationWarningName) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract (AllNames) import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern () import Agda.Syntax.Internal.Generic (TermLike(..)) import Agda.Syntax.Literal import Agda.Syntax.Parser (PM(..), ParseWarning, runPMIO) import Agda.Syntax.Parser.Monad (parseWarningName) import Agda.Syntax.Treeless (Compiled) import Agda.Syntax.Fixity import Agda.Syntax.Position import Agda.Syntax.Scope.Base import qualified Agda.Syntax.Info as Info import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage.SplitTree import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Free.Lazy (Free(freeVars'), bind', bind) import Agda.Termination.CutOff import {-# SOURCE #-} Agda.Compiler.Backend -- import {-# SOURCE #-} Agda.Interaction.FindFile import Agda.Interaction.Options import Agda.Interaction.Options.Warnings import Agda.Interaction.Response (InteractionOutputCallback, defaultInteractionOutputCallback, Response(..)) import Agda.Interaction.Highlighting.Precise (CompressedFile, HighlightingInfo) import Agda.Interaction.Library import Agda.Utils.Except ( Error(strMsg) , ExceptT , MonadError(catchError, throwError) , runExceptT , mapExceptT ) import Agda.Utils.Benchmark (MonadBench(..)) import Agda.Utils.FileName import Agda.Utils.HashMap (HashMap) import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Hash import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.ListT import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty hiding ((<>)) import qualified Agda.Utils.Pretty as P import Agda.Utils.Singleton import Agda.Utils.Functor import Agda.Utils.Function import Agda.Utils.WithDefault ( collapseDefault ) #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Type checking state --------------------------------------------------------------------------- data TCState = TCSt { stPreScopeState :: !PreScopeState -- ^ The state which is frozen after scope checking. , stPostScopeState :: !PostScopeState -- ^ The state which is modified after scope checking. , stPersistentState :: !PersistentTCState -- ^ State which is forever, like a diamond. } class Monad m => ReadTCState m where getTCState :: m TCState withTCState :: (TCState -> TCState) -> m a -> m a instance ReadTCState m => ReadTCState (MaybeT m) where getTCState = lift getTCState withTCState = mapMaybeT . withTCState instance ReadTCState m => ReadTCState (ListT m) where getTCState = lift getTCState withTCState f = ListT . withTCState f . runListT instance ReadTCState m => ReadTCState (ExceptT err m) where getTCState = lift getTCState withTCState = mapExceptT . withTCState instance ReadTCState m => ReadTCState (ReaderT r m) where getTCState = lift getTCState withTCState = mapReaderT . withTCState instance (Monoid w, ReadTCState m) => ReadTCState (WriterT w m) where getTCState = lift getTCState withTCState = mapWriterT . withTCState instance ReadTCState m => ReadTCState (StateT s m) where getTCState = lift getTCState withTCState = mapStateT . withTCState instance Show TCState where show _ = "TCSt{}" data PreScopeState = PreScopeState { stPreTokens :: !CompressedFile -- from lexer -- ^ Highlighting info for tokens (but not those tokens for -- which highlighting exists in 'stSyntaxInfo'). , stPreImports :: !Signature -- XX populated by scopec hecker -- ^ Imported declared identifiers. -- Those most not be serialized! , stPreImportedModules :: !(Set ModuleName) -- imports logic , stPreModuleToSource :: !ModuleToSource -- imports , stPreVisitedModules :: !VisitedModules -- imports , stPreScope :: !ScopeInfo -- generated by scope checker, current file: which modules you have, public definitions, current file, maps concrete names to abstract names. , stPrePatternSyns :: !A.PatternSynDefns -- ^ Pattern synonyms of the current file. Serialized. , stPrePatternSynImports :: !A.PatternSynDefns -- ^ Imported pattern synonyms. Must not be serialized! , stPreGeneralizedVars :: !(Maybe (Set QName)) -- ^ Collected generalizable variables; used during scope checking of terms , stPrePragmaOptions :: !PragmaOptions -- ^ Options applying to the current file. @OPTIONS@ -- pragmas only affect this field. , stPreImportedBuiltins :: !(BuiltinThings PrimFun) , stPreImportedDisplayForms :: !DisplayForms -- ^ Display forms added by someone else to imported identifiers , stPreImportedInstanceDefs :: !InstanceTable , stPreForeignCode :: !(Map BackendName [ForeignCode]) -- ^ @{-\# FOREIGN \#-}@ code that should be included in the compiled output. -- Does not include code for imported modules. , stPreFreshInteractionId :: !InteractionId , stPreImportedUserWarnings :: !(Map A.QName String) -- ^ Imported @UserWarning@s, not to be stored in the @Interface@ , stPreLocalUserWarnings :: !(Map A.QName String) -- ^ Locally defined @UserWarning@s, to be stored in the @Interface@ } type DisambiguatedNames = IntMap A.QName data PostScopeState = PostScopeState { stPostSyntaxInfo :: !CompressedFile -- ^ Highlighting info. , stPostDisambiguatedNames :: !DisambiguatedNames -- ^ Disambiguation carried out by the type checker. -- Maps position of first name character to disambiguated @'A.QName'@ -- for each @'A.AmbiguousQName'@ already passed by the type checker. , stPostMetaStore :: !MetaStore , stPostInteractionPoints :: !InteractionPoints -- scope checker first , stPostAwakeConstraints :: !Constraints , stPostSleepingConstraints :: !Constraints , stPostDirty :: !Bool -- local -- ^ Dirty when a constraint is added, used to prevent pointer update. -- Currently unused. , stPostOccursCheckDefs :: !(Set QName) -- local -- ^ Definitions to be considered during occurs check. -- Initialized to the current mutual block before the check. -- During occurs check, we remove definitions from this set -- as soon we have checked them. , stPostSignature :: !Signature -- ^ Declared identifiers of the current file. -- These will be serialized after successful type checking. , stPostModuleCheckpoints :: !(Map ModuleName CheckpointId) -- ^ For each module remember the checkpoint corresponding to the orignal -- context of the module parameters. , stPostImportsDisplayForms :: !DisplayForms -- ^ Display forms we add for imported identifiers , stPostCurrentModule :: !(Maybe ModuleName) -- ^ The current module is available after it has been type -- checked. , stPostInstanceDefs :: !TempInstanceTable , stPostConcreteNames :: !(Map Name [C.Name]) -- ^ Map keeping track of concrete names assigned to each abstract name -- (can be more than one name in case the first one is shadowed) , stPostShadowingNames :: !(Map Name [Name]) -- ^ Map keeping track of which names could maybe be shadowed by -- another name , stPostStatistics :: !Statistics -- ^ Counters to collect various statistics about meta variables etc. -- Only for current file. , stPostTCWarnings :: ![TCWarning] , stPostMutualBlocks :: !(Map MutualId MutualBlock) , stPostLocalBuiltins :: !(BuiltinThings PrimFun) , stPostFreshMetaId :: !MetaId , stPostFreshMutualId :: !MutualId , stPostFreshProblemId :: !ProblemId , stPostFreshCheckpointId :: !CheckpointId , stPostFreshInt :: !Int , stPostFreshNameId :: !NameId , stPostAreWeCaching :: !Bool , stPostConsideringInstance :: !Bool } -- | A mutual block of names in the signature. data MutualBlock = MutualBlock { mutualInfo :: Info.MutualInfo -- ^ The original info of the mutual block. , mutualNames :: Set QName } deriving (Show, Eq) instance Null MutualBlock where empty = MutualBlock empty empty -- | A part of the state which is not reverted when an error is thrown -- or the state is reset. data PersistentTCState = PersistentTCSt { stDecodedModules :: DecodedModules , stPersistentOptions :: CommandLineOptions , stInteractionOutputCallback :: InteractionOutputCallback -- ^ Callback function to call when there is a response -- to give to the interactive frontend. -- See the documentation of 'InteractionOutputCallback'. , stBenchmark :: !Benchmark -- ^ Structure to track how much CPU time was spent on which Agda phase. -- Needs to be a strict field to avoid space leaks! , stAccumStatistics :: !Statistics -- ^ Should be strict field. , stLoadedFileCache :: !(Maybe LoadedFileCache) -- ^ Cached typechecking state from the last loaded file. -- Should be Nothing when checking imports. , stPersistBackends :: [Backend] -- ^ Current backends with their options } data LoadedFileCache = LoadedFileCache { lfcCached :: !CachedTypeCheckLog , lfcCurrent :: !CurrentTypeCheckLog } -- | A log of what the type checker does and states after the action is -- completed. The cached version is stored first executed action first. type CachedTypeCheckLog = [(TypeCheckAction, PostScopeState)] -- | Like 'CachedTypeCheckLog', but storing the log for an ongoing type -- checking of a module. Stored in reverse order (last performed action -- first). type CurrentTypeCheckLog = [(TypeCheckAction, PostScopeState)] -- | A complete log for a module will look like this: -- -- * 'Pragmas' -- -- * 'EnterSection', entering the main module. -- -- * 'Decl'/'EnterSection'/'LeaveSection', for declarations and nested -- modules -- -- * 'LeaveSection', leaving the main module. data TypeCheckAction = EnterSection !Info.ModuleInfo !ModuleName !A.Telescope | LeaveSection !ModuleName | Decl !A.Declaration -- ^ Never a Section or ScopeDecl | Pragmas !PragmaOptions -- | Empty persistent state. initPersistentState :: PersistentTCState initPersistentState = PersistentTCSt { stPersistentOptions = defaultOptions , stDecodedModules = Map.empty , stInteractionOutputCallback = defaultInteractionOutputCallback , stBenchmark = empty , stAccumStatistics = Map.empty , stLoadedFileCache = Nothing , stPersistBackends = [] } -- | Empty state of type checker. initPreScopeState :: PreScopeState initPreScopeState = PreScopeState { stPreTokens = mempty , stPreImports = emptySignature , stPreImportedModules = Set.empty , stPreModuleToSource = Map.empty , stPreVisitedModules = Map.empty , stPreScope = emptyScopeInfo , stPrePatternSyns = Map.empty , stPrePatternSynImports = Map.empty , stPreGeneralizedVars = mempty , stPrePragmaOptions = defaultInteractionOptions , stPreImportedBuiltins = Map.empty , stPreImportedDisplayForms = HMap.empty , stPreImportedInstanceDefs = Map.empty , stPreForeignCode = Map.empty , stPreFreshInteractionId = 0 , stPreImportedUserWarnings = Map.empty , stPreLocalUserWarnings = Map.empty } initPostScopeState :: PostScopeState initPostScopeState = PostScopeState { stPostSyntaxInfo = mempty , stPostDisambiguatedNames = IntMap.empty , stPostMetaStore = IntMap.empty , stPostInteractionPoints = Map.empty , stPostAwakeConstraints = [] , stPostSleepingConstraints = [] , stPostDirty = False , stPostOccursCheckDefs = Set.empty , stPostSignature = emptySignature , stPostModuleCheckpoints = Map.empty , stPostImportsDisplayForms = HMap.empty , stPostCurrentModule = Nothing , stPostInstanceDefs = (Map.empty , Set.empty) , stPostConcreteNames = Map.empty , stPostShadowingNames = Map.empty , stPostStatistics = Map.empty , stPostTCWarnings = [] , stPostMutualBlocks = Map.empty , stPostLocalBuiltins = Map.empty , stPostFreshMetaId = 0 , stPostFreshMutualId = 0 , stPostFreshProblemId = 1 , stPostFreshCheckpointId = 1 , stPostFreshInt = 0 , stPostFreshNameId = NameId 0 0 , stPostAreWeCaching = False , stPostConsideringInstance = False } initState :: TCState initState = TCSt { stPreScopeState = initPreScopeState , stPostScopeState = initPostScopeState , stPersistentState = initPersistentState } -- * st-prefixed lenses ------------------------------------------------------------------------ stTokens :: Lens' CompressedFile TCState stTokens f s = f (stPreTokens (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreTokens = x}} stImports :: Lens' Signature TCState stImports f s = f (stPreImports (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreImports = x}} stImportedModules :: Lens' (Set ModuleName) TCState stImportedModules f s = f (stPreImportedModules (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreImportedModules = x}} stModuleToSource :: Lens' ModuleToSource TCState stModuleToSource f s = f (stPreModuleToSource (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreModuleToSource = x}} stVisitedModules :: Lens' VisitedModules TCState stVisitedModules f s = f (stPreVisitedModules (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreVisitedModules = x}} stScope :: Lens' ScopeInfo TCState stScope f s = f (stPreScope (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreScope = x}} stPatternSyns :: Lens' A.PatternSynDefns TCState stPatternSyns f s = f (stPrePatternSyns (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPrePatternSyns = x}} stPatternSynImports :: Lens' A.PatternSynDefns TCState stPatternSynImports f s = f (stPrePatternSynImports (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPrePatternSynImports = x}} stGeneralizedVars :: Lens' (Maybe (Set QName)) TCState stGeneralizedVars f s = f (stPreGeneralizedVars (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreGeneralizedVars = x}} stPragmaOptions :: Lens' PragmaOptions TCState stPragmaOptions f s = f (stPrePragmaOptions (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPrePragmaOptions = x}} stImportedBuiltins :: Lens' (BuiltinThings PrimFun) TCState stImportedBuiltins f s = f (stPreImportedBuiltins (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreImportedBuiltins = x}} stForeignCode :: Lens' (Map BackendName [ForeignCode]) TCState stForeignCode f s = f (stPreForeignCode (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreForeignCode = x}} stFreshInteractionId :: Lens' InteractionId TCState stFreshInteractionId f s = f (stPreFreshInteractionId (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreFreshInteractionId = x}} stImportedUserWarnings :: Lens' (Map A.QName String) TCState stImportedUserWarnings f s = f (stPreImportedUserWarnings (stPreScopeState s)) <&> \ x -> s {stPreScopeState = (stPreScopeState s) {stPreImportedUserWarnings = x}} stLocalUserWarnings :: Lens' (Map A.QName String) TCState stLocalUserWarnings f s = f (stPreLocalUserWarnings (stPreScopeState s)) <&> \ x -> s {stPreScopeState = (stPreScopeState s) {stPreLocalUserWarnings = x}} getUserWarnings :: MonadTCState m => m (Map A.QName String) getUserWarnings = do iuw <- useTC stImportedUserWarnings luw <- useTC stLocalUserWarnings return $ iuw `Map.union` luw stBackends :: Lens' [Backend] TCState stBackends f s = f (stPersistBackends (stPersistentState s)) <&> \x -> s {stPersistentState = (stPersistentState s) {stPersistBackends = x}} stFreshNameId :: Lens' NameId TCState stFreshNameId f s = f (stPostFreshNameId (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshNameId = x}} stSyntaxInfo :: Lens' CompressedFile TCState stSyntaxInfo f s = f (stPostSyntaxInfo (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostSyntaxInfo = x}} stDisambiguatedNames :: Lens' DisambiguatedNames TCState stDisambiguatedNames f s = f (stPostDisambiguatedNames (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostDisambiguatedNames = x}} stMetaStore :: Lens' MetaStore TCState stMetaStore f s = f (stPostMetaStore (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostMetaStore = x}} stInteractionPoints :: Lens' InteractionPoints TCState stInteractionPoints f s = f (stPostInteractionPoints (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostInteractionPoints = x}} stAwakeConstraints :: Lens' Constraints TCState stAwakeConstraints f s = f (stPostAwakeConstraints (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostAwakeConstraints = x}} stSleepingConstraints :: Lens' Constraints TCState stSleepingConstraints f s = f (stPostSleepingConstraints (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostSleepingConstraints = x}} stDirty :: Lens' Bool TCState stDirty f s = f (stPostDirty (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostDirty = x}} stOccursCheckDefs :: Lens' (Set QName) TCState stOccursCheckDefs f s = f (stPostOccursCheckDefs (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostOccursCheckDefs = x}} stSignature :: Lens' Signature TCState stSignature f s = f (stPostSignature (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostSignature = x}} stModuleCheckpoints :: Lens' (Map ModuleName CheckpointId) TCState stModuleCheckpoints f s = f (stPostModuleCheckpoints (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostModuleCheckpoints = x}} stImportsDisplayForms :: Lens' DisplayForms TCState stImportsDisplayForms f s = f (stPostImportsDisplayForms (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostImportsDisplayForms = x}} stImportedDisplayForms :: Lens' DisplayForms TCState stImportedDisplayForms f s = f (stPreImportedDisplayForms (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreImportedDisplayForms = x}} stCurrentModule :: Lens' (Maybe ModuleName) TCState stCurrentModule f s = f (stPostCurrentModule (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostCurrentModule = x}} stImportedInstanceDefs :: Lens' InstanceTable TCState stImportedInstanceDefs f s = f (stPreImportedInstanceDefs (stPreScopeState s)) <&> \x -> s {stPreScopeState = (stPreScopeState s) {stPreImportedInstanceDefs = x}} stInstanceDefs :: Lens' TempInstanceTable TCState stInstanceDefs f s = f (stPostInstanceDefs (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostInstanceDefs = x}} stConcreteNames :: Lens' (Map Name [C.Name]) TCState stConcreteNames f s = f (stPostConcreteNames (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostConcreteNames = x}} stShadowingNames :: Lens' (Map Name [Name]) TCState stShadowingNames f s = f (stPostShadowingNames (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostShadowingNames = x}} stStatistics :: Lens' Statistics TCState stStatistics f s = f (stPostStatistics (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostStatistics = x}} stTCWarnings :: Lens' [TCWarning] TCState stTCWarnings f s = f (stPostTCWarnings (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostTCWarnings = x}} stMutualBlocks :: Lens' (Map MutualId MutualBlock) TCState stMutualBlocks f s = f (stPostMutualBlocks (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostMutualBlocks = x}} stLocalBuiltins :: Lens' (BuiltinThings PrimFun) TCState stLocalBuiltins f s = f (stPostLocalBuiltins (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostLocalBuiltins = x}} stFreshMetaId :: Lens' MetaId TCState stFreshMetaId f s = f (stPostFreshMetaId (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshMetaId = x}} stFreshMutualId :: Lens' MutualId TCState stFreshMutualId f s = f (stPostFreshMutualId (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshMutualId = x}} stFreshProblemId :: Lens' ProblemId TCState stFreshProblemId f s = f (stPostFreshProblemId (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshProblemId = x}} stFreshCheckpointId :: Lens' CheckpointId TCState stFreshCheckpointId f s = f (stPostFreshCheckpointId (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshCheckpointId = x}} stFreshInt :: Lens' Int TCState stFreshInt f s = f (stPostFreshInt (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostFreshInt = x}} -- use @areWeCaching@ from the Caching module instead. stAreWeCaching :: Lens' Bool TCState stAreWeCaching f s = f (stPostAreWeCaching (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostAreWeCaching = x}} stConsideringInstance :: Lens' Bool TCState stConsideringInstance f s = f (stPostConsideringInstance (stPostScopeState s)) <&> \x -> s {stPostScopeState = (stPostScopeState s) {stPostConsideringInstance = x}} stBuiltinThings :: TCState -> BuiltinThings PrimFun stBuiltinThings s = (s^.stLocalBuiltins) `Map.union` (s^.stImportedBuiltins) -- * Fresh things ------------------------------------------------------------------------ class Enum i => HasFresh i where freshLens :: Lens' i TCState nextFresh' :: i -> i nextFresh' = succ nextFresh :: HasFresh i => TCState -> (i, TCState) nextFresh s = let !c = s^.freshLens in (c, set freshLens (nextFresh' c) s) fresh :: (HasFresh i, MonadTCState m) => m i fresh = do !s <- getTC let (!c , !s') = nextFresh s putTC s' return c instance HasFresh MetaId where freshLens = stFreshMetaId instance HasFresh MutualId where freshLens = stFreshMutualId instance HasFresh InteractionId where freshLens = stFreshInteractionId instance HasFresh NameId where freshLens = stFreshNameId -- nextFresh increments the current fresh name by 2 so @NameId@s used -- before caching starts do not overlap with the ones used after. nextFresh' = succ . succ instance HasFresh Int where freshLens = stFreshInt newtype ProblemId = ProblemId Nat deriving (Data, Eq, Ord, Enum, Real, Integral, Num) -- TODO: 'Show' should output Haskell-parseable representations. -- The following instance is deprecated, and Pretty[TCM] should be used -- instead. Later, simply derive Show for this type. -- ASR (28 December 2014). This instance is not used anymore (module -- the test suite) when reporting errors. See Issue 1293. -- This particular Show instance is ok because of the Num instance. instance Show ProblemId where show (ProblemId n) = show n instance Pretty ProblemId where pretty (ProblemId n) = pretty n instance HasFresh ProblemId where freshLens = stFreshProblemId newtype CheckpointId = CheckpointId Int deriving (Data, Eq, Ord, Enum, Real, Integral, Num) instance Show CheckpointId where show (CheckpointId n) = show n instance Pretty CheckpointId where pretty (CheckpointId n) = pretty n instance HasFresh CheckpointId where freshLens = stFreshCheckpointId freshName :: MonadTCState m => Range -> String -> m Name freshName r s = do i <- fresh return $ mkName r i s freshNoName :: MonadTCState m => Range -> m Name freshNoName r = do i <- fresh return $ Name i (C.NoName noRange i) r noFixity' False freshNoName_ :: MonadTCState m => m Name freshNoName_ = freshNoName noRange freshRecordName :: MonadTCState m => m Name freshRecordName = do i <- fresh return $ Name i (C.Name noRange C.NotInScope [C.Id "r"]) noRange noFixity' True -- | Create a fresh name from @a@. class FreshName a where freshName_ :: MonadTCState m => a -> m Name instance FreshName (Range, String) where freshName_ = uncurry freshName instance FreshName String where freshName_ = freshName noRange instance FreshName Range where freshName_ = freshNoName instance FreshName () where freshName_ () = freshNoName_ --------------------------------------------------------------------------- -- ** Managing file names --------------------------------------------------------------------------- -- | Maps top-level module names to the corresponding source file -- names. type ModuleToSource = Map TopLevelModuleName AbsolutePath -- | Maps source file names to the corresponding top-level module -- names. type SourceToModule = Map AbsolutePath TopLevelModuleName -- | Creates a 'SourceToModule' map based on 'stModuleToSource'. -- -- O(n log n). -- -- For a single reverse lookup in 'stModuleToSource', -- rather use 'lookupModuleFromSourse'. sourceToModule :: TCM SourceToModule sourceToModule = Map.fromList . List.map (\(m, f) -> (f, m)) . Map.toList <$> useTC stModuleToSource -- | Lookup an 'AbsolutePath' in 'sourceToModule'. -- -- O(n). lookupModuleFromSource :: AbsolutePath -> TCM (Maybe TopLevelModuleName) lookupModuleFromSource f = fmap fst . List.find ((f ==) . snd) . Map.toList <$> useTC stModuleToSource --------------------------------------------------------------------------- -- ** Interface --------------------------------------------------------------------------- data ModuleInfo = ModuleInfo { miInterface :: Interface , miWarnings :: Bool -- ^ 'True' if warnings were encountered when the module was type -- checked. , miPrimitive :: Bool -- ^ 'True' if the module is a primitive module, which should always -- be importable. } -- Note that the use of 'C.TopLevelModuleName' here is a potential -- performance problem, because these names do not contain unique -- identifiers. type VisitedModules = Map C.TopLevelModuleName ModuleInfo type DecodedModules = Map C.TopLevelModuleName Interface data ForeignCode = ForeignCode Range String deriving Show data Interface = Interface { iSourceHash :: Hash -- ^ Hash of the source code. , iSource :: Text -- ^ The source code. The source code is stored so that the HTML -- and LaTeX backends can generate their output without having to -- re-read the (possibly out of date) source code. , iFileType :: FileType -- ^ Source file type, determined from the file extension , iImportedModules :: [(ModuleName, Hash)] -- ^ Imported modules and their hashes. , iModuleName :: ModuleName -- ^ Module name of this interface. , iScope :: Map ModuleName Scope -- ^ Scope defined by this module. -- -- Andreas, AIM XX: Too avoid duplicate serialization, this field is -- not serialized, so if you deserialize an interface, @iScope@ -- will be empty. -- But 'constructIScope' constructs 'iScope' from 'iInsideScope'. , iInsideScope :: ScopeInfo -- ^ Scope after we loaded this interface. -- Used in 'Agda.Interaction.BasicOps.AtTopLevel' -- and 'Agda.Interaction.CommandLine.interactionLoop'. , iSignature :: Signature , iDisplayForms :: DisplayForms -- ^ Display forms added for imported identifiers. , iUserWarnings :: Map A.QName String -- ^ User warnings for imported identifiers , iBuiltin :: BuiltinThings (String, QName) , iForeignCode :: Map BackendName [ForeignCode] , iHighlighting :: HighlightingInfo , iPragmaOptions :: [OptionsPragma] -- ^ Pragma options set in the file. , iOptionsUsed :: PragmaOptions -- ^ Options/features used when checking the file (can be different -- from options set directly in the file). , iPatternSyns :: A.PatternSynDefns , iWarnings :: [TCWarning] } deriving Show instance Pretty Interface where pretty (Interface sourceH source fileT importedM moduleN scope insideS signature display userwarn builtin foreignCode highlighting pragmaO oUsed patternS warnings) = hang "Interface" 2 $ vcat [ "source hash:" <+> (pretty . show) sourceH , "source:" $$ nest 2 (text $ T.unpack source) , "file type:" <+> (pretty . show) fileT , "imported modules:" <+> (pretty . show) importedM , "module name:" <+> pretty moduleN , "scope:" <+> (pretty . show) scope , "inside scope:" <+> (pretty . show) insideS , "signature:" <+> (pretty . show) signature , "display:" <+> (pretty . show) display , "user warnings:" <+> (pretty . show) userwarn , "builtin:" <+> (pretty . show) builtin , "Foreign code:" <+> (pretty . show) foreignCode , "highlighting:" <+> (pretty . show) highlighting , "pragma options:" <+> (pretty . show) pragmaO , "options used:" <+> (pretty . show) oUsed , "pattern syns:" <+> (pretty . show) patternS , "warnings:" <+> (pretty . show) warnings ] -- | Combines the source hash and the (full) hashes of the imported modules. iFullHash :: Interface -> Hash iFullHash i = combineHashes $ iSourceHash i : List.map snd (iImportedModules i) --------------------------------------------------------------------------- -- ** Closure --------------------------------------------------------------------------- data Closure a = Closure { clSignature :: Signature , clEnv :: TCEnv , clScope :: ScopeInfo , clModuleCheckpoints :: Map ModuleName CheckpointId , clValue :: a } deriving (Data, Functor, Foldable) instance Show a => Show (Closure a) where show cl = "Closure { clValue = " ++ show (clValue cl) ++ " }" instance HasRange a => HasRange (Closure a) where getRange = getRange . clValue buildClosure :: a -> TCM (Closure a) buildClosure x = do env <- askTC sig <- useTC stSignature scope <- useTC stScope cps <- useTC stModuleCheckpoints return $ Closure sig env scope cps x --------------------------------------------------------------------------- -- ** Constraints --------------------------------------------------------------------------- type Constraints = [ProblemConstraint] data ProblemConstraint = PConstr { constraintProblems :: Set ProblemId , theConstraint :: Closure Constraint } deriving (Data, Show) instance HasRange ProblemConstraint where getRange = getRange . theConstraint data Constraint = ValueCmp Comparison Type Term Term | ValueCmpOnFace Comparison Term Type Term Term | ElimCmp [Polarity] [IsForced] Type Term [Elim] [Elim] | TypeCmp Comparison Type Type | TelCmp Type Type Comparison Telescope Telescope -- ^ the two types are for the error message only | SortCmp Comparison Sort Sort | LevelCmp Comparison Level Level -- | ShortCut MetaId Term Type -- -- ^ A delayed instantiation. Replaces @ValueCmp@ in 'postponeTypeCheckingProblem'. | HasBiggerSort Sort | HasPTSRule Sort (Abs Sort) | UnBlock MetaId | Guarded Constraint ProblemId | IsEmpty Range Type -- ^ The range is the one of the absurd pattern. | CheckSizeLtSat Term -- ^ Check that the 'Term' is either not a SIZELT or a non-empty SIZELT. | FindInstance MetaId (Maybe MetaId) (Maybe [Candidate]) -- ^ the first argument is the instance argument, the second one is the meta -- on which the constraint may be blocked on and the third one is the list -- of candidates (or Nothing if we haven’t determined the list of -- candidates yet) | CheckFunDef Delayed Info.DefInfo QName [A.Clause] | UnquoteTactic (Maybe MetaId) Term Term Type -- ^ First argument is computation and the others are hole and goal type deriving (Data, Show) instance HasRange Constraint where getRange (IsEmpty r t) = r getRange _ = noRange {- no Range instances for Term, Type, Elm, Tele, Sort, Level, MetaId getRange (ValueCmp cmp a u v) = getRange (a,u,v) getRange (ElimCmp pol a v es es') = getRange (a,v,es,es') getRange (TypeCmp cmp a b) = getRange (a,b) getRange (TelCmp a b cmp tel tel') = getRange (a,b,tel,tel') getRange (SortCmp cmp s s') = getRange (s,s') getRange (LevelCmp cmp l l') = getRange (l,l') getRange (UnBlock x) = getRange x getRange (Guarded c pid) = getRange c getRange (FindInstance x cands) = getRange x -} instance Free Constraint where freeVars' c = case c of ValueCmp _ t u v -> freeVars' (t, (u, v)) ValueCmpOnFace _ p t u v -> freeVars' (p, (t, (u, v))) ElimCmp _ _ t u es es' -> freeVars' ((t, u), (es, es')) TypeCmp _ t t' -> freeVars' (t, t') TelCmp _ _ _ tel tel' -> freeVars' (tel, tel') SortCmp _ s s' -> freeVars' (s, s') LevelCmp _ l l' -> freeVars' (l, l') UnBlock _ -> mempty Guarded c _ -> freeVars' c IsEmpty _ t -> freeVars' t CheckSizeLtSat u -> freeVars' u FindInstance _ _ cs -> freeVars' cs CheckFunDef _ _ _ _ -> mempty HasBiggerSort s -> freeVars' s HasPTSRule s1 s2 -> freeVars' (s1 , s2) UnquoteTactic _ t h g -> freeVars' (t, (h, g)) instance TermLike Constraint where foldTerm f = \case ValueCmp _ t u v -> foldTerm f (t, u, v) ValueCmpOnFace _ p t u v -> foldTerm f (p, t, u, v) ElimCmp _ _ t u es es' -> foldTerm f (t, u, es, es') TypeCmp _ t t' -> foldTerm f (t, t') LevelCmp _ l l' -> foldTerm f (l, l') IsEmpty _ t -> foldTerm f t CheckSizeLtSat u -> foldTerm f u UnquoteTactic _ t h g -> foldTerm f (t, h, g) Guarded c _ -> foldTerm f c TelCmp _ _ _ tel1 tel2 -> foldTerm f (tel1, tel2) SortCmp _ s1 s2 -> foldTerm f (s1, s2) UnBlock _ -> mempty FindInstance _ _ _ -> mempty CheckFunDef _ _ _ _ -> mempty HasBiggerSort s -> foldTerm f s HasPTSRule s1 s2 -> foldTerm f (s1, s2) traverseTermM f c = __IMPOSSIBLE__ -- Not yet implemented data Comparison = CmpEq | CmpLeq deriving (Eq, Data, Show) instance Pretty Comparison where pretty CmpEq = "=" pretty CmpLeq = "=<" -- | An extension of 'Comparison' to @>=@. data CompareDirection = DirEq | DirLeq | DirGeq deriving (Eq, Show) instance Pretty CompareDirection where pretty = text . \case DirEq -> "=" DirLeq -> "=<" DirGeq -> ">=" -- | Embed 'Comparison' into 'CompareDirection'. fromCmp :: Comparison -> CompareDirection fromCmp CmpEq = DirEq fromCmp CmpLeq = DirLeq -- | Flip the direction of comparison. flipCmp :: CompareDirection -> CompareDirection flipCmp DirEq = DirEq flipCmp DirLeq = DirGeq flipCmp DirGeq = DirLeq -- | Turn a 'Comparison' function into a 'CompareDirection' function. -- -- Property: @dirToCmp f (fromCmp cmp) = f cmp@ dirToCmp :: (Comparison -> a -> a -> c) -> CompareDirection -> a -> a -> c dirToCmp cont DirEq = cont CmpEq dirToCmp cont DirLeq = cont CmpLeq dirToCmp cont DirGeq = flip $ cont CmpLeq --------------------------------------------------------------------------- -- * Open things --------------------------------------------------------------------------- -- | A thing tagged with the context it came from. data Open a = OpenThing { openThingCheckpoint :: CheckpointId, openThing :: a } deriving (Data, Show, Functor, Foldable, Traversable) instance Decoration Open where traverseF f (OpenThing cp x) = OpenThing cp <$> f x --------------------------------------------------------------------------- -- * Judgements -- -- Used exclusively for typing of meta variables. --------------------------------------------------------------------------- -- | Parametrized since it is used without MetaId when creating a new meta. data Judgement a = HasType { jMetaId :: a, jMetaType :: Type } | IsSort { jMetaId :: a, jMetaType :: Type } -- Andreas, 2011-04-26: type needed for higher-order sort metas instance Show a => Show (Judgement a) where show (HasType a t) = show a ++ " : " ++ show t show (IsSort a t) = show a ++ " :sort " ++ show t ----------------------------------------------------------------------------- -- ** Generalizable variables ----------------------------------------------------------------------------- data DoGeneralize = YesGeneralize | NoGeneralize deriving (Eq, Ord, Show, Data) -- | The value of a generalizable variable. This is created to be a -- generalizable meta before checking the type to be generalized. data GeneralizedValue = GeneralizedValue { genvalCheckpoint :: CheckpointId , genvalTerm :: Term , genvalType :: Type } deriving (Show, Data) --------------------------------------------------------------------------- -- ** Meta variables --------------------------------------------------------------------------- data MetaVariable = MetaVar { mvInfo :: MetaInfo , mvPriority :: MetaPriority -- ^ some metavariables are more eager to be instantiated , mvPermutation :: Permutation -- ^ a metavariable doesn't have to depend on all variables -- in the context, this "permutation" will throw away the -- ones it does not depend on , mvJudgement :: Judgement MetaId , mvInstantiation :: MetaInstantiation , mvListeners :: Set Listener -- ^ meta variables scheduled for eta-expansion but blocked by this one , mvFrozen :: Frozen -- ^ are we past the point where we can instantiate this meta variable? } data Listener = EtaExpand MetaId | CheckConstraint Nat ProblemConstraint instance Eq Listener where EtaExpand x == EtaExpand y = x == y CheckConstraint x _ == CheckConstraint y _ = x == y _ == _ = False instance Ord Listener where EtaExpand x `compare` EtaExpand y = x `compare` y CheckConstraint x _ `compare` CheckConstraint y _ = x `compare` y EtaExpand{} `compare` CheckConstraint{} = LT CheckConstraint{} `compare` EtaExpand{} = GT -- | Frozen meta variable cannot be instantiated by unification. -- This serves to prevent the completion of a definition by its use -- outside of the current block. -- (See issues 118, 288, 399). data Frozen = Frozen -- ^ Do not instantiate. | Instantiable deriving (Eq, Show) data MetaInstantiation = InstV [Arg String] Term -- ^ solved by term (abstracted over some free variables) | Open -- ^ unsolved | OpenInstance -- ^ open, to be instantiated by instance search | BlockedConst Term -- ^ solution blocked by unsolved constraints | PostponedTypeCheckingProblem (Closure TypeCheckingProblem) (TCM Bool) -- | Solving a 'CheckArgs' constraint may or may not check the target type. If -- it did, it returns a handle to any unsolved constraints. data CheckedTarget = CheckedTarget (Maybe ProblemId) | NotCheckedTarget data TypeCheckingProblem = CheckExpr Comparison A.Expr Type | CheckArgs ExpandHidden Range [NamedArg A.Expr] Type Type ([Maybe Range] -> Elims -> Type -> CheckedTarget -> TCM Term) | CheckProjAppToKnownPrincipalArg Comparison A.Expr ProjOrigin (NonemptyList QName) A.Args Type Int Term Type | CheckLambda Comparison (Arg ([WithHiding Name], Maybe Type)) A.Expr Type -- ^ @(λ (xs : t₀) → e) : t@ -- This is not an instance of 'CheckExpr' as the domain type -- has already been checked. -- For example, when checking -- @(λ (x y : Fin _) → e) : (x : Fin n) → ?@ -- we want to postpone @(λ (y : Fin n) → e) : ?@ where @Fin n@ -- is a 'Type' rather than an 'A.Expr'. | DoQuoteTerm Comparison Term Type -- ^ Quote the given term and check type against `Term` instance Show MetaInstantiation where show (InstV tel t) = "InstV " ++ show tel ++ " (" ++ show t ++ ")" show Open = "Open" show OpenInstance = "OpenInstance" show (BlockedConst t) = "BlockedConst (" ++ show t ++ ")" show (PostponedTypeCheckingProblem{}) = "PostponedTypeCheckingProblem (...)" -- | Meta variable priority: -- When we have an equation between meta-variables, which one -- should be instantiated? -- -- Higher value means higher priority to be instantiated. newtype MetaPriority = MetaPriority Int deriving (Eq , Ord , Show) data RunMetaOccursCheck = RunMetaOccursCheck | DontRunMetaOccursCheck deriving (Eq , Ord , Show) -- | @MetaInfo@ is cloned from one meta to the next during pruning. data MetaInfo = MetaInfo { miClosRange :: Closure Range -- TODO: Not so nice. But we want both to have the environment of the meta (Closure) and its range. -- , miRelevance :: Relevance -- ^ Created in irrelevant position? , miMetaOccursCheck :: RunMetaOccursCheck -- ^ Run the extended occurs check that goes in definitions? , miNameSuggestion :: MetaNameSuggestion -- ^ Used for printing. -- @Just x@ if meta-variable comes from omitted argument with name @x@. , miGeneralizable :: Arg DoGeneralize -- ^ Should this meta be generalized if unsolved? If so, at what ArgInfo? } -- | Name suggestion for meta variable. Empty string means no suggestion. type MetaNameSuggestion = String -- | For printing, we couple a meta with its name suggestion. data NamedMeta = NamedMeta { nmSuggestion :: MetaNameSuggestion , nmid :: MetaId } instance Pretty NamedMeta where pretty (NamedMeta "" x) = pretty x pretty (NamedMeta "_" x) = pretty x pretty (NamedMeta s x) = text $ "_" ++ s ++ prettyShow x type MetaStore = IntMap MetaVariable instance HasRange MetaInfo where getRange = clValue . miClosRange instance HasRange MetaVariable where getRange m = getRange $ getMetaInfo m instance SetRange MetaInfo where setRange r m = m { miClosRange = (miClosRange m) { clValue = r }} instance SetRange MetaVariable where setRange r m = m { mvInfo = setRange r (mvInfo m) } normalMetaPriority :: MetaPriority normalMetaPriority = MetaPriority 0 lowMetaPriority :: MetaPriority lowMetaPriority = MetaPriority (-10) highMetaPriority :: MetaPriority highMetaPriority = MetaPriority 10 getMetaInfo :: MetaVariable -> Closure Range getMetaInfo = miClosRange . mvInfo getMetaScope :: MetaVariable -> ScopeInfo getMetaScope m = clScope $ getMetaInfo m getMetaEnv :: MetaVariable -> TCEnv getMetaEnv m = clEnv $ getMetaInfo m getMetaSig :: MetaVariable -> Signature getMetaSig m = clSignature $ getMetaInfo m getMetaRelevance :: MetaVariable -> Relevance getMetaRelevance = envRelevance . getMetaEnv getMetaModality :: MetaVariable -> Modality getMetaModality = envModality . getMetaEnv -- Lenses metaFrozen :: Lens' Frozen MetaVariable metaFrozen f mv = f (mvFrozen mv) <&> \ x -> mv { mvFrozen = x } --------------------------------------------------------------------------- -- ** Interaction meta variables --------------------------------------------------------------------------- -- | Interaction points are created by the scope checker who sets the range. -- The meta variable is created by the type checker and then hooked up to the -- interaction point. data InteractionPoint = InteractionPoint { ipRange :: Range -- ^ The position of the interaction point. , ipMeta :: Maybe MetaId -- ^ The meta variable, if any, holding the type etc. , ipSolved:: Bool -- ^ Has this interaction point already been solved? , ipClause:: IPClause -- ^ The clause of the interaction point (if any). -- Used for case splitting. } instance Eq InteractionPoint where (==) = (==) `on` ipMeta -- | Data structure managing the interaction points. -- -- We never remove interaction points from this map, only set their -- 'ipSolved' to @True@. (Issue #2368) type InteractionPoints = Map InteractionId InteractionPoint -- | Which clause is an interaction point located in? data IPClause = IPClause { ipcQName :: QName -- ^ The name of the function. , ipcClauseNo :: Int -- ^ The number of the clause of this function. , ipcClause :: A.RHS -- ^ The original AST clause rhs. } | IPNoClause -- ^ The interaction point is not in the rhs of a clause. deriving Data instance Eq IPClause where IPNoClause == IPNoClause = True IPClause x i _ == IPClause x' i' _ = x == x' && i == i' _ == _ = False --------------------------------------------------------------------------- -- ** Signature --------------------------------------------------------------------------- data Signature = Sig { _sigSections :: Sections , _sigDefinitions :: Definitions , _sigRewriteRules:: RewriteRuleMap -- ^ The rewrite rules defined in this file. } deriving (Data, Show) sigSections :: Lens' Sections Signature sigSections f s = f (_sigSections s) <&> \x -> s {_sigSections = x} sigDefinitions :: Lens' Definitions Signature sigDefinitions f s = f (_sigDefinitions s) <&> \x -> s {_sigDefinitions = x} sigRewriteRules :: Lens' RewriteRuleMap Signature sigRewriteRules f s = f (_sigRewriteRules s) <&> \x -> s {_sigRewriteRules = x} type Sections = Map ModuleName Section type Definitions = HashMap QName Definition type RewriteRuleMap = HashMap QName RewriteRules type DisplayForms = HashMap QName [LocalDisplayForm] newtype Section = Section { _secTelescope :: Telescope } deriving (Data, Show) instance Pretty Section where pretty = pretty . _secTelescope secTelescope :: Lens' Telescope Section secTelescope f s = f (_secTelescope s) <&> \x -> s {_secTelescope = x} emptySignature :: Signature emptySignature = Sig Map.empty HMap.empty HMap.empty -- | A @DisplayForm@ is in essence a rewrite rule -- @ -- q ts --> dt -- @ -- for a defined symbol (could be a constructor as well) @q@. -- The right hand side is a 'DisplayTerm' which is used to -- 'reify' to a more readable 'Abstract.Syntax'. -- -- The patterns @ts@ are just terms, but @var 0@ is interpreted -- as a hole. Each occurrence of @var 0@ is a new hole (pattern var). -- For each *occurrence* of @var0@ the rhs @dt@ has a free variable. -- These are instantiated when matching a display form against a -- term @q vs@ succeeds. data DisplayForm = Display { dfFreeVars :: Nat -- ^ Number @n@ of free variables in 'dfRHS'. , dfPats :: Elims -- ^ Left hand side patterns, where @var 0@ stands for a pattern -- variable. There should be @n@ occurrences of @var0@ in -- 'dfPats'. -- The 'ArgInfo' is ignored in these patterns. , dfRHS :: DisplayTerm -- ^ Right hand side, with @n@ free variables. } deriving (Data, Show) type LocalDisplayForm = Open DisplayForm -- | A structured presentation of a 'Term' for reification into -- 'Abstract.Syntax'. data DisplayTerm = DWithApp DisplayTerm [DisplayTerm] Elims -- ^ @(f vs | ws) es@. -- The first 'DisplayTerm' is the parent function @f@ with its args @vs@. -- The list of 'DisplayTerm's are the with expressions @ws@. -- The 'Elims' are additional arguments @es@ -- (possible in case the with-application is of function type) -- or projections (if it is of record type). | DCon ConHead ConInfo [Arg DisplayTerm] -- ^ @c vs@. | DDef QName [Elim' DisplayTerm] -- ^ @d vs@. | DDot Term -- ^ @.v@. | DTerm Term -- ^ @v@. deriving (Data, Show) instance Free DisplayForm where freeVars' (Display n ps t) = bind (freeVars' ps) `mappend` bind' n (freeVars' t) instance Free DisplayTerm where freeVars' (DWithApp t ws es) = freeVars' (t, (ws, es)) freeVars' (DCon _ _ vs) = freeVars' vs freeVars' (DDef _ es) = freeVars' es freeVars' (DDot v) = freeVars' v freeVars' (DTerm v) = freeVars' v instance Pretty DisplayTerm where prettyPrec p v = case v of DTerm v -> prettyPrec p v DDot v -> "." P.<> prettyPrec 10 v DDef f es -> pretty f `pApp` es DCon c _ vs -> pretty (conName c) `pApp` map Apply vs DWithApp h ws es -> mparens (p > 0) (sep [ pretty h , nest 2 $ fsep [ "|" <+> pretty w | w <- ws ] ]) `pApp` es where pApp d els = mparens (not (null els) && p > 9) $ sep [d, nest 2 $ fsep (map (prettyPrec 10) els)] -- | By default, we have no display form. defaultDisplayForm :: QName -> [LocalDisplayForm] defaultDisplayForm c = [] defRelevance :: Definition -> Relevance defRelevance = getRelevance . defArgInfo -- | Non-linear (non-constructor) first-order pattern. data NLPat = PVar !Int [Arg Int] -- ^ Matches anything (modulo non-linearity) that only contains bound -- variables that occur in the given arguments. | PWild -- ^ Matches anything (e.g. irrelevant terms). | PDef QName PElims -- ^ Matches @f es@ | PLam ArgInfo (Abs NLPat) -- ^ Matches @λ x → t@ | PPi (Dom NLPType) (Abs NLPType) -- ^ Matches @(x : A) → B@ | PBoundVar {-# UNPACK #-} !Int PElims -- ^ Matches @x es@ where x is a lambda-bound variable | PTerm Term -- ^ Matches the term modulo β (ideally βη). deriving (Data, Show) type PElims = [Elim' NLPat] data NLPType = NLPType { nlpTypeLevel :: NLPat -- always PWild or PVar (with all bound variables in scope) , nlpTypeUnEl :: NLPat } deriving (Data, Show) type RewriteRules = [RewriteRule] -- | Rewrite rules can be added independently from function clauses. data RewriteRule = RewriteRule { rewName :: QName -- ^ Name of rewrite rule @q : Γ → f ps ≡ rhs@ -- where @≡@ is the rewrite relation. , rewContext :: Telescope -- ^ @Γ@. , rewHead :: QName -- ^ @f@. , rewPats :: PElims -- ^ @Γ ⊢ f ps : t@. , rewRHS :: Term -- ^ @Γ ⊢ rhs : t@. , rewType :: Type -- ^ @Γ ⊢ t@. } deriving (Data, Show) data Definition = Defn { defArgInfo :: ArgInfo -- ^ Hiding should not be used. , defName :: QName , defType :: Type -- ^ Type of the lifted definition. , defPolarity :: [Polarity] -- ^ Variance information on arguments of the definition. -- Does not include info for dropped parameters to -- projection(-like) functions and constructors. , defArgOccurrences :: [Occurrence] -- ^ Positivity information on arguments of the definition. -- Does not include info for dropped parameters to -- projection(-like) functions and constructors. -- Sometimes Agda looks up 'Occurrence's in these lists based on -- their position, so one might consider replacing the list -- with, say, an 'IntMap'. However, presumably these lists tend -- to be short, in which case 'IntMap's could be slower than -- lists. For instance, at one point the longest list -- encountered for the standard library (in serialised -- interfaces) had length 27. Distribution: -- -- Length, number of lists -- ----------------------- -- -- 0, 2444 -- 1, 721 -- 2, 433 -- 3, 668 -- 4, 602 -- 5, 624 -- 6, 626 -- 7, 484 -- 8, 375 -- 9, 264 -- 10, 305 -- 11, 188 -- 12, 171 -- 13, 108 -- 14, 84 -- 15, 80 -- 16, 38 -- 17, 23 -- 18, 16 -- 19, 8 -- 20, 7 -- 21, 5 -- 22, 2 -- 23, 3 -- 27, 1 , defArgGeneralizable :: NumGeneralizableArgs -- ^ How many arguments should be generalised. , defGeneralizedParams :: [Maybe Name] -- ^ Gives the name of the (bound variable) parameter for named generalized -- parameters. This is needed to bring it into scope when type checking -- the data/record definition corresponding to a type with generalized -- parameters. , defDisplay :: [LocalDisplayForm] , defMutual :: MutualId , defCompiledRep :: CompiledRepresentation , defInstance :: Maybe QName -- ^ @Just q@ when this definition is an instance of class q , defCopy :: Bool -- ^ Has this function been created by a module -- instantiation? , defMatchable :: Bool -- ^ Is the def matched against in a rewrite rule? , defNoCompilation :: Bool -- ^ should compilers skip this? Used for e.g. cubical's comp , defInjective :: Bool -- ^ Should the def be treated as injective by the pattern matching unifier? , theDef :: Defn } deriving (Data, Show) data NumGeneralizableArgs = NoGeneralizableArgs | SomeGeneralizableArgs Int -- ^ When lambda-lifting new args are generalizable if -- 'SomeGeneralizableArgs', also when the number is zero. deriving (Data, Show) theDefLens :: Lens' Defn Definition theDefLens f d = f (theDef d) <&> \ df -> d { theDef = df } -- | Create a definition with sensible defaults. defaultDefn :: ArgInfo -> QName -> Type -> Defn -> Definition defaultDefn info x t def = Defn { defArgInfo = info , defName = x , defType = t , defPolarity = [] , defArgOccurrences = [] , defArgGeneralizable = NoGeneralizableArgs , defGeneralizedParams = [] , defDisplay = defaultDisplayForm x , defMutual = 0 , defCompiledRep = noCompiledRep , defInstance = Nothing , defCopy = False , defMatchable = False , defNoCompilation = False , defInjective = False , theDef = def } -- | Polarity for equality and subtype checking. data Polarity = Covariant -- ^ monotone | Contravariant -- ^ antitone | Invariant -- ^ no information (mixed variance) | Nonvariant -- ^ constant deriving (Data, Show, Eq) instance Pretty Polarity where pretty = text . \case Covariant -> "+" Contravariant -> "-" Invariant -> "*" Nonvariant -> "_" -- | Information about whether an argument is forced by the type of a function. data IsForced = Forced | NotForced deriving (Data, Show, Eq) -- | The backends are responsible for parsing their own pragmas. data CompilerPragma = CompilerPragma Range String deriving (Data, Show, Eq) instance HasRange CompilerPragma where getRange (CompilerPragma r _) = r type BackendName = String jsBackendName, ghcBackendName :: BackendName jsBackendName = "JS" ghcBackendName = "GHC" type CompiledRepresentation = Map BackendName [CompilerPragma] noCompiledRep :: CompiledRepresentation noCompiledRep = Map.empty -- A face represented as a list of equality constraints. -- (r,False) ↦ (r = i0) -- (r,True ) ↦ (r = i1) type Face = [(Term,Bool)] -- | An alternative representation of partial elements in a telescope: -- Γ ⊢ λ Δ. [φ₁ u₁, ... , φₙ uₙ] : Δ → PartialP (∨_ᵢ φᵢ) T -- see cubicaltt paper (however we do not store the type T). data System = System { systemTel :: Telescope -- ^ the telescope Δ, binding vars for the clauses, Γ ⊢ Δ , systemClauses :: [(Face,Term)] -- ^ a system [φ₁ u₁, ... , φₙ uₙ] where Γ, Δ ⊢ φᵢ and Γ, Δ, φᵢ ⊢ uᵢ } deriving (Data, Show) -- | Additional information for extended lambdas. data ExtLamInfo = ExtLamInfo { extLamModule :: ModuleName -- ^ For complicated reasons the scope checker decides the QName of a -- pattern lambda, and thus its module. We really need to decide the -- module during type checking though, since if the lambda appears in a -- refined context the module picked by the scope checker has very much -- the wrong parameters. , extLamSys :: !(Maybe System) } deriving (Data, Show) modifySystem :: (System -> System) -> ExtLamInfo -> ExtLamInfo modifySystem f e = let !e' = e { extLamSys = f <$> extLamSys e } in e' -- | Additional information for projection 'Function's. data Projection = Projection { projProper :: Maybe QName -- ^ @Nothing@ if only projection-like, @Just r@ if record projection. -- The @r@ is the name of the record type projected from. -- This field is updated by module application. , projOrig :: QName -- ^ The original projection name -- (current name could be from module application). , projFromType :: Arg QName -- ^ Type projected from. Original record type if @projProper = Just{}@. -- Also stores @ArgInfo@ of the principal argument. -- This field is unchanged by module application. , projIndex :: Int -- ^ Index of the record argument. -- Start counting with 1, because 0 means that -- it is already applied to the record value. -- This can happen in module instantiation, but -- then either the record value is @var 0@, or @funProjection == Nothing@. , projLams :: ProjLams -- ^ Term @t@ to be be applied to record parameters and record value. -- The parameters will be dropped. -- In case of a proper projection, a postfix projection application -- will be created: @t = \ pars r -> r .p@ -- (Invariant: the number of abstractions equals 'projIndex'.) -- In case of a projection-like function, just the function symbol -- is returned as 'Def': @t = \ pars -> f@. } deriving (Data, Show) -- | Abstractions to build projection function (dropping parameters). newtype ProjLams = ProjLams { getProjLams :: [Arg ArgName] } deriving (Data, Show, Null) -- | Building the projection function (which drops the parameters). projDropPars :: Projection -> ProjOrigin -> Term -- Proper projections: projDropPars (Projection Just{} d _ _ lams) o = case initLast $ getProjLams lams of Nothing -> Def d [] Just (pars, Arg i y) -> let core = Lam i $ Abs y $ Var 0 [Proj o d] in List.foldr (\ (Arg ai x) -> Lam ai . NoAbs x) core pars -- Projection-like functions: projDropPars (Projection Nothing _ _ _ lams) o | null lams = __IMPOSSIBLE__ projDropPars (Projection Nothing d _ _ lams) o = List.foldr (\ (Arg ai x) -> Lam ai . NoAbs x) (Def d []) $ init $ getProjLams lams -- | The info of the principal (record) argument. projArgInfo :: Projection -> ArgInfo projArgInfo (Projection _ _ _ _ lams) = maybe __IMPOSSIBLE__ getArgInfo $ lastMaybe $ getProjLams lams -- | Should a record type admit eta-equality? data EtaEquality = Specified { theEtaEquality :: !HasEta } -- ^ User specifed 'eta-equality' or 'no-eta-equality'. | Inferred { theEtaEquality :: !HasEta } -- ^ Positivity checker inferred whether eta is safe. deriving (Data, Show, Eq) -- | Make sure we do not overwrite a user specification. setEtaEquality :: EtaEquality -> HasEta -> EtaEquality setEtaEquality e@Specified{} _ = e setEtaEquality _ b = Inferred b data FunctionFlag = FunStatic -- ^ Should calls to this function be normalised at compile-time? | FunInline -- ^ Should calls to this function be inlined by the compiler? | FunMacro -- ^ Is this function a macro? deriving (Data, Eq, Ord, Enum, Show) data CompKit = CompKit { nameOfHComp :: Maybe QName , nameOfTransp :: Maybe QName } deriving (Data, Eq, Ord, Show) emptyCompKit :: CompKit emptyCompKit = CompKit Nothing Nothing data Defn = Axiom -- ^ Postulate | DataOrRecSig { datarecPars :: Int } -- ^ Data or record type signature that doesn't yet have a definition | GeneralizableVar -- ^ Generalizable variable (introduced in `generalize` block) | AbstractDefn Defn -- ^ Returned by 'getConstInfo' if definition is abstract. | Function { funClauses :: [Clause] , funCompiled :: Maybe CompiledClauses -- ^ 'Nothing' while function is still type-checked. -- @Just cc@ after type and coverage checking and -- translation to case trees. , funSplitTree :: Maybe SplitTree -- ^ The split tree constructed by the coverage -- checker. Needed to re-compile the clauses after -- forcing translation. , funTreeless :: Maybe Compiled -- ^ Intermediate representation for compiler backends. , funCovering :: [Closure Clause] -- ^ Covering clauses computed by coverage checking. -- Erased by (IApply) confluence checking(?) , funInv :: FunctionInverse , funMutual :: Maybe [QName] -- ^ Mutually recursive functions, @data@s and @record@s. -- Does include this function. -- Empty list if not recursive. -- @Nothing@ if not yet computed (by positivity checker). , funAbstr :: IsAbstract , funDelayed :: Delayed -- ^ Are the clauses of this definition delayed? , funProjection :: Maybe Projection -- ^ Is it a record projection? -- If yes, then return the name of the record type and index of -- the record argument. Start counting with 1, because 0 means that -- it is already applied to the record. (Can happen in module -- instantiation.) This information is used in the termination -- checker. , funFlags :: Set FunctionFlag , funTerminates :: Maybe Bool -- ^ Has this function been termination checked? Did it pass? , funExtLam :: Maybe ExtLamInfo -- ^ Is this function generated from an extended lambda? -- If yes, then return the number of hidden and non-hidden lambda-lifted arguments , funWith :: Maybe QName -- ^ Is this a generated with-function? If yes, then what's the -- name of the parent function. , funCopatternLHS :: Bool -- ^ Is this a function defined by copatterns? } | Datatype { dataPars :: Nat -- ^ Number of parameters. , dataIxs :: Nat -- ^ Number of indices. , dataInduction :: Induction -- ^ @data@ or @codata@ (legacy). , dataClause :: (Maybe Clause) -- ^ This might be in an instantiated module. , dataCons :: [QName] -- ^ Constructor names , ordered according to the order of their definition. , dataSort :: Sort , dataMutual :: Maybe [QName] -- ^ Mutually recursive functions, @data@s and @record@s. -- Does include this data type. -- Empty if not recursive. -- @Nothing@ if not yet computed (by positivity checker). , dataAbstr :: IsAbstract , dataPathCons :: [QName] -- ^ Path constructor names (subset of dataCons) } | Record { recPars :: Nat -- ^ Number of parameters. , recClause :: Maybe Clause -- ^ Was this record type created by a module application? -- If yes, the clause is its definition (linking back to the original record type). , recConHead :: ConHead -- ^ Constructor name and fields. , recNamedCon :: Bool -- ^ Does this record have a @constructor@? , recFields :: [Arg QName] -- ^ The record field names. , recTel :: Telescope -- ^ The record field telescope. (Includes record parameters.) -- Note: @TelV recTel _ == telView' recConType@. -- Thus, @recTel@ is redundant. , recMutual :: Maybe [QName] -- ^ Mutually recursive functions, @data@s and @record@s. -- Does include this record. -- Empty if not recursive. -- @Nothing@ if not yet computed (by positivity checker). , recEtaEquality' :: EtaEquality -- ^ Eta-expand at this record type? -- @False@ for unguarded recursive records and coinductive records -- unless the user specifies otherwise. , recInduction :: Maybe Induction -- ^ 'Inductive' or 'CoInductive'? Matters only for recursive records. -- 'Nothing' means that the user did not specify it, which is an error -- for recursive records. , recAbstr :: IsAbstract , recComp :: CompKit } | Constructor { conPars :: Int -- ^ Number of parameters. , conArity :: Int -- ^ Number of arguments (excluding parameters). , conSrcCon :: ConHead -- ^ Name of (original) constructor and fields. (This might be in a module instance.) , conData :: QName -- ^ Name of datatype or record type. , conAbstr :: IsAbstract , conInd :: Induction -- ^ Inductive or coinductive? , conComp :: (CompKit, Maybe [QName]) -- ^ (cubical composition, projections) , conForced :: [IsForced] -- ^ Which arguments are forced (i.e. determined by the type of the constructor)? , conErased :: [Bool] -- ^ Which arguments are erased at runtime (computed during compilation to treeless) } | Primitive { primAbstr :: IsAbstract , primName :: String , primClauses :: [Clause] -- ^ 'null' for primitive functions, @not null@ for builtin functions. , primInv :: FunctionInverse -- ^ Builtin functions can have inverses. For instance, natural number addition. , primCompiled :: Maybe CompiledClauses -- ^ 'Nothing' for primitive functions, -- @'Just' something@ for builtin functions. } -- ^ Primitive or builtin functions. deriving (Data, Show) instance Pretty Definition where pretty Defn{..} = "Defn {" vcat [ "defArgInfo =" pshow defArgInfo , "defName =" pretty defName , "defType =" pretty defType , "defPolarity =" pshow defPolarity , "defArgOccurrences =" pshow defArgOccurrences , "defGeneralizedParams =" pshow defGeneralizedParams , "defDisplay =" pshow defDisplay -- TODO: pretty DisplayForm , "defMutual =" pshow defMutual , "defCompiledRep =" pshow defCompiledRep , "defInstance =" pshow defInstance , "defCopy =" pshow defCopy , "defMatchable =" pshow defMatchable , "defInjective =" pshow defInjective , "theDef =" pretty theDef ] <+> "}" instance Pretty Defn where pretty Axiom = "Axiom" pretty (DataOrRecSig n) = "DataOrRecSig" <+> pretty n pretty GeneralizableVar{} = "GeneralizableVar" pretty (AbstractDefn def) = "AbstractDefn" parens (pretty def) pretty Function{..} = "Function {" vcat [ "funClauses =" vcat (map pretty funClauses) , "funCompiled =" pshow funCompiled , "funSplitTree =" pshow funSplitTree , "funTreeless =" pshow funTreeless , "funInv =" pshow funInv , "funMutual =" pshow funMutual , "funAbstr =" pshow funAbstr , "funDelayed =" pshow funDelayed , "funProjection =" pshow funProjection , "funFlags =" pshow funFlags , "funTerminates =" pshow funTerminates , "funWith =" pshow funWith , "funCopatternLHS =" pshow funCopatternLHS ] "}" pretty Datatype{..} = "Datatype {" vcat [ "dataPars =" pshow dataPars , "dataIxs =" pshow dataIxs , "dataInduction =" pshow dataInduction , "dataClause =" pretty dataClause , "dataCons =" pshow dataCons , "dataSort =" pretty dataSort , "dataMutual =" pshow dataMutual , "dataAbstr =" pshow dataAbstr ] "}" pretty Record{..} = "Record {" vcat [ "recPars =" pshow recPars , "recClause =" pretty recClause , "recConHead =" pshow recConHead , "recNamedCon =" pshow recNamedCon , "recFields =" pshow recFields , "recTel =" pretty recTel , "recMutual =" pshow recMutual , "recEtaEquality' =" pshow recEtaEquality' , "recInduction =" pshow recInduction , "recAbstr =" pshow recAbstr ] "}" pretty Constructor{..} = "Constructor {" vcat [ "conPars =" pshow conPars , "conArity =" pshow conArity , "conSrcCon =" pshow conSrcCon , "conData =" pshow conData , "conAbstr =" pshow conAbstr , "conInd =" pshow conInd , "conErased =" pshow conErased ] "}" pretty Primitive{..} = "Primitive {" vcat [ "primAbstr =" pshow primAbstr , "primName =" pshow primName , "primClauses =" pshow primClauses , "primCompiled =" pshow primCompiled ] "}" -- | Is the record type recursive? recRecursive :: Defn -> Bool recRecursive (Record { recMutual = Just qs }) = not $ null qs recRecursive _ = __IMPOSSIBLE__ recEtaEquality :: Defn -> HasEta recEtaEquality = theEtaEquality . recEtaEquality' -- | A template for creating 'Function' definitions, with sensible defaults. emptyFunction :: Defn emptyFunction = Function { funClauses = [] , funCompiled = Nothing , funSplitTree = Nothing , funTreeless = Nothing , funInv = NotInjective , funMutual = Nothing , funAbstr = ConcreteDef , funDelayed = NotDelayed , funProjection = Nothing , funFlags = Set.empty , funTerminates = Nothing , funExtLam = Nothing , funWith = Nothing , funCopatternLHS = False , funCovering = [] } funFlag :: FunctionFlag -> Lens' Bool Defn funFlag flag f def@Function{ funFlags = flags } = f (Set.member flag flags) <&> \ b -> def{ funFlags = (if b then Set.insert else Set.delete) flag flags } funFlag _ f def = f False <&> const def funStatic, funInline, funMacro :: Lens' Bool Defn funStatic = funFlag FunStatic funInline = funFlag FunInline funMacro = funFlag FunMacro isMacro :: Defn -> Bool isMacro = (^. funMacro) -- | Checking whether we are dealing with a function yet to be defined. isEmptyFunction :: Defn -> Bool isEmptyFunction def = case def of Function { funClauses = [] } -> True _ -> False isCopatternLHS :: [Clause] -> Bool isCopatternLHS = List.any (List.any (isJust . A.isProjP) . namedClausePats) recCon :: Defn -> QName recCon Record{ recConHead } = conName recConHead recCon _ = __IMPOSSIBLE__ defIsRecord :: Defn -> Bool defIsRecord Record{} = True defIsRecord _ = False defIsDataOrRecord :: Defn -> Bool defIsDataOrRecord Record{} = True defIsDataOrRecord Datatype{} = True defIsDataOrRecord _ = False defConstructors :: Defn -> [QName] defConstructors Datatype{dataCons = cs} = cs defConstructors Record{recConHead = c} = [conName c] defConstructors _ = __IMPOSSIBLE__ newtype Fields = Fields [(C.Name, Type)] deriving Null -- | Did we encounter a simplifying reduction? -- In terms of CIC, that would be a iota-reduction. -- In terms of Agda, this is a constructor or literal -- pattern that matched. -- Just beta-reduction (substitution) or delta-reduction -- (unfolding of definitions) does not count as simplifying? data Simplification = YesSimplification | NoSimplification deriving (Data, Eq, Show) instance Null Simplification where empty = NoSimplification null = (== NoSimplification) instance Semigroup Simplification where YesSimplification <> _ = YesSimplification NoSimplification <> s = s instance Monoid Simplification where mempty = NoSimplification mappend = (<>) data Reduced no yes = NoReduction no | YesReduction Simplification yes deriving Functor -- | Three cases: 1. not reduced, 2. reduced, but blocked, 3. reduced, not blocked. data IsReduced = NotReduced | Reduced (Blocked ()) data MaybeReduced a = MaybeRed { isReduced :: IsReduced , ignoreReduced :: a } deriving (Functor) instance IsProjElim e => IsProjElim (MaybeReduced e) where isProjElim = isProjElim . ignoreReduced type MaybeReducedArgs = [MaybeReduced (Arg Term)] type MaybeReducedElims = [MaybeReduced Elim] notReduced :: a -> MaybeReduced a notReduced x = MaybeRed NotReduced x reduced :: Blocked (Arg Term) -> MaybeReduced (Arg Term) reduced b = case b of NotBlocked _ (Arg _ (MetaV x _)) -> MaybeRed (Reduced $ Blocked x ()) v _ -> MaybeRed (Reduced $ () <$ b) v where v = ignoreBlocking b -- | Controlling 'reduce'. data AllowedReduction = ProjectionReductions -- ^ (Projection and) projection-like functions may be reduced. | InlineReductions -- ^ Functions marked INLINE may be reduced. | CopatternReductions -- ^ Copattern definitions may be reduced. | FunctionReductions -- ^ Non-recursive functions and primitives may be reduced. | RecursiveReductions -- ^ Even recursive functions may be reduced. | LevelReductions -- ^ Reduce @'Level'@ terms. | UnconfirmedReductions -- ^ Functions whose termination has not (yet) been confirmed. | NonTerminatingReductions -- ^ Functions that have failed termination checking. deriving (Show, Eq, Ord, Enum, Bounded, Data) type AllowedReductions = [AllowedReduction] -- | Not quite all reductions (skip non-terminating reductions) allReductions :: AllowedReductions allReductions = [minBound..pred maxBound] data PrimFun = PrimFun { primFunName :: QName , primFunArity :: Arity , primFunImplementation :: [Arg Term] -> Int -> ReduceM (Reduced MaybeReducedArgs Term) } primFun :: QName -> Arity -> ([Arg Term] -> ReduceM (Reduced MaybeReducedArgs Term)) -> PrimFun primFun q ar imp = PrimFun q ar (\ args _ -> imp args) defClauses :: Definition -> [Clause] defClauses Defn{theDef = Function{funClauses = cs}} = cs defClauses Defn{theDef = Primitive{primClauses = cs}} = cs defClauses Defn{theDef = Datatype{dataClause = Just c}} = [c] defClauses Defn{theDef = Record{recClause = Just c}} = [c] defClauses _ = [] defCompiled :: Definition -> Maybe CompiledClauses defCompiled Defn{theDef = Function {funCompiled = mcc}} = mcc defCompiled Defn{theDef = Primitive{primCompiled = mcc}} = mcc defCompiled _ = Nothing defParameters :: Definition -> Maybe Nat defParameters Defn{theDef = Datatype{dataPars = n}} = Just n defParameters Defn{theDef = Record {recPars = n}} = Just n defParameters _ = Nothing defInverse :: Definition -> FunctionInverse defInverse Defn{theDef = Function { funInv = inv }} = inv defInverse Defn{theDef = Primitive{ primInv = inv }} = inv defInverse _ = NotInjective defCompilerPragmas :: BackendName -> Definition -> [CompilerPragma] defCompilerPragmas b = reverse . fromMaybe [] . Map.lookup b . defCompiledRep -- reversed because we add new pragmas to the front of the list -- | Are the clauses of this definition delayed? defDelayed :: Definition -> Delayed defDelayed Defn{theDef = Function{funDelayed = d}} = d defDelayed _ = NotDelayed -- | Has the definition failed the termination checker? defNonterminating :: Definition -> Bool defNonterminating Defn{theDef = Function{funTerminates = Just False}} = True defNonterminating _ = False -- | Has the definition not termination checked or did the check fail? defTerminationUnconfirmed :: Definition -> Bool defTerminationUnconfirmed Defn{theDef = Function{funTerminates = Just True}} = False defTerminationUnconfirmed Defn{theDef = Function{funTerminates = _ }} = True defTerminationUnconfirmed _ = False defAbstract :: Definition -> IsAbstract defAbstract d = case theDef d of Axiom{} -> ConcreteDef DataOrRecSig{} -> ConcreteDef GeneralizableVar{} -> ConcreteDef AbstractDefn{} -> AbstractDef Function{funAbstr = a} -> a Datatype{dataAbstr = a} -> a Record{recAbstr = a} -> a Constructor{conAbstr = a} -> a Primitive{primAbstr = a} -> a defForced :: Definition -> [IsForced] defForced d = case theDef d of Constructor{conForced = fs} -> fs Axiom{} -> [] DataOrRecSig{} -> [] GeneralizableVar{} -> [] AbstractDefn{} -> [] Function{} -> [] Datatype{} -> [] Record{} -> [] Primitive{} -> [] --------------------------------------------------------------------------- -- ** Injectivity --------------------------------------------------------------------------- type FunctionInverse = FunctionInverse' Clause type InversionMap c = Map TermHead [c] data FunctionInverse' c = NotInjective | Inverse (InversionMap c) deriving (Data, Show, Functor) data TermHead = SortHead | PiHead | ConsHead QName | VarHead Nat | UnknownHead deriving (Data, Eq, Ord, Show) instance Pretty TermHead where pretty = \ case SortHead -> "SortHead" PiHead -> "PiHead" ConsHead q -> "ConsHead" <+> pretty q VarHead i -> text ("VarHead " ++ show i) UnknownHead -> "UnknownHead" --------------------------------------------------------------------------- -- ** Mutual blocks --------------------------------------------------------------------------- newtype MutualId = MutId Int32 deriving (Data, Eq, Ord, Show, Num, Enum) --------------------------------------------------------------------------- -- ** Statistics --------------------------------------------------------------------------- type Statistics = Map String Integer --------------------------------------------------------------------------- -- ** Trace --------------------------------------------------------------------------- data Call = CheckClause Type A.SpineClause | CheckPattern A.Pattern Telescope Type | CheckLetBinding A.LetBinding | InferExpr A.Expr | CheckExprCall Comparison A.Expr Type | CheckDotPattern A.Expr Term | CheckPatternShadowing A.SpineClause | CheckProjection Range QName Type | IsTypeCall A.Expr Sort | IsType_ A.Expr | InferVar Name | InferDef QName | CheckArguments Range [NamedArg A.Expr] Type (Maybe Type) | CheckTargetType Range Type Type | CheckDataDef Range QName [A.LamBinding] [A.Constructor] | CheckRecDef Range QName [A.LamBinding] [A.Constructor] | CheckConstructor QName Telescope Sort A.Constructor | CheckConstructorFitsIn QName Type Sort | CheckFunDefCall Range QName [A.Clause] | CheckPragma Range A.Pragma | CheckPrimitive Range QName A.Expr | CheckIsEmpty Range Type | CheckWithFunctionType Type | CheckSectionApplication Range ModuleName A.ModuleApplication | CheckNamedWhere ModuleName | ScopeCheckExpr C.Expr | ScopeCheckDeclaration NiceDeclaration | ScopeCheckLHS C.QName C.Pattern | NoHighlighting | ModuleContents -- ^ Interaction command: show module contents. | SetRange Range -- ^ used by 'setCurrentRange' deriving Data instance Pretty Call where pretty CheckClause{} = "CheckClause" pretty CheckPattern{} = "CheckPattern" pretty InferExpr{} = "InferExpr" pretty CheckExprCall{} = "CheckExprCall" pretty CheckLetBinding{} = "CheckLetBinding" pretty CheckProjection{} = "CheckProjection" pretty IsTypeCall{} = "IsTypeCall" pretty IsType_{} = "IsType_" pretty InferVar{} = "InferVar" pretty InferDef{} = "InferDef" pretty CheckArguments{} = "CheckArguments" pretty CheckTargetType{} = "CheckTargetType" pretty CheckDataDef{} = "CheckDataDef" pretty CheckRecDef{} = "CheckRecDef" pretty CheckConstructor{} = "CheckConstructor" pretty CheckConstructorFitsIn{} = "CheckConstructorFitsIn" pretty CheckFunDefCall{} = "CheckFunDefCall" pretty CheckPragma{} = "CheckPragma" pretty CheckPrimitive{} = "CheckPrimitive" pretty CheckWithFunctionType{} = "CheckWithFunctionType" pretty CheckNamedWhere{} = "CheckNamedWhere" pretty ScopeCheckExpr{} = "ScopeCheckExpr" pretty ScopeCheckDeclaration{} = "ScopeCheckDeclaration" pretty ScopeCheckLHS{} = "ScopeCheckLHS" pretty CheckDotPattern{} = "CheckDotPattern" pretty CheckPatternShadowing{} = "CheckPatternShadowing" pretty SetRange{} = "SetRange" pretty CheckSectionApplication{} = "CheckSectionApplication" pretty CheckIsEmpty{} = "CheckIsEmpty" pretty NoHighlighting{} = "NoHighlighting" pretty ModuleContents{} = "ModuleContents" instance HasRange Call where getRange (CheckClause _ c) = getRange c getRange (CheckPattern p _ _) = getRange p getRange (InferExpr e) = getRange e getRange (CheckExprCall _ e _) = getRange e getRange (CheckLetBinding b) = getRange b getRange (CheckProjection r _ _) = r getRange (IsTypeCall e s) = getRange e getRange (IsType_ e) = getRange e getRange (InferVar x) = getRange x getRange (InferDef f) = getRange f getRange (CheckArguments r _ _ _) = r getRange (CheckTargetType r _ _) = r getRange (CheckDataDef i _ _ _) = getRange i getRange (CheckRecDef i _ _ _) = getRange i getRange (CheckConstructor _ _ _ c) = getRange c getRange (CheckConstructorFitsIn c _ _) = getRange c getRange (CheckFunDefCall i _ _) = getRange i getRange (CheckPragma r _) = r getRange (CheckPrimitive i _ _) = getRange i getRange CheckWithFunctionType{} = noRange getRange (CheckNamedWhere m) = getRange m getRange (ScopeCheckExpr e) = getRange e getRange (ScopeCheckDeclaration d) = getRange d getRange (ScopeCheckLHS _ p) = getRange p getRange (CheckDotPattern e _) = getRange e getRange (CheckPatternShadowing c) = getRange c getRange (SetRange r) = r getRange (CheckSectionApplication r _ _) = r getRange (CheckIsEmpty r _) = r getRange NoHighlighting = noRange getRange ModuleContents = noRange --------------------------------------------------------------------------- -- ** Instance table --------------------------------------------------------------------------- -- | The instance table is a @Map@ associating to every name of -- record/data type/postulate its list of instances type InstanceTable = Map QName (Set QName) -- | When typechecking something of the following form: -- -- instance -- x : _ -- x = y -- -- it's not yet known where to add @x@, so we add it to a list of -- unresolved instances and we'll deal with it later. type TempInstanceTable = (InstanceTable , Set QName) --------------------------------------------------------------------------- -- ** Builtin things --------------------------------------------------------------------------- data BuiltinDescriptor = BuiltinData (TCM Type) [String] | BuiltinDataCons (TCM Type) | BuiltinPrim String (Term -> TCM ()) | BuiltinPostulate Relevance (TCM Type) | BuiltinUnknown (Maybe (TCM Type)) (Term -> Type -> TCM ()) -- ^ Builtin of any kind. -- Type can be checked (@Just t@) or inferred (@Nothing@). -- The second argument is the hook for the verification function. data BuiltinInfo = BuiltinInfo { builtinName :: String , builtinDesc :: BuiltinDescriptor } type BuiltinThings pf = Map String (Builtin pf) data Builtin pf = Builtin Term | Prim pf deriving (Show, Functor, Foldable, Traversable) --------------------------------------------------------------------------- -- * Highlighting levels --------------------------------------------------------------------------- -- | How much highlighting should be sent to the user interface? data HighlightingLevel = None | NonInteractive | Interactive -- ^ This includes both non-interactive highlighting and -- interactive highlighting of the expression that is currently -- being type-checked. deriving (Eq, Ord, Show, Read, Data) -- | How should highlighting be sent to the user interface? data HighlightingMethod = Direct -- ^ Via stdout. | Indirect -- ^ Both via files and via stdout. deriving (Eq, Show, Read, Data) -- | @ifTopLevelAndHighlightingLevelIs l b m@ runs @m@ when we're -- type-checking the top-level module and either the highlighting -- level is /at least/ @l@ or @b@ is 'True'. ifTopLevelAndHighlightingLevelIsOr :: MonadTCM tcm => HighlightingLevel -> Bool -> tcm () -> tcm () ifTopLevelAndHighlightingLevelIsOr l b m = do e <- askTC when (envModuleNestingLevel e == 0 && (envHighlightingLevel e >= l || b)) m -- | @ifTopLevelAndHighlightingLevelIs l m@ runs @m@ when we're -- type-checking the top-level module and the highlighting level is -- /at least/ @l@. ifTopLevelAndHighlightingLevelIs :: MonadTCM tcm => HighlightingLevel -> tcm () -> tcm () ifTopLevelAndHighlightingLevelIs l = ifTopLevelAndHighlightingLevelIsOr l False --------------------------------------------------------------------------- -- * Type checking environment --------------------------------------------------------------------------- data TCEnv = TCEnv { envContext :: Context , envLetBindings :: LetBindings , envCurrentModule :: ModuleName , envCurrentPath :: Maybe AbsolutePath -- ^ The path to the file that is currently being -- type-checked. 'Nothing' if we do not have a file -- (like in interactive mode see @CommandLine@). , envAnonymousModules :: [(ModuleName, Nat)] -- ^ anonymous modules and their number of free variables , envImportPath :: [C.TopLevelModuleName] -- ^ to detect import cycles , envMutualBlock :: Maybe MutualId -- ^ the current (if any) mutual block , envTerminationCheck :: TerminationCheck () -- ^ are we inside the scope of a termination pragma , envSolvingConstraints :: Bool -- ^ Are we currently in the process of solving active constraints? , envCheckingWhere :: Bool -- ^ Have we stepped into the where-declarations of a clause? -- Everything under a @where@ will be checked with this flag on. , envWorkingOnTypes :: Bool -- ^ Are we working on types? Turned on by 'workOnTypes'. , envAssignMetas :: Bool -- ^ Are we allowed to assign metas? , envActiveProblems :: Set ProblemId , envAbstractMode :: AbstractMode -- ^ When checking the typesignature of a public definition -- or the body of a non-abstract definition this is true. -- To prevent information about abstract things leaking -- outside the module. , envModality :: Modality -- ^ 'Relevance' component: -- Are we checking an irrelevant argument? (=@Irrelevant@) -- Then top-level irrelevant declarations are enabled. -- Other value: @Relevant@, then only relevant decls. are available. -- -- 'Quantity' component: -- Are we checking a runtime-irrelevant thing? (='Quantity0') -- Then runtime-irrelevant things are usable. -- Other value: @Quantity1@, runtime relevant. -- @Quantityω@ is not allowed here, see Bob Atkey, LiCS 2018. , envDisplayFormsEnabled :: Bool -- ^ Sometimes we want to disable display forms. , envRange :: Range , envHighlightingRange :: Range -- ^ Interactive highlighting uses this range rather -- than 'envRange'. , envClause :: IPClause -- ^ What is the current clause we are type-checking? -- Will be recorded in interaction points in this clause. , envCall :: Maybe (Closure Call) -- ^ what we're doing at the moment , envHighlightingLevel :: HighlightingLevel -- ^ Set to 'None' when imported modules are -- type-checked. , envHighlightingMethod :: HighlightingMethod , envModuleNestingLevel :: !Int -- ^ This number indicates how far away from the -- top-level module Agda has come when chasing -- modules. The level of a given module is not -- necessarily the same as the length, in the module -- dependency graph, of the shortest path from the -- top-level module; it depends on in which order -- Agda chooses to chase dependencies. , envExpandLast :: ExpandHidden -- ^ When type-checking an alias f=e, we do not want -- to insert hidden arguments in the end, because -- these will become unsolved metas. , envAppDef :: Maybe QName -- ^ We are reducing an application of this function. -- (For debugging of incomplete matches only.) , envSimplification :: Simplification -- ^ Did we encounter a simplification (proper match) -- during the current reduction process? , envAllowedReductions :: AllowedReductions , envInjectivityDepth :: Int -- ^ Injectivity can cause non-termination for unsolvable contraints -- (#431, #3067). Keep a limit on the nesting depth of injectivity -- uses. , envCompareBlocked :: Bool -- ^ Can we compare blocked things during conversion? -- No by default. -- Yes for rewriting feature. , envPrintDomainFreePi :: Bool -- ^ When @True@, types will be omitted from printed pi types if they -- can be inferred. , envPrintMetasBare :: Bool -- ^ When @True@, throw away meta numbers and meta elims. -- This is used for reifying terms for feeding into the -- user's source code, e.g., for the interaction tactics @solveAll@. , envInsideDotPattern :: Bool -- ^ Used by the scope checker to make sure that certain forms -- of expressions are not used inside dot patterns: extended -- lambdas and let-expressions. , envUnquoteFlags :: UnquoteFlags , envInstanceDepth :: !Int -- ^ Until we get a termination checker for instance search (#1743) we -- limit the search depth to ensure termination. , envIsDebugPrinting :: Bool , envPrintingPatternLambdas :: [QName] -- ^ #3004: pattern lambdas with copatterns may refer to themselves. We -- don't have a good story for what to do in this case, but at least -- printing shouldn't loop. Here we keep track of which pattern lambdas -- we are currently in the process of printing. , envCallByNeed :: Bool -- ^ Use call-by-need evaluation for reductions. , envCurrentCheckpoint :: CheckpointId -- ^ Checkpoints track the evolution of the context as we go -- under binders or refine it by pattern matching. , envCheckpoints :: Map CheckpointId Substitution -- ^ Keeps the substitution from each previous checkpoint to -- the current context. , envGeneralizeMetas :: DoGeneralize -- ^ Should new metas generalized over. , envGeneralizedVars :: Map QName GeneralizedValue -- ^ Values for used generalizable variables. , envCheckOptionConsistency :: Bool -- ^ Do we check that options in imported files are -- consistent with each other? } deriving Data initEnv :: TCEnv initEnv = TCEnv { envContext = [] , envLetBindings = Map.empty , envCurrentModule = noModuleName , envCurrentPath = Nothing , envAnonymousModules = [] , envImportPath = [] , envMutualBlock = Nothing , envTerminationCheck = TerminationCheck , envSolvingConstraints = False , envCheckingWhere = False , envActiveProblems = Set.empty , envWorkingOnTypes = False , envAssignMetas = True , envAbstractMode = ConcreteMode -- Andreas, 2013-02-21: This was 'AbstractMode' until now. -- However, top-level checks for mutual blocks, such as -- constructor-headedness, should not be able to look into -- abstract definitions unless abstract themselves. -- (See also discussion on issue 796.) -- The initial mode should be 'ConcreteMode', ensuring you -- can only look into abstract things in an abstract -- definition (which sets 'AbstractMode'). , envModality = Modality Relevant Quantity1 , envDisplayFormsEnabled = True , envRange = noRange , envHighlightingRange = noRange , envClause = IPNoClause , envCall = Nothing , envHighlightingLevel = None , envHighlightingMethod = Indirect , envModuleNestingLevel = -1 , envExpandLast = ExpandLast , envAppDef = Nothing , envSimplification = NoSimplification , envAllowedReductions = allReductions , envInjectivityDepth = 0 , envCompareBlocked = False , envPrintDomainFreePi = False , envPrintMetasBare = False , envInsideDotPattern = False , envUnquoteFlags = defaultUnquoteFlags , envInstanceDepth = 0 , envIsDebugPrinting = False , envPrintingPatternLambdas = [] , envCallByNeed = True , envCurrentCheckpoint = 0 , envCheckpoints = Map.singleton 0 IdS , envGeneralizeMetas = NoGeneralize , envGeneralizedVars = Map.empty , envCheckOptionConsistency = True } -- | Project 'Relevance' component of 'TCEnv'. envRelevance :: TCEnv -> Relevance envRelevance = modRelevance . envModality data UnquoteFlags = UnquoteFlags { _unquoteNormalise :: Bool } deriving Data defaultUnquoteFlags :: UnquoteFlags defaultUnquoteFlags = UnquoteFlags { _unquoteNormalise = False } unquoteNormalise :: Lens' Bool UnquoteFlags unquoteNormalise f e = f (_unquoteNormalise e) <&> \ x -> e { _unquoteNormalise = x } eUnquoteNormalise :: Lens' Bool TCEnv eUnquoteNormalise = eUnquoteFlags . unquoteNormalise -- * e-prefixed lenses ------------------------------------------------------------------------ eContext :: Lens' Context TCEnv eContext f e = f (envContext e) <&> \ x -> e { envContext = x } eLetBindings :: Lens' LetBindings TCEnv eLetBindings f e = f (envLetBindings e) <&> \ x -> e { envLetBindings = x } eCurrentModule :: Lens' ModuleName TCEnv eCurrentModule f e = f (envCurrentModule e) <&> \ x -> e { envCurrentModule = x } eCurrentPath :: Lens' (Maybe AbsolutePath) TCEnv eCurrentPath f e = f (envCurrentPath e) <&> \ x -> e { envCurrentPath = x } eAnonymousModules :: Lens' [(ModuleName, Nat)] TCEnv eAnonymousModules f e = f (envAnonymousModules e) <&> \ x -> e { envAnonymousModules = x } eImportPath :: Lens' [C.TopLevelModuleName] TCEnv eImportPath f e = f (envImportPath e) <&> \ x -> e { envImportPath = x } eMutualBlock :: Lens' (Maybe MutualId) TCEnv eMutualBlock f e = f (envMutualBlock e) <&> \ x -> e { envMutualBlock = x } eTerminationCheck :: Lens' (TerminationCheck ()) TCEnv eTerminationCheck f e = f (envTerminationCheck e) <&> \ x -> e { envTerminationCheck = x } eSolvingConstraints :: Lens' Bool TCEnv eSolvingConstraints f e = f (envSolvingConstraints e) <&> \ x -> e { envSolvingConstraints = x } eCheckingWhere :: Lens' Bool TCEnv eCheckingWhere f e = f (envCheckingWhere e) <&> \ x -> e { envCheckingWhere = x } eWorkingOnTypes :: Lens' Bool TCEnv eWorkingOnTypes f e = f (envWorkingOnTypes e) <&> \ x -> e { envWorkingOnTypes = x } eAssignMetas :: Lens' Bool TCEnv eAssignMetas f e = f (envAssignMetas e) <&> \ x -> e { envAssignMetas = x } eActiveProblems :: Lens' (Set ProblemId) TCEnv eActiveProblems f e = f (envActiveProblems e) <&> \ x -> e { envActiveProblems = x } eAbstractMode :: Lens' AbstractMode TCEnv eAbstractMode f e = f (envAbstractMode e) <&> \ x -> e { envAbstractMode = x } eModality :: Lens' Modality TCEnv eModality f e = f (envModality e) <&> \ x -> e { envModality = x } eRelevance :: Lens' Relevance TCEnv eRelevance = eModality . lModRelevance eQuantity :: Lens' Quantity TCEnv eQuantity = eModality . lModQuantity eDisplayFormsEnabled :: Lens' Bool TCEnv eDisplayFormsEnabled f e = f (envDisplayFormsEnabled e) <&> \ x -> e { envDisplayFormsEnabled = x } eRange :: Lens' Range TCEnv eRange f e = f (envRange e) <&> \ x -> e { envRange = x } eHighlightingRange :: Lens' Range TCEnv eHighlightingRange f e = f (envHighlightingRange e) <&> \ x -> e { envHighlightingRange = x } eCall :: Lens' (Maybe (Closure Call)) TCEnv eCall f e = f (envCall e) <&> \ x -> e { envCall = x } eHighlightingLevel :: Lens' HighlightingLevel TCEnv eHighlightingLevel f e = f (envHighlightingLevel e) <&> \ x -> e { envHighlightingLevel = x } eHighlightingMethod :: Lens' HighlightingMethod TCEnv eHighlightingMethod f e = f (envHighlightingMethod e) <&> \ x -> e { envHighlightingMethod = x } eModuleNestingLevel :: Lens' Int TCEnv eModuleNestingLevel f e = f (envModuleNestingLevel e) <&> \ x -> e { envModuleNestingLevel = x } eExpandLast :: Lens' ExpandHidden TCEnv eExpandLast f e = f (envExpandLast e) <&> \ x -> e { envExpandLast = x } eAppDef :: Lens' (Maybe QName) TCEnv eAppDef f e = f (envAppDef e) <&> \ x -> e { envAppDef = x } eSimplification :: Lens' Simplification TCEnv eSimplification f e = f (envSimplification e) <&> \ x -> e { envSimplification = x } eAllowedReductions :: Lens' AllowedReductions TCEnv eAllowedReductions f e = f (envAllowedReductions e) <&> \ x -> e { envAllowedReductions = x } eInjectivityDepth :: Lens' Int TCEnv eInjectivityDepth f e = f (envInjectivityDepth e) <&> \ x -> e { envInjectivityDepth = x } eCompareBlocked :: Lens' Bool TCEnv eCompareBlocked f e = f (envCompareBlocked e) <&> \ x -> e { envCompareBlocked = x } ePrintDomainFreePi :: Lens' Bool TCEnv ePrintDomainFreePi f e = f (envPrintDomainFreePi e) <&> \ x -> e { envPrintDomainFreePi = x } eInsideDotPattern :: Lens' Bool TCEnv eInsideDotPattern f e = f (envInsideDotPattern e) <&> \ x -> e { envInsideDotPattern = x } eUnquoteFlags :: Lens' UnquoteFlags TCEnv eUnquoteFlags f e = f (envUnquoteFlags e) <&> \ x -> e { envUnquoteFlags = x } eInstanceDepth :: Lens' Int TCEnv eInstanceDepth f e = f (envInstanceDepth e) <&> \ x -> e { envInstanceDepth = x } eIsDebugPrinting :: Lens' Bool TCEnv eIsDebugPrinting f e = f (envIsDebugPrinting e) <&> \ x -> e { envIsDebugPrinting = x } ePrintingPatternLambdas :: Lens' [QName] TCEnv ePrintingPatternLambdas f e = f (envPrintingPatternLambdas e) <&> \ x -> e { envPrintingPatternLambdas = x } eCallByNeed :: Lens' Bool TCEnv eCallByNeed f e = f (envCallByNeed e) <&> \ x -> e { envCallByNeed = x } eCurrentCheckpoint :: Lens' CheckpointId TCEnv eCurrentCheckpoint f e = f (envCurrentCheckpoint e) <&> \ x -> e { envCurrentCheckpoint = x } eCheckpoints :: Lens' (Map CheckpointId Substitution) TCEnv eCheckpoints f e = f (envCheckpoints e) <&> \ x -> e { envCheckpoints = x } eGeneralizeMetas :: Lens' DoGeneralize TCEnv eGeneralizeMetas f e = f (envGeneralizeMetas e) <&> \ x -> e { envGeneralizeMetas = x } eGeneralizedVars :: Lens' (Map QName GeneralizedValue) TCEnv eGeneralizedVars f e = f (envGeneralizedVars e) <&> \ x -> e { envGeneralizedVars = x } --------------------------------------------------------------------------- -- ** Context --------------------------------------------------------------------------- -- | The @Context@ is a stack of 'ContextEntry's. type Context = [ContextEntry] type ContextEntry = Dom (Name, Type) --------------------------------------------------------------------------- -- ** Let bindings --------------------------------------------------------------------------- type LetBindings = Map Name (Open (Term, Dom Type)) --------------------------------------------------------------------------- -- ** Abstract mode --------------------------------------------------------------------------- data AbstractMode = AbstractMode -- ^ Abstract things in the current module can be accessed. | ConcreteMode -- ^ No abstract things can be accessed. | IgnoreAbstractMode -- ^ All abstract things can be accessed. deriving (Data, Show, Eq) aDefToMode :: IsAbstract -> AbstractMode aDefToMode AbstractDef = AbstractMode aDefToMode ConcreteDef = ConcreteMode aModeToDef :: AbstractMode -> IsAbstract aModeToDef AbstractMode = AbstractDef aModeToDef ConcreteMode = ConcreteDef aModeToDef _ = __IMPOSSIBLE__ --------------------------------------------------------------------------- -- ** Insertion of implicit arguments --------------------------------------------------------------------------- data ExpandHidden = ExpandLast -- ^ Add implicit arguments in the end until type is no longer hidden 'Pi'. | DontExpandLast -- ^ Do not append implicit arguments. deriving (Eq, Data) -- | A candidate solution for an instance meta is a term with its type. -- It may be the case that the candidate is not fully applied yet or -- of the wrong type, hence the need for the type. data Candidate = Candidate { candidateTerm :: Term , candidateType :: Type , candidateOverlappable :: Bool } deriving (Show, Data) instance Free Candidate where freeVars' (Candidate t u _) = freeVars' (t, u) --------------------------------------------------------------------------- -- * Type checking warnings (aka non-fatal errors) --------------------------------------------------------------------------- -- | A non-fatal error is an error which does not prevent us from -- checking the document further and interacting with the user. data Warning = NicifierIssue DeclarationWarning | TerminationIssue [TerminationError] | UnreachableClauses QName [[NamedArg DeBruijnPattern]] | CoverageIssue QName [(Telescope, [NamedArg DeBruijnPattern])] -- ^ `CoverageIssue f pss` means that `pss` are not covered in `f` | CoverageNoExactSplit QName [Clause] | NotStrictlyPositive QName (Seq OccursWhere) | UnsolvedMetaVariables [Range] -- ^ Do not use directly with 'warning' | UnsolvedInteractionMetas [Range] -- ^ Do not use directly with 'warning' | UnsolvedConstraints Constraints -- ^ Do not use directly with 'warning' | CantGeneralizeOverSorts [MetaId] | AbsurdPatternRequiresNoRHS [NamedArg DeBruijnPattern] | OldBuiltin String String -- ^ In `OldBuiltin old new`, the BUILTIN old has been replaced by new | EmptyRewritePragma -- ^ If the user wrote just @{-\# REWRITE \#-}@. | IllformedAsClause String -- ^ If the user wrote something other than an unqualified name -- in the @as@ clause of an @import@ statement. -- The 'String' gives optionally extra explanation. | UselessPublic -- ^ If the user opens a module public before the module header. -- (See issue #2377.) | UselessInline QName | WrongInstanceDeclaration | InstanceWithExplicitArg QName -- ^ An instance was declared with an implicit argument, which means it -- will never actually be considered by instance search. | InstanceNoOutputTypeName Doc -- ^ The type of an instance argument doesn't end in a named or -- variable type, so it will never be considered by instance search. | InstanceArgWithExplicitArg Doc -- ^ As InstanceWithExplicitArg, but for local bindings rather than -- top-level instances. | InversionDepthReached QName -- ^ The --inversion-max-depth was reached. -- Generic warnings for one-off things | GenericWarning Doc -- ^ Harmless generic warning (not an error) | GenericNonFatalError Doc -- ^ Generic error which doesn't abort proceedings (not a warning) -- Safe flag errors | SafeFlagPostulate C.Name | SafeFlagPragma [String] | SafeFlagNonTerminating | SafeFlagTerminating | SafeFlagWithoutKFlagPrimEraseEquality | WithoutKFlagPrimEraseEquality | SafeFlagNoPositivityCheck | SafeFlagPolarity | SafeFlagNoUniverseCheck | ParseWarning ParseWarning | LibraryWarning LibWarning | DeprecationWarning String String String -- ^ `DeprecationWarning old new version`: -- `old` is deprecated, use `new` instead. This will be an error in Agda `version`. | UserWarning String -- ^ User-defined warning (e.g. to mention that a name is deprecated) | ModuleDoesntExport C.QName [C.ImportedName] -- ^ Some imported names are not actually exported by the source module | InfectiveImport String ModuleName -- ^ Importing a file using an infective option into one which doesn't | CoInfectiveImport String ModuleName -- ^ Importing a file not using a coinfective option from one which does deriving (Show , Data) warningName :: Warning -> WarningName warningName w = case w of -- special cases NicifierIssue dw -> declarationWarningName dw ParseWarning pw -> parseWarningName pw LibraryWarning lw -> libraryWarningName lw -- typechecking errors CantGeneralizeOverSorts{} -> CantGeneralizeOverSorts_ AbsurdPatternRequiresNoRHS{} -> AbsurdPatternRequiresNoRHS_ CoverageIssue{} -> CoverageIssue_ CoverageNoExactSplit{} -> CoverageNoExactSplit_ DeprecationWarning{} -> DeprecationWarning_ EmptyRewritePragma -> EmptyRewritePragma_ IllformedAsClause{} -> IllformedAsClause_ WrongInstanceDeclaration{} -> WrongInstanceDeclaration_ InstanceWithExplicitArg{} -> InstanceWithExplicitArg_ InstanceNoOutputTypeName{} -> InstanceNoOutputTypeName_ InstanceArgWithExplicitArg{} -> InstanceArgWithExplicitArg_ GenericNonFatalError{} -> GenericNonFatalError_ GenericWarning{} -> GenericWarning_ InversionDepthReached{} -> InversionDepthReached_ ModuleDoesntExport{} -> ModuleDoesntExport_ NotStrictlyPositive{} -> NotStrictlyPositive_ OldBuiltin{} -> OldBuiltin_ SafeFlagNoPositivityCheck -> SafeFlagNoPositivityCheck_ SafeFlagNonTerminating -> SafeFlagNonTerminating_ SafeFlagNoUniverseCheck -> SafeFlagNoUniverseCheck_ SafeFlagPolarity -> SafeFlagPolarity_ SafeFlagPostulate{} -> SafeFlagPostulate_ SafeFlagPragma{} -> SafeFlagPragma_ SafeFlagWithoutKFlagPrimEraseEquality -> SafeFlagWithoutKFlagPrimEraseEquality_ WithoutKFlagPrimEraseEquality -> WithoutKFlagPrimEraseEquality_ SafeFlagTerminating -> SafeFlagTerminating_ TerminationIssue{} -> TerminationIssue_ UnreachableClauses{} -> UnreachableClauses_ UnsolvedInteractionMetas{} -> UnsolvedInteractionMetas_ UnsolvedConstraints{} -> UnsolvedConstraints_ UnsolvedMetaVariables{} -> UnsolvedMetaVariables_ UselessInline{} -> UselessInline_ UselessPublic -> UselessPublic_ UserWarning{} -> UserWarning_ InfectiveImport{} -> InfectiveImport_ CoInfectiveImport{} -> CoInfectiveImport_ data TCWarning = TCWarning { tcWarningRange :: Range -- ^ Range where the warning was raised , tcWarning :: Warning -- ^ The warning itself , tcWarningPrintedWarning :: Doc -- ^ The warning printed in the state and environment where it was raised , tcWarningCached :: Bool -- ^ Should the warning be affected by caching. } deriving Show tcWarningOrigin :: TCWarning -> SrcFile tcWarningOrigin = rangeFile . tcWarningRange instance HasRange TCWarning where getRange = tcWarningRange -- used for merging lists of warnings instance Eq TCWarning where x == y = equalHeadConstructors (tcWarning x) (tcWarning y) && getRange x == getRange y equalHeadConstructors :: Warning -> Warning -> Bool equalHeadConstructors = (==) `on` toConstr getPartialDefs :: ReadTCState tcm => tcm [QName] getPartialDefs = do tcst <- getTCState return $ mapMaybe (extractQName . tcWarning) $ tcst ^. stTCWarnings where extractQName :: Warning -> Maybe QName extractQName (CoverageIssue f _) = Just f extractQName _ = Nothing --------------------------------------------------------------------------- -- * Type checking errors --------------------------------------------------------------------------- -- | Information about a call. data CallInfo = CallInfo { callInfoTarget :: QName -- ^ Target function name. , callInfoRange :: Range -- ^ Range of the target function. , callInfoCall :: Closure Term -- ^ To be formatted representation of the call. } deriving (Data, Show) -- no Eq, Ord instances: too expensive! (see issues 851, 852) -- | We only 'show' the name of the callee. instance Pretty CallInfo where pretty = pretty . callInfoTarget instance AllNames CallInfo where allNames = singleton . callInfoTarget -- UNUSED, but keep! -- -- | Call pathes are sequences of 'CallInfo's starting from a 'callSource'. -- data CallPath = CallPath -- { callSource :: QName -- -- ^ The originator of the first call. -- , callInfos :: [CallInfo] -- -- ^ The calls, in order from source to final target. -- } -- deriving (Show) -- -- | 'CallPath'es can be connected, but there is no empty callpath. -- -- Thus, they form a semigroup, but we choose to abuse 'Monoid'. -- instance Monoid CallPath where -- mempty = __IMPOSSIBLE__ -- mappend (CallPath src cs) (CallPath _ cs') = CallPath src $ cs ++ cs' -- | Information about a mutual block which did not pass the -- termination checker. data TerminationError = TerminationError { termErrFunctions :: [QName] -- ^ The functions which failed to check. (May not include -- automatically generated functions.) , termErrCalls :: [CallInfo] -- ^ The problematic call sites. } deriving (Data, Show) -- | Error when splitting a pattern variable into possible constructor patterns. data SplitError = NotADatatype (Closure Type) -- ^ Neither data type nor record. | IrrelevantDatatype (Closure Type) -- ^ Data type, but in irrelevant position. | ErasedDatatype (Closure Type) -- ^ Data type, but in erased position. | CoinductiveDatatype (Closure Type) -- ^ Split on codata not allowed. -- UNUSED, but keep! -- -- | NoRecordConstructor Type -- ^ record type, but no constructor | UnificationStuck { cantSplitConName :: QName -- ^ Constructor. , cantSplitTel :: Telescope -- ^ Context for indices. , cantSplitConIdx :: Args -- ^ Inferred indices (from type of constructor). , cantSplitGivenIdx :: Args -- ^ Expected indices (from checking pattern). , cantSplitFailures :: [UnificationFailure] -- ^ Reason(s) why unification got stuck. } | CosplitCatchall -- ^ Copattern split with a catchall | CosplitNoTarget -- ^ We do not know the target type of the clause. | CosplitNoRecordType (Closure Type) -- ^ Target type is not a record type. | CannotCreateMissingClause QName (Telescope,[NamedArg DeBruijnPattern]) Doc (Closure (Abs Type)) | GenericSplitError String deriving (Show) data NegativeUnification = UnifyConflict Telescope Term Term | UnifyCycle Telescope Int Term deriving (Show) data UnificationFailure = UnifyIndicesNotVars Telescope Type Term Term Args -- ^ Failed to apply injectivity to constructor of indexed datatype | UnifyRecursiveEq Telescope Type Int Term -- ^ Can't solve equation because variable occurs in (type of) lhs | UnifyReflexiveEq Telescope Type Term -- ^ Can't solve reflexive equation because --without-K is enabled deriving (Show) data UnquoteError = BadVisibility String (Arg I.Term) | ConInsteadOfDef QName String String | DefInsteadOfCon QName String String | NonCanonical String I.Term | BlockedOnMeta TCState MetaId | UnquotePanic String deriving (Show) data TypeError = InternalError String | NotImplemented String | NotSupported String | CompilationError String | PropMustBeSingleton | DataMustEndInSort Term {- UNUSED | DataTooManyParameters -- ^ In @data D xs where@ the number of parameters @xs@ does not fit the -- the parameters given in the forward declaraion @data D Gamma : T@. -} | ShouldEndInApplicationOfTheDatatype Type -- ^ The target of a constructor isn't an application of its -- datatype. The 'Type' records what it does target. | ShouldBeAppliedToTheDatatypeParameters Term Term -- ^ The target of a constructor isn't its datatype applied to -- something that isn't the parameters. First term is the correct -- target and the second term is the actual target. | ShouldBeApplicationOf Type QName -- ^ Expected a type to be an application of a particular datatype. | ConstructorPatternInWrongDatatype QName QName -- ^ constructor, datatype | CantResolveOverloadedConstructorsTargetingSameDatatype QName [QName] -- ^ Datatype, constructors. | DoesNotConstructAnElementOf QName Type -- ^ constructor, type | WrongHidingInLHS -- ^ The left hand side of a function definition has a hidden argument -- where a non-hidden was expected. | WrongHidingInLambda Type -- ^ Expected a non-hidden function and found a hidden lambda. | WrongHidingInApplication Type -- ^ A function is applied to a hidden argument where a non-hidden was expected. | WrongNamedArgument (NamedArg A.Expr) -- ^ A function is applied to a hidden named argument it does not have. | WrongIrrelevanceInLambda -- ^ Wrong user-given relevance annotation in lambda. | WrongQuantityInLambda -- ^ Wrong user-given quantity annotation in lambda. | HidingMismatch Hiding Hiding -- ^ The given hiding does not correspond to the expected hiding. | RelevanceMismatch Relevance Relevance -- ^ The given relevance does not correspond to the expected relevane. | UninstantiatedDotPattern A.Expr | ForcedConstructorNotInstantiated A.Pattern | IlltypedPattern A.Pattern Type | IllformedProjectionPattern A.Pattern | CannotEliminateWithPattern (NamedArg A.Pattern) Type | WrongNumberOfConstructorArguments QName Nat Nat | ShouldBeEmpty Type [DeBruijnPattern] | ShouldBeASort Type -- ^ The given type should have been a sort. | ShouldBePi Type -- ^ The given type should have been a pi. | ShouldBePath Type | ShouldBeRecordType Type | ShouldBeRecordPattern DeBruijnPattern | NotAProjectionPattern (NamedArg A.Pattern) | NotAProperTerm | InvalidTypeSort Sort -- ^ This sort is not a type expression. | InvalidType Term -- ^ This term is not a type expression. | FunctionTypeInSizeUniv Term -- ^ This term, a function type constructor, lives in -- @SizeUniv@, which is not allowed. | SplitOnIrrelevant (Dom Type) -- UNUSED: -- | SplitOnErased (Dom Type) | SplitOnNonVariable Term Type | DefinitionIsIrrelevant QName | VariableIsIrrelevant Name | VariableIsErased Name -- | UnequalLevel Comparison Term Term -- UNUSED | UnequalTerms Comparison Term Term Type | UnequalTypes Comparison Type Type -- | UnequalTelescopes Comparison Telescope Telescope -- UNUSED | UnequalRelevance Comparison Term Term -- ^ The two function types have different relevance. | UnequalHiding Term Term -- ^ The two function types have different hiding. | UnequalSorts Sort Sort | UnequalBecauseOfUniverseConflict Comparison Term Term | NotLeqSort Sort Sort | MetaCannotDependOn MetaId [Nat] Nat -- ^ The arguments are the meta variable, the parameters it can -- depend on and the paratemeter that it wants to depend on. | MetaOccursInItself MetaId | MetaIrrelevantSolution MetaId Term | GenericError String | GenericDocError Doc | BuiltinMustBeConstructor String A.Expr | NoSuchBuiltinName String | DuplicateBuiltinBinding String Term Term | NoBindingForBuiltin String | NoSuchPrimitiveFunction String | DuplicatePrimitiveBinding String QName QName | ShadowedModule C.Name [A.ModuleName] | BuiltinInParameterisedModule String | IllegalLetInTelescope C.TypedBinding | NoRHSRequiresAbsurdPattern [NamedArg A.Pattern] | TooManyFields QName [C.Name] [C.Name] -- ^ Record type, fields not supplied by user, non-fields not supplied. | DuplicateFields [C.Name] | DuplicateConstructors [C.Name] | WithOnFreeVariable A.Expr Term | UnexpectedWithPatterns [A.Pattern] | WithClausePatternMismatch A.Pattern (NamedArg DeBruijnPattern) | FieldOutsideRecord | ModuleArityMismatch A.ModuleName Telescope [NamedArg A.Expr] | GeneralizeCyclicDependency | GeneralizeUnsolvedMeta -- Coverage errors -- UNUSED: | IncompletePatternMatching Term [Elim] -- can only happen if coverage checking is switched off | SplitError SplitError | ImpossibleConstructor QName NegativeUnification -- Positivity errors | TooManyPolarities QName Int -- Import errors | LocalVsImportedModuleClash ModuleName | SolvedButOpenHoles -- ^ Some interaction points (holes) have not been filled by user. -- There are not 'UnsolvedMetas' since unification solved them. -- This is an error, since interaction points are never filled -- without user interaction. | CyclicModuleDependency [C.TopLevelModuleName] | FileNotFound C.TopLevelModuleName [AbsolutePath] | OverlappingProjects AbsolutePath C.TopLevelModuleName C.TopLevelModuleName | AmbiguousTopLevelModuleName C.TopLevelModuleName [AbsolutePath] | ModuleNameUnexpected C.TopLevelModuleName C.TopLevelModuleName -- ^ Found module name, expected module name. | ModuleNameDoesntMatchFileName C.TopLevelModuleName [AbsolutePath] | ClashingFileNamesFor ModuleName [AbsolutePath] | ModuleDefinedInOtherFile C.TopLevelModuleName AbsolutePath AbsolutePath -- ^ Module name, file from which it was loaded, file which -- the include path says contains the module. -- Scope errors | BothWithAndRHS | AbstractConstructorNotInScope A.QName | NotInScope [C.QName] | NoSuchModule C.QName | AmbiguousName C.QName (NonemptyList A.QName) | AmbiguousModule C.QName (NonemptyList A.ModuleName) | ClashingDefinition C.QName A.QName | ClashingModule A.ModuleName A.ModuleName | ClashingImport C.Name A.QName | ClashingModuleImport C.Name A.ModuleName | PatternShadowsConstructor C.Name A.QName | DuplicateImports C.QName [C.ImportedName] | InvalidPattern C.Pattern | RepeatedVariablesInPattern [C.Name] | GeneralizeNotSupportedHere A.QName | MultipleFixityDecls [(C.Name, [Fixity'])] | MultiplePolarityPragmas [C.Name] -- Concrete to Abstract errors | NotAModuleExpr C.Expr -- ^ The expr was used in the right hand side of an implicit module -- definition, but it wasn't of the form @m Delta@. | NotAnExpression C.Expr | NotAValidLetBinding NiceDeclaration | NotValidBeforeField NiceDeclaration | NothingAppliedToHiddenArg C.Expr | NothingAppliedToInstanceArg C.Expr -- Pattern synonym errors | BadArgumentsToPatternSynonym A.AmbiguousQName | TooFewArgumentsToPatternSynonym A.AmbiguousQName | CannotResolveAmbiguousPatternSynonym (NonemptyList (A.QName, A.PatternSynDefn)) | UnusedVariableInPatternSynonym -- Operator errors | NoParseForApplication [C.Expr] | AmbiguousParseForApplication [C.Expr] [C.Expr] | NoParseForLHS LHSOrPatSyn C.Pattern | AmbiguousParseForLHS LHSOrPatSyn C.Pattern [C.Pattern] | OperatorInformation [NotationSection] TypeError {- UNUSED | NoParseForPatternSynonym C.Pattern | AmbiguousParseForPatternSynonym C.Pattern [C.Pattern] -} -- Usage errors -- Instance search errors | InstanceNoCandidate Type [(Term, TCErr)] -- Reflection errors | UnquoteFailed UnquoteError | DeBruijnIndexOutOfScope Nat Telescope [Name] -- Language option errors | NeedOptionCopatterns | NeedOptionRewriting | NeedOptionProp -- Failure associated to warnings | NonFatalErrors [TCWarning] -- Instance search errors | InstanceSearchDepthExhausted Term Type Int | TriedToCopyConstrainedPrim QName deriving Show -- | Distinguish error message when parsing lhs or pattern synonym, resp. data LHSOrPatSyn = IsLHS | IsPatSyn deriving (Eq, Show) -- | Type-checking errors. data TCErr = TypeError { tcErrState :: TCState -- ^ The state in which the error was raised. , tcErrClosErr :: Closure TypeError -- ^ The environment in which the error as raised plus the error. } | Exception Range Doc | IOException TCState Range E.IOException -- ^ The first argument is the state in which the error was -- raised. | PatternErr -- ^ The exception which is usually caught. -- Raised for pattern violations during unification ('assignV') -- but also in other situations where we want to backtrack. instance Error TCErr where strMsg = Exception noRange . text . strMsg instance Show TCErr where show (TypeError _ e) = show (envRange $ clEnv e) ++ ": " ++ show (clValue e) show (Exception r d) = show r ++ ": " ++ render d show (IOException _ r e) = show r ++ ": " ++ show e show PatternErr{} = "Pattern violation (you shouldn't see this)" instance HasRange TCErr where getRange (TypeError _ cl) = envRange $ clEnv cl getRange (Exception r _) = r getRange (IOException s r _) = r getRange PatternErr{} = noRange instance E.Exception TCErr ----------------------------------------------------------------------------- -- * Accessing options ----------------------------------------------------------------------------- class (Functor m, Applicative m, Monad m) => HasOptions m where -- | Returns the pragma options which are currently in effect. pragmaOptions :: m PragmaOptions -- | Returns the command line options which are currently in effect. commandLineOptions :: m CommandLineOptions instance MonadIO m => HasOptions (TCMT m) where pragmaOptions = useTC stPragmaOptions commandLineOptions = do p <- useTC stPragmaOptions cl <- stPersistentOptions . stPersistentState <$> getTC return $ cl { optPragmaOptions = p } instance HasOptions m => HasOptions (ExceptT e m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions instance HasOptions m => HasOptions (ListT m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions instance HasOptions m => HasOptions (MaybeT m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions instance HasOptions m => HasOptions (ReaderT r m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions instance HasOptions m => HasOptions (StateT s m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions instance (HasOptions m, Monoid w) => HasOptions (WriterT w m) where pragmaOptions = lift pragmaOptions commandLineOptions = lift commandLineOptions -- Ternary options are annoying to deal with so we provide auxiliary -- definitions using @collapseDefault@. sizedTypesOption :: HasOptions m => m Bool sizedTypesOption = collapseDefault . optSizedTypes <$> pragmaOptions guardednessOption :: HasOptions m => m Bool guardednessOption = collapseDefault . optGuardedness <$> pragmaOptions withoutKOption :: HasOptions m => m Bool withoutKOption = collapseDefault . optWithoutK <$> pragmaOptions ----------------------------------------------------------------------------- -- * The reduce monad ----------------------------------------------------------------------------- -- | Environment of the reduce monad. data ReduceEnv = ReduceEnv { redEnv :: TCEnv -- ^ Read only access to environment. , redSt :: TCState -- ^ Read only access to state (signature, metas...). } mapRedEnv :: (TCEnv -> TCEnv) -> ReduceEnv -> ReduceEnv mapRedEnv f s = s { redEnv = f (redEnv s) } mapRedSt :: (TCState -> TCState) -> ReduceEnv -> ReduceEnv mapRedSt f s = s { redSt = f (redSt s) } mapRedEnvSt :: (TCEnv -> TCEnv) -> (TCState -> TCState) -> ReduceEnv -> ReduceEnv mapRedEnvSt f g (ReduceEnv e s) = ReduceEnv (f e) (g s) -- Lenses reduceEnv :: Lens' TCEnv ReduceEnv reduceEnv f s = f (redEnv s) <&> \ e -> s { redEnv = e } reduceSt :: Lens' TCState ReduceEnv reduceSt f s = f (redSt s) <&> \ e -> s { redSt = e } newtype ReduceM a = ReduceM { unReduceM :: ReduceEnv -> a } -- deriving (Functor, Applicative, Monad) onReduceEnv :: (ReduceEnv -> ReduceEnv) -> ReduceM a -> ReduceM a onReduceEnv f (ReduceM m) = ReduceM (m . f) fmapReduce :: (a -> b) -> ReduceM a -> ReduceM b fmapReduce f (ReduceM m) = ReduceM $ \ e -> f $! m e {-# INLINE fmapReduce #-} apReduce :: ReduceM (a -> b) -> ReduceM a -> ReduceM b apReduce (ReduceM f) (ReduceM x) = ReduceM $ \ e -> f e $! x e {-# INLINE apReduce #-} bindReduce :: ReduceM a -> (a -> ReduceM b) -> ReduceM b bindReduce (ReduceM m) f = ReduceM $ \ e -> unReduceM (f $! m e) e {-# INLINE bindReduce #-} instance Functor ReduceM where fmap = fmapReduce instance Applicative ReduceM where pure x = ReduceM (const x) (<*>) = apReduce instance Monad ReduceM where return = pure (>>=) = bindReduce (>>) = (*>) #if __GLASGOW_HASKELL__ >= 800 fail = Fail.fail instance Fail.MonadFail ReduceM where fail = error #endif instance ReadTCState ReduceM where getTCState = ReduceM redSt withTCState f = onReduceEnv $ mapRedSt f runReduceM :: ReduceM a -> TCM a runReduceM m = do e <- askTC s <- getTC return $! unReduceM m (ReduceEnv e s) runReduceF :: (a -> ReduceM b) -> TCM (a -> b) runReduceF f = do e <- askTC s <- getTC return $ \x -> unReduceM (f x) (ReduceEnv e s) instance MonadTCEnv ReduceM where askTC = ReduceM redEnv localTC = onReduceEnv . mapRedEnv useR :: (ReadTCState m) => Lens' a TCState -> m a useR l = (^.l) <$> getTCState askR :: ReduceM ReduceEnv askR = ReduceM ask localR :: (ReduceEnv -> ReduceEnv) -> ReduceM a -> ReduceM a localR f = ReduceM . local f . unReduceM instance HasOptions ReduceM where pragmaOptions = useR stPragmaOptions commandLineOptions = do p <- useR stPragmaOptions cl <- stPersistentOptions . stPersistentState <$> getTCState return $ cl{ optPragmaOptions = p } class ( Applicative m , MonadTCEnv m , ReadTCState m , HasOptions m ) => MonadReduce m where liftReduce :: ReduceM a -> m a instance MonadReduce m => MonadReduce (MaybeT m) where liftReduce = lift . liftReduce instance MonadReduce m => MonadReduce (ListT m) where liftReduce = lift . liftReduce instance MonadReduce m => MonadReduce (ExceptT err m) where liftReduce = lift . liftReduce instance MonadReduce m => MonadReduce (ReaderT r m) where liftReduce = lift . liftReduce instance (Monoid w, MonadReduce m) => MonadReduce (WriterT w m) where liftReduce = lift . liftReduce instance MonadReduce m => MonadReduce (StateT w m) where liftReduce = lift . liftReduce instance MonadReduce ReduceM where liftReduce = id --------------------------------------------------------------------------- -- * Monad with read-only 'TCEnv' --------------------------------------------------------------------------- -- | @MonadTCEnv@ made into its own dedicated service class. -- This allows us to use 'MonadReader' for 'ReaderT' extensions of @TCM@. class Monad m => MonadTCEnv m where askTC :: m TCEnv localTC :: (TCEnv -> TCEnv) -> m a -> m a instance MonadTCEnv m => MonadTCEnv (MaybeT m) where askTC = lift askTC localTC = mapMaybeT . localTC instance MonadTCEnv m => MonadTCEnv (ListT m) where askTC = lift askTC localTC = mapListT . localTC instance MonadTCEnv m => MonadTCEnv (ExceptT err m) where askTC = lift askTC localTC = mapExceptT . localTC instance MonadTCEnv m => MonadTCEnv (ReaderT r m) where askTC = lift askTC localTC = mapReaderT . localTC instance (Monoid w, MonadTCEnv m) => MonadTCEnv (WriterT w m) where askTC = lift askTC localTC = mapWriterT . localTC instance MonadTCEnv m => MonadTCEnv (StateT s m) where askTC = lift askTC localTC = mapStateT . localTC asksTC :: MonadTCEnv m => (TCEnv -> a) -> m a asksTC f = f <$> askTC viewTC :: MonadTCEnv m => Lens' a TCEnv -> m a viewTC l = asksTC (^. l) -- | Modify the lens-indicated part of the @TCEnv@ in a subcomputation. locallyTC :: MonadTCEnv m => Lens' a TCEnv -> (a -> a) -> m b -> m b locallyTC l = localTC . over l --------------------------------------------------------------------------- -- * Monad with mutable 'TCState' --------------------------------------------------------------------------- -- | @MonadTCState@ made into its own dedicated service class. -- This allows us to use 'MonadState' for 'StateT' extensions of @TCM@. class Monad m => MonadTCState m where getTC :: m TCState putTC :: TCState -> m () modifyTC :: (TCState -> TCState) -> m () {-# MINIMAL getTC, (putTC | modifyTC) #-} putTC = modifyTC . const modifyTC f = putTC . f =<< getTC instance MonadTCState m => MonadTCState (MaybeT m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC instance MonadTCState m => MonadTCState (ListT m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC instance MonadTCState m => MonadTCState (ExceptT err m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC instance MonadTCState m => MonadTCState (ReaderT r m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC instance (Monoid w, MonadTCState m) => MonadTCState (WriterT w m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC instance MonadTCState m => MonadTCState (StateT s m) where getTC = lift getTC putTC = lift . putTC modifyTC = lift . modifyTC -- ** @TCState@ accessors (no lenses) getsTC :: MonadTCState m => (TCState -> a) -> m a getsTC f = f <$> getTC -- | A variant of 'modifyTC' in which the computation is strict in the -- new state. modifyTC' :: MonadTCState m => (TCState -> TCState) -> m () modifyTC' f = do s' <- getTC putTC $! f s' -- SEE TC.Monad.State -- -- | Restore the 'TCState' after computation. -- localTCState :: MonadTCState m => m a -> m a -- localTCState = bracket_ getTC putTC -- ** @TCState@ accessors via lenses useTC :: MonadTCState m => Lens' a TCState -> m a useTC l = do !x <- getsTC (^. l) return x infix 4 `setTCLens` -- | Overwrite the part of the 'TCState' focused on by the lens. setTCLens :: MonadTCState m => Lens' a TCState -> a -> m () setTCLens l = modifyTC . set l -- | Modify the part of the 'TCState' focused on by the lens. modifyTCLens :: MonadTCState m => Lens' a TCState -> (a -> a) -> m () modifyTCLens l = modifyTC . over l -- | Modify a part of the state monadically. modifyTCLensM :: MonadTCState m => Lens' a TCState -> (a -> m a) -> m () modifyTCLensM l f = putTC =<< l f =<< getTC -- | Modify the lens-indicated part of the 'TCState' locally. locallyTCState :: MonadTCState m => Lens' a TCState -> (a -> a) -> m b -> m b locallyTCState l f k = do old <- useTC l modifyTCLens l f x <- k setTCLens l old return x --------------------------------------------------------------------------- -- * Type checking monad transformer --------------------------------------------------------------------------- -- | The type checking monad transformer. -- Adds readonly 'TCEnv' and mutable 'TCState'. newtype TCMT m a = TCM { unTCM :: IORef TCState -> TCEnv -> m a } instance MonadIO m => MonadTCEnv (TCMT m) where askTC = TCM $ \ _ e -> return e localTC f (TCM m) = TCM $ \ s e -> m s (f e) instance MonadIO m => MonadTCState (TCMT m) where getTC = TCM $ \ r _e -> liftIO (readIORef r) putTC s = TCM $ \ r _e -> liftIO (writeIORef r s) type TCM = TCMT IO class ( Applicative tcm, MonadIO tcm , MonadTCEnv tcm , MonadTCState tcm , HasOptions tcm ) => MonadTCM tcm where liftTCM :: TCM a -> tcm a instance MonadIO m => ReadTCState (TCMT m) where getTCState = getTC withTCState f m = __IMPOSSIBLE__ -- should probably not be used instance MonadError TCErr (TCMT IO) where throwError = liftIO . E.throwIO catchError m h = TCM $ \r e -> do oldState <- liftIO (readIORef r) unTCM m r e `E.catch` \err -> do -- Reset the state, but do not forget changes to the persistent -- component. Not for pattern violations. case err of PatternErr -> return () _ -> liftIO $ do newState <- readIORef r writeIORef r $ oldState { stPersistentState = stPersistentState newState } unTCM (h err) r e instance MonadIO m => MonadReduce (TCMT m) where liftReduce = liftTCM . runReduceM instance (IsString a, MonadIO m) => IsString (TCMT m a) where fromString s = return (fromString s) -- | Interaction monad. type IM = TCMT (Haskeline.InputT IO) runIM :: IM a -> TCM a runIM = mapTCMT (Haskeline.runInputT Haskeline.defaultSettings) instance MonadError TCErr IM where throwError = liftIO . E.throwIO catchError m h = mapTCMT liftIO $ runIM m `catchError` (runIM . h) -- | Preserve the state of the failing computation. catchError_ :: TCM a -> (TCErr -> TCM a) -> TCM a catchError_ m h = TCM $ \r e -> unTCM m r e `E.catch` \err -> unTCM (h err) r e -- | Execute a finalizer even when an exception is thrown. -- Does not catch any errors. -- In case both the regular computation and the finalizer -- throw an exception, the one of the finalizer is propagated. finally_ :: TCM a -> TCM b -> TCM a finally_ m f = do x <- m `catchError_` \ err -> f >> throwError err _ <- f return x {-# SPECIALIZE INLINE mapTCMT :: (forall a. IO a -> IO a) -> TCM a -> TCM a #-} mapTCMT :: (forall a. m a -> n a) -> TCMT m a -> TCMT n a mapTCMT f (TCM m) = TCM $ \s e -> f (m s e) pureTCM :: MonadIO m => (TCState -> TCEnv -> a) -> TCMT m a pureTCM f = TCM $ \r e -> do s <- liftIO $ readIORef r return (f s e) {-# RULES "liftTCM/id" liftTCM = id #-} instance MonadIO m => MonadTCM (TCMT m) where liftTCM = mapTCMT liftIO instance MonadTCM tcm => MonadTCM (MaybeT tcm) where liftTCM = lift . liftTCM instance MonadTCM tcm => MonadTCM (ListT tcm) where liftTCM = lift . liftTCM instance MonadTCM tcm => MonadTCM (ExceptT err tcm) where liftTCM = lift . liftTCM instance (Monoid w, MonadTCM tcm) => MonadTCM (WriterT w tcm) where liftTCM = lift . liftTCM instance (MonadTCM tcm) => MonadTCM (StateT s tcm) where liftTCM = lift . liftTCM instance (MonadTCM tcm) => MonadTCM (ReaderT r tcm) where liftTCM = lift . liftTCM instance MonadTrans TCMT where lift m = TCM $ \_ _ -> m -- We want a special monad implementation of fail. instance MonadIO m => Monad (TCMT m) where return = pure (>>=) = bindTCMT (>>) = (*>) #if __GLASGOW_HASKELL__ < 800 fail = internalError #else fail = Fail.fail instance MonadIO m => Fail.MonadFail (TCMT m) where fail = internalError #endif -- One goal of the definitions and pragmas below is to inline the -- monad operations as much as possible. This doesn't seem to have a -- large effect on the performance of the normal executable, but (at -- least on one machine/configuration) it has a massive effect on the -- performance of the profiling executable [1], and reduces the time -- attributed to bind from over 90% to about 25%. -- -- [1] When compiled with -auto-all and run with -p: roughly 750% -- faster for one example. returnTCMT :: MonadIO m => a -> TCMT m a returnTCMT = \x -> TCM $ \_ _ -> return x {-# INLINE returnTCMT #-} bindTCMT :: MonadIO m => TCMT m a -> (a -> TCMT m b) -> TCMT m b bindTCMT = \(TCM m) k -> TCM $ \r e -> m r e >>= \x -> unTCM (k x) r e {-# INLINE bindTCMT #-} thenTCMT :: MonadIO m => TCMT m a -> TCMT m b -> TCMT m b thenTCMT = \(TCM m1) (TCM m2) -> TCM $ \r e -> m1 r e >> m2 r e {-# INLINE thenTCMT #-} instance MonadIO m => Functor (TCMT m) where fmap = fmapTCMT fmapTCMT :: MonadIO m => (a -> b) -> TCMT m a -> TCMT m b fmapTCMT = \f (TCM m) -> TCM $ \r e -> liftM f (m r e) {-# INLINE fmapTCMT #-} instance MonadIO m => Applicative (TCMT m) where pure = returnTCMT (<*>) = apTCMT apTCMT :: MonadIO m => TCMT m (a -> b) -> TCMT m a -> TCMT m b apTCMT = \(TCM mf) (TCM m) -> TCM $ \r e -> ap (mf r e) (m r e) {-# INLINE apTCMT #-} instance MonadIO m => MonadIO (TCMT m) where liftIO m = TCM $ \s e -> do let r = envRange e liftIO $ wrap s r $ do x <- m x `seq` return x where wrap s r m = E.catch m $ \e -> do s <- readIORef s E.throwIO $ IOException s r e -- | We store benchmark statistics in an IORef. -- This enables benchmarking pure computation, see -- "Agda.Benchmarking". instance MonadBench Phase TCM where getBenchmark = liftIO $ getBenchmark putBenchmark = liftIO . putBenchmark finally = finally_ instance Null (TCM Doc) where empty = return empty null = __IMPOSSIBLE__ -- | Short-cutting disjunction forms a monoid. instance Semigroup (TCM Any) where ma <> mb = Any <$> do (getAny <$> ma) `or2M` (getAny <$> mb) instance Monoid (TCM Any) where mempty = return mempty mappend = (<>) patternViolation :: TCM a patternViolation = throwError PatternErr internalError :: MonadTCM tcm => String -> tcm a internalError s = typeError $ InternalError s genericError :: MonadTCM tcm => String -> tcm a genericError = typeError . GenericError {-# SPECIALIZE genericDocError :: Doc -> TCM a #-} genericDocError :: MonadTCM tcm => Doc -> tcm a genericDocError = typeError . GenericDocError {-# SPECIALIZE typeError :: TypeError -> TCM a #-} typeError :: MonadTCM tcm => TypeError -> tcm a typeError err = liftTCM $ throwError =<< typeError_ err {-# SPECIALIZE typeError_ :: TypeError -> TCM TCErr #-} typeError_ :: MonadTCM tcm => TypeError -> tcm TCErr typeError_ err = liftTCM $ TypeError <$> getTC <*> buildClosure err -- | Running the type checking monad (most general form). {-# SPECIALIZE runTCM :: TCEnv -> TCState -> TCM a -> IO (a, TCState) #-} runTCM :: MonadIO m => TCEnv -> TCState -> TCMT m a -> m (a, TCState) runTCM e s m = do r <- liftIO $ newIORef s a <- unTCM m r e s <- liftIO $ readIORef r return (a, s) -- | Running the type checking monad on toplevel (with initial state). runTCMTop :: TCM a -> IO (Either TCErr a) runTCMTop m = (Right <$> runTCMTop' m) `E.catch` (return . Left) runTCMTop' :: MonadIO m => TCMT m a -> m a runTCMTop' m = do r <- liftIO $ newIORef initState unTCM m r initEnv -- | 'runSafeTCM' runs a safe 'TCM' action (a 'TCM' action which cannot fail) -- in the initial environment. runSafeTCM :: TCM a -> TCState -> IO (a, TCState) runSafeTCM m st = runTCM initEnv st m `E.catch` (\ (e :: TCErr) -> __IMPOSSIBLE__) -- runSafeTCM m st = either__IMPOSSIBLE__ return <$> do -- -- Errors must be impossible. -- runTCM $ do -- putTC st -- a <- m -- st <- getTC -- return (a, st) -- | Runs the given computation in a separate thread, with /a copy/ of -- the current state and environment. -- -- Note that Agda sometimes uses actual, mutable state. If the -- computation given to @forkTCM@ tries to /modify/ this state, then -- bad things can happen, because accesses are not mutually exclusive. -- The @forkTCM@ function has been added mainly to allow the thread to -- /read/ (a snapshot of) the current state in a convenient way. -- -- Note also that exceptions which are raised in the thread are not -- propagated to the parent, so the thread should not do anything -- important. forkTCM :: TCM a -> TCM () forkTCM m = do s <- getTC e <- askTC liftIO $ void $ C.forkIO $ void $ runTCM e s m -- | Base name for extended lambda patterns extendedLambdaName :: String extendedLambdaName = ".extendedlambda" -- | Check whether we have an definition from an extended lambda. isExtendedLambdaName :: A.QName -> Bool isExtendedLambdaName = (extendedLambdaName `List.isPrefixOf`) . prettyShow . nameConcrete . qnameName -- | Name of absurdLambda definitions. absurdLambdaName :: String absurdLambdaName = ".absurdlambda" -- | Check whether we have an definition from an absurd lambda. isAbsurdLambdaName :: QName -> Bool isAbsurdLambdaName = (absurdLambdaName ==) . prettyShow . qnameName -- | Base name for generalized variable projections generalizedFieldName :: String generalizedFieldName = ".generalizedField-" -- | Check whether we have a generalized variable field getGeneralizedFieldName :: A.QName -> Maybe String getGeneralizedFieldName q | List.isPrefixOf generalizedFieldName strName = Just (drop (length generalizedFieldName) strName) | otherwise = Nothing where strName = prettyShow $ nameConcrete $ qnameName q --------------------------------------------------------------------------- -- * KillRange instances --------------------------------------------------------------------------- instance KillRange Signature where killRange (Sig secs defs rews) = killRange2 Sig secs defs rews instance KillRange Sections where killRange = fmap killRange instance KillRange Definitions where killRange = fmap killRange instance KillRange RewriteRuleMap where killRange = fmap killRange instance KillRange Section where killRange (Section tel) = killRange1 Section tel instance KillRange Definition where killRange (Defn ai name t pols occs gens gpars displ mut compiled inst copy ma nc inj def) = killRange16 Defn ai name t pols occs gens gpars displ mut compiled inst copy ma nc inj def -- TODO clarify: Keep the range in the defName field? instance KillRange NumGeneralizableArgs where killRange = id instance KillRange NLPat where killRange (PVar x y) = killRange2 PVar x y killRange (PWild) = PWild killRange (PDef x y) = killRange2 PDef x y killRange (PLam x y) = killRange2 PLam x y killRange (PPi x y) = killRange2 PPi x y killRange (PBoundVar x y) = killRange2 PBoundVar x y killRange (PTerm x) = killRange1 PTerm x instance KillRange NLPType where killRange (NLPType s a) = killRange2 NLPType s a instance KillRange RewriteRule where killRange (RewriteRule q gamma f es rhs t) = killRange6 RewriteRule q gamma f es rhs t instance KillRange CompiledRepresentation where killRange = id instance KillRange EtaEquality where killRange = id instance KillRange System where killRange (System tel sys) = System (killRange tel) (killRange sys) instance KillRange ExtLamInfo where killRange (ExtLamInfo m sys) = killRange2 ExtLamInfo m sys instance KillRange FunctionFlag where killRange = id instance KillRange CompKit where killRange = id instance KillRange Defn where killRange def = case def of Axiom -> Axiom DataOrRecSig n -> DataOrRecSig n GeneralizableVar -> GeneralizableVar AbstractDefn{} -> __IMPOSSIBLE__ -- only returned by 'getConstInfo'! Function cls comp ct tt covering inv mut isAbs delayed proj flags term extlam with copat -> killRange15 Function cls comp ct tt covering inv mut isAbs delayed proj flags term extlam with copat Datatype a b c d e f g h i -> killRange8 Datatype a b c d e f g h i Record a b c d e f g h i j k -> killRange11 Record a b c d e f g h i j k Constructor a b c d e f g h i -> killRange9 Constructor a b c d e f g h i Primitive a b c d e -> killRange5 Primitive a b c d e instance KillRange MutualId where killRange = id instance KillRange c => KillRange (FunctionInverse' c) where killRange NotInjective = NotInjective killRange (Inverse m) = Inverse $ killRangeMap m instance KillRange TermHead where killRange SortHead = SortHead killRange PiHead = PiHead killRange (ConsHead q) = ConsHead $ killRange q killRange h@VarHead{} = h killRange UnknownHead = UnknownHead instance KillRange Projection where killRange (Projection a b c d e) = killRange5 Projection a b c d e instance KillRange ProjLams where killRange = id instance KillRange a => KillRange (Open a) where killRange = fmap killRange instance KillRange DisplayForm where killRange (Display n es dt) = killRange3 Display n es dt instance KillRange Polarity where killRange = id instance KillRange IsForced where killRange = id instance KillRange DoGeneralize where killRange = id instance KillRange DisplayTerm where killRange dt = case dt of DWithApp dt dts es -> killRange3 DWithApp dt dts es DCon q ci dts -> killRange3 DCon q ci dts DDef q dts -> killRange2 DDef q dts DDot v -> killRange1 DDot v DTerm v -> killRange1 DTerm v instance KillRange a => KillRange (Closure a) where killRange = id Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Open.hs0000644000000000000000000000242713466402171020146 0ustar0000000000000000-- {-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Open ( makeOpen , getOpen , tryGetOpen , isClosed ) where import Control.Monad import Control.Monad.Reader import qualified Data.List as List import Agda.Syntax.Internal import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad.Base import {-# SOURCE #-} Agda.TypeChecking.Monad.Context import Agda.Utils.Lens import Agda.Utils.Maybe import Agda.Utils.Except ( MonadError(catchError) ) -- | Create an open term in the current context. makeOpen :: a -> TCM (Open a) makeOpen x = do cp <- viewTC eCurrentCheckpoint return $ OpenThing cp x -- | Extract the value from an open term. The checkpoint at which it was -- created must be in scope. getOpen :: (Subst Term a, MonadTCEnv m) => Open a -> m a getOpen (OpenThing cp x) = do sub <- checkpointSubstitution cp return $ applySubst sub x -- | Extract the value from an open term. Returns `Nothing` if the checkpoint -- at which it was created is not in scope. tryGetOpen :: (Subst Term a, MonadTCEnv m) => Open a -> m (Maybe a) tryGetOpen (OpenThing cp x) = fmap (`applySubst` x) <$> viewTC (eCheckpoints . key cp) -- | An 'Open' is closed if it has checkpoint 0. isClosed :: Open a -> Bool isClosed (OpenThing cp _) = cp == 0 Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/SizedTypes.hs0000644000000000000000000002350013466402171021343 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Stuff for sized types that does not require modules -- "Agda.TypeChecking.Reduce" or "Agda.TypeChecking.Constraints" -- (which import "Agda.TypeChecking.Monad"). module Agda.TypeChecking.Monad.SizedTypes where import qualified Data.Foldable as Fold import qualified Data.Traversable as Trav import Agda.Interaction.Options import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Substitute () import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Pretty import Agda.Utils.Singleton #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- * Testing for type 'Size' ------------------------------------------------------------------------ -- | Result of querying whether size variable @i@ is bounded by another -- size. data BoundedSize = BoundedLt Term -- ^ yes @i : Size< t@ | BoundedNo deriving (Eq, Show) -- | Check if a type is the 'primSize' type. The argument should be 'reduce'd. class IsSizeType a where isSizeType :: a -> TCM (Maybe BoundedSize) instance IsSizeType a => IsSizeType (Dom a) where isSizeType = isSizeType . unDom instance IsSizeType a => IsSizeType (b,a) where isSizeType = isSizeType . snd instance IsSizeType a => IsSizeType (Type' a) where isSizeType = isSizeType . unEl instance IsSizeType Term where isSizeType v = isSizeTypeTest <*> pure v isSizeTypeTest :: TCM (Term -> Maybe BoundedSize) isSizeTypeTest = flip (ifM sizedTypesOption) (return $ const Nothing) $ do (size, sizelt) <- getBuiltinSize let testType (Def d []) | Just d == size = Just BoundedNo testType (Def d [Apply v]) | Just d == sizelt = Just $ BoundedLt $ unArg v testType _ = Nothing return testType getBuiltinDefName :: String -> TCM (Maybe QName) getBuiltinDefName s = fromDef <$> getBuiltin' s where fromDef (Just (Def d [])) = Just d fromDef _ = Nothing getBuiltinSize :: TCM (Maybe QName, Maybe QName) getBuiltinSize = do size <- getBuiltinDefName builtinSize sizelt <- getBuiltinDefName builtinSizeLt return (size, sizelt) isSizeNameTest :: TCM (QName -> Bool) isSizeNameTest = ifM sizedTypesOption isSizeNameTestRaw (return $ const False) isSizeNameTestRaw :: TCM (QName -> Bool) isSizeNameTestRaw = do (size, sizelt) <- getBuiltinSize return $ (`elem` [size, sizelt]) . Just -- | Test whether OPTIONS --sized-types and whether -- the size built-ins are defined. haveSizedTypes :: TCM Bool haveSizedTypes = do Def _ [] <- primSize Def _ [] <- primSizeInf Def _ [] <- primSizeSuc sizedTypesOption `catchError` \_ -> return False -- | Test whether the SIZELT builtin is defined. haveSizeLt :: TCM Bool haveSizeLt = isJust <$> getBuiltinDefName builtinSizeLt -- | Add polarity info to a SIZE builtin. builtinSizeHook :: String -> QName -> Type -> TCM () builtinSizeHook s q t = do when (s `elem` [builtinSizeLt, builtinSizeSuc]) $ do modifySignature $ updateDefinition q $ updateDefPolarity (const [Covariant]) . updateDefArgOccurrences (const [StrictPos]) when (s == builtinSizeMax) $ do modifySignature $ updateDefinition q $ updateDefPolarity (const [Covariant, Covariant]) . updateDefArgOccurrences (const [StrictPos, StrictPos]) {- . updateDefType (const tmax) where -- TODO: max : (i j : Size) -> Size< (suc (max i j)) tmax = -} ------------------------------------------------------------------------ -- * Constructors ------------------------------------------------------------------------ -- | The sort of built-in types @SIZE@ and @SIZELT@. sizeSort :: Sort sizeSort = mkType 0 -- | The type of built-in types @SIZE@ and @SIZELT@. sizeUniv :: Type sizeUniv = sort $ sizeSort -- | The built-in type @SIZE@ with user-given name. sizeType_ :: QName -> Type sizeType_ size = El sizeSort $ Def size [] -- | The built-in type @SIZE@. sizeType :: TCM Type sizeType = El sizeSort <$> primSize -- | The name of @SIZESUC@. sizeSucName :: TCM (Maybe QName) sizeSucName = do ifM (not <$> sizedTypesOption) (return Nothing) $ tryMaybe $ do Def x [] <- primSizeSuc return x sizeSuc :: Nat -> Term -> TCM Term sizeSuc n v | n < 0 = __IMPOSSIBLE__ | n == 0 = return v | otherwise = do Def suc [] <- primSizeSuc return $ case iterate (sizeSuc_ suc) v !!! n of Nothing -> __IMPOSSIBLE__ Just t -> t sizeSuc_ :: QName -> Term -> Term sizeSuc_ suc v = Def suc [Apply $ defaultArg v] -- | Transform list of terms into a term build from binary maximum. sizeMax :: NonemptyList Term -> TCM Term sizeMax vs = case vs of v :! [] -> return v vs -> do Def max [] <- primSizeMax return $ foldr1 (\ u v -> Def max $ map (Apply . defaultArg) [u,v]) vs ------------------------------------------------------------------------ -- * Viewing and unviewing sizes ------------------------------------------------------------------------ -- | A useful view on sizes. data SizeView = SizeInf | SizeSuc Term | OtherSize Term -- | Expects argument to be 'reduce'd. sizeView :: Term -> TCM SizeView sizeView v = do Def inf [] <- primSizeInf Def suc [] <- primSizeSuc case v of Def x [] | x == inf -> return SizeInf Def x [Apply u] | x == suc -> return $ SizeSuc (unArg u) _ -> return $ OtherSize v type Offset = Nat -- | A deep view on sizes. data DeepSizeView = DSizeInf | DSizeVar Nat Offset | DSizeMeta MetaId Elims Offset | DOtherSize Term deriving (Show) instance Pretty DeepSizeView where pretty = \case DSizeInf -> "∞" DSizeVar n o -> text ("@" ++ show n) <+> "+" <+> pretty o DSizeMeta x es o -> pretty (MetaV x es) <+> "+" <+> pretty o DOtherSize t -> pretty t data SizeViewComparable a = NotComparable | YesAbove DeepSizeView a | YesBelow DeepSizeView a deriving (Functor) -- | @sizeViewComparable v w@ checks whether @v >= w@ (then @Left@) -- or @v <= w@ (then @Right@). If uncomparable, it returns @NotComparable@. sizeViewComparable :: DeepSizeView -> DeepSizeView -> SizeViewComparable () sizeViewComparable v w = case (v,w) of (DSizeInf, _) -> YesAbove w () (_, DSizeInf) -> YesBelow w () (DSizeVar x n, DSizeVar y m) | x == y -> if n >= m then YesAbove w () else YesBelow w () _ -> NotComparable sizeViewSuc_ :: QName -> DeepSizeView -> DeepSizeView sizeViewSuc_ suc v = case v of DSizeInf -> DSizeInf DSizeVar i n -> DSizeVar i (n + 1) DSizeMeta x vs n -> DSizeMeta x vs (n + 1) DOtherSize u -> DOtherSize $ sizeSuc_ suc u -- | @sizeViewPred k v@ decrements @v@ by @k@ (must be possible!). sizeViewPred :: Nat -> DeepSizeView -> DeepSizeView sizeViewPred 0 v = v sizeViewPred k v = case v of DSizeInf -> DSizeInf DSizeVar i n | n >= k -> DSizeVar i (n - k) DSizeMeta x vs n | n >= k -> DSizeMeta x vs (n - k) _ -> __IMPOSSIBLE__ -- | @sizeViewOffset v@ returns the number of successors or Nothing when infty. sizeViewOffset :: DeepSizeView -> Maybe Offset sizeViewOffset v = case v of DSizeInf -> Nothing DSizeVar i n -> Just n DSizeMeta x vs n -> Just n DOtherSize u -> Just 0 -- | Remove successors common to both sides. removeSucs :: (DeepSizeView, DeepSizeView) -> (DeepSizeView, DeepSizeView) removeSucs (v, w) = (sizeViewPred k v, sizeViewPred k w) where k = case (sizeViewOffset v, sizeViewOffset w) of (Just n, Just m) -> min n m (Just n, Nothing) -> n (Nothing, Just m) -> m (Nothing, Nothing) -> 0 -- | Turn a size view into a term. unSizeView :: SizeView -> TCM Term unSizeView SizeInf = primSizeInf unSizeView (SizeSuc v) = sizeSuc 1 v unSizeView (OtherSize v) = return v unDeepSizeView :: DeepSizeView -> TCM Term unDeepSizeView v = case v of DSizeInf -> primSizeInf DSizeVar i n -> sizeSuc n $ var i DSizeMeta x us n -> sizeSuc n $ MetaV x us DOtherSize u -> return u ------------------------------------------------------------------------ -- * View on sizes where maximum is pulled to the top ------------------------------------------------------------------------ type SizeMaxView = NonemptyList DeepSizeView type SizeMaxView' = [DeepSizeView] maxViewMax :: SizeMaxView -> SizeMaxView -> SizeMaxView maxViewMax v w = case (v,w) of (DSizeInf :! _, _) -> singleton DSizeInf (_, DSizeInf :! _) -> singleton DSizeInf _ -> Fold.foldr maxViewCons w v -- | @maxViewCons v ws = max v ws@. It only adds @v@ to @ws@ if it is not -- subsumed by an element of @ws@. maxViewCons :: DeepSizeView -> SizeMaxView -> SizeMaxView maxViewCons _ (DSizeInf :! _) = singleton DSizeInf maxViewCons DSizeInf _ = singleton DSizeInf maxViewCons v ws = case sizeViewComparableWithMax v ws of NotComparable -> consNe v ws YesAbove _ ws' -> v :! ws' YesBelow{} -> ws -- | @sizeViewComparableWithMax v ws@ tries to find @w@ in @ws@ that compares with @v@ -- and singles this out. -- Precondition: @v /= DSizeInv@. sizeViewComparableWithMax :: DeepSizeView -> SizeMaxView -> SizeViewComparable SizeMaxView' sizeViewComparableWithMax v (w :! ws) = case (ws, sizeViewComparable v w) of (w':ws', NotComparable) -> fmap (w:) $ sizeViewComparableWithMax v (w' :! ws') (ws , r) -> fmap (const ws) r maxViewSuc_ :: QName -> SizeMaxView -> SizeMaxView maxViewSuc_ suc = fmap (sizeViewSuc_ suc) unMaxView :: SizeMaxView -> TCM Term unMaxView vs = sizeMax =<< Trav.mapM unDeepSizeView vs Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Base.hs-boot0000644000000000000000000000115613466402171021056 0ustar0000000000000000module Agda.TypeChecking.Monad.Base where import Control.Applicative (Applicative) import Control.Monad.IO.Class (MonadIO) import Data.IORef (IORef) import Data.Map (Map) import Agda.Syntax.Concrete.Name (TopLevelModuleName) import Agda.Utils.FileName (AbsolutePath) data HighlightingMethod data TCEnv data TCState newtype TCMT m a = TCM { unTCM :: IORef TCState -> TCEnv -> m a } instance MonadIO m => Applicative (TCMT m) instance MonadIO m => Functor (TCMT m) instance MonadIO m => Monad (TCMT m) instance MonadIO m => MonadIO (TCMT m) type TCM = TCMT IO type ModuleToSource = Map TopLevelModuleName AbsolutePath Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Context.hs-boot0000644000000000000000000000037413466402171021631 0ustar0000000000000000{-# LANGUAGE FlexibleContexts #-} module Agda.TypeChecking.Monad.Context where import Control.Monad.Reader import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base checkpointSubstitution :: MonadTCEnv tcm => CheckpointId -> tcm Substitution Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Builtin.hs0000644000000000000000000005632013466402171020654 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Builtin ( module Agda.TypeChecking.Monad.Builtin , module Agda.Syntax.Builtin -- The names are defined here. ) where #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.State import Control.Monad.Trans.Maybe import qualified Data.Map as Map import Data.Function ( on ) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Builtin import Agda.Syntax.Internal as I import Agda.TypeChecking.Monad.Base -- import Agda.TypeChecking.Functions -- LEADS TO IMPORT CYCLE import Agda.TypeChecking.Substitute import Agda.Utils.Except import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Maybe import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible class ( Functor m , Applicative m #if __GLASGOW_HASKELL__ < 800 , Monad m #else , Fail.MonadFail m #endif ) => HasBuiltins m where getBuiltinThing :: String -> m (Maybe (Builtin PrimFun)) instance HasBuiltins m => HasBuiltins (MaybeT m) where getBuiltinThing b = lift $ getBuiltinThing b instance HasBuiltins m => HasBuiltins (ExceptT e m) where getBuiltinThing b = lift $ getBuiltinThing b instance HasBuiltins m => HasBuiltins (StateT s m) where getBuiltinThing b = lift $ getBuiltinThing b litType :: Literal -> TCM Type litType l = case l of LitNat _ n -> do _ <- primZero when (n > 0) $ void $ primSuc el <$> primNat LitWord64 _ _ -> el <$> primWord64 LitFloat _ _ -> el <$> primFloat LitChar _ _ -> el <$> primChar LitString _ _ -> el <$> primString LitQName _ _ -> el <$> primQName LitMeta _ _ _ -> el <$> primAgdaMeta where el t = El (mkType 0) t instance MonadIO m => HasBuiltins (TCMT m) where getBuiltinThing b = liftM2 mplus (Map.lookup b <$> useTC stLocalBuiltins) (Map.lookup b <$> useTC stImportedBuiltins) setBuiltinThings :: BuiltinThings PrimFun -> TCM () setBuiltinThings b = stLocalBuiltins `setTCLens` b bindBuiltinName :: String -> Term -> TCM () bindBuiltinName b x = do builtin <- getBuiltinThing b case builtin of Just (Builtin y) -> typeError $ DuplicateBuiltinBinding b y x Just (Prim _) -> typeError $ NoSuchBuiltinName b Nothing -> stLocalBuiltins `modifyTCLens` Map.insert b (Builtin x) bindPrimitive :: String -> PrimFun -> TCM () bindPrimitive b pf = do builtin <- getBuiltinThing b case builtin of Just (Builtin _) -> typeError $ NoSuchPrimitiveFunction b Just (Prim x) -> typeError $ (DuplicatePrimitiveBinding b `on` primFunName) x pf Nothing -> stLocalBuiltins `modifyTCLens` Map.insert b (Prim pf) getBuiltin :: String -> TCM Term getBuiltin x = fromMaybeM (typeError $ NoBindingForBuiltin x) $ getBuiltin' x getBuiltin' :: HasBuiltins m => String -> m (Maybe Term) getBuiltin' x = do builtin <- getBuiltinThing x case builtin of Just (Builtin t) -> return $ Just $ killRange t _ -> return Nothing getPrimitive' :: HasBuiltins m => String -> m (Maybe PrimFun) getPrimitive' x = (getPrim =<<) <$> getBuiltinThing x where getPrim (Prim pf) = return pf getPrim _ = Nothing getPrimitive :: String -> TCM PrimFun getPrimitive x = fromMaybeM (typeError $ NoSuchPrimitiveFunction x) $ getPrimitive' x getPrimitiveTerm :: String -> TCM Term getPrimitiveTerm x = (`Def` []) <$> primFunName <$> getPrimitive x getPrimitiveTerm' :: HasBuiltins m => String -> m (Maybe Term) getPrimitiveTerm' x = fmap (`Def` []) <$> getPrimitiveName' x getTerm' :: HasBuiltins m => String -> m (Maybe Term) getTerm' x = mplus <$> getBuiltin' x <*> getPrimitiveTerm' x getName' :: HasBuiltins m => String -> m (Maybe QName) getName' x = mplus <$> getBuiltinName' x <*> getPrimitiveName' x -- | @getTerm use name@ looks up @name@ as a primitive or builtin, and -- throws an error otherwise. -- The @use@ argument describes how the name is used for the sake of -- the error message. getTerm :: (HasBuiltins m) => String -> String -> m Term getTerm use name = flip fromMaybeM (getTerm' name) $ return $! (throwImpossible $ ImpMissingDefinitions [name] use) -- | Rewrite a literal to constructor form if possible. constructorForm :: Term -> TCM Term constructorForm v = constructorForm' primZero primSuc v constructorForm' :: Applicative m => m Term -> m Term -> Term -> m Term constructorForm' pZero pSuc v = case v of Lit (LitNat r n) | n == 0 -> pZero | n > 0 -> (`apply1` Lit (LitNat r $ n - 1)) <$> pSuc | otherwise -> pure v _ -> pure v --------------------------------------------------------------------------- -- * The names of built-in things --------------------------------------------------------------------------- primInteger, primIntegerPos, primIntegerNegSuc, primFloat, primChar, primString, primUnit, primUnitUnit, primBool, primTrue, primFalse, primSigma, primList, primNil, primCons, primIO, primNat, primSuc, primZero, primPath, primPathP, primInterval, primIZero, primIOne, primPartial, primPartialP, primIMin, primIMax, primINeg, primIsOne, primItIsOne, primIsOne1, primIsOne2, primIsOneEmpty, primSub, primSubIn, primSubOut, primTrans, primHComp, primId, primConId, primIdElim, primEquiv, primEquivFun, primEquivProof, primPathToEquiv, primGlue, prim_glue, prim_unglue, primFaceForall, primNatPlus, primNatMinus, primNatTimes, primNatDivSucAux, primNatModSucAux, primNatEquality, primNatLess, -- Machine words primWord64, primSizeUniv, primSize, primSizeLt, primSizeSuc, primSizeInf, primSizeMax, primInf, primSharp, primFlat, primEquality, primRefl, primRewrite, -- Name of rewrite relation primLevel, primLevelZero, primLevelSuc, primLevelMax, primSetOmega, primFromNat, primFromNeg, primFromString, -- builtins for reflection: primQName, primArgInfo, primArgArgInfo, primArg, primArgArg, primAbs, primAbsAbs, primAgdaTerm, primAgdaTermVar, primAgdaTermLam, primAgdaTermExtLam, primAgdaTermDef, primAgdaTermCon, primAgdaTermPi, primAgdaTermSort, primAgdaTermLit, primAgdaTermUnsupported, primAgdaTermMeta, primAgdaErrorPart, primAgdaErrorPartString, primAgdaErrorPartTerm, primAgdaErrorPartName, primHiding, primHidden, primInstance, primVisible, primRelevance, primRelevant, primIrrelevant, primAssoc, primAssocLeft, primAssocRight, primAssocNon, primPrecedence, primPrecRelated, primPrecUnrelated, primFixity, primFixityFixity, primAgdaLiteral, primAgdaLitNat, primAgdaLitWord64, primAgdaLitFloat, primAgdaLitString, primAgdaLitChar, primAgdaLitQName, primAgdaLitMeta, primAgdaSort, primAgdaSortSet, primAgdaSortLit, primAgdaSortUnsupported, primAgdaDefinition, primAgdaDefinitionFunDef, primAgdaDefinitionDataDef, primAgdaDefinitionRecordDef, primAgdaDefinitionPostulate, primAgdaDefinitionPrimitive, primAgdaDefinitionDataConstructor, primAgdaClause, primAgdaClauseClause, primAgdaClauseAbsurd, primAgdaPattern, primAgdaPatCon, primAgdaPatVar, primAgdaPatDot, primAgdaPatLit, primAgdaPatProj, primAgdaPatAbsurd, primAgdaMeta, primAgdaTCM, primAgdaTCMReturn, primAgdaTCMBind, primAgdaTCMUnify, primAgdaTCMTypeError, primAgdaTCMInferType, primAgdaTCMCheckType, primAgdaTCMNormalise, primAgdaTCMReduce, primAgdaTCMCatchError, primAgdaTCMGetContext, primAgdaTCMExtendContext, primAgdaTCMInContext, primAgdaTCMFreshName, primAgdaTCMDeclareDef, primAgdaTCMDeclarePostulate, primAgdaTCMDefineFun, primAgdaTCMGetType, primAgdaTCMGetDefinition, primAgdaTCMQuoteTerm, primAgdaTCMUnquoteTerm, primAgdaTCMBlockOnMeta, primAgdaTCMCommit, primAgdaTCMIsMacro, primAgdaTCMWithNormalisation, primAgdaTCMDebugPrint, primAgdaTCMNoConstraints, primAgdaTCMRunSpeculative :: TCM Term primInteger = getBuiltin builtinInteger primIntegerPos = getBuiltin builtinIntegerPos primIntegerNegSuc = getBuiltin builtinIntegerNegSuc primFloat = getBuiltin builtinFloat primChar = getBuiltin builtinChar primString = getBuiltin builtinString primBool = getBuiltin builtinBool primSigma = getBuiltin builtinSigma primUnit = getBuiltin builtinUnit primUnitUnit = getBuiltin builtinUnitUnit primTrue = getBuiltin builtinTrue primFalse = getBuiltin builtinFalse primList = getBuiltin builtinList primNil = getBuiltin builtinNil primCons = getBuiltin builtinCons primIO = getBuiltin builtinIO primId = getBuiltin builtinId primConId = getBuiltin builtinConId primIdElim = getPrimitiveTerm builtinIdElim primPath = getBuiltin builtinPath primPathP = getBuiltin builtinPathP primInterval = getBuiltin builtinInterval primIZero = getBuiltin builtinIZero primIOne = getBuiltin builtinIOne primIMin = getPrimitiveTerm builtinIMin primIMax = getPrimitiveTerm builtinIMax primINeg = getPrimitiveTerm builtinINeg primPartial = getPrimitiveTerm "primPartial" primPartialP = getPrimitiveTerm "primPartialP" primIsOne = getBuiltin builtinIsOne primItIsOne = getBuiltin builtinItIsOne primTrans = getPrimitiveTerm builtinTrans primHComp = getPrimitiveTerm builtinHComp primEquiv = getBuiltin builtinEquiv primEquivFun = getBuiltin builtinEquivFun primEquivProof = getBuiltin builtinEquivProof primPathToEquiv = getBuiltin builtinPathToEquiv primGlue = getPrimitiveTerm builtinGlue prim_glue = getPrimitiveTerm builtin_glue prim_unglue = getPrimitiveTerm builtin_unglue primFaceForall = getPrimitiveTerm builtinFaceForall primIsOne1 = getBuiltin builtinIsOne1 primIsOne2 = getBuiltin builtinIsOne2 primIsOneEmpty = getBuiltin builtinIsOneEmpty primSub = getBuiltin builtinSub primSubIn = getBuiltin builtinSubIn primSubOut = getPrimitiveTerm builtinSubOut primNat = getBuiltin builtinNat primSuc = getBuiltin builtinSuc primZero = getBuiltin builtinZero primNatPlus = getBuiltin builtinNatPlus primNatMinus = getBuiltin builtinNatMinus primNatTimes = getBuiltin builtinNatTimes primNatDivSucAux = getBuiltin builtinNatDivSucAux primNatModSucAux = getBuiltin builtinNatModSucAux primNatEquality = getBuiltin builtinNatEquals primNatLess = getBuiltin builtinNatLess primWord64 = getBuiltin builtinWord64 primSizeUniv = getBuiltin builtinSizeUniv primSize = getBuiltin builtinSize primSizeLt = getBuiltin builtinSizeLt primSizeSuc = getBuiltin builtinSizeSuc primSizeInf = getBuiltin builtinSizeInf primSizeMax = getBuiltin builtinSizeMax primInf = getBuiltin builtinInf primSharp = getBuiltin builtinSharp primFlat = getBuiltin builtinFlat primEquality = getBuiltin builtinEquality primRefl = getBuiltin builtinRefl primRewrite = getBuiltin builtinRewrite primLevel = getBuiltin builtinLevel primLevelZero = getBuiltin builtinLevelZero primLevelSuc = getBuiltin builtinLevelSuc primLevelMax = getBuiltin builtinLevelMax primSetOmega = getBuiltin builtinSetOmega primFromNat = getBuiltin builtinFromNat primFromNeg = getBuiltin builtinFromNeg primFromString = getBuiltin builtinFromString primQName = getBuiltin builtinQName primArg = getBuiltin builtinArg primArgArg = getBuiltin builtinArgArg primAbs = getBuiltin builtinAbs primAbsAbs = getBuiltin builtinAbsAbs primAgdaSort = getBuiltin builtinAgdaSort primHiding = getBuiltin builtinHiding primHidden = getBuiltin builtinHidden primInstance = getBuiltin builtinInstance primVisible = getBuiltin builtinVisible primRelevance = getBuiltin builtinRelevance primRelevant = getBuiltin builtinRelevant primIrrelevant = getBuiltin builtinIrrelevant primAssoc = getBuiltin builtinAssoc primAssocLeft = getBuiltin builtinAssocLeft primAssocRight = getBuiltin builtinAssocRight primAssocNon = getBuiltin builtinAssocNon primPrecedence = getBuiltin builtinPrecedence primPrecRelated = getBuiltin builtinPrecRelated primPrecUnrelated = getBuiltin builtinPrecUnrelated primFixity = getBuiltin builtinFixity primFixityFixity = getBuiltin builtinFixityFixity primArgInfo = getBuiltin builtinArgInfo primArgArgInfo = getBuiltin builtinArgArgInfo primAgdaSortSet = getBuiltin builtinAgdaSortSet primAgdaSortLit = getBuiltin builtinAgdaSortLit primAgdaSortUnsupported = getBuiltin builtinAgdaSortUnsupported primAgdaTerm = getBuiltin builtinAgdaTerm primAgdaTermVar = getBuiltin builtinAgdaTermVar primAgdaTermLam = getBuiltin builtinAgdaTermLam primAgdaTermExtLam = getBuiltin builtinAgdaTermExtLam primAgdaTermDef = getBuiltin builtinAgdaTermDef primAgdaTermCon = getBuiltin builtinAgdaTermCon primAgdaTermPi = getBuiltin builtinAgdaTermPi primAgdaTermSort = getBuiltin builtinAgdaTermSort primAgdaTermLit = getBuiltin builtinAgdaTermLit primAgdaTermUnsupported = getBuiltin builtinAgdaTermUnsupported primAgdaTermMeta = getBuiltin builtinAgdaTermMeta primAgdaErrorPart = getBuiltin builtinAgdaErrorPart primAgdaErrorPartString = getBuiltin builtinAgdaErrorPartString primAgdaErrorPartTerm = getBuiltin builtinAgdaErrorPartTerm primAgdaErrorPartName = getBuiltin builtinAgdaErrorPartName primAgdaLiteral = getBuiltin builtinAgdaLiteral primAgdaLitNat = getBuiltin builtinAgdaLitNat primAgdaLitWord64 = getBuiltin builtinAgdaLitWord64 primAgdaLitFloat = getBuiltin builtinAgdaLitFloat primAgdaLitChar = getBuiltin builtinAgdaLitChar primAgdaLitString = getBuiltin builtinAgdaLitString primAgdaLitQName = getBuiltin builtinAgdaLitQName primAgdaLitMeta = getBuiltin builtinAgdaLitMeta primAgdaPattern = getBuiltin builtinAgdaPattern primAgdaPatCon = getBuiltin builtinAgdaPatCon primAgdaPatVar = getBuiltin builtinAgdaPatVar primAgdaPatDot = getBuiltin builtinAgdaPatDot primAgdaPatLit = getBuiltin builtinAgdaPatLit primAgdaPatProj = getBuiltin builtinAgdaPatProj primAgdaPatAbsurd = getBuiltin builtinAgdaPatAbsurd primAgdaClause = getBuiltin builtinAgdaClause primAgdaClauseClause = getBuiltin builtinAgdaClauseClause primAgdaClauseAbsurd = getBuiltin builtinAgdaClauseAbsurd primAgdaDefinitionFunDef = getBuiltin builtinAgdaDefinitionFunDef primAgdaDefinitionDataDef = getBuiltin builtinAgdaDefinitionDataDef primAgdaDefinitionRecordDef = getBuiltin builtinAgdaDefinitionRecordDef primAgdaDefinitionDataConstructor = getBuiltin builtinAgdaDefinitionDataConstructor primAgdaDefinitionPostulate = getBuiltin builtinAgdaDefinitionPostulate primAgdaDefinitionPrimitive = getBuiltin builtinAgdaDefinitionPrimitive primAgdaDefinition = getBuiltin builtinAgdaDefinition primAgdaMeta = getBuiltin builtinAgdaMeta primAgdaTCM = getBuiltin builtinAgdaTCM primAgdaTCMReturn = getBuiltin builtinAgdaTCMReturn primAgdaTCMBind = getBuiltin builtinAgdaTCMBind primAgdaTCMUnify = getBuiltin builtinAgdaTCMUnify primAgdaTCMTypeError = getBuiltin builtinAgdaTCMTypeError primAgdaTCMInferType = getBuiltin builtinAgdaTCMInferType primAgdaTCMCheckType = getBuiltin builtinAgdaTCMCheckType primAgdaTCMNormalise = getBuiltin builtinAgdaTCMNormalise primAgdaTCMReduce = getBuiltin builtinAgdaTCMReduce primAgdaTCMCatchError = getBuiltin builtinAgdaTCMCatchError primAgdaTCMGetContext = getBuiltin builtinAgdaTCMGetContext primAgdaTCMExtendContext = getBuiltin builtinAgdaTCMExtendContext primAgdaTCMInContext = getBuiltin builtinAgdaTCMInContext primAgdaTCMFreshName = getBuiltin builtinAgdaTCMFreshName primAgdaTCMDeclareDef = getBuiltin builtinAgdaTCMDeclareDef primAgdaTCMDeclarePostulate = getBuiltin builtinAgdaTCMDeclarePostulate primAgdaTCMDefineFun = getBuiltin builtinAgdaTCMDefineFun primAgdaTCMGetType = getBuiltin builtinAgdaTCMGetType primAgdaTCMGetDefinition = getBuiltin builtinAgdaTCMGetDefinition primAgdaTCMQuoteTerm = getBuiltin builtinAgdaTCMQuoteTerm primAgdaTCMUnquoteTerm = getBuiltin builtinAgdaTCMUnquoteTerm primAgdaTCMBlockOnMeta = getBuiltin builtinAgdaTCMBlockOnMeta primAgdaTCMCommit = getBuiltin builtinAgdaTCMCommit primAgdaTCMIsMacro = getBuiltin builtinAgdaTCMIsMacro primAgdaTCMWithNormalisation = getBuiltin builtinAgdaTCMWithNormalisation primAgdaTCMDebugPrint = getBuiltin builtinAgdaTCMDebugPrint primAgdaTCMNoConstraints = getBuiltin builtinAgdaTCMNoConstraints primAgdaTCMRunSpeculative = getBuiltin builtinAgdaTCMRunSpeculative -- | The coinductive primitives. data CoinductionKit = CoinductionKit { nameOfInf :: QName , nameOfSharp :: QName , nameOfFlat :: QName } -- | Tries to build a 'CoinductionKit'. coinductionKit' :: TCM CoinductionKit coinductionKit' = do Def inf _ <- primInf Def sharp _ <- primSharp Def flat _ <- primFlat return $ CoinductionKit { nameOfInf = inf , nameOfSharp = sharp , nameOfFlat = flat } coinductionKit :: TCM (Maybe CoinductionKit) coinductionKit = tryMaybe coinductionKit' ------------------------------------------------------------------------ -- * Path equality ------------------------------------------------------------------------ getPrimName :: Term -> QName getPrimName ty = do let lamV (Lam i b) = mapFst (getHiding i :) $ lamV (unAbs b) lamV (Pi _ b) = lamV (unEl $ unAbs b) lamV v = ([], v) case lamV ty of (_, Def path _) -> path (_, Con nm _ _) -> conName nm (_, _) -> __IMPOSSIBLE__ getBuiltinName', getPrimitiveName' :: HasBuiltins m => String -> m (Maybe QName) getBuiltinName' n = fmap getPrimName <$> getBuiltin' n getPrimitiveName' n = fmap primFunName <$> getPrimitive' n isPrimitive :: HasBuiltins m => String -> QName -> m Bool isPrimitive n q = (Just q ==) <$> getPrimitiveName' n intervalView' :: HasBuiltins m => m (Term -> IntervalView) intervalView' = do iz <- getBuiltinName' builtinIZero io <- getBuiltinName' builtinIOne imax <- getPrimitiveName' "primIMax" imin <- getPrimitiveName' "primIMin" ineg <- getPrimitiveName' "primINeg" return $ \ t -> case t of Def q es -> case es of [Apply x,Apply y] | Just q == imin -> IMin x y [Apply x,Apply y] | Just q == imax -> IMax x y [Apply x] | Just q == ineg -> INeg x _ -> OTerm t Con q _ [] | Just (conName q) == iz -> IZero | Just (conName q) == io -> IOne _ -> OTerm t intervalView :: HasBuiltins m => Term -> m IntervalView intervalView t = do f <- intervalView' return (f t) intervalUnview :: HasBuiltins m => IntervalView -> m Term intervalUnview t = do f <- intervalUnview' return (f t) intervalUnview' :: HasBuiltins m => m (IntervalView -> Term) intervalUnview' = do iz <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinIZero -- should it be a type error instead? io <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinIOne imin <- (`Def` []) <$> fromMaybe __IMPOSSIBLE__ <$> getPrimitiveName' "primIMin" imax <- (`Def` []) <$> fromMaybe __IMPOSSIBLE__ <$> getPrimitiveName' "primIMax" ineg <- (`Def` []) <$> fromMaybe __IMPOSSIBLE__ <$> getPrimitiveName' "primINeg" return $ \ v -> case v of IZero -> iz IOne -> io IMin x y -> apply imin [x,y] IMax x y -> apply imax [x,y] INeg x -> apply ineg [x] OTerm t -> t ------------------------------------------------------------------------ -- * Path equality ------------------------------------------------------------------------ -- | Check whether the type is actually an path (lhs ≡ rhs) -- and extract lhs, rhs, and their type. -- -- Precondition: type is reduced. pathView :: HasBuiltins m => Type -> m PathView pathView t0 = do view <- pathView' return $ view t0 pathView' :: HasBuiltins m => m (Type -> PathView) pathView' = do mpath <- getBuiltinName' builtinPath mpathp <- getBuiltinName' builtinPathP return $ \ t0@(El s t) -> case t of Def path' [ Apply level , Apply typ , Apply lhs , Apply rhs ] | Just path' == mpath, Just path <- mpathp -> PathType s path level (lam_i <$> typ) lhs rhs where lam_i = Lam defaultArgInfo . NoAbs "_" Def path' [ Apply level , Apply typ , Apply lhs , Apply rhs ] | Just path' == mpathp, Just path <- mpathp -> PathType s path level typ lhs rhs _ -> OType t0 -- | Non dependent Path idViewAsPath :: HasBuiltins m => Type -> m PathView idViewAsPath t0@(El s t) = do mid <- fmap getPrimName <$> getBuiltin' builtinId mpath <- fmap getPrimName <$> getBuiltin' builtinPath case mid of Just path | isJust mpath -> case t of Def path' [ Apply level , Apply typ , Apply lhs , Apply rhs ] | path' == path -> return $ PathType s (fromJust mpath) level typ lhs rhs _ -> return $ OType t0 _ -> return $ OType t0 boldPathView :: Type -> PathView boldPathView t0@(El s t) = do case t of Def path' [ Apply level , Apply typ , Apply lhs , Apply rhs ] -> PathType s path' level typ lhs rhs _ -> OType t0 -- | Revert the 'PathView'. -- -- Postcondition: type is reduced. pathUnview :: PathView -> Type pathUnview (OType t) = t pathUnview (PathType s path l t lhs rhs) = El s $ Def path $ map Apply [l, t, lhs, rhs] ------------------------------------------------------------------------ -- * Builtin equality ------------------------------------------------------------------------ -- | Get the name of the equality type. primEqualityName :: TCM QName -- primEqualityName = getDef =<< primEquality -- LEADS TO IMPORT CYCLE primEqualityName = do eq <- primEquality -- Andreas, 2014-05-17 moved this here from TC.Rules.Def -- Don't know why up to 2 hidden lambdas need to be stripped, -- but I left the code in place. -- Maybe it was intended that equality could be declared -- in three different ways: -- 1. universe and type polymorphic -- 2. type polymorphic only -- 3. monomorphic. let lamV (Lam i b) = mapFst (getHiding i :) $ lamV (unAbs b) lamV v = ([], v) return $ case lamV eq of (_, Def equality _) -> equality _ -> __IMPOSSIBLE__ -- | Check whether the type is actually an equality (lhs ≡ rhs) -- and extract lhs, rhs, and their type. -- -- Precondition: type is reduced. equalityView :: Type -> TCM EqualityView equalityView t0@(El s t) = do equality <- primEqualityName case t of Def equality' es | equality' == equality -> do let vs = fromMaybe __IMPOSSIBLE__ $ allApplyElims es let n = length vs unless (n >= 3) __IMPOSSIBLE__ let (pars, [ typ , lhs, rhs ]) = splitAt (n-3) vs return $ EqualityType s equality pars typ lhs rhs _ -> return $ OtherType t0 -- | Revert the 'EqualityView'. -- -- Postcondition: type is reduced. equalityUnview :: EqualityView -> Type equalityUnview (OtherType t) = t equalityUnview (EqualityType s equality l t lhs rhs) = El s $ Def equality $ map Apply (l ++ [t, lhs, rhs]) -- | Primitives with typechecking constrants. constrainedPrims :: [String] constrainedPrims = [ builtinConId , builtinPOr , builtinComp , builtinHComp , builtinTrans , builtin_glue ] getNameOfConstrained :: HasBuiltins m => String -> m (Maybe QName) getNameOfConstrained s = do unless (s `elem` constrainedPrims) __IMPOSSIBLE__ getName' s Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Constraints.hs0000644000000000000000000001753413466402171021561 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Constraints where import Control.Arrow ((&&&)) import Control.Monad.State import Control.Monad.Reader import qualified Data.Foldable as Fold import qualified Data.List as List import Data.Set (Set) import qualified Data.Set as Set import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Closure import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Monad import Agda.Utils.Except #include "undefined.h" import Agda.Utils.Impossible -- | Add all constraints belonging to the given problem to the current problem(s). stealConstraints :: ProblemId -> TCM () stealConstraints pid = do current <- asksTC envActiveProblems reportSLn "tc.constr.steal" 50 $ "problem " ++ show (Set.toList current) ++ " is stealing problem " ++ show pid ++ "'s constraints!" -- Add current to any constraint in pid. let rename pc@(PConstr pids c) | Set.member pid pids = PConstr (Set.union current pids) c | otherwise = pc -- We should never steal from an active problem. whenM (Set.member pid <$> asksTC envActiveProblems) __IMPOSSIBLE__ modifyAwakeConstraints $ List.map rename modifySleepingConstraints $ List.map rename solvingProblem :: ProblemId -> TCM a -> TCM a solvingProblem pid = solvingProblems (Set.singleton pid) solvingProblems :: Set ProblemId -> TCM a -> TCM a solvingProblems pids m = verboseBracket "tc.constr.solve" 50 ("working on problems " ++ show (Set.toList pids)) $ do x <- localTC (\e -> e { envActiveProblems = pids `Set.union` envActiveProblems e }) m Fold.forM_ pids $ \ pid -> do ifNotM (isProblemSolved pid) (reportSLn "tc.constr.solve" 50 $ "problem " ++ show pid ++ " was not solved.") $ {- else -} do reportSLn "tc.constr.solve" 50 $ "problem " ++ show pid ++ " was solved!" wakeConstraints (return . blockedOn pid . clValue . theConstraint) return x where blockedOn pid (Guarded _ pid') = pid == pid' blockedOn _ _ = False isProblemSolved :: ProblemId -> TCM Bool isProblemSolved pid = and2M (not . Set.member pid <$> asksTC envActiveProblems) (all (not . Set.member pid . constraintProblems) <$> getAllConstraints) getConstraintsForProblem :: ProblemId -> TCM Constraints getConstraintsForProblem pid = List.filter (Set.member pid . constraintProblems) <$> getAllConstraints -- | Get the awake constraints getAwakeConstraints :: TCM Constraints getAwakeConstraints = useTC stAwakeConstraints wakeConstraints :: (ProblemConstraint-> TCM Bool) -> TCM () wakeConstraints wake = do c <- useTC stSleepingConstraints (wakeup, sleepin) <- partitionM wake c reportSLn "tc.constr.wake" 50 $ "waking up " ++ show (List.map (Set.toList . constraintProblems) wakeup) ++ "\n" ++ " still sleeping: " ++ show (List.map (Set.toList . constraintProblems) sleepin) modifySleepingConstraints $ const sleepin modifyAwakeConstraints (++ wakeup) -- danger... dropConstraints :: (ProblemConstraint -> Bool) -> TCM () dropConstraints crit = do let filt = List.filter $ not . crit modifySleepingConstraints filt modifyAwakeConstraints filt putConstraintsToSleep :: (ProblemConstraint -> Bool) -> TCM () putConstraintsToSleep sleepy = do awakeOnes <- useTC stAwakeConstraints let (gotoSleep, stayAwake) = List.partition sleepy awakeOnes modifySleepingConstraints $ (++ gotoSleep) modifyAwakeConstraints $ const stayAwake putAllConstraintsToSleep :: TCM () putAllConstraintsToSleep = putConstraintsToSleep (const True) data ConstraintStatus = AwakeConstraint | SleepingConstraint deriving (Eq, Show) -- | Suspend constraints matching the predicate during the execution of the -- second argument. Caution: held sleeping constraints will not be woken up -- by events that would normally trigger a wakeup call. holdConstraints :: (ConstraintStatus -> ProblemConstraint -> Bool) -> TCM a -> TCM a holdConstraints p m = do (holdAwake, stillAwake) <- List.partition (p AwakeConstraint) <$> useTC stAwakeConstraints (holdAsleep, stillAsleep) <- List.partition (p SleepingConstraint) <$> useTC stSleepingConstraints stAwakeConstraints `setTCLens` stillAwake stSleepingConstraints `setTCLens` stillAsleep let restore = do stAwakeConstraints `modifyTCLens` (holdAwake ++) stSleepingConstraints `modifyTCLens` (holdAsleep ++) catchError (m <* restore) (\ err -> restore *> throwError err) takeAwakeConstraint :: TCM (Maybe ProblemConstraint) takeAwakeConstraint = takeAwakeConstraint' (const True) takeAwakeConstraint' :: (ProblemConstraint -> Bool) -> TCM (Maybe ProblemConstraint) takeAwakeConstraint' p = do cs <- getAwakeConstraints case break p cs of (_, []) -> return Nothing (cs0, c : cs) -> do modifyAwakeConstraints $ const (cs0 ++ cs) return $ Just c getAllConstraints :: TCM Constraints getAllConstraints = getsTC $ \s -> s^.stAwakeConstraints ++ s^.stSleepingConstraints withConstraint :: (Constraint -> TCM a) -> ProblemConstraint -> TCM a withConstraint f (PConstr pids c) = do -- We should preserve the problem stack and the isSolvingConstraint flag (pids', isSolving) <- asksTC $ envActiveProblems &&& envSolvingConstraints enterClosure c $ \c -> localTC (\e -> e { envActiveProblems = pids', envSolvingConstraints = isSolving }) $ solvingProblems pids (f c) buildProblemConstraint :: Set ProblemId -> Constraint -> TCM ProblemConstraint buildProblemConstraint pids c = PConstr pids <$> buildClosure c buildProblemConstraint_ :: Constraint -> TCM ProblemConstraint buildProblemConstraint_ = buildProblemConstraint Set.empty buildConstraint :: Constraint -> TCM ProblemConstraint buildConstraint c = flip buildProblemConstraint c =<< asksTC envActiveProblems -- | Add new a constraint addConstraint' :: Constraint -> TCM () addConstraint' = addConstraintTo stSleepingConstraints addAwakeConstraint' :: Constraint -> TCM () addAwakeConstraint' = addConstraintTo stAwakeConstraints addConstraintTo :: Lens' Constraints TCState -> Constraint -> TCM () addConstraintTo bucket c = do pc <- build stDirty `setTCLens` True bucket `modifyTCLens` (pc :) where build | isBlocking c = buildConstraint c | otherwise = buildProblemConstraint_ c isBlocking SortCmp{} = False isBlocking LevelCmp{} = False isBlocking ValueCmp{} = True isBlocking ValueCmpOnFace{} = True isBlocking ElimCmp{} = True isBlocking TypeCmp{} = True isBlocking TelCmp{} = True isBlocking (Guarded c _) = isBlocking c isBlocking UnBlock{} = True isBlocking FindInstance{} = False isBlocking IsEmpty{} = True isBlocking CheckSizeLtSat{} = True isBlocking CheckFunDef{} = True isBlocking HasBiggerSort{} = False isBlocking HasPTSRule{} = False isBlocking UnquoteTactic{} = True -- | Add already awake constraints addAwakeConstraints :: Constraints -> TCM () addAwakeConstraints cs = modifyAwakeConstraints (cs ++) -- | Start solving constraints nowSolvingConstraints :: TCM a -> TCM a nowSolvingConstraints = localTC $ \e -> e { envSolvingConstraints = True } isSolvingConstraints :: TCM Bool isSolvingConstraints = asksTC envSolvingConstraints --------------------------------------------------------------------------- -- * Lenses --------------------------------------------------------------------------- mapAwakeConstraints :: (Constraints -> Constraints) -> TCState -> TCState mapAwakeConstraints = over stAwakeConstraints mapSleepingConstraints :: (Constraints -> Constraints) -> TCState -> TCState mapSleepingConstraints = over stSleepingConstraints modifyAwakeConstraints :: (Constraints -> Constraints) -> TCM () modifyAwakeConstraints = modifyTC . mapAwakeConstraints modifySleepingConstraints :: (Constraints -> Constraints) -> TCM () modifySleepingConstraints = modifyTC . mapSleepingConstraints Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Debug.hs-boot0000644000000000000000000000166213466402171021234 0ustar0000000000000000module Agda.TypeChecking.Monad.Debug where import Control.Monad.IO.Class (MonadIO) import Control.Monad.Reader import Agda.TypeChecking.Monad.Base import {-# SOURCE #-} Agda.TypeChecking.Monad.Options import Agda.Utils.Pretty class (Functor m, Applicative m, Monad m) => MonadDebug m where displayDebugMessage :: Int -> String -> m () displayDebugMessage n s = traceDebugMessage n s $ return () traceDebugMessage :: Int -> String -> m a -> m a traceDebugMessage n s cont = displayDebugMessage n s >> cont formatDebugMessage :: VerboseKey -> Int -> TCM Doc -> m String instance (MonadIO m) => MonadDebug (TCMT m) reportS :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> String -> m () reportSLn :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> String -> m () reportSDoc :: (HasOptions m, MonadDebug m, MonadTCEnv m) => VerboseKey -> Int -> TCM Doc -> m () Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Signature.hs0000644000000000000000000013627613466402171021220 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.TypeChecking.Monad.Signature where import Prelude hiding (null) import Control.Arrow (first, second, (***)) import Control.Applicative hiding (empty) #if __GLASGOW_HASKELL__ >= 800 import qualified Control.Monad.Fail as Fail #endif import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Control.Monad.Trans.Maybe import qualified Data.List as List import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Data.Monoid import Agda.Syntax.Abstract.Name import Agda.Syntax.Abstract (Ren, ScopeCopyInfo(..)) import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Names import Agda.Syntax.Position import Agda.Syntax.Treeless (Compiled(..), TTerm) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Context import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Env import Agda.TypeChecking.Monad.Mutual import Agda.TypeChecking.Monad.Open import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.Trace import Agda.TypeChecking.DropArgs import Agda.TypeChecking.Warnings import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Substitute import {-# SOURCE #-} Agda.TypeChecking.Telescope import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Coverage.SplitTree import {-# SOURCE #-} Agda.TypeChecking.CompiledClause.Compile import {-# SOURCE #-} Agda.TypeChecking.Polarity import {-# SOURCE #-} Agda.TypeChecking.ProjectionLike import Agda.TypeChecking.Monad.Builtin import Agda.Utils.Except ( ExceptT ) import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Map as Map import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty import Agda.Utils.Size import qualified Agda.Utils.HashMap as HMap #include "undefined.h" import Agda.Utils.Impossible -- | Add a constant to the signature. Lifts the definition to top level. addConstant :: QName -> Definition -> TCM () addConstant q d = do reportSLn "tc.signature" 20 $ "adding constant " ++ prettyShow q ++ " to signature" tel <- getContextTelescope let tel' = replaceEmptyName "r" $ killRange $ case theDef d of Constructor{} -> fmap hideOrKeepInstance tel Function{ funProjection = Just Projection{ projProper = Just{}, projIndex = n } } -> let fallback = fmap hideOrKeepInstance tel in if n > 0 then fallback else -- if the record value is part of the telescope, its hiding should left unchanged case initLast $ telToList tel of Nothing -> fallback Just (doms, dom) -> telFromList $ fmap hideOrKeepInstance doms ++ [dom] _ -> tel let d' = abstract tel' $ d { defName = q } reportSDoc "tc.signature" 60 $ return $ "lambda-lifted definition =" pretty d' modifySignature $ updateDefinitions $ HMap.insertWith (+++) q d' i <- currentOrFreshMutualBlock setMutualBlock i q where new +++ old = new { defDisplay = defDisplay new ++ defDisplay old , defInstance = defInstance new `mplus` defInstance old } -- | Set termination info of a defined function symbol. setTerminates :: QName -> Bool -> TCM () setTerminates q b = modifySignature $ updateDefinition q $ updateTheDef $ \case def@Function{} -> def { funTerminates = Just b } def -> def -- | Set CompiledClauses of a defined function symbol. setCompiledClauses :: QName -> CompiledClauses -> TCM () setCompiledClauses q cc = modifySignature $ updateDefinition q $ updateTheDef $ setT where setT def@Function{} = def { funCompiled = Just cc } setT def = def -- | Set SplitTree of a defined function symbol. setSplitTree :: QName -> SplitTree -> TCM () setSplitTree q st = modifySignature $ updateDefinition q $ updateTheDef $ setT where setT def@Function{} = def { funSplitTree = Just st } setT def = def -- | Modify the clauses of a function. modifyFunClauses :: QName -> ([Clause] -> [Clause]) -> TCM () modifyFunClauses q f = modifySignature $ updateDefinition q $ updateTheDef $ updateFunClauses f -- | Lifts clauses to the top-level and adds them to definition. -- Also adjusts the 'funCopatternLHS' field if necessary. addClauses :: QName -> [Clause] -> TCM () addClauses q cls = do tel <- getContextTelescope modifySignature $ updateDefinition q $ updateTheDef $ updateFunClauses (++ abstract tel cls) . updateFunCopatternLHS (|| isCopatternLHS cls) mkPragma :: String -> TCM CompilerPragma mkPragma s = CompilerPragma <$> getCurrentRange <*> pure s -- | Add a compiler pragma `{-\# COMPILE \#-}` addPragma :: BackendName -> QName -> String -> TCM () addPragma b q s = modifySignature . updateDefinition q . addCompilerPragma b =<< mkPragma s getUniqueCompilerPragma :: BackendName -> QName -> TCM (Maybe CompilerPragma) getUniqueCompilerPragma backend q = do ps <- defCompilerPragmas backend <$> getConstInfo q case ps of [] -> return Nothing [p] -> return $ Just p (_:p1:_) -> setCurrentRange p1 $ genericDocError $ hang (text ("Conflicting " ++ backend ++ " pragmas for") <+> pretty q <+> "at") 2 $ vcat [ "-" <+> pretty (getRange p) | p <- ps ] setFunctionFlag :: FunctionFlag -> Bool -> QName -> TCM () setFunctionFlag flag val q = modifyGlobalDefinition q $ set (theDefLens . funFlag flag) val markStatic :: QName -> TCM () markStatic = setFunctionFlag FunStatic True markInline :: Bool -> QName -> TCM () markInline b = setFunctionFlag FunInline b markInjective :: QName -> TCM () markInjective q = modifyGlobalDefinition q $ \def -> def { defInjective = True } unionSignatures :: [Signature] -> Signature unionSignatures ss = foldr unionSignature emptySignature ss where unionSignature (Sig a b c) (Sig a' b' c') = Sig (Map.union a a') (HMap.union b b') -- definitions are unique (in at most one module) (HMap.unionWith mappend c c') -- rewrite rules are accumulated -- | Add a section to the signature. -- -- The current context will be stored as the cumulative module parameters -- for this section. addSection :: ModuleName -> TCM () addSection m = do tel <- getContextTelescope let sec = Section tel -- Make sure we do not overwrite an existing section! whenJustM (getSection m) $ \ sec' -> do -- At least not with different content! if (sec == sec') then do -- Andreas, 2015-12-02: test/Succeed/Issue1701II.agda -- reports a "redundantly adding existing section". reportSLn "tc.section" 10 $ "warning: redundantly adding existing section " ++ prettyShow m reportSLn "tc.section" 60 $ "with content " ++ prettyShow sec else do reportSLn "impossible" 10 $ "overwriting existing section " ++ prettyShow m reportSLn "impossible" 60 $ "of content " ++ prettyShow sec' reportSLn "impossible" 60 $ "with content " ++ prettyShow sec __IMPOSSIBLE__ -- Add the new section. setModuleCheckpoint m modifySignature $ over sigSections $ Map.insert m sec -- | Sets the checkpoint for the given module to the current checkpoint. setModuleCheckpoint :: ModuleName -> TCM () setModuleCheckpoint m = do chkpt <- viewTC eCurrentCheckpoint stModuleCheckpoints `modifyTCLens` Map.insert m chkpt -- | Get a section. -- -- Why Maybe? The reason is that we look up all prefixes of a module to -- compute number of parameters, and for hierarchical top-level modules, -- A.B.C say, A and A.B do not exist. {-# SPECIALIZE getSection :: ModuleName -> TCM (Maybe Section) #-} {-# SPECIALIZE getSection :: ModuleName -> ReduceM (Maybe Section) #-} getSection :: (Functor m, ReadTCState m) => ModuleName -> m (Maybe Section) getSection m = do sig <- (^. stSignature . sigSections) <$> getTCState isig <- (^. stImports . sigSections) <$> getTCState return $ Map.lookup m sig `mplus` Map.lookup m isig -- | Lookup a section telescope. -- -- If it doesn't exist, like in hierarchical top-level modules, -- the section telescope is empty. {-# SPECIALIZE lookupSection :: ModuleName -> TCM Telescope #-} {-# SPECIALIZE lookupSection :: ModuleName -> ReduceM Telescope #-} lookupSection :: (Functor m, ReadTCState m) => ModuleName -> m Telescope lookupSection m = maybe EmptyTel (^. secTelescope) <$> getSection m -- Add display forms to all names @xn@ such that @x = x1 es1@, ... @xn-1 = xn esn@. addDisplayForms :: QName -> TCM () addDisplayForms x = do def <- getConstInfo x args <- drop (projectionArgs $ theDef def) <$> getContextArgs add args x x $ map Apply $ raise 1 args -- make room for the single match variable of the display form where add args top x es0 = do def <- getConstInfo x let cs = defClauses def isCopy = defCopy def case cs of [ cl ] -> do if not isCopy then noDispForm x "not a copy" else do if not $ all (isVar . namedArg) $ namedClausePats cl then noDispForm x "properly matching patterns" else do -- We have -- x ps = e -- and we're trying to generate a display form -- x es0 <-- e[es0/ps] -- Of course x es0 might be an over- or underapplication, hence the -- n/m arithmetic. let n = size $ namedClausePats cl (es1, es2) = splitAt n es0 m = n - size es1 vs1 = map unArg $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es1 sub = parallelS $ reverse $ vs1 ++ replicate m (var 0) body = applySubst sub (compiledClauseBody cl) `applyE` es2 case unSpine <$> body of Just (Def y es) -> do let df = Display m es $ DTerm $ Def top $ map Apply args reportSLn "tc.display.section" 20 $ unlines [ "adding display form " ++ prettyShow y ++ " --> " ++ prettyShow top , show df ] addDisplayForm y df add args top y es Just v -> noDispForm x $ "not a def body, but " ++ show v Nothing -> noDispForm x $ "bad body" [] | Constructor{ conSrcCon = h } <- theDef def -> do let y = conName h df = Display 0 [] $ DTerm $ Con (h {conName = top }) ConOSystem [] reportSLn "tc.display.section" 20 $ unlines [ "adding display form " ++ prettyShow y ++ " --> " ++ prettyShow top , show df ] addDisplayForm y df [] -> noDispForm x "no clauses" (_:_:_) -> noDispForm x "many clauses" noDispForm x reason = reportSLn "tc.display.section" 30 $ "no display form from " ++ prettyShow x ++ " because " ++ reason isVar VarP{} = True isVar _ = False -- | Module application (followed by module parameter abstraction). applySection :: ModuleName -- ^ Name of new module defined by the module macro. -> Telescope -- ^ Parameters of new module. -> ModuleName -- ^ Name of old module applied to arguments. -> Args -- ^ Arguments of module application. -> ScopeCopyInfo -- ^ Imported names and modules -> TCM () applySection new ptel old ts ScopeCopyInfo{ renModules = rm, renNames = rd } = do rd <- closeConstructors rd applySection' new ptel old ts ScopeCopyInfo{ renModules = rm, renNames = rd } where -- If a datatype is being copied, all its constructors need to be copied, -- and if a constructor is copied its datatype needs to be. closeConstructors :: Ren QName -> TCM (Ren QName) closeConstructors rd = do ds <- List.nub . concat <$> mapM (constructorData . fst) rd cs <- List.nub . concat <$> mapM (dataConstructors . fst) rd new <- concat <$> mapM rename (ds ++ cs) reportSLn "tc.mod.apply.complete" 30 $ "also copying: " ++ prettyShow new return $ new ++ rd where rename :: QName -> TCM (Ren QName) rename x = case lookup x rd of Nothing -> do y <- freshName_ (prettyShow x) return [(x, qnameFromList [y])] Just{} -> return [] constructorData :: QName -> TCM [QName] constructorData x = do def <- theDef <$> getConstInfo x return $ case def of Constructor{ conData = d } -> [d] _ -> [] dataConstructors :: QName -> TCM [QName] dataConstructors x = do def <- theDef <$> getConstInfo x return $ case def of Datatype{ dataCons = cs } -> cs Record{ recConHead = h } -> [conName h] _ -> [] applySection' :: ModuleName -> Telescope -> ModuleName -> Args -> ScopeCopyInfo -> TCM () applySection' new ptel old ts ScopeCopyInfo{ renNames = rd, renModules = rm } = do do noCopyList <- catMaybes <$> mapM getName' constrainedPrims forM_ (map fst rd) $ \ q -> do when (q `elem` noCopyList) $ typeError (TriedToCopyConstrainedPrim q) reportSLn "tc.mod.apply" 10 $ render $ vcat [ "applySection" , "new =" <+> pretty new , "ptel =" <+> pretty ptel , "old =" <+> pretty old , "ts =" <+> pretty ts ] mapM_ (copyDef ts) rd mapM_ (copySec ts) rm computePolarity (map snd rd) where -- Andreas, 2013-10-29 -- Here, if the name x is not imported, it persists as -- old, possibly out-of-scope name. -- This old name may used by the case split tactic, leading to -- names that cannot be printed properly. -- I guess it would make sense to mark non-imported names -- as such (out-of-scope) and let splitting fail if it would -- produce out-of-scope constructors. copyName x = fromMaybe x $ lookup x rd argsToUse x = do let m = commonParentModule old x reportSLn "tc.mod.apply" 80 $ "Common prefix: " ++ prettyShow m size <$> lookupSection m copyDef :: Args -> (QName, QName) -> TCM () copyDef ts (x, y) = do def <- getConstInfo x np <- argsToUse (qnameModule x) -- Issue #3083: We need to use the hiding from the telescope of the -- original module. This can be different than the hiding for the common -- parent in the case of record modules. hidings <- map getHiding . telToList <$> lookupSection (qnameModule x) let ts' = zipWith setHiding hidings ts commonTel <- lookupSection (commonParentModule old $ qnameModule x) reportSLn "tc.mod.apply" 80 $ init $ unlines [ "copyDef " ++ prettyShow x ++ " -> " ++ prettyShow y , "ts' = " ++ prettyShow ts' ] copyDef' ts' np def where copyDef' ts np d = do reportSLn "tc.mod.apply" 60 $ "making new def for " ++ prettyShow y ++ " from " ++ prettyShow x ++ " with " ++ show np ++ " args " ++ show (defAbstract d) reportSLn "tc.mod.apply" 80 $ init $ unlines [ "args = " ++ show ts' , "old type = " ++ prettyShow (defType d) ] reportSLn "tc.mod.apply" 80 $ "new type = " ++ prettyShow t addConstant y =<< nd y makeProjection y -- Issue1238: the copied def should be an 'instance' if the original -- def is one. Skip constructors since the original constructor will -- still work as an instance. unless isCon $ whenJust inst $ \ c -> addNamedInstance y c -- Set display form for the old name if it's not a constructor. {- BREAKS fail/Issue478 -- Andreas, 2012-10-20 and if we are not an anonymous module -- unless (isAnonymousModuleName new || isCon || size ptel > 0) $ do -} -- BREAKS fail/Issue1643a -- -- Andreas, 2015-09-09 Issue 1643: -- -- Do not add a display form for a bare module alias. -- when (not isCon && size ptel == 0 && not (null ts)) $ do when (size ptel == 0) $ do addDisplayForms y where ts' = take np ts t = defType d `piApply` ts' pol = defPolarity d `apply` ts' occ = defArgOccurrences d `apply` ts' gen = defArgGeneralizable d `apply` ts' inst = defInstance d -- the name is set by the addConstant function nd :: QName -> TCM Definition nd y = for def $ \ df -> Defn { defArgInfo = defArgInfo d , defName = y , defType = t , defPolarity = pol , defArgOccurrences = occ , defArgGeneralizable = gen , defGeneralizedParams = [] -- This is only needed for type checking data/record defs so no need to copy it. , defDisplay = [] , defMutual = -1 -- TODO: mutual block? , defCompiledRep = noCompiledRep , defInstance = inst , defCopy = True , defMatchable = False , defNoCompilation = defNoCompilation d , defInjective = False , theDef = df } oldDef = theDef d isCon = case oldDef of { Constructor{} -> True ; _ -> False } mutual = case oldDef of { Function{funMutual = m} -> m ; _ -> Nothing } extlam = case oldDef of { Function{funExtLam = e} -> e ; _ -> Nothing } with = case oldDef of { Function{funWith = w} -> copyName <$> w ; _ -> Nothing } -- Andreas, 2015-05-11, to fix issue 1413: -- Even if we apply the record argument (must be @var 0@), we stay a projection. -- This is because we may abstract the record argument later again. -- See succeed/ProjectionNotNormalized.agda isVar0 t = case unArg t of Var 0 [] -> True; _ -> False proj = case oldDef of Function{funProjection = Just p@Projection{projIndex = n}} | size ts' < n || (size ts' == n && maybe True isVar0 (lastMaybe ts')) -> Just $ p { projIndex = n - size ts' , projLams = projLams p `apply` ts' , projProper= fmap copyName $ projProper p } _ -> Nothing def = case oldDef of Constructor{ conPars = np, conData = d } -> return $ oldDef { conPars = np - size ts' , conData = copyName d } Datatype{ dataPars = np, dataCons = cs } -> return $ oldDef { dataPars = np - size ts' , dataClause = Just cl , dataCons = map copyName cs } Record{ recPars = np, recTel = tel } -> return $ oldDef { recPars = np - size ts' , recClause = Just cl , recTel = apply tel ts' } GeneralizableVar -> return GeneralizableVar _ -> do (mst, cc) <- compileClauses Nothing [cl] -- Andreas, 2012-10-07 non need for record pattern translation let newDef = set funMacro (oldDef ^. funMacro) $ set funStatic (oldDef ^. funStatic) $ set funInline True $ emptyFunction { funClauses = [cl] , funCompiled = Just cc , funSplitTree = mst , funMutual = mutual , funProjection = proj , funTerminates = Just True , funExtLam = extlam , funWith = with , funCopatternLHS = isCopatternLHS [cl] } reportSDoc "tc.mod.apply" 80 $ return $ ("new def for" <+> pretty x) pretty newDef return newDef cl = Clause { clauseLHSRange = getRange $ defClauses d , clauseFullRange = getRange $ defClauses d , clauseTel = EmptyTel , namedClausePats = [] , clauseBody = Just $ dropArgs pars $ case oldDef of Function{funProjection = Just p} -> projDropParsApply p ProjSystem ts' _ -> Def x $ map Apply ts' , clauseType = Just $ defaultArg t , clauseCatchall = False , clauseUnreachable = Just False -- definitely not unreachable } where -- The number of remaining parameters. We need to drop the -- lambdas corresponding to these from the clause body above. pars = max 0 $ maybe 0 (pred . projIndex) proj {- Example module Top Θ where module A Γ where module M Φ where module B Δ where module N Ψ where module O Ψ' where open A public -- introduces only M --> A.M into the *scope* module C Ξ = Top.B ts new section C tel = Ξ.(Θ.Δ)[ts] calls 1. copySec ts (Top.A.M, C.M) 2. copySec ts (Top.B.N, C.N) 3. copySec ts (Top.B.N.O, C.N.O) with old = Top.B For 1. Common prefix is: Top totalArgs = |Θ| (section Top) tel = Θ.Γ.Φ (section Top.A.M) ts' = take totalArgs ts Θ₂ = drop totalArgs Θ new section C.M tel = Θ₂.Γ.Φ[ts'] -} copySec :: Args -> (ModuleName, ModuleName) -> TCM () copySec ts (x, y) = do totalArgs <- argsToUse x tel <- lookupSection x let sectionTel = apply tel $ take totalArgs ts reportSLn "tc.mod.apply" 80 $ "Copying section " ++ prettyShow x ++ " to " ++ prettyShow y reportSLn "tc.mod.apply" 80 $ " ts = " ++ List.intercalate "; " (map prettyShow ts) reportSLn "tc.mod.apply" 80 $ " totalArgs = " ++ show totalArgs reportSLn "tc.mod.apply" 80 $ " tel = " ++ List.intercalate " " (map (fst . unDom) $ telToList tel) -- only names reportSLn "tc.mod.apply" 80 $ " sectionTel = " ++ List.intercalate " " (map (fst . unDom) $ telToList ptel) -- only names addContext sectionTel $ addSection y -- | Add a display form to a definition (could be in this or imported signature). addDisplayForm :: QName -> DisplayForm -> TCM () addDisplayForm x df = do d <- makeOpen df let add = updateDefinition x $ \ def -> def{ defDisplay = d : defDisplay def } ifM (isLocal x) {-then-} (modifySignature add) {-else-} (stImportsDisplayForms `modifyTCLens` HMap.insertWith (++) x [d]) whenM (hasLoopingDisplayForm x) $ typeError . GenericDocError $ "Cannot add recursive display form for" <+> pretty x isLocal :: QName -> TCM Bool isLocal x = HMap.member x <$> useTC (stSignature . sigDefinitions) getDisplayForms :: QName -> TCM [LocalDisplayForm] getDisplayForms q = do ds <- either (const []) defDisplay <$> getConstInfo' q ds1 <- HMap.lookupDefault [] q <$> useTC stImportsDisplayForms ds2 <- HMap.lookupDefault [] q <$> useTC stImportedDisplayForms ifM (isLocal q) (return $ ds ++ ds1 ++ ds2) (return $ ds1 ++ ds ++ ds2) -- | Find all names used (recursively) by display forms of a given name. chaseDisplayForms :: QName -> TCM (Set QName) chaseDisplayForms q = go Set.empty [q] where go used [] = pure used go used (q : qs) = do let rhs (Display _ _ e) = e -- Only look at names in the right-hand side (#1870) ds <- (`Set.difference` used) . Set.unions . map (namesIn . rhs . dget) <$> (getDisplayForms q `catchError_` \ _ -> pure []) -- might be a pattern synonym go (Set.union ds used) (Set.toList ds ++ qs) -- | Check if a display form is looping. hasLoopingDisplayForm :: QName -> TCM Bool hasLoopingDisplayForm q = Set.member q <$> chaseDisplayForms q canonicalName :: QName -> TCM QName canonicalName x = do def <- theDef <$> getConstInfo x case def of Constructor{conSrcCon = c} -> return $ conName c Record{recClause = Just (Clause{ clauseBody = body })} -> can body Datatype{dataClause = Just (Clause{ clauseBody = body })} -> can body _ -> return x where can body = canonicalName $ extract $ fromMaybe __IMPOSSIBLE__ body extract (Def x _) = x extract _ = __IMPOSSIBLE__ sameDef :: QName -> QName -> TCM (Maybe QName) sameDef d1 d2 = do c1 <- canonicalName d1 c2 <- canonicalName d2 if (c1 == c2) then return $ Just c1 else return Nothing -- | Can be called on either a (co)datatype, a record type or a -- (co)constructor. whatInduction :: MonadTCM tcm => QName -> tcm Induction whatInduction c = liftTCM $ do def <- theDef <$> getConstInfo c mz <- getBuiltinName' builtinIZero mo <- getBuiltinName' builtinIOne case def of Datatype{ dataInduction = i } -> return i Record{} | not (recRecursive def) -> return Inductive Record{ recInduction = i } -> return $ fromMaybe Inductive i Constructor{ conInd = i } -> return i _ | Just c == mz || Just c == mo -> return Inductive _ -> __IMPOSSIBLE__ -- | Does the given constructor come from a single-constructor type? -- -- Precondition: The name has to refer to a constructor. singleConstructorType :: QName -> TCM Bool singleConstructorType q = do d <- theDef <$> getConstInfo q case d of Record {} -> return True Constructor { conData = d } -> do di <- theDef <$> getConstInfo d return $ case di of Record {} -> True Datatype { dataCons = cs } -> length cs == 1 _ -> __IMPOSSIBLE__ _ -> __IMPOSSIBLE__ -- | Signature lookup errors. data SigError = SigUnknown String -- ^ The name is not in the signature; default error message. | SigAbstract -- ^ The name is not available, since it is abstract. -- | Standard eliminator for 'SigError'. sigError :: (String -> a) -> a -> SigError -> a sigError f a = \case SigUnknown s -> f s SigAbstract -> a class ( Functor m , Applicative m #if __GLASGOW_HASKELL__ < 800 , Monad m #else , Fail.MonadFail m #endif , HasOptions m , MonadDebug m , MonadTCEnv m ) => HasConstInfo m where -- | Lookup the definition of a name. The result is a closed thing, all free -- variables have been abstracted over. getConstInfo :: QName -> m Definition getConstInfo q = getConstInfo' q >>= \case Right d -> return d Left (SigUnknown err) -> __IMPOSSIBLE_VERBOSE__ err Left SigAbstract -> __IMPOSSIBLE_VERBOSE__ $ "Abstract, thus, not in scope: " ++ prettyShow q -- | Version that reports exceptions: getConstInfo' :: QName -> m (Either SigError Definition) getConstInfo' q = Right <$> getConstInfo q -- | Lookup the rewrite rules with the given head symbol. getRewriteRulesFor :: QName -> m RewriteRules {-# SPECIALIZE getConstInfo :: QName -> TCM Definition #-} defaultGetRewriteRulesFor :: (Monad m) => m TCState -> QName -> m RewriteRules defaultGetRewriteRulesFor getTCState q = do st <- getTCState let sig = st^.stSignature imp = st^.stImports look s = HMap.lookup q $ s ^. sigRewriteRules return $ mconcat $ catMaybes [look sig, look imp] -- | Get the original name of the projection -- (the current one could be from a module application). getOriginalProjection :: HasConstInfo m => QName -> m QName getOriginalProjection q = projOrig . fromMaybe __IMPOSSIBLE__ <$> isProjection q instance HasConstInfo (TCMT IO) where getRewriteRulesFor = defaultGetRewriteRulesFor getTC getConstInfo' q = do st <- getTC env <- askTC defaultGetConstInfo st env q getConstInfo q = getConstInfo' q >>= \case Right d -> return d Left (SigUnknown err) -> fail err Left SigAbstract -> notInScope $ qnameToConcrete q defaultGetConstInfo :: (HasOptions m, MonadDebug m, MonadTCEnv m) => TCState -> TCEnv -> QName -> m (Either SigError Definition) defaultGetConstInfo st env q = do let defs = st^.(stSignature . sigDefinitions) idefs = st^.(stImports . sigDefinitions) case catMaybes [HMap.lookup q defs, HMap.lookup q idefs] of [] -> return $ Left $ SigUnknown $ "Unbound name: " ++ prettyShow q ++ " " ++ showQNameId q [d] -> mkAbs env d ds -> __IMPOSSIBLE_VERBOSE__ $ "Ambiguous name: " ++ prettyShow q where mkAbs env d | treatAbstractly' q' env = case makeAbstract d of Just d -> return $ Right d Nothing -> return $ Left SigAbstract -- the above can happen since the scope checker is a bit sloppy with 'abstract' | otherwise = return $ Right d where q' = case theDef d of -- Hack to make abstract constructors work properly. The constructors -- live in a module with the same name as the datatype, but for 'abstract' -- purposes they're considered to be in the same module as the datatype. Constructor{} -> dropLastModule q _ -> q dropLastModule q@QName{ qnameModule = m } = q{ qnameModule = mnameFromList $ ifNull (mnameToList m) __IMPOSSIBLE__ init } instance HasConstInfo m => HasConstInfo (MaybeT m) where getConstInfo' = lift . getConstInfo' getRewriteRulesFor = lift . getRewriteRulesFor instance HasConstInfo m => HasConstInfo (ExceptT err m) where getConstInfo' = lift . getConstInfo' getRewriteRulesFor = lift . getRewriteRulesFor instance HasConstInfo m => HasConstInfo (ReaderT r m) where getConstInfo' = lift . getConstInfo' getRewriteRulesFor = lift . getRewriteRulesFor instance (Monoid w, HasConstInfo m) => HasConstInfo (WriterT w m) where getConstInfo' = lift . getConstInfo' getRewriteRulesFor = lift . getRewriteRulesFor instance HasConstInfo m => HasConstInfo (StateT s m) where getConstInfo' = lift . getConstInfo' getRewriteRulesFor = lift . getRewriteRulesFor {-# INLINE getConInfo #-} getConInfo :: HasConstInfo m => ConHead -> m Definition getConInfo = getConstInfo . conName -- | Look up the polarity of a definition. getPolarity :: QName -> TCM [Polarity] getPolarity q = defPolarity <$> getConstInfo q -- | Look up polarity of a definition and compose with polarity -- represented by 'Comparison'. getPolarity' :: Comparison -> QName -> TCM [Polarity] getPolarity' CmpEq q = map (composePol Invariant) <$> getPolarity q -- return [] getPolarity' CmpLeq q = getPolarity q -- composition with Covariant is identity -- | Set the polarity of a definition. setPolarity :: QName -> [Polarity] -> TCM () setPolarity q pol = do reportSLn "tc.polarity.set" 20 $ "Setting polarity of " ++ prettyShow q ++ " to " ++ prettyShow pol ++ "." modifySignature $ updateDefinition q $ updateDefPolarity $ const pol -- | Look up the forced arguments of a definition. getForcedArgs :: QName -> TCM [IsForced] getForcedArgs q = defForced <$> getConstInfo q -- | Get argument occurrence info for argument @i@ of definition @d@ (never fails). getArgOccurrence :: QName -> Nat -> TCM Occurrence getArgOccurrence d i = do def <- getConstInfo d return $! case theDef def of Constructor{} -> StrictPos _ -> fromMaybe Mixed $ defArgOccurrences def !!! i -- | Sets the 'defArgOccurrences' for the given identifier (which -- should already exist in the signature). setArgOccurrences :: QName -> [Occurrence] -> TCM () setArgOccurrences d os = modifyArgOccurrences d $ const os modifyArgOccurrences :: QName -> ([Occurrence] -> [Occurrence]) -> TCM () modifyArgOccurrences d f = modifySignature $ updateDefinition d $ updateDefArgOccurrences f setTreeless :: QName -> TTerm -> TCM () setTreeless q t = modifyGlobalDefinition q $ updateTheDef $ \case fun@Function{} -> fun{ funTreeless = Just $ Compiled t [] } _ -> __IMPOSSIBLE__ setCompiledArgUse :: QName -> [Bool] -> TCM () setCompiledArgUse q use = modifyGlobalDefinition q $ updateTheDef $ \case fun@Function{} -> fun{ funTreeless = for (funTreeless fun) $ \ c -> c { cArgUsage = use } } _ -> __IMPOSSIBLE__ getCompiled :: QName -> TCM (Maybe Compiled) getCompiled q = do (theDef <$> getConstInfo q) <&> \case Function{ funTreeless = t } -> t _ -> Nothing getErasedConArgs :: QName -> TCM [Bool] getErasedConArgs q = do def <- getConstInfo q case theDef def of Constructor{ conData = d, conPars = np, conErased = es } -> return es _ -> __IMPOSSIBLE__ setErasedConArgs :: QName -> [Bool] -> TCM () setErasedConArgs q args = modifyGlobalDefinition q $ updateTheDef $ \case def@Constructor{} -> def{ conErased = args } def -> def -- no-op for non-constructors getTreeless :: QName -> TCM (Maybe TTerm) getTreeless q = fmap cTreeless <$> getCompiled q getCompiledArgUse :: QName -> TCM [Bool] getCompiledArgUse q = maybe [] cArgUsage <$> getCompiled q -- | add data constructors to a datatype addDataCons :: QName -> [QName] -> TCM () addDataCons d cs = modifySignature $ updateDefinition d $ updateTheDef $ \ def -> let !cs' = cs ++ dataCons def in case def of Datatype{} -> def {dataCons = cs' } _ -> __IMPOSSIBLE__ -- | Get the mutually recursive identifiers of a symbol from the signature. getMutual :: QName -> TCM (Maybe [QName]) getMutual d = getMutual_ . theDef <$> getConstInfo d -- | Get the mutually recursive identifiers from a `Definition`. getMutual_ :: Defn -> Maybe [QName] getMutual_ = \case Function { funMutual = m } -> m Datatype { dataMutual = m } -> m Record { recMutual = m } -> m _ -> Nothing -- | Set the mutually recursive identifiers. setMutual :: QName -> [QName] -> TCM () setMutual d m = modifySignature $ updateDefinition d $ updateTheDef $ \ def -> case def of Function{} -> def { funMutual = Just m } Datatype{} -> def {dataMutual = Just m } Record{} -> def { recMutual = Just m } _ -> if null m then def else __IMPOSSIBLE__ -- nothing to do -- | Check whether two definitions are mutually recursive. mutuallyRecursive :: QName -> QName -> TCM Bool mutuallyRecursive d d1 = (d `elem`) . fromMaybe __IMPOSSIBLE__ <$> getMutual d1 -- | A function/data/record definition is nonRecursive if it is not even mutually -- recursive with itself. definitelyNonRecursive_ :: Defn -> Bool definitelyNonRecursive_ = maybe False null . getMutual_ -- | Get the number of parameters to the current module. getCurrentModuleFreeVars :: TCM Nat getCurrentModuleFreeVars = size <$> (lookupSection =<< currentModule) -- For annoying reasons the qnameModule of a pattern lambda is not correct -- (#2883), so make sure to grab the right module for those. getDefModule :: HasConstInfo m => QName -> m ModuleName getDefModule f = do def <- getConstInfo f return $ case theDef def of Function{ funExtLam = Just (ExtLamInfo m _) } -> m _ -> qnameModule f -- | Compute the number of free variables of a defined name. This is the sum of -- number of parameters shared with the current module and the number of -- anonymous variables (if the name comes from a let-bound module). getDefFreeVars :: (Functor m, Applicative m, ReadTCState m, MonadTCEnv m) => QName -> m Nat getDefFreeVars = getModuleFreeVars . qnameModule freeVarsToApply :: (Functor m, HasConstInfo m, HasOptions m, ReadTCState m, MonadTCEnv m, MonadDebug m) => QName -> m Args freeVarsToApply q = do vs <- moduleParamsToApply $ qnameModule q t <- defType <$> getConstInfo q let TelV tel _ = telView'UpTo (size vs) t unless (size tel == size vs) __IMPOSSIBLE__ return $ zipWith (\ arg dom -> unArg arg <$ argFromDom dom) vs $ telToList tel {-# SPECIALIZE getModuleFreeVars :: ModuleName -> TCM Nat #-} {-# SPECIALIZE getModuleFreeVars :: ModuleName -> ReduceM Nat #-} getModuleFreeVars :: (Functor m, Applicative m, MonadTCEnv m, ReadTCState m) => ModuleName -> m Nat getModuleFreeVars m = do m0 <- commonParentModule m <$> currentModule (+) <$> getAnonymousVariables m <*> (size <$> lookupSection m0) -- | Compute the context variables to apply a definition to. -- -- We have to insert the module telescope of the common prefix -- of the current module and the module where the definition comes from. -- (Properly raised to the current context.) -- -- Example: -- @ -- module M₁ Γ where -- module M₁ Δ where -- f = ... -- module M₃ Θ where -- ... M₁.M₂.f [insert Γ raised by Θ] -- @ moduleParamsToApply :: (Functor m, Applicative m, HasOptions m, MonadTCEnv m, ReadTCState m, MonadDebug m) => ModuleName -> m Args moduleParamsToApply m = do -- Get the correct number of free variables (correctly raised) of @m@. reportSLn "tc.sig.param" 90 $ "computing module parameters of " ++ prettyShow m n <- getModuleFreeVars m tel <- take n . telToList <$> lookupSection m sub <- getModuleParameterSub m verboseS "tc.sig.param" 60 $ do cxt <- getContext reportSLn "tc.sig.param" 60 $ unlines $ [ " n = " ++ show n , " cxt = " ++ show (map (fmap fst) cxt) , " sub = " ++ show sub ] unless (size tel == n) __IMPOSSIBLE__ let args = applySubst sub $ zipWith (\ i a -> var i <$ argFromDom a) (downFrom n) tel reportSLn "tc.sig.param" 60 $ " args = " ++ show args -- Apply the original ArgInfo, as the hiding information in the current -- context might be different from the hiding information expected by @m@. getSection m >>= \case Nothing -> do -- We have no section for @m@. -- This should only happen for toplevel definitions, and then there -- are no free vars to apply, or? -- unless (null args) __IMPOSSIBLE__ -- No, this invariant is violated by private modules, see Issue1701a. return args Just (Section stel) -> do -- The section telescope of @m@ should be as least -- as long as the number of free vars @m@ is applied to. -- We still check here as in no case, we want @zipWith@ to silently -- drop some @args@. -- And there are also anonymous modules, thus, the invariant is not trivial. when (size stel < size args) __IMPOSSIBLE__ return $ zipWith (\ !dom (Arg _ v) -> v <$ argFromDom dom) (telToList stel) args -- | Unless all variables in the context are module parameters, create a fresh -- module to capture the non-module parameters. Used when unquoting to make -- sure generated definitions work properly. inFreshModuleIfFreeParams :: TCM a -> TCM a inFreshModuleIfFreeParams k = do sub <- getModuleParameterSub =<< currentModule if sub == IdS then k else do m <- currentModule m' <- qualifyM m . mnameFromList . (:[]) <$> freshName_ ("_" :: String) addSection m' withCurrentModule m' k -- | Instantiate a closed definition with the correct part of the current -- context. {-# SPECIALIZE instantiateDef :: Definition -> TCM Definition #-} instantiateDef :: ( Functor m, HasConstInfo m, HasOptions m , ReadTCState m, MonadTCEnv m, MonadDebug m ) => Definition -> m Definition instantiateDef d = do vs <- freeVarsToApply $ defName d verboseS "tc.sig.inst" 30 $ do ctx <- getContext m <- currentModule reportSLn "tc.sig.inst" 30 $ "instDef in " ++ prettyShow m ++ ": " ++ prettyShow (defName d) ++ " " ++ unwords (map show $ zipWith (<$) (reverse $ map (fst . unDom) ctx) vs) return $ d `apply` vs instantiateRewriteRule :: (Functor m, HasConstInfo m, HasOptions m, ReadTCState m, MonadTCEnv m, MonadDebug m) => RewriteRule -> m RewriteRule instantiateRewriteRule rew = do traceSLn "rewriting" 95 ("instantiating rewrite rule " ++ show (rewName rew) ++ " to the local context.") $ do vs <- freeVarsToApply $ rewName rew let rew' = rew `apply` vs traceSLn "rewriting" 95 ("instantiated rewrite rule: ") $ do traceSLn "rewriting" 95 (show rew') $ do return rew' instantiateRewriteRules :: (Functor m, HasConstInfo m, HasOptions m, ReadTCState m, MonadTCEnv m, MonadDebug m) => RewriteRules -> m RewriteRules instantiateRewriteRules = mapM instantiateRewriteRule -- | Give the abstract view of a definition. makeAbstract :: Definition -> Maybe Definition makeAbstract d = case defAbstract d of ConcreteDef -> return d AbstractDef -> do def <- makeAbs $ theDef d return d { defArgOccurrences = [] -- no positivity info for abstract things! , defPolarity = [] -- no polarity info for abstract things! , theDef = def } where makeAbs Axiom = Just Axiom makeAbs d@DataOrRecSig{} = Just d makeAbs d@GeneralizableVar{} = Just d makeAbs d@Datatype {} = Just $ AbstractDefn d makeAbs d@Function {} = Just $ AbstractDefn d makeAbs Constructor{} = Nothing -- Andreas, 2012-11-18: Make record constructor and projections abstract. -- Andreas, 2017-08-14: Projections are actually not abstract (issue #2682). -- Return the Defn under a wrapper to allow e.g. eligibleForProjectionLike -- to see whether the abstract thing is a record type or not. makeAbs d@Record{} = Just $ AbstractDefn d makeAbs Primitive{} = __IMPOSSIBLE__ makeAbs AbstractDefn{}= __IMPOSSIBLE__ -- | Enter abstract mode. Abstract definition in the current module are transparent. {-# SPECIALIZE inAbstractMode :: TCM a -> TCM a #-} inAbstractMode :: MonadTCEnv m => m a -> m a inAbstractMode = localTC $ \e -> e { envAbstractMode = AbstractMode } -- | Not in abstract mode. All abstract definitions are opaque. {-# SPECIALIZE inConcreteMode :: TCM a -> TCM a #-} inConcreteMode :: MonadTCEnv m => m a -> m a inConcreteMode = localTC $ \e -> e { envAbstractMode = ConcreteMode } -- | Ignore abstract mode. All abstract definitions are transparent. ignoreAbstractMode :: MonadTCEnv m => m a -> m a ignoreAbstractMode = localTC $ \e -> e { envAbstractMode = IgnoreAbstractMode } -- | Enter concrete or abstract mode depending on whether the given identifier -- is concrete or abstract. {-# SPECIALIZE inConcreteOrAbstractMode :: QName -> (Definition -> TCM a) -> TCM a #-} inConcreteOrAbstractMode :: (MonadTCEnv m, HasConstInfo m) => QName -> (Definition -> m a) -> m a inConcreteOrAbstractMode q cont = do -- Andreas, 2015-07-01: If we do not ignoreAbstractMode here, -- we will get ConcreteDef for abstract things, as they are turned into axioms. def <- ignoreAbstractMode $ getConstInfo q case defAbstract def of AbstractDef -> inAbstractMode $ cont def ConcreteDef -> inConcreteMode $ cont def -- | Check whether a name might have to be treated abstractly (either if we're -- 'inAbstractMode' or it's not a local name). Returns true for things not -- declared abstract as well, but for those 'makeAbstract' will have no effect. treatAbstractly :: MonadTCEnv m => QName -> m Bool treatAbstractly q = asksTC $ treatAbstractly' q -- | Andreas, 2015-07-01: -- If the @current@ module is a weak suffix of the identifier module, -- we can see through its abstract definition if we are abstract. -- (Then @treatAbstractly'@ returns @False@). -- -- If I am not mistaken, then we cannot see definitions in the @where@ -- block of an abstract function from the perspective of the function, -- because then the current module is a strict prefix of the module -- of the local identifier. -- This problem is fixed by removing trailing anonymous module name parts -- (underscores) from both names. treatAbstractly' :: QName -> TCEnv -> Bool treatAbstractly' q env = case envAbstractMode env of ConcreteMode -> True IgnoreAbstractMode -> False AbstractMode -> not $ current == m || current `isSubModuleOf` m where current = dropAnon $ envCurrentModule env m = dropAnon $ qnameModule q dropAnon (MName ms) = MName $ List.dropWhileEnd isNoName ms -- | Get type of a constant, instantiated to the current context. {-# SPECIALIZE typeOfConst :: QName -> TCM Type #-} typeOfConst :: ( Functor m, HasConstInfo m, HasOptions m , ReadTCState m, MonadTCEnv m, MonadDebug m ) => QName -> m Type typeOfConst q = defType <$> (instantiateDef =<< getConstInfo q) -- | Get relevance of a constant. relOfConst :: QName -> TCM Relevance relOfConst q = defRelevance <$> getConstInfo q -- | Get modality of a constant. modalityOfConst :: QName -> TCM Modality modalityOfConst q = getModality . defArgInfo <$> getConstInfo q -- | The number of dropped parameters for a definition. -- 0 except for projection(-like) functions and constructors. droppedPars :: Definition -> Int droppedPars d = case theDef d of Axiom{} -> 0 DataOrRecSig{} -> 0 GeneralizableVar{} -> 0 def@Function{} -> projectionArgs def Datatype {dataPars = _} -> 0 -- not dropped Record {recPars = _} -> 0 -- not dropped Constructor{conPars = n} -> n Primitive{} -> 0 AbstractDefn{} -> __IMPOSSIBLE__ -- | Is it the name of a record projection? {-# SPECIALIZE isProjection :: QName -> TCM (Maybe Projection) #-} isProjection :: HasConstInfo m => QName -> m (Maybe Projection) isProjection qn = isProjection_ . theDef <$> getConstInfo qn isProjection_ :: Defn -> Maybe Projection isProjection_ def = case def of Function { funProjection = result } -> result _ -> Nothing -- | Is it a function marked STATIC? isStaticFun :: Defn -> Bool isStaticFun = (^. funStatic) -- | Is it a function marked INLINE? isInlineFun :: Defn -> Bool isInlineFun = (^. funInline) -- | Returns @True@ if we are dealing with a proper projection, -- i.e., not a projection-like function nor a record field value -- (projection applied to argument). isProperProjection :: Defn -> Bool isProperProjection d = caseMaybe (isProjection_ d) False $ \ isP -> if projIndex isP <= 0 then False else isJust $ projProper isP -- | Number of dropped initial arguments of a projection(-like) function. projectionArgs :: Defn -> Int projectionArgs = maybe 0 (max 0 . pred . projIndex) . isProjection_ -- | Check whether a definition uses copatterns. usesCopatterns :: QName -> TCM Bool usesCopatterns q = do d <- theDef <$> getConstInfo q return $ case d of Function{ funCopatternLHS = b } -> b _ -> False -- | Apply a function @f@ to its first argument, producing the proper -- postfix projection if @f@ is a projection. applyDef :: (HasConstInfo m) => ProjOrigin -> QName -> Arg Term -> m Term applyDef o f a = do let fallback = return $ Def f [Apply a] caseMaybeM (isProjection f) fallback $ \ isP -> do if projIndex isP <= 0 then fallback else do -- Get the original projection, if existing. if isNothing (projProper isP) then fallback else do return $ unArg a `applyE` [Proj o $ projOrig isP] Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Mutual.hs0000644000000000000000000000544613466402171020520 0ustar0000000000000000-- {-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Mutual where import Prelude hiding (null) import Control.Monad.Reader import Data.Functor ((<$>)) import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Map as Map import Agda.Syntax.Info as Info import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.State import Agda.Utils.Lens import Agda.Utils.Null import Agda.Utils.Pretty ( prettyShow ) noMutualBlock :: TCM a -> TCM a noMutualBlock = localTC $ \e -> e { envMutualBlock = Nothing } -- | Pass the current mutual block id -- or create a new mutual block if we are not already inside on. inMutualBlock :: (MutualId -> TCM a) -> TCM a inMutualBlock m = do mi <- asksTC envMutualBlock case mi of Nothing -> do i <- fresh localTC (\ e -> e { envMutualBlock = Just i }) $ m i -- Don't create a new mutual block if we're already inside one. Just i -> m i -- | Set the mutual block info for a block, -- possibly overwriting the existing one. setMutualBlockInfo :: MutualId -> Info.MutualInfo -> TCM () setMutualBlockInfo mi info = stMutualBlocks `modifyTCLens` Map.alter f mi where f Nothing = Just $ MutualBlock info empty f (Just (MutualBlock _ xs)) = Just $ MutualBlock info xs -- | Set the mutual block info for a block if non-existing. insertMutualBlockInfo :: MutualId -> Info.MutualInfo -> TCM () insertMutualBlockInfo mi info = stMutualBlocks `modifyTCLens` Map.alter f mi where f Nothing = Just $ MutualBlock info empty f (Just mb@(MutualBlock info0 xs)) | null info0 = Just $ MutualBlock info xs | otherwise = Just mb -- | Set the mutual block for a definition. setMutualBlock :: MutualId -> QName -> TCM () setMutualBlock i x = do stMutualBlocks `modifyTCLens` Map.alter f i stSignature `modifyTCLens` updateDefinition x (\ defn -> defn { defMutual = i }) where f Nothing = Just $ MutualBlock empty $ Set.singleton x f (Just (MutualBlock mi xs)) = Just $ MutualBlock mi $ Set.insert x xs -- | Get the current mutual block, if any, otherwise a fresh mutual -- block is returned. currentOrFreshMutualBlock :: TCM MutualId currentOrFreshMutualBlock = maybe fresh return =<< asksTC envMutualBlock lookupMutualBlock :: MutualId -> TCM MutualBlock lookupMutualBlock mi = do mbs <- useTC stMutualBlocks case Map.lookup mi mbs of Just mb -> return mb Nothing -> return empty -- can end up here if we ask for the current mutual block and there is none -- | Reverse lookup of a mutual block id for a names. mutualBlockOf :: QName -> TCM MutualId mutualBlockOf x = do mb <- Map.toList <$> useTC stMutualBlocks case filter (Set.member x . mutualNames . snd) mb of (i, _) : _ -> return i _ -> fail $ "No mutual block for " ++ prettyShow x Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Options.hs0000644000000000000000000003134713466402171020703 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Options where import Prelude hiding (mapM) import Control.Monad.Reader hiding (mapM) import Control.Monad.Writer import Control.Monad.State hiding (mapM) import Data.Maybe import Data.Traversable import System.Directory import System.FilePath import Agda.Syntax.Internal import Agda.Syntax.Common import Agda.Syntax.Concrete import {-# SOURCE #-} Agda.TypeChecking.Monad.Debug import {-# SOURCE #-} Agda.TypeChecking.Errors import Agda.TypeChecking.Warnings import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.Benchmark import {-# SOURCE #-} Agda.Interaction.FindFile import Agda.Interaction.Options import qualified Agda.Interaction.Options.Lenses as Lens import Agda.Interaction.Response import Agda.Interaction.Library import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.FileName import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Pretty import Agda.Utils.Trie (Trie) import qualified Agda.Utils.Trie as Trie import Agda.Utils.Except import Agda.Utils.Either #include "undefined.h" import Agda.Utils.Impossible -- | Sets the pragma options. setPragmaOptions :: PragmaOptions -> TCM () setPragmaOptions opts = do stPragmaOptions `modifyTCLens` Lens.mapSafeMode (Lens.getSafeMode opts ||) clo <- commandLineOptions let unsafe = unsafePragmaOptions opts -- when (Lens.getSafeMode clo && not (null unsafe)) $ warning $ SafeFlagPragma unsafe when (Lens.getSafeMode opts && not (null unsafe)) $ warning $ SafeFlagPragma unsafe ok <- liftIO $ runOptM $ checkOpts (clo { optPragmaOptions = opts }) case ok of Left err -> __IMPOSSIBLE__ Right opts -> do stPragmaOptions `setTCLens` optPragmaOptions opts updateBenchmarkingStatus -- | Sets the command line options (both persistent and pragma options -- are updated). -- -- Relative include directories are made absolute with respect to the -- current working directory. If the include directories have changed -- (thus, they are 'Left' now, and were previously @'Right' something@), -- then the state is reset (completely, see setIncludeDirs) . -- -- An empty list of relative include directories (@'Left' []@) is -- interpreted as @["."]@. setCommandLineOptions :: CommandLineOptions -> TCM () setCommandLineOptions opts = do root <- liftIO (absolute =<< getCurrentDirectory) setCommandLineOptions' root opts setCommandLineOptions' :: AbsolutePath -- ^ The base directory of relative paths. -> CommandLineOptions -> TCM () setCommandLineOptions' root opts = do z <- liftIO $ runOptM $ checkOpts opts case z of Left err -> __IMPOSSIBLE__ Right opts -> do incs <- case optAbsoluteIncludePaths opts of [] -> do opts' <- setLibraryPaths root opts let incs = optIncludePaths opts' setIncludeDirs incs root getIncludeDirs incs -> return incs modifyTC $ Lens.setCommandLineOptions opts{ optAbsoluteIncludePaths = incs } setPragmaOptions (optPragmaOptions opts) updateBenchmarkingStatus libToTCM :: LibM a -> TCM a libToTCM m = do (z, warns) <- liftIO $ runWriterT $ runExceptT m unless (null warns) $ warnings $ map LibraryWarning warns case z of Left s -> typeError $ GenericDocError s Right x -> return x setLibraryPaths :: AbsolutePath -- ^ The base directory of relative paths. -> CommandLineOptions -> TCM CommandLineOptions setLibraryPaths root o = setLibraryIncludes =<< addDefaultLibraries root o setLibraryIncludes :: CommandLineOptions -> TCM CommandLineOptions setLibraryIncludes o = do let libs = optLibraries o installed <- libToTCM $ getInstalledLibraries (optOverrideLibrariesFile o) paths <- libToTCM $ libraryIncludePaths (optOverrideLibrariesFile o) installed libs return o{ optIncludePaths = paths ++ optIncludePaths o } addDefaultLibraries :: AbsolutePath -- ^ The base directory of relative paths. -> CommandLineOptions -> TCM CommandLineOptions addDefaultLibraries root o | or [ not $ null $ optLibraries o , not $ optUseLibs o , optShowVersion o ] = pure o | otherwise = do (libs, incs) <- libToTCM $ getDefaultLibraries (filePath root) (optDefaultLibs o) return o{ optIncludePaths = incs ++ optIncludePaths o, optLibraries = libs } setOptionsFromPragma :: OptionsPragma -> TCM () setOptionsFromPragma ps = do opts <- commandLineOptions z <- liftIO $ runOptM (parsePragmaOptions ps opts) case z of Left err -> typeError $ GenericError err Right opts' -> setPragmaOptions opts' -- | Disable display forms. enableDisplayForms :: TCM a -> TCM a enableDisplayForms = localTC $ \e -> e { envDisplayFormsEnabled = True } -- | Disable display forms. disableDisplayForms :: TCM a -> TCM a disableDisplayForms = localTC $ \e -> e { envDisplayFormsEnabled = False } -- | Check if display forms are enabled. displayFormsEnabled :: TCM Bool displayFormsEnabled = asksTC envDisplayFormsEnabled -- | Gets the include directories. -- -- Precondition: 'optAbsoluteIncludePaths' must be nonempty (i.e. -- 'setCommandLineOptions' must have run). getIncludeDirs :: TCM [AbsolutePath] getIncludeDirs = do incs <- optAbsoluteIncludePaths <$> commandLineOptions case incs of [] -> __IMPOSSIBLE__ _ -> return incs -- | Makes the given directories absolute and stores them as include -- directories. -- -- If the include directories change, then the state is reset (completely, -- except for the include directories and 'stInteractionOutputCallback'). -- -- An empty list is interpreted as @["."]@. setIncludeDirs :: [FilePath] -- ^ New include directories. -> AbsolutePath -- ^ The base directory of relative paths. -> TCM () setIncludeDirs incs root = do -- save the previous include dirs oldIncs <- getsTC Lens.getAbsoluteIncludePaths -- Add the current dir if no include path is given incs <- return $ if null incs then ["."] else incs -- Make paths absolute incs <- return $ map (mkAbsolute . (filePath root )) incs -- Andreas, 2013-10-30 Add default include dir libdir <- liftIO $ defaultLibDir -- NB: This is an absolute file name, but -- Agda.Utils.FilePath wants to check absoluteness anyway. let primdir = mkAbsolute $ libdir "prim" -- We add the default dir at the end, since it is then -- printed last in error messages. -- Might also be useful to overwrite default imports... incs <- return $ incs ++ [primdir] reportSDoc "setIncludeDirs" 10 $ return $ vcat [ "Old include directories:" , nest 2 $ vcat $ map pretty oldIncs , "New include directories:" , nest 2 $ vcat $ map pretty incs ] -- Check whether the include dirs have changed. If yes, reset state. -- Andreas, 2013-10-30 comments: -- The logic, namely using the include-dirs variable as a driver -- for the interaction, qualifies for a code-obfuscation contest. -- I guess one Boolean more in the state cost 10.000 EUR at the time -- of this implementation... -- -- Andreas, perhaps you have misunderstood something: If the include -- directories have changed and we do not reset the decoded modules, -- then we might (depending on how the rest of the code works) end -- up in a situation in which we use the contents of the file -- "old-path/M.agda", when the user actually meant -- "new-path/M.agda". when (oldIncs /= incs) $ do ho <- getInteractionOutputCallback tcWarnings <- useTC stTCWarnings -- restore already generated warnings resetAllState setTCLens stTCWarnings tcWarnings setInteractionOutputCallback ho Lens.putAbsoluteIncludePaths incs setInputFile :: FilePath -> TCM () setInputFile file = do opts <- commandLineOptions setCommandLineOptions $ opts { optInputFile = Just file } -- | Should only be run if 'hasInputFile'. getInputFile :: TCM AbsolutePath getInputFile = fromMaybeM __IMPOSSIBLE__ $ getInputFile' -- | Return the 'optInputFile' as 'AbsolutePath', if any. getInputFile' :: TCM (Maybe AbsolutePath) getInputFile' = mapM (liftIO . absolute) =<< do optInputFile <$> commandLineOptions hasInputFile :: TCM Bool hasInputFile = isJust <$> optInputFile <$> commandLineOptions isPropEnabled :: HasOptions m => m Bool isPropEnabled = optProp <$> pragmaOptions {-# SPECIALIZE hasUniversePolymorphism :: TCM Bool #-} hasUniversePolymorphism :: HasOptions m => m Bool hasUniversePolymorphism = optUniversePolymorphism <$> pragmaOptions enableCaching :: TCM Bool enableCaching = optCaching <$> pragmaOptions showImplicitArguments :: TCM Bool showImplicitArguments = optShowImplicit <$> pragmaOptions showIrrelevantArguments :: TCM Bool showIrrelevantArguments = optShowIrrelevant <$> pragmaOptions -- | Switch on printing of implicit and irrelevant arguments. -- E.g. for reification in with-function generation. -- -- Restores all 'PragmaOptions' after completion. -- Thus, do not attempt to make persistent 'PragmaOptions' -- changes in a `withShowAllArguments` bracket. withShowAllArguments :: TCM a -> TCM a withShowAllArguments = withShowAllArguments' True withShowAllArguments' :: Bool -> TCM a -> TCM a withShowAllArguments' yes = withPragmaOptions $ \ opts -> opts { optShowImplicit = yes, optShowIrrelevant = yes } -- | Change 'PragmaOptions' for a computation and restore afterwards. withPragmaOptions :: (PragmaOptions -> PragmaOptions) -> TCM a -> TCM a withPragmaOptions f cont = do opts <- pragmaOptions setPragmaOptions $ f opts x <- cont setPragmaOptions opts return x ignoreInterfaces :: TCM Bool ignoreInterfaces = optIgnoreInterfaces <$> commandLineOptions ignoreAllInterfaces :: TCM Bool ignoreAllInterfaces = optIgnoreAllInterfaces <$> commandLineOptions positivityCheckEnabled :: TCM Bool positivityCheckEnabled = not . optDisablePositivity <$> pragmaOptions {-# SPECIALIZE typeInType :: TCM Bool #-} typeInType :: HasOptions m => m Bool typeInType = not . optUniverseCheck <$> pragmaOptions etaEnabled :: TCM Bool etaEnabled = optEta <$> pragmaOptions maxInstanceSearchDepth :: TCM Int maxInstanceSearchDepth = optInstanceSearchDepth <$> pragmaOptions maxInversionDepth :: TCM Int maxInversionDepth = optInversionMaxDepth <$> pragmaOptions ------------------------------------------------------------------------ -- Verbosity -- Invariant (which we may or may not currently break): Debug -- printouts use one of the following functions: -- -- reportS -- reportSLn -- reportSDoc -- | Retrieve the current verbosity level. {-# SPECIALIZE getVerbosity :: TCM (Trie String Int) #-} getVerbosity :: HasOptions m => m (Trie String Int) getVerbosity = optVerbose <$> pragmaOptions type VerboseKey = String parseVerboseKey :: VerboseKey -> [String] parseVerboseKey = wordsBy (`elem` (".:" :: String)) -- | Check whether a certain verbosity level is activated. -- -- Precondition: The level must be non-negative. {-# SPECIALIZE hasVerbosity :: VerboseKey -> Int -> TCM Bool #-} hasVerbosity :: HasOptions m => VerboseKey -> Int -> m Bool hasVerbosity k n | n < 0 = __IMPOSSIBLE__ | otherwise = do t <- getVerbosity let ks = parseVerboseKey k m = last $ 0 : Trie.lookupPath ks t return (n <= m) -- | Check whether a certain verbosity level is activated (exact match). {-# SPECIALIZE hasExactVerbosity :: VerboseKey -> Int -> TCM Bool #-} hasExactVerbosity :: HasOptions m => VerboseKey -> Int -> m Bool hasExactVerbosity k n = (Just n ==) . Trie.lookup (parseVerboseKey k) <$> getVerbosity -- | Run a computation if a certain verbosity level is activated (exact match). {-# SPECIALIZE whenExactVerbosity :: VerboseKey -> Int -> TCM () -> TCM () #-} whenExactVerbosity :: MonadTCM tcm => VerboseKey -> Int -> tcm () -> tcm () whenExactVerbosity k n = whenM $ liftTCM $ hasExactVerbosity k n -- | Run a computation if a certain verbosity level is activated. -- -- Precondition: The level must be non-negative. {-# SPECIALIZE verboseS :: VerboseKey -> Int -> TCM () -> TCM () #-} -- {-# SPECIALIZE verboseS :: MonadIO m => VerboseKey -> Int -> TCMT m () -> TCMT m () #-} -- RULE left-hand side too complicated to desugar {-# SPECIALIZE verboseS :: MonadTCM tcm => VerboseKey -> Int -> tcm () -> tcm () #-} verboseS :: (MonadTCEnv m, HasOptions m) => VerboseKey -> Int -> m () -> m () verboseS k n action = whenM (hasVerbosity k n) $ locallyTC eIsDebugPrinting (const True) action -- | Verbosity lens. verbosity :: VerboseKey -> Lens' Int TCState verbosity k = stPragmaOptions . verbOpt . Trie.valueAt (parseVerboseKey k) . defaultTo 0 where verbOpt :: Lens' (Trie String Int) PragmaOptions verbOpt f opts = f (optVerbose opts) <&> \ v -> opts { optVerbose = v } defaultTo :: Eq a => a -> Lens' a (Maybe a) defaultTo x f m = f (fromMaybe x m) <&> \ v -> if v == x then Nothing else Just v Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Benchmark.hs0000644000000000000000000000640013466402171021132 0ustar0000000000000000-- | Measure CPU time for individual phases of the Agda pipeline. module Agda.TypeChecking.Monad.Benchmark ( module Agda.Benchmarking , B.MonadBench , B.getBenchmark , updateBenchmarkingStatus , B.billTo, B.billPureTo, B.billToCPS , B.reset , print ) where import Prelude hiding (print) import Agda.Benchmarking import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import{-# SOURCE #-} Agda.TypeChecking.Monad.Options import qualified Agda.Utils.Benchmark as B import Agda.Utils.Monad import Agda.Utils.Pretty (prettyShow) benchmarkKey :: String benchmarkKey = "profile" benchmarkLevel :: Int benchmarkLevel = 7 benchmarkModulesKey :: String benchmarkModulesKey = "profile.modules" benchmarkModulesLevel :: Int benchmarkModulesLevel = 10 benchmarkDefsKey :: String benchmarkDefsKey = "profile.definitions" benchmarkDefsLevel :: Int benchmarkDefsLevel = 10 -- | When verbosity is set or changes, we need to turn benchmarking on or off. updateBenchmarkingStatus :: TCM () -- {-# SPECIALIZE updateBenchmarkingStatus :: TCM () #-} -- updateBenchmarkingStatus :: (HasOptions m, MonadBench a m) => m () updateBenchmarkingStatus = B.setBenchmarking =<< benchmarking -- | Check whether benchmarking is activated. {-# SPECIALIZE benchmarking :: TCM (B.BenchmarkOn Phase) #-} benchmarking :: MonadTCM tcm => tcm (B.BenchmarkOn Phase) benchmarking = liftTCM $ do -- Ulf, 2016-12-13: Using verbosity levels to control the type of -- benchmarking isn't ideal, but let's stick with it for now. internal <- hasVerbosity benchmarkKey benchmarkLevel defs <- hasVerbosity benchmarkDefsKey benchmarkDefsLevel modules <- hasVerbosity benchmarkModulesKey benchmarkModulesLevel return $ case (internal, defs, modules) of (True, _, _) -> B.BenchmarkSome isInternalAccount (_, True, _) -> B.BenchmarkSome isDefAccount (_, _, True) -> B.BenchmarkSome isModuleAccount _ -> B.BenchmarkOff -- | Prints the accumulated benchmark results. Does nothing if -- profiling is not activated at level 7. print :: MonadTCM tcm => tcm () print = liftTCM $ whenM (B.isBenchmarkOn [] <$> benchmarking) $ do b <- B.getBenchmark -- Andreas, 2017-07-29, issue #2602: -- The following line messes up the AgdaInfo buffer, -- thus, as Fredrik Forsberg suggest, I restore the original -- line for release 2.5.3 until a fix is found. -- reportSLn "" 0 $ prettyShow b reportSLn benchmarkKey benchmarkLevel $ prettyShow b -- -- | Bill a computation to a specific account. -- {-# SPECIALIZE billTo :: Account -> TCM a -> TCM a #-} -- billTo :: MonadTCM tcm => Account -> tcm a -> tcm a -- billTo account = lift1TCM $ B.billTo account -- Andreas, 2015-05-23 -- FAILS as lift1TCM :: (TCM a -> TCM b) -> tcm a -> tcm b -- cannot be implemented lazily in general. -- With `lazily` I mean that embedded IO computations in @tcm a@ are -- not executed, but passed on to @TCM a -> TCM b@ unevaluated. -- If they are treated strictly, then the whole benchmarking is inaccurate -- of course, as the computation is done before the clock is started. -- -- | Bill a pure computation to a specific account. -- {-# SPECIALIZE billPureTo :: Account -> a -> TCM a #-} -- billPureTo :: MonadTCM tcm => Account -> a -> tcm a -- billPureTo k a = billTo k $ return a Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Closure.hs0000644000000000000000000000134113466402171020653 0ustar0000000000000000module Agda.TypeChecking.Monad.Closure where import Control.Monad import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Env import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.Context import Agda.Utils.Lens enterClosure :: Closure a -> (a -> TCM b) -> TCM b enterClosure (Closure sig env scope cps x) k = do isDbg <- viewTC eIsDebugPrinting withScope_ scope $ locallyTCState stModuleCheckpoints (const cps) $ withEnv env{ envIsDebugPrinting = isDbg } $ k x withClosure :: Closure a -> (a -> TCM b) -> TCM (Closure b) withClosure cl k = enterClosure cl $ k >=> buildClosure mapClosure :: (a -> TCM b) -> Closure a -> TCM (Closure b) mapClosure k cl = enterClosure cl $ k >=> buildClosure Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Env.hs0000644000000000000000000001123213466402171017767 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Env where import Control.Monad.Reader import qualified Data.List as List import qualified Data.Map as Map import Data.Maybe (fromMaybe) import Data.Monoid import Agda.Syntax.Common import Agda.Syntax.Abstract.Name import Agda.TypeChecking.Monad.Base import Agda.Utils.FileName #include "undefined.h" import Agda.Utils.Impossible -- | Get the name of the current module, if any. {-# SPECIALIZE currentModule :: TCM ModuleName #-} {-# SPECIALIZE currentModule :: ReduceM ModuleName #-} currentModule :: MonadTCEnv m => m ModuleName currentModule = asksTC envCurrentModule -- | Set the name of the current module. withCurrentModule :: ModuleName -> TCM a -> TCM a withCurrentModule m = localTC $ \ e -> e { envCurrentModule = m } -- | Get the path of the currently checked file getCurrentPath :: MonadTCEnv m => m AbsolutePath getCurrentPath = fromMaybe __IMPOSSIBLE__ <$> asksTC envCurrentPath -- | Get the number of variables bound by anonymous modules. {-# SPECIALIZE getAnonymousVariables :: ModuleName -> TCM Nat #-} {-# SPECIALIZE getAnonymousVariables :: ModuleName -> ReduceM Nat #-} getAnonymousVariables :: MonadTCEnv m => ModuleName -> m Nat getAnonymousVariables m = do ms <- asksTC envAnonymousModules return $ sum [ n | (m', n) <- ms, mnameToList m' `List.isPrefixOf` mnameToList m ] -- | Add variables bound by an anonymous module. withAnonymousModule :: ModuleName -> Nat -> TCM a -> TCM a withAnonymousModule m n = localTC $ \ e -> e { envAnonymousModules = (m, n) : envAnonymousModules e } -- | Set the current environment to the given withEnv :: TCEnv -> TCM a -> TCM a withEnv env = localTC $ \ env0 -> env -- Keep persistent settings { envPrintMetasBare = envPrintMetasBare env0 } -- | Get the current environment getEnv :: TCM TCEnv getEnv = askTC -- | Increases the module nesting level by one in the given -- computation. withIncreasedModuleNestingLevel :: TCM a -> TCM a withIncreasedModuleNestingLevel = localTC $ \ e -> e { envModuleNestingLevel = envModuleNestingLevel e + 1 } -- | Set highlighting level withHighlightingLevel :: HighlightingLevel -> TCM a -> TCM a withHighlightingLevel h = localTC $ \ e -> e { envHighlightingLevel = h } withoutOptionsChecking :: TCM a -> TCM a withoutOptionsChecking = localTC $ \ e -> e { envCheckOptionConsistency = False } -- | Restore setting for 'ExpandLast' to default. doExpandLast :: TCM a -> TCM a doExpandLast = localTC $ \ e -> e { envExpandLast = ExpandLast } dontExpandLast :: TCM a -> TCM a dontExpandLast = localTC $ \ e -> e { envExpandLast = DontExpandLast } -- | If the reduced did a proper match (constructor or literal pattern), -- then record this as simplification step. {-# SPECIALIZE performedSimplification :: TCM a -> TCM a #-} performedSimplification :: MonadTCEnv m => m a -> m a performedSimplification = localTC $ \ e -> e { envSimplification = YesSimplification } {-# SPECIALIZE performedSimplification' :: Simplification -> TCM a -> TCM a #-} performedSimplification' :: MonadTCEnv m => Simplification -> m a -> m a performedSimplification' simpl = localTC $ \ e -> e { envSimplification = simpl `mappend` envSimplification e } getSimplification :: MonadTCEnv m => m Simplification getSimplification = asksTC envSimplification -- * Controlling reduction. -- | Lens for 'AllowedReductions'. updateAllowedReductions :: (AllowedReductions -> AllowedReductions) -> TCEnv -> TCEnv updateAllowedReductions f e = e { envAllowedReductions = f (envAllowedReductions e) } modifyAllowedReductions :: (AllowedReductions -> AllowedReductions) -> TCM a -> TCM a modifyAllowedReductions = localTC . updateAllowedReductions putAllowedReductions :: AllowedReductions -> TCM a -> TCM a putAllowedReductions = modifyAllowedReductions . const -- | Reduce @Def f vs@ only if @f@ is a projection. onlyReduceProjections :: TCM a -> TCM a onlyReduceProjections = putAllowedReductions [ProjectionReductions] -- | Allow all reductions except for non-terminating functions (default). allowAllReductions :: TCM a -> TCM a allowAllReductions = putAllowedReductions allReductions -- | Allow all reductions including non-terminating functions. allowNonTerminatingReductions :: TCM a -> TCM a allowNonTerminatingReductions = putAllowedReductions $ [NonTerminatingReductions] ++ allReductions -- * Concerning 'envInsideDotPattern' insideDotPattern :: TCM a -> TCM a insideDotPattern = localTC $ \ e -> e { envInsideDotPattern = True } isInsideDotPattern :: TCM Bool isInsideDotPattern = asksTC envInsideDotPattern -- | Don't use call-by-need evaluation for the given computation. callByName :: TCM a -> TCM a callByName = localTC $ \ e -> e { envCallByNeed = False } Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Caching.hs0000644000000000000000000001042413466402171020575 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Caching ( -- * Log reading/writing operations writeToCurrentLog , readFromCachedLog , cleanCachedLog , cacheCurrentLog -- * Activating/deactivating , activateLoadedFileCache , cachingStarts , areWeCaching , withoutCache -- * Restoring the 'PostScopeState' , restorePostScopeState ) where import Control.Monad.State import qualified Data.Map as Map import Agda.Syntax.Common import Agda.Interaction.Options import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import {-# SOURCE #-} Agda.TypeChecking.Monad.Options import Agda.Utils.Lens import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible -- | To be called before any write or restore calls. cachingStarts :: TCM () cachingStarts = do NameId _ m <- useTC stFreshNameId stFreshNameId `setTCLens` NameId 1 m stAreWeCaching `setTCLens` True areWeCaching :: TCM Bool areWeCaching = useTC stAreWeCaching -- | Writes a 'TypeCheckAction' to the current log, using the current -- 'PostScopeState' writeToCurrentLog :: TypeCheckAction -> TCM () writeToCurrentLog !d = do reportSLn "cache" 10 $ "cachePostScopeState" !l <- getsTC stPostScopeState modifyCache $ fmap $ \lfc -> lfc{ lfcCurrent = (d, l) : lfcCurrent lfc} restorePostScopeState :: PostScopeState -> TCM () restorePostScopeState pss = do reportSLn "cache" 10 $ "restorePostScopeState" modifyTC $ \s -> let ipoints = s^.stInteractionPoints ws = s^.stTCWarnings pss' = pss{stPostInteractionPoints = stPostInteractionPoints pss `mergeIPMap` ipoints ,stPostTCWarnings = stPostTCWarnings pss `mergeWarnings` ws } in s{stPostScopeState = pss'} where mergeIPMap lm sm = Map.mapWithKey (\k v -> maybe v (`mergeIP` v) (Map.lookup k lm)) sm -- see #1338 on why we need to use the new ranges. mergeIP li si = li { ipRange = ipRange si } mergeWarnings loading current = [ w | w <- current, not $ tcWarningCached w ] ++ [ w | w <- loading, tcWarningCached w ] modifyCache :: (Maybe LoadedFileCache -> Maybe LoadedFileCache) -> TCM () modifyCache f = do modifyTC $ \s -> let !p = stPersistentState s in s { stPersistentState = p { stLoadedFileCache = f (stLoadedFileCache p)} } getCache :: TCM (Maybe LoadedFileCache) getCache = do getsTC (stLoadedFileCache . stPersistentState) putCache :: Maybe LoadedFileCache -> TCM () putCache cs = modifyCache $ const cs -- | Runs the action without cache and restores the current cache at -- the end of it. withoutCache :: TCM a -> TCM a withoutCache m = bracket_ getCache putCache $ do modifyCache (const Nothing) m -- | Reads the next entry in the cached type check log, if present. readFromCachedLog :: TCM (Maybe (TypeCheckAction, PostScopeState)) readFromCachedLog = do reportSLn "cache" 10 $ "getCachedTypeCheckAction" mbCache <- getCache case mbCache of Just lfc | (entry : entries) <- lfcCached lfc -> do putCache $ Just lfc{lfcCached = entries} return (Just entry) _ -> do return Nothing -- | Empties the "to read" CachedState. To be used when it gets invalid. cleanCachedLog :: TCM () cleanCachedLog = do reportSLn "cache" 10 $ "cleanCachedLog" modifyCache $ fmap $ \lfc -> lfc{lfcCached = []} -- | Makes sure that the 'stLoadedFileCache' is 'Just', with a clean -- current log. Crashes is 'stLoadedFileCache' is already active with a -- dirty log. Should be called when we start typechecking the current -- file. activateLoadedFileCache :: TCM () activateLoadedFileCache = do reportSLn "cache" 10 $ "activateLoadedFileCache" whenM (optGHCiInteraction <$> commandLineOptions) $ whenM enableCaching $ do modifyCache $ \case Nothing -> Just $ LoadedFileCache [] [] Just lfc | null (lfcCurrent lfc) -> Just lfc _ -> __IMPOSSIBLE__ -- | Caches the current type check log. Discardes the old cache. Does -- nothing if caching is inactive. cacheCurrentLog :: TCM () cacheCurrentLog = do reportSLn "cache" 10 $ "cacheCurrentTypeCheckLog" modifyCache $ fmap $ \lfc -> lfc{lfcCached = reverse (lfcCurrent lfc), lfcCurrent = []} Agda-2.6.0.1/src/full/Agda/TypeChecking/Monad/Imports.hs0000644000000000000000000000617013466402171020701 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Monad.Imports where import Control.Monad.State import Control.Monad.Reader import Data.Set (Set) import qualified Data.Map as Map import qualified Data.Set as Set import Agda.Syntax.Abstract.Name import qualified Agda.Syntax.Concrete.Name as C import Agda.TypeChecking.Monad.Base import Agda.Utils.Lens import Agda.Utils.List ( caseListM ) import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible addImport :: ModuleName -> TCM () addImport m = modifyTCLens stImportedModules $ Set.insert m addImportCycleCheck :: C.TopLevelModuleName -> TCM a -> TCM a addImportCycleCheck m = localTC $ \e -> e { envImportPath = m : envImportPath e } getImports :: TCM (Set ModuleName) getImports = useTC stImportedModules isImported :: ModuleName -> TCM Bool isImported m = Set.member m <$> getImports getImportPath :: TCM [C.TopLevelModuleName] getImportPath = asksTC envImportPath visitModule :: ModuleInfo -> TCM () visitModule mi = modifyTCLens stVisitedModules $ Map.insert (toTopLevelModuleName $ iModuleName $ miInterface mi) mi setVisitedModules :: VisitedModules -> TCM () setVisitedModules ms = setTCLens stVisitedModules ms getVisitedModules :: TCM VisitedModules getVisitedModules = useTC stVisitedModules isVisited :: C.TopLevelModuleName -> TCM Bool isVisited x = Map.member x <$> useTC stVisitedModules getVisitedModule :: C.TopLevelModuleName -> TCM (Maybe ModuleInfo) getVisitedModule x = Map.lookup x <$> useTC stVisitedModules mapVisitedModule :: C.TopLevelModuleName -> (ModuleInfo -> ModuleInfo) -> TCM () mapVisitedModule x f = modifyTCLens stVisitedModules (Map.adjust f x) getDecodedModules :: TCM DecodedModules getDecodedModules = stDecodedModules . stPersistentState <$> getTC setDecodedModules :: DecodedModules -> TCM () setDecodedModules ms = modifyTC $ \s -> s { stPersistentState = (stPersistentState s) { stDecodedModules = ms } } getDecodedModule :: C.TopLevelModuleName -> TCM (Maybe Interface) getDecodedModule x = Map.lookup x . stDecodedModules . stPersistentState <$> getTC storeDecodedModule :: Interface -> TCM () storeDecodedModule i = modifyTC $ \s -> s { stPersistentState = (stPersistentState s) { stDecodedModules = Map.insert (toTopLevelModuleName $ iModuleName i) i $ (stDecodedModules $ stPersistentState s) } } dropDecodedModule :: C.TopLevelModuleName -> TCM () dropDecodedModule x = modifyTC $ \s -> s { stPersistentState = (stPersistentState s) { stDecodedModules = Map.delete x $ stDecodedModules $ stPersistentState s } } withImportPath :: [C.TopLevelModuleName] -> TCM a -> TCM a withImportPath path = localTC $ \e -> e { envImportPath = path } -- | Assumes that the first module in the import path is the module we are -- worried about. checkForImportCycle :: TCM () checkForImportCycle = do caseListM getImportPath __IMPOSSIBLE__ $ \ m ms -> do when (m `elem` ms) $ typeError $ CyclicModuleDependency $ dropWhile (/= m) $ reverse (m:ms) Agda-2.6.0.1/src/full/Agda/TypeChecking/Coverage/0000755000000000000000000000000013466402171017401 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Coverage/Match.hs0000644000000000000000000004334313466402171021000 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Coverage.Match ( Match(..), match , SplitPattern, SplitPatVar(..), fromSplitPatterns, toSplitPatterns , toSplitPSubst, applySplitPSubst , isTrivialPattern , BlockingVar(..), BlockingVars, BlockedOnResult(..) , setBlockingVarOverlap , ApplyOrIApply(..) ) where import Control.Monad.State import Prelude hiding ( null ) import qualified Data.List as List import Data.Maybe (mapMaybe, isJust, fromMaybe) import Data.Monoid ( Monoid, mempty, mappend, mconcat ) import Data.Semigroup ( Semigroup, (<>), Any(..) ) import Data.Traversable (traverse) import Agda.Syntax.Abstract (IsProjP(..)) import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern () import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Pretty ( PrettyTCM(..) ) import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty ( Pretty(..), text, (<+>), cat , prettyList_ ) import qualified Agda.Utils.Pretty as P import Agda.Utils.Size import Agda.Utils.List import Agda.Utils.Monad #include "undefined.h" import Agda.Utils.Impossible {-| Given 1. the function clauses @cs@ 2. the patterns @ps@ we want to compute a variable index of the split clause to split on next. First, we find the set @cs'@ of all the clauses that are instances (via substitutions @rhos@) of the split clause. In these substitutions, we look for a column that has only constructor patterns. We try to split on this column first. -} type SplitAssignment = (Nat,SplitPattern) -- | Match the given patterns against a list of clauses match :: (MonadReduce m , HasConstInfo m , HasBuiltins m) => [Clause] -> [NamedArg SplitPattern] -> m (Match (Nat,[SplitAssignment])) match cs ps = foldr choice (return No) $ zipWith matchIt [0..] cs where matchIt :: (MonadReduce m , HasConstInfo m , HasBuiltins m) => Nat -> Clause -> m (Match (Nat,[SplitAssignment])) matchIt i c = fmap (i,) <$> matchClause ps c -- | For each variable in the patterns of a split clause, we remember the -- de Bruijn-index and the literals excluded by previous matches. data SplitPatVar = SplitPatVar { splitPatVarName :: PatVarName , splitPatVarIndex :: Int , splitExcludedLits :: [Literal] } deriving (Show) instance Pretty SplitPatVar where prettyPrec _ x = (text $ patVarNameToString (splitPatVarName x)) P.<> (text $ "@" ++ show (splitPatVarIndex x)) P.<> (ifNull (splitExcludedLits x) empty $ \lits -> "\\{" P.<> prettyList_ lits P.<> "}") instance PrettyTCM SplitPatVar where prettyTCM = prettyTCM . var . splitPatVarIndex type SplitPattern = Pattern' SplitPatVar toSplitVar :: DBPatVar -> SplitPatVar toSplitVar x = SplitPatVar (dbPatVarName x) (dbPatVarIndex x) [] fromSplitVar :: SplitPatVar -> DBPatVar fromSplitVar x = DBPatVar (splitPatVarName x) (splitPatVarIndex x) instance DeBruijn SplitPatVar where deBruijnView x = deBruijnView (fromSplitVar x) debruijnNamedVar n i = toSplitVar (debruijnNamedVar n i) toSplitPatterns :: [NamedArg DeBruijnPattern] -> [NamedArg SplitPattern] toSplitPatterns = (fmap . fmap . fmap . fmap) toSplitVar fromSplitPatterns :: [NamedArg SplitPattern] -> [NamedArg DeBruijnPattern] fromSplitPatterns = (fmap . fmap . fmap . fmap) fromSplitVar instance DeBruijn SplitPattern where debruijnNamedVar n i = varP $ SplitPatVar n i [] deBruijnView _ = Nothing type SplitPSubstitution = Substitution' SplitPattern toSplitPSubst :: PatternSubstitution -> SplitPSubstitution toSplitPSubst = (fmap . fmap) toSplitVar fromSplitPSubst :: SplitPSubstitution -> PatternSubstitution fromSplitPSubst = (fmap . fmap) fromSplitVar applySplitPSubst :: (Subst Term a) => SplitPSubstitution -> a -> a applySplitPSubst = applyPatSubst . fromSplitPSubst -- TODO: merge this instance and the one for DeBruijnPattern in -- Substitute.hs into one for Subst (Pattern' a) (Pattern' a). instance Subst SplitPattern SplitPattern where applySubst IdS p = p applySubst rho p = case p of VarP o x -> usePatOrigin o $ useName (splitPatVarName x) $ useExcludedLits (splitExcludedLits x) $ lookupS rho $ splitPatVarIndex x DotP o u -> DotP o $ applySplitPSubst rho u ConP c ci ps -> ConP c ci $ applySubst rho ps DefP o q ps -> DefP o q $ applySubst rho ps LitP x -> p ProjP{} -> p IApplyP o l r x -> useEndPoints (applySplitPSubst rho l) (applySplitPSubst rho r) $ usePatOrigin o $ useName (splitPatVarName x) $ useExcludedLits (splitExcludedLits x) $ lookupS rho $ splitPatVarIndex x where -- see Subst for DeBruijnPattern useEndPoints :: Term -> Term -> SplitPattern -> SplitPattern useEndPoints l r (VarP o x) = IApplyP o l r x useEndPoints l r (IApplyP o _ _ x) = IApplyP o l r x useEndPoints l r x = __IMPOSSIBLE__ useName :: PatVarName -> SplitPattern -> SplitPattern useName n (VarP o x) | isUnderscore (splitPatVarName x) = VarP o $ x { splitPatVarName = n } useName _ x = x useExcludedLits :: [Literal] -> SplitPattern -> SplitPattern useExcludedLits lits = \case (VarP o x) -> VarP o $ x { splitExcludedLits = lits ++ splitExcludedLits x } p -> p -- | A pattern that matches anything (modulo eta). isTrivialPattern :: (HasConstInfo m) => Pattern' a -> m Bool isTrivialPattern p = case p of VarP{} -> return True DotP{} -> return True ConP c i ps -> andM $ (isEtaCon $ conName c) : (map (isTrivialPattern . namedArg) ps) DefP{} -> return False LitP{} -> return False ProjP{} -> return False IApplyP{} -> return True -- | If matching succeeds, we return the instantiation of the clause pattern vector -- to obtain the split clause pattern vector. type MatchResult = Match [SplitAssignment] -- | If matching is inconclusive (@Block@) we want to know which -- variables or projections are blocking the match. data Match a = Yes a -- ^ Matches unconditionally. | No -- ^ Definitely does not match. | Block { blockedOnResult :: BlockedOnResult -- ^ @BlockedOnProj o@ if the clause has a result split , blockedOnVars :: BlockingVars -- ^ @BlockingVar i cs ls o@ means variable @i@ is blocked on -- constructors @cs@ and literals @ls@. } deriving (Functor) data ApplyOrIApply = IsApply | IsIApply data BlockedOnResult = BlockedOnProj -- ^ Blocked on unsplit projection { blockedOnResultOverlap :: Bool -- ^ True if there are also matching clauses without an unsplit -- copattern. } | BlockedOnApply -- ^ Blocked on unintroduced argument { blockedOnResultIApply :: ApplyOrIApply -- ^ True if the unintroduced argument was an IApply pattern } | NotBlockedOnResult -- | Variable blocking a match. data BlockingVar = BlockingVar { blockingVarNo :: Nat -- ^ De Bruijn index of variable blocking the match. , blockingVarCons :: [ConHead] -- ^ Constructors in this position. , blockingVarLits :: [Literal] -- ^ Literals in this position. , blockingVarOverlap :: Bool -- ^ True if at least one clause has a variable pattern in this -- position. } deriving (Show) instance Pretty BlockingVar where pretty (BlockingVar i cs ls o) = cat [ text ("variable " ++ show i) , if null cs then empty else " blocked on constructors" <+> pretty cs , if null ls then empty else " blocked on literals" <+> pretty ls , if o then " (overlapping)" else empty ] type BlockingVars = [BlockingVar] yes :: Monad m => a -> m (Match a) yes = return . Yes no :: Monad m => m (Match a) no = return No blockedOnConstructor :: Monad m => Nat -> ConHead -> m (Match a) blockedOnConstructor i c = return $ Block NotBlockedOnResult [BlockingVar i [c] [] False] blockedOnLiteral :: Monad m => Nat -> Literal -> m (Match a) blockedOnLiteral i l = return $ Block NotBlockedOnResult [BlockingVar i [] [l] False] blockedOnProjection :: Monad m => m (Match a) blockedOnProjection = return $ Block (BlockedOnProj False) [] blockedOnApplication :: Monad m => ApplyOrIApply -> m (Match a) blockedOnApplication b = return $ Block (BlockedOnApply b) [] -- | Lens for 'blockingVarCons'. mapBlockingVarCons :: ([ConHead] -> [ConHead]) -> BlockingVar -> BlockingVar mapBlockingVarCons f b = b { blockingVarCons = f (blockingVarCons b) } -- | Lens for 'blockingVarLits'. mapBlockingVarLits :: ([Literal] -> [Literal]) -> BlockingVar -> BlockingVar mapBlockingVarLits f b = b { blockingVarLits = f (blockingVarLits b) } setBlockingVarOverlap :: BlockingVar -> BlockingVar setBlockingVarOverlap = \x -> x { blockingVarOverlap = True } overlapping :: BlockingVars -> BlockingVars overlapping = map setBlockingVarOverlap -- | Left dominant merge of blocking vars. zipBlockingVars :: BlockingVars -> BlockingVars -> BlockingVars zipBlockingVars xs ys = map upd xs where upd (BlockingVar x cons lits o) = case List.find ((x ==) . blockingVarNo) ys of Just (BlockingVar _ cons' lits' o') -> BlockingVar x (cons ++ cons') (lits ++ lits') (o || o') Nothing -> BlockingVar x cons lits True setBlockedOnResultOverlap :: BlockedOnResult -> BlockedOnResult setBlockedOnResultOverlap b = case b of BlockedOnProj{} -> b { blockedOnResultOverlap = True } BlockedOnApply{} -> b NotBlockedOnResult{} -> b anyBlockedOnResult :: BlockedOnResult -> BlockedOnResult -> BlockedOnResult anyBlockedOnResult b1 b2 = case (b1,b2) of (NotBlockedOnResult , b2 ) -> b2 (b1 , NotBlockedOnResult) -> b1 (_ , _ ) -> __IMPOSSIBLE__ -- | Left dominant merge of `BlockedOnResult`. choiceBlockedOnResult :: BlockedOnResult -> BlockedOnResult -> BlockedOnResult choiceBlockedOnResult b1 b2 = case (b1,b2) of (NotBlockedOnResult , _ ) -> NotBlockedOnResult (BlockedOnProj _ , NotBlockedOnResult) -> BlockedOnProj True (BlockedOnProj o1 , BlockedOnProj o2 ) -> BlockedOnProj (o1 || o2) (BlockedOnProj o1 , BlockedOnApply{} ) -> BlockedOnProj True (BlockedOnApply b , _ ) -> BlockedOnApply b -- | @choice m m'@ combines the match results @m@ of a function clause -- with the (already combined) match results $m'$ of the later clauses. -- It is for skipping clauses that definitely do not match ('No'). -- It is left-strict, to be used with @foldr@. -- If one clause unconditionally matches ('Yes') we do not look further. choice :: Monad m => m (Match a) -> m (Match a) -> m (Match a) choice m m' = m >>= \case Yes a -> yes a Block r xs -> m' >>= \case Block s ys -> return $ Block (choiceBlockedOnResult r s) $ zipBlockingVars xs ys Yes _ -> return $ Block (setBlockedOnResultOverlap r) $ overlapping xs No -> return $ Block r xs No -> m' -- | @matchClause qs i c@ checks whether clause @c@ -- covers a split clause with patterns @qs@. matchClause :: (MonadReduce m , HasConstInfo m , HasBuiltins m) => [NamedArg SplitPattern] -- ^ Split clause patterns @qs@. -> Clause -- ^ Clause @c@ to cover split clause. -> m MatchResult -- ^ Result. -- If 'Yes' the instantiation @rs@ such that @(namedClausePats c)[rs] == qs@. matchClause qs c = matchPats (namedClausePats c) qs -- | @matchPats ps qs@ checks whether a function clause with patterns -- @ps@ covers a split clause with patterns @qs@. -- -- Issue #842 / #1986: This is accepted: -- @ -- F : Bool -> Set1 -- F true = Set -- F = \ x -> Set -- @ -- For the second clause, the split clause is @F false@, -- so there are more patterns in the split clause than -- in the considered clause. These additional patterns -- are simply dropped by @zipWith@. This will result -- in @mconcat []@ which is @Yes []@. matchPats :: (MonadReduce m , HasConstInfo m , HasBuiltins m, DeBruijn a) => [NamedArg (Pattern' a)] -- ^ Clause pattern vector @ps@ (to cover split clause pattern vector). -> [NamedArg SplitPattern] -- ^ Split clause pattern vector @qs@ (to be covered by clause pattern vector). -> m MatchResult -- ^ Result. -- If 'Yes' the instantiation @rs@ such that @ps[rs] == qs@. matchPats [] [] = yes [] matchPats (p:ps) (q:qs) = matchPat (namedArg p) (namedArg q) `combine` matchPats ps qs -- Patterns left in split clause: -- Andreas, 2016-06-03, issue #1986: -- catch-all for copatterns is inconsistent as found by Ulf. -- Thus, if the split clause has copatterns left, -- the current (shorter) clause is not considered covering. matchPats [] qs@(_:_) = case mapMaybe isProjP qs of [] -> yes [] -- no proj. patterns left _ -> no -- proj. patterns left -- Patterns left in candidate clause: -- If the current clause has additional copatterns in -- comparison to the split clause, we should split on them. matchPats (p:ps) [] = case isProjP p of Just{} -> blockedOnProjection Nothing -> blockedOnApplication (case namedArg p of IApplyP{} -> IsIApply; _ -> IsApply) -- | Combine results of checking whether function clause patterns -- covers split clause patterns. -- -- 'No' is dominant: if one function clause pattern is disjoint to -- the corresponding split clause pattern, then -- the whole clauses are disjoint. -- -- 'Yes' is neutral: for a match, all patterns have to match. -- -- 'Block' accumulates variables of the split clause -- that have to be instantiated (an projection names of copattern matches) -- to make the split clause an instance of the function clause. combine :: (Monad m, Semigroup a) => m (Match a) -> m (Match a) -> m (Match a) combine m m' = m >>= \case Yes a -> m' >>= \case Yes b -> yes (a <> b) y -> return y No -> no x@(Block r xs) -> m' >>= \case No -> no Block s ys -> return $ Block (anyBlockedOnResult r s) (xs ++ ys) Yes{} -> return x -- | @matchPat p q@ checks whether a function clause pattern @p@ -- covers a split clause pattern @q@. There are three results: -- @Yes rs@ means it covers, because @p@ is a variable pattern. @rs@ collects -- the instantiations of the variables in @p@ s.t. @p[rs] = q@. -- @No@ means it does not cover. -- @Block [x]@ means @p@ is a proper instance of @q@ and could become -- a cover if @q@ was split on variable @x@. -- @BlockLit [x] means @p@ is a proper instance of @q@ and could become -- a cover if variable @x@ is instantiated with an appropriate literal. matchPat :: (MonadReduce m , HasConstInfo m , HasBuiltins m, DeBruijn a) => Pattern' a -- ^ Clause pattern @p@ (to cover split clause pattern). -> SplitPattern -- ^ Split clause pattern @q@ (to be covered by clause pattern). -> m MatchResult -- ^ Result. -- If 'Yes', also the instantiation @rs@ of the clause pattern variables -- to produce the split clause pattern, @p[rs] = q@. matchPat p q = case p of VarP _ x -> yes [(fromMaybe __IMPOSSIBLE__ (deBruijnView x),q)] DotP{} -> yes [] -- Jesper, 2014-11-04: putting 'Yes [q]' here triggers issue 1333. -- Not checking for trivial patterns should be safe here, as dot patterns are -- guaranteed to match if the rest of the pattern does, so some extra splitting -- on them doesn't change the reduction behaviour. p@(LitP l) -> case q of VarP _ x -> if l `elem` splitExcludedLits x then no else blockedOnLiteral (splitPatVarIndex x) l _ -> isLitP q >>= \case Just l' -> if l == l' then yes [] else no Nothing -> no ProjP _ d -> case q of ProjP _ d' -> do d <- getOriginalProjection d if d == d' then yes [] else no _ -> __IMPOSSIBLE__ IApplyP _ _ _ x -> yes [(fromMaybe __IMPOSSIBLE__ (deBruijnView x),q)] ConP c _ ps -> unDotP q >>= \case VarP _ x -> blockedOnConstructor (splitPatVarIndex x) c ConP c' i qs | c == c' -> matchPats ps qs | otherwise -> no DotP o t -> no LitP l -> isLitP p >>= \case Just l' -> if l == l' then yes [] else no Nothing -> no DefP{} -> no ProjP{} -> __IMPOSSIBLE__ -- excluded by typing IApplyP _ _ _ x -> blockedOnConstructor (splitPatVarIndex x) c (DefP o c ps) -> unDotP q >>= \case VarP _ x -> __IMPOSSIBLE__ -- blockedOnConstructor (splitPatVarIndex x) c ConP c' i qs -> no DotP o t -> no LitP _ -> no DefP o c' qs | c == c' -> matchPats ps qs | otherwise -> no ProjP{} -> __IMPOSSIBLE__ -- excluded by typing IApplyP _ _ _ x -> __IMPOSSIBLE__ --blockedOnConstructor (splitPatVarIndex x) c -- unfold one level of a dot pattern to a proper pattern if possible unDotP :: (MonadReduce m, DeBruijn (Pattern' a)) => Pattern' a -> m (Pattern' a) unDotP (DotP o v) = reduce v >>= \case Var i [] -> return $ deBruijnVar i Con c _ vs -> do let ps = map (fmap $ unnamed . DotP o) $ fromMaybe __IMPOSSIBLE__ $ allApplyElims vs return $ ConP c noConPatternInfo ps Lit l -> return $ LitP l v -> return $ dotP v unDotP p = return p isLitP :: (MonadReduce m, HasBuiltins m) => Pattern' a -> m (Maybe Literal) isLitP (LitP l) = return $ Just l isLitP (DotP _ u) = reduce u >>= \case Lit l -> return $ Just l _ -> return $ Nothing isLitP (ConP c ci []) = do Con zero _ [] <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinZero if | c == zero -> return $ Just $ LitNat (getRange c) 0 | otherwise -> return Nothing isLitP (ConP c ci [a]) | visible a && isRelevant a = do Con suc _ [] <- fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinSuc if | c == suc -> fmap inc <$> isLitP (namedArg a) | otherwise -> return Nothing where inc :: Literal -> Literal inc (LitNat r n) = LitNat (fuseRange c r) $ n + 1 inc _ = __IMPOSSIBLE__ isLitP _ = return Nothing Agda-2.6.0.1/src/full/Agda/TypeChecking/Coverage/SplitTree.hs0000644000000000000000000000725613466402171021662 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-| Split tree for transforming pattern clauses into case trees. The coverage checker generates a split tree from the clauses. The clause compiler uses it to transform clauses to case trees. The initial problem is a set of clauses. The root node designates on which argument to split and has subtrees for all the constructors. Splitting continues until there is only a single clause left at each leaf of the split tree. -} module Agda.TypeChecking.Coverage.SplitTree where import Data.Tree import Data.Data (Data, toConstr) import Agda.Syntax.Abstract.Name import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Utils.Monad import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible type SplitTree = SplitTree' SplitTag type SplitTrees = SplitTrees' SplitTag -- | Abstract case tree shape. data SplitTree' a = -- | No more splits coming. We are at a single, all-variable -- clause. SplittingDone { splitBindings :: Int -- ^ The number of variables bound in the clause } | -- | A split is necessary. SplitAt { splitArg :: Arg Int -- ^ Arg. no to split at. , splitTrees :: SplitTrees' a -- ^ Sub split trees. } deriving (Data, Show) -- | Split tree branching. A finite map from constructor names to splittrees -- A list representation seems appropriate, since we are expecting not -- so many constructors per data type, and there is no need for -- random access. type SplitTrees' a = [(a, SplitTree' a)] -- | Tag for labeling branches of a split tree. Each branch is associated to -- either a constructor or a literal, or is a catchall branch (currently -- only used for splitting on a literal type). data SplitTag = SplitCon QName | SplitLit Literal | SplitCatchall deriving (Show, Eq, Ord, Data) instance Pretty SplitTag where pretty (SplitCon c) = pretty c pretty (SplitLit l) = pretty l pretty SplitCatchall = underscore -- * Printing a split tree data SplitTreeLabel a = SplitTreeLabel { lblConstructorName :: Maybe a -- ^ 'Nothing' for root of split tree , lblSplitArg :: Maybe (Arg Int) , lblBindings :: Maybe Int } instance Pretty a => Pretty (SplitTreeLabel a) where pretty = \case SplitTreeLabel Nothing Nothing (Just n) -> text $ "done, " ++ prettyShow n ++ " bindings" SplitTreeLabel Nothing (Just n) Nothing -> text $ "split at " ++ prettyShow n SplitTreeLabel (Just q) Nothing (Just n) -> pretty q <+> text (" -> done, " ++ prettyShow n ++ " bindings") SplitTreeLabel (Just q) (Just n) Nothing -> pretty q <+> text (" -> split at " ++ prettyShow n) _ -> __IMPOSSIBLE__ -- | Convert a split tree into a 'Data.Tree' (for printing). toTree :: SplitTree' a -> Tree (SplitTreeLabel a) toTree t = case t of SplittingDone n -> Node (SplitTreeLabel Nothing Nothing (Just n)) [] SplitAt n ts -> Node (SplitTreeLabel Nothing (Just n) Nothing) $ toTrees ts toTrees :: SplitTrees' a -> Forest (SplitTreeLabel a) toTrees = map (\ (c,t) -> setCons c $ toTree t) where setCons :: a -> Tree (SplitTreeLabel a) -> Tree (SplitTreeLabel a) setCons c (Node l ts) = Node (l { lblConstructorName = Just c }) ts instance Pretty a => Pretty (SplitTree' a) where pretty = text . drawTree . fmap prettyShow . toTree instance KillRange SplitTag where killRange = \case SplitCon c -> killRange1 SplitCon c SplitLit l -> killRange1 SplitLit l SplitCatchall -> SplitCatchall instance KillRange a => KillRange (SplitTree' a) where killRange = \case SplittingDone n -> SplittingDone n SplitAt i ts -> killRange1 (SplitAt i) ts Agda-2.6.0.1/src/full/Agda/TypeChecking/Rewriting/0000755000000000000000000000000013466402171017620 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Rewriting/NonLinMatch.hs0000644000000000000000000005134013466402171022331 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE UndecidableInstances #-} {- | Non-linear matching of the lhs of a rewrite rule against a neutral term. Given a lhs Δ ⊢ lhs : B and a candidate term Γ ⊢ t : A we seek a substitution Γ ⊢ σ : Δ such that Γ ⊢ B[σ] = A and Γ ⊢ lhs[σ] = t : A -} module Agda.TypeChecking.Rewriting.NonLinMatch where import Prelude hiding (null, sequence) import Control.Arrow (first, second) import Control.Monad.State import Debug.Trace import System.IO.Unsafe import Data.Maybe import Data.Monoid import Data.Traversable (Traversable,traverse) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Monoid import qualified Data.Set as Set import Data.Set (Set) import Agda.Syntax.Common import qualified Agda.Syntax.Common as C import Agda.Syntax.Internal import Agda.TypeChecking.Datatypes import Agda.TypeChecking.EtaContract import Agda.TypeChecking.Free import Agda.TypeChecking.Free.Reduce import Agda.TypeChecking.Level import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin (getBuiltin', builtinLevel, primLevelSuc, primLevelMax) import Agda.TypeChecking.Pretty import Agda.TypeChecking.Records import Agda.TypeChecking.Reduce import Agda.TypeChecking.Reduce.Monad as Red import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.Utils.Either import Agda.Utils.Except import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Singleton import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Turn a term into a non-linear pattern, treating the -- free variables as pattern variables. -- The first argument indicates the relevance we are working under: if this -- is Irrelevant, then we construct a pattern that never fails to match. -- The second argument is the number of bound variables (from pattern lambdas). -- The third argument is the type of the term. class PatternFrom t a b where patternFrom :: Relevance -> Int -> t -> a -> TCM b instance (PatternFrom t a b) => PatternFrom (Dom t) (Arg a) (Arg b) where patternFrom r k t u = let r' = r `composeRelevance` getRelevance u in traverse (patternFrom r' k $ unDom t) u instance PatternFrom (Type, Term) Elims [Elim' NLPat] where patternFrom r k (t,hd) = \case [] -> return [] (Apply u : es) -> do ~(Pi a b) <- reduce $ unEl t p <- patternFrom r k a u t' <- t `piApplyM` u let hd' = hd `apply` [ u ] ps <- patternFrom r k (t',hd') es return $ Apply p : ps (IApply x y u : es) -> __IMPOSSIBLE__ -- TODO (Proj o f : es) -> do ~(Just (El _ (Pi a b))) <- getDefType f =<< reduce t let t' = b `absApp` hd hd' <- applyDef o f (argFromDom a $> hd) ps <- patternFrom r k (t',hd') es return $ Proj o f : ps instance (PatternFrom t a b) => PatternFrom t (Dom a) (Dom b) where patternFrom r k t = traverse $ patternFrom r k t instance PatternFrom () Type NLPType where patternFrom r k _ a = NLPType <$> patternFrom r k () (getSort a) <*> patternFrom r k (sort $ getSort a) (unEl a) instance PatternFrom () Sort NLPat where patternFrom r k _ s = do s <- reduce s let done = return PWild case s of Type l -> do t <- levelType patternFrom Irrelevant k t (Level l) Prop l -> done --TODO Inf -> done SizeUniv -> done PiSort _ _ -> __IMPOSSIBLE__ UnivSort _ -> __IMPOSSIBLE__ MetaS{} -> __IMPOSSIBLE__ DefS{} -> done DummyS s -> do reportSLn "impossible" 10 $ unlines [ "patternFrom: hit dummy sort with content:" , s ] __IMPOSSIBLE__ instance PatternFrom Type Term NLPat where patternFrom r k t v = do t <- reduce t etaRecord <- isEtaRecordType t v <- unLevel =<< reduce v reportSDoc "rewriting.build" 60 $ sep [ "building a pattern from term v = " <+> prettyTCM v , " of type " <+> prettyTCM t ] let done = if isIrrelevant r then return PWild else return $ PTerm v case (unEl t , v) of (Pi a b , _) -> do let body = raise 1 v `apply` [ Arg (domInfo a) $ var 0 ] p <- addContext a (patternFrom r (k+1) (absBody b) body) return $ PLam (domInfo a) $ Abs (absName b) p (_ , Var i es) | i < k -> do t <- typeOfBV i PBoundVar i <$> patternFrom r k (t , var i) es -- The arguments of `var i` should be distinct bound variables -- in order to build a Miller pattern | Just vs <- allApplyElims es -> do TelV tel _ <- telView =<< typeOfBV i unless (size tel >= size vs) __IMPOSSIBLE__ let ts = applySubst (parallelS $ reverse $ map unArg vs) $ map unDom $ flattenTel tel mbvs <- forM (zip ts vs) $ \(t , v) -> do isEtaVar (unArg v) t >>= \case Just j | j < k -> return $ Just $ v $> j _ -> return Nothing case sequence mbvs of Just bvs | fastDistinct bvs -> do let allBoundVars = IntSet.fromList (downFrom k) ok = not (isIrrelevant r) || IntSet.fromList (map unArg bvs) == allBoundVars if ok then return (PVar i bvs) else done _ -> done | otherwise -> done (_ , _ ) | Just (d, pars) <- etaRecord -> do def <- theDef <$> getConstInfo d (tel, c, ci, vs) <- etaExpandRecord_ d pars def v caseMaybeM (getFullyAppliedConType c t) __IMPOSSIBLE__ $ \ (_ , ct) -> do PDef (conName c) <$> patternFrom r k (ct , Con c ci []) (map Apply vs) (_ , Lam i t) -> __IMPOSSIBLE__ (_ , Lit{}) -> done (_ , Def f es) | isIrrelevant r -> done (_ , Def f es) -> do Def lsuc [] <- primLevelSuc Def lmax [] <- primLevelMax case es of [x] | f == lsuc -> done [x , y] | f == lmax -> done _ -> do ft <- defType <$> getConstInfo f PDef f <$> patternFrom r k (ft , Def f []) es (_ , Con c ci vs) | isIrrelevant r -> done (_ , Con c ci vs) -> caseMaybeM (getFullyAppliedConType c t) __IMPOSSIBLE__ $ \ (_ , ct) -> do PDef (conName c) <$> patternFrom r k (ct , Con c ci []) vs (_ , Pi a b) | isIrrelevant r -> done (_ , Pi a b) -> do pa <- patternFrom r k () a pb <- addContext a (patternFrom r (k+1) () $ absBody b) return $ PPi pa (Abs (absName b) pb) (_ , Sort s) -> done (_ , Level l) -> __IMPOSSIBLE__ (_ , DontCare{}) -> return PWild (_ , MetaV{}) -> __IMPOSSIBLE__ (_ , Dummy s) -> __IMPOSSIBLE_VERBOSE__ s -- | Monad for non-linear matching. type NLM = ExceptT Blocked_ (StateT NLMState ReduceM) data NLMState = NLMState { _nlmSub :: Sub , _nlmEqs :: PostponedEquations } instance Null NLMState where empty = NLMState { _nlmSub = empty , _nlmEqs = empty } null s = null (s^.nlmSub) && null (s^.nlmEqs) nlmSub :: Lens' Sub NLMState nlmSub f s = f (_nlmSub s) <&> \x -> s {_nlmSub = x} nlmEqs :: Lens' PostponedEquations NLMState nlmEqs f s = f (_nlmEqs s) <&> \x -> s {_nlmEqs = x} runNLM :: (MonadReduce m) => NLM () -> m (Either Blocked_ NLMState) runNLM nlm = do (ok,out) <- liftReduce $ runStateT (runExceptT nlm) empty case ok of Left block -> return $ Left block Right _ -> return $ Right out matchingBlocked :: Blocked_ -> NLM () matchingBlocked = throwError -- | Add substitution @i |-> v@ to result of matching. tellSub :: Relevance -> Int -> Term -> NLM () tellSub r i v = do old <- IntMap.lookup i <$> use nlmSub case old of Nothing -> nlmSub %= IntMap.insert i (r,v) Just (r',v') | isIrrelevant r -> return () | isIrrelevant r' -> nlmSub %= IntMap.insert i (r,v) | otherwise -> whenJustM (equal v v') matchingBlocked tellEq :: Telescope -> Telescope -> Term -> Term -> NLM () tellEq gamma k u v = do traceSDoc "rewriting.match" 30 (sep [ "adding equality between" <+> addContext (gamma `abstract` k) (prettyTCM u) , " and " <+> addContext k (prettyTCM v) ]) $ do nlmEqs %= (PostponedEquation k u v:) type Sub = IntMap (Relevance, Term) -- | Matching against a term produces a constraint -- which we have to verify after applying -- the substitution computed by matching. data PostponedEquation = PostponedEquation { eqFreeVars :: Telescope -- ^ Telescope of free variables in the equation , eqLhs :: Term -- ^ Term from pattern, living in pattern context. , eqRhs :: Term -- ^ Term from scrutinee, living in context where matching was invoked. } type PostponedEquations = [PostponedEquation] -- | Match a non-linear pattern against a neutral term, -- returning a substitution. class Match t a b where match :: Relevance -- ^ Are we currently matching in an irrelevant context? -> Telescope -- ^ The telescope of pattern variables -> Telescope -- ^ The telescope of lambda-bound variables -> t -- ^ The type of the pattern -> a -- ^ The pattern to match -> b -- ^ The term to be matched against the pattern -> NLM () instance Match t a b => Match (Dom t) (Arg a) (Arg b) where match r gamma k t p v = let r' = r `composeRelevance` getRelevance p in match r' gamma k (unDom t) (unArg p) (unArg v) instance Match (Type, Term) [Elim' NLPat] Elims where match r gamma k (t, hd) [] [] = return () match r gamma k (t, hd) [] _ = matchingBlocked $ NotBlocked ReallyNotBlocked () match r gamma k (t, hd) _ [] = matchingBlocked $ NotBlocked ReallyNotBlocked () match r gamma k (t, hd) (p:ps) (v:vs) = case (p,v) of (Apply p, Apply v) -> do ~(Pi a b) <- reduce $ unEl t match r gamma k a p v t' <- Red.addCtxTel k $ t `piApplyM` v let hd' = hd `apply` [ v ] match r gamma k (t',hd') ps vs (Proj o f, Proj o' f') | f == f' -> do ~(Just (El _ (Pi a b))) <- getDefType f =<< reduce t let t' = b `absApp` hd hd' <- Red.addCtxTel k $ applyDef o f (argFromDom a $> hd) match r gamma k (t',hd') ps vs (Proj _ f, Proj _ f') | otherwise -> do traceSDoc "rewriting.match" 20 (sep [ "mismatch between projections " <+> prettyTCM f , " and " <+> prettyTCM f' ]) mzero (Apply{}, Proj{} ) -> __IMPOSSIBLE__ (Proj{} , Apply{}) -> __IMPOSSIBLE__ (IApply{} , _ ) -> __IMPOSSIBLE__ -- TODO (_ , IApply{} ) -> __IMPOSSIBLE__ -- TODO instance Match t a b => Match t (Dom a) (Dom b) where match r gamma k t p v = match r gamma k t (C.unDom p) (C.unDom v) instance Match () NLPType Type where match r gamma k _ (NLPType lp p) (El s a) = do match r gamma k () lp s match r gamma k (sort s) p a instance Match () NLPat Sort where match r gamma k _ p s = case (p , s) of (PWild , _ ) -> return () (p , Type l) -> match Irrelevant gamma k () p l _ -> matchingBlocked $ NotBlocked ReallyNotBlocked () instance Match () NLPat Level where match r gamma k _ p l = do t <- El (mkType 0) . fromMaybe __IMPOSSIBLE__ <$> getBuiltin' builtinLevel v <- reallyUnLevelView l match r gamma k t p v instance Match Type NLPat Term where match r gamma k t p v = do vbt <- Red.addCtxTel k $ reduceB (v,t) etaRecord <- Red.addCtxTel k $ isEtaRecordType t let n = size k b = void vbt (v,t) = ignoreBlocking vbt prettyPat = withShowAllArguments $ addContext (gamma `abstract` k) (prettyTCM p) prettyTerm = withShowAllArguments $ addContext k $ prettyTCM v prettyType = withShowAllArguments $ addContext k $ prettyTCM t traceSDoc "rewriting.match" 30 (sep [ "matching pattern " <+> prettyPat , " with term " <+> prettyTerm , " of type " <+> prettyType ]) $ do traceSDoc "rewriting.match" 80 (vcat [ " raw pattern: " <+> text (show p) , " raw term: " <+> text (show v) , " raw type: " <+> text (show t) ]) $ do traceSDoc "rewriting.match" 70 (vcat [ "pattern vars: " <+> prettyTCM gamma , "bound vars: " <+> prettyTCM k ]) $ do let yes = return () no msg = do traceSDoc "rewriting.match" 10 (sep [ "mismatch between" <+> prettyPat , " and " <+> prettyTerm , " of type " <+> prettyType , msg ]) $ do traceSDoc "rewriting.match" 30 (sep [ "blocking tag from reduction: " <+> text (show b) ]) $ do matchingBlocked b block b' = do traceSDoc "rewriting.match" 10 (sep [ "matching blocked on meta" , text (show b') ]) $ do traceSDoc "rewriting.match" 30 (sep [ "blocking tag from reduction: " <+> text (show b') ]) $ do matchingBlocked (b `mappend` b') case p of PWild -> yes PVar i bvs -> traceSDoc "rewriting.match" 60 ("matching a PVar: " <+> text (show i)) $ do let allowedVars :: IntSet allowedVars = IntSet.fromList (map unArg bvs) badVars :: IntSet badVars = IntSet.difference (IntSet.fromList (downFrom n)) allowedVars perm :: Permutation perm = Perm n $ reverse $ map unArg $ bvs tel :: Telescope tel = permuteTel perm k ok <- Red.addCtxTel k $ reallyFree badVars v case ok of Left b -> block b Right Nothing -> no "" Right (Just v) -> tellSub r (i-n) $ teleLam tel $ renameP __IMPOSSIBLE__ perm v _ | MetaV m es <- v -> matchingBlocked $ Blocked m () PDef f ps -> traceSDoc "rewriting.match" 60 ("matching a PDef: " <+> prettyTCM f) $ do v <- Red.addCtxTel k $ constructorForm =<< unLevel v case v of Def f' es | f == f' -> do ft <- Red.addCtxTel k $ defType <$> getConstInfo f match r gamma k (ft , Def f []) ps es Con c ci vs | f == conName c -> do ~(Just (_ , ct)) <- Red.addCtxTel k $ getFullyAppliedConType c t match r gamma k (ct , Con c ci []) ps vs _ | Pi a b <- unEl t -> do let ai = domInfo a pbody = PDef f $ raise 1 ps ++ [ Apply $ Arg ai $ PTerm $ var 0 ] body = raise 1 v `apply` [ Arg (domInfo a) $ var 0 ] k' = ExtendTel a (Abs (absName b) k) match r gamma k' (absBody b) pbody body _ | Just (d, pars) <- etaRecord -> do -- If v is not of record constructor form but we are matching at record -- type, e.g., we eta-expand both v to (c vs) and -- the pattern (p = PDef f ps) to @c (p .f1) ... (p .fn)@. def <- Red.addCtxTel k $ theDef <$> getConstInfo d (tel, c, ci, vs) <- Red.addCtxTel k $ etaExpandRecord_ d pars def v ~(Just (_ , ct)) <- Red.addCtxTel k $ getFullyAppliedConType c t let flds = recFields def mkField fld = PDef f (ps ++ [Proj ProjSystem fld]) -- Issue #3335: when matching against the record constructor, -- don't add projections but take record field directly. ps' | conName c == f = ps | otherwise = map (Apply . fmap mkField) flds match r gamma k (ct, Con c ci []) ps' (map Apply vs) MetaV m es -> do matchingBlocked $ Blocked m () _ -> no "" PLam i p' -> case unEl t of Pi a b -> do let body = raise 1 v `apply` [Arg i (var 0)] k' = ExtendTel a (Abs (absName b) k) match r gamma k' (absBody b) (absBody p') body _ -> no "" PPi pa pb -> case v of Pi a b -> do match r gamma k () pa a let k' = ExtendTel a (Abs (absName b) k) match r gamma k' () (absBody pb) (absBody b) _ -> no "" PBoundVar i ps -> case v of Var i' es | i == i' -> do let ti = unDom $ indexWithDefault __IMPOSSIBLE__ (flattenTel k) i match r gamma k (ti , var i) ps es _ | Pi a b <- unEl t -> do let ai = domInfo a pbody = PBoundVar i $ raise 1 ps ++ [ Apply $ Arg ai $ PTerm $ var 0 ] body = raise 1 v `apply` [ Arg ai $ var 0 ] k' = ExtendTel a (Abs (absName b) k) match r gamma k' (absBody b) pbody body _ | Just (d, pars) <- etaRecord -> do def <- Red.addCtxTel k $ theDef <$> getConstInfo d (tel, c, ci, vs) <- Red.addCtxTel k $ etaExpandRecord_ d pars def v ~(Just (_ , ct)) <- Red.addCtxTel k $ getFullyAppliedConType c t let flds = recFields def ps' = map (fmap $ \fld -> PBoundVar i (ps ++ [Proj ProjSystem fld])) flds match r gamma k (ct, Con c ci []) (map Apply ps') (map Apply vs) _ -> no "" PTerm u -> traceSDoc "rewriting.match" 60 ("matching a PTerm" <+> addContext (gamma `abstract` k) (prettyTCM u)) $ tellEq gamma k u v -- Checks if the given term contains any free variables that satisfy the -- given condition on their DBI, possibly reducing the term in the process. -- Returns `Right Nothing` if there are such variables, `Right (Just v')` -- if there are none (where v' is the possibly reduced version of the given -- term) or `Left b` if the problem is blocked on a meta. reallyFree :: (MonadReduce m, Reduce a, ForceNotFree a) => IntSet -> a -> m (Either Blocked_ (Maybe a)) reallyFree xs v = do (mxs , v') <- forceNotFree xs v case IntMap.foldr pickFree NotFree mxs of MaybeFree ms | null ms -> return $ Right Nothing | otherwise -> return $ Left $ Set.foldr (\m -> mappend $ Blocked m ()) (notBlocked ()) ms NotFree -> return $ Right (Just v') where -- Check if any of the variables occur freely. -- Prefer occurrences that do not depend on any metas. pickFree :: IsFree -> IsFree -> IsFree pickFree f1@(MaybeFree ms1) f2 | null ms1 = f1 pickFree f1@(MaybeFree ms1) f2@(MaybeFree ms2) | null ms2 = f2 | otherwise = f1 pickFree f1@(MaybeFree ms1) NotFree = f1 pickFree NotFree f2 = f2 makeSubstitution :: Telescope -> Sub -> Substitution makeSubstitution gamma sub = prependS __IMPOSSIBLE__ (map val [0 .. size gamma-1]) IdS where val i = case IntMap.lookup i sub of Just (Irrelevant, v) -> Just $ dontCare v Just (_ , v) -> Just v Nothing -> Nothing checkPostponedEquations :: (MonadReduce m, HasConstInfo m, MonadDebug m) => Substitution -> PostponedEquations -> m (Maybe Blocked_) checkPostponedEquations sub eqs = forM' eqs $ \ (PostponedEquation k lhs rhs) -> do let lhs' = applySubst (liftS (size k) sub) lhs traceSDoc "rewriting.match" 30 (sep [ "checking postponed equality between" , addContext k (prettyTCM lhs') , " and " , addContext k (prettyTCM rhs) ]) $ do Red.addCtxTel k $ equal lhs' rhs -- main function nonLinMatch :: (MonadReduce m, HasConstInfo m, MonadDebug m, Match t a b) => Telescope -> t -> a -> b -> m (Either Blocked_ Substitution) nonLinMatch gamma t p v = do let no msg b = traceSDoc "rewriting.match" 10 (sep [ "matching failed during" <+> text msg , "blocking: " <+> text (show b) ]) $ return (Left b) caseEitherM (runNLM $ match Relevant gamma EmptyTel t p v) (no "matching") $ \ s -> do let sub = makeSubstitution gamma $ s^.nlmSub eqs = s^.nlmEqs traceSDoc "rewriting.match" 90 (text $ "sub = " ++ show sub) $ do ok <- checkPostponedEquations sub eqs case ok of Nothing -> return $ Right sub Just b -> no "checking of postponed equations" b -- | Untyped βη-equality, does not handle things like empty record types. -- Returns `Nothing` if the terms are equal, or `Just b` if the terms are not -- (where b contains information about possible metas blocking the comparison) -- TODO: implement a type-directed, lazy version of this function. equal :: (MonadReduce m, HasConstInfo m) => Term -> Term -> m (Maybe Blocked_) equal u v = do (u, v) <- etaContract =<< normalise (u, v) let ok = u == v block = caseMaybe (firstMeta (u, v)) (NotBlocked ReallyNotBlocked ()) (\ m -> Blocked m ()) if ok then return Nothing else do traceSDoc "rewriting.match" 10 (sep [ "mismatch between " <+> prettyTCM u , " and " <+> prettyTCM v ]) $ do return $ Just block Agda-2.6.0.1/src/full/Agda/TypeChecking/Substitute/0000755000000000000000000000000013466402171020021 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Substitute/Class.hs0000644000000000000000000002332413466402171021426 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.TypeChecking.Substitute.Class where import Control.Arrow ((***), second) import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Internal import Agda.TypeChecking.Free import Agda.TypeChecking.Substitute.DeBruijn import Agda.Utils.Empty import Agda.Utils.List #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Application --------------------------------------------------------------------------- -- | Apply something to a bunch of arguments. -- Preserves blocking tags (application can never resolve blocking). class Apply t where apply :: t -> Args -> t applyE :: t -> Elims -> t apply t args = applyE t $ map Apply args -- Andreas, 2018-06-18, issue #3136 -- This default instance should be removed to get more precise -- crash locations (raise the IMPOSSIBLE in a more specific place). -- applyE t es = apply t $ fromMaybe __IMPOSSIBLE__ $ allApplyElims es -- precondition: all @es@ are @Apply@s -- | Apply to some default arguments. applys :: Apply t => t -> [Term] -> t applys t vs = apply t $ map defaultArg vs -- | Apply to a single default argument. apply1 :: Apply t => t -> Term -> t apply1 t u = applys t [ u ] --------------------------------------------------------------------------- -- * Abstraction --------------------------------------------------------------------------- -- | @(abstract args v) `apply` args --> v[args]@. class Abstract t where abstract :: Telescope -> t -> t --------------------------------------------------------------------------- -- * Substitution and raising/shifting/weakening --------------------------------------------------------------------------- -- | Apply a substitution. -- For terms: -- -- Γ ⊢ ρ : Δ -- Δ ⊢ t : A -- ----------- -- Γ ⊢ tρ : Aρ class DeBruijn t => Subst t a | a -> t where applySubst :: Substitution' t -> a -> a raise :: Subst t a => Nat -> a -> a raise = raiseFrom 0 raiseFrom :: Subst t a => Nat -> Nat -> a -> a raiseFrom n k = applySubst (liftS n $ raiseS k) -- | Replace de Bruijn index i by a 'Term' in something. subst :: Subst t a => Int -> t -> a -> a subst i u = applySubst $ singletonS i u strengthen :: Subst t a => Empty -> a -> a strengthen err = applySubst (compactS err [Nothing]) -- | Replace what is now de Bruijn index 0, but go under n binders. -- @substUnder n u == subst n (raise n u)@. substUnder :: Subst t a => Nat -> t -> a -> a substUnder n u = applySubst (liftS n (singletonS 0 u)) -- ** Identity instances instance Subst Term QName where applySubst _ q = q --------------------------------------------------------------------------- -- * Explicit substitutions --------------------------------------------------------------------------- -- See Syntax.Internal for the definition. idS :: Substitution' a idS = IdS wkS :: Int -> Substitution' a -> Substitution' a wkS 0 rho = rho wkS n (Wk m rho) = Wk (n + m) rho wkS n (EmptyS err) = EmptyS err wkS n rho = Wk n rho raiseS :: Int -> Substitution' a raiseS n = wkS n idS consS :: DeBruijn a => a -> Substitution' a -> Substitution' a consS t (Wk m rho) | Just n <- deBruijnView t, n + 1 == m = wkS (m - 1) (liftS 1 rho) consS u rho = seq u (u :# rho) -- | To replace index @n@ by term @u@, do @applySubst (singletonS n u)@. -- @ -- Γ, Δ ⊢ u : A -- --------------------------------- -- Γ, Δ ⊢ singletonS |Δ| u : Γ, A, Δ -- @ singletonS :: DeBruijn a => Int -> a -> Substitution' a singletonS n u = map deBruijnVar [0..n-1] ++# consS u (raiseS n) -- ALT: foldl (\ s i -> deBruijnVar i `consS` s) (consS u $ raiseS n) $ downFrom n -- | Single substitution without disturbing any deBruijn indices. -- @ -- Γ, A, Δ ⊢ u : A -- --------------------------------- -- Γ, A, Δ ⊢ inplace |Δ| u : Γ, A, Δ -- @ inplaceS :: Subst a a => Int -> a -> Substitution' a inplaceS k u = singletonS k u `composeS` liftS (k + 1) (raiseS 1) -- | Lift a substitution under k binders. liftS :: Int -> Substitution' a -> Substitution' a liftS 0 rho = rho liftS k IdS = IdS liftS k (Lift n rho) = Lift (n + k) rho liftS k rho = Lift k rho -- | @ -- Γ ⊢ ρ : Δ, Ψ -- ------------------- -- Γ ⊢ dropS |Ψ| ρ : Δ -- @ dropS :: Int -> Substitution' a -> Substitution' a dropS 0 rho = rho dropS n IdS = raiseS n dropS n (Wk m rho) = wkS m (dropS n rho) dropS n (u :# rho) = dropS (n - 1) rho dropS n (Strengthen _ rho) = dropS (n - 1) rho dropS n (Lift 0 rho) = __IMPOSSIBLE__ dropS n (Lift m rho) = wkS 1 $ dropS (n - 1) $ liftS (m - 1) rho dropS n (EmptyS err) = absurd err -- | @applySubst (ρ `composeS` σ) v == applySubst ρ (applySubst σ v)@ composeS :: Subst a a => Substitution' a -> Substitution' a -> Substitution' a composeS rho IdS = rho composeS IdS sgm = sgm composeS rho (EmptyS err) = EmptyS err composeS rho (Wk n sgm) = composeS (dropS n rho) sgm composeS rho (u :# sgm) = applySubst rho u :# composeS rho sgm composeS rho (Strengthen err sgm) = Strengthen err (composeS rho sgm) composeS rho (Lift 0 sgm) = __IMPOSSIBLE__ composeS (u :# rho) (Lift n sgm) = u :# composeS rho (liftS (n - 1) sgm) composeS rho (Lift n sgm) = lookupS rho 0 :# composeS rho (wkS 1 (liftS (n - 1) sgm)) -- If Γ ⊢ ρ : Δ, Θ then splitS |Θ| ρ = (σ, δ), with -- Γ ⊢ σ : Δ -- Γ ⊢ δ : Θσ splitS :: Int -> Substitution' a -> (Substitution' a, Substitution' a) splitS 0 rho = (rho, EmptyS __IMPOSSIBLE__) splitS n (u :# rho) = second (u :#) $ splitS (n - 1) rho splitS n (Strengthen err rho) = second (Strengthen err) $ splitS (n - 1) rho splitS n (Lift 0 _) = __IMPOSSIBLE__ splitS n (Wk m rho) = wkS m *** wkS m $ splitS n rho splitS n IdS = (raiseS n, liftS n $ EmptyS __IMPOSSIBLE__) splitS n (Lift m rho) = wkS 1 *** liftS 1 $ splitS (n - 1) (liftS (m - 1) rho) splitS n (EmptyS err) = __IMPOSSIBLE__ infixr 4 ++# (++#) :: DeBruijn a => [a] -> Substitution' a -> Substitution' a us ++# rho = foldr consS rho us -- | @ -- Γ ⊢ ρ : Δ Γ ⊢ reverse vs : Θ -- ----------------------------- (treating Nothing as having any type) -- Γ ⊢ prependS vs ρ : Δ, Θ -- @ prependS :: DeBruijn a => Empty -> [Maybe a] -> Substitution' a -> Substitution' a prependS err us rho = foldr f rho us where f Nothing rho = Strengthen err rho f (Just u) rho = consS u rho parallelS :: DeBruijn a => [a] -> Substitution' a parallelS us = us ++# idS compactS :: DeBruijn a => Empty -> [Maybe a] -> Substitution' a compactS err us = prependS err us idS -- | Γ ⊢ (strengthenS ⊥ |Δ|) : Γ,Δ strengthenS :: Empty -> Int -> Substitution' a strengthenS err = indexWithDefault __IMPOSSIBLE__ $ iterate (Strengthen err) idS lookupS :: Subst a a => Substitution' a -> Nat -> a lookupS rho i = case rho of IdS -> deBruijnVar i Wk n IdS -> let j = i + n in if j < 0 then __IMPOSSIBLE__ else deBruijnVar j Wk n rho -> applySubst (raiseS n) (lookupS rho i) u :# rho | i == 0 -> u | i < 0 -> __IMPOSSIBLE__ | otherwise -> lookupS rho (i - 1) Strengthen err rho | i == 0 -> absurd err | i < 0 -> __IMPOSSIBLE__ | otherwise -> lookupS rho (i - 1) Lift n rho | i < n -> deBruijnVar i | otherwise -> raise n $ lookupS rho (i - n) EmptyS err -> absurd err --------------------------------------------------------------------------- -- * Functions on abstractions -- and things we couldn't do before we could define 'absBody' --------------------------------------------------------------------------- -- | Instantiate an abstraction. Strict in the term. absApp :: Subst t a => Abs a -> t -> a absApp (Abs _ v) u = subst 0 u v absApp (NoAbs _ v) _ = v -- | Instantiate an abstraction. Lazy in the term, which allow it to be -- __IMPOSSIBLE__ in the case where the variable shouldn't be used but we -- cannot use 'noabsApp'. Used in Apply. lazyAbsApp :: Subst t a => Abs a -> t -> a lazyAbsApp (Abs _ v) u = applySubst (u :# IdS) v -- Note: do not use consS here! lazyAbsApp (NoAbs _ v) _ = v -- | Instantiate an abstraction that doesn't use its argument. noabsApp :: Subst t a => Empty -> Abs a -> a noabsApp err (Abs _ v) = strengthen err v noabsApp _ (NoAbs _ v) = v absBody :: Subst t a => Abs a -> a absBody (Abs _ v) = v absBody (NoAbs _ v) = raise 1 v mkAbs :: (Subst t a, Free a) => ArgName -> a -> Abs a mkAbs x v | 0 `freeIn` v = Abs x v | otherwise = NoAbs x (raise (-1) v) reAbs :: (Subst t a, Free a) => Abs a -> Abs a reAbs (NoAbs x v) = NoAbs x v reAbs (Abs x v) = mkAbs x v -- | @underAbs k a b@ applies @k@ to @a@ and the content of -- abstraction @b@ and puts the abstraction back. -- @a@ is raised if abstraction was proper such that -- at point of application of @k@ and the content of @b@ -- are at the same context. -- Precondition: @a@ and @b@ are at the same context at call time. underAbs :: Subst t a => (a -> b -> b) -> a -> Abs b -> Abs b underAbs cont a b = case b of Abs x t -> Abs x $ cont (raise 1 a) t NoAbs x t -> NoAbs x $ cont a t -- | @underLambdas n k a b@ drops @n@ initial 'Lam's from @b@, -- performs operation @k@ on @a@ and the body of @b@, -- and puts the 'Lam's back. @a@ is raised correctly -- according to the number of abstractions. underLambdas :: Subst Term a => Int -> (a -> Term -> Term) -> a -> Term -> Term underLambdas n cont a v = loop n a v where loop 0 a v = cont a v loop n a v = case v of Lam h b -> Lam h $ underAbs (loop $ n-1) a b _ -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/TypeChecking/Substitute/DeBruijn.hs0000644000000000000000000000274313466402171022065 0ustar0000000000000000 module Agda.TypeChecking.Substitute.DeBruijn where import Agda.Syntax.Common import Agda.Syntax.Internal -- | Things we can substitute for a variable. -- Needs to be able to represent variables, e.g. for substituting under binders. class DeBruijn a where -- | Produce a variable without name suggestion. deBruijnVar :: Int -> a deBruijnVar = debruijnNamedVar underscore -- | Produce a variable with name suggestion. debruijnNamedVar :: String -> Int -> a debruijnNamedVar _ = deBruijnVar -- | Are we dealing with a variable? -- If yes, what is its index? deBruijnView :: a -> Maybe Int -- | We can substitute @Term@s for variables. instance DeBruijn Term where deBruijnVar = var deBruijnView u = case u of Var i [] -> Just i Level l -> deBruijnView l _ -> Nothing instance DeBruijn LevelAtom where deBruijnVar = NeutralLevel ReallyNotBlocked . deBruijnVar deBruijnView l = case l of NeutralLevel _ u -> deBruijnView u UnreducedLevel u -> deBruijnView u MetaLevel{} -> Nothing BlockedLevel{} -> Nothing instance DeBruijn PlusLevel where deBruijnVar = Plus 0 . deBruijnVar deBruijnView l = case l of Plus 0 a -> deBruijnView a _ -> Nothing instance DeBruijn Level where deBruijnVar i = Max [deBruijnVar i] deBruijnView l = case l of Max [p] -> deBruijnView p _ -> Nothing instance DeBruijn DBPatVar where debruijnNamedVar = DBPatVar deBruijnView = Just . dbPatVarIndex Agda-2.6.0.1/src/full/Agda/TypeChecking/Reduce/0000755000000000000000000000000013466402171017055 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Reduce/Fast.hs-boot0000644000000000000000000000030513466402171021245 0ustar0000000000000000 module Agda.TypeChecking.Reduce.Fast where import Agda.Syntax.Internal import Agda.TypeChecking.Monad.Base fastReduce :: Term -> ReduceM (Blocked Term) fastNormalise :: Term -> ReduceM Term Agda-2.6.0.1/src/full/Agda/TypeChecking/Reduce/Monad.hs0000644000000000000000000001121613466402171020450 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.TypeChecking.Reduce.Monad ( constructorForm , enterClosure , underAbstraction , underAbstraction_ , addCtxTel , getConstInfo , isInstantiatedMeta , lookupMeta , askR, applyWhenVerboseS ) where import Prelude hiding (null) import Control.Arrow ((***), first, second) import Control.Applicative hiding (empty) import Control.Monad.Reader import qualified Data.IntMap as IntMap import qualified Data.Map as Map import Data.Maybe import Data.Monoid import Debug.Trace import System.IO.Unsafe import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Internal import Agda.TypeChecking.Monad hiding ( enterClosure, underAbstraction_, underAbstraction, addCtx, isInstantiatedMeta, verboseS, typeOfConst, lookupMeta, lookupMeta' ) import Agda.TypeChecking.Monad.Builtin hiding ( constructorForm ) import Agda.TypeChecking.Substitute import Agda.Interaction.Options import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible instance HasBuiltins ReduceM where getBuiltinThing b = liftM2 mplus (Map.lookup b <$> useR stLocalBuiltins) (Map.lookup b <$> useR stImportedBuiltins) constructorForm :: HasBuiltins m => Term -> m Term constructorForm v = do mz <- getBuiltin' builtinZero ms <- getBuiltin' builtinSuc return $ fromMaybe v $ constructorForm' mz ms v enterClosure :: Closure a -> (a -> ReduceM b) -> ReduceM b enterClosure (Closure sig env scope cps x) f = localR (mapRedEnvSt inEnv inState) (f x) where inEnv e = env inState s = -- TODO: use the signature here? would that fix parts of issue 118? set stScope scope $ set stModuleCheckpoints cps s withFreshR :: (ReadTCState m, HasFresh i) => (i -> m a) -> m a withFreshR f = do s <- getTCState let (i, s') = nextFresh s withTCState (const s') (f i) withFreshName :: (MonadReduce m) => Range -> ArgName -> (Name -> m a) -> m a withFreshName r s k = withFreshR $ \i -> k (mkName r i s) withFreshName_ :: (MonadReduce m) => ArgName -> (Name -> m a) -> m a withFreshName_ = withFreshName noRange addCtx :: (MonadReduce m) => Name -> Dom Type -> m a -> m a addCtx x a ret = do ctx <- asksTC $ map (fst . unDom) . envContext let ce = (x,) <$> a oldChkpt <- viewTC eCurrentCheckpoint withFreshR $ \ chkpt -> localTC (\e -> e { envContext = ce : envContext e , envCurrentCheckpoint = chkpt , envCheckpoints = Map.insert chkpt IdS $ fmap (raise 1) (envCheckpoints e) }) ret -- let-bindings keep track of own their context addCtxTel :: (MonadReduce m) => Telescope -> m a -> m a addCtxTel EmptyTel ret = ret addCtxTel (ExtendTel t tel) ret = underAbstraction t tel $ \tel -> addCtxTel tel ret underAbstraction :: (MonadReduce m, Subst t a) => Dom Type -> Abs a -> (a -> m b) -> m b underAbstraction _ (NoAbs _ v) f = f v underAbstraction t a f = withFreshName_ (realName $ absName a) $ \x -> addCtx x t $ f (absBody a) where realName s = if isNoName s then "x" else s underAbstraction_ :: (MonadReduce m, Subst t a) => Abs a -> (a -> m b) -> m b underAbstraction_ = underAbstraction __DUMMY_DOM__ lookupMeta' :: MetaId -> ReduceM (Maybe MetaVariable) lookupMeta' (MetaId i) = IntMap.lookup i <$> useR stMetaStore lookupMeta :: MetaId -> ReduceM MetaVariable lookupMeta = fromMaybe __IMPOSSIBLE__ <.> lookupMeta' isInstantiatedMeta :: MetaId -> ReduceM Bool isInstantiatedMeta i = do mv <- lookupMeta i return $ case mvInstantiation mv of InstV{} -> True _ -> False -- | Apply a function if a certain verbosity level is activated. -- -- Precondition: The level must be non-negative. {-# SPECIALIZE applyWhenVerboseS :: VerboseKey -> Int -> (ReduceM a -> ReduceM a) -> ReduceM a-> ReduceM a #-} applyWhenVerboseS :: HasOptions m => VerboseKey -> Int -> (m a -> m a) -> m a -> m a applyWhenVerboseS k n f a = ifM (hasVerbosity k n) (f a) a instance MonadDebug ReduceM where traceDebugMessage n s cont = do ReduceEnv env st <- askR unsafePerformIO $ do _ <- runTCM env st $ displayDebugMessage n s return $ cont formatDebugMessage k n d = do ReduceEnv env st <- askR unsafePerformIO $ do (s , _) <- runTCM env st $ formatDebugMessage k n d return $ return s instance HasConstInfo ReduceM where getRewriteRulesFor = defaultGetRewriteRulesFor getTCState getConstInfo' q = do ReduceEnv env st <- askR defaultGetConstInfo st env q Agda-2.6.0.1/src/full/Agda/TypeChecking/Reduce/Fast.hs0000644000000000000000000021031113466402171020304 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeFamilies #-} {-| This module implements the Agda Abstract Machine used for compile-time reduction. It's a call-by-need environment machine with an implicit heap maintained using 'STRef's. See the 'AM' type below for a description of the machine. Some other tricks that improves performance: - Memoise getConstInfo. A big chunk of the time during reduction is spent looking up definitions in the signature. Any long-running reduction will use only a handful definitions though, so memoising getConstInfo is a big win. - Optimised case trees. Since we memoise getConstInfo we can do some preprocessing of the definitions, returning a 'CompactDef' instead of a 'Definition'. In particular we streamline the case trees used for matching in a few ways: - Drop constructor arity information. - Use NameId instead of QName as map keys. - Special branch for natural number successor. None of these changes would make sense to incorporate into the actual case trees. The first two loses information that we need in other places and the third would complicate a lot of code working with case trees. 'CompactDef' also has a special representation for built-in/primitive functions that can be implemented as pure functions from 'Literal's. -} module Agda.TypeChecking.Reduce.Fast ( fastReduce, fastNormalise ) where import Control.Arrow (first, second) import Control.Applicative hiding (empty) import Control.Monad.Reader import Control.Monad.ST import Control.Monad.ST.Unsafe (unsafeSTToIO, unsafeInterleaveST) import Data.Map (Map) import qualified Data.Map as Map import qualified Data.IntMap as IntMap import qualified Data.IntSet as IntSet import qualified Data.List as List import Data.Traversable (traverse) import Data.Coerce import Data.Semigroup ((<>)) import System.IO.Unsafe (unsafePerformIO) import Data.IORef import Data.STRef import Data.Char import Debug.Trace (trace) import Agda.Syntax.Internal import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.TypeChecking.CompiledClause import Agda.TypeChecking.Monad hiding (Closure(..)) import Agda.TypeChecking.Reduce as R import Agda.TypeChecking.Rewriting (rewrite) import Agda.TypeChecking.Reduce.Monad as RedM import Agda.TypeChecking.Substitute import Agda.TypeChecking.Monad.Builtin hiding (constructorForm) import Agda.TypeChecking.CompiledClause.Match () import Agda.TypeChecking.Free.Precompute import Agda.Interaction.Options import Agda.Utils.Float import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Memo import Agda.Utils.Null (empty) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Size import Agda.Utils.Zipper #include "undefined.h" import Agda.Utils.Impossible import Debug.Trace -- * Compact definitions -- This is what the memoised getConstInfo returns. We essentially pick out only the -- information needed for fast reduction from the definition. data CompactDef = CompactDef { cdefDelayed :: Bool , cdefNonterminating :: Bool , cdefUnconfirmed :: Bool , cdefDef :: CompactDefn , cdefRewriteRules :: RewriteRules } data CompactDefn = CFun { cfunCompiled :: FastCompiledClauses, cfunProjection :: Maybe QName } | CCon { cconSrcCon :: ConHead, cconArity :: Int } | CForce -- ^ primForce | CErase -- ^ primErase | CTyCon -- ^ Datatype or record type. Need to know this for primForce. | CAxiom -- ^ Axiom or abstract defn | CPrimOp Int ([Literal] -> Term) (Maybe FastCompiledClauses) -- ^ Literals in reverse argument order | COther -- ^ In this case we fall back to slow reduction data BuiltinEnv = BuiltinEnv { bZero, bSuc, bTrue, bFalse, bRefl :: Maybe ConHead , bPrimForce, bPrimErase :: Maybe QName } -- | Compute a 'CompactDef' from a regular definition. compactDef :: BuiltinEnv -> Definition -> RewriteRules -> ReduceM CompactDef compactDef bEnv def rewr = do cdefn <- case theDef def of _ | Just (defName def) == bPrimForce bEnv -> pure CForce _ | Just (defName def) == bPrimErase bEnv -> case telView' (defType def) of TelV tel _ | size tel == 5 -> pure CErase | otherwise -> pure COther -- Non-standard equality. Fall back to slow reduce. Constructor{conSrcCon = c, conArity = n} -> pure CCon{cconSrcCon = c, cconArity = n} Function{funCompiled = Just cc, funClauses = _:_, funProjection = proj} -> pure CFun{ cfunCompiled = fastCompiledClauses bEnv cc , cfunProjection = projOrig <$> proj } Function{funClauses = []} -> pure CAxiom Function{} -> pure COther -- Incomplete definition Datatype{dataClause = Nothing} -> pure CTyCon Record{recClause = Nothing} -> pure CTyCon Datatype{} -> pure COther -- TODO Record{} -> pure COther -- TODO Axiom{} -> pure CAxiom DataOrRecSig{} -> pure CAxiom AbstractDefn{} -> pure CAxiom GeneralizableVar{} -> __IMPOSSIBLE__ Primitive{ primName = name, primCompiled = cc } -> case name of -- "primShowInteger" -- integers are not literals -- Natural numbers "primNatPlus" -> mkPrim 2 $ natOp (+) "primNatMinus" -> mkPrim 2 $ natOp (\ x y -> max 0 (x - y)) "primNatTimes" -> mkPrim 2 $ natOp (*) "primNatDivSucAux" -> mkPrim 4 $ natOp4 divAux "primNatModSucAux" -> mkPrim 4 $ natOp4 modAux "primNatLess" -> mkPrim 2 $ natRel (<) "primNatEquality" -> mkPrim 2 $ natRel (==) -- Word64 "primWord64ToNat" -> mkPrim 1 $ \ [LitWord64 _ a] -> nat (fromIntegral a) "primWord64FromNat" -> mkPrim 1 $ \ [LitNat _ a] -> word (fromIntegral a) -- Levels are not literals -- "primLevelZero" -- "primLevelSuc" -- "primLevelMax" -- Floats "primNatToFloat" -> mkPrim 1 $ \ [LitNat _ a] -> float (fromIntegral a) "primFloatPlus" -> mkPrim 2 $ floatOp (+) "primFloatMinus" -> mkPrim 2 $ floatOp (-) "primFloatTimes" -> mkPrim 2 $ floatOp (*) "primFloatNegate" -> mkPrim 1 $ floatFun negate "primFloatDiv" -> mkPrim 2 $ floatOp (/) "primFloatEquality" -> mkPrim 2 $ floatRel floatEq "primFloatLess" -> mkPrim 2 $ floatRel floatLt "primFloatNumericalEquality" -> mkPrim 2 $ floatRel (==) "primFloatNumericalLess" -> mkPrim 2 $ floatRel (<) "primFloatSqrt" -> mkPrim 1 $ floatFun sqrt -- "primRound" -- Integers are not literals -- "primFloor" -- "primCeiling" "primExp" -> mkPrim 1 $ floatFun exp "primLog" -> mkPrim 1 $ floatFun log "primSin" -> mkPrim 1 $ floatFun sin "primCos" -> mkPrim 1 $ floatFun cos "primTan" -> mkPrim 1 $ floatFun tan "primASin" -> mkPrim 1 $ floatFun asin "primACos" -> mkPrim 1 $ floatFun acos "primATan" -> mkPrim 1 $ floatFun atan "primATan2" -> mkPrim 2 $ floatOp atan2 "primShowFloat" -> mkPrim 1 $ \ [LitFloat _ a] -> string (show a) -- Characters "primCharEquality" -> mkPrim 2 $ charRel (==) "primIsLower" -> mkPrim 1 $ charPred isLower "primIsDigit" -> mkPrim 1 $ charPred isDigit "primIsAlpha" -> mkPrim 1 $ charPred isAlpha "primIsSpace" -> mkPrim 1 $ charPred isSpace "primIsAscii" -> mkPrim 1 $ charPred isAscii "primIsLatin1" -> mkPrim 1 $ charPred isLatin1 "primIsPrint" -> mkPrim 1 $ charPred isPrint "primIsHexDigit" -> mkPrim 1 $ charPred isHexDigit "primToUpper" -> mkPrim 1 $ charFun toUpper "primToLower" -> mkPrim 1 $ charFun toLower "primCharToNat" -> mkPrim 1 $ \ [LitChar _ a] -> nat (fromIntegral (fromEnum a)) "primNatToChar" -> mkPrim 1 $ \ [LitNat _ a] -> char (toEnum $ fromIntegral $ a `mod` 0x110000) "primShowChar" -> mkPrim 1 $ \ a -> string (show $ pretty a) -- Strings -- "primStringToList" -- We don't have the list builtins (but could have, TODO) -- "primStringFromList" -- and they are not literals "primStringAppend" -> mkPrim 2 $ \ [LitString _ a, LitString _ b] -> string (b ++ a) "primStringEquality" -> mkPrim 2 $ \ [LitString _ a, LitString _ b] -> bool (b == a) "primShowString" -> mkPrim 1 $ \ a -> string (show $ pretty a) -- "primErase" -- "primForce" -- "primForceLemma" "primQNameEquality" -> mkPrim 2 $ \ [LitQName _ a, LitQName _ b] -> bool (b == a) "primQNameLess" -> mkPrim 2 $ \ [LitQName _ a, LitQName _ b] -> bool (b < a) "primShowQName" -> mkPrim 1 $ \ [LitQName _ a] -> string (show a) -- "primQNameFixity" -- We don't have fixity builtins (TODO) "primMetaEquality" -> mkPrim 2 $ \ [LitMeta _ _ a, LitMeta _ _ b] -> bool (b == a) "primMetaLess" -> mkPrim 2 $ \ [LitMeta _ _ a, LitMeta _ _ b] -> bool (b < a) "primShowMeta" -> mkPrim 1 $ \ [LitMeta _ _ a] -> string (show (pretty a)) _ -> pure COther where fcc = fastCompiledClauses bEnv <$> cc mkPrim n op = pure $ CPrimOp n op fcc divAux k m n j = k + div (max 0 $ n + m - j) (m + 1) modAux k m n j | n > j = mod (n - j - 1) (m + 1) | otherwise = k + n ~(Just true) = bTrue bEnv <&> \ c -> Con c ConOSystem [] ~(Just false) = bFalse bEnv <&> \ c -> Con c ConOSystem [] bool a = if a then true else false nat a = Lit . LitNat noRange $! a word a = Lit . LitWord64 noRange $! a float a = Lit . LitFloat noRange $! a string a = Lit . LitString noRange $! a char a = Lit . LitChar noRange $! a -- Remember reverse order! natOp f [LitNat _ a, LitNat _ b] = nat (f b a) natOp _ _ = __IMPOSSIBLE__ natOp4 f [LitNat _ a, LitNat _ b, LitNat _ c, LitNat _ d] = nat (f d c b a) natOp4 _ _ = __IMPOSSIBLE__ natRel f [LitNat _ a, LitNat _ b] = bool (f b a) natRel _ _ = __IMPOSSIBLE__ floatFun f [LitFloat _ a] = float (f a) floatFun _ _ = __IMPOSSIBLE__ floatOp f [LitFloat _ a, LitFloat _ b] = float (f b a) floatOp _ _ = __IMPOSSIBLE__ floatRel f [LitFloat _ a, LitFloat _ b] = bool (f b a) floatRel _ _ = __IMPOSSIBLE__ charFun f [LitChar _ a] = char (f a) charFun _ _ = __IMPOSSIBLE__ charPred f [LitChar _ a] = bool (f a) charPred _ _ = __IMPOSSIBLE__ charRel f [LitChar _ a, LitChar _ b] = bool (f b a) charRel _ _ = __IMPOSSIBLE__ return $ CompactDef { cdefDelayed = defDelayed def == Delayed , cdefNonterminating = defNonterminating def , cdefUnconfirmed = defTerminationUnconfirmed def , cdefDef = cdefn , cdefRewriteRules = rewr } -- Faster case trees ------------------------------------------------------ data FastCase c = FBranches { fprojPatterns :: Bool -- ^ We are constructing a record here (copatterns). -- 'conBranches' lists projections. , fconBranches :: Map NameId c -- ^ Map from constructor (or projection) names to their arity -- and the case subtree. (Projections have arity 0.) , fsucBranch :: Maybe c , flitBranches :: Map Literal c -- ^ Map from literal to case subtree. , fcatchAllBranch :: Maybe c -- ^ (Possibly additional) catch-all clause. , ffallThrough :: Bool -- ^ (if True) In case of non-canonical argument use catchAllBranch. } noBranches :: FastCase a noBranches = FBranches{ fprojPatterns = False , fconBranches = Map.empty , fsucBranch = Nothing , flitBranches = Map.empty , fcatchAllBranch = Nothing , ffallThrough = False } -- | Case tree with bodies. data FastCompiledClauses = FCase Int (FastCase FastCompiledClauses) -- ^ @Case n bs@ stands for a match on the @n@-th argument -- (counting from zero) with @bs@ as the case branches. -- If the @n@-th argument is a projection, we have only 'conBranches' -- with arity 0. | FEta Int [Arg QName] FastCompiledClauses (Maybe FastCompiledClauses) -- ^ Match on record constructor. Can still have a catch-all though. Just -- contains the fields, not the actual constructor. | FDone [Arg ArgName] Term -- ^ @Done xs b@ stands for the body @b@ where the @xs@ contains hiding -- and name suggestions for the free variables. This is needed to build -- lambdas on the right hand side for partial applications which can -- still reduce. | FFail -- ^ Absurd case. fastCompiledClauses :: BuiltinEnv -> CompiledClauses -> FastCompiledClauses fastCompiledClauses bEnv cc = case cc of Fail -> FFail Done xs b -> FDone xs b Case (Arg _ n) Branches{ etaBranch = Just (c, cc), catchAllBranch = ca } -> FEta n (conFields c) (fastCompiledClauses bEnv $ content cc) (fastCompiledClauses bEnv <$> ca) Case (Arg _ n) bs -> FCase n (fastCase bEnv bs) fastCase :: BuiltinEnv -> Case CompiledClauses -> FastCase FastCompiledClauses fastCase env (Branches proj con _ lit wild fT _) = FBranches { fprojPatterns = proj , fconBranches = Map.mapKeysMonotonic (nameId . qnameName) $ fmap (fastCompiledClauses env . content) (stripSuc con) , fsucBranch = fmap (fastCompiledClauses env . content) $ flip Map.lookup con . conName =<< bSuc env , flitBranches = fmap (fastCompiledClauses env) lit , ffallThrough = fromMaybe False fT , fcatchAllBranch = fmap (fastCompiledClauses env) wild } where stripSuc | Just c <- bSuc env = Map.delete (conName c) | otherwise = id {-# INLINE lookupCon #-} lookupCon :: QName -> FastCase c -> Maybe c lookupCon c (FBranches _ cons _ _ _ _) = Map.lookup (nameId $ qnameName c) cons -- QName memo ------------------------------------------------------------- {-# NOINLINE memoQName #-} memoQName :: (QName -> a) -> (QName -> a) memoQName f = unsafePerformIO $ do tbl <- newIORef Map.empty return (unsafePerformIO . f' tbl) where f' tbl x = do let i = nameId (qnameName x) m <- readIORef tbl case Map.lookup i m of Just y -> return y Nothing -> do let y = f x writeIORef tbl (Map.insert i y m) return y -- * Fast reduction data Normalisation = WHNF | NF deriving (Eq) data ReductionFlags = ReductionFlags { allowNonTerminating :: Bool , allowUnconfirmed :: Bool , hasRewriting :: Bool } -- | The entry point to the reduction machine. fastReduce :: Term -> ReduceM (Blocked Term) fastReduce = fastReduce' WHNF fastNormalise :: Term -> ReduceM Term fastNormalise v = ignoreBlocking <$> fastReduce' NF v fastReduce' :: Normalisation -> Term -> ReduceM (Blocked Term) fastReduce' norm v = do let name (Con c _ _) = c name _ = __IMPOSSIBLE__ zero <- fmap name <$> getBuiltin' builtinZero suc <- fmap name <$> getBuiltin' builtinSuc true <- fmap name <$> getBuiltin' builtinTrue false <- fmap name <$> getBuiltin' builtinFalse refl <- fmap name <$> getBuiltin' builtinRefl force <- fmap primFunName <$> getPrimitive' "primForce" erase <- fmap primFunName <$> getPrimitive' "primErase" let bEnv = BuiltinEnv { bZero = zero, bSuc = suc, bTrue = true, bFalse = false, bRefl = refl, bPrimForce = force, bPrimErase = erase } allowedReductions <- asksTC envAllowedReductions rwr <- optRewriting <$> pragmaOptions constInfo <- unKleisli $ \f -> do info <- getConstInfo f rewr <- if rwr then instantiateRewriteRules =<< getRewriteRulesFor f else return [] compactDef bEnv info rewr let flags = ReductionFlags{ allowNonTerminating = elem NonTerminatingReductions allowedReductions , allowUnconfirmed = elem UnconfirmedReductions allowedReductions , hasRewriting = rwr } ReduceM $ \ redEnv -> reduceTm redEnv bEnv (memoQName constInfo) norm flags v unKleisli :: (a -> ReduceM b) -> ReduceM (a -> b) unKleisli f = ReduceM $ \ env x -> unReduceM (f x) env -- * Closures -- | The abstract machine represents terms as closures containing a 'Term', an environment, and a -- spine of eliminations. Note that the environment doesn't necessarily bind all variables in the -- term. The variables in the context in which the abstract machine is started are free in -- closures. The 'IsValue' argument tracks whether the closure is in weak-head normal form. data Closure s = Closure IsValue Term (Env s) (Spine s) -- ^ The environment applies to the 'Term' argument. The spine contains closures -- with their own environments. -- | Used to track if a closure is @Unevaluated@ or a @Value@ (in weak-head normal form), and if so -- why it cannot reduce further. data IsValue = Value Blocked_ | Unevaled -- | The spine is a list of eliminations. Application eliminations contain pointers. type Spine s = [Elim' (Pointer s)] isValue :: Closure s -> IsValue isValue (Closure isV _ _ _) = isV setIsValue :: IsValue -> Closure s -> Closure s setIsValue isV (Closure _ t env spine) = Closure isV t env spine -- | Apply a closure to a spine of eliminations. Note that this does not preserve the 'IsValue' -- field. clApply :: Closure s -> Spine s -> Closure s clApply c [] = c clApply (Closure _ t env es) es' = Closure Unevaled t env (es <> es') -- | Apply a closure to a spine, preserving the 'IsValue' field. Use with care, since usually -- eliminations do not preserve the value status. clApply_ :: Closure s -> Spine s -> Closure s clApply_ c [] = c clApply_ (Closure b t env es) es' = Closure b t env (es <> es') -- * Pointers and thunks -- | Spines and environments contain pointers to closures to enable call-by-need evaluation. data Pointer s = Pure (Closure s) -- ^ Not a pointer. Used for closures that do not need to be shared to avoid -- unnecessary updates. | Pointer {-# UNPACK #-} !(STPointer s) -- ^ An actual pointer is an 'STRef' to a 'Thunk'. The thunk is set to 'BlackHole' -- during the evaluation of its contents to make debugging loops easier. type STPointer s = STRef s (Thunk (Closure s)) -- | A thunk is either a black hole or contains a value. data Thunk a = BlackHole | Thunk a deriving (Functor) derefPointer :: Pointer s -> ST s (Thunk (Closure s)) derefPointer (Pure x) = return (Thunk x) derefPointer (Pointer ptr) = readSTRef ptr -- | In most cases pointers that we dereference do not contain black holes. derefPointer_ :: Pointer s -> ST s (Closure s) derefPointer_ ptr = do Thunk cl <- derefPointer ptr return cl -- | Only use for debug printing! unsafeDerefPointer :: Pointer s -> Thunk (Closure s) unsafeDerefPointer (Pure x) = Thunk x unsafeDerefPointer (Pointer p) = unsafePerformIO (unsafeSTToIO (readSTRef p)) readPointer :: STPointer s -> ST s (Thunk (Closure s)) readPointer = readSTRef storePointer :: STPointer s -> Closure s -> ST s () storePointer ptr !cl = writeSTRef ptr (Thunk cl) -- Note the strict match. To prevent leaking memory in case of unnecessary updates. blackHole :: STPointer s -> ST s () blackHole ptr = writeSTRef ptr BlackHole -- | Create a thunk. If the closure is a naked variable we can reuse the pointer from the -- environment to avoid creating long pointer chains. createThunk :: Closure s -> ST s (Pointer s) createThunk (Closure _ (Var x []) env spine) | null spine, Just p <- lookupEnv x env = return p createThunk cl = Pointer <$> newSTRef (Thunk cl) -- | Create a thunk that is not shared or updated. pureThunk :: Closure s -> Pointer s pureThunk = Pure -- * Environments -- | The environment of a closure binds pointers to deBruijn indicies. newtype Env s = Env [Pointer s] emptyEnv :: Env s emptyEnv = Env [] isEmptyEnv :: Env s -> Bool isEmptyEnv (Env xs) = null xs envSize :: Env s -> Int envSize (Env xs) = length xs envToList :: Env s -> [Pointer s] envToList (Env xs) = xs extendEnv :: Pointer s -> Env s -> Env s extendEnv p (Env xs) = Env (p : xs) -- | Unsafe. lookupEnv_ :: Int -> Env s -> Pointer s lookupEnv_ i (Env e) = indexWithDefault __IMPOSSIBLE__ e i -- Andreas, 2018-11-12, which isn't this just Agda.Utils.List.!!! ? lookupEnv :: Int -> Env s -> Maybe (Pointer s) lookupEnv i e | i < n = Just (lookupEnv_ i e) | otherwise = Nothing where n = envSize e -- * The Agda Abstract Machine -- | The abstract machine state has two states 'Eval' and 'Match' that determine what the machine is -- currently working on: evaluating a closure in the Eval state and matching a spine against a -- case tree in the Match state. Both states contain a 'ControlStack' of continuations for what to -- do next. The heap is maintained implicitly using 'STRef's, hence the @s@ parameter. data AM s = Eval (Closure s) !(ControlStack s) -- ^ Evaluate the given closure (the focus) to weak-head normal form. If the 'IsValue' -- field of the closure is 'Value' we look at the control stack for what to do. Being -- strict in the control stack is important! We can spend a lot of steps with -- unevaluated closures (where we update, but don't look at the control stack). For -- instance, long chains of 'suc' constructors. | Match QName FastCompiledClauses (Spine s) (MatchStack s) (ControlStack s) -- ^ @Match f cc spine stack ctrl@ Match the arguments @spine@ against the case tree -- @cc@. The match stack contains a (possibly empty) list of 'CatchAll' frames and a -- closure to return in case of a stuck match. -- | The control stack contains a list of continuations, i.e. what to do with -- the result of the current focus. type ControlStack s = [ControlFrame s] -- | The control stack for matching. Contains a list of CatchAllFrame's and the closure to return in -- case of a stuck match. data MatchStack s = [CatchAllFrame s] :> Closure s infixr 2 :>, >: (>:) :: CatchAllFrame s -> MatchStack s -> MatchStack s c >: cs :> cl = c : cs :> cl data CatchAllFrame s = CatchAll FastCompiledClauses (Spine s) -- ^ @CatchAll cc spine@. Case trees are not fully expanded, that is, -- inner matches can be partial and covered by a catch-all at a higher -- level. This catch-all is represented on the match stack as a -- @CatchAll@. @cc@ is the case tree in the catch-all case and @spine@ is -- the value of the pattern variables at the point of the catch-all. -- An Elim' with a hole. data ElimZipper a = ApplyCxt ArgInfo | IApplyType a a | IApplyFst a a | IApplySnd a a deriving (Eq, Ord, Show, Functor, Foldable, Traversable) instance Zipper (ElimZipper a) where type Carrier (ElimZipper a) = Elim' a type Element (ElimZipper a) = a firstHole (Apply arg) = Just (unArg arg, ApplyCxt (argInfo arg)) firstHole (IApply a x y) = Just (a, IApplyType x y) firstHole Proj{} = Nothing plugHole x (ApplyCxt i) = Apply (Arg i x) plugHole a (IApplyType x y) = IApply a x y plugHole x (IApplyFst a y) = IApply a x y plugHole y (IApplySnd a x) = IApply a x y nextHole a (IApplyType x y) = Right (x, IApplyFst a y) nextHole x (IApplyFst a y) = Right (y, IApplySnd a x) nextHole y (IApplySnd a x) = Left (IApply a x y) nextHole x c@ApplyCxt{} = Left (plugHole x c) -- | A spine with a single hole for a pointer. type SpineContext s = ComposeZipper (ListZipper (Elim' (Pointer s))) (ElimZipper (Pointer s)) -- | Control frames are continuations that act on value closures. data ControlFrame s = CaseK QName ArgInfo (FastCase FastCompiledClauses) (Spine s) (Spine s) (MatchStack s) -- ^ @CaseK f i bs spine0 spine1 stack@. Pattern match on the focus (with -- arg info @i@) using the @bs@ case tree. @f@ is the name of the function -- doing the matching, and @spine0@ and @spine1@ are the values bound to -- the pattern variables to the left and right (respectively) of the -- focus. The match stack contains catch-all cases we need to consider if -- this match fails. | ArgK (Closure s) (SpineContext s) -- ^ @ArgK cl cxt@. Used when computing full normal forms. The closure is -- the head and the context is the spine with the current focus removed. | NormaliseK -- ^ Indicates that the focus should be evaluated to full normal form. | ForceK QName (Spine s) (Spine s) -- ^ @ForceK f spine0 spine1@. Evaluating @primForce@ of the focus. @f@ is -- the name of @primForce@ and is used to build the result if evaluation -- gets stuck. @spine0@ are the level and type arguments and @spine1@ -- contains (if not empty) the continuation and any additional -- eliminations. | EraseK QName (Spine s) (Spine s) (Spine s) (Spine s) -- ^ @EraseK f spine0 spine1 spine2 spine3@. Evaluating @primErase@. The -- first contains the level and type arguments. @spine1@ and @spine2@ -- contain at most one argument between them. If in @spine1@ it's the -- value closure of the first argument to be compared and if in @spine2@ -- it's the unevaluated closure of the second argument. -- @spine3@ contains the proof of equality we are erasing. It is passed -- around but never actually inspected. | NatSucK Integer -- ^ @NatSucK n@. Add @n@ to the focus. If the focus computes to a natural -- number literal this returns a new literal, otherwise it constructs @n@ -- calls to @suc@. | PrimOpK QName ([Literal] -> Term) [Literal] [Pointer s] (Maybe FastCompiledClauses) -- ^ @PrimOpK f op lits es cc@. Evaluate the primitive function @f@ using -- the Haskell function @op@. @op@ gets a list of literal values in -- reverse order for the arguments of @f@ and computes the result as a -- term. The already computed arguments (in reverse order) are @lits@ and -- @es@ are the arguments that should be computed after the current focus. -- In case of built-in functions with corresponding Agda implementations, -- @cc@ contains the case tree. | UpdateThunk [STPointer s] -- ^ @UpdateThunk ps@. Update the pointers @ps@ with the value of the -- current focus. | ApplyK (Spine s) -- ^ @ApplyK spine@. Apply the current focus to the eliminations in @spine@. -- This is used when a thunk needs to be updated with a partial -- application of a function. -- * Compilation and decoding -- | The initial abstract machine state. Wrap the term to be evaluated in an empty closure. Note -- that free variables of the term are treated as constants by the abstract machine. If computing -- full normal form we start off the control stack with a 'NormaliseK' continuation. compile :: Normalisation -> Term -> AM s compile nf t = Eval (Closure Unevaled t emptyEnv []) [NormaliseK | nf == NF] -- | The abstract machine treats uninstantiated meta-variables as blocked, but the rest of Agda does -- not. topMetaIsNotBlocked :: Blocked Term -> Blocked Term topMetaIsNotBlocked (Blocked _ t@MetaV{}) = notBlocked t topMetaIsNotBlocked b = b decodePointer :: Pointer s -> ST s Term decodePointer p = decodeClosure_ =<< derefPointer_ p -- | Note: it's important to be lazy in the spine and environment when decoding. Hence the -- 'unsafeInterleaveST' here and in 'decodeEnv', and the special version of 'parallelS' in -- 'decodeClosure'. decodeSpine :: Spine s -> ST s Elims decodeSpine spine = unsafeInterleaveST $ (traverse . traverse) decodePointer spine decodeEnv :: Env s -> ST s [Term] decodeEnv env = unsafeInterleaveST $ traverse decodePointer (envToList env) decodeClosure_ :: Closure s -> ST s Term decodeClosure_ = ignoreBlocking <.> decodeClosure -- | Turning an abstract machine closure back into a term. This happens in three cases: -- * when reduction is finished and we return the weak-head normal term to the outside world. -- * when the abstract machine encounters something it cannot handle and falls back to the slow -- reduction engine -- * when there are rewrite rules to apply decodeClosure :: Closure s -> ST s (Blocked Term) decodeClosure (Closure isV t env spine) = do vs <- decodeEnv env es <- decodeSpine spine return $ topMetaIsNotBlocked (applyE (applySubst (parS vs) t) es <$ b) where parS = foldr (:#) IdS -- parallelS is too strict b = case isV of Value b -> b Unevaled -> notBlocked () -- only when falling back to slow reduce in which case the -- blocking tag is immediately discarded -- | Turn a list of internal syntax eliminations into a spine. This builds closures and allocates -- thunks for all the 'Apply' elims. elimsToSpine :: Env s -> Elims -> ST s (Spine s) elimsToSpine env es = do spine <- mapM thunk es forceSpine spine `seq` return spine where -- Need to be strict in mkClosure to avoid memory leak forceSpine = foldl (\ () -> forceEl) () forceEl (Apply (Arg _ (Pure Closure{}))) = () forceEl (Apply (Arg _ (Pointer{}))) = () forceEl _ = () -- We don't preserve free variables of closures (in the sense of their -- decoding), since we freely add things to the spines. unknownFVs = setFreeVariables unknownFreeVariables thunk (Apply (Arg i t)) = Apply . Arg (unknownFVs i) <$> createThunk (closure (getFreeVariables i) t) thunk (Proj o f) = return (Proj o f) thunk (IApply a x y) = IApply <$> mkThunk a <*> mkThunk x <*> mkThunk y where mkThunk = createThunk . closure UnknownFVs -- Going straight for a value for literals is mostly to make debug traces -- less verbose and doesn't really buy anything performance-wise. closure _ t@Lit{} = Closure (Value $ notBlocked ()) t emptyEnv [] closure fv t = env' `seq` Closure Unevaled t env' [] where env' = trimEnvironment fv env -- | Trim unused entries from an environment. Currently only trims closed terms for performance -- reasons. trimEnvironment :: FreeVariables -> Env s -> Env s trimEnvironment UnknownFVs env = env trimEnvironment (KnownFVs fvs) env | IntSet.null fvs = emptyEnv -- Environment trimming is too expensive (costs 50% on some benchmarks), and while it does make -- some cases run in constant instead of linear space you need quite contrived examples to -- notice the effect. | otherwise = env -- Env $ trim 0 $ envToList env where -- Important: strict enough that the trimming actually happens trim _ [] = [] trim i (p : ps) | IntSet.member i fvs = (p :) $! trim (i + 1) ps | otherwise = (unusedPointer :) $! trim (i + 1) ps -- | Build an environment for a body with some given free variables from a spine of arguments. -- Returns a triple containing -- * the left-over variable names (in case of partial application) -- * the environment -- * the remaining spine (in case of over-application) buildEnv :: [Arg String] -> Spine s -> ([Arg String], Env s, Spine s) buildEnv xs spine = go xs spine emptyEnv where go [] sp env = ([], env, sp) go xs0@(x : xs) sp env = case sp of [] -> (xs0, env, sp) Apply c : sp -> go xs sp (unArg c `extendEnv` env) IApply x y r : sp -> go xs sp (r `extendEnv` env) _ -> __IMPOSSIBLE__ unusedPointerString :: String unusedPointerString = show (Impossible __FILE__ __LINE__) unusedPointer :: Pointer s unusedPointer = Pure (Closure (Value $ notBlocked ()) (Lit (LitString noRange unusedPointerString)) emptyEnv []) -- * Running the abstract machine -- | Evaluating a term in the abstract machine. It gets the type checking state and environment in -- the 'ReduceEnv' argument, some precomputed built-in mappings in 'BuiltinEnv', the memoised -- 'getConstInfo' function, a couple of flags (allow non-terminating function unfolding, and -- whether rewriting is enabled), and a term to reduce. The result is the weak-head normal form of -- the term with an attached blocking tag. reduceTm :: ReduceEnv -> BuiltinEnv -> (QName -> CompactDef) -> Normalisation -> ReductionFlags -> Term -> Blocked Term reduceTm rEnv bEnv !constInfo normalisation ReductionFlags{..} = compileAndRun . traceDoc "-- fast reduce --" where -- Helpers to get information from the ReduceEnv. metaStore = redSt rEnv ^. stMetaStore getMeta m = maybe __IMPOSSIBLE__ mvInstantiation (IntMap.lookup (metaId m) metaStore) partialDefs = runReduce getPartialDefs rewriteRules f = cdefRewriteRules (constInfo f) callByNeed = envCallByNeed (redEnv rEnv) iview = runReduce intervalView' runReduce :: ReduceM a -> a runReduce m = unReduceM m rEnv -- Debug output. Taking care that we only look at the verbosity level once. hasVerb tag lvl = unReduceM (hasVerbosity tag lvl) rEnv doDebug = hasVerb "tc.reduce.fast" 110 traceDoc :: Doc -> a -> a traceDoc | doDebug = trace . show | otherwise = const id -- Checking for built-in zero and suc BuiltinEnv{ bZero = zero, bSuc = suc, bRefl = refl0 } = bEnv conNameId = nameId . qnameName . conName isZero = case zero of Nothing -> const False Just z -> (conNameId z ==) . conNameId isSuc = case suc of Nothing -> const False Just s -> (conNameId s ==) . conNameId -- If there's a non-standard equality (for instance doubly-indexed) we fall back to slow reduce -- for primErase and "unbind" refl. refl = refl0 >>= \ c -> if cconArity (cdefDef $ constInfo $ conName c) == 0 then Just c else Nothing -- The entry point of the machine. compileAndRun :: Term -> Blocked Term compileAndRun t = runST (runAM (compile normalisation t)) -- Run the machine in a given state. Prints the state if the right verbosity level is active. runAM :: AM s -> ST s (Blocked Term) runAM = if doDebug then \ s -> trace (prettyShow s) (runAM' s) else runAM' -- The main function. This is where the stuff happens! runAM' :: AM s -> ST s (Blocked Term) -- Base case: The focus is a value closure and the control stack is empty. Decode and return. runAM' (Eval cl@(Closure Value{} _ _ _) []) = decodeClosure cl -- Unevaluated closure: inspect the term and take the appropriate action. For instance, -- - Change to the 'Match' state if a definition -- - Look up in the environment if variable -- - Perform a beta step if lambda and application elimination in the spine -- - Perform a record beta step if record constructor and projection elimination in the spine runAM' s@(Eval cl@(Closure Unevaled t env spine) !ctrl) = {-# SCC "runAM.Eval" #-} case t of -- Case: definition. Enter 'Match' state if defined function or shift to evaluating an -- argument and pushing the appropriate control frame for primitive functions. Fall back to -- slow reduce for unsupported definitions. Def f [] -> evalIApplyAM spine ctrl $ let CompactDef{ cdefDelayed = delayed , cdefNonterminating = nonterm , cdefUnconfirmed = unconf , cdefDef = def } = constInfo f dontUnfold = (nonterm && not allowNonTerminating) || (unconf && not allowUnconfirmed) || (delayed && not (unfoldDelayed ctrl)) in case def of CFun{ cfunCompiled = cc } | dontUnfold -> rewriteAM done | otherwise -> runAM (Match f cc spine ([] :> cl) ctrl) CAxiom -> rewriteAM done CTyCon -> rewriteAM done CCon{} -> runAM done -- Only happens for builtinSharp (which is a Def when you bind it) CForce | (spine0, Apply v : spine1) <- splitAt 4 spine -> evalPointerAM (unArg v) [] (ForceK f spine0 spine1 : ctrl) CForce -> runAM done -- partially applied CErase | (spine0, Apply v : spine1 : spine2) <- splitAt 2 spine -> evalPointerAM (unArg v) [] (EraseK f spine0 [] [spine1] spine2 : ctrl) CErase -> runAM done -- partially applied CPrimOp n op cc | length spine == n, -- PrimOps can't be over-applied. They don't Just (v : vs) <- allApplyElims spine -> -- return functions or records. evalPointerAM (unArg v) [] (PrimOpK f op [] (map unArg vs) cc : ctrl) CPrimOp{} -> runAM done -- partially applied COther -> fallbackAM s -- Case: zero. Return value closure with literal 0. Con c i [] | isZero c -> runAM (evalTrueValue (Lit (LitNat noRange 0)) emptyEnv spine ctrl) -- Case: suc. Suc is strict in its argument to make sure we return a literal whenever -- possible. Push a 'NatSucK' frame on the control stack and evaluate the argument. Con c i [] | isSuc c, Apply v : _ <- spine -> evalPointerAM (unArg v) [] (sucCtrl ctrl) -- Case: constructor. Perform beta reduction if projected from, otherwise return a value. Con c i [] -> evalIApplyAM spine ctrl $ case splitAt ar spine of (args, Proj _ p : spine') -> evalPointerAM (unArg arg) spine' ctrl -- Andreas #2170: fit argToDontCare here?! where fields = map unArg $ conFields c Just n = List.elemIndex p fields Apply arg = args !! n _ -> rewriteAM (evalTrueValue (Con c' i []) env spine ctrl) where CCon{cconSrcCon = c', cconArity = ar} = cdefDef (constInfo (conName c)) -- Case: variable. Look up the variable in the environment and evaluate the resulting -- pointer. If the variable is not in the environment it's a free variable and we adjust the -- deBruijn index appropriately. Var x [] -> evalIApplyAM spine ctrl $ case lookupEnv x env of Nothing -> runAM (evalValue (notBlocked ()) (Var (x - envSize env) []) emptyEnv spine ctrl) Just p -> evalPointerAM p spine ctrl -- Case: lambda. Perform the beta reduction if applied. Otherwise it's a value. Lam h b -> case spine of [] -> runAM done elim : spine' -> case b of Abs _ b -> runAM (evalClosure b (getArg elim `extendEnv` env) spine' ctrl) NoAbs _ b -> runAM (evalClosure b env spine' ctrl) where getArg (Apply v) = unArg v getArg (IApply _ _ v) = v getArg Proj{} = __IMPOSSIBLE__ -- Case: values. Literals and function types are already in weak-head normal form. -- We throw away the environment for literals mostly to make debug printing less verbose. -- And we know the spine is empty since literals cannot be applied or projected. Lit{} -> runAM (evalTrueValue t emptyEnv [] ctrl) Pi{} -> runAM done -- Case: non-empty spine. If the focused term has a non-empty spine, we shift the -- eliminations onto the spine. Def f es -> shiftElims (Def f []) emptyEnv env es Con c i es -> shiftElims (Con c i []) emptyEnv env es Var x es -> shiftElims (Var x []) env env es -- Case: metavariable. If it's instantiated evaluate the value. Meta instantiations are open -- terms with a specified list of free variables. buildEnv constructs the appropriate -- environment for the closure. Avoiding shifting spines for open metas -- save a bit of performance. MetaV m es -> evalIApplyAM spine ctrl $ case getMeta m of InstV xs t -> do spine' <- elimsToSpine env es let (zs, env, !spine'') = buildEnv xs (spine' <> spine) runAM (evalClosure (lams zs t) env spine'' ctrl) _ -> runAM (Eval (mkValue (blocked m ()) cl) ctrl) -- Case: unsupported. These terms are not handled by the abstract machine, so we fall back -- to slowReduceTerm for these. Level{} -> fallbackAM s Sort{} -> fallbackAM s DontCare{} -> fallbackAM s Dummy{} -> fallbackAM s where done = Eval (mkValue (notBlocked ()) cl) ctrl shiftElims t env0 env es = do spine' <- elimsToSpine env es runAM (evalClosure t env0 (spine' <> spine) ctrl) -- If the current focus is a value closure, we look at the control stack. -- Case NormaliseK: The focus is a weak-head value that should be fully normalised. runAM' s@(Eval cl@(Closure b t env spine) (NormaliseK : ctrl)) = case t of Def _ [] -> normaliseArgsAM (Closure b t emptyEnv []) spine ctrl Con _ _ [] -> normaliseArgsAM (Closure b t emptyEnv []) spine ctrl Var _ [] -> normaliseArgsAM (Closure b t emptyEnv []) spine ctrl MetaV _ [] -> normaliseArgsAM (Closure b t emptyEnv []) spine ctrl Lit{} -> runAM done -- We might get these from fallbackAM Def f es -> shiftElims (Def f []) emptyEnv env es Con c i es -> shiftElims (Con c i []) emptyEnv env es Var x es -> shiftElims (Var x []) env env es MetaV m es -> shiftElims (MetaV m []) emptyEnv env es _ -> fallbackAM s -- fallbackAM knows about NormaliseK where done = Eval (mkValue (notBlocked ()) cl) ctrl shiftElims t env0 env es = do spine' <- elimsToSpine env es runAM (Eval (Closure b t env0 (spine' <> spine)) (NormaliseK : ctrl)) -- Case: ArgK: We successfully normalised an argument. Start on the next argument, or if there -- isn't one we're done. runAM' (Eval cl (ArgK cl0 cxt : ctrl)) = case nextHole (pureThunk cl) cxt of Left spine -> runAM (Eval (clApply_ cl0 spine) ctrl) Right (p, cxt') -> evalPointerAM p [] (NormaliseK : ArgK cl0 cxt' : ctrl) -- Case: NatSucK m -- If literal add m to the literal, runAM' (Eval cl@(Closure Value{} (Lit (LitNat r n)) _ _) (NatSucK m : ctrl)) = runAM (evalTrueValue (Lit $! LitNat r $! m + n) emptyEnv [] ctrl) -- otherwise apply 'suc' m times. runAM' (Eval cl (NatSucK m : ctrl)) = runAM (Eval (mkValue (notBlocked ()) $ plus m cl) ctrl) where plus 0 cl = cl plus n cl = trueValue (Con (fromMaybe __IMPOSSIBLE__ suc) ConOSystem []) emptyEnv $ Apply (defaultArg arg) : [] where arg = pureThunk (plus (n - 1) cl) -- Case: PrimOpK -- If literal apply the primitive function if no more arguments, otherwise -- store the literal in the continuation and evaluate the next argument. runAM' (Eval (Closure _ (Lit a) _ _) (PrimOpK f op vs es cc : ctrl)) = case es of [] -> runAM (evalTrueValue (op (a : vs)) emptyEnv [] ctrl) e : es' -> evalPointerAM e [] (PrimOpK f op (a : vs) es' cc : ctrl) -- If not a literal we use the case tree if there is one, otherwise we are stuck. runAM' (Eval cl@(Closure (Value blk) _ _ _) (PrimOpK f _ vs es mcc : ctrl)) = case mcc of Nothing -> rewriteAM (Eval stuck ctrl) Just cc -> runAM (Match f cc spine ([] :> notstuck) ctrl) where p = pureThunk cl lits = map (pureThunk . litClos) (reverse vs) spine = fmap (Apply . defaultArg) $ lits <> [p] <> es stuck = Closure (Value blk) (Def f []) emptyEnv spine notstuck = Closure Unevaled (Def f []) emptyEnv spine litClos l = trueValue (Lit l) emptyEnv [] -- Case: ForceK. Here we need to check if the argument is a canonical form (i.e. not a variable -- or stuck function call) and if so apply the function argument to the value. If it's not -- canonical we are stuck. runAM' (Eval arg@(Closure (Value blk) t _ _) (ForceK pf spine0 spine1 : ctrl)) | isCanonical t = case spine1 of Apply k : spine' -> evalPointerAM (unArg k) (elim : spine') ctrl [] -> -- Partial application of primForce to canonical argument, return λ k → k arg. runAM (evalTrueValue (lam (defaultArg "k") $ Var 0 [Apply $ defaultArg $ Var 1 []]) (argPtr `extendEnv` emptyEnv) [] ctrl) _ -> __IMPOSSIBLE__ | otherwise = rewriteAM (Eval stuck ctrl) where argPtr = pureThunk arg elim = Apply (defaultArg argPtr) spine' = spine0 <> [elim] <> spine1 stuck = Closure (Value blk) (Def pf []) emptyEnv spine' isCanonical u = case u of Lit{} -> True Con{} -> True Lam{} -> True Pi{} -> True Sort{} -> True Level{} -> True DontCare{} -> True Dummy{} -> False MetaV{} -> False Var{} -> False Def q _ -- Type constructors (data/record) are considered canonical for 'primForce'. | CTyCon <- cdefDef (constInfo q) -> True | otherwise -> False -- Case: EraseK. We evaluate both arguments to values, then do a simple check for the easy -- cases and otherwise fall back to slow reduce. runAM' (Eval cl2@(Closure Value{} arg2 _ _) (EraseK f spine0 [Apply p1] _ spine3 : ctrl)) = do cl1@(Closure _ arg1 _ sp1) <- derefPointer_ (unArg p1) case (arg1, arg2) of (Lit l1, Lit l2) | l1 == l2, isJust refl -> runAM (evalTrueValue (Con (fromJust refl) ConOSystem []) emptyEnv [] ctrl) _ -> let spine = spine0 ++ map (Apply . hide . defaultArg . pureThunk) [cl1, cl2] ++ spine3 in fallbackAM (evalClosure (Def f []) emptyEnv spine ctrl) runAM' (Eval cl1@(Closure Value{} _ _ _) (EraseK f spine0 [] [Apply p2] spine3 : ctrl)) = evalPointerAM (unArg p2) [] (EraseK f spine0 [Apply $ hide $ defaultArg $ pureThunk cl1] [] spine3 : ctrl) runAM' (Eval _ (EraseK{} : _)) = __IMPOSSIBLE__ -- Case: UpdateThunk. Write the value to the pointers in the UpdateThunk frame. runAM' (Eval cl@(Closure Value{} _ _ _) (UpdateThunk ps : ctrl)) = mapM_ (`storePointer` cl) ps >> runAM (Eval cl ctrl) -- Case: ApplyK. Application after thunk update. Add the spine from the control frame to the -- closure. runAM' (Eval cl@(Closure Value{} _ _ _) (ApplyK spine : ctrl)) = runAM (Eval (clApply cl spine) ctrl) -- Case: CaseK. Pattern matching against a value. If it's a stuck value the pattern match is -- stuck and we return the closure from the match stack (see stuckMatch). Otherwise we need to -- find a matching branch switch to the Match state. If there is no matching branch we look for -- a CatchAll in the match stack, or fail if there isn't one (see failedMatch). If the current -- branches contain a catch-all case we need to push a CatchAll on the match stack if picking -- one of the other branches. runAM' (Eval cl@(Closure (Value blk) t env spine) ctrl0@(CaseK f i bs spine0 spine1 stack : ctrl)) = {-# SCC "runAM.CaseK" #-} case blk of Blocked{} | null [()|Con{} <- [t]] -> stuck -- we might as well check the blocking tag first _ -> case t of -- Case: suc constructor Con c ci [] | isSuc c -> matchSuc $ matchCatchall $ failedMatch f stack ctrl -- Case: constructor Con c ci [] -> matchCon c ci (length spine) $ matchCatchall $ failedMatch f stack ctrl -- Case: non-empty elims. We can get here from a fallback (which builds a value without -- shifting arguments onto spine) Con c ci es -> do spine' <- elimsToSpine env es runAM (evalValue blk (Con c ci []) emptyEnv (spine' <> spine) ctrl0) -- Case: natural number literals. Literal natural number patterns are translated to -- suc-matches, so there is no need to try matchLit. Lit (LitNat _ 0) -> matchLitZero $ matchCatchall $ failedMatch f stack ctrl Lit (LitNat _ n) -> matchLitSuc n $ matchCatchall $ failedMatch f stack ctrl -- Case: literal Lit l -> matchLit l $ matchCatchall $ failedMatch f stack ctrl -- Case: hcomp Def q [] | isJust $ lookupCon q bs -> matchCon' q (length spine) $ matchCatchall $ failedMatch f stack ctrl Def q es | isJust $ lookupCon q bs -> do spine' <- elimsToSpine env es runAM (evalValue blk (Def q []) emptyEnv (spine' <> spine) ctrl0) -- Case: not constructor or literal. In this case we are stuck. _ -> stuck where -- If ffallThrough is set we take the catch-all (if any) rather than being stuck. I think -- this happens for partial functions with --cubical (@saizan: is this true?). stuck | ffallThrough bs = matchCatchall reallyStuck | otherwise = reallyStuck reallyStuck = do -- Compute new reason for being stuck. See Agda.Syntax.Internal.stuckOn for the logic. blk' <- case blk of Blocked{} -> return blk NotBlocked r _ -> decodeClosure_ cl <&> \ v -> NotBlocked (stuckOn (Apply $ Arg i v) r) () stuckMatch blk' stack ctrl -- This the spine at this point in the matching. A catch-all match doesn't change the spine. catchallSpine = spine0 <> [Apply $ Arg i p] <> spine1 where p = pureThunk cl -- cl is already a value so no need to thunk it. -- Push catch-all frame on the match stack if there is a catch-all (and we're not taking it -- right now). catchallStack = case fcatchAllBranch bs of Nothing -> stack Just cc -> CatchAll cc catchallSpine >: stack -- The matchX functions below all take an extra argument which is what to do if there is no -- appropriate branch in the case tree. ifJust is maybe with a different argument order -- letting you chain a bunch if maybe matches in if-then-elseif fashion. (m `ifJust` f) z = maybe z f m -- Matching constructor: Switch to the Match state, inserting the constructor arguments in -- the spine between spine0 and spine1. matchCon c ci ar = matchCon' (conName c) ar matchCon' q ar = lookupCon q bs `ifJust` \ cc -> runAM (Match f cc (spine0 <> spine <> spine1) catchallStack ctrl) -- Catch-all: Don't add a CatchAll to the match stack since this _is_ the catch-all. matchCatchall = fcatchAllBranch bs `ifJust` \ cc -> runAM (Match f cc catchallSpine stack ctrl) -- Matching literal: Switch to the Match state. There are no arguments to add to the spine. matchLit l = Map.lookup l (flitBranches bs) `ifJust` \ cc -> runAM (Match f cc (spine0 <> spine1) catchallStack ctrl) -- Matching a 'suc' constructor: Insert the argument in the spine. matchSuc = fsucBranch bs `ifJust` \ cc -> runAM (Match f cc (spine0 <> spine <> spine1) catchallStack ctrl) -- Matching a non-zero natural number literal: Subtract one from the literal and -- insert it in the spine for the Match state. matchLitSuc n = fsucBranch bs `ifJust` \ cc -> runAM (Match f cc (spine0 <> [Apply $ defaultArg arg] <> spine1) catchallStack ctrl) where n' = n - 1 arg = pureThunk $ trueValue (Lit $ LitNat noRange n') emptyEnv [] -- Matching a literal 0. Simply calls matchCon with the zero constructor. matchLitZero = matchCon (fromMaybe __IMPOSSIBLE__ zero) ConOSystem 0 -- If we have a nat literal we have builtin zero. -- Case: Match state. Here we look at the case tree and take the appropriate action: -- - FFail: stuck -- - FDone: evaluate body -- - FEta: eta expand argument -- - FCase on projection: pick corresponding branch and keep matching -- - FCase on argument: push CaseK frame on control stack and evaluate argument runAM' (Match f cc spine stack ctrl) = {-# SCC "runAM.Match" #-} case cc of -- Absurd match. You can get here for open terms. FFail -> stuckMatch (NotBlocked AbsurdMatch ()) stack ctrl -- Matching complete. Compute the environment for the body and switch to the Eval state. FDone xs body -> do -- Don't ask me why, but not being strict in the spine causes a memory leak. let (zs, env, !spine') = buildEnv xs spine runAM (Eval (Closure Unevaled (lams zs body) env spine') ctrl) -- A record pattern match. This does not block evaluation (since that would violate eta -- equality), so in this case we replace the argument with its projections in the spine and -- keep matching. FEta n fs cc ca -> case splitAt n spine of -- Question: add lambda here? doesn't (_, []) -> done Underapplied -- matter for equality, but might for (spine0, Apply e : spine1) -> do -- rewriting or 'with'. -- Replace e by its projections in the spine. And don't forget a -- CatchAll frame if there's a catch-all. let projClosure (Arg ai f) = Closure Unevaled (Var 0 []) (extendEnv (unArg e) emptyEnv) [Proj ProjSystem f] projs <- mapM (createThunk . projClosure) fs let spine' = spine0 <> map (Apply . defaultArg) projs <> spine1 stack' = caseMaybe ca stack $ \ cc -> CatchAll cc spine >: stack runAM (Match f cc spine' stack' ctrl) _ -> __IMPOSSIBLE__ -- Split on nth elimination in the spine. Can be either a regular split or a copattern -- split. FCase n bs -> case splitAt n spine of -- If the nth elimination is not given, we're stuck. (_, []) -> done Underapplied -- Apply elim: push the current match on the control stack and evaluate the argument (spine0, Apply e : spine1) -> evalPointerAM (unArg e) [] $ CaseK f (argInfo e) bs spine0 spine1 stack : ctrl -- Projection elim: in this case we must be in a copattern split and find the projection -- in the case tree and keep going. If it's not there it might be because it's not the -- original projection (issue #2265). If so look up the original projection instead. -- That _really_ should be there since copattern splits cannot be partial. Except of -- course, the user might still have written a partial function so we should check -- partialDefs before throwing an impossible (#3012). (spine0, Proj o p : spine1) -> case lookupCon p bs <|> ((`lookupCon` bs) =<< op) of Nothing | elem f partialDefs -> stuckMatch (NotBlocked MissingClauses ()) stack ctrl | otherwise -> __IMPOSSIBLE__ Just cc -> runAM (Match f cc (spine0 <> spine1) stack ctrl) where CFun{ cfunProjection = op } = cdefDef (constInfo p) (_, IApply{} : _) -> __IMPOSSIBLE__ -- Paths cannot be defined by pattern matching where done why = stuckMatch (NotBlocked why ()) stack ctrl -- 'evalPointerAM p spine ctrl'. Evaluate the closure pointed to by 'p' applied to 'spine' with -- the control stack 'ctrl'. If 'p' points to an unevaluated thunk, a 'BlackHole' is written to -- the pointer and an 'UpdateThunk' frame is pushed to the control stack. In this case the -- application to the spine has to be deferred until after the update through an 'ApplyK' frame. evalPointerAM :: Pointer s -> Spine s -> ControlStack s -> ST s (Blocked Term) evalPointerAM (Pure cl) spine ctrl = runAM (Eval (clApply cl spine) ctrl) evalPointerAM (Pointer p) spine ctrl = readPointer p >>= \ case BlackHole -> __IMPOSSIBLE__ Thunk cl@(Closure Unevaled _ _ _) | callByNeed -> do blackHole p runAM (Eval cl $ updateThunkCtrl p $ [ApplyK spine | not (null spine)] ++ ctrl) Thunk cl -> runAM (Eval (clApply cl spine) ctrl) -- 'evalIApplyAM spine ctrl fallback' checks if any 'IApply x y r' has a canonical 'r' (i.e. 0 or 1), -- in that case continues evaluating 'x' or 'y' with the rest of 'spine' and same 'ctrl'. -- If no such 'IApply' is found we continue with 'fallback'. evalIApplyAM :: Spine s -> ControlStack s -> ST s (Blocked Term) -> ST s (Blocked Term) evalIApplyAM es ctrl fallback = go es where -- written as a worker/wrapper to possibly trigger some -- specialization wrt fallback go [] = fallback go (IApply x y r : es) = do br <- evalPointerAM r [] [] case iview $ ignoreBlocking br of IZero -> evalPointerAM x es ctrl IOne -> evalPointerAM y es ctrl _ -> (<* blockedOrMeta br) <$> go es go (e : es) = go es -- Normalise the spine and apply the closure to the result. The closure must be a value closure. normaliseArgsAM :: Closure s -> Spine s -> ControlStack s -> ST s (Blocked Term) normaliseArgsAM cl [] ctrl = runAM (Eval cl ctrl) -- nothing to do normaliseArgsAM cl spine ctrl = case firstHole spine of -- v Only projections, nothing to do. Note clApply_ and not clApply (or we'd loop) Nothing -> runAM (Eval (clApply_ cl spine) ctrl) Just (p, cxt) -> evalPointerAM p [] (NormaliseK : ArgK cl cxt : ctrl) -- Fall back to slow reduction. This happens if we encounter a definition that's not supported -- by the machine (like a primitive function that does not work on literals), or a term that is -- not supported (Level, Sort, and DontCare at the moment). In this case we decode the current -- focus to a 'Term', call slow reduction and pack up the result in a value closure. If the top -- of the control stack is a 'NormaliseK' and the focus is a value closure (i.e. already in -- weak-head normal form) we call 'slowNormaliseArgs' and pop the 'NormaliseK' frame. Otherwise -- we use 'slowReduceTerm' to compute a weak-head normal form. fallbackAM :: AM s -> ST s (Blocked Term) fallbackAM (Eval c ctrl) = do v <- decodeClosure_ c runAM (mkValue $ runReduce $ slow v) where mkValue b = evalValue (() <$ b) (ignoreBlocking b) emptyEnv [] ctrl' (slow, ctrl') = case ctrl of NormaliseK : ctrl' | Value{} <- isValue c -> (notBlocked <.> slowNormaliseArgs, ctrl') _ -> (slowReduceTerm, ctrl) fallbackAM _ = __IMPOSSIBLE__ -- If rewriting is enabled, try to apply rewrite rules to the current focus before considering -- it a value. The current state must be 'Eval' and the focus a value closure. Take care to only -- test the 'hasRewriting' flag once. rewriteAM :: AM s -> ST s (Blocked Term) rewriteAM = if hasRewriting then rewriteAM' else runAM -- Applying rewrite rules to the current focus. This needs to decode the current focus, call -- rewriting and pack the result back up in a closure. In case some rewrite rules actually fired -- the next state is an unevaluated closure, otherwise it's a value closure. rewriteAM' :: AM s -> ST s (Blocked Term) rewriteAM' s@(Eval (Closure (Value blk) t env spine) ctrl) | null rewr = runAM s | otherwise = traceDoc ("R" <+> pretty s) $ do v0 <- decodeClosure_ (Closure Unevaled t env []) es <- decodeSpine spine case runReduce (rewrite blk v0 rewr es) of NoReduction b -> runAM (evalValue (() <$ b) (ignoreBlocking b) emptyEnv [] ctrl) YesReduction _ v -> runAM (evalClosure v emptyEnv [] ctrl) where rewr = case t of Def f [] -> rewriteRules f Con c _ [] -> rewriteRules (conName c) _ -> __IMPOSSIBLE__ rewriteAM' _ = __IMPOSSIBLE__ -- Add a NatSucK frame to the control stack. Pack consecutive suc's into a single frame. sucCtrl :: ControlStack s -> ControlStack s sucCtrl (NatSucK !n : ctrl) = NatSucK (n + 1) : ctrl sucCtrl ctrl = NatSucK 1 : ctrl -- Add a UpdateThunk frame to the control stack. Pack consecutive updates into a single frame. updateThunkCtrl :: STPointer s -> ControlStack s -> ControlStack s updateThunkCtrl p (UpdateThunk ps : ctrl) = UpdateThunk (p : ps) : ctrl updateThunkCtrl p ctrl = UpdateThunk [p] : ctrl -- Only unfold delayed (corecursive) definitions if the result is being cased on. unfoldDelayed :: ControlStack s -> Bool unfoldDelayed [] = False unfoldDelayed (CaseK{} : _) = True unfoldDelayed (PrimOpK{} : _) = False unfoldDelayed (NatSucK{} : _) = False unfoldDelayed (NormaliseK{} : _) = False unfoldDelayed (ArgK{} : _) = False unfoldDelayed (UpdateThunk{} : ctrl) = unfoldDelayed ctrl unfoldDelayed (ApplyK{} : ctrl) = unfoldDelayed ctrl unfoldDelayed (ForceK{} : ctrl) = unfoldDelayed ctrl unfoldDelayed (EraseK{} : ctrl) = unfoldDelayed ctrl -- When matching is stuck we return the closure from the 'MatchStack' with the appropriate -- 'IsValue' set. stuckMatch :: Blocked_ -> MatchStack s -> ControlStack s -> ST s (Blocked Term) stuckMatch blk (_ :> cl) ctrl = rewriteAM (Eval (mkValue blk cl) ctrl) -- On a mismatch we find the the next 'CatchAll' on the control stack and -- continue matching from there. If there isn't one we get an incomplete -- matching error (or get stuck if the function is marked partial). failedMatch :: QName -> MatchStack s -> ControlStack s -> ST s (Blocked Term) failedMatch f (CatchAll cc spine : stack :> cl) ctrl = runAM (Match f cc spine (stack :> cl) ctrl) failedMatch f ([] :> cl) ctrl | elem f partialDefs = rewriteAM (Eval (mkValue (NotBlocked MissingClauses ()) cl) ctrl) | otherwise = runReduce $ traceSLn "impossible" 10 ("Incomplete pattern matching when applying " ++ show f) __IMPOSSIBLE__ -- Some helper functions to build machine states and closures. evalClosure t env spine = Eval (Closure Unevaled t env spine) evalValue b t env spine = Eval (Closure (Value b) t env spine) evalTrueValue = evalValue $ notBlocked () trueValue t env spine = Closure (Value $ notBlocked ()) t env spine mkValue b = setIsValue (Value b) -- Building lambdas lams :: [Arg String] -> Term -> Term lams xs t = foldr lam t xs lam :: Arg String -> Term -> Term lam x t = Lam (argInfo x) (Abs (unArg x) t) -- Pretty printing -------------------------------------------------------- instance Pretty a => Pretty (FastCase a) where prettyPrec p (FBranches _cop cs suc ls m _) = mparens (p > 0) $ vcat (prettyMap cs ++ prettyMap ls ++ prSuc suc ++ prC m) where prC Nothing = [] prC (Just x) = ["_ ->" pretty x] prSuc Nothing = [] prSuc (Just x) = ["suc ->" pretty x] instance Pretty FastCompiledClauses where pretty (FDone xs t) = ("done" <+> prettyList xs) prettyPrec 10 t pretty FFail = "fail" pretty (FEta n _ cc ca) = text ("eta " ++ show n ++ " of") vcat ([ "{} ->" pretty cc ] ++ [ "_ ->" pretty cc | Just cc <- [ca] ]) pretty (FCase n bs) | fprojPatterns bs = sep [ text $ "project " ++ show n , nest 2 $ pretty bs ] pretty (FCase n bs) = text ("case " ++ show n ++ " of") pretty bs instance Pretty a => Pretty (Thunk a) where prettyPrec _ BlackHole = "" prettyPrec p (Thunk cl) = prettyPrec p cl instance Pretty (Pointer s) where prettyPrec p = prettyPrec p . unsafeDerefPointer instance Pretty (Closure s) where prettyPrec _ (Closure Value{} (Lit (LitString _ unused)) _ _) | unused == unusedPointerString = "_" prettyPrec p (Closure isV t env spine) = mparens (p > 9) $ fsep [ text tag , nest 2 $ prettyPrec 10 t , nest 2 $ prettyList $ zipWith envEntry [0..] (envToList env) , nest 2 $ prettyList spine ] where envEntry i c = text ("@" ++ show i ++ " =") <+> pretty c tag = case isV of Value{} -> "V"; Unevaled -> "E" instance Pretty (AM s) where prettyPrec p (Eval cl ctrl) = prettyPrec p cl prettyList ctrl prettyPrec p (Match f cc sp stack ctrl) = mparens (p > 9) $ sep [ "M" <+> pretty f , nest 2 $ prettyList sp , nest 2 $ prettyPrec 10 cc , nest 2 $ pretty stack , nest 2 $ prettyList ctrl ] instance Pretty (CatchAllFrame s) where pretty CatchAll{} = "CatchAll" instance Pretty (MatchStack s) where pretty ([] :> _) = empty pretty (ca :> _) = prettyList ca instance Pretty (ControlFrame s) where prettyPrec p (CaseK f _ _ _ _ mc) = mparens (p > 9) $ ("CaseK" <+> pretty (qnameName f)) pretty mc prettyPrec p (ForceK _ spine0 spine1) = mparens (p > 9) $ "ForceK" prettyList (spine0 <> spine1) prettyPrec p (EraseK _ sp0 sp1 sp2 sp3) = mparens (p > 9) $ sep [ "EraseK" , nest 2 $ prettyList sp0 , nest 2 $ prettyList sp1 , nest 2 $ prettyList sp2 , nest 2 $ prettyList sp3 ] prettyPrec _ (NatSucK n) = text ("+" ++ show n) prettyPrec p (PrimOpK f _ vs cls _) = mparens (p > 9) $ sep [ "PrimOpK" <+> pretty f , nest 2 $ prettyList vs , nest 2 $ prettyList cls ] prettyPrec p (UpdateThunk ps) = mparens (p > 9) $ "UpdateThunk" <+> text (show (length ps)) prettyPrec p (ApplyK spine) = mparens (p > 9) $ "ApplyK" prettyList spine prettyPrec p NormaliseK = "NormaliseK" prettyPrec p (ArgK cl _) = mparens (p > 9) $ sep [ "ArgK" <+> prettyPrec 10 cl ] Agda-2.6.0.1/src/full/Agda/TypeChecking/Positivity/0000755000000000000000000000000013466402171020031 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/TypeChecking/Positivity/Occurrence.hs0000644000000000000000000001707613466402171022470 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Occurrences. module Agda.TypeChecking.Positivity.Occurrence ( Occurrence(..) , OccursWhere(..) , Where(..) , boundToEverySome , productOfEdgesInBoundedWalk ) where import Control.DeepSeq import Control.Monad import Data.Data (Data) import Data.Either import Data.Foldable (toList) import Data.Maybe import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Agda.Syntax.Common import Agda.Syntax.Abstract.Name import Agda.Syntax.Position import Agda.Utils.Graph.AdjacencyMap.Unidirectional (Graph) import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as Graph import Agda.Utils.List import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.SemiRing import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- Specification of occurrences ------------------------------------------- -- Operations and instances in Agda.TypeChecking.Positivity. -- | Description of an occurrence. data OccursWhere = OccursWhere Range (Seq Where) (Seq Where) -- ^ The elements of the sequences, read from left to right, -- explain how to get to the occurrence. The second sequence -- includes the main information, and if the first sequence is -- non-empty, then it includes information about the context of -- the second sequence. deriving (Show, Eq, Ord, Data) -- | One part of the description of an occurrence. data Where = LeftOfArrow | DefArg QName Nat -- ^ in the nth argument of a define constant | UnderInf -- ^ in the principal argument of built-in ∞ | VarArg -- ^ as an argument to a bound variable | MetaArg -- ^ as an argument of a metavariable | ConArgType QName -- ^ in the type of a constructor | IndArgType QName -- ^ in a datatype index of a constructor | InClause Nat -- ^ in the nth clause of a defined function | Matched -- ^ matched against in a clause of a defined function | IsIndex -- ^ is an index of an inductive family | InDefOf QName -- ^ in the definition of a constant deriving (Show, Eq, Ord, Data) -- | Subterm occurrences for positivity checking. -- The constructors are listed in increasing information they provide: -- @Mixed <= JustPos <= StrictPos <= GuardPos <= Unused@ -- @Mixed <= JustNeg <= Unused@. data Occurrence = Mixed -- ^ Arbitrary occurrence (positive and negative). | JustNeg -- ^ Negative occurrence. | JustPos -- ^ Positive occurrence, but not strictly positive. | StrictPos -- ^ Strictly positive occurrence. | GuardPos -- ^ Guarded strictly positive occurrence (i.e., under ∞). For checking recursive records. | Unused -- ^ No occurrence. deriving (Data, Show, Eq, Ord, Enum, Bounded) -- Pretty instances. instance Pretty Occurrence where pretty = text . \case Unused -> "_" Mixed -> "*" JustNeg -> "-" JustPos -> "+" StrictPos -> "++" GuardPos -> "g+" instance Pretty Where where pretty = \case LeftOfArrow -> "LeftOfArrow" DefArg q i -> "DefArg" <+> pretty q <+> pretty i UnderInf -> "UnderInf" VarArg -> "VarArg" MetaArg -> "MetaArg" ConArgType q -> "ConArgType" <+> pretty q IndArgType q -> "IndArgType" <+> pretty q InClause i -> "InClause" <+> pretty i Matched -> "Matched" IsIndex -> "IsIndex" InDefOf q -> "InDefOf" <+> pretty q instance Pretty OccursWhere where pretty = \case OccursWhere _r ws1 ws2 -> "OccursWhere _" <+> pretty (toList ws1) <+> pretty (toList ws2) -- Other instances for 'Occurrence'. instance NFData Occurrence where rnf x = seq x () instance KillRange Occurrence where killRange = id -- | 'Occurrence' is a complete lattice with least element 'Mixed' -- and greatest element 'Unused'. -- -- It forms a commutative semiring where 'oplus' is meet (glb) -- and 'otimes' is composition. Both operations are idempotent. -- -- For 'oplus', 'Unused' is neutral (zero) and 'Mixed' is dominant. -- For 'otimes', 'StrictPos' is neutral (one) and 'Unused' is dominant. instance SemiRing Occurrence where ozero = Unused oone = StrictPos oplus Mixed _ = Mixed -- dominant oplus _ Mixed = Mixed oplus Unused o = o -- neutral oplus o Unused = o oplus JustNeg JustNeg = JustNeg oplus JustNeg o = Mixed -- negative and any form of positve oplus o JustNeg = Mixed oplus GuardPos o = o -- second-rank neutral oplus o GuardPos = o oplus StrictPos o = o -- third-rank neutral oplus o StrictPos = o oplus JustPos JustPos = JustPos otimes Unused _ = Unused -- dominant otimes _ Unused = Unused otimes Mixed _ = Mixed -- second-rank dominance otimes _ Mixed = Mixed otimes JustNeg JustNeg = JustPos otimes JustNeg _ = JustNeg -- third-rank dominance otimes _ JustNeg = JustNeg otimes JustPos _ = JustPos -- fourth-rank dominance otimes _ JustPos = JustPos otimes GuardPos _ = GuardPos -- _ `elem` [StrictPos, GuardPos] otimes _ GuardPos = GuardPos otimes StrictPos StrictPos = StrictPos -- neutral instance StarSemiRing Occurrence where ostar Mixed = Mixed ostar JustNeg = Mixed ostar JustPos = JustPos ostar StrictPos = StrictPos ostar GuardPos = StrictPos ostar Unused = StrictPos instance Null Occurrence where empty = Unused -- Other instances for 'OccursWhere'. -- There is an orphan PrettyTCM instance for Seq OccursWhere in -- Agda.TypeChecking.Positivity. instance Sized OccursWhere where size (OccursWhere _ cs os) = 1 + size cs + size os -- | The map contains bindings of the form @bound |-> ess@, satisfying -- the following property: for every non-empty list @w@, -- @'foldr1' 'otimes' w '<=' bound@ iff -- @'or' [ 'all' every w '&&' 'any' some w | (every, some) <- ess ]@. boundToEverySome :: Map Occurrence [(Occurrence -> Bool, Occurrence -> Bool)] boundToEverySome = Map.fromList [ ( JustPos , [((/= Unused), (`elem` [Mixed, JustNeg, JustPos]))] ) , ( StrictPos , [ ((/= Unused), (`elem` [Mixed, JustNeg, JustPos])) , ((not . (`elem` [Unused, GuardPos])), const True) ] ) , ( GuardPos , [((/= Unused), const True)] ) ] -- | @productOfEdgesInBoundedWalk occ g u v bound@ returns a value -- distinct from 'Nothing' iff there is a walk @c@ (a list of edges) -- in @g@, from @u@ to @v@, for which the product @'foldr1' 'otimes' -- ('map' occ c) '<=' bound@. In this case the returned value is -- @'Just' ('foldr1' 'otimes' c)@ for one such walk @c@. -- -- Preconditions: @u@ and @v@ must belong to @g@, and @bound@ must -- belong to the domain of @boundToEverySome@. -- There is a property for this function in -- Internal.Utils.Graph.AdjacencyMap.Unidirectional. productOfEdgesInBoundedWalk :: (SemiRing e, Ord n) => (e -> Occurrence) -> Graph n e -> n -> n -> Occurrence -> Maybe e productOfEdgesInBoundedWalk occ g u v bound = case Map.lookup bound boundToEverySome of Nothing -> __IMPOSSIBLE__ Just ess -> case msum [ Graph.walkSatisfying (every . occ . Graph.label) (some . occ . Graph.label) g u v | (every, some) <- ess ] of Just es@(_ : _) -> Just (foldr1 otimes (map Graph.label es)) Just [] -> __IMPOSSIBLE__ Nothing -> Nothing Agda-2.6.0.1/src/full/Agda/Interaction/0000755000000000000000000000000013466402171015550 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Interaction/Imports.hs-boot0000644000000000000000000000061513466402171020504 0ustar0000000000000000 module Agda.Interaction.Imports where import Agda.Syntax.Abstract.Name ( ModuleName ) import Agda.Syntax.Scope.Base ( Scope ) import Agda.TypeChecking.Monad.Base ( TCM ) import Data.Map ( Map ) data Mode data MainInterface = MainInterface Mode | NotMainInterface instance Eq MainInterface scopeCheckImport :: ModuleName -> TCM (ModuleName, Map ModuleName Scope) Agda-2.6.0.1/src/full/Agda/Interaction/JSONTop.hs0000644000000000000000000001257213466402171017347 0ustar0000000000000000module Agda.Interaction.JSONTop ( jsonREPL ) where import Control.Monad.State import Data.Aeson hiding (Result(..)) import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy.Char8 as BS import Agda.Interaction.AgdaTop import Agda.Interaction.Response as R import Agda.Interaction.EmacsCommand hiding (putResponse) import Agda.Interaction.Highlighting.JSON import Agda.Interaction.Highlighting.Precise (TokenBased(..)) import Agda.Syntax.Common import Agda.TypeChecking.Monad import Agda.Utils.Pretty import Agda.VersionCommit ---------------------------------- -- | 'jsonREPL' is a interpreter like 'mimicGHCi', but outputs JSON-encoded strings. -- -- 'jsonREPL' reads Haskell values (that starts from 'IOTCM' ...) from stdin, -- interprets them, and outputs JSON-encoded strings. into stdout. jsonREPL :: TCM () -> TCM () jsonREPL = repl (liftIO . BS.putStrLn <=< liftIO . jsonifyResponse) "JSON> " instance ToJSON Status where toJSON status = object [ "showImplicitArguments" .= sShowImplicitArguments status , "checked" .= sChecked status ] instance ToJSON InteractionId where toJSON (InteractionId i) = toJSON i instance ToJSON GiveResult where toJSON (Give_String s) = toJSON s toJSON Give_Paren = toJSON True toJSON Give_NoParen = toJSON False instance ToJSON MakeCaseVariant where toJSON R.Function = String "Function" toJSON R.ExtendedLambda = String "ExtendedLambda" instance ToJSON DisplayInfo where toJSON (Info_CompilationOk warnings errors) = object [ "kind" .= String "CompilationOk" , "warnings" .= warnings , "errors" .= errors ] toJSON (Info_Constraints constraints) = object [ "kind" .= String "Constraints" , "constraints" .= constraints ] toJSON (Info_AllGoalsWarnings goals warnings errors) = object [ "kind" .= String "AllGoalsWarnings" , "goals" .= goals , "warnings" .= warnings , "errors" .= errors ] toJSON (Info_Time doc) = object [ "kind" .= String "Time", "payload" .= render doc ] toJSON (Info_Error msg) = object [ "kind" .= String "Error", "payload" .= msg ] toJSON (Info_Intro doc) = object [ "kind" .= String "Intro", "payload" .= render doc ] toJSON (Info_Auto msg) = object [ "kind" .= String "Auto", "payload" .= msg ] toJSON (Info_ModuleContents doc) = object [ "kind" .= String "ModuleContents", "payload" .= render doc ] toJSON (Info_SearchAbout doc) = object [ "kind" .= String "SearchAbout", "payload" .= render doc ] toJSON (Info_WhyInScope doc) = object [ "kind" .= String "WhyInScope", "payload" .= render doc ] toJSON (Info_NormalForm doc) = object [ "kind" .= String "NormalForm", "payload" .= render doc ] toJSON (Info_GoalType doc) = object [ "kind" .= String "GoalType", "payload" .= render doc ] toJSON (Info_CurrentGoal doc) = object [ "kind" .= String "CurrentGoal", "payload" .= render doc ] toJSON (Info_InferredType doc) = object [ "kind" .= String "InferredType", "payload" .= render doc ] toJSON (Info_Context doc) = object [ "kind" .= String "Context", "payload" .= render doc ] toJSON (Info_HelperFunction doc) = object [ "kind" .= String "HelperFunction", "payload" .= render doc ] toJSON Info_Version = object [ "kind" .= String "Version" , "version" .= (("Agda version " ++ versionWithCommitInfo) :: String) ] -- | Convert Response to an JSON value for interactive editor frontends. jsonifyResponse :: Response -> IO ByteString jsonifyResponse (Resp_HighlightingInfo info remove method modFile) = encode <$> jsonifyHighlightingInfo info remove method modFile jsonifyResponse (Resp_DisplayInfo info) = return $ encode $ object [ "kind" .= String "DisplayInfo" , "info" .= info ] jsonifyResponse (Resp_ClearHighlighting tokenBased) = return $ encode $ object [ "kind" .= String "ClearHighlighting" , "tokenBased" .= tokenBased ] jsonifyResponse Resp_DoneAborting = return $ encode $ object [ "kind" .= String "DoneAborting" ] jsonifyResponse Resp_ClearRunningInfo = return $ encode $ object [ "kind" .= String "ClearRunningInfo" ] jsonifyResponse (Resp_RunningInfo debugLevel msg) = return $ encode $ object [ "kind" .= String "RunningInfo" , "debugLevel" .= debugLevel , "message" .= msg ] jsonifyResponse (Resp_Status status) = return $ encode $ object [ "kind" .= String "Status" , "status" .= status ] jsonifyResponse (Resp_JumpToError filepath position) = return $ encode $ object [ "kind" .= String "JumpToError" , "filepath" .= filepath , "position" .= position ] jsonifyResponse (Resp_InteractionPoints interactionPoints) = return $ encode $ object [ "kind" .= String "InteractionPoints" , "interactionPoints" .= interactionPoints ] jsonifyResponse (Resp_GiveAction i giveResult) = return $ encode $ object [ "kind" .= String "GiveAction" , "interactionPoint" .= i , "giveResult" .= giveResult ] jsonifyResponse (Resp_MakeCase variant clauses) = return $ encode $ object [ "kind" .= String "MakeCase" , "variant" .= variant , "clauses" .= clauses ] jsonifyResponse (Resp_SolveAll solutions) = return $ encode $ object [ "kind" .= String "SolveAll" , "solutions" .= map encodeSolution solutions ] where encodeSolution (i, expr) = object [ "interactionPoint" .= i , "expression" .= show expr ] Agda-2.6.0.1/src/full/Agda/Interaction/CommandLine.hs0000644000000000000000000002426013466402171020276 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Interaction.CommandLine where import Control.Monad.Reader import qualified Data.List as List import Data.Maybe import Agda.Interaction.BasicOps as BasicOps hiding (parseExpr) import Agda.Interaction.Monad import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Internal (telToList) import qualified Agda.Syntax.Internal as I import Agda.Syntax.Parser import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.Syntax.Translation.ConcreteToAbstract import Agda.Syntax.Abstract.Pretty import Agda.TheTypeChecker import Agda.TypeChecking.Constraints import Agda.TypeChecking.Monad import Agda.TypeChecking.Reduce import Agda.TypeChecking.Errors import Agda.TypeChecking.Pretty ( PrettyTCM(prettyTCM) ) import Agda.TypeChecking.Substitute import Agda.TypeChecking.Warnings (runPM) import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Monad import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible data ExitCode a = Continue | ContinueIn TCEnv | Return a type Command a = (String, [String] -> TCM (ExitCode a)) matchCommand :: String -> [Command a] -> Either [String] ([String] -> TCM (ExitCode a)) matchCommand x cmds = case List.filter (List.isPrefixOf x . fst) cmds of [(_,m)] -> Right m xs -> Left $ List.map fst xs interaction :: String -> [Command a] -> (String -> TCM (ExitCode a)) -> IM a interaction prompt cmds eval = loop where go (Return x) = return x go Continue = loop go (ContinueIn env) = localTC (const env) loop loop = do ms <- readline prompt case fmap words ms of Nothing -> return $ error "** EOF **" Just [] -> loop Just ((':':cmd):args) -> do case matchCommand cmd cmds of Right c -> go =<< liftTCM (c args) Left [] -> do liftIO $ putStrLn $ "Unknown command '" ++ cmd ++ "'" loop Left xs -> do liftIO $ putStrLn $ "More than one command match: " ++ concat (List.intersperse ", " xs) loop Just _ -> do go =<< liftTCM (eval $ fromJust ms) `catchError` \e -> do s <- liftTCM $ prettyError e liftIO $ putStrLn s loop -- | The interaction loop. interactionLoop :: TCM (Maybe Interface) -> IM () interactionLoop doTypeCheck = do liftTCM reload interaction "Main> " commands evalTerm where reload = do mi <- doTypeCheck -- Note that mi is Nothing if (1) there is no input file or -- (2) the file type checked with unsolved metas and -- --allow-unsolved-metas was used. In the latter case the -- behaviour of agda -I may be surprising. If agda -I ever -- becomes properly supported again, then this behaviour -- should perhaps be fixed. setScope $ case mi of Just i -> iInsideScope i Nothing -> emptyScopeInfo `catchError` \e -> do s <- prettyError e liftIO $ putStrLn s liftIO $ putStrLn "Failed." commands = [ "quit" |> \_ -> return $ Return () , "?" |> \_ -> continueAfter $ liftIO $ help commands , "reload" |> \_ -> do reload ContinueIn <$> askTC , "constraints" |> \args -> continueAfter $ showConstraints args , "Context" |> \args -> continueAfter $ showContext args , "give" |> \args -> continueAfter $ giveMeta args , "Refine" |> \args -> continueAfter $ refineMeta args , "metas" |> \args -> continueAfter $ showMetas args , "load" |> \args -> continueAfter $ loadFile reload args , "eval" |> \args -> continueAfter $ evalIn args , "typeOf" |> \args -> continueAfter $ typeOf args , "typeIn" |> \args -> continueAfter $ typeIn args , "wakeup" |> \_ -> continueAfter $ retryConstraints , "scope" |> \_ -> continueAfter $ showScope ] where (|>) = (,) continueAfter :: TCM a -> TCM (ExitCode b) continueAfter m = withCurrentFile $ do m >> return Continue -- | Set 'envCurrentPath' to 'optInputFile'. withCurrentFile :: TCM a -> TCM a withCurrentFile cont = do mpath <- getInputFile' localTC (\ e -> e { envCurrentPath = mpath }) cont loadFile :: TCM () -> [String] -> TCM () loadFile reload [file] = do setInputFile file withCurrentFile reload loadFile _ _ = liftIO $ putStrLn ":load file" showConstraints :: [String] -> TCM () showConstraints [] = do cs <- BasicOps.getConstraints liftIO $ putStrLn $ unlines (List.map prettyShow cs) showConstraints _ = liftIO $ putStrLn ":constraints [cid]" showMetas :: [String] -> TCM () showMetas [m] = do i <- InteractionId <$> readM m withInteractionId i $ do s <- typeOfMeta AsIs i r <- getInteractionRange i d <- prettyA s liftIO $ putStrLn $ show d ++ " " ++ show r showMetas [m,"normal"] = do i <- InteractionId <$> readM m withInteractionId i $ do s <- prettyA =<< typeOfMeta Normalised i r <- getInteractionRange i liftIO $ putStrLn $ show s ++ " " ++ show r showMetas [] = do interactionMetas <- typesOfVisibleMetas AsIs hiddenMetas <- typesOfHiddenMetas AsIs mapM_ (liftIO . print) =<< mapM showII interactionMetas mapM_ print' hiddenMetas where showII o = withInteractionId (outputFormId $ OutputForm noRange [] o) $ prettyA o showM o = withMetaId (nmid $ outputFormId $ OutputForm noRange [] o) $ prettyA o metaId (OfType i _) = i metaId (JustType i) = i metaId (JustSort i) = i metaId (Assign i e) = i metaId _ = __IMPOSSIBLE__ print' x = do r <- getMetaRange $ nmid $ metaId x d <- showM x liftIO $ putStrLn $ show d ++ " [ at " ++ show r ++ " ]" showMetas _ = liftIO $ putStrLn $ ":meta [metaid]" showScope :: TCM () showScope = do scope <- getScope liftIO $ print scope metaParseExpr :: InteractionId -> String -> TCM A.Expr metaParseExpr ii s = do m <- lookupInteractionId ii scope <- getMetaScope <$> lookupMeta m r <- getRange <$> lookupMeta m --liftIO $ putStrLn $ show scope let pos = case rStart r of Nothing -> __IMPOSSIBLE__ Just pos -> pos e <- runPM $ parsePosString exprParser pos s concreteToAbstract scope e actOnMeta :: [String] -> (InteractionId -> A.Expr -> TCM a) -> TCM a actOnMeta (is:es) f = do i <- readM is let ii = InteractionId i e <- metaParseExpr ii (unwords es) withInteractionId ii $ f ii e actOnMeta _ _ = __IMPOSSIBLE__ giveMeta :: [String] -> TCM () giveMeta s | length s >= 2 = do _ <- actOnMeta s $ \ ii e -> give WithoutForce ii Nothing e return () giveMeta _ = liftIO $ putStrLn $ ": give" ++ " metaid expr" refineMeta :: [String] -> TCM () refineMeta s | length s >= 2 = do _ <- actOnMeta s $ \ ii e -> refine WithoutForce ii Nothing e return () refineMeta _ = liftIO $ putStrLn $ ": refine" ++ " metaid expr" retryConstraints :: TCM () retryConstraints = liftTCM wakeupConstraints_ evalIn :: [String] -> TCM () evalIn s | length s >= 2 = do d <- actOnMeta s $ \_ e -> prettyA =<< evalInCurrent e liftIO $ print d evalIn _ = liftIO $ putStrLn ":eval metaid expr" parseExpr :: String -> TCM A.Expr parseExpr s = do e <- runPM $ parse exprParser s localToAbstract e return evalTerm :: String -> TCM (ExitCode a) evalTerm s = do e <- parseExpr s v <- evalInCurrent e e <- prettyTCM v liftIO $ putStrLn $ show e return Continue where evalInCurrent e = do (v,t) <- inferExpr e v' <- normalise v return v' typeOf :: [String] -> TCM () typeOf s = do e <- parseExpr (unwords s) e0 <- typeInCurrent Normalised e e1 <- typeInCurrent AsIs e liftIO . putStrLn =<< showA e1 typeIn :: [String] -> TCM () typeIn s@(_:_:_) = actOnMeta s $ \i e -> do e1 <- typeInMeta i Normalised e e2 <- typeInMeta i AsIs e liftIO . putStrLn =<< showA e1 typeIn _ = liftIO $ putStrLn ":typeIn meta expr" showContext :: [String] -> TCM () showContext (meta:args) = do i <- InteractionId <$> readM meta mi <- lookupMeta =<< lookupInteractionId i withMetaInfo (getMetaInfo mi) $ do ctx <- List.map unDom . telToList <$> getContextTelescope zipWithM_ display ctx $ reverse $ zipWith const [1..] ctx where display (x, t) n = do t <- case args of ["normal"] -> normalise $ raise n t _ -> return $ raise n t d <- prettyTCM t liftIO $ print $ text (I.argNameToString x) <+> ":" <+> d showContext _ = liftIO $ putStrLn ":Context meta" -- | The logo that prints when Agda is started in interactive mode. splashScreen :: String splashScreen = unlines [ " _ " , " ____ | |" , " / __ \\ | |" , " | |__| |___ __| | ___" , " | __ / _ \\/ _ |/ __\\ Agda Interactive" , " | | |/ /_\\ \\/_| / /_| \\" , " |_| |\\___ /____\\_____/ Type :? for help." , " __/ /" , " \\__/" , "" -- , "The interactive mode is no longer supported. Don't complain if it doesn't work." , "The interactive mode is no longer under active development. Use at your own risk." ] -- | The help message help :: [Command a] -> IO () help cs = putStr $ unlines $ [ "Command overview" ] ++ List.map explain cs ++ [ " Infer type of expression and evaluate it." ] where explain (x,_) = ":" ++ x Agda-2.6.0.1/src/full/Agda/Interaction/InteractionTop.hs-boot0000644000000000000000000000016713466402171022013 0ustar0000000000000000module Agda.Interaction.InteractionTop where import Agda.TypeChecking.Monad.Base (TCM) showOpenMetas :: TCM [String] Agda-2.6.0.1/src/full/Agda/Interaction/InteractionTop.hs0000644000000000000000000017550313466402171021061 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-cse #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.Interaction.InteractionTop ( module Agda.Interaction.InteractionTop ) where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM.TChan import Control.Concurrent.STM.TVar import qualified Control.Exception as E import Control.Monad.Identity import Control.Monad.Reader import Control.Monad.State import Control.Monad.STM import qualified Data.Char as Char import Data.Foldable (Foldable) import Data.Function import qualified Data.List as List import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid import Data.Traversable (Traversable) import qualified Data.Traversable as Trav import System.Directory import System.FilePath import Agda.TypeChecking.Monad as TM hiding (initState, setCommandLineOptions) import qualified Agda.TypeChecking.Monad as TM import qualified Agda.TypeChecking.Pretty as TCP import Agda.TypeChecking.Rules.Term (checkExpr, isType_) import Agda.TypeChecking.Errors import Agda.TypeChecking.MetaVars.Mention import Agda.Syntax.Fixity import Agda.Syntax.Position import Agda.Syntax.Parser import Agda.Syntax.Common import Agda.Syntax.Literal import Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Generic as C import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pretty import qualified Agda.Syntax.Internal as I import Agda.Syntax.Info (mkDefInfo) import Agda.Syntax.Translation.ConcreteToAbstract import Agda.Syntax.Translation.AbstractToConcrete hiding (withScope) import Agda.Syntax.Scope.Base import Agda.Interaction.FindFile import Agda.Interaction.Options import Agda.Interaction.Options.Lenses as Lenses import Agda.Interaction.MakeCase import Agda.Interaction.SearchAbout import Agda.Interaction.Response hiding (Function, ExtendedLambda) import qualified Agda.Interaction.Response as R import qualified Agda.Interaction.BasicOps as B import Agda.Interaction.BasicOps hiding (whyInScope) import Agda.Interaction.Highlighting.Precise hiding (Error, Postulate) import qualified Agda.Interaction.Imports as Imp import Agda.TypeChecking.Warnings import Agda.Interaction.Highlighting.Generate import qualified Agda.Interaction.Highlighting.LaTeX as LaTeX import qualified Agda.Interaction.Highlighting.Range as H import Agda.Compiler.Common (IsMain (..)) import Agda.Compiler.Backend import Agda.Auto.Auto as Auto import Agda.Utils.Except ( ExceptT , mkExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.Either import Agda.Utils.FileName import Agda.Utils.Function import Agda.Utils.Hash import qualified Agda.Utils.HashMap as HMap import Agda.Utils.Lens import Agda.Utils.Maybe import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty as P import Agda.Utils.String import Agda.Utils.Time import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- The CommandM monad -- | Auxiliary state of an interactive computation. data CommandState = CommandState { theInteractionPoints :: [InteractionId] -- ^ The interaction points of the buffer, in the order in which -- they appear in the buffer. The interaction points are -- recorded in 'theTCState', but when new interaction points are -- added by give or refine Agda does not ensure that the ranges -- of later interaction points are updated. , theCurrentFile :: Maybe (AbsolutePath, ClockTime) -- ^ The file which the state applies to. Only stored if the -- module was successfully type checked (potentially with -- warnings). The 'ClockTime' is the modification time stamp of -- the file when it was last loaded. , optionsOnReload :: CommandLineOptions -- ^ Reset the options on each reload to these. , oldInteractionScopes :: !OldInteractionScopes -- ^ We remember (the scope of) old interaction points to make it -- possible to parse and compute highlighting information for the -- expression that it got replaced by. , commandQueue :: !CommandQueue -- ^ The command queue. -- -- This queue should only be manipulated by -- 'initialiseCommandQueue' and 'maybeAbort'. } type OldInteractionScopes = Map InteractionId ScopeInfo -- | Initial auxiliary interaction state initCommandState :: CommandQueue -> CommandState initCommandState commandQueue = CommandState { theInteractionPoints = [] , theCurrentFile = Nothing , optionsOnReload = defaultOptions , oldInteractionScopes = Map.empty , commandQueue = commandQueue } -- | Monad for computing answers to interactive commands. -- -- 'CommandM' is 'TCM' extended with state 'CommandState'. type CommandM = StateT CommandState TCM -- | Restore both 'TCState' and 'CommandState'. localStateCommandM :: CommandM a -> CommandM a localStateCommandM m = do cSt <- get tcSt <- getTC x <- m putTC tcSt put cSt return x -- | Restore 'TCState', do not touch 'CommandState'. liftLocalState :: TCM a -> CommandM a liftLocalState = lift . localTCState -- | Build an opposite action to 'lift' for state monads. revLift :: MonadState st m => (forall c . m c -> st -> k (c, st)) -- ^ run -> (forall b . k b -> m b) -- ^ lift -> (forall x . (m a -> k x) -> k x) -> m a -- ^ reverse lift in double negative position revLift run lift f = do st <- get (a, st) <- lift $ f (`run` st) put st return a revLiftTC :: MonadTCState m => (forall c . m c -> TCState -> k (c, TCState)) -- ^ run -> (forall b . k b -> m b) -- ^ lift -> (forall x . (m a -> k x) -> k x) -> m a -- ^ reverse lift in double negative position revLiftTC run lift f = do st <- getTC (a, st) <- lift $ f (`run` st) putTC st return a -- | Opposite of 'liftIO' for 'CommandM'. -- Use only if main errors are already catched. commandMToIO :: (forall x . (CommandM a -> IO x) -> IO x) -> CommandM a commandMToIO ci_i = revLift runStateT lift $ \ct -> revLiftTC runSafeTCM liftIO $ ci_i . (. ct) -- | Lift a TCM action transformer to a CommandM action transformer. liftCommandMT :: (forall a . TCM a -> TCM a) -> CommandM a -> CommandM a liftCommandMT f m = revLift runStateT lift $ f . ($ m) -- | Ditto, but restore state. liftCommandMTLocalState :: (forall a . TCM a -> TCM a) -> CommandM a -> CommandM a liftCommandMTLocalState f = liftCommandMT f . localStateCommandM -- | Put a response by the callback function given by 'stInteractionOutputCallback'. putResponse :: Response -> CommandM () putResponse = lift . appInteractionOutputCallback -- | A Lens for 'theInteractionPoints'. modifyTheInteractionPoints :: ([InteractionId] -> [InteractionId]) -> CommandM () modifyTheInteractionPoints f = modify $ \ s -> s { theInteractionPoints = f (theInteractionPoints s) } -- * Operations for manipulating 'oldInteractionScopes'. -- | A Lens for 'oldInteractionScopes'. modifyOldInteractionScopes :: (OldInteractionScopes -> OldInteractionScopes) -> CommandM () modifyOldInteractionScopes f = modify $ \ s -> s { oldInteractionScopes = f $ oldInteractionScopes s } insertOldInteractionScope :: InteractionId -> ScopeInfo -> CommandM () insertOldInteractionScope ii scope = do lift $ reportSLn "interaction.scope" 20 $ "inserting old interaction scope " ++ show ii modifyOldInteractionScopes $ Map.insert ii scope removeOldInteractionScope :: InteractionId -> CommandM () removeOldInteractionScope ii = do lift $ reportSLn "interaction.scope" 20 $ "removing old interaction scope " ++ show ii modifyOldInteractionScopes $ Map.delete ii getOldInteractionScope :: InteractionId -> CommandM ScopeInfo getOldInteractionScope ii = do ms <- gets $ Map.lookup ii . oldInteractionScopes case ms of Nothing -> fail $ "not an old interaction point: " ++ show ii Just scope -> return scope -- | Do setup and error handling for a command. handleCommand_ :: CommandM () -> CommandM () handleCommand_ = handleCommand id (return ()) handleCommand :: (forall a. CommandM a -> CommandM a) -> CommandM () -> CommandM () -> CommandM () handleCommand wrap onFail cmd = handleNastyErrors $ wrap $ do oldState <- getTC -- -- Andreas, 2016-11-18 OLD CODE: -- -- onFail and handleErr are executed in "new" command state (not TCState). -- -- But it seems that if an exception is raised, it is identical to the old state, -- -- see code for catchErr. -- res <- (`catchErr` (return . Just)) $ Nothing <$ cmd -- maybe (return ()) (\ e -> onFail >> handleErr e) res -- Andreas, 2016-11-18 NEW CODE: execute onFail and handleErr in handler -- which means (looking at catchErr) they run in state s rathern than s'. -- Yet, it looks like s == s' in case the command failed. cmd `catchErr` \ e -> do onFail handleErr e -- Andreas, 2016-11-18, issue #2174 -- Reset TCState after error is handled, to get rid of metas created during failed command lift $ do newPersistentState <- useTC lensPersistentState putTC oldState lensPersistentState `setTCLens` newPersistentState where -- Preserves state so we can do unsolved meta highlighting catchErr :: CommandM a -> (TCErr -> CommandM a) -> CommandM a catchErr m h = do s <- get (x, s') <- lift $ do runStateT m s `catchError_` \ e -> runStateT (h e) s put s' return x -- | Handle every possible kind of error (#637), except for -- ThreadKilled, which is used to abort Agda. handleNastyErrors :: CommandM () -> CommandM () handleNastyErrors m = commandMToIO $ \ toIO -> do let handle e = Right <$> (toIO $ handleErr $ Exception noRange $ text $ show e) asyncHandler e@AsyncCancelled = return (Left e) generalHandler (e :: E.SomeException) = handle e r <- ((Right <$> toIO m) `E.catch` asyncHandler) `E.catch` generalHandler case r of Right x -> return x Left e -> E.throwIO e -- | Displays an error and instructs Emacs to jump to the site of the -- error. Because this function may switch the focus to another file -- the status information is also updated. handleErr e = do unsolvedNotOK <- lift $ not . optAllowUnsolved <$> pragmaOptions meta <- lift $ computeUnsolvedMetaWarnings constr <- lift $ computeUnsolvedConstraints err <- lift $ errorHighlighting e modFile <- lift $ useTC stModuleToSource method <- lift $ viewTC eHighlightingMethod let info = compress $ mconcat $ -- Errors take precedence over unsolved things. err : if unsolvedNotOK then [meta, constr] else [] s1 <- lift $ prettyError e s2 <- lift $ prettyTCWarnings' =<< Imp.getAllWarningsOfTCErr e let strErr = if null s2 then s1 else delimiter "Error" ++ "\n" ++ s1 let strWarn = List.intercalate "\n" $ delimiter "Warning(s)" : filter (not . null) s2 let str = if null s2 then strErr else strErr ++ "\n\n" ++ strWarn x <- lift $ optShowImplicit <$> useTC stPragmaOptions unless (null s1) $ mapM_ putResponse $ [ Resp_DisplayInfo $ Info_Error str ] ++ tellEmacsToJumpToError (getRange e) ++ [ Resp_HighlightingInfo info KeepHighlighting method modFile ] ++ [ Resp_Status $ Status { sChecked = False , sShowImplicitArguments = x } ] -- | Run an 'IOTCM' value, catch the exceptions, emit output -- -- If an error happens the state of 'CommandM' does not change, -- but stPersistent may change (which contains successfully -- loaded interfaces for example). runInteraction :: IOTCM -> CommandM () runInteraction (IOTCM current highlighting highlightingMethod cmd) = handleCommand inEmacs onFail $ do current <- liftIO $ absolute current -- Raises an error if the given file is not the one currently -- loaded. cf <- gets theCurrentFile when (not (independent cmd) && Just current /= (fst <$> cf)) $ lift $ typeError $ GenericError "Error: First load the file." withCurrentFile $ interpret cmd cf <- gets theCurrentFile when (updateInteractionPointsAfter cmd && Just current == (fst <$> cf)) $ putResponse . Resp_InteractionPoints =<< gets theInteractionPoints where inEmacs = liftCommandMT $ withEnv $ initEnv { envHighlightingLevel = highlighting , envHighlightingMethod = highlightingMethod } -- If an independent command fails we should reset theCurrentFile (Issue853). onFail | independent cmd = modify $ \ s -> s { theCurrentFile = Nothing } | otherwise = return () ------------------------------------------------------------------------ -- Command queues -- | A generalised command type. data Command' a = Command !a -- ^ A command. | Done -- ^ Stop processing commands. | Error String -- ^ An error message for a command that could not be parsed. deriving Show -- | IOTCM commands. type Command = Command' IOTCM -- | Command queues. data CommandQueue = CommandQueue { commands :: !(TChan (Integer, Command)) -- ^ Commands that should be processed, in the order in which they -- should be processed. Each command is associated with a number, -- and the numbers are strictly increasing. Abort commands are not -- put on this queue. , abort :: !(TVar (Maybe Integer)) -- ^ When this variable is set to @Just n@ an attempt is made to -- abort all commands with a command number that is at most @n@. } -- | If the next command from the command queue is anything but an -- actual command, then the command is returned. -- -- If the command is an 'IOTCM' command, then the following happens: -- The given computation is applied to the command and executed. If an -- abort command is encountered (and acted upon), then the computation -- is interrupted, the persistent state and all options are restored, -- and some commands are sent to the frontend. If the computation was -- not interrupted, then its result is returned. -- TODO: It might be nice if some of the changes to the persistent -- state inflicted by the interrupted computation were preserved. maybeAbort :: (IOTCM -> CommandM a) -> CommandM (Command' (Maybe a)) maybeAbort m = do commandState <- get let q = commandQueue commandState (n, c) <- liftIO $ atomically $ readTChan (commands q) case c of Done -> return Done Error e -> return (Error e) Command c -> do tcState <- getTC tcEnv <- askTC result <- liftIO $ race (runTCM tcEnv tcState $ runStateT (m c) commandState) (waitForAbort n q) case result of Left ((x, commandState), tcState) -> do putTC tcState put commandState return (Command (Just x)) Right a -> do liftIO $ popAbortedCommands q a putTC $ initState { stPersistentState = stPersistentState tcState , stPreScopeState = (stPreScopeState initState) { stPrePragmaOptions = stPrePragmaOptions (stPreScopeState tcState) } } put $ (initCommandState (commandQueue commandState)) { optionsOnReload = optionsOnReload commandState } putResponse Resp_DoneAborting displayStatus return (Command Nothing) where -- | Returns if the currently executing command should be aborted. -- The "abort number" is returned. waitForAbort :: Integer -- ^ The number of the currently executing command. -> CommandQueue -- ^ The command queue. -> IO Integer waitForAbort n q = do atomically $ do a <- readTVar (abort q) case a of Just a | n <= a -> return a _ -> retry -- | Removes every command for which the command number is at most -- the given number (the "abort number") from the command queue. -- -- New commands could be added to the end of the queue while this -- computation is running. This does not lead to a race condition, -- because those commands have higher command numbers, so they will -- not be removed. popAbortedCommands :: CommandQueue -> Integer -> IO () popAbortedCommands q n = do done <- atomically $ do c <- tryReadTChan (commands q) case c of Nothing -> return True Just c -> if fst c <= n then return False else do unGetTChan (commands q) c return True unless done $ popAbortedCommands q n -- | Creates a command queue, and forks a thread that writes commands -- to the queue. The queue is returned. initialiseCommandQueue :: IO Command -- ^ Returns the next command. -> IO CommandQueue initialiseCommandQueue next = do commands <- newTChanIO abort <- newTVarIO Nothing let -- Read commands. The argument is the number of the previous -- command (other than abort commands) that was read, if any. readCommands n = do c <- next case c of Command (IOTCM _ _ _ Cmd_abort) -> do atomically $ writeTVar abort (Just n) readCommands n _ -> do n <- return (succ n) atomically $ writeTChan commands (n, c) case c of Done -> return () _ -> readCommands n _ <- forkIO (readCommands 0) return (CommandQueue { .. }) ---------------------------------------------------------------------------- -- | An interactive computation. type Interaction = Interaction' Range data Interaction' range -- | @cmd_load m argv@ loads the module in file @m@, using -- @argv@ as the command-line options. = Cmd_load FilePath [String] -- | @cmd_compile b m argv@ compiles the module in file @m@ using -- the backend @b@, using @argv@ as the command-line options. | Cmd_compile CompilerBackend FilePath [String] | Cmd_constraints -- | Show unsolved metas. If there are no unsolved metas but unsolved constraints -- show those instead. | Cmd_metas -- | Shows all the top-level names in the given module, along with -- their types. Uses the top-level scope. | Cmd_show_module_contents_toplevel B.Rewrite String -- | Shows all the top-level names in scope which mention all the given -- identifiers in their type. | Cmd_search_about_toplevel B.Rewrite String -- | Solve (all goals / the goal at point) whose values are determined by -- the constraints. | Cmd_solveAll B.Rewrite | Cmd_solveOne B.Rewrite InteractionId range String -- | Solve (all goals / the goal at point) by using Auto. | Cmd_autoOne InteractionId range String | Cmd_autoAll -- | Parse the given expression (as if it were defined at the -- top-level of the current module) and infer its type. | Cmd_infer_toplevel B.Rewrite -- Normalise the type? String -- | Parse and type check the given expression (as if it were defined -- at the top-level of the current module) and normalise it. | Cmd_compute_toplevel B.ComputeMode String ------------------------------------------------------------------------ -- Syntax highlighting -- | @cmd_load_highlighting_info source@ loads syntax highlighting -- information for the module in @source@, and asks Emacs to apply -- highlighting info from this file. -- -- If the module does not exist, or its module name is malformed or -- cannot be determined, or the module has not already been visited, -- or the cached info is out of date, then no highlighting information -- is printed. -- -- This command is used to load syntax highlighting information when a -- new file is opened, and it would probably be annoying if jumping to -- the definition of an identifier reset the proof state, so this -- command tries not to do that. One result of this is that the -- command uses the current include directories, whatever they happen -- to be. | Cmd_load_highlighting_info FilePath -- | Tells Agda to compute token-based highlighting information -- for the file. -- -- This command works even if the file's module name does not -- match its location in the file system, or if the file is not -- scope-correct. Furthermore no file names are put in the -- generated output. Thus it is fine to put source code into a -- temporary file before calling this command. However, the file -- extension should be correct. -- -- If the second argument is 'Remove', then the (presumably -- temporary) file is removed after it has been read. | Cmd_tokenHighlighting FilePath Remove -- | Tells Agda to compute highlighting information for the expression just -- spliced into an interaction point. | Cmd_highlight InteractionId range String ------------------------------------------------------------------------ -- Implicit arguments -- | Tells Agda whether or not to show implicit arguments. | ShowImplicitArgs Bool -- Show them? -- | Toggle display of implicit arguments. | ToggleImplicitArgs ------------------------------------------------------------------------ -- | Goal commands -- -- If the range is 'noRange', then the string comes from the -- minibuffer rather than the goal. | Cmd_give UseForce InteractionId range String | Cmd_refine InteractionId range String | Cmd_intro Bool InteractionId range String | Cmd_refine_or_intro Bool InteractionId range String | Cmd_context B.Rewrite InteractionId range String | Cmd_helper_function B.Rewrite InteractionId range String | Cmd_infer B.Rewrite InteractionId range String | Cmd_goal_type B.Rewrite InteractionId range String -- | Grabs the current goal's type and checks the expression in the hole -- against it. Returns the elaborated term. | Cmd_elaborate_give B.Rewrite InteractionId range String -- | Displays the current goal and context. | Cmd_goal_type_context B.Rewrite InteractionId range String -- | Displays the current goal and context /and/ infers the type of an -- expression. | Cmd_goal_type_context_infer B.Rewrite InteractionId range String -- | Grabs the current goal's type and checks the expression in the hole -- against it. | Cmd_goal_type_context_check B.Rewrite InteractionId range String -- | Shows all the top-level names in the given module, along with -- their types. Uses the scope of the given goal. | Cmd_show_module_contents B.Rewrite InteractionId range String | Cmd_make_case InteractionId range String | Cmd_compute B.ComputeMode InteractionId range String | Cmd_why_in_scope InteractionId range String | Cmd_why_in_scope_toplevel String -- | Displays version of the running Agda | Cmd_show_version | Cmd_abort -- ^ Abort the current computation. -- -- Does nothing if no computation is in progress. deriving (Show, Read, Functor, Foldable, Traversable) type IOTCM = IOTCM' Range data IOTCM' range = IOTCM FilePath -- -^ The current file. If this file does not match -- 'theCurrentFile, and the 'Interaction' is not -- \"independent\", then an error is raised. HighlightingLevel HighlightingMethod (Interaction' range) -- -^ What to do deriving (Show, Read, Functor, Foldable, Traversable) -- | Used to indicate whether something should be removed or not. data Remove = Remove | Keep deriving (Show, Read) --------------------------------------------------------- -- Read instances -- | The 'Parse' monad. -- 'StateT' state holds the remaining input. type Parse a = ExceptT String (StateT String Identity) a -- | Converter from the type of 'reads' to 'Parse' -- The first paramter is part of the error message -- in case the parse fails. readsToParse :: String -> (String -> Maybe (a, String)) -> Parse a readsToParse s f = do st <- lift get case f st of Nothing -> throwError s Just (a, st) -> do lift $ put st return a parseToReadsPrec :: Parse a -> Int -> String -> [(a, String)] parseToReadsPrec p i s = case runIdentity . flip runStateT s . runExceptT $ parens' p of (Right a, s) -> [(a,s)] _ -> [] -- | Demand an exact string. exact :: String -> Parse () exact s = readsToParse (show s) $ fmap (\x -> ((),x)) . List.stripPrefix s . dropWhile (==' ') readParse :: Read a => Parse a readParse = readsToParse "read failed" $ listToMaybe . reads parens' :: Parse a -> Parse a parens' p = do exact "(" x <- p exact ")" return x `mplus` p instance Read InteractionId where readsPrec = parseToReadsPrec $ fmap InteractionId readParse -- | Note that the grammar implemented by this instance does not -- necessarily match the current representation of ranges. instance Read a => Read (Range' a) where readsPrec = parseToReadsPrec $ (exact "intervalsToRange" >> liftM2 intervalsToRange readParse readParse) `mplus` (exact "noRange" >> return noRange) instance Read a => Read (Interval' a) where readsPrec = parseToReadsPrec $ do exact "Interval" liftM2 Interval readParse readParse instance Read AbsolutePath where readsPrec = parseToReadsPrec $ do exact "mkAbsolute" fmap mkAbsolute readParse instance Read a => Read (Position' a) where readsPrec = parseToReadsPrec $ do exact "Pn" liftM4 Pn readParse readParse readParse readParse --------------------------------------------------------- -- | Can the command run even if the relevant file has not been loaded -- into the state? independent :: Interaction -> Bool independent (Cmd_load {}) = True independent (Cmd_compile {}) = True independent (Cmd_load_highlighting_info {}) = True independent Cmd_tokenHighlighting {} = True independent Cmd_show_version = True independent _ = False -- | Should 'Resp_InteractionPoints' be issued after the command has -- run? updateInteractionPointsAfter :: Interaction -> Bool updateInteractionPointsAfter Cmd_load{} = True updateInteractionPointsAfter Cmd_compile{} = True updateInteractionPointsAfter Cmd_constraints{} = False updateInteractionPointsAfter Cmd_metas{} = False updateInteractionPointsAfter Cmd_show_module_contents_toplevel{} = False updateInteractionPointsAfter Cmd_search_about_toplevel{} = False updateInteractionPointsAfter Cmd_solveAll{} = True updateInteractionPointsAfter Cmd_solveOne{} = True updateInteractionPointsAfter Cmd_infer_toplevel{} = False updateInteractionPointsAfter Cmd_compute_toplevel{} = False updateInteractionPointsAfter Cmd_load_highlighting_info{} = False updateInteractionPointsAfter Cmd_tokenHighlighting{} = False updateInteractionPointsAfter Cmd_highlight{} = True updateInteractionPointsAfter ShowImplicitArgs{} = False updateInteractionPointsAfter ToggleImplicitArgs{} = False updateInteractionPointsAfter Cmd_give{} = True updateInteractionPointsAfter Cmd_refine{} = True updateInteractionPointsAfter Cmd_intro{} = True updateInteractionPointsAfter Cmd_refine_or_intro{} = True updateInteractionPointsAfter Cmd_autoOne{} = True updateInteractionPointsAfter Cmd_autoAll{} = True updateInteractionPointsAfter Cmd_context{} = False updateInteractionPointsAfter Cmd_helper_function{} = False updateInteractionPointsAfter Cmd_infer{} = False updateInteractionPointsAfter Cmd_goal_type{} = False updateInteractionPointsAfter Cmd_elaborate_give{} = True updateInteractionPointsAfter Cmd_goal_type_context{} = False updateInteractionPointsAfter Cmd_goal_type_context_infer{} = False updateInteractionPointsAfter Cmd_goal_type_context_check{} = False updateInteractionPointsAfter Cmd_show_module_contents{} = False updateInteractionPointsAfter Cmd_make_case{} = True updateInteractionPointsAfter Cmd_compute{} = False updateInteractionPointsAfter Cmd_why_in_scope{} = False updateInteractionPointsAfter Cmd_why_in_scope_toplevel{} = False updateInteractionPointsAfter Cmd_show_version{} = False updateInteractionPointsAfter Cmd_abort{} = False -- | Interpret an interaction interpret :: Interaction -> CommandM () interpret (Cmd_load m argv) = cmd_load' m argv True Imp.TypeCheck $ \_ -> interpret Cmd_metas interpret (Cmd_compile b file argv) = cmd_load' file argv (b `elem` [LaTeX, QuickLaTeX]) (if b == QuickLaTeX then Imp.ScopeCheck else Imp.TypeCheck) $ \(i, mw) -> do mw <- lift $ Imp.applyFlagsToMaybeWarnings mw case mw of Imp.NoWarnings -> do lift $ case b of LaTeX -> LaTeX.generateLaTeX i QuickLaTeX -> LaTeX.generateLaTeX i OtherBackend "GHCNoMain" -> callBackend "GHC" NotMain i -- for backwards compatibility OtherBackend b -> callBackend b IsMain i (pwe, pwa) <- interpretWarnings display_info $ Info_CompilationOk pwa pwe Imp.SomeWarnings w -> do pw <- lift $ prettyTCWarnings w display_info $ Info_Error $ unlines [ "You need to fix the following errors before you can compile" , "the module:" , "" , pw ] interpret Cmd_constraints = display_info . Info_Constraints . show . vcat . map pretty =<< lift B.getConstraints interpret Cmd_metas = do -- CL.showMetas [] unsolvedNotOK <- lift $ not . optAllowUnsolved <$> pragmaOptions ms <- lift showOpenMetas (pwe, pwa) <- interpretWarnings display_info $ Info_AllGoalsWarnings (unlines ms) pwa pwe interpret (Cmd_show_module_contents_toplevel norm s) = liftCommandMT B.atTopLevel $ showModuleContents norm noRange s interpret (Cmd_search_about_toplevel norm s) = liftCommandMT B.atTopLevel $ searchAbout norm noRange s interpret (Cmd_solveAll norm) = solveInstantiatedGoals norm Nothing interpret (Cmd_solveOne norm ii _ _) = solveInstantiatedGoals norm' (Just ii) -- `solveOne` is called via `agda2-maybe-normalised` which does not use -- AsIs < Simplified < Normalised but rather Simplified < Instantiated < Normalised -- So we remap the Rewrite modifiers to match solveAll's behaviour. -- NB: instantiate is called in getSolvedInteractionPoints no matter what. where norm' = case norm of Simplified -> AsIs Instantiated -> Simplified _ -> norm interpret (Cmd_infer_toplevel norm s) = parseAndDoAtToplevel (prettyA <=< B.typeInCurrent norm) Info_InferredType s interpret (Cmd_compute_toplevel cmode s) = parseAndDoAtToplevel action Info_NormalForm $ computeWrapInput cmode s where action = allowNonTerminatingReductions . (if computeIgnoreAbstract cmode then ignoreAbstractMode else inConcreteMode) . (B.showComputed cmode <=< B.evalInCurrent) interpret (ShowImplicitArgs showImpl) = do opts <- lift commandLineOptions setCommandLineOpts $ opts { optPragmaOptions = (optPragmaOptions opts) { optShowImplicit = showImpl } } interpret ToggleImplicitArgs = do opts <- lift commandLineOptions let ps = optPragmaOptions opts setCommandLineOpts $ opts { optPragmaOptions = ps { optShowImplicit = not $ optShowImplicit ps } } interpret (Cmd_load_highlighting_info source) = do l <- asksTC envHighlightingLevel when (l /= None) $ do -- Make sure that the include directories have -- been set. setCommandLineOpts =<< lift commandLineOptions resp <- lift $ liftIO . tellToUpdateHighlighting =<< do ex <- liftIO $ doesFileExist source absSource <- liftIO $ absolute source case ex of False -> return Nothing True -> (do si <- Imp.sourceInfo absSource let m = Imp.siModuleName si checkModuleName m absSource Nothing mmi <- getVisitedModule m case mmi of Nothing -> return Nothing Just mi -> if hashText (Imp.siSource si) == iSourceHash (miInterface mi) then do modFile <- useTC stModuleToSource method <- viewTC eHighlightingMethod return $ Just (iHighlighting $ miInterface mi, method, modFile) else return Nothing) `catchError` \_ -> return Nothing mapM_ putResponse resp interpret (Cmd_tokenHighlighting source remove) = do info <- do l <- asksTC envHighlightingLevel if l == None then return Nothing else do source <- liftIO (absolute source) lift $ (Just <$> generateTokenInfo source) `catchError` \_ -> return Nothing `finally` case remove of Remove -> liftIO $ removeFile source Keep -> return () case info of Just info -> lift $ printHighlightingInfo RemoveHighlighting info Nothing -> return () interpret (Cmd_highlight ii rng s) = do l <- asksTC envHighlightingLevel when (l /= None) $ do scope <- getOldInteractionScope ii removeOldInteractionScope ii handle $ do e <- try ("Highlighting failed to parse expression in " ++ show ii) $ B.parseExpr rng s e <- try ("Highlighting failed to scope check expression in " ++ show ii) $ concreteToAbstract scope e lift $ printHighlightingInfo KeepHighlighting =<< generateTokenInfoFromString rng s lift $ highlightExpr e where handle :: ExceptT String TCM () -> CommandM () handle m = do res <- lift $ runExceptT m case res of Left s -> display_info $ Info_Error s Right _ -> return () try :: String -> TCM a -> ExceptT String TCM a try err m = mkExceptT $ do (mapLeft (const err) <$> freshTCM m) `catchError` \ _ -> return (Left err) -- freshTCM to avoid scope checking creating new interaction points interpret (Cmd_give force ii rng s) = give_gen force ii rng s Give interpret (Cmd_refine ii rng s) = give_gen WithoutForce ii rng s Refine interpret (Cmd_intro pmLambda ii rng _) = do ss <- lift $ B.introTactic pmLambda ii liftCommandMT (B.withInteractionId ii) $ case ss of [] -> do display_info $ Info_Intro $ "No introduction forms found." [s] -> give_gen WithoutForce ii rng s Intro _:_:_ -> do display_info $ Info_Intro $ sep [ "Don't know which constructor to introduce of" , let mkOr [] = [] mkOr [x, y] = [text x <+> "or" <+> text y] mkOr (x:xs) = text x : mkOr xs in nest 2 $ fsep $ punctuate comma (mkOr ss) ] interpret (Cmd_refine_or_intro pmLambda ii r s) = interpret $ let s' = trim s in (if null s' then Cmd_intro pmLambda else Cmd_refine) ii r s' interpret (Cmd_autoOne ii rng s) = do -- Andreas, 2014-07-05 Issue 1226: -- Save the state to have access to even those interaction ids -- that Auto solves (since Auto gives the solution right away). st <- getTC (time , res) <- maybeTimed $ Auto.auto ii rng s case autoProgress res of Solutions sols -> do lift $ reportSLn "auto" 10 $ "Auto produced the following solutions " ++ show sols forM_ sols $ \(ii, s) -> do -- Andreas, 2014-07-05 Issue 1226: -- For highlighting, Resp_GiveAction needs to access -- the @oldInteractionScope@s of the interaction points solved by Auto. -- We dig them out from the state before Auto was invoked. insertOldInteractionScope ii =<< liftLocalState (putTC st >> getInteractionScope ii) -- Andreas, 2014-07-07: NOT TRUE: -- -- Andreas, 2014-07-05: The following should be obsolete, -- -- as Auto has removed the interaction points already: -- modifyTheInteractionPoints $ filter (/= ii) putResponse $ Resp_GiveAction ii $ Give_String s -- Andreas, 2014-07-07: Remove the interaction points in one go. modifyTheInteractionPoints (List.\\ (map fst sols)) case autoMessage res of Nothing -> interpret Cmd_metas Just msg -> display_info $ Info_Auto msg FunClauses cs -> do case autoMessage res of Nothing -> return () Just msg -> display_info $ Info_Auto msg putResponse $ Resp_MakeCase R.Function cs Refinement s -> give_gen WithoutForce ii rng s Refine maybe (return ()) (display_info . Info_Time) time interpret Cmd_autoAll = do iis <- getInteractionPoints unless (null iis) $ do let time = 1000 `div` length iis st <- getTC solved <- forM iis $ \ ii -> do rng <- getInteractionRange ii res <- Auto.auto ii rng ("-t " ++ show time ++ "ms") case autoProgress res of Solutions sols -> forM sols $ \ (jj, s) -> do oldInteractionScope <- liftLocalState (putTC st >> getInteractionScope jj) insertOldInteractionScope jj oldInteractionScope putResponse $ Resp_GiveAction ii $ Give_String s return jj _ -> return [] modifyTheInteractionPoints (List.\\ concat solved) interpret (Cmd_context norm ii _ _) = display_info . Info_Context =<< liftLocalState (prettyContext norm False ii) interpret (Cmd_helper_function norm ii rng s) = display_info . Info_HelperFunction =<< liftLocalState (cmd_helper_function norm ii rng s) interpret (Cmd_infer norm ii rng s) = display_info . Info_InferredType =<< liftLocalState (B.withInteractionId ii (prettyATop =<< B.typeInMeta ii norm =<< B.parseExprIn ii rng s)) interpret (Cmd_goal_type norm ii _ _) = display_info . Info_CurrentGoal =<< liftLocalState (B.withInteractionId ii $ prettyTypeOfMeta norm ii) interpret (Cmd_elaborate_give norm ii rng s) = do have <- liftLocalState $ B.withInteractionId ii $ do expr <- B.parseExprIn ii rng s goal <- B.typeOfMeta AsIs ii term <- case goal of OfType _ ty -> checkExpr expr =<< isType_ ty _ -> __IMPOSSIBLE__ nf <- normalForm norm term txt <- localTC (\ e -> e { envPrintMetasBare = True }) (TCP.prettyTCM nf) return $ show txt give_gen WithoutForce ii rng have ElaborateGive interpret (Cmd_goal_type_context norm ii rng s) = cmd_goal_type_context_and empty norm ii rng s interpret (Cmd_goal_type_context_infer norm ii rng s) = do -- In case of the empty expression to type, don't fail with -- a stupid parse error, but just fall back to -- Cmd_goal_type_context. have <- if all Char.isSpace s then return empty else liftLocalState $ do typ <- B.withInteractionId ii $ prettyATop =<< B.typeInMeta ii norm =<< B.parseExprIn ii rng s return $ "Have:" <+> typ cmd_goal_type_context_and have norm ii rng s interpret (Cmd_goal_type_context_check norm ii rng s) = do have <- liftLocalState $ B.withInteractionId ii $ do expr <- B.parseExprIn ii rng s goal <- B.typeOfMeta AsIs ii term <- case goal of OfType _ ty -> checkExpr expr =<< isType_ ty _ -> __IMPOSSIBLE__ txt <- TCP.prettyTCM =<< normalForm norm term return $ "Elaborates to:" <+> txt cmd_goal_type_context_and have norm ii rng s interpret (Cmd_show_module_contents norm ii rng s) = liftCommandMT (B.withInteractionId ii) $ showModuleContents norm rng s interpret (Cmd_why_in_scope_toplevel s) = liftCommandMT B.atTopLevel $ whyInScope s interpret (Cmd_why_in_scope ii rng s) = liftCommandMT (B.withInteractionId ii) $ whyInScope s interpret (Cmd_make_case ii rng s) = do (f, casectxt, cs) <- lift $ makeCase ii rng s liftCommandMT (B.withInteractionId ii) $ do hidden <- lift $ showImplicitArguments tel <- lift $ lookupSection (qnameModule f) -- don't shadow the names in this telescope unicode <- getsTC $ optUseUnicode . getPragmaOptions pcs :: [Doc] <- lift $ inTopContext $ addContext tel $ mapM prettyA cs let pcs' :: [String] = List.map (extlam_dropName unicode casectxt . render) pcs lift $ reportSDoc "interaction.case" 60 $ TCP.vcat [ "InteractionTop.Cmd_make_case" , TCP.nest 2 $ TCP.vcat [ "cs = " TCP.<+> TCP.vcat (map prettyA cs) , "pcs = " TCP.<+> TCP.vcat (map return pcs) , "pcs' = " TCP.<+> TCP.vcat (map TCP.text pcs') ] ] lift $ reportSDoc "interaction.case" 90 $ TCP.vcat [ "InteractionTop.Cmd_make_case" , TCP.nest 2 $ TCP.vcat [ "cs = " TCP.<+> TCP.text (show cs) ] ] putResponse $ Resp_MakeCase (makeCaseVariant casectxt) pcs' where render = renderStyle (style { mode = OneLineMode }) makeCaseVariant :: CaseContext -> MakeCaseVariant makeCaseVariant Nothing = R.Function makeCaseVariant Just{} = R.ExtendedLambda -- very dirty hack, string manipulation by dropping the function name -- and replacing the last " = " with " -> ". It's important not to replace -- the equal sign in named implicit with an arrow! extlam_dropName :: Bool -> CaseContext -> String -> String extlam_dropName _ Nothing x = x extlam_dropName unicode Just{} x = unwords $ reverse $ replEquals $ reverse $ drop 1 $ words x where replEquals ("=" : ws) | unicode = "→" : ws | otherwise = "->" : ws replEquals (w : ws) = w : replEquals ws replEquals [] = [] interpret (Cmd_compute cmode ii rng s) = display_info . Info_NormalForm =<< do liftLocalState $ do e <- B.parseExprIn ii rng $ computeWrapInput cmode s B.withInteractionId ii $ do showComputed cmode =<< do applyWhen (computeIgnoreAbstract cmode) ignoreAbstractMode $ B.evalInCurrent e interpret Cmd_show_version = display_info Info_Version interpret Cmd_abort = return () -- | Show warnings interpretWarnings :: CommandM (String, String) interpretWarnings = do mws <- lift $ Imp.getMaybeWarnings AllWarnings case filter isNotMeta <$> mws of Imp.SomeWarnings ws@(_:_) -> do let (we, wa) = classifyWarnings ws pwe <- lift $ prettyTCWarnings we pwa <- lift $ prettyTCWarnings wa return (pwe, pwa) _ -> return ("", "") where isNotMeta w = case tcWarning w of UnsolvedInteractionMetas{} -> False UnsolvedMetaVariables{} -> False _ -> True -- | Solved goals already instantiated internally -- The second argument potentially limits it to one specific goal. solveInstantiatedGoals :: B.Rewrite -> Maybe InteractionId -> CommandM () solveInstantiatedGoals norm mii = do -- Andreas, 2016-10-23 issue #2280: throw away meta elims. out <- lift $ localTC (\ e -> e { envPrintMetasBare = True }) $ do sip <- B.getSolvedInteractionPoints False norm -- only solve metas which have a proper instantiation, i.e., not another meta let sip' = maybe id (\ ii -> filter ((ii ==) . fst3)) mii sip mapM prt sip' putResponse $ Resp_SolveAll out where prt (i, m, e) = do mi <- getMetaInfo <$> lookupMeta m e <- withMetaInfo mi $ abstractToConcreteCtx TopCtx e return (i, e) -- | Print open metas nicely. showOpenMetas :: TCM [String] showOpenMetas = do ims <- B.typesOfVisibleMetas B.AsIs di <- forM ims $ \ i -> B.withInteractionId (B.outputFormId $ B.OutputForm noRange [] i) $ prettyATop i -- Show unsolved implicit arguments simplified. unsolvedNotOK <- not . optAllowUnsolved <$> pragmaOptions hms <- (guard unsolvedNotOK >>) <$> B.typesOfHiddenMetas B.Simplified dh <- mapM showA' hms return $ map show di ++ dh where metaId (B.OfType i _) = i metaId (B.JustType i) = i metaId (B.JustSort i) = i metaId (B.Assign i e) = i metaId _ = __IMPOSSIBLE__ showA' :: B.OutputConstraint A.Expr NamedMeta -> TCM String showA' m = do let i = nmid $ metaId m r <- getMetaRange i d <- B.withMetaId i (prettyATop m) return $ show d ++ " [ at " ++ show r ++ " ]" -- | @cmd_load' file argv unsolvedOk cmd@ -- loads the module in file @file@, -- using @argv@ as the command-line options. -- -- If type checking completes without any exceptions having been -- encountered then the command @cmd r@ is executed, where @r@ is the -- result of 'Imp.typeCheckMain'. cmd_load' :: FilePath -> [String] -> Bool -- ^ Allow unsolved meta-variables? -> Imp.Mode -- ^ Full type-checking, or only -- scope-checking? -> ((Interface, Imp.MaybeWarnings) -> CommandM ()) -> CommandM () cmd_load' file argv unsolvedOK mode cmd = do f <- liftIO $ absolute file ex <- liftIO $ doesFileExist $ filePath f unless ex $ typeError $ GenericError $ "The file " ++ file ++ " was not found." -- Forget the previous "current file" and interaction points. modify $ \ st -> st { theInteractionPoints = [] , theCurrentFile = Nothing } t <- liftIO $ getModificationTime file -- Parse the file. si <- lift (Imp.sourceInfo f) -- All options are reset when a file is reloaded, including the -- choice of whether or not to display implicit arguments. opts0 <- gets optionsOnReload backends <- useTC stBackends z <- liftIO $ runOptM $ parseBackendOptions backends argv opts0 case z of Left err -> lift $ typeError $ GenericError err Right (_, opts) -> do let update o = o { optAllowUnsolved = unsolvedOK && optAllowUnsolved o} root = projectRoot f (Imp.siModuleName si) lift $ TM.setCommandLineOptions' root $ mapPragmaOptions update opts displayStatus -- Reset the state, preserving options and decoded modules. Note -- that if the include directories have changed, then the decoded -- modules are reset when cmd_load' is run by ioTCM. lift resetState -- Clear the info buffer to make room for information about which -- module is currently being type-checked. putResponse Resp_ClearRunningInfo -- Remove any prior syntax highlighting. putResponse (Resp_ClearHighlighting NotOnlyTokenBased) ok <- lift $ Imp.typeCheckMain f mode si -- The module type checked. If the file was not changed while the -- type checker was running then the interaction points and the -- "current file" are stored. t' <- liftIO $ getModificationTime file when (t == t') $ do is <- lift $ sortInteractionPoints =<< getInteractionPoints modify $ \st -> st { theInteractionPoints = is , theCurrentFile = Just (f, t) } cmd ok -- | Set 'envCurrentPath' to 'theCurrentFile', if any. withCurrentFile :: CommandM a -> CommandM a withCurrentFile m = do mfile <- fmap fst <$> gets theCurrentFile localTC (\ e -> e { envCurrentPath = mfile }) m -- | Available backends. data CompilerBackend = LaTeX | QuickLaTeX | OtherBackend String deriving (Eq) instance Show CompilerBackend where show LaTeX = "LaTeX" show QuickLaTeX = "QuickLaTeX" show (OtherBackend s) = s instance Read CompilerBackend where readsPrec _ s = do (t, s) <- lex s let b = case t of "LaTeX" -> LaTeX "QuickLaTeX" -> QuickLaTeX _ -> OtherBackend t return (b, s) data GiveRefine = Give | Refine | Intro | ElaborateGive deriving (Eq, Show) -- | A "give"-like action (give, refine, etc). -- -- @give_gen force ii rng s give_ref mk_newtxt@ -- acts on interaction point @ii@ -- occupying range @rng@, -- placing the new content given by string @s@, -- and replacing @ii@ by the newly created interaction points -- in the state if safety checks pass (unless @force@ is applied). give_gen :: UseForce -- ^ Should safety checks be skipped? -> InteractionId -> Range -> String -> GiveRefine -> CommandM () give_gen force ii rng s0 giveRefine = do let s = trim s0 lift $ reportSLn "interaction.give" 20 $ "give_gen " ++ s -- Andreas, 2015-02-26 if string is empty do nothing rather -- than giving a parse error. unless (null s) $ do let give_ref = case giveRefine of Give -> B.give Refine -> B.refine Intro -> B.refine ElaborateGive -> B.give -- save scope of the interaction point (for printing the given expr. later) scope <- lift $ getInteractionScope ii -- parse string and "give", obtaining an abstract expression -- and newly created interaction points (time, (ae, ae0, iis)) <- maybeTimed $ lift $ do mis <- getInteractionPoints reportSLn "interaction.give" 30 $ "interaction points before = " ++ show mis given <- B.parseExprIn ii rng s ae <- give_ref force ii Nothing given mis' <- getInteractionPoints reportSLn "interaction.give" 30 $ "interaction points after = " ++ show mis' return (ae, given, mis' List.\\ mis) -- favonia: backup the old scope for highlighting insertOldInteractionScope ii scope -- sort the new interaction points and put them into the state -- in replacement of the old interaction point iis <- lift $ sortInteractionPoints iis modifyTheInteractionPoints $ replace ii iis -- print abstract expr ce <- lift $ abstractToConcreteScope scope ae lift $ reportSLn "interaction.give" 30 $ unlines [ "ce = " ++ show ce , "scopePrecedence = " ++ show (scopePrecedence scope) ] -- if the command was @Give@, use the literal user input; -- Andreas, 2014-01-15, see issue 1020: -- Refine could solve a goal by introducing the sole constructor -- without arguments. Then there are no interaction metas, but -- we still cannot just `give' the user string (which may be empty). -- WRONG: also, if no interaction metas were created by @Refine@ -- WRONG: let literally = (giveRefine == Give || null iis) && rng /= noRange -- Ulf, 2015-03-30, if we're doing intro we can't do literal give since -- there is nothing in the hole (issue 1892). let literally = giveRefine /= Intro && giveRefine /= ElaborateGive && ae == ae0 && rng /= noRange -- Ulf, 2014-01-24: This works for give since we're highlighting the string -- that's already in the buffer. Doing it before the give action means that -- the highlighting is moved together with the text when the hole goes away. -- To make it work for refine we'd have to adjust the ranges. when literally $ lift $ do l <- asksTC envHighlightingLevel when (l /= None) $ do printHighlightingInfo KeepHighlighting =<< generateTokenInfoFromString rng s highlightExpr ae putResponse $ Resp_GiveAction ii $ mkNewTxt literally ce lift $ reportSLn "interaction.give" 30 $ "putResponse GiveAction passed" -- display new goal set (if not measuring time) maybe (interpret Cmd_metas) (display_info . Info_Time) time lift $ reportSLn "interaction.give" 30 $ "interpret Cmd_metas passed" where -- Substitutes xs for x in ys. replace x xs ys = concatMap (\ y -> if y == x then xs else [y]) ys -- For @Give@ we can replace the ii by the user given input. mkNewTxt True C.Paren{} = Give_Paren mkNewTxt True _ = Give_NoParen -- Otherwise, we replace it by the reified value Agda computed. mkNewTxt False ce = Give_String $ prettyShow ce highlightExpr :: A.Expr -> TCM () highlightExpr e = localTC (\e -> e { envModuleNestingLevel = 0 , envHighlightingLevel = NonInteractive , envHighlightingMethod = Direct }) $ generateAndPrintSyntaxInfo decl Full True where dummy = mkName_ (NameId 0 0) ("dummy" :: String) info = mkDefInfo (nameConcrete dummy) noFixity' PublicAccess ConcreteDef (getRange e) decl = A.Axiom NoFunSig info defaultArgInfo Nothing (qnameFromList [dummy]) e -- | Sorts interaction points based on their ranges. sortInteractionPoints :: [InteractionId] -> TCM [InteractionId] sortInteractionPoints is = map fst . List.sortBy (compare `on` snd) <$> do forM is $ \ i -> do (i,) <$> getInteractionRange i -- | Pretty-prints the type of the meta-variable. prettyTypeOfMeta :: B.Rewrite -> InteractionId -> TCM Doc prettyTypeOfMeta norm ii = do form <- B.typeOfMeta norm ii case form of B.OfType _ e -> prettyATop e _ -> prettyATop form -- | Pretty-prints the context of the given meta-variable. prettyContext :: B.Rewrite -- ^ Normalise? -> Bool -- ^ Print the elements in reverse order? -> InteractionId -> TCM Doc prettyContext norm rev ii = B.withInteractionId ii $ do ctx <- filter (not . shouldHide) <$> B.contextOfMeta ii norm es <- mapM (prettyATop . B.ofExpr) ctx xs <- mapM (abstractToConcrete_ . B.ofName) ctx let ns = map (nameConcrete . B.ofName) ctx ss = map C.isInScope xs return $ align 10 $ applyWhen rev reverse $ zip (zipWith prettyCtxName ns xs) (zipWith prettyCtxType es ss) where shouldHide (OfType' n e) = isNoName n || nameIsRecordName n prettyCtxName :: C.Name -> C.Name -> String prettyCtxName n x | n == x = prettyShow x | isInScope n == InScope = prettyShow n ++ " = " ++ prettyShow x | otherwise = prettyShow x prettyCtxType e nis = ":" <+> (e P.<> notInScopeMarker nis) notInScopeMarker nis = case isInScope nis of C.InScope -> "" C.NotInScope -> " (not in scope)" -- | Create type of application of new helper function that would solve the goal. cmd_helper_function :: B.Rewrite -> InteractionId -> Range -> String -> TCM Doc cmd_helper_function norm ii r s = B.withInteractionId ii $ inTopContext $ prettyATop =<< B.metaHelperType norm ii r s -- | Displays the current goal, the given document, and the current -- context. -- -- Should not modify the state. cmd_goal_type_context_and :: Doc -> B.Rewrite -> InteractionId -> Range -> String -> StateT CommandState (TCMT IO) () cmd_goal_type_context_and doc norm ii _ _ = display_info . Info_GoalType =<< do lift $ do goal <- B.withInteractionId ii $ prettyTypeOfMeta norm ii ctx <- prettyContext norm True ii m <- lookupInteractionId ii constr <- vcat . map pretty <$> B.getConstraints' (mentionsMeta m) let constrDoc = ifNull constr [] $ \constr -> [ text $ delimiter "Constraints" , constr ] return $ vcat $ [ "Goal:" <+> goal , doc , text (replicate 60 '\x2014') , ctx ] ++ constrDoc -- | Shows all the top-level names in the given module, along with -- their types. showModuleContents :: B.Rewrite -> Range -> String -> CommandM () showModuleContents norm rng s = display_info . Info_ModuleContents =<< do liftLocalState $ do (modules, tel, types) <- B.moduleContents norm rng s types' <- addContext tel $ forM types $ \ (x, t) -> do t <- TCP.prettyTCM t return (prettyShow x, ":" <+> t) return $ vcat [ "Modules" , nest 2 $ vcat $ map pretty modules , "Names" , nest 2 $ align 10 types' ] -- | Shows all the top-level names in scope which mention all the given -- identifiers in their type. searchAbout :: B.Rewrite -> Range -> String -> CommandM () searchAbout norm rg nm = do let tnm = trim nm unless (null tnm) $ do fancy <- lift $ B.atTopLevel $ do hits <- findMentions norm rg tnm forM hits $ \ (x, t) -> do t <- TCP.prettyTCM t return (prettyShow x, ":" <+> t) display_info $ Info_SearchAbout $ "Definitions about" <+> text (List.intercalate ", " $ words nm) $$ nest 2 (align 10 fancy) -- | Explain why something is in scope. whyInScope :: String -> CommandM () whyInScope s = display_info . Info_WhyInScope =<< do Just (file, _) <- gets theCurrentFile let cwd = takeDirectory $ filePath file liftLocalState $ do (v, xs, ms) <- B.whyInScope s explanation cwd v xs ms where explanation _ Nothing [] [] = TCP.text (s ++ " is not in scope.") explanation cwd v xs ms = TCP.vcat [ TCP.text (s ++ " is in scope as") , TCP.nest 2 $ TCP.vcat [variable v xs, modules ms] ] where prettyRange :: Range -> TCM Doc prettyRange r = pretty . (fmap . fmap) mkRel <$> do return r mkRel = makeRelative cwd . filePath -- variable :: Maybe _ -> [_] -> TCM Doc variable Nothing xs = names xs variable (Just x) xs | null xs = asVar | otherwise = TCP.vcat [ TCP.sep [ asVar, TCP.nest 2 $ shadowing x] , TCP.nest 2 $ names xs ] where asVar :: TCM Doc asVar = do "* a variable bound at" TCP.<+> TCP.prettyTCM (nameBindingSite $ localVar x) shadowing :: LocalVar -> TCM Doc shadowing (LocalVar _ _ []) = "shadowing" shadowing _ = "in conflict with" names xs = TCP.vcat $ map pName xs modules ms = TCP.vcat $ map pMod ms pKind DefName = "defined name" pKind ConName = "constructor" pKind FldName = "record field" pKind PatternSynName = "pattern synonym" pKind GeneralizeName = "generalizable variable" pKind DisallowedGeneralizeName = "generalizable variable from let open" pKind MacroName = "macro name" pKind QuotableName = "quotable name" pName :: AbstractName -> TCM Doc pName a = TCP.sep [ "* a" TCP.<+> pKind (anameKind a) TCP.<+> TCP.text (prettyShow $ anameName a) , TCP.nest 2 $ "brought into scope by" ] TCP.$$ TCP.nest 2 (pWhy (nameBindingSite $ qnameName $ anameName a) (anameLineage a)) pMod :: AbstractModule -> TCM Doc pMod a = TCP.sep [ "* a module" TCP.<+> TCP.text (prettyShow $ amodName a) , TCP.nest 2 $ "brought into scope by" ] TCP.$$ TCP.nest 2 (pWhy (nameBindingSite $ qnameName $ mnameToQName $ amodName a) (amodLineage a)) pWhy :: Range -> WhyInScope -> TCM Doc pWhy r Defined = "- its definition at" TCP.<+> TCP.prettyTCM r pWhy r (Opened (C.QName x) w) | isNoName x = pWhy r w pWhy r (Opened m w) = "- the opening of" TCP.<+> TCP.prettyTCM m TCP.<+> "at" TCP.<+> TCP.prettyTCM (getRange m) TCP.$$ pWhy r w pWhy r (Applied m w) = "- the application of" TCP.<+> TCP.prettyTCM m TCP.<+> "at" TCP.<+> TCP.prettyTCM (getRange m) TCP.$$ pWhy r w -- | Sets the command line options and updates the status information. setCommandLineOpts :: CommandLineOptions -> CommandM () setCommandLineOpts opts = do lift $ TM.setCommandLineOptions opts displayStatus -- | Computes some status information. -- -- Does not change the state. status :: CommandM Status status = do cf <- gets theCurrentFile showImpl <- lift showImplicitArguments -- Check if the file was successfully type checked, and has not -- changed since. Note: This code does not check if any dependencies -- have changed, and uses a time stamp to check for changes. checked <- lift $ case cf of Nothing -> return False Just (f, t) -> do t' <- liftIO $ getModificationTime $ filePath f case t == t' of False -> return False True -> do mm <- lookupModuleFromSource f case mm of Nothing -> return False -- work-around for Issue1007 Just m -> maybe False (not . miWarnings) <$> getVisitedModule m return $ Status { sShowImplicitArguments = showImpl , sChecked = checked } -- | Displays or updates status information. -- -- Does not change the state. displayStatus :: CommandM () displayStatus = putResponse . Resp_Status =<< status -- | @display_info@ does what @'display_info'' False@ does, but -- additionally displays some status information (see 'status' and -- 'displayStatus'). display_info :: DisplayInfo -> CommandM () display_info info = do displayStatus putResponse $ Resp_DisplayInfo info refreshStr :: [String] -> String -> ([String], String) refreshStr taken s = go nameModifiers where go (m:mods) = let s' = s ++ m in if s' `elem` taken then go mods else (s':taken, s') go _ = __IMPOSSIBLE__ nameModifiers :: [String] nameModifiers = "" : "'" : "''" : [show i | i <-[3..]] -- | Parses and scope checks an expression (using the \"inside scope\" -- as the scope), performs the given command with the expression as -- input, and displays the result. parseAndDoAtToplevel :: (A.Expr -> TCM Doc) -- ^ The command to perform. -> (Doc -> DisplayInfo) -- ^ The name to use for the buffer displaying the output. -> String -- ^ The expression to parse. -> CommandM () parseAndDoAtToplevel cmd title s = do (time, res) <- localStateCommandM $ do e <- lift $ runPM $ parse exprParser s maybeTimed $ lift $ B.atTopLevel $ do cmd =<< concreteToAbstract_ e display_info $ title $ fromMaybe empty time $$ res maybeTimed :: CommandM a -> CommandM (Maybe Doc, a) maybeTimed work = do doTime <- lift $ hasVerbosity "profile.interactive" 10 if not doTime then (Nothing,) <$> work else do (r, time) <- measureTime work return (Just $ "Time:" <+> pretty time, r) -- | Tell to highlight the code using the given highlighting -- info (unless it is @Nothing@). tellToUpdateHighlighting :: Maybe (HighlightingInfo, HighlightingMethod, ModuleToSource) -> IO [Response] tellToUpdateHighlighting Nothing = return [] tellToUpdateHighlighting (Just (info, method, modFile)) = return [Resp_HighlightingInfo info KeepHighlighting method modFile] -- | Tells the Emacs mode to go to the first error position (if any). tellEmacsToJumpToError :: Range -> [Response] tellEmacsToJumpToError r = case rStart r of Nothing -> [] Just (Pn { srcFile = Strict.Nothing }) -> [] Just (Pn { srcFile = Strict.Just f, posPos = p }) -> [ Resp_JumpToError (filePath f) p ] Agda-2.6.0.1/src/full/Agda/Interaction/BasicOps.hs0000644000000000000000000013167613466402171017625 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Agda.Interaction.BasicOps where import Prelude hiding (null) import Control.Arrow ((***), first, second) import Control.Applicative hiding (empty) import Control.Monad.Reader import Control.Monad.State import Control.Monad.Identity import qualified Data.IntMap as IntMap import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.List as List import Data.Maybe import Data.Traversable hiding (mapM, forM, for) import Data.Monoid import Agda.Interaction.Options import qualified Agda.Syntax.Concrete as C -- ToDo: Remove with instance of ToConcrete import Agda.Syntax.Position import Agda.Syntax.Abstract as A hiding (Open, Apply, Assign) import Agda.Syntax.Abstract.Views as A import Agda.Syntax.Abstract.Pretty import Agda.Syntax.Common import Agda.Syntax.Info (ExprInfo(..),MetaInfo(..),emptyMetaInfo,exprNoRange,defaultAppInfo_,defaultAppInfo) import qualified Agda.Syntax.Info as Info import Agda.Syntax.Internal as I import Agda.Syntax.Literal import Agda.Syntax.Translation.InternalToAbstract import Agda.Syntax.Translation.AbstractToConcrete import Agda.Syntax.Translation.ConcreteToAbstract import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.Syntax.Fixity(Precedence(..), argumentCtx_) import Agda.Syntax.Parser import Agda.TheTypeChecker import Agda.TypeChecking.Constraints import Agda.TypeChecking.Conversion import Agda.TypeChecking.Errors ( stringTCErr ) import Agda.TypeChecking.Monad as M hiding (MetaInfo) import Agda.TypeChecking.MetaVars import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.With import Agda.TypeChecking.Coverage import Agda.TypeChecking.Coverage.Match ( SplitPattern ) import Agda.TypeChecking.Records import Agda.TypeChecking.Irrelevance (wakeIrrelevantVars) import Agda.TypeChecking.Pretty ( PrettyTCM, prettyTCM ) import Agda.TypeChecking.Primitive import Agda.TypeChecking.Names import Agda.TypeChecking.Free import Agda.TypeChecking.CheckInternal import Agda.TypeChecking.SizedTypes.Solve import qualified Agda.TypeChecking.Pretty as TP import Agda.TypeChecking.Warnings ( runPM, warning ) import Agda.Termination.TermCheck (termMutual) import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.Permutation import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | Parses an expression. parseExpr :: Range -> String -> TCM C.Expr parseExpr rng s = do C.ExprWhere e wh <- runPM $ parsePosString exprWhereParser pos s unless (null wh) $ typeError $ GenericError $ "where clauses are not supported in holes" return e where pos = fromMaybe (startPos Nothing) $ rStart rng parseExprIn :: InteractionId -> Range -> String -> TCM Expr parseExprIn ii rng s = do mId <- lookupInteractionId ii updateMetaVarRange mId rng mi <- getMetaInfo <$> lookupMeta mId e <- parseExpr rng s concreteToAbstract (clScope mi) e giveExpr :: UseForce -> Maybe InteractionId -> MetaId -> Expr -> TCM () -- When translator from internal to abstract is given, this function might return -- the expression returned by the type checker. giveExpr force mii mi e = do mv <- lookupMeta mi -- In the context (incl. signature) of the meta variable, -- type check expression and assign meta withMetaInfo (getMetaInfo mv) $ do metaTypeCheck mv (mvJudgement mv) where metaTypeCheck mv IsSort{} = __IMPOSSIBLE__ metaTypeCheck mv (HasType _ t) = do reportSDoc "interaction.give" 20 $ "give: meta type =" TP.<+> prettyTCM t -- Here, we must be in the same context where the meta was created. -- Thus, we can safely apply its type to the context variables. ctx <- getContextArgs t' <- t `piApplyM` permute (takeP (length ctx) $ mvPermutation mv) ctx traceCall (CheckExprCall CmpLeq e t') $ do reportSDoc "interaction.give" 20 $ "give: instantiated meta type =" TP.<+> prettyTCM t' v <- checkExpr e t' case mvInstantiation mv of InstV xs v' -> unlessM ((Irrelevant ==) <$> asksTC envRelevance) $ do reportSDoc "interaction.give" 20 $ TP.sep [ "meta was already set to value v' = " TP.<+> prettyTCM v' TP.<+> " with free variables " TP.<+> return (fsep $ map pretty xs) , "now comparing it to given value v = " TP.<+> prettyTCM v , "in context " TP.<+> inTopContext (prettyTCM ctx) ] -- The number of free variables should be at least the size of the context -- (Ideally, if we implemented contextual type theory, it should be the same.) when (length xs < size ctx) __IMPOSSIBLE__ -- if there are more free variables than the context has -- we need to abstract over the additional ones (xs2) let (_xs1, xs2) = splitAt (size ctx) xs v' <- return $ foldr mkLam v' xs2 reportSDoc "interaction.give" 20 $ TP.sep [ "in meta context, v' = " TP.<+> prettyTCM v' ] equalTerm t' v v' -- Note: v' now lives in context of meta _ -> do -- updateMeta mi v reportSLn "interaction.give" 20 "give: meta unassigned, assigning..." args <- getContextArgs nowSolvingConstraints $ assign DirEq mi args v reportSDoc "interaction.give" 20 $ "give: meta variable updated!" unless (force == WithForce) $ redoChecks mii wakeupConstraints mi solveSizeConstraints DontDefaultToInfty cubical <- optCubical <$> pragmaOptions -- don't double check with cubical, because it gets in the way too often. unless (cubical || force == WithForce) $ do -- Double check. reportSDoc "interaction.give" 20 $ "give: double checking" vfull <- instantiateFull v checkInternal vfull t' -- | After a give, redo termination etc. checks for function which was complemented. redoChecks :: Maybe InteractionId -> TCM () redoChecks Nothing = return () redoChecks (Just ii) = do reportSLn "interaction.give" 20 $ "give: redoing termination check for function surrounding " ++ show ii ip <- lookupInteractionPoint ii case ipClause ip of IPNoClause -> return () IPClause f _ _ -> do mb <- mutualBlockOf f terErrs <- localTC (\ e -> e { envMutualBlock = Just mb }) $ termMutual [] unless (null terErrs) $ warning $ TerminationIssue terErrs -- TODO redo positivity check! -- | Try to fill hole by expression. -- -- Returns the given expression unchanged -- (for convenient generalization to @'refine'@). give :: UseForce -- ^ Skip safety checks? -> InteractionId -- ^ Hole. -> Maybe Range -> Expr -- ^ The expression to give. -> TCM Expr -- ^ If successful, the very expression is returned unchanged. give force ii mr e = liftTCM $ do -- if Range is given, update the range of the interaction meta mi <- lookupInteractionId ii whenJust mr $ updateMetaVarRange mi reportSDoc "interaction.give" 10 $ "giving expression" TP.<+> prettyTCM e reportSDoc "interaction.give" 50 $ TP.text $ show $ deepUnscope e -- Try to give mi := e do setMetaOccursCheck mi DontRunMetaOccursCheck -- #589, #2710: Allow giving recursive solutions. giveExpr force (Just ii) mi e `catchError` \ case -- Turn PatternErr into proper error: PatternErr -> typeError . GenericDocError =<< do withInteractionId ii $ "Failed to give" TP.<+> prettyTCM e err -> throwError err removeInteractionPoint ii return e -- | Try to refine hole by expression @e@. -- -- This amounts to successively try to give @e@, @e ?@, @e ? ?@, ... -- Returns the successfully given expression. refine :: UseForce -- ^ Skip safety checks when giving? -> InteractionId -- ^ Hole. -> Maybe Range -> Expr -- ^ The expression to refine the hole with. -> TCM Expr -- ^ The successfully given expression. refine force ii mr e = do mi <- lookupInteractionId ii mv <- lookupMeta mi let range = fromMaybe (getRange mv) mr scope = M.getMetaScope mv reportSDoc "interaction.refine" 10 $ "refining with expression" TP.<+> prettyTCM e reportSDoc "interaction.refine" 50 $ TP.text $ show $ deepUnscope e -- We try to append up to 10 meta variables tryRefine 10 range scope e where tryRefine :: Int -> Range -> ScopeInfo -> Expr -> TCM Expr tryRefine nrOfMetas r scope e = try nrOfMetas e where try :: Int -> Expr -> TCM Expr try 0 e = throwError $ stringTCErr "Cannot refine" try n e = give force ii (Just r) e `catchError` (\_ -> try (n - 1) =<< appMeta e) -- Apply A.Expr to a new meta appMeta :: Expr -> TCM Expr appMeta e = do let rng = rightMargin r -- Andreas, 2013-05-01 conflate range to its right margin to ensure that appended metas are last in numbering. This fixes issue 841. -- Make new interaction point ii <- registerInteractionPoint False rng Nothing let info = Info.MetaInfo { Info.metaRange = rng , Info.metaScope = scope { scopePrecedence = [argumentCtx_] } -- Ulf, 2017-09-07: The `argumentCtx_` above is causing #737. -- If we're building an operator application the precedence -- should be something else. , metaNumber = Nothing -- in order to print just as ?, not ?n , metaNameSuggestion = "" } metaVar = QuestionMark info ii count x e = getSum $ foldExpr isX e where isX (A.Var y) | x == y = Sum 1 isX _ = mempty lamView (A.Lam _ (DomainFree x) e) = Just (namedArg x, e) lamView (A.Lam i (DomainFull (TBind r (x : xs) a)) e) | null xs = Just (namedArg x, e) | otherwise = Just (namedArg x, A.Lam i (DomainFull $ TBind r xs a) e) lamView _ = Nothing -- reduce beta-redexes where the argument is used at most once smartApp i e arg = case lamView $ unScope e of Just (A.BindName x, e) | count x e < 2 -> mapExpr subX e where subX (A.Var y) | x == y = namedArg arg subX e = e _ -> App i e arg return $ smartApp (defaultAppInfo r) e $ defaultNamedArg metaVar -- Andreas, 2017-12-16: -- Ulf, your attempt to fix #737 introduced regression #2873. -- Going through concrete syntax does some arbitrary disambiguation -- of constructors, which subsequently makes refine fail. -- I am not convinced of the printing-parsing shortcut to address problems. -- (Unless you prove the roundtrip property.) -- -- rescopeExpr scope $ smartApp (defaultAppInfo r) e $ defaultNamedArg metaVar -- -- | Turn an abstract expression into concrete syntax and then back into -- -- abstract. This ensures that context precedences are set correctly for -- -- abstract expressions built by hand. Used by refine above. -- rescopeExpr :: ScopeInfo -> Expr -> TCM Expr -- rescopeExpr scope = withScope_ scope . (concreteToAbstract_ <=< runAbsToCon . preserveInteractionIds . toConcrete) {-| Evaluate the given expression in the current environment -} evalInCurrent :: Expr -> TCM Expr evalInCurrent e = do (v, t) <- inferExpr e v' <- {- etaContract =<< -} normalise v reify v' evalInMeta :: InteractionId -> Expr -> TCM Expr evalInMeta ii e = do m <- lookupInteractionId ii mi <- getMetaInfo <$> lookupMeta m withMetaInfo mi $ evalInCurrent e -- | Modifier for interactive commands, -- specifying the amount of normalization in the output. -- data Rewrite = AsIs | Instantiated | HeadNormal | Simplified | Normalised deriving (Show, Read) normalForm :: (Reduce t, Simplify t, Normalise t) => Rewrite -> t -> TCM t normalForm AsIs t = return t normalForm Instantiated t = return t -- reify does instantiation normalForm HeadNormal t = {- etaContract =<< -} reduce t normalForm Simplified t = {- etaContract =<< -} simplify t normalForm Normalised t = {- etaContract =<< -} normalise t -- | Modifier for the interactive computation command, -- specifying the mode of computation and result display. -- data ComputeMode = DefaultCompute | IgnoreAbstract | UseShowInstance deriving (Show, Read, Eq) computeIgnoreAbstract :: ComputeMode -> Bool computeIgnoreAbstract DefaultCompute = False computeIgnoreAbstract IgnoreAbstract = True computeIgnoreAbstract UseShowInstance = True -- UseShowInstance requires the result to be a string literal so respecting -- abstract can only ever break things. computeWrapInput :: ComputeMode -> String -> String computeWrapInput UseShowInstance s = "show (" ++ s ++ ")" computeWrapInput _ s = s showComputed :: ComputeMode -> Expr -> TCM Doc showComputed UseShowInstance e = case e of A.Lit (LitString _ s) -> pure (text s) _ -> ("Not a string:" $$) <$> prettyATop e showComputed _ e = prettyATop e -- | Modifier for interactive commands, -- specifying whether safety checks should be ignored. data UseForce = WithForce -- ^ Ignore additional checks, like termination/positivity... | WithoutForce -- ^ Don't ignore any checks. deriving (Eq, Read, Show) data OutputForm a b = OutputForm Range [ProblemId] (OutputConstraint a b) deriving (Functor) data OutputConstraint a b = OfType b a | CmpInType Comparison a b b | CmpElim [Polarity] a [b] [b] | JustType b | CmpTypes Comparison b b | CmpLevels Comparison b b | CmpTeles Comparison b b | JustSort b | CmpSorts Comparison b b | Guard (OutputConstraint a b) ProblemId | Assign b a | TypedAssign b a a | PostponedCheckArgs b [a] a a | IsEmptyType a | SizeLtSat a | FindInstanceOF b a [(a,a)] | PTSInstance b b | PostponedCheckFunDef QName a deriving (Functor) -- | A subset of 'OutputConstraint'. data OutputConstraint' a b = OfType' { ofName :: b , ofExpr :: a } outputFormId :: OutputForm a b -> b outputFormId (OutputForm _ _ o) = out o where out o = case o of OfType i _ -> i CmpInType _ _ i _ -> i CmpElim _ _ (i:_) _ -> i CmpElim _ _ [] _ -> __IMPOSSIBLE__ JustType i -> i CmpLevels _ i _ -> i CmpTypes _ i _ -> i CmpTeles _ i _ -> i JustSort i -> i CmpSorts _ i _ -> i Guard o _ -> out o Assign i _ -> i TypedAssign i _ _ -> i PostponedCheckArgs i _ _ _ -> i IsEmptyType _ -> __IMPOSSIBLE__ -- Should never be used on IsEmpty constraints SizeLtSat{} -> __IMPOSSIBLE__ FindInstanceOF _ _ _ -> __IMPOSSIBLE__ PTSInstance i _ -> i PostponedCheckFunDef{} -> __IMPOSSIBLE__ instance Reify ProblemConstraint (Closure (OutputForm Expr Expr)) where reify (PConstr pids cl) = enterClosure cl $ \c -> buildClosure =<< (OutputForm (getRange c) (Set.toList pids) <$> reify c) reifyElimToExpr :: I.Elim -> TCM Expr reifyElimToExpr e = case e of I.IApply _ _ v -> appl "iapply" <$> reify (defaultArg $ v) -- TODO Andrea: endpoints? I.Apply v -> appl "apply" <$> reify v I.Proj _o f -> appl "proj" <$> reify ((defaultArg $ I.Def f []) :: Arg Term) where appl :: String -> Arg Expr -> Expr appl s v = A.App defaultAppInfo_ (A.Lit (LitString noRange s)) $ fmap unnamed v instance Reify Constraint (OutputConstraint Expr Expr) where reify (ValueCmp cmp t u v) = CmpInType cmp <$> reify t <*> reify u <*> reify v reify (ValueCmpOnFace cmp p t u v) = CmpInType cmp <$> (reify =<< ty) <*> reify (lam_o u) <*> reify (lam_o v) where lam_o = I.Lam (setRelevance Irrelevant defaultArgInfo) . NoAbs "_" ty = runNamesT [] $ do p <- open p t <- open t pPi' "o" p (\ o -> t) reify (ElimCmp cmp _ t v es1 es2) = CmpElim cmp <$> reify t <*> mapM reifyElimToExpr es1 <*> mapM reifyElimToExpr es2 reify (LevelCmp cmp t t') = CmpLevels cmp <$> reify t <*> reify t' reify (TypeCmp cmp t t') = CmpTypes cmp <$> reify t <*> reify t' reify (TelCmp a b cmp t t') = CmpTeles cmp <$> (ETel <$> reify t) <*> (ETel <$> reify t') reify (SortCmp cmp s s') = CmpSorts cmp <$> reify s <*> reify s' reify (Guarded c pid) = do o <- reify c return $ Guard o pid reify (UnquoteTactic _ tac _ goal) = do tac <- A.App defaultAppInfo_ (A.Unquote exprNoRange) . defaultNamedArg <$> reify tac OfType tac <$> reify goal reify (UnBlock m) = do mi <- mvInstantiation <$> lookupMeta m m' <- reify (MetaV m []) case mi of BlockedConst t -> do e <- reify t return $ Assign m' e PostponedTypeCheckingProblem cl _ -> enterClosure cl $ \p -> case p of CheckExpr cmp e a -> do a <- reify a return $ TypedAssign m' e a CheckLambda cmp (Arg ai (xs, mt)) body target -> do domType <- maybe (return underscore) reify mt target <- reify target let mkN (WithHiding h x) = setHiding h $ defaultNamedArg $ A.BindName x bs = TBind noRange (map mkN xs) domType e = A.Lam Info.exprNoRange (DomainFull bs) body return $ TypedAssign m' e target CheckArgs _ _ args t0 t1 _ -> do t0 <- reify t0 t1 <- reify t1 return $ PostponedCheckArgs m' (map (namedThing . unArg) args) t0 t1 CheckProjAppToKnownPrincipalArg cmp e _ _ _ t _ _ _ -> TypedAssign m' e <$> reify t DoQuoteTerm cmp v t -> do tm <- A.App defaultAppInfo_ (A.QuoteTerm exprNoRange) . defaultNamedArg <$> reify v OfType tm <$> reify t Open{} -> __IMPOSSIBLE__ OpenInstance{} -> __IMPOSSIBLE__ InstV{} -> __IMPOSSIBLE__ reify (FindInstance m _b mcands) = FindInstanceOF <$> (reify $ MetaV m []) <*> (reify =<< getMetaType m) <*> (forM (fromMaybe [] mcands) $ \ (Candidate tm ty _) -> do (,) <$> reify tm <*> reify ty) reify (IsEmpty r a) = IsEmptyType <$> reify a reify (CheckSizeLtSat a) = SizeLtSat <$> reify a reify (CheckFunDef d i q cs) = do a <- reify =<< defType <$> getConstInfo q return $ PostponedCheckFunDef q a reify (HasBiggerSort a) = OfType <$> reify a <*> reify (UnivSort a) reify (HasPTSRule a b) = do (a,(x,b)) <- reify (a,b) return $ PTSInstance a b instance (Pretty a, Pretty b) => Pretty (OutputForm a b) where pretty (OutputForm r pids c) | null pids = sep [pretty c, prange r] | otherwise = sep [pretty pids, nest 2 $ sep [pretty c, prange r]] where prange r | null s = empty | otherwise = text $ " [ at " ++ s ++ " ]" where s = prettyShow r instance (Pretty a, Pretty b) => Pretty (OutputConstraint a b) where pretty oc = case oc of OfType e t -> pretty e .: t JustType e -> "Type" <+> pretty e JustSort e -> "Sort" <+> pretty e CmpInType cmp t e e' -> pcmp cmp e e' .: t CmpElim cmp t e e' -> pcmp cmp e e' .: t CmpTypes cmp t t' -> pcmp cmp t t' CmpLevels cmp t t' -> pcmp cmp t t' CmpTeles cmp t t' -> pcmp cmp t t' CmpSorts cmp s s' -> pcmp cmp s s' Guard o pid -> pretty o brackets ("blocked by problem" <+> pretty pid) Assign m e -> bin (pretty m) ":=" (pretty e) TypedAssign m e a -> bin (pretty m) ":=" $ bin (pretty e) ":?" (pretty a) PostponedCheckArgs m es t0 t1 -> bin (pretty m) ":=" $ (parens ("_" .: t0) <+> fsep (map (paren . pretty) es)) .: t1 where paren d = mparens (any (`elem` [' ', '\n']) $ show d) d IsEmptyType a -> "Is empty:" <+> pretty a SizeLtSat a -> "Not empty type of sizes:" <+> pretty a FindInstanceOF s t cs -> vcat [ "Resolve instance argument" (pretty s .: t) , nest 2 $ "Candidate:" , nest 4 $ vcat [ pretty v .: t | (v, t) <- cs ] ] PTSInstance a b -> "PTS instance for" <+> pretty (a, b) PostponedCheckFunDef q a -> "Check definition of" <+> pretty q <+> ":" <+> pretty a where bin a op b = sep [a, nest 2 $ op <+> b] pcmp cmp a b = bin (pretty a) (pretty cmp) (pretty b) val .: ty = bin val ":" (pretty ty) instance (ToConcrete a c, ToConcrete b d) => ToConcrete (OutputForm a b) (OutputForm c d) where toConcrete (OutputForm r pid c) = OutputForm r pid <$> toConcrete c instance (ToConcrete a c, ToConcrete b d) => ToConcrete (OutputConstraint a b) (OutputConstraint c d) where toConcrete (OfType e t) = OfType <$> toConcrete e <*> toConcreteCtx TopCtx t toConcrete (JustType e) = JustType <$> toConcrete e toConcrete (JustSort e) = JustSort <$> toConcrete e toConcrete (CmpInType cmp t e e') = CmpInType cmp <$> toConcreteCtx TopCtx t <*> toConcreteCtx argumentCtx_ e <*> toConcreteCtx argumentCtx_ e' toConcrete (CmpElim cmp t e e') = CmpElim cmp <$> toConcreteCtx TopCtx t <*> toConcreteCtx TopCtx e <*> toConcreteCtx TopCtx e' toConcrete (CmpTypes cmp e e') = CmpTypes cmp <$> toConcreteCtx argumentCtx_ e <*> toConcreteCtx argumentCtx_ e' toConcrete (CmpLevels cmp e e') = CmpLevels cmp <$> toConcreteCtx argumentCtx_ e <*> toConcreteCtx argumentCtx_ e' toConcrete (CmpTeles cmp e e') = CmpTeles cmp <$> toConcrete e <*> toConcrete e' toConcrete (CmpSorts cmp e e') = CmpSorts cmp <$> toConcreteCtx argumentCtx_ e <*> toConcreteCtx argumentCtx_ e' toConcrete (Guard o pid) = Guard <$> toConcrete o <*> pure pid toConcrete (Assign m e) = noTakenNames $ Assign <$> toConcrete m <*> toConcreteCtx TopCtx e toConcrete (TypedAssign m e a) = TypedAssign <$> toConcrete m <*> toConcreteCtx TopCtx e <*> toConcreteCtx TopCtx a toConcrete (PostponedCheckArgs m args t0 t1) = PostponedCheckArgs <$> toConcrete m <*> toConcrete args <*> toConcrete t0 <*> toConcrete t1 toConcrete (IsEmptyType a) = IsEmptyType <$> toConcreteCtx TopCtx a toConcrete (SizeLtSat a) = SizeLtSat <$> toConcreteCtx TopCtx a toConcrete (FindInstanceOF s t cs) = FindInstanceOF <$> toConcrete s <*> toConcrete t <*> mapM (\(tm,ty) -> (,) <$> toConcrete tm <*> toConcrete ty) cs toConcrete (PTSInstance a b) = PTSInstance <$> toConcrete a <*> toConcrete b toConcrete (PostponedCheckFunDef q a) = PostponedCheckFunDef q <$> toConcrete a instance (Pretty a, Pretty b) => Pretty (OutputConstraint' a b) where pretty (OfType' e t) = pretty e <+> ":" <+> pretty t instance (ToConcrete a c, ToConcrete b d) => ToConcrete (OutputConstraint' a b) (OutputConstraint' c d) where toConcrete (OfType' e t) = OfType' <$> toConcrete e <*> toConcreteCtx TopCtx t getConstraints :: TCM [OutputForm C.Expr C.Expr] getConstraints = getConstraints' $ const True getConstraints' :: (ProblemConstraint -> Bool) -> TCM [OutputForm C.Expr C.Expr] getConstraints' f = liftTCM $ do cs <- filter f <$> M.getAllConstraints cs <- forM cs $ \c -> do cl <- reify c enterClosure cl abstractToConcrete_ ss <- mapM toOutputForm =<< getSolvedInteractionPoints True AsIs -- get all return $ ss ++ cs where toOutputForm (ii, mi, e) = do mv <- getMetaInfo <$> lookupMeta mi withMetaInfo mv $ do let m = QuestionMark emptyMetaInfo{ metaNumber = Just $ fromIntegral ii } ii abstractToConcrete_ $ OutputForm noRange [] $ Assign m e -- | @getSolvedInteractionPoints True@ returns all solutions, -- even if just solved by another, non-interaction meta. -- -- @getSolvedInteractionPoints False@ only returns metas that -- are solved by a non-meta. getSolvedInteractionPoints :: Bool -> Rewrite -> TCM [(InteractionId, MetaId, Expr)] getSolvedInteractionPoints all norm = concat <$> do mapM solution =<< getInteractionIdsAndMetas where solution (i, m) = do mv <- lookupMeta m withMetaInfo (getMetaInfo mv) $ do args <- getContextArgs scope <- getScope let sol v = do -- Andreas, 2014-02-17 exclude metas solved by metas v <- instantiate v let isMeta = case v of MetaV{} -> True; _ -> False if isMeta && not all then return [] else do e <- reify =<< normalForm norm v return [(i, m, ScopedExpr scope e)] unsol = return [] case mvInstantiation mv of InstV{} -> sol (MetaV m $ map Apply args) Open{} -> unsol OpenInstance{} -> unsol BlockedConst{} -> unsol PostponedTypeCheckingProblem{} -> unsol typeOfMetaMI :: Rewrite -> MetaId -> TCM (OutputConstraint Expr NamedMeta) typeOfMetaMI norm mi = do mv <- lookupMeta mi withMetaInfo (getMetaInfo mv) $ rewriteJudg mv (mvJudgement mv) where rewriteJudg :: MetaVariable -> Judgement MetaId -> TCM (OutputConstraint Expr NamedMeta) rewriteJudg mv (HasType i t) = do ms <- getMetaNameSuggestion i -- Andreas, 2019-03-17, issue #3638: -- Need to put meta type into correct context _before_ normalizing, -- otherwise rewrite rules in parametrized modules will not fire. vs <- getContextArgs t <- t `piApplyM` permute (takeP (size vs) $ mvPermutation mv) vs t <- normalForm norm t let x = NamedMeta ms i reportSDoc "interactive.meta" 10 $ TP.vcat [ TP.text $ unwords ["permuting", show i, "with", show $ mvPermutation mv] , TP.nest 2 $ TP.vcat [ "len =" TP.<+> TP.text (show $ length vs) , "args =" TP.<+> prettyTCM vs , "t =" TP.<+> prettyTCM t , "x =" TP.<+> TP.pretty x ] ] reportSDoc "interactive.meta.scope" 20 $ TP.text $ show $ getMetaScope mv -- Andreas, 2016-01-19, issue #1783: need piApplyM instead of just piApply OfType x <$> reify t rewriteJudg mv (IsSort i t) = do ms <- getMetaNameSuggestion i return $ JustSort $ NamedMeta ms i typeOfMeta :: Rewrite -> InteractionId -> TCM (OutputConstraint Expr InteractionId) typeOfMeta norm ii = typeOfMeta' norm . (ii,) =<< lookupInteractionId ii typeOfMeta' :: Rewrite -> (InteractionId, MetaId) -> TCM (OutputConstraint Expr InteractionId) typeOfMeta' norm (ii, mi) = fmap (\_ -> ii) <$> typeOfMetaMI norm mi typesOfVisibleMetas :: Rewrite -> TCM [OutputConstraint Expr InteractionId] typesOfVisibleMetas norm = liftTCM $ mapM (typeOfMeta' norm) =<< getInteractionIdsAndMetas typesOfHiddenMetas :: Rewrite -> TCM [OutputConstraint Expr NamedMeta] typesOfHiddenMetas norm = liftTCM $ do is <- getInteractionMetas store <- IntMap.filterWithKey (openAndImplicit is . MetaId) <$> getMetaStore mapM (typeOfMetaMI norm . MetaId) $ IntMap.keys store where openAndImplicit is x m = case mvInstantiation m of M.InstV{} -> False M.Open -> x `notElem` is M.OpenInstance -> x `notElem` is -- OR: True !? M.BlockedConst{} -> True M.PostponedTypeCheckingProblem{} -> False metaHelperType :: Rewrite -> InteractionId -> Range -> String -> TCM (OutputConstraint' Expr Expr) metaHelperType norm ii rng s = case words s of [] -> failure f : _ -> do ensureName f A.Application h args <- A.appView . getBody . deepUnscope <$> parseExprIn ii rng ("let " ++ f ++ " = _ in " ++ s) withInteractionId ii $ do cxtArgs <- getContextArgs -- cleanupType relies on with arguments being named 'w', -- so we'd better rename any actual 'w's to avoid confusion. tel <- runIdentity . onNamesTel unW <$> getContextTelescope a <- runIdentity . onNames unW . (`piApply` cxtArgs) <$> (getMetaType =<< lookupInteractionId ii) (vs, as) <- unzip <$> mapM (inferExpr . namedThing . unArg) args -- Remember the arity of a TelV atel _ <- telView a let arity = size atel (delta1, delta2, _, a', as', vs') = splitTelForWith tel a (map OtherType as) vs a <- localTC (\e -> e { envPrintDomainFreePi = True }) $ do reify =<< cleanupType arity args =<< normalForm norm =<< fst <$> withFunctionType delta1 vs' as' delta2 a' reportSDoc "interaction.helper" 10 $ TP.vcat [ "generating helper function" , TP.nest 2 $ "tel = " TP.<+> inTopContext (prettyTCM tel) , TP.nest 2 $ "a = " TP.<+> prettyTCM a , TP.nest 2 $ "vs = " TP.<+> prettyTCM vs , TP.nest 2 $ "as = " TP.<+> prettyTCM as , TP.nest 2 $ "delta1 = " TP.<+> inTopContext (prettyTCM delta1) , TP.nest 2 $ "delta2 = " TP.<+> inTopContext (addContext delta1 $ prettyTCM delta2) , TP.nest 2 $ "a' = " TP.<+> inTopContext (addContext delta1 $ addContext delta2 $ prettyTCM a') , TP.nest 2 $ "as' = " TP.<+> inTopContext (addContext delta1 $ prettyTCM as') , TP.nest 2 $ "vs' = " TP.<+> inTopContext (addContext delta1 $ prettyTCM vs') ] return (OfType' h a) where failure = typeError $ GenericError $ "Expected an argument of the form f e1 e2 .. en" ensureName f = do ce <- parseExpr rng f case ce of C.Ident{} -> return () C.RawApp _ [C.Ident{}] -> return () _ -> do reportSLn "interaction.helper" 10 $ "ce = " ++ show ce failure cleanupType arity args t = do -- Get the arity of t TelV ttel _ <- telView t -- Compute the number or pi-types subject to stripping. let n = size ttel - arity -- It cannot be negative, otherwise we would have performed a -- negative number of with-abstractions. unless (n >= 0) __IMPOSSIBLE__ return $ evalState (renameVars $ hiding args $ stripUnused n t) args getBody (A.Let _ _ e) = e getBody _ = __IMPOSSIBLE__ -- Strip the non-dependent abstractions from the first n abstractions. stripUnused n (El s v) = El s $ strip n v strip 0 v = v strip n v = case v of I.Pi a b -> case stripUnused (n-1) <$> b of b | absName b == "w" -> I.Pi a b NoAbs _ b -> unEl b Abs s b | 0 `freeIn` b -> I.Pi (hide a) (Abs s b) | otherwise -> strengthen __IMPOSSIBLE__ (unEl b) _ -> v -- todo: handle if goal type is a Pi -- renameVars = onNames (stringToArgName <.> renameVar . argNameToString) renameVars = onNames renameVar hiding args (El s v) = El s $ hidingTm args v hidingTm (arg:args) (I.Pi a b) | absName b == "w" = I.Pi (setHiding (getHiding arg) a) (hiding args <$> b) hidingTm args (I.Pi a b) = I.Pi a (hiding args <$> b) hidingTm _ a = a -- onNames :: Applicative m => (ArgName -> m ArgName) -> Type -> m Type onNames :: Applicative m => (String -> m String) -> Type -> m Type onNames f (El s v) = El s <$> onNamesTm f v -- onNamesTel :: Applicative f => (ArgName -> f ArgName) -> I.Telescope -> f I.Telescope onNamesTel :: Applicative f => (String -> f String) -> I.Telescope -> f I.Telescope onNamesTel f I.EmptyTel = pure I.EmptyTel onNamesTel f (I.ExtendTel a b) = I.ExtendTel <$> traverse (onNames f) a <*> onNamesAbs f onNamesTel b onNamesTm f v = case v of I.Var x es -> I.Var x <$> onNamesElims f es I.Def q es -> I.Def q <$> onNamesElims f es I.Con c ci args -> I.Con c ci <$> onNamesArgs f args I.Lam i b -> I.Lam i <$> onNamesAbs f onNamesTm b I.Pi a b -> I.Pi <$> traverse (onNames f) a <*> onNamesAbs f onNames b I.DontCare v -> I.DontCare <$> onNamesTm f v I.Lit{} -> pure v I.Sort{} -> pure v I.Level{} -> pure v I.MetaV{} -> pure v I.Dummy{} -> pure v onNamesElims f = traverse $ traverse $ onNamesTm f onNamesArgs f = traverse $ traverse $ onNamesTm f onNamesAbs f = onNamesAbs' f (stringToArgName <.> f . argNameToString) onNamesAbs' f f' nd (Abs s x) = Abs <$> f' s <*> nd f x onNamesAbs' f f' nd (NoAbs s x) = NoAbs <$> f' s <*> nd f x unW "w" = return ".w" unW s = return s renameVar "w" = betterName renameVar s = pure s betterName = do arg : args <- get put args return $ case arg of Arg _ (Named _ (A.Var x)) -> show $ A.nameConcrete x Arg _ (Named (Just x) _) -> argNameToString $ rangedThing x _ -> "w" -- Gives a list of names and corresponding types. contextOfMeta :: InteractionId -> Rewrite -> TCM [OutputConstraint' Expr Name] contextOfMeta ii norm = do info <- getMetaInfo <$> (lookupMeta =<< lookupInteractionId ii) withMetaInfo info $ do cxt <- getContext let n = length cxt localVars = zipWith raise [1..] cxt mkLet (x, lb) = do (tm, !dom) <- getOpen lb return $ (,) x <$> dom letVars <- mapM mkLet . Map.toDescList =<< asksTC envLetBindings mapMaybe visible . reverse <$> mapM out (letVars ++ localVars) where visible (OfType x y) | not (isNoName x) = Just (OfType' x y) | otherwise = Nothing visible _ = __IMPOSSIBLE__ out (Dom{unDom = (x, t)}) = do t' <- reify =<< normalForm norm t return $ OfType x t' -- | Returns the type of the expression in the current environment -- We wake up irrelevant variables just in case the user want to -- invoke that command in an irrelevant context. typeInCurrent :: Rewrite -> Expr -> TCM Expr typeInCurrent norm e = do (_,t) <- wakeIrrelevantVars $ inferExpr e v <- normalForm norm t reify v typeInMeta :: InteractionId -> Rewrite -> Expr -> TCM Expr typeInMeta ii norm e = do m <- lookupInteractionId ii mi <- getMetaInfo <$> lookupMeta m withMetaInfo mi $ typeInCurrent norm e withInteractionId :: InteractionId -> TCM a -> TCM a withInteractionId i ret = do m <- lookupInteractionId i withMetaId m ret withMetaId :: MetaId -> TCM a -> TCM a withMetaId m ret = do mv <- lookupMeta m withMetaInfo' mv ret -- | The intro tactic. -- -- Returns the terms (as strings) that can be -- used to refine the goal. Uses the coverage checker -- to find out which constructors are possible. -- introTactic :: Bool -> InteractionId -> TCM [String] introTactic pmLambda ii = do mi <- lookupInteractionId ii mv <- lookupMeta mi withMetaInfo (getMetaInfo mv) $ case mvJudgement mv of HasType _ t -> do t <- reduce =<< piApplyM t =<< getContextArgs -- Andreas, 2013-03-05 Issue 810: skip hidden domains in introduction -- of constructor. TelV tel' t <- telViewUpTo' (-1) notVisible t -- if we cannot introduce a constructor, we try a lambda let fallback = do cubical <- optCubical <$> pragmaOptions TelV tel _ <- (if cubical then telViewPath else telView) t reportSDoc "interaction.intro" 20 $ TP.sep [ "introTactic/fallback" , "tel' = " TP.<+> prettyTCM tel' , "tel = " TP.<+> prettyTCM tel ] case (tel', tel) of (EmptyTel, EmptyTel) -> return [] _ -> introFun (telToList tel' ++ telToList tel) case unEl t of I.Def d _ -> do def <- getConstInfo d case theDef def of Datatype{} -> addContext tel' $ introData t Record{ recNamedCon = name } | name -> addContext tel' $ introData t | otherwise -> addContext tel' $ introRec d _ -> fallback _ -> fallback `catchError` \_ -> return [] _ -> __IMPOSSIBLE__ where conName :: [NamedArg SplitPattern] -> [I.ConHead] conName [p] = [ c | I.ConP c _ _ <- [namedArg p] ] conName _ = __IMPOSSIBLE__ showTCM :: PrettyTCM a => a -> TCM String showTCM v = render <$> prettyTCM v introFun :: ListTel -> TCM [String] introFun tel = addContext tel' $ do reportSDoc "interaction.intro" 10 $ do "introFun" TP.<+> prettyTCM (telFromList tel) imp <- showImplicitArguments let okHiding0 h = imp || h == NotHidden -- if none of the vars were displayed, we would get a parse error -- thus, we switch to displaying all allHidden = null (filter okHiding0 hs) okHiding = if allHidden then const True else okHiding0 vars <- -- setShowImplicitArguments (imp || allHidden) $ (if allHidden then withShowAllArguments else id) $ mapM showTCM [ setHiding h $ defaultArg $ var i :: Arg Term | (h, i) <- zip hs $ downFrom n , okHiding h ] if pmLambda then return [ unwords $ ["λ", "{"] ++ vars ++ ["→", "?", "}"] ] else return [ unwords $ ["λ"] ++ vars ++ ["→", "?"] ] where n = size tel hs = map getHiding tel tel' = telFromList [ fmap makeName b | b <- tel ] makeName ("_", t) = ("x", t) makeName (x, t) = (x, t) introData :: I.Type -> TCM [String] introData t = do let tel = telFromList [defaultDom ("_", t)] pat = [defaultArg $ unnamed $ debruijnNamedVar "c" 0] r <- splitLast CoInductive tel pat case r of Left err -> return [] Right cov -> mapM showTCM $ concatMap (conName . scPats) $ splitClauses cov introRec :: QName -> TCM [String] introRec d = do hfs <- getRecordFieldNames d fs <- ifM showImplicitArguments (return $ map unArg hfs) (return [ unArg a | a <- hfs, visible a ]) let e = C.Rec noRange $ for fs $ \ f -> Left $ C.FieldAssignment f $ C.QuestionMark noRange Nothing return [ prettyShow e ] -- Andreas, 2019-02-25, remark: -- prettyShow is ok here since we are just printing something like -- record { f1 = ? ; ... ; fn = ?} -- which does not involve any qualified names, and the fi are C.Name. -- | Runs the given computation as if in an anonymous goal at the end -- of the top-level module. -- -- Sets up current module, scope, and context. atTopLevel :: TCM a -> TCM a atTopLevel m = inConcreteMode $ do let err = typeError $ GenericError "The file has not been loaded yet." caseMaybeM (useTC stCurrentModule) err $ \ current -> do caseMaybeM (getVisitedModule $ toTopLevelModuleName current) __IMPOSSIBLE__ $ \ mi -> do let scope = iInsideScope $ miInterface mi tel <- lookupSection current -- Get the names of the local variables from @scope@ -- and put them into the context. -- -- Andreas, 2017-04-24, issue #2552: -- -- Delete the let-bound ones, since they are not represented -- in the module telescope. -- -- This is a temporary fix until a better solution is available, -- e.g., when the module telescope represents let-bound variables. -- -- Unfortunately, referring to let-bound variables -- from the top level module telescope will for now result in a not-in-scope error. let names :: [A.Name] names = map localVar $ filter ((LetBound /=) . localBinder) $ map snd $ reverse $ scopeLocals scope -- Andreas, 2016-12-31, issue #2371 -- The following is an unnecessary complication, as shadowed locals -- are not in scope anyway (they are ambiguous). -- -- Replace the shadowed names by fresh names (such that they do not shadow imports) -- let mnames :: [Maybe A.Name] -- mnames = map (notShadowedLocal . snd) $ reverse $ scopeLocals scope -- names <- mapM (maybe freshNoName_ return) mnames let types :: [Dom I.Type] types = map (snd <$>) $ telToList tel gamma :: ListTel' A.Name gamma = fromMaybe __IMPOSSIBLE__ $ zipWith' (\ x dom -> (x,) <$> dom) names types reportSDoc "interaction.top" 20 $ TP.vcat [ "BasicOps.atTopLevel" , " names = " TP.<+> TP.sep (map prettyA names) , " types = " TP.<+> TP.sep (map prettyTCM types) ] M.withCurrentModule current $ withScope_ scope $ addContext gamma $ do -- We're going inside the top-level module, so we have to set the -- checkpoint for it and all its submodules to the new checkpoint. cp <- viewTC eCurrentCheckpoint stModuleCheckpoints `modifyTCLens` fmap (const cp) m -- | Parse a name. parseName :: Range -> String -> TCM C.QName parseName r s = do m <- parseExpr r s case m of C.Ident m -> return m C.RawApp _ [C.Ident m] -> return m _ -> typeError $ GenericError $ "Not an identifier: " ++ show m ++ "." -- | Check whether an expression is a (qualified) identifier. isQName :: C.Expr -> Maybe C.QName isQName m = do case m of C.Ident m -> return m C.RawApp _ [C.Ident m] -> return m _ -> Nothing -- | Returns the contents of the given module or record. moduleContents :: Rewrite -- ^ How should the types be presented? -> Range -- ^ The range of the next argument. -> String -- ^ The module name. -> TCM ([C.Name], I.Telescope, [(C.Name, Type)]) -- ^ Module names, -- context extension needed to print types, -- names paired up with corresponding types. moduleContents norm rng s = traceCall ModuleContents $ do e <- parseExpr rng s case isQName e of -- If the expression is not a single identifier, it is not a module name -- and treated as a record expression. Nothing -> getRecordContents norm e -- Otherwise, if it is not in scope as a module name, it is treated -- as a record name. Just x -> do ms :: [AbstractModule] <- scopeLookup x <$> getScope if null ms then getRecordContents norm e else getModuleContents norm x -- | Returns the contents of the given record identifier. getRecordContents :: Rewrite -- ^ Amount of normalization in types. -> C.Expr -- ^ Expression presumably of record type. -> TCM ([C.Name], I.Telescope, [(C.Name, Type)]) -- ^ Module names, -- context extension, -- names paired up with corresponding types. getRecordContents norm ce = do e <- toAbstract ce (_, t) <- inferExpr e let notRecordType = typeError $ ShouldBeRecordType t (q, vs, defn) <- fromMaybeM notRecordType $ isRecordType t case defn of Record{ recFields = fs, recTel = rtel } -> do let xs = map (nameConcrete . qnameName . unArg) fs tel = apply rtel vs doms = flattenTel tel -- Andreas, 2019-04-10, issue #3687: use flattenTel -- to bring types into correct scope. reportSDoc "interaction.contents.record" 20 $ TP.vcat [ "getRecordContents" , " cxt = " TP.<+> (prettyTCM =<< getContextTelescope) , " tel = " TP.<+> prettyTCM tel , " doms = " TP.<+> prettyTCM doms , " doms'= " TP.<+> (addContext tel $ prettyTCM doms) ] ts <- mapM (normalForm norm . unDom) doms return ([], tel, zip xs ts) _ -> __IMPOSSIBLE__ -- | Returns the contents of the given module. getModuleContents :: Rewrite -- ^ Amount of normalization in types. -> C.QName -- ^ Module name. -> TCM ([C.Name], I.Telescope, [(C.Name, Type)]) -- ^ Module names, -- context extension, -- names paired up with corresponding types. getModuleContents norm m = do modScope <- getNamedScope . amodName =<< resolveModule m let modules :: ThingsInScope AbstractModule modules = exportedNamesInScope modScope names :: ThingsInScope AbstractName names = exportedNamesInScope modScope xns = [ (x,n) | (x, ns) <- Map.toList names, n <- ns ] types <- forM xns $ \(x, n) -> do d <- getConstInfo $ anameName n t <- normalForm norm =<< (defType <$> instantiateDef d) return (x, t) return (Map.keys modules, EmptyTel, types) whyInScope :: String -> TCM (Maybe LocalVar, [AbstractName], [AbstractModule]) whyInScope s = do x <- parseName noRange s scope <- getScope return ( lookup x $ map (first C.QName) $ scopeLocals scope , scopeLookup x scope , scopeLookup x scope ) Agda-2.6.0.1/src/full/Agda/Interaction/EmacsCommand.hs0000644000000000000000000000611313466402171020434 0ustar0000000000000000{-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- | Code for instructing Emacs to do things ------------------------------------------------------------------------ module Agda.Interaction.EmacsCommand ( Lisp(..) , response , putResponse , display_info' , clearRunningInfo , clearWarning , displayRunningInfo ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import qualified Data.List as List import Agda.Utils.Pretty import Agda.Utils.String -- | Simple Emacs Lisp expressions. data Lisp a = A a -- ^ Atom. | Cons (Lisp a) (Lisp a) -- Cons cell. | L [Lisp a] -- ^ List. | Q (Lisp a) -- Quoted expression. deriving Eq instance Pretty a => Pretty (Lisp a) where pretty (A a ) = pretty a pretty (Cons a b) = parens (pretty a <+> "." <+> pretty b) pretty (L xs) = parens (hsep (map pretty xs)) pretty (Q x) = "'" <> pretty x instance Show (Lisp String) where showsPrec _ (A a) = showString a showsPrec p (Cons a b) = showString "(" . showsPrec p a . showString " . " . showsPrec p b . showString ")" showsPrec p (L xs) = showString "(" . foldr (.) (showString ")") (List.intersperse (showString " ") (map (showsPrec p) xs)) showsPrec p (Q x) = showString "'" . showsPrec p x -- | Formats a response command. -- -- Replaces @'\n'@ with spaces to ensure that each command is a -- single line. response :: Lisp String -> String response = (++ "\n") . map replaceNewLines . show . pretty where replaceNewLines '\n' = ' ' replaceNewLines c = c -- | Writes a response command to standard output. putResponse :: Lisp String -> IO () putResponse = putStr . response -- | @displayInBuffer buffername append header content@ displays @content@ -- (with header @header@) in some suitable way in the buffer @buffername@. -- If @append@ is @True@, then the content is appended to previous content -- (if any), otherwise any previous content is deleted. displayInBuffer :: String -> Bool -> String -> String -> Lisp String displayInBuffer buffername append header content = L [ A buffername , A (quote header) , A (quote content) , A (if append then "t" else "nil") ] display_info' :: Bool -> String -> String -> Lisp String display_info' = displayInBuffer "agda2-info-action" ------------------------------------------------------------------------ -- Running info -- | The name of the running info buffer. runningInfoBufferName :: String runningInfoBufferName = "*Type-checking*" -- | Clear the running info buffer. clearRunningInfo :: Lisp String clearRunningInfo = display_info' False runningInfoBufferName "" -- | Clear the warning buffer clearWarning :: Lisp String clearWarning = L [ A "agda2-close-warning" ] -- | Display running information about what the type-checker is up to. displayRunningInfo :: String -> Lisp String displayRunningInfo s = display_info' True runningInfoBufferName s Agda-2.6.0.1/src/full/Agda/Interaction/SearchAbout.hs0000644000000000000000000000551613466402171020313 0ustar0000000000000000module Agda.Interaction.SearchAbout (findMentions) where import Control.Monad import qualified Data.Map as Map import qualified Data.Set as Set import Data.List (isInfixOf) import Data.Either (partitionEithers) import Data.Foldable (toList) import Agda.Syntax.Position (Range) import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.TypeChecking.Monad.Signature import Agda.TypeChecking.Monad.Env import Agda.Syntax.Internal.Names (namesIn) import Agda.Interaction.BasicOps (normalForm, Rewrite, parseName) import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Internal as I import Agda.Utils.Pretty ( prettyShow ) findMentions :: Rewrite -> Range -> String -> ScopeM [(C.Name, I.Type)] findMentions norm rg nm = do -- We start by dealing with the user's input -- The users passes in `nm`, a list of identifiers and strings -- to match against definitions in scope. `findMentions` will -- select all of the definitions such that: -- - all of the specified identifiers appear in their type -- (which has been normalised according to `norm`) -- - all of the specified strings are substrings of their name -- We separate the strings from the names by a rough analysis -- and then parse and resolve the names in the current scope let (userSubStrings, nms) = partitionEithers $ isString <$> words nm rnms <- mapM (parseName rg >=> resolveName) nms let userIdentifiers = fmap (fmap anameName . anames) rnms -- We then collect all the things in scope, by name. -- Issue #2381: We explicitly filter out pattern synonyms because they -- don't have a type. Looking it up makes Agda panic! snms <- fmap (nsNames . allThingsInScope) $ currentModule >>= getNamedScope let namesInScope = filter ((PatternSynName /=) . anameKind . snd) $ concatMap (uncurry $ map . (,)) $ Map.toList snms -- Once we have the user-provided names and the names of all the -- thing in scope we can start the search: for each name in scope, -- we grab its type, normalise it according to `norm` and collect -- the identifiers in it. We then check whether it meets the user's -- criteria. ress <- forM namesInScope $ \ (x, n) -> do t <- normalForm norm =<< typeOfConst (anameName n) let namesInT = Set.toList $ namesIn t let defName = prettyShow x return $ do guard $ all (`isInfixOf` defName) userSubStrings guard $ all (any (`elem` namesInT)) userIdentifiers return (x, t) return $ concat ress where isString str | not (null str) && head str == '"' && last str == '"' = Left $ filter (/= '"') str | otherwise = Right str anames (DefinedName _ an) = [an] anames (FieldName ans) = toList ans anames (ConstructorName ans) = toList ans anames _ = [] Agda-2.6.0.1/src/full/Agda/Interaction/FindFile.hs-boot0000644000000000000000000000056313466402171020531 0ustar0000000000000000module Agda.Interaction.FindFile where import Agda.Syntax.Concrete (Module) import Agda.Syntax.Concrete.Name (TopLevelModuleName) import Agda.TypeChecking.Monad.Base (TCM) import Agda.Utils.FileName (AbsolutePath) moduleName :: AbsolutePath -> Module -> TCM TopLevelModuleName checkModuleName :: TopLevelModuleName -> AbsolutePath -> Maybe TopLevelModuleName -> TCM () Agda-2.6.0.1/src/full/Agda/Interaction/FindFile.hs0000644000000000000000000001653213466402171017573 0ustar0000000000000000{-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- | Functions which map between module names and file names. -- -- Note that file name lookups are cached in the 'TCState'. The code -- assumes that no Agda source files are added or removed from the -- include directories while the code is being type checked. ------------------------------------------------------------------------ module Agda.Interaction.FindFile ( toIFile , FindError(..), findErrorToTypeError , findFile, findFile', findFile'' , findInterfaceFile , checkModuleName , moduleName , rootNameModule , replaceModuleExtension ) where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.Trans import qualified Data.List as List import Data.Maybe (catMaybes) import qualified Data.Map as Map import System.FilePath import Agda.Syntax.Common import Agda.Syntax.Concrete import Agda.Syntax.Parser import Agda.Syntax.Parser.Literate (literateExtsShortList) import Agda.Syntax.Position import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Trace import Agda.TypeChecking.Monad.Benchmark (billTo) import qualified Agda.TypeChecking.Monad.Benchmark as Bench import {-# SOURCE #-} Agda.TypeChecking.Monad.Options (getIncludeDirs) import Agda.TypeChecking.Warnings (runPM) import Agda.Utils.Except import Agda.Utils.FileName import Agda.Utils.Lens import Agda.Utils.List ( stripSuffix ) import Agda.Utils.Null #include "undefined.h" import Agda.Utils.Impossible -- | Converts an Agda file name to the corresponding interface file -- name. toIFile :: AbsolutePath -> AbsolutePath toIFile = replaceModuleExtension ".agdai" replaceModuleExtension :: String -> AbsolutePath -> AbsolutePath replaceModuleExtension ext@('.':_) = mkAbsolute . (++ ext) . dropAgdaExtension . filePath replaceModuleExtension ext = replaceModuleExtension ('.':ext) -- | Errors which can arise when trying to find a source file. -- -- Invariant: All paths are absolute. data FindError = NotFound [AbsolutePath] -- ^ The file was not found. It should have had one of the given -- file names. | Ambiguous [AbsolutePath] -- ^ Several matching files were found. -- -- Invariant: The list of matching files has at least two -- elements. -- | Given the module name which the error applies to this function -- converts a 'FindError' to a 'TypeError'. findErrorToTypeError :: TopLevelModuleName -> FindError -> TypeError findErrorToTypeError m (NotFound files) = FileNotFound m files findErrorToTypeError m (Ambiguous files) = AmbiguousTopLevelModuleName m files -- | Finds the source file corresponding to a given top-level module -- name. The returned paths are absolute. -- -- Raises an error if the file cannot be found. findFile :: TopLevelModuleName -> TCM AbsolutePath findFile m = do mf <- findFile' m case mf of Left err -> typeError $ findErrorToTypeError m err Right f -> return f -- | Tries to find the source file corresponding to a given top-level -- module name. The returned paths are absolute. -- -- SIDE EFFECT: Updates 'stModuleToSource'. findFile' :: TopLevelModuleName -> TCM (Either FindError AbsolutePath) findFile' m = do dirs <- getIncludeDirs modFile <- useTC stModuleToSource (r, modFile) <- liftIO $ findFile'' dirs m modFile stModuleToSource `setTCLens` modFile return r -- | A variant of 'findFile'' which does not require 'TCM'. findFile'' :: [AbsolutePath] -- ^ Include paths. -> TopLevelModuleName -> ModuleToSource -- ^ Cached invocations of 'findFile'''. An updated copy is returned. -> IO (Either FindError AbsolutePath, ModuleToSource) findFile'' dirs m modFile = case Map.lookup m modFile of Just f -> return (Right f, modFile) Nothing -> do files <- fileList acceptableFileExts filesShortList <- fileList parseFileExtsShortList existingFiles <- liftIO $ filterM (doesFileExistCaseSensitive . filePath) files return $ case List.nub existingFiles of [] -> (Left (NotFound filesShortList), modFile) [file] -> (Right file, Map.insert m file modFile) files -> (Left (Ambiguous existingFiles), modFile) where fileList exts = mapM absolute [ filePath dir file | dir <- dirs , file <- map (moduleNameToFileName m) exts ] -- | Finds the interface file corresponding to a given top-level -- module name. The returned paths are absolute. -- -- Raises an error if the source file cannot be found, and returns -- 'Nothing' if the source file can be found but not the interface -- file. findInterfaceFile :: TopLevelModuleName -> TCM (Maybe AbsolutePath) findInterfaceFile m = do f <- toIFile <$> findFile m ex <- liftIO $ doesFileExistCaseSensitive $ filePath f return $ if ex then Just f else Nothing -- | Ensures that the module name matches the file name. The file -- corresponding to the module name (according to the include path) -- has to be the same as the given file name. checkModuleName :: TopLevelModuleName -- ^ The name of the module. -> AbsolutePath -- ^ The file from which it was loaded. -> Maybe TopLevelModuleName -- ^ The expected name, coming from an import statement. -> TCM () checkModuleName name file mexpected = findFile' name >>= \case Left (NotFound files) -> typeError $ case mexpected of Nothing -> ModuleNameDoesntMatchFileName name files Just expected -> ModuleNameUnexpected name expected Left (Ambiguous files) -> typeError $ AmbiguousTopLevelModuleName name files Right file' -> do file <- liftIO $ absolute (filePath file) if file === file' then return () else typeError $ ModuleDefinedInOtherFile name file file' -- | Computes the module name of the top-level module in the given -- file. -- -- If no top-level module name is given, then an attempt is made to -- use the file name as a module name. -- TODO: Perhaps it makes sense to move this procedure to some other -- module. moduleName :: AbsolutePath -- ^ The path to the file. -> Module -- ^ The parsed module. -> TCM TopLevelModuleName moduleName file parsedModule = billTo [Bench.ModuleName] $ case moduleNameParts name of ["_"] -> do m <- runPM (parse moduleNameParser defaultName) `catchError` \_ -> typeError $ GenericError $ "The file name " ++ show file ++ " is invalid because it does not correspond to a valid module name." case m of Qual {} -> typeError $ GenericError $ "The file name " ++ show file ++ " is invalid because " ++ defaultName ++ " is not an unqualified module name." QName {} -> return $ TopLevelModuleName (getRange m) [defaultName] _ -> return name where name = topLevelModuleName parsedModule defaultName = rootNameModule file parseFileExtsShortList :: [String] parseFileExtsShortList = [".agda"] ++ literateExtsShortList dropAgdaExtension :: String -> String dropAgdaExtension s = case catMaybes [ stripSuffix ext s | ext <- acceptableFileExts ] of [name] -> name _ -> __IMPOSSIBLE__ rootNameModule :: AbsolutePath -> String rootNameModule = dropAgdaExtension . snd . splitFileName . filePath Agda-2.6.0.1/src/full/Agda/Interaction/Response.hs0000644000000000000000000001241313466402171017703 0ustar0000000000000000{-# LANGUAGE CPP #-} ------------------------------------------------------------------------ -- | Data type for all interactive responses ------------------------------------------------------------------------ module Agda.Interaction.Response ( Response (..) , RemoveTokenBasedHighlighting (..) , MakeCaseVariant (..) , DisplayInfo (..) , Status (..) , GiveResult (..) , InteractionOutputCallback , defaultInteractionOutputCallback ) where import Agda.Interaction.Highlighting.Precise import {-# SOURCE #-} Agda.TypeChecking.Monad.Base import Agda.Syntax.Common (InteractionId(..)) import Agda.Syntax.Concrete (Expr) import Agda.Utils.Pretty import Control.Monad.Trans import Data.Int import System.IO #include "undefined.h" import Agda.Utils.Impossible -- | Responses for any interactive interface -- -- Note that the response is given in pieces and incrementally, -- so the user can have timely response even during long computations. data Response = Resp_HighlightingInfo HighlightingInfo RemoveTokenBasedHighlighting HighlightingMethod ModuleToSource | Resp_Status Status | Resp_JumpToError FilePath Int32 | Resp_InteractionPoints [InteractionId] | Resp_GiveAction InteractionId GiveResult | Resp_MakeCase MakeCaseVariant [String] | Resp_SolveAll [(InteractionId, Expr)] -- ^ Solution for one or more meta-variables. | Resp_DisplayInfo DisplayInfo | Resp_RunningInfo Int String -- ^ The integer is the message's debug level. | Resp_ClearRunningInfo | Resp_ClearHighlighting TokenBased -- ^ Clear highlighting of the given kind. | Resp_DoneAborting -- ^ A command sent when an abort command has completed -- successfully. -- | Should token-based highlighting be removed in conjunction with -- the application of new highlighting (in order to reduce the risk of -- flicker)? data RemoveTokenBasedHighlighting = RemoveHighlighting -- ^ Yes, remove all token-based highlighting from the file. | KeepHighlighting -- ^ No. -- | There are two kinds of \"make case\" commands. data MakeCaseVariant = Function | ExtendedLambda -- | Info to display at the end of an interactive command data DisplayInfo = Info_CompilationOk String String -- ^ Strings are the warnings and the (non-fatal) errors | Info_Constraints String | Info_AllGoalsWarnings String String String -- ^ Strings are the goals, the warnings and the (non-fatal) errors | Info_Time Doc | Info_Error String -- ^ When an error message is displayed this constructor should be -- used, if appropriate. | Info_Intro Doc -- ^ 'Info_Intro' denotes two different types of errors -- TODO: split these into separate constructors | Info_Auto String -- ^ 'Info_Auto' denotes either an error or a success (when 'Resp_GiveAction' is present) -- TODO: split these into separate constructors | Info_ModuleContents Doc | Info_SearchAbout Doc | Info_WhyInScope Doc | Info_NormalForm Doc | Info_GoalType Doc | Info_CurrentGoal Doc | Info_InferredType Doc | Info_Context Doc | Info_HelperFunction Doc | Info_Version deriving Show -- | Status information. data Status = Status { sShowImplicitArguments :: Bool -- ^ Are implicit arguments displayed? , sChecked :: Bool -- ^ Has the module been successfully type checked? } -- | Give action result -- -- Comment derived from agda2-mode.el -- -- If 'GiveResult' is 'Give_String s', then the goal is replaced by 's', -- and otherwise the text inside the goal is retained (parenthesised -- if 'GiveResult' is 'Give_Paren'). data GiveResult = Give_String String | Give_Paren | Give_NoParen -- | Callback fuction to call when there is a response -- to give to the interactive frontend. -- -- Note that the response is given in pieces and incrementally, -- so the user can have timely response even during long computations. -- -- Typical 'InteractionOutputCallback' functions: -- -- * Convert the response into a 'String' representation and -- print it on standard output -- (suitable for inter-process communication). -- -- * Put the response into a mutable variable stored in the -- closure of the 'InteractionOutputCallback' function. -- (suitable for intra-process communication). type InteractionOutputCallback = Response -> TCM () -- | The default 'InteractionOutputCallback' function prints certain -- things to stdout (other things generate internal errors). defaultInteractionOutputCallback :: InteractionOutputCallback defaultInteractionOutputCallback r = case r of Resp_HighlightingInfo {} -> __IMPOSSIBLE__ Resp_Status {} -> __IMPOSSIBLE__ Resp_JumpToError {} -> __IMPOSSIBLE__ Resp_InteractionPoints {} -> __IMPOSSIBLE__ Resp_GiveAction {} -> __IMPOSSIBLE__ Resp_MakeCase {} -> __IMPOSSIBLE__ Resp_SolveAll {} -> __IMPOSSIBLE__ Resp_DisplayInfo {} -> __IMPOSSIBLE__ Resp_RunningInfo _ s -> liftIO $ do putStr s hFlush stdout Resp_ClearRunningInfo {} -> __IMPOSSIBLE__ Resp_ClearHighlighting {} -> __IMPOSSIBLE__ Resp_DoneAborting {} -> __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/Interaction/Monad.hs0000644000000000000000000000046013466402171017142 0ustar0000000000000000module Agda.Interaction.Monad (IM, runIM, readline) where import Control.Monad.Trans import System.Console.Haskeline import Agda.TypeChecking.Monad -- | Line reader. The line reader history is not stored between -- sessions. readline :: String -> IM (Maybe String) readline s = lift (getInputLine s) Agda-2.6.0.1/src/full/Agda/Interaction/Library.hs0000644000000000000000000004173713466402171017524 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} -- | Library management. -- -- Sample use: -- -- @ -- -- Get libraries as listed in @.agda/libraries@ file. -- libs <- getInstalledLibraries Nothing -- -- -- Get the libraries (and immediate paths) relevant for @projectRoot@. -- -- This involves locating and processing the @.agda-lib@ file for the project. -- (libNames, includePaths) <- getDefaultLibraries projectRoot True -- -- -- Get include paths of depended-on libraries. -- resolvedPaths <- libraryIncludePaths Nothing libs libNames -- -- let allPaths = includePaths ++ resolvedPaths -- @ -- module Agda.Interaction.Library ( getDefaultLibraries , getInstalledLibraries , libraryIncludePaths , LibName , LibM , LibWarning(..) , LibPositionInfo(..) , libraryWarningName -- * Exported for testing , VersionView(..), versionView, unVersionView , findLib' ) where import Control.Arrow ( (***) ) import Control.Exception import Control.Monad.Writer import Data.Char import Data.Data ( Data ) import Data.Either import Data.Bifunctor ( first ) import Data.Function import qualified Data.List as List import Data.Maybe import System.Directory ( getAppUserDataDirectory ) import System.Directory import System.FilePath import System.Environment import Agda.Interaction.Library.Base import Agda.Interaction.Library.Parse import Agda.Interaction.Options.Warnings import Agda.Utils.Environment import Agda.Utils.Except ( ExceptT, runExceptT, MonadError(throwError) ) import Agda.Utils.IO ( catchIO ) import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Utils.String ( trim, ltrim ) import Agda.Version ------------------------------------------------------------------------ -- * Types and Monads ------------------------------------------------------------------------ data LibrariesFile = LibrariesFile { lfPath :: FilePath -- ^ E.g. @~/.agda/libraries@. , lfExists :: Bool -- ^ The libraries file might not exist, -- but we may print its assumed location in error messages. } deriving (Show) -- | Library names are structured into the base name and a suffix of version -- numbers, e.g. @mylib-1.2.3@. The version suffix is optional. data VersionView = VersionView { vvBase :: LibName -- ^ Actual library name. , vvNumbers :: [Integer] -- ^ Major version, minor version, subminor version, etc., all non-negative. -- Note: a priori, there is no reason why the version numbers should be @Int@s. } deriving (Eq, Show) -- | Raise collected 'LibErrors' as exception. -- mkLibM :: [AgdaLibFile] -> LibErrorIO a -> LibM a mkLibM libs m = do (x, ews) <- liftIO $ runWriterT m let (errs, warns) = partitionEithers ews tell warns unless (null errs) $ do let doc = vcat $ map (formatLibError libs) errs throwError doc return x ------------------------------------------------------------------------ -- * Library warnings and errors ------------------------------------------------------------------------ data LibPositionInfo = LibPositionInfo { libFilePos :: Maybe FilePath -- ^ Name of @libraries@ file , lineNumPos :: LineNumber -- ^ Line number in @libraries@ file. , filePos :: FilePath -- ^ Library file } deriving (Show, Data) data LibWarning = LibWarning LibPositionInfo LibWarning' deriving (Show, Data) data LibError = LibError (Maybe LibPositionInfo) LibError' libraryWarningName :: LibWarning -> WarningName libraryWarningName (LibWarning c (UnknownField{})) = LibUnknownField_ -- | Collected errors while processing library files. -- data LibError' = LibNotFound LibrariesFile LibName -- ^ Raised when a library name could no successfully be resolved -- to an @.agda-lib@ file. -- | AmbiguousLib LibName [AgdaLibFile] -- ^ Raised when a library name is defined in several @.agda-lib files@. | OtherError String -- ^ Generic error. deriving (Show) -- | Collects 'LibError's and 'LibWarning's. -- type LibErrorIO = WriterT [Either LibError LibWarning] IO -- | Throws 'Doc' exceptions, still collects 'LibWarning's. type LibM = ExceptT Doc (WriterT [LibWarning] IO) warnings :: MonadWriter [Either LibError LibWarning] m => [LibWarning] -> m () warnings = tell . map Right warning :: MonadWriter [Either LibError LibWarning] m => LibWarning -> m () warning = warnings . pure raiseErrors' :: MonadWriter [Either LibError LibWarning] m => [LibError'] -> m () raiseErrors' = tell . map (Left . (LibError Nothing)) raiseErrors :: MonadWriter [Either LibError LibWarning] m => [LibError] -> m () raiseErrors = tell . map Left ------------------------------------------------------------------------ -- * Resources ------------------------------------------------------------------------ -- | Get the path to @~/.agda@ (system-specific). -- Can be overwritten by the @AGDA_DIR@ environment variable. -- -- (This is not to be confused with the directory for the data files -- that Agda needs (e.g. the primitive modules).) -- getAgdaAppDir :: IO FilePath getAgdaAppDir = do -- System-specific command to build the path to ~/.agda (Unix) or %APPDATA%\agda (Win) let agdaDir = getAppUserDataDirectory "agda" -- The default can be overwritten by setting the AGDA_DIR environment variable caseMaybeM (lookupEnv "AGDA_DIR") agdaDir $ \ dir -> ifM (doesDirectoryExist dir) (canonicalizePath dir) $ do d <- agdaDir putStrLn $ "Warning: Environment variable AGDA_DIR points to non-existing directory " ++ show dir ++ ", using " ++ show d ++ " instead." return d -- | The @~/.agda/libraries@ file lists the libraries Agda should know about. -- The content of @libraries@ is is a list of pathes to @.agda-lib@ files. -- -- Agda honors also version specific @libraries@ files, e.g. @libraries-2.6.0@. -- -- @defaultLibraryFiles@ gives a list of all @libraries@ files Agda should process -- by default. -- defaultLibraryFiles :: [FilePath] defaultLibraryFiles = ["libraries-" ++ version, "libraries"] -- | The @defaultsFile@ contains a list of library names relevant for each Agda project. -- defaultsFile :: FilePath defaultsFile = "defaults" ------------------------------------------------------------------------ -- * Get the libraries for the current project ------------------------------------------------------------------------ -- | Get pathes of @.agda-lib@ files in given project root. -- -- If there are none, look in the parent directories until one is found. -- findAgdaLibFiles :: FilePath -- ^ Project root. -> IO [FilePath] -- ^ Pathes of @.agda-lib@ files for this project (if any). findAgdaLibFiles root = do libs <- map (root ) . filter ((== ".agda-lib") . takeExtension) <$> getDirectoryContents root case libs of [] -> do up <- canonicalizePath $ root ".." if up == root then return [] else findAgdaLibFiles up files -> return files -- | Get dependencies and include paths for given project root: -- -- Look for @.agda-lib@ files according to 'findAgdaLibFiles'. -- If none are found, use default dependencies (according to @defaults@ file) -- and current directory (project root). -- getDefaultLibraries :: FilePath -- ^ Project root. -> Bool -- ^ Use @defaults@ if no @.agda-lib@ file exists for this project? -> LibM ([LibName], [FilePath]) -- ^ The returned @LibName@s are all non-empty strings. getDefaultLibraries root optDefaultLibs = mkLibM [] $ do libs <- lift $ findAgdaLibFiles root if null libs then (,[]) <$> if optDefaultLibs then (libNameForCurrentDir :) <$> readDefaultsFile else return [] else libsAndPaths <$> parseLibFiles Nothing (map (0,) libs) where libsAndPaths ls = (concatMap libDepends ls, List.nub (concatMap libIncludes ls)) -- | Return list of libraries to be used by default. -- -- None if the @defaults@ file does not exist. -- readDefaultsFile :: LibErrorIO [LibName] readDefaultsFile = do agdaDir <- lift $ getAgdaAppDir let file = agdaDir defaultsFile ifNotM (lift $ doesFileExist file) (return []) $ {-else-} do ls <- lift $ map snd . stripCommentLines <$> readFile file return $ concatMap splitCommas ls `catchIO` \ e -> do raiseErrors' [ OtherError $ unlines ["Failed to read defaults file.", show e] ] return [] ------------------------------------------------------------------------ -- * Reading the installed libraries ------------------------------------------------------------------------ -- | Returns the path of the @libraries@ file which lists the libraries Agda knows about. -- -- Note: file may not exist. -- getLibrariesFile :: Maybe FilePath -- ^ Override the default @libraries@ file? -> IO LibrariesFile getLibrariesFile (Just overrideLibFile) = return $ LibrariesFile overrideLibFile True -- Existence checked in cmdline option parser. getLibrariesFile Nothing = do agdaDir <- getAgdaAppDir let defaults = map (agdaDir ) defaultLibraryFiles -- NB: non-empty list files <- filterM doesFileExist defaults case files of file : _ -> return $ LibrariesFile file True [] -> return $ LibrariesFile (last defaults) False -- doesn't exist, but that's ok -- | Parse the descriptions of the libraries Agda knows about. -- -- Returns none if there is no @libraries@ file. -- getInstalledLibraries :: Maybe FilePath -- ^ Override the default @libraries@ file? -> LibM [AgdaLibFile] -- ^ Content of library files. (Might have empty @LibName@s.) getInstalledLibraries overrideLibFile = mkLibM [] $ do file <- lift $ getLibrariesFile overrideLibFile if not (lfExists file) then return [] else do ls <- lift $ stripCommentLines <$> readFile (lfPath file) files <- lift $ sequence [ (i, ) <$> expandEnvironmentVariables s | (i, s) <- ls ] parseLibFiles (Just file) $ List.nubBy ((==) `on` snd) files `catchIO` \ e -> do raiseErrors' [ OtherError $ unlines ["Failed to read installed libraries.", show e] ] return [] -- | Parse the given library files. -- parseLibFiles :: Maybe LibrariesFile -- ^ Name of @libraries@ file for error reporting. -> [(LineNumber, FilePath)] -- ^ Library files paired with their line number in @libraries@. -> LibErrorIO [AgdaLibFile] -- ^ Content of library files. (Might have empty @LibName@s.) parseLibFiles mlibFile files = do rs' <- lift $ mapM (parseLibFile . snd) files let ann (ln, fp) (e, ws) = (first (Just pos,) e, map (LibWarning pos) ws) where pos = LibPositionInfo (lfPath <$> mlibFile) ln fp let (xs, warns) = unzip $ zipWith ann files (map runP rs') (errs, als) = partitionEithers xs unless (null warns) $ warnings $ concat warns unless (null errs) $ raiseErrors $ map (\(mc,s) -> LibError mc $ OtherError s) errs return $ List.nubBy ((==) `on` libFile) $ als -- | Remove trailing white space and line comments. -- stripCommentLines :: String -> [(LineNumber, String)] stripCommentLines = concatMap strip . zip [1..] . lines where strip (i, s) = [ (i, s') | not $ null s' ] where s' = trimLineComment s ------------------------------------------------------------------------ -- * Resolving library names to include pathes ------------------------------------------------------------------------ -- | Get all include pathes for a list of libraries to use. libraryIncludePaths :: Maybe FilePath -- ^ @libraries@ file (error reporting only). -> [AgdaLibFile] -- ^ Libraries Agda knows about. -> [LibName] -- ^ (Non-empty) library names to be resolved to (lists of) pathes. -> LibM [FilePath] -- ^ Resolved pathes (no duplicates). Contains "." if @[LibName]@ does. libraryIncludePaths overrideLibFile libs xs0 = mkLibM libs $ WriterT $ do file <- getLibrariesFile overrideLibFile return $ runWriter $ (dot ++) . incs <$> find file [] xs where (dots, xs) = List.partition (== libNameForCurrentDir) $ map trim xs0 incs = List.nub . concatMap libIncludes dot = [ "." | not $ null dots ] -- | Due to library dependencies, the work list may grow temporarily. find :: LibrariesFile -- ^ Only for error reporting. -> [LibName] -- ^ Already resolved libraries. -> [LibName] -- ^ Work list: libraries left to be resolved. -> Writer [Either LibError LibWarning] [AgdaLibFile] find _ _ [] = pure [] find file visited (x : xs) | elem x visited = find file visited xs | otherwise = case findLib x libs of [l] -> (l :) <$> find file (x : visited) (libDepends l ++ xs) [] -> raiseErrors' [LibNotFound file x] >> find file (x : visited) xs ls -> raiseErrors' [AmbiguousLib x ls] >> find file (x : visited) xs -- | @findLib x libs@ retrieves the matches for @x@ from list @libs@. -- -- 1. Case @x@ is unversioned: -- If @x@ is contained in @libs@, then that match is returned. -- Otherwise, the matches with the highest version number are returned. -- -- 2. Case @x@ is versioned: the matches with the highest version number are returned. -- -- Examples, see 'findLib''. -- findLib :: LibName -> [AgdaLibFile] -> [AgdaLibFile] findLib = findLib' libName -- | Generalized version of 'findLib' for testing. -- -- > findLib' id "a" [ "a-1", "a-02", "a-2", "b" ] == [ "a-02", "a-2" ] -- -- > findLib' id "a" [ "a", "a-1", "a-01", "a-2", "b" ] == [ "a" ] -- > findLib' id "a-1" [ "a", "a-1", "a-01", "a-2", "b" ] == [ "a-1", "a-01" ] -- > findLib' id "a-2" [ "a", "a-1", "a-01", "a-2", "b" ] == [ "a-2" ] -- > findLib' id "c" [ "a", "a-1", "a-01", "a-2", "b" ] == [] -- findLib' :: (a -> LibName) -> LibName -> [a] -> [a] findLib' libName x libs = case ls of -- Take the first and all exact matches (modulo leading zeros in version numbers). l : ls' -> l : takeWhile (((==) `on` versionMeasure) l) ls' [] -> [] where -- @LibName@s that match @x@, sorted descendingly. -- The unversioned LibName, if any, will come first. ls = List.sortBy (flip compare `on` versionMeasure) [ l | l <- libs, x `hasMatch` libName l ] -- foo > foo-2.2 > foo-2.0.1 > foo-2 > foo-1.0 versionMeasure l = (rx, null vs, vs) where VersionView rx vs = versionView (libName l) -- | @x `hasMatch` y@ if @x@ and @y@ have the same @vvBase@ and -- either @x@ has no version qualifier or the versions also match. hasMatch :: LibName -> LibName -> Bool hasMatch x y = rx == ry && (vx == vy || null vx) where VersionView rx vx = versionView x VersionView ry vy = versionView y -- | Split a library name into basename and a list of version numbers. -- -- > versionView "foo-1.2.3" == VersionView "foo" [1, 2, 3] -- > versionView "foo-01.002.3" == VersionView "foo" [1, 2, 3] -- -- Note that because of leading zeros, @versionView@ is not injective. -- (@unVersionView . versionView@ would produce a normal form.) versionView :: LibName -> VersionView versionView s = case span (\ c -> isDigit c || c == '.') (reverse s) of (v, '-' : x) | valid vs -> VersionView (reverse x) $ reverse $ map (read . reverse) vs where vs = chopWhen (== '.') v valid [] = False valid vs = not $ any null vs _ -> VersionView s [] -- | Print a @VersionView@, inverse of @versionView@ (modulo leading zeros). unVersionView :: VersionView -> LibName unVersionView = \case VersionView base [] -> base VersionView base vs -> base ++ "-" ++ List.intercalate "." (map show vs) ------------------------------------------------------------------------ -- * Prettyprinting errors and warnings ------------------------------------------------------------------------ formatLibPositionInfo :: LibPositionInfo -> String -> Doc formatLibPositionInfo (LibPositionInfo libFile lineNum file) err = text $ let loc | Just lf <- libFile = lf ++ ":" ++ show lineNum ++ ": " | otherwise = "" in if List.isPrefixOf "Failed to read" err then loc else file ++ ":" ++ (if all isDigit (take 1 err) then "" else " ") -- | Pretty-print 'LibError'. formatLibError :: [AgdaLibFile] -> LibError -> Doc formatLibError installed (LibError mc e) = prefix <+> body where prefix = case mc of Nothing -> "" Just c | OtherError err <- e -> formatLibPositionInfo c err _ -> "" body = case e of LibNotFound file lib -> vcat $ [ text $ "Library '" ++ lib ++ "' not found." , sep [ "Add the path to its .agda-lib file to" , nest 2 $ text $ "'" ++ lfPath file ++ "'" , "to install." ] , "Installed libraries:" ] ++ map (nest 2) (if null installed then ["(none)"] else [ sep [ text $ libName l, nest 2 $ parens $ text $ libFile l ] | l <- installed ]) AmbiguousLib lib tgts -> vcat $ [ sep [ text $ "Ambiguous library '" ++ lib ++ "'." , "Could refer to any one of" ] ] ++ [ nest 2 $ text (libName l) <+> parens (text $ libFile l) | l <- tgts ] OtherError err -> text err instance Pretty LibWarning where pretty (LibWarning c w) = formatLibPositionInfo c "" <+> pretty w instance Pretty LibWarning' where pretty (UnknownField s) = text $ "Unknown field '" ++ s ++ "'" Agda-2.6.0.1/src/full/Agda/Interaction/EmacsTop.hs0000644000000000000000000001313513466402171017622 0ustar0000000000000000-- {-# LANGUAGE CPP #-} module Agda.Interaction.EmacsTop ( mimicGHCi ) where import Control.Monad.State import qualified Data.List as List import Agda.Utils.Maybe import Agda.Utils.Pretty import Agda.Utils.String import Agda.Syntax.Common import Agda.TypeChecking.Monad import Agda.Interaction.AgdaTop import Agda.Interaction.Response as R import Agda.Interaction.EmacsCommand hiding (putResponse) import Agda.Interaction.Highlighting.Emacs import Agda.Interaction.Highlighting.Precise (TokenBased(..)) import Agda.VersionCommit ---------------------------------- -- | 'mimicGHCi' is a fake ghci interpreter for the Emacs frontend -- and for interaction tests. -- -- 'mimicGHCi' reads the Emacs frontend commands from stdin, -- interprets them and print the result into stdout. mimicGHCi :: TCM () -> TCM () mimicGHCi = repl (liftIO . mapM_ print <=< liftIO . lispifyResponse) "Agda2> " -- | Given strings of goals, warnings and errors, return a pair of the -- body and the title for the info buffer formatWarningsAndErrors :: String -> String -> String -> (String, String) formatWarningsAndErrors g w e = (body, title) where isG = not $ null g isW = not $ null w isE = not $ null e title = List.intercalate "," $ catMaybes [ " Goals" <$ guard isG , " Errors" <$ guard isE , " Warnings" <$ guard isW , " Done" <$ guard (not (isG || isW || isE)) ] body = List.intercalate "\n" $ catMaybes [ g <$ guard isG , delimiter "Errors" <$ guard (isE && (isG || isW)) , e <$ guard isE , delimiter "Warnings" <$ guard (isW && (isG || isE)) , w <$ guard isW ] -- | Convert Response to an elisp value for the interactive emacs frontend. lispifyResponse :: Response -> IO [Lisp String] lispifyResponse (Resp_HighlightingInfo info remove method modFile) = (:[]) <$> lispifyHighlightingInfo info remove method modFile lispifyResponse (Resp_DisplayInfo info) = return $ case info of Info_CompilationOk w e -> f body "*Compilation result*" where (body, _) = formatWarningsAndErrors "The module was successfully compiled.\n" w e -- abusing the goals field since we ignore the title Info_Constraints s -> f s "*Constraints*" Info_AllGoalsWarnings g w e -> f body ("*All" ++ title ++ "*") where (body, title) = formatWarningsAndErrors g w e Info_Auto s -> f s "*Auto*" Info_Error s -> f s "*Error*" Info_Time s -> f (render s) "*Time*" Info_NormalForm s -> f (render s) "*Normal Form*" -- show? Info_InferredType s -> f (render s) "*Inferred Type*" Info_CurrentGoal s -> f (render s) "*Current Goal*" Info_GoalType s -> f (render s) "*Goal type etc.*" Info_ModuleContents s -> f (render s) "*Module contents*" Info_SearchAbout s -> f (render s) "*Search About*" Info_WhyInScope s -> f (render s) "*Scope Info*" Info_Context s -> f (render s) "*Context*" Info_HelperFunction s -> [ L [ A "agda2-info-action-and-copy" , A $ quote "*Helper function*" , A $ quote (render s ++ "\n") , A "nil" ] ] Info_Intro s -> f (render s) "*Intro*" Info_Version -> f ("Agda version " ++ versionWithCommitInfo) "*Agda Version*" where f content bufname = [ display_info' False bufname content ] lispifyResponse (Resp_ClearHighlighting tokenBased) = return [ L $ A "agda2-highlight-clear" : case tokenBased of NotOnlyTokenBased -> [] TokenBased -> [ Q (lispifyTokenBased tokenBased) ] ] lispifyResponse Resp_DoneAborting = return [ L [ A "agda2-abort-done" ] ] lispifyResponse Resp_ClearRunningInfo = return [ clearRunningInfo ] lispifyResponse (Resp_RunningInfo n s) | n <= 1 = return [ displayRunningInfo s ] | otherwise = return [ L [A "agda2-verbose", A (quote s)] ] lispifyResponse (Resp_Status s) = return [ L [ A "agda2-status-action" , A (quote $ List.intercalate "," $ catMaybes [checked, showImpl]) ] ] where checked = boolToMaybe (sChecked s) "Checked" showImpl = boolToMaybe (sShowImplicitArguments s) "ShowImplicit" lispifyResponse (Resp_JumpToError f p) = return [ lastTag 3 $ L [ A "agda2-maybe-goto", Q $ L [A (quote f), A ".", A (show p)] ] ] lispifyResponse (Resp_InteractionPoints is) = return [ lastTag 1 $ L [A "agda2-goals-action", Q $ L $ map showNumIId is] ] lispifyResponse (Resp_GiveAction ii s) = return [ L [ A "agda2-give-action", showNumIId ii, A s' ] ] where s' = case s of Give_String str -> quote str Give_Paren -> "'paren" Give_NoParen -> "'no-paren" lispifyResponse (Resp_MakeCase variant pcs) = return [ lastTag 2 $ L [ A cmd, Q $ L $ map (A . quote) pcs ] ] where cmd = case variant of R.Function -> "agda2-make-case-action" R.ExtendedLambda -> "agda2-make-case-action-extendlam" lispifyResponse (Resp_SolveAll ps) = return [ lastTag 2 $ L [ A "agda2-solveAll-action", Q . L $ concatMap prn ps ] ] where prn (ii,e)= [showNumIId ii, A $ quote $ prettyShow e] -- | Adds a \"last\" tag to a response. lastTag :: Integer -> Lisp String -> Lisp String lastTag n r = Cons (Cons (A "last") (A $ show n)) r -- | Show an iteraction point identifier as an elisp expression. showNumIId :: InteractionId -> Lisp String showNumIId = A . show . interactionId Agda-2.6.0.1/src/full/Agda/Interaction/Options.hs0000644000000000000000000012510113466402171017537 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} module Agda.Interaction.Options ( CommandLineOptions(..) , PragmaOptions(..) , OptionsPragma , Flag, OptM, runOptM, OptDescr(..), ArgDescr(..) , Verbosity , HtmlHighlight(..) , WarningMode(..) , checkOpts , parsePragmaOptions , parsePluginOptions , stripRTS , defaultOptions , defaultInteractionOptions , defaultVerbosity , defaultCutOff , defaultPragmaOptions , standardOptions_ , unsafePragmaOptions , restartOptions , infectiveOptions , coinfectiveOptions , safeFlag , mapFlag , usage , defaultLibDir -- Reused by PandocAgda , inputFlag , standardOptions, deadStandardOptions , getOptSimple ) where import Control.Monad ( (>=>), when ) import Control.Monad.Trans import Data.IORef import Data.Either import Data.Function import Data.Maybe import Data.List ( isSuffixOf , intercalate ) import Data.Set ( Set ) import qualified Data.Set as Set import System.Console.GetOpt ( getOpt', usageInfo, ArgOrder(ReturnInOrder) , OptDescr(..), ArgDescr(..) ) import System.Directory ( doesFileExist, doesDirectoryExist ) import Text.EditDistance import Agda.Termination.CutOff ( CutOff(..) ) import Agda.Interaction.Library import Agda.Interaction.Options.Help import Agda.Interaction.Options.IORefs import Agda.Interaction.Options.Warnings import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.FileName ( absolute, AbsolutePath, filePath ) import Agda.Utils.Functor ( (<&>) ) import Agda.Utils.Lens ( Lens', over ) import Agda.Utils.List ( groupOn, wordsBy ) import Agda.Utils.Monad ( ifM, readM ) import Agda.Utils.String ( indent ) import Agda.Utils.Trie ( Trie ) import qualified Agda.Utils.Trie as Trie import Agda.Utils.WithDefault import Agda.Version -- Paths_Agda.hs is in $(BUILD_DIR)/build/autogen/. import Paths_Agda ( getDataFileName ) import qualified System.IO.Unsafe as UNSAFE (unsafePerformIO) -- OptDescr is a Functor -------------------------------------------------- type Verbosity = Trie String Int data HtmlHighlight = HighlightAll | HighlightCode | HighlightAuto deriving (Show, Eq) -- Don't forget to update -- doc/user-manual/tools/command-line-options.rst -- if you make changes to the command-line options! data CommandLineOptions = Options { optProgramName :: String , optInputFile :: Maybe FilePath , optIncludePaths :: [FilePath] , optAbsoluteIncludePaths :: [AbsolutePath] , optLibraries :: [LibName] , optOverrideLibrariesFile :: Maybe FilePath -- ^ Use this (if Just) instead of .agda/libraries , optDefaultLibs :: Bool -- ^ Use ~/.agda/defaults , optUseLibs :: Bool -- ^ look for .agda-lib files , optShowVersion :: Bool , optShowHelp :: Maybe Help , optInteractive :: Bool , optGHCiInteraction :: Bool , optJSONInteraction :: Bool , optOptimSmashing :: Bool , optCompileDir :: Maybe FilePath -- ^ In the absence of a path the project root is used. , optGenerateVimFile :: Bool , optGenerateLaTeX :: Bool , optGenerateHTML :: Bool , optHTMLHighlight :: HtmlHighlight , optDependencyGraph :: Maybe FilePath , optLaTeXDir :: FilePath , optHTMLDir :: FilePath , optCSSFile :: Maybe FilePath , optIgnoreInterfaces :: Bool , optIgnoreAllInterfaces :: Bool , optForcing :: Bool , optPragmaOptions :: PragmaOptions , optOnlyScopeChecking :: Bool -- ^ Should the top-level module only be scope-checked, and not -- type-checked? } deriving Show -- | Options which can be set in a pragma. data PragmaOptions = PragmaOptions { optShowImplicit :: Bool , optShowIrrelevant :: Bool , optUseUnicode :: Bool , optVerbose :: Verbosity , optProp :: Bool , optAllowUnsolved :: Bool , optDisablePositivity :: Bool , optTerminationCheck :: Bool , optTerminationDepth :: CutOff -- ^ Cut off structural order comparison at some depth in termination checker? , optCompletenessCheck :: Bool , optUniverseCheck :: Bool , optOmegaInOmega :: Bool , optSizedTypes :: WithDefault 'True , optGuardedness :: WithDefault 'True , optInjectiveTypeConstructors :: Bool , optUniversePolymorphism :: Bool , optIrrelevantProjections :: Bool , optExperimentalIrrelevance :: Bool -- ^ irrelevant levels, irrelevant data matching , optWithoutK :: WithDefault 'False , optCopatterns :: Bool -- ^ Allow definitions by copattern matching? , optPatternMatching :: Bool -- ^ Is pattern matching allowed in the current file? , optExactSplit :: Bool , optEta :: Bool , optRewriting :: Bool -- ^ Can rewrite rules be added and used? , optCubical :: Bool , optPostfixProjections :: Bool -- ^ Should system generated projections 'ProjSystem' be printed -- postfix (True) or prefix (False). , optInstanceSearchDepth :: Int , optOverlappingInstances :: Bool , optInversionMaxDepth :: Int , optSafe :: Bool , optDoubleCheck :: Bool , optSyntacticEquality :: Bool -- ^ Should conversion checker use syntactic equality shortcut? , optWarningMode :: WarningMode , optCompileNoMain :: Bool , optCaching :: Bool , optCountClusters :: Bool -- ^ Count extended grapheme clusters rather than code points when -- generating LaTeX. , optAutoInline :: Bool -- ^ Automatic compile-time inlining for simple definitions (unless marked -- NOINLINE). , optPrintPatternSynonyms :: Bool , optFastReduce :: Bool -- ^ Use the Agda abstract machine (fastReduce)? } deriving (Show, Eq) -- | The options from an @OPTIONS@ pragma. -- -- In the future it might be nice to switch to a more structured -- representation. Note that, currently, there is not a one-to-one -- correspondence between list elements and options. type OptionsPragma = [String] -- | Map a function over the long options. Also removes the short options. -- Will be used to add the plugin name to the plugin options. mapFlag :: (String -> String) -> OptDescr a -> OptDescr a mapFlag f (Option _ long arg descr) = Option [] (map f long) arg descr defaultVerbosity :: Verbosity defaultVerbosity = Trie.singleton [] 1 defaultInteractionOptions :: PragmaOptions defaultInteractionOptions = defaultPragmaOptions defaultOptions :: CommandLineOptions defaultOptions = Options { optProgramName = "agda" , optInputFile = Nothing , optIncludePaths = [] , optAbsoluteIncludePaths = [] , optLibraries = [] , optOverrideLibrariesFile = Nothing , optDefaultLibs = True , optUseLibs = True , optShowVersion = False , optShowHelp = Nothing , optInteractive = False , optGHCiInteraction = False , optJSONInteraction = False , optOptimSmashing = True , optCompileDir = Nothing , optGenerateVimFile = False , optGenerateLaTeX = False , optGenerateHTML = False , optHTMLHighlight = HighlightAll , optDependencyGraph = Nothing , optLaTeXDir = defaultLaTeXDir , optHTMLDir = defaultHTMLDir , optCSSFile = Nothing , optIgnoreInterfaces = False , optIgnoreAllInterfaces = False , optForcing = True , optPragmaOptions = defaultPragmaOptions , optOnlyScopeChecking = False } defaultPragmaOptions :: PragmaOptions defaultPragmaOptions = PragmaOptions { optShowImplicit = False , optShowIrrelevant = False , optUseUnicode = True , optVerbose = defaultVerbosity , optProp = False , optExperimentalIrrelevance = False , optIrrelevantProjections = False -- off by default in > 2.5.4, see issue #2170 , optAllowUnsolved = False , optDisablePositivity = False , optTerminationCheck = True , optTerminationDepth = defaultCutOff , optCompletenessCheck = True , optUniverseCheck = True , optOmegaInOmega = False , optSizedTypes = Default , optGuardedness = Default , optInjectiveTypeConstructors = False , optUniversePolymorphism = True , optWithoutK = Default , optCopatterns = True , optPatternMatching = True , optExactSplit = False , optEta = True , optRewriting = False , optCubical = False , optPostfixProjections = False , optInstanceSearchDepth = 500 , optOverlappingInstances = False , optInversionMaxDepth = 50 , optSafe = False , optDoubleCheck = False , optSyntacticEquality = True , optWarningMode = defaultWarningMode , optCompileNoMain = False , optCaching = True , optCountClusters = False , optAutoInline = True , optPrintPatternSynonyms = True , optFastReduce = True } -- | The default termination depth. defaultCutOff :: CutOff defaultCutOff = CutOff 0 -- minimum value -- | The default output directory for LaTeX. defaultLaTeXDir :: String defaultLaTeXDir = "latex" -- | The default output directory for HTML. defaultHTMLDir :: String defaultHTMLDir = "html" type OptM = ExceptT String IO runOptM :: OptM a -> IO (Either String a) runOptM = runExceptT {- | @f :: Flag opts@ is an action on the option record that results from parsing an option. @f opts@ produces either an error message or an updated options record -} type Flag opts = opts -> OptM opts -- | Checks that the given options are consistent. checkOpts :: Flag CommandLineOptions checkOpts opts | htmlRelated = throwError htmlRelatedMessage | not (matches [optGHCiInteraction, optJSONInteraction, isJust . optInputFile] <= 1) = throwError "Choose at most one: input file, --interactive, or --interaction-json.\n" | or [ p opts && matches ps > 1 | (p, ps) <- exclusive ] = throwError exclusiveMessage | otherwise = return opts where matches = length . filter ($ opts) optionChanged opt = ((/=) `on` opt) opts defaultOptions atMostOne = [ optGenerateHTML , isJust . optDependencyGraph ] ++ map fst exclusive exclusive = [ ( optOnlyScopeChecking , optGenerateVimFile : atMostOne ) , ( optInteractive , optGenerateLaTeX : atMostOne ) , ( optGHCiInteraction , optGenerateLaTeX : atMostOne ) , ( optJSONInteraction , optGenerateLaTeX : atMostOne ) ] exclusiveMessage = unlines $ [ "The options --interactive, --interaction, --interaction-json and" , "--only-scope-checking cannot be combined with each other or" , "with --html or --dependency-graph. Furthermore" , "--interactive and --interaction cannot be combined with" , "--latex, and --only-scope-checking cannot be combined with" , "--vim." ] htmlRelated = not (optGenerateHTML opts) && ( optionChanged optHTMLDir || optionChanged optHTMLHighlight || optionChanged optCSSFile ) htmlRelatedMessage = unlines $ [ "The options --html-highlight, --css-dir and --html-dir" , "only be used along with --html flag." ] -- | Check for unsafe pragmas. Gives a list of used unsafe flags. unsafePragmaOptions :: PragmaOptions -> [String] unsafePragmaOptions opts = [ "--allow-unsolved-metas" | optAllowUnsolved opts ] ++ [ "--no-positivity-check" | optDisablePositivity opts ] ++ [ "--no-termination-check" | not (optTerminationCheck opts) ] ++ [ "--type-in-type" | not (optUniverseCheck opts) ] ++ [ "--omega-in-omega" | optOmegaInOmega opts ] ++ -- [ "--sized-types" | optSizedTypes opts ] ++ [ "--sized-types and --guardedness" | collapseDefault (optSizedTypes opts) , collapseDefault (optGuardedness opts) ] ++ [ "--injective-type-constructors" | optInjectiveTypeConstructors opts ] ++ [ "--irrelevant-projections" | optIrrelevantProjections opts ] ++ [ "--experimental-irrelevance" | optExperimentalIrrelevance opts ] ++ [ "--rewriting" | optRewriting opts ] ++ [ "--cubical and --with-K" | optCubical opts , not (collapseDefault $ optWithoutK opts) ] ++ [] -- | If any these options have changed, then the file will be -- rechecked. Boolean options are negated to mention non-default -- options, where possible. restartOptions :: [(PragmaOptions -> RestartCodomain, String)] restartOptions = [ (C . optTerminationDepth, "--termination-depth") , (B . not . optUseUnicode, "--no-unicode") , (B . optAllowUnsolved, "--allow-unsolved-metas") , (B . optDisablePositivity, "--no-positivity-check") , (B . optTerminationCheck, "--no-termination-check") , (B . not . optUniverseCheck, "--type-in-type") , (B . optOmegaInOmega, "--omega-in-omega") , (B . not . collapseDefault . optSizedTypes, "--no-sized-types") , (B . not . collapseDefault . optGuardedness, "--no-guardedness") , (B . optInjectiveTypeConstructors, "--injective-type-constructors") , (B . optProp, "--prop") , (B . not . optUniversePolymorphism, "--no-universe-polymorphism") , (B . optIrrelevantProjections, "--irrelevant-projections") , (B . optExperimentalIrrelevance, "--experimental-irrelevance") , (B . collapseDefault . optWithoutK, "--without-K") , (B . optExactSplit, "--exact-split") , (B . not . optEta, "--no-eta-equality") , (B . optRewriting, "--rewriting") , (B . optCubical, "--cubical") , (B . optOverlappingInstances, "--overlapping-instances") , (B . optSafe, "--safe") , (B . optDoubleCheck, "--double-check") , (B . not . optSyntacticEquality, "--no-syntactic-equality") , (B . not . optAutoInline, "--no-auto-inline") , (B . not . optFastReduce, "--no-fast-reduce") , (I . optInstanceSearchDepth, "--instance-search-depth") , (I . optInversionMaxDepth, "--inversion-max-depth") , (W . optWarningMode, "--warning") ] -- to make all restart options have the same type data RestartCodomain = C CutOff | B Bool | I Int | W WarningMode deriving Eq -- | An infective option is an option that if used in one module, must -- be used in all modules that depend on this module. infectiveOptions :: [(PragmaOptions -> Bool, String)] infectiveOptions = [ (optCubical, "--cubical") , (optProp, "--prop") ] -- | A coinfective option is an option that if used in one module, must -- be used in all modules that this module depends on. coinfectiveOptions :: [(PragmaOptions -> Bool, String)] coinfectiveOptions = [ (optSafe, "--safe") , (collapseDefault . optWithoutK, "--without-K") , (not . optUniversePolymorphism, "--no-universe-polymorphism") , (not . collapseDefault . optSizedTypes, "--no-sized-types") , (not . collapseDefault . optGuardedness, "--no-guardedness") ] inputFlag :: FilePath -> Flag CommandLineOptions inputFlag f o = case optInputFile o of Nothing -> return $ o { optInputFile = Just f } Just _ -> throwError "only one input file allowed" versionFlag :: Flag CommandLineOptions versionFlag o = return $ o { optShowVersion = True } helpFlag :: Maybe String -> Flag CommandLineOptions helpFlag Nothing o = return $ o { optShowHelp = Just GeneralHelp } helpFlag (Just str) o = case string2HelpTopic str of Just hpt -> return $ o { optShowHelp = Just (HelpFor hpt) } Nothing -> throwError $ "unknown help topic " ++ str ++ " (available: " ++ intercalate ", " (map fst allHelpTopics) ++ ")" safeFlag :: Flag PragmaOptions safeFlag o = do let guardedness = optGuardedness o let sizedTypes = optSizedTypes o return $ o { optSafe = True , optGuardedness = setDefault False guardedness , optSizedTypes = setDefault False sizedTypes } doubleCheckFlag :: Flag PragmaOptions doubleCheckFlag o = return $ o { optDoubleCheck = True } noSyntacticEqualityFlag :: Flag PragmaOptions noSyntacticEqualityFlag o = return $ o { optSyntacticEquality = False } sharingFlag :: Bool -> Flag CommandLineOptions sharingFlag _ _ = throwError $ "Feature --sharing has been removed (in favor of the Agda abstract machine)." cachingFlag :: Bool -> Flag PragmaOptions cachingFlag b o = return $ o { optCaching = b } propFlag :: Flag PragmaOptions propFlag o = return $ o { optProp = True } noPropFlag :: Flag PragmaOptions noPropFlag o = return $ o { optProp = False } experimentalIrrelevanceFlag :: Flag PragmaOptions experimentalIrrelevanceFlag o = return $ o { optExperimentalIrrelevance = True } irrelevantProjectionsFlag :: Flag PragmaOptions irrelevantProjectionsFlag o = return $ o { optIrrelevantProjections = True } noIrrelevantProjectionsFlag :: Flag PragmaOptions noIrrelevantProjectionsFlag o = return $ o { optIrrelevantProjections = False } ignoreInterfacesFlag :: Flag CommandLineOptions ignoreInterfacesFlag o = return $ o { optIgnoreInterfaces = True } ignoreAllInterfacesFlag :: Flag CommandLineOptions ignoreAllInterfacesFlag o = return $ o { optIgnoreAllInterfaces = True } allowUnsolvedFlag :: Flag PragmaOptions allowUnsolvedFlag o = do let upd = over warningSet (Set.\\ unsolvedWarnings) return $ o { optAllowUnsolved = True , optWarningMode = upd (optWarningMode o) } showImplicitFlag :: Flag PragmaOptions showImplicitFlag o = return $ o { optShowImplicit = True } showIrrelevantFlag :: Flag PragmaOptions showIrrelevantFlag o = return $ o { optShowIrrelevant = True } asciiOnlyFlag :: Flag PragmaOptions asciiOnlyFlag o = do lift $ writeIORef unicodeOrAscii AsciiOnly return $ o { optUseUnicode = False } ghciInteractionFlag :: Flag CommandLineOptions ghciInteractionFlag o = return $ o { optGHCiInteraction = True } jsonInteractionFlag :: Flag CommandLineOptions jsonInteractionFlag o = return $ o { optJSONInteraction = True } vimFlag :: Flag CommandLineOptions vimFlag o = return $ o { optGenerateVimFile = True } latexFlag :: Flag CommandLineOptions latexFlag o = return $ o { optGenerateLaTeX = True } onlyScopeCheckingFlag :: Flag CommandLineOptions onlyScopeCheckingFlag o = return $ o { optOnlyScopeChecking = True } countClustersFlag :: Flag PragmaOptions countClustersFlag o = #ifdef COUNT_CLUSTERS return $ o { optCountClusters = True } #else throwError "Cluster counting has not been enabled in this build of Agda." #endif noAutoInlineFlag :: Flag PragmaOptions noAutoInlineFlag o = return $ o { optAutoInline = False } noPrintPatSynFlag :: Flag PragmaOptions noPrintPatSynFlag o = return $ o { optPrintPatternSynonyms = False } noFastReduceFlag :: Flag PragmaOptions noFastReduceFlag o = return $ o { optFastReduce = False } latexDirFlag :: FilePath -> Flag CommandLineOptions latexDirFlag d o = return $ o { optLaTeXDir = d } noPositivityFlag :: Flag PragmaOptions noPositivityFlag o = do let upd = over warningSet (Set.delete NotStrictlyPositive_) return $ o { optDisablePositivity = True , optWarningMode = upd (optWarningMode o) } dontTerminationCheckFlag :: Flag PragmaOptions dontTerminationCheckFlag o = do let upd = over warningSet (Set.delete TerminationIssue_) return $ o { optTerminationCheck = False , optWarningMode = upd (optWarningMode o) } -- The option was removed. See Issue 1918. dontCompletenessCheckFlag :: Flag PragmaOptions dontCompletenessCheckFlag _ = throwError "The --no-coverage-check option has been removed." dontUniverseCheckFlag :: Flag PragmaOptions dontUniverseCheckFlag o = return $ o { optUniverseCheck = False } omegaInOmegaFlag :: Flag PragmaOptions omegaInOmegaFlag o = return $ o { optOmegaInOmega = True } etaFlag :: Flag PragmaOptions etaFlag o = return $ o { optEta = True } noEtaFlag :: Flag PragmaOptions noEtaFlag o = return $ o { optEta = False } sizedTypes :: Flag PragmaOptions sizedTypes o = return $ o { optSizedTypes = Value True } noSizedTypes :: Flag PragmaOptions noSizedTypes o = return $ o { optSizedTypes = Value False } guardedness :: Flag PragmaOptions guardedness o = return $ o { optGuardedness = Value True } noGuardedness :: Flag PragmaOptions noGuardedness o = return $ o { optGuardedness = Value False } injectiveTypeConstructorFlag :: Flag PragmaOptions injectiveTypeConstructorFlag o = return $ o { optInjectiveTypeConstructors = True } guardingTypeConstructorFlag :: Flag PragmaOptions guardingTypeConstructorFlag _ = throwError $ "Experimental feature --guardedness-preserving-type-constructors has been removed." universePolymorphismFlag :: Flag PragmaOptions universePolymorphismFlag o = return $ o { optUniversePolymorphism = True } noUniversePolymorphismFlag :: Flag PragmaOptions noUniversePolymorphismFlag o = return $ o { optUniversePolymorphism = False } noForcingFlag :: Flag CommandLineOptions noForcingFlag o = return $ o { optForcing = False } withKFlag :: Flag PragmaOptions withKFlag o = return $ o { optWithoutK = Value False } withoutKFlag :: Flag PragmaOptions withoutKFlag o = return $ o { optWithoutK = Value True } copatternsFlag :: Flag PragmaOptions copatternsFlag o = return $ o { optCopatterns = True } noCopatternsFlag :: Flag PragmaOptions noCopatternsFlag o = return $ o { optCopatterns = False } noPatternMatchingFlag :: Flag PragmaOptions noPatternMatchingFlag o = return $ o { optPatternMatching = False } exactSplitFlag :: Flag PragmaOptions exactSplitFlag o = do let upd = over warningSet (Set.insert CoverageNoExactSplit_) return $ o { optExactSplit = True , optWarningMode = upd (optWarningMode o) } noExactSplitFlag :: Flag PragmaOptions noExactSplitFlag o = do let upd = over warningSet (Set.delete CoverageNoExactSplit_) return $ o { optExactSplit = False , optWarningMode = upd (optWarningMode o) } rewritingFlag :: Flag PragmaOptions rewritingFlag o = return $ o { optRewriting = True } cubicalFlag :: Flag PragmaOptions cubicalFlag o = do let withoutK = optWithoutK o return $ o { optCubical = True , optWithoutK = setDefault True withoutK } postfixProjectionsFlag :: Flag PragmaOptions postfixProjectionsFlag o = return $ o { optPostfixProjections = True } instanceDepthFlag :: String -> Flag PragmaOptions instanceDepthFlag s o = do d <- integerArgument "--instance-search-depth" s return $ o { optInstanceSearchDepth = d } overlappingInstancesFlag :: Flag PragmaOptions overlappingInstancesFlag o = return $ o { optOverlappingInstances = True } noOverlappingInstancesFlag :: Flag PragmaOptions noOverlappingInstancesFlag o = return $ o { optOverlappingInstances = False } inversionMaxDepthFlag :: String -> Flag PragmaOptions inversionMaxDepthFlag s o = do d <- integerArgument "--inversion-max-depth" s return $ o { optInversionMaxDepth = d } interactiveFlag :: Flag CommandLineOptions interactiveFlag o = do prag <- allowUnsolvedFlag (optPragmaOptions o) return $ o { optInteractive = True , optPragmaOptions = prag } compileFlagNoMain :: Flag PragmaOptions compileFlagNoMain o = return $ o { optCompileNoMain = True } compileDirFlag :: FilePath -> Flag CommandLineOptions compileDirFlag f o = return $ o { optCompileDir = Just f } htmlFlag :: Flag CommandLineOptions htmlFlag o = return $ o { optGenerateHTML = True } htmlHighlightFlag :: String -> Flag CommandLineOptions htmlHighlightFlag "code" o = return $ o { optHTMLHighlight = HighlightCode } htmlHighlightFlag "all" o = return $ o { optHTMLHighlight = HighlightAll } htmlHighlightFlag "auto" o = return $ o { optHTMLHighlight = HighlightAuto } htmlHighlightFlag opt o = throwError $ "Invalid option <" ++ opt ++ ">, expected , or " dependencyGraphFlag :: FilePath -> Flag CommandLineOptions dependencyGraphFlag f o = return $ o { optDependencyGraph = Just f } htmlDirFlag :: FilePath -> Flag CommandLineOptions htmlDirFlag d o = return $ o { optHTMLDir = d } cssFlag :: FilePath -> Flag CommandLineOptions cssFlag f o = return $ o { optCSSFile = Just f } includeFlag :: FilePath -> Flag CommandLineOptions includeFlag d o = return $ o { optIncludePaths = d : optIncludePaths o } libraryFlag :: String -> Flag CommandLineOptions libraryFlag s o = return $ o { optLibraries = optLibraries o ++ [s] } overrideLibrariesFileFlag :: String -> Flag CommandLineOptions overrideLibrariesFileFlag s o = do ifM (liftIO $ doesFileExist s) {-then-} (return $ o { optOverrideLibrariesFile = Just s }) {-else-} (throwError $ "Libraries file not found: " ++ s) noDefaultLibsFlag :: Flag CommandLineOptions noDefaultLibsFlag o = return $ o { optDefaultLibs = False } noLibsFlag :: Flag CommandLineOptions noLibsFlag o = return $ o { optUseLibs = False } verboseFlag :: String -> Flag PragmaOptions verboseFlag s o = do (k,n) <- parseVerbose s return $ o { optVerbose = Trie.insert k n $ optVerbose o } where parseVerbose s = case wordsBy (`elem` (":." :: String)) s of [] -> usage ss -> do n <- readM (last ss) `catchError` \_ -> usage return (init ss, n) usage = throwError "argument to verbose should be on the form x.y.z:N or N" warningModeFlag :: String -> Flag PragmaOptions warningModeFlag s o = case warningModeUpdate s of Just upd -> return $ o { optWarningMode = upd (optWarningMode o) } Nothing -> throwError $ "unknown warning flag " ++ s ++ ". See --help=warning." terminationDepthFlag :: String -> Flag PragmaOptions terminationDepthFlag s o = do k <- readM s `catchError` \_ -> usage when (k < 1) $ usage -- or: turn termination checking off for 0 return $ o { optTerminationDepth = CutOff $ k-1 } where usage = throwError "argument to termination-depth should be >= 1" integerArgument :: String -> String -> OptM Int integerArgument flag s = readM s `catchError` \_ -> throwError $ "option '" ++ flag ++ "' requires an integer argument" standardOptions :: [OptDescr (Flag CommandLineOptions)] standardOptions = [ Option ['V'] ["version"] (NoArg versionFlag) "show version number" , Option ['?'] ["help"] (OptArg helpFlag "TOPIC") ("show help for TOPIC (available: " ++ intercalate ", " (map fst allHelpTopics) ++ ")") , Option ['I'] ["interactive"] (NoArg interactiveFlag) "start in interactive mode" , Option [] ["interaction"] (NoArg ghciInteractionFlag) "for use with the Emacs mode" , Option [] ["interaction-json"] (NoArg jsonInteractionFlag) "for use with other editors such as Atom" , Option [] ["compile-dir"] (ReqArg compileDirFlag "DIR") ("directory for compiler output (default: the project root)") , Option [] ["vim"] (NoArg vimFlag) "generate Vim highlighting files" , Option [] ["latex"] (NoArg latexFlag) "generate LaTeX with highlighted source code" , Option [] ["latex-dir"] (ReqArg latexDirFlag "DIR") ("directory in which LaTeX files are placed (default: " ++ defaultLaTeXDir ++ ")") , Option [] ["html"] (NoArg htmlFlag) "generate HTML files with highlighted source code" , Option [] ["html-dir"] (ReqArg htmlDirFlag "DIR") ("directory in which HTML files are placed (default: " ++ defaultHTMLDir ++ ")") , Option [] ["css"] (ReqArg cssFlag "URL") "the CSS file used by the HTML files (can be relative)" , Option [] ["html-highlight"] (ReqArg htmlHighlightFlag "[code,all,auto]") ("whether to highlight only the code parts (code) or " ++ "the file as a whole (all) or " ++ "decide by source file type (auto)") , Option [] ["dependency-graph"] (ReqArg dependencyGraphFlag "FILE") "generate a Dot file with a module dependency graph" , Option [] ["ignore-interfaces"] (NoArg ignoreInterfacesFlag) "ignore interface files (re-type check everything)" , Option ['i'] ["include-path"] (ReqArg includeFlag "DIR") "look for imports in DIR" , Option ['l'] ["library"] (ReqArg libraryFlag "LIB") "use library LIB" , Option [] ["library-file"] (ReqArg overrideLibrariesFileFlag "FILE") "use FILE instead of the standard libraries file" , Option [] ["no-libraries"] (NoArg noLibsFlag) "don't use any library files" , Option [] ["no-default-libraries"] (NoArg noDefaultLibsFlag) "don't use default libraries" , Option [] ["no-forcing"] (NoArg noForcingFlag) "disable the forcing optimisation" , Option [] ["only-scope-checking"] (NoArg onlyScopeCheckingFlag) "only scope-check the top-level module, do not type-check it" ] ++ map (fmap lensPragmaOptions) pragmaOptions -- | Defined locally here since module ''Agda.Interaction.Options.Lenses'' -- has cyclic dependency. lensPragmaOptions :: Lens' PragmaOptions CommandLineOptions lensPragmaOptions f st = f (optPragmaOptions st) <&> \ opts -> st { optPragmaOptions = opts } -- | Command line options of previous versions of Agda. -- Should not be listed in the usage info, put parsed by GetOpt for good error messaging. deadStandardOptions :: [OptDescr (Flag CommandLineOptions)] deadStandardOptions = [ Option [] ["sharing"] (NoArg $ sharingFlag True) "DEPRECATED: does nothing" , Option [] ["no-sharing"] (NoArg $ sharingFlag False) "DEPRECATED: does nothing" , Option [] ["ignore-all-interfaces"] (NoArg ignoreAllInterfacesFlag) -- not deprecated! Just hidden "ignore all interface files (re-type check everything, including builtin files)" ] ++ map (fmap lensPragmaOptions) deadPragmaOptions pragmaOptions :: [OptDescr (Flag PragmaOptions)] pragmaOptions = [ Option [] ["show-implicit"] (NoArg showImplicitFlag) "show implicit arguments when printing" , Option [] ["show-irrelevant"] (NoArg showIrrelevantFlag) "show irrelevant arguments when printing" , Option [] ["no-unicode"] (NoArg asciiOnlyFlag) "don't use unicode characters when printing terms" , Option ['v'] ["verbose"] (ReqArg verboseFlag "N") "set verbosity level to N" , Option [] ["allow-unsolved-metas"] (NoArg allowUnsolvedFlag) "succeed and create interface file regardless of unsolved meta variables" , Option [] ["no-positivity-check"] (NoArg noPositivityFlag) "do not warn about not strictly positive data types" , Option [] ["no-termination-check"] (NoArg dontTerminationCheckFlag) "do not warn about possibly nonterminating code" , Option [] ["termination-depth"] (ReqArg terminationDepthFlag "N") "allow termination checker to count decrease/increase upto N (default N=1)" , Option [] ["type-in-type"] (NoArg dontUniverseCheckFlag) "ignore universe levels (this makes Agda inconsistent)" , Option [] ["omega-in-omega"] (NoArg omegaInOmegaFlag) "enable typing rule Setω : Setω (this makes Agda inconsistent)" , Option [] ["prop"] (NoArg propFlag) "enable the use of the Prop universe" , Option [] ["no-prop"] (NoArg noPropFlag) "disable the use of the Prop universe (default)" , Option [] ["sized-types"] (NoArg sizedTypes) "enable sized types (default, inconsistent with --guardedness)" , Option [] ["no-sized-types"] (NoArg noSizedTypes) "disable sized types" , Option [] ["guardedness"] (NoArg guardedness) "enable constructor-based guarded corecursion (default, inconsistent with --sized-types)" , Option [] ["no-guardedness"] (NoArg noGuardedness) "disable constructor-based guarded corecursion" , Option [] ["injective-type-constructors"] (NoArg injectiveTypeConstructorFlag) "enable injective type constructors (makes Agda anti-classical and possibly inconsistent)" , Option [] ["no-universe-polymorphism"] (NoArg noUniversePolymorphismFlag) "disable universe polymorphism" , Option [] ["universe-polymorphism"] (NoArg universePolymorphismFlag) "enable universe polymorphism (default)" , Option [] ["irrelevant-projections"] (NoArg irrelevantProjectionsFlag) "enable projection of irrelevant record fields and similar irrelevant definitions (inconsistent)" , Option [] ["no-irrelevant-projections"] (NoArg noIrrelevantProjectionsFlag) "disable projection of irrelevant record fields and similar irrelevant definitions (default)" , Option [] ["experimental-irrelevance"] (NoArg experimentalIrrelevanceFlag) "enable potentially unsound irrelevance features (irrelevant levels, irrelevant data matching)" , Option [] ["with-K"] (NoArg withKFlag) "enable the K rule in pattern matching (default)" , Option [] ["without-K"] (NoArg withoutKFlag) "disable the K rule in pattern matching" , Option [] ["copatterns"] (NoArg copatternsFlag) "enable definitions by copattern matching (default)" , Option [] ["no-copatterns"] (NoArg noCopatternsFlag) "disable definitions by copattern matching" , Option [] ["no-pattern-matching"] (NoArg noPatternMatchingFlag) "disable pattern matching completely" , Option [] ["exact-split"] (NoArg exactSplitFlag) "require all clauses in a definition to hold as definitional equalities (unless marked CATCHALL)" , Option [] ["no-exact-split"] (NoArg noExactSplitFlag) "do not require all clauses in a definition to hold as definitional equalities (default)" , Option [] ["no-eta-equality"] (NoArg noEtaFlag) "default records to no-eta-equality" , Option [] ["rewriting"] (NoArg rewritingFlag) "enable declaration and use of REWRITE rules" , Option [] ["cubical"] (NoArg cubicalFlag) "enable cubical features (e.g. overloads lambdas for paths), implies --without-K" , Option [] ["postfix-projections"] (NoArg postfixProjectionsFlag) "make postfix projection notation the default" , Option [] ["instance-search-depth"] (ReqArg instanceDepthFlag "N") "set instance search depth to N (default: 500)" , Option [] ["overlapping-instances"] (NoArg overlappingInstancesFlag) "consider recursive instance arguments during pruning of instance candidates" , Option [] ["no-overlapping-instances"] (NoArg noOverlappingInstancesFlag) "don't consider recursive instance arguments during pruning of instance candidates (default)" , Option [] ["inversion-max-depth"] (ReqArg inversionMaxDepthFlag "N") "set maximum depth for pattern match inversion to N (default: 50)" , Option [] ["safe"] (NoArg safeFlag) "disable postulates, unsafe OPTION pragmas and primEraseEquality, implies --no-sized-types and --no-guardedness " , Option [] ["double-check"] (NoArg doubleCheckFlag) "enable double-checking of all terms using the internal typechecker" , Option [] ["no-syntactic-equality"] (NoArg noSyntacticEqualityFlag) "disable the syntactic equality shortcut in the conversion checker" , Option ['W'] ["warning"] (ReqArg warningModeFlag "FLAG") ("set warning flags. See --help=warning.") , Option [] ["no-main"] (NoArg compileFlagNoMain) "do not treat the requested module as the main module of a program when compiling" , Option [] ["caching"] (NoArg $ cachingFlag True) "enable caching of typechecking (default)" , Option [] ["no-caching"] (NoArg $ cachingFlag False) "disable caching of typechecking" , Option [] ["count-clusters"] (NoArg countClustersFlag) ("count extended grapheme clusters when " ++ "generating LaTeX (note that this flag " ++ #ifdef COUNT_CLUSTERS "is not enabled in all builds of Agda)" #else "has not been enabled in this build of Agda)" #endif ) , Option [] ["no-auto-inline"] (NoArg noAutoInlineFlag) ("disable automatic compile-time inlining " ++ "(only definitions marked INLINE will be inlined)") , Option [] ["no-print-pattern-synonyms"] (NoArg noPrintPatSynFlag) "expand pattern synonyms when printing terms" , Option [] ["no-fast-reduce"] (NoArg noFastReduceFlag) "disable reduction using the Agda Abstract Machine" ] -- | Pragma options of previous versions of Agda. -- Should not be listed in the usage info, put parsed by GetOpt for good error messaging. deadPragmaOptions :: [OptDescr (Flag PragmaOptions)] deadPragmaOptions = [ Option [] ["guardedness-preserving-type-constructors"] (NoArg guardingTypeConstructorFlag) "treat type constructors as inductive constructors when checking productivity" , Option [] ["no-coverage-check"] (NoArg dontCompletenessCheckFlag) "the option has been removed" ] -- | Used for printing usage info. -- Does not include the dead options. standardOptions_ :: [OptDescr ()] standardOptions_ = map (fmap $ const ()) standardOptions -- | Simple interface for System.Console.GetOpt -- Could be moved to Agda.Utils.Options (does not exist yet) getOptSimple :: [String] -- ^ command line argument words -> [OptDescr (Flag opts)] -- ^ options handlers -> (String -> Flag opts) -- ^ handler of non-options (only one is allowed) -> Flag opts -- ^ combined opts data structure transformer getOptSimple argv opts fileArg = \ defaults -> case getOpt' (ReturnInOrder fileArg) opts argv of (o, _, [] , [] ) -> foldl (>>=) (return defaults) o (_, _, unrecognized, errs) -> throwError $ umsg ++ emsg where ucap = "Unrecognized " ++ plural unrecognized "option" ++ ":" ecap = plural errs "Option error" ++ ":" umsg = if null unrecognized then "" else unlines $ ucap : map suggest unrecognized emsg = if null errs then "" else unlines $ ecap : errs plural [_] x = x plural _ x = x ++ "s" -- Suggest alternatives that are at most 3 typos away longopts :: [String] longopts = map ("--" ++) $ concat $ map (\ (Option _ long _ _) -> long) opts dist :: String -> String -> Int dist s t = restrictedDamerauLevenshteinDistance defaultEditCosts s t close :: String -> String -> Maybe (Int, String) close s t = let d = dist s t in if d <= 3 then Just (d, t) else Nothing closeopts :: String -> [(Int, String)] closeopts s = mapMaybe (close s) longopts alts :: String -> [[String]] alts s = map (map snd) $ groupOn fst $ closeopts s suggest :: String -> String suggest s = case alts s of [] -> s as : _ -> s ++ " (did you mean " ++ sugs as ++ " ?)" sugs :: [String] -> String sugs [a] = a sugs as = "any of " ++ intercalate " " as {- No longer used in favour of parseBackendOptions in Agda.Compiler.Backend -- | Parse the standard options. parseStandardOptions :: [String] -> OptM CommandLineOptions parseStandardOptions argv = parseStandardOptions' argv defaultOptions parseStandardOptions' :: [String] -> Flag CommandLineOptions parseStandardOptions' argv opts = do opts <- getOptSimple (stripRTS argv) (deadStandardOptions ++ standardOptions) inputFlag opts checkOpts opts -} -- | Parse options from an options pragma. parsePragmaOptions :: [String] -- ^ Pragma options. -> CommandLineOptions -- ^ Command-line options which should be updated. -> OptM PragmaOptions parsePragmaOptions argv opts = do ps <- getOptSimple argv (deadPragmaOptions ++ pragmaOptions) (\s _ -> throwError $ "Bad option in pragma: " ++ s) (optPragmaOptions opts) _ <- checkOpts (opts { optPragmaOptions = ps }) return ps -- | Parse options for a plugin. parsePluginOptions :: [String] -> [OptDescr (Flag opts)] -> Flag opts parsePluginOptions argv opts = getOptSimple argv opts (\s _ -> throwError $ "Internal error: Flag " ++ s ++ " passed to a plugin") -- | The usage info message. The argument is the program name (probably -- agda). usage :: [OptDescr ()] -> String -> Help -> String usage options progName GeneralHelp = usageInfo (header progName) options where header progName = unlines [ "Agda version " ++ version, "" , "Usage: " ++ progName ++ " [OPTIONS...] [FILE]" ] usage options progName (HelpFor topic) = helpTopicUsage topic -- | Removes RTS options from a list of options. stripRTS :: [String] -> [String] stripRTS [] = [] stripRTS ("--RTS" : argv) = argv stripRTS (arg : argv) | is "+RTS" arg = stripRTS $ drop 1 $ dropWhile (not . is "-RTS") argv | otherwise = arg : stripRTS argv where is x arg = [x] == take 1 (words arg) ------------------------------------------------------------------------ -- Some paths -- | Returns the absolute default lib dir. This directory is used to -- store the Primitive.agda file. defaultLibDir :: IO FilePath defaultLibDir = do libdir <- fmap filePath (absolute =<< getDataFileName "lib") ifM (doesDirectoryExist libdir) (return libdir) (error $ "The lib directory " ++ libdir ++ " does not exist") Agda-2.6.0.1/src/full/Agda/Interaction/MakeCase.hs0000644000000000000000000004307713466402171017570 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} module Agda.Interaction.MakeCase where import Prelude hiding (mapM, mapM_, null) import Control.Applicative hiding (empty) import Control.Monad hiding (mapM, mapM_, forM) import Control.Monad.Reader (asks) import qualified Data.Map as Map import qualified Data.List as List import Data.Maybe import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Concrete (NameInScope(..), LensInScope(..)) import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Abstract.Views as A import qualified Agda.Syntax.Info as A import Agda.Syntax.Internal import Agda.Syntax.Internal.Pattern import Agda.Syntax.Scope.Base ( ResolvedName(..), Binder(..), KindOfName(..), allKindsOfNames ) import Agda.Syntax.Scope.Monad ( resolveName, resolveName' ) import Agda.Syntax.Translation.ConcreteToAbstract import Agda.Syntax.Translation.InternalToAbstract import Agda.TypeChecking.Monad import Agda.TypeChecking.Coverage import Agda.TypeChecking.Coverage.Match ( SplitPatVar(..) , SplitPattern , applySplitPSubst , fromSplitPatterns ) import Agda.TypeChecking.Empty ( isEmptyTel ) import Agda.TypeChecking.Pretty import Agda.TypeChecking.RecordPatterns import Agda.TypeChecking.Reduce import Agda.TypeChecking.Substitute import Agda.TypeChecking.Irrelevance import Agda.TypeChecking.Rules.LHS.Implicit import Agda.TheTypeChecker import Agda.Interaction.Options import Agda.Interaction.BasicOps import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Monad import Agda.Utils.Null import qualified Agda.Utils.Pretty as P import Agda.Utils.Singleton import Agda.Utils.Size import qualified Agda.Utils.HashMap as HMap #include "undefined.h" import Agda.Utils.Impossible type CaseContext = Maybe ExtLamInfo -- | Parse variables (visible or hidden), returning their de Bruijn indices. -- Used in 'makeCase'. parseVariables :: QName -- ^ The function name. -> Telescope -- ^ The telescope of the clause we are splitting. -> InteractionId -- ^ The hole of this function we are working on. -> Range -- ^ The range of this hole. -> [String] -- ^ The words the user entered in this hole (variable names). -> TCM [(Int,NameInScope)] -- ^ The computed de Bruijn indices of the variables to split on, -- with information about whether each variable is in scope. parseVariables f tel ii rng ss = do -- Get into the context of the meta. mId <- lookupInteractionId ii updateMetaVarRange mId rng mi <- getMetaInfo <$> lookupMeta mId enterClosure mi $ \ r -> do -- Get printed representation of variables in context. n <- getContextSize xs <- forM (downFrom n) $ \ i -> do (,i) . P.render <$> prettyTCM (var i) -- We might be under some lambdas, in which case the context -- is bigger than the number of pattern variables. let nlocals = n - size tel unless (nlocals >= 0) __IMPOSSIBLE__ fv <- getDefFreeVars f reportSDoc "interaction.case" 20 $ do m <- currentModule tel <- lookupSection m cxt <- getContextTelescope vcat [ "parseVariables:" , "current module =" <+> prettyTCM m , "current section =" <+> inTopContext (prettyTCM tel) , text $ "function's fvs = " ++ show fv , text $ "number of locals= " ++ show nlocals , "context =" <+> do inTopContext $ prettyTCM cxt , "checkpoints =" <+> do (text . show) =<< asksTC envCheckpoints ] -- Resolve each string to a variable. forM ss $ \ s -> do let failNotVar = typeError $ GenericError $ "Not a variable: " ++ s failUnbound = typeError $ GenericError $ "Unbound variable " ++ s failAmbiguous = typeError $ GenericError $ "Ambiguous variable " ++ s failLocal = typeError $ GenericError $ "Cannot split on local variable " ++ s failModuleBound = typeError $ GenericError $ "Cannot split on module parameter " ++ s failLetBound v = typeError . GenericError $ "Cannot split on let-bound variable " ++ s failInstantiatedVar v = typeError . GenericDocError =<< sep [ text $ "Cannot split on variable " ++ s ++ ", because it is bound to" , prettyTCM v ] failCaseLet = typeError $ GenericError $ "Cannot split on variable " ++ s ++ ", because let-declarations may not be defined by pattern-matching" -- Jesper, 2018-12-19: Don't consider generalizable names since -- they can be shadowed by hidden variables. let kinds = List.delete GeneralizeName allKindsOfNames cname = C.QName $ C.Name r C.InScope $ C.stringNameParts s -- Note: the range in the concrete name is only approximate. resName <- resolveName' kinds Nothing cname case resName of -- Fail if s is a name, but not of a variable. DefinedName{} -> failNotVar FieldName{} -> failNotVar ConstructorName{} -> failNotVar PatternSynResName{} -> failNotVar -- If s is a variable name in scope, get its de Bruijn index -- via the type checker. VarName x b -> do (v, _) <- getVarInfo x case (v , b) of -- Slightly dangerous: the pattern variable `x` may be -- refined to the module parameter `var i`. But in this -- case the instantiation could as well be the other way -- around, so the new clauses will still make sense. (Var i [] , PatternBound) -> do reportSLn "interaction.case" 30 $ "resolved variable " ++ show x ++ " = " ++ show i when (i < nlocals) failCaseLet return (i - nlocals , C.InScope) (Var i [] , LambdaBound) | i < nlocals -> failLocal | otherwise -> failModuleBound (Var i [] , LetBound) -> failLetBound v (_ , _ ) -> failInstantiatedVar v -- If s is not a name, compare it to the printed variable representation. -- This fallback is to enable splitting on hidden variables. UnknownName -> do let xs' = filter ((s ==) . fst) xs when (null xs') $ failUnbound reportSLn "interaction.case" 20 $ "matching names corresponding to indices " ++ show xs' -- Andreas, 2018-05-28, issue #3095 -- We want to act on an ambiguous name if it corresponds to only one local index. let xs'' = mapMaybe (\ (_,i) -> if i < nlocals then Nothing else Just $ i - nlocals) xs' when (null xs'') $ failLocal -- Filter out variable bound by parent function or module. let xs''' = mapMaybe (\ i -> if i < fv then Nothing else Just i) xs'' case xs''' of [] -> failModuleBound [i] -> return (i , C.NotInScope) -- Issue 1325: Variable names in context can be ambiguous. _ -> failAmbiguous -- | Lookup the clause for an interaction point in the signature. -- Returns the CaseContext, the previous clauses, the clause itself, -- and a list of the remaining ones. type ClauseZipper = ( [Clause] -- previous clauses , Clause -- clause of interest , [Clause] -- other clauses ) getClauseZipperForIP :: QName -> Int -> TCM (CaseContext, ClauseZipper) getClauseZipperForIP f clauseNo = do (theDef <$> getConstInfo f) >>= \case Function{funClauses = cs, funExtLam = extlam} -> do let (cs1,ccs2) = fromMaybe __IMPOSSIBLE__ $ splitExactlyAt clauseNo cs (c,cs2) = fromMaybe __IMPOSSIBLE__ $ uncons ccs2 return (extlam, (cs1, c, cs2)) d -> do reportSDoc "impossible" 10 $ vcat [ "getClauseZipperForIP" <+> prettyTCM f <+> text (show clauseNo) <+> "received" , text (show d) ] __IMPOSSIBLE__ -- | Entry point for case splitting tactic. makeCase :: InteractionId -> Range -> String -> TCM (QName, CaseContext, [A.Clause]) makeCase hole rng s = withInteractionId hole $ do -- Jesper, 2018-12-10: print unsolved metas in dot patterns as _ localTC (\ e -> e { envPrintMetasBare = True }) $ do -- Get function clause which contains the interaction point. InteractionPoint { ipMeta = mm, ipClause = ipCl} <- lookupInteractionPoint hole let meta = fromMaybe __IMPOSSIBLE__ mm (f, clauseNo, rhs) <- case ipCl of IPClause f clauseNo rhs -> return (f, clauseNo, rhs) IPNoClause -> typeError $ GenericError $ "Cannot split here, as we are not in a function definition" (casectxt, (prevClauses, clause, follClauses)) <- getClauseZipperForIP f clauseNo let perm = fromMaybe __IMPOSSIBLE__ $ clausePerm clause tel = clauseTel clause ps = namedClausePats clause reportSDoc "interaction.case" 10 $ vcat [ "splitting clause:" , nest 2 $ vcat [ "f =" <+> prettyTCM f , "context =" <+> ((inTopContext . prettyTCM) =<< getContextTelescope) , "tel =" <+> (inTopContext . prettyTCM) tel , "perm =" <+> text (show perm) , "ps =" <+> prettyTCMPatternList ps ] ] -- Check split variables. let vars = words s -- If the user just entered ".", do nothing. -- This will expand an ellipsis, if present. if concat vars == "." then do cl <- makeAbstractClause f rhs $ clauseToSplitClause clause return (f, casectxt, [cl]) -- If we have no split variables, split on result. else if null vars then do -- Andreas, 2017-07-24, issue #2654: -- When we introduce projection patterns in an extended lambda, -- we need to print them postfix. let postProjInExtLam = applyWhen (isJust casectxt) $ withPragmaOptions $ \ opt -> opt { optPostfixProjections = True } (piTel, sc) <- fixTarget $ clauseToSplitClause clause -- Andreas, 2015-05-05 If we introduced new function arguments -- do not split on result. This might be more what the user wants. -- To split on result, he can then C-c C-c again. -- Andreas, 2015-05-21 Issue 1516: However, if only hidden -- arguments are introduced, C-c C-c virtually does nothing -- (as they are not shown and get lost on the way to emacs and back). newPats <- if null piTel then return False else do -- If there were any pattern introduce, they will only have effect -- if any of them is shown by the printer imp <- optShowImplicit <$> pragmaOptions return $ imp || any visible (telToList piTel) scs <- if newPats then return [sc] else postProjInExtLam $ do res <- splitResult f sc case res of Left err -> do -- Andreas, 2017-12-16, issue #2871 -- If there is nothing to split, introduce trailing hidden arguments. -- Get trailing hidden pattern variables let trailingPatVars :: [NamedArg DBPatVar] trailingPatVars = takeWhileJust isVarP $ reverse ps isVarP (Arg ai (Named n (VarP _ x))) = Just $ Arg ai $ Named n x isVarP _ = Nothing -- If all are already coming from the user, there is really nothing todo! when (all ((UserWritten ==) . getOrigin) trailingPatVars) $ do typeError $ SplitError err -- Otherwise, we make these user-written let xs = map (dbPatVarIndex . namedArg) trailingPatVars return [makePatternVarsVisible xs sc] Right cov -> ifNotM (optCopatterns <$> pragmaOptions) failNoCop $ {-else-} do -- Andreas, 2016-05-03: do not introduce function arguments after projection. -- This is sometimes annoying and can anyway be done by another C-c C-c. -- mapM (snd <.> fixTarget) $ splitClauses cov return cov checkClauseIsClean ipCl (f, casectxt,) <$> mapM (makeAbstractClause f rhs) scs else do -- split on variables xs <- parseVariables f tel hole rng vars reportSLn "interaction.case" 30 $ "parsedVariables: " ++ show (zip xs vars) -- Variables that are not in scope yet are brought into scope (@toShow@) -- The other variables are split on (@toSplit@). let (toShow, toSplit) = flip mapEither (zip xs vars) $ \ ((x,nis), s) -> if (nis == C.NotInScope) then Left x else Right x let sc = makePatternVarsVisible toShow $ clauseToSplitClause clause scs <- split f toSplit sc reportSLn "interaction.case" 70 $ "makeCase: survived the splitting" -- CLEAN UP OF THE GENERATED CLAUSES -- 1. filter out clauses that are already covered scs <- filterM (not <.> isCovered f prevClauses . fst) scs reportSLn "interaction.case" 70 $ "makeCase: survived filtering out already covered clauses" -- 2. filter out trivially impossible clauses not asked for by the user cs <- catMaybes <$> do forM scs $ \ (sc, isAbsurd) -> if isAbsurd -- absurd clause coming from a split asked for by the user then Just <$> makeAbsurdClause f sc -- trivially empty clause due to the refined patterns else ifM (liftTCM $ isEmptyTel (scTel sc)) {- then -} (pure Nothing) {- else -} (Just <$> makeAbstractClause f rhs sc) reportSLn "interaction.case" 70 $ "makeCase: survived filtering out impossible clauses" -- 3. If the cleanup removed everything then we know that none of the clauses where -- absurd but that all of them were trivially empty. In this case we rewind and -- insert all the clauses (garbage in, garbage out!) cs <- if not (null cs) then pure cs else mapM (makeAbstractClause f rhs . fst) scs reportSDoc "interaction.case" 65 $ vcat [ "split result:" , nest 2 $ vcat $ map prettyA cs ] checkClauseIsClean ipCl return (f, casectxt, cs) where failNoCop = typeError $ GenericError $ "OPTION --copatterns needed to split on result here" -- Split clause on given variables, return the resulting clauses together -- with a bool indicating whether each clause is absurd split :: QName -> [Nat] -> SplitClause -> TCM [(SplitClause, Bool)] split f [] clause = return [(clause,False)] split f (var : vars) clause = do z <- dontAssignMetas $ splitClauseWithAbsurd clause var case z of Left err -> typeError $ SplitError err Right (Left cl) -> return [(cl,True)] Right (Right cov) -> concat <$> do forM (splitClauses cov) $ \ cl -> split f (mapMaybe (newVar cl) vars) cl -- Finds the new variable corresponding to an old one, if any. newVar :: SplitClause -> Nat -> Maybe Nat newVar c x = case applySplitPSubst (scSubst c) (var x) of Var y [] -> Just y _ -> Nothing -- Check whether clause has been refined after last load. -- In this case, we refuse to split, as this might lose the refinements. checkClauseIsClean :: IPClause -> TCM () checkClauseIsClean ipCl = do sips <- filter ipSolved . Map.elems <$> useTC stInteractionPoints when (List.any ((== ipCl) . ipClause) sips) $ typeError $ GenericError $ "Cannot split as clause rhs has been refined. Please reload" -- | Make the given pattern variables visible by marking their origin as -- 'CaseSplit' and pattern origin as 'PatOSplit' in the 'SplitClause'. makePatternVarsVisible :: [Nat] -> SplitClause -> SplitClause makePatternVarsVisible [] sc = sc makePatternVarsVisible is sc@SClause{ scPats = ps } = sc{ scPats = mapNamedArgPattern mkVis ps } where mkVis :: NamedArg SplitPattern -> NamedArg SplitPattern mkVis (Arg ai (Named n (VarP o (SplitPatVar x i ls)))) | i `elem` is = -- We could introduce extra consistency checks, like -- if visible ai then __IMPOSSIBLE__ else -- or passing the parsed name along and comparing it with @x@ Arg (setOrigin CaseSplit ai) $ Named n $ VarP PatOSplit $ SplitPatVar x i ls mkVis np = np -- | Make clause with no rhs (because of absurd match). makeAbsurdClause :: QName -> SplitClause -> TCM A.Clause makeAbsurdClause f (SClause tel sps _ _ t) = do let ps = fromSplitPatterns sps reportSDoc "interaction.case" 10 $ vcat [ "Interaction.MakeCase.makeAbsurdClause: split clause:" , nest 2 $ vcat [ "context =" <+> do (inTopContext . prettyTCM) =<< getContextTelescope , "tel =" <+> do inTopContext $ prettyTCM tel , "ps =" <+> do inTopContext $ addContext tel $ prettyTCMPatternList ps -- P.sep <$> prettyTCMPatterns ps ] ] withCurrentModule (qnameModule f) $ do -- Andreas, 2015-05-29 Issue 635 -- Contract implicit record patterns before printing. -- c <- translateRecordPatterns $ Clause noRange tel perm ps NoBody t False -- Jesper, 2015-09-19 Don't contract, since we do on-demand splitting let c = Clause noRange noRange tel ps Nothing t False Nothing -- Normalise the dot patterns ps <- addContext tel $ normalise $ namedClausePats c reportSDoc "interaction.case" 60 $ "normalized patterns: " <+> prettyTCMPatternList ps inTopContext $ reify $ QNamed f $ c { namedClausePats = ps } -- | Make a clause with a question mark as rhs. makeAbstractClause :: QName -> A.RHS -> SplitClause -> TCM A.Clause makeAbstractClause f rhs cl = do lhs <- A.clauseLHS <$> makeAbsurdClause f cl reportSDoc "interaction.case" 60 $ "reified lhs: " <+> prettyA lhs return $ A.Clause lhs [] rhs A.noWhereDecls False -- let ii = InteractionId (-1) -- Dummy interaction point since we never type check this. -- -- Can end up in verbose output though (#1842), hence not __IMPOSSIBLE__. -- let info = A.emptyMetaInfo -- metaNumber = Nothing in order to print as ?, not ?n -- return $ A.Clause lhs [] (A.RHS $ A.QuestionMark info ii) [] False Agda-2.6.0.1/src/full/Agda/Interaction/AgdaTop.hs0000644000000000000000000000400713466402171017424 0ustar0000000000000000module Agda.Interaction.AgdaTop ( repl ) where import Control.Monad.State import Data.Char import System.IO import Agda.Interaction.Response as R import Agda.Interaction.InteractionTop import Agda.Interaction.Options import Agda.TypeChecking.Monad import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.Utils.Maybe ---------------------------------- -- | 'repl' is a fake ghci interpreter for both the Emacs the JSON frontend repl :: InteractionOutputCallback -> String -> TCM () -> TCM () repl callback prompt setup = do liftIO $ do hSetBuffering stdout LineBuffering hSetBuffering stdin LineBuffering hSetEncoding stdout utf8 hSetEncoding stdin utf8 setInteractionOutputCallback callback commands <- liftIO $ initialiseCommandQueue readCommand handleCommand_ (lift setup) `evalStateT` initCommandState commands opts <- commandLineOptions _ <- interact' `runStateT` (initCommandState commands) { optionsOnReload = opts{ optAbsoluteIncludePaths = [] } } return () where interact' :: CommandM () interact' = do Bench.reset done <- Bench.billTo [] $ do liftIO $ do putStr prompt hFlush stdout r <- maybeAbort runInteraction case r of Done -> return True -- Done. Error s -> liftIO (putStrLn s) >> return False Command _ -> return False lift Bench.print unless done interact' -- Reads the next command from stdin. readCommand :: IO Command readCommand = do done <- isEOF if done then return Done else do r <- getLine _ <- return $! length r -- force to read the full input line case dropWhile isSpace r of "" -> readCommand ('-':'-':_) -> readCommand _ -> case listToMaybe $ reads r of Just (x, "") -> return $ Command x Just (_, rem) -> return $ Error $ "not consumed: " ++ rem _ -> return $ Error $ "cannot read: " ++ r Agda-2.6.0.1/src/full/Agda/Interaction/Imports.hs0000644000000000000000000013303713466402171017550 0ustar0000000000000000{-# LANGUAGE CPP #-} {-| This module deals with finding imported modules and loading their interface files. -} module Agda.Interaction.Imports where import Prelude hiding (null) import Control.Arrow import Control.DeepSeq import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.Maybe import qualified Control.Exception as E import Data.Function (on) import qualified Data.Map as Map import qualified Data.List as List import qualified Data.Set as Set import qualified Data.Foldable as Fold (toList) import qualified Data.List as List import Data.Maybe import Data.Monoid (mempty, mappend) import Data.Map (Map) import Data.Set (Set) import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import System.Directory (doesFileExist, getModificationTime, removeFile) import System.FilePath (()) import qualified Text.PrettyPrint.Boxes as Boxes import Agda.Benchmarking import qualified Agda.Syntax.Abstract as A import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Abstract.Name import Agda.Syntax.Common import Agda.Syntax.Parser import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.Syntax.Translation.ConcreteToAbstract import Agda.Syntax.Internal import Agda.TypeChecking.Errors import Agda.TypeChecking.Warnings import Agda.TypeChecking.Reduce import Agda.TypeChecking.MetaVars ( openMetasToPostulates ) import Agda.TypeChecking.Monad import Agda.TypeChecking.Serialise import Agda.TypeChecking.Telescope import Agda.TypeChecking.Primitive import Agda.TypeChecking.Pretty as P import Agda.TypeChecking.DeadCode import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TheTypeChecker import Agda.Interaction.FindFile import {-# SOURCE #-} Agda.Interaction.InteractionTop (showOpenMetas) import Agda.Interaction.Options import qualified Agda.Interaction.Options.Lenses as Lens import Agda.Interaction.Highlighting.Precise (HighlightingInfo, compress) import Agda.Interaction.Highlighting.Generate import Agda.Interaction.Highlighting.Vim import Agda.Interaction.Response (RemoveTokenBasedHighlighting(KeepHighlighting)) import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.FileName import Agda.Utils.Lens import Agda.Utils.Maybe import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.IO.Binary import Agda.Utils.Pretty hiding (Mode) import Agda.Utils.Time import Agda.Utils.Hash import qualified Agda.Utils.HashMap as HMap import qualified Agda.Utils.Trie as Trie #include "undefined.h" import Agda.Utils.Impossible -- | Some information about the source code. data SourceInfo = SourceInfo { siSource :: Text -- ^ Source code. , siFileType :: FileType -- ^ Source file type , siModule :: C.Module -- ^ The parsed module. , siModuleName :: C.TopLevelModuleName -- ^ The top-level module name. } -- | Computes a 'SourceInfo' record for the given file. sourceInfo :: AbsolutePath -> TCM SourceInfo sourceInfo f = Bench.billTo [Bench.Parsing] $ do source <- runPM $ readFilePM f (parsedMod, fileType) <- runPM $ parseFile moduleParser f $ T.unpack source moduleName <- moduleName f parsedMod return $ SourceInfo { siSource = source , siFileType = fileType , siModule = parsedMod , siModuleName = moduleName } -- | Is the aim to type-check the top-level module, or only to -- scope-check it? data Mode = ScopeCheck | TypeCheck deriving (Eq, Show) -- | Are we loading the interface for the user-loaded file -- or for an import? data MainInterface = MainInterface Mode -- ^ For the main file. -- -- In this case state changes inflicted by -- 'createInterface' are preserved. | NotMainInterface -- ^ For an imported file. -- -- In this case state changes inflicted by -- 'createInterface' are not preserved. deriving (Eq, Show) -- | Should state changes inflicted by 'createInterface' be preserved? includeStateChanges :: MainInterface -> Bool includeStateChanges (MainInterface _) = True includeStateChanges NotMainInterface = False -- | Merge an interface into the current proof state. mergeInterface :: Interface -> TCM () mergeInterface i = do let sig = iSignature i builtin = Map.toList $ iBuiltin i prim = [ x | (_,Prim x) <- builtin ] bi = Map.fromList [ (x,Builtin t) | (x,Builtin t) <- builtin ] warns = iWarnings i bs <- getsTC stBuiltinThings reportSLn "import.iface.merge" 10 $ "Merging interface" reportSLn "import.iface.merge" 20 $ " Current builtins " ++ show (Map.keys bs) ++ "\n" ++ " New builtins " ++ show (Map.keys bi) let check b = case (b1, b2) of (Builtin x, Builtin y) | x == y -> return () | otherwise -> typeError $ DuplicateBuiltinBinding b x y _ -> __IMPOSSIBLE__ where Just b1 = Map.lookup b bs Just b2 = Map.lookup b bi mapM_ check (map fst $ Map.toList $ Map.intersection bs bi) addImportedThings sig bi (iPatternSyns i) (iDisplayForms i) (iUserWarnings i) warns reportSLn "import.iface.merge" 20 $ " Rebinding primitives " ++ show prim mapM_ rebind prim where rebind (x, q) = do PrimImpl _ pf <- lookupPrimitiveFunction x stImportedBuiltins `modifyTCLens` Map.insert x (Prim pf{ primFunName = q }) addImportedThings :: Signature -> BuiltinThings PrimFun -> A.PatternSynDefns -> DisplayForms -> Map A.QName String -> [TCWarning] -> TCM () addImportedThings isig ibuiltin patsyns display userwarn warnings = do stImports `modifyTCLens` \ imp -> unionSignatures [imp, isig] stImportedBuiltins `modifyTCLens` \ imp -> Map.union imp ibuiltin stImportedUserWarnings `modifyTCLens` \ imp -> Map.union imp userwarn stPatternSynImports `modifyTCLens` \ imp -> Map.union imp patsyns stImportedDisplayForms `modifyTCLens` \ imp -> HMap.unionWith (++) imp display stTCWarnings `modifyTCLens` \ imp -> List.union imp warnings addImportedInstances isig -- | Scope checks the given module. A proper version of the module -- name (with correct definition sites) is returned. scopeCheckImport :: ModuleName -> TCM (ModuleName, Map ModuleName Scope) scopeCheckImport x = do reportSLn "import.scope" 5 $ "Scope checking " ++ prettyShow x verboseS "import.scope" 10 $ do visited <- Map.keys <$> getVisitedModules reportSLn "import.scope" 10 $ " visited: " ++ List.intercalate ", " (map prettyShow visited) -- Since scopeCheckImport is called from the scope checker, -- we need to reimburse her account. i <- Bench.billTo [] $ getInterface x addImport x -- let s = publicModules $ iInsideScope i let s = iScope i return (iModuleName i `withRangesOfQ` mnameToConcrete x, s) data MaybeWarnings' a = NoWarnings | SomeWarnings a deriving (Show, Functor, Foldable, Traversable) type MaybeWarnings = MaybeWarnings' [TCWarning] applyFlagsToMaybeWarnings :: MaybeWarnings -> TCM MaybeWarnings applyFlagsToMaybeWarnings mw = do w' <- traverse applyFlagsToTCWarnings mw return $ if null w' then NoWarnings else w' instance Null a => Null (MaybeWarnings' a) where empty = NoWarnings null mws = case mws of NoWarnings -> True SomeWarnings ws -> null ws hasWarnings :: MaybeWarnings -> Bool hasWarnings = not . null -- | If the module has already been visited (without warnings), then -- its interface is returned directly. Otherwise the computation is -- used to find the interface and the computed interface is stored for -- potential later use (unless the 'MainInterface' is @'MainInterface' -- 'ScopeCheck'@). alreadyVisited :: C.TopLevelModuleName -> MainInterface -> PragmaOptions -> TCM (Interface, MaybeWarnings) -> TCM (Interface, MaybeWarnings) alreadyVisited x isMain currentOptions getIface = do mm <- getVisitedModule x case mm of -- A module with warnings should never be allowed to be -- imported from another module. Just mi | not (miWarnings mi) -> do reportSLn "import.visit" 10 $ " Already visited " ++ prettyShow x let i = miInterface mi -- Check that imported options are compatible with current ones, -- but give primitive modules a pass optsCompat <- if miPrimitive mi then return True else do ifM (asksTC envCheckOptionConsistency) {-then-} (checkOptionsCompatible currentOptions (iOptionsUsed i) (iModuleName i)) {-else-} (return True) if optsCompat then return (i , NoWarnings) else do wt <- getMaybeWarnings' isMain ErrorWarnings return (i, wt) _ -> do reportSLn "import.visit" 5 $ " Getting interface for " ++ prettyShow x r@(i, wt) <- getIface reportSLn "import.visit" 5 $ " Now we've looked at " ++ prettyShow x unless (isMain == MainInterface ScopeCheck) $ visitModule $ ModuleInfo { miInterface = i , miWarnings = hasWarnings wt , miPrimitive = False -- will be updated later for primitive modules } return r -- | Type checks the main file of the interaction. -- This could be the file loaded in the interacting editor (emacs), -- or the file passed on the command line. -- -- First, the primitive modules are imported. -- Then, @getInterface'@ is called to do the main work. -- -- If the 'Mode' is 'ScopeCheck', then type-checking is not -- performed, only scope-checking. (This may include type-checking -- of imported modules.) In this case the generated, partial -- interface is not stored in the state ('stDecodedModules'). Note, -- however, that if the file has already been type-checked, then a -- complete interface is returned. typeCheckMain :: AbsolutePath -- ^ The path to the file. -> Mode -- ^ Should the file be type-checked, or only scope-checked? -> SourceInfo -- ^ Information about the source code. -> TCM (Interface, MaybeWarnings) typeCheckMain f mode si = do -- liftIO $ putStrLn $ "This is typeCheckMain " ++ prettyShow f -- liftIO . putStrLn . show =<< getVerbosity reportSLn "import.main" 10 $ "Importing the primitive modules." libdir <- liftIO defaultLibDir let libdirPrim = libdir "prim" reportSLn "import.main" 20 $ "Library dir = " ++ show libdir -- Turn off import-chasing messages. -- We have to modify the persistent verbosity setting, since -- getInterface resets the current verbosity settings to the persistent ones. bracket_ (getsTC Lens.getPersistentVerbosity) Lens.putPersistentVerbosity $ do Lens.modifyPersistentVerbosity (Trie.delete []) -- set root verbosity to 0 -- We don't want to generate highlighting information for Agda.Primitive. withHighlightingLevel None $ withoutOptionsChecking $ forM_ (Set.map (libdirPrim ) Lens.primitiveModules) $ \f -> do let file = mkAbsolute f si <- sourceInfo file checkModuleName' (siModuleName si) file _ <- getInterface_ (siModuleName si) (Just si) -- record that the just visited module is primitive mapVisitedModule (siModuleName si) (\ m -> m { miPrimitive = True }) reportSLn "import.main" 10 $ "Done importing the primitive modules." -- Now do the type checking via getInterface'. checkModuleName' (siModuleName si) f getInterface' (siModuleName si) (MainInterface mode) (Just si) where checkModuleName' m f = -- Andreas, 2016-07-11, issue 2092 -- The error range should be set to the file with the wrong module name -- not the importing one (which would be the default). (if null r then id else traceCall (SetRange r)) $ checkModuleName m f Nothing where r = getRange m -- | Tries to return the interface associated to the given (imported) module. -- The time stamp of the relevant interface file is also returned. -- Calls itself recursively for the imports of the given module. -- May type check the module. -- An error is raised if a warning is encountered. -- -- Do not use this for the main file, use 'typeCheckMain' instead. getInterface :: ModuleName -> TCM Interface getInterface m = getInterface_ (toTopLevelModuleName m) Nothing -- | See 'getInterface'. getInterface_ :: C.TopLevelModuleName -> Maybe SourceInfo -- ^ Optional information about the source code. -> TCM Interface getInterface_ x msi = do (i, wt) <- getInterface' x NotMainInterface msi case wt of SomeWarnings w -> tcWarningsToError (filter (notIM . tcWarning) w) NoWarnings -> return i -- filter out unsolved interaction points for imported module so -- that we get the right error message (see test case Fail/Issue1296) where notIM UnsolvedInteractionMetas{} = False notIM _ = True -- | A more precise variant of 'getInterface'. If warnings are -- encountered then they are returned instead of being turned into -- errors. getInterface' :: C.TopLevelModuleName -> MainInterface -> Maybe SourceInfo -- ^ Optional information about the source code. -> TCM (Interface, MaybeWarnings) getInterface' x isMain msi = do withIncreasedModuleNestingLevel $ do -- Preserve the pragma options unless we are checking the main -- interface. bracket_ (useTC stPragmaOptions) (unless (includeStateChanges isMain) . (stPragmaOptions `setTCLens`)) $ do -- We remember but reset the pragma options locally -- For the main interface, we also remember the pragmas from the file when (includeStateChanges isMain) $ do pragmas <- concreteOptionsToOptionPragmas (fst $ maybe __IMPOSSIBLE__ siModule msi) mapM_ setOptionsFromPragma pragmas currentOptions <- useTC stPragmaOptions -- Now reset the options setCommandLineOptions . stPersistentOptions . stPersistentState =<< getTC alreadyVisited x isMain currentOptions $ addImportCycleCheck x $ do file <- findFile x -- requires source to exist reportSLn "import.iface" 10 $ " Check for cycle" checkForImportCycle uptodate <- Bench.billTo [Bench.Import] $ do ignore <- (ignoreInterfaces `and2M` (not <$> Lens.isBuiltinModule (filePath file))) `or2M` ignoreAllInterfaces cached <- runMaybeT $ isCached x file -- If it's cached ignoreInterfaces has no effect; -- to avoid typechecking a file more than once. sourceH <- case msi of Nothing -> liftIO $ hashTextFile file Just si -> return $ hashText (siSource si) ifaceH <- case cached of Nothing -> fmap fst <$> getInterfaceFileHashes (filePath $ toIFile file) Just i -> return $ Just $ iSourceHash i let unchanged = Just sourceH == ifaceH return $ unchanged && (not ignore || isJust cached) reportSLn "import.iface" 5 $ " " ++ prettyShow x ++ " is " ++ (if uptodate then "" else "not ") ++ "up-to-date." (stateChangesIncluded, (i, wt)) <- do -- -- Andreas, 2014-10-20 AIM XX: -- -- Always retype-check the main file to get the iInsideScope -- -- which is no longer serialized. -- let maySkip = isMain == NotMainInterface -- Andreas, 2015-07-13: Serialize iInsideScope again. let maySkip = True if uptodate && maySkip then getStoredInterface x file isMain msi else typeCheck x file isMain msi -- Ensure that the given module name matches the one in the file. let topLevelName = toTopLevelModuleName $ iModuleName i unless (topLevelName == x) $ do -- Andreas, 2014-03-27 This check is now done in the scope checker. -- checkModuleName topLevelName file typeError $ OverlappingProjects file topLevelName x visited <- isVisited x reportSLn "import.iface" 5 $ if visited then " We've been here. Don't merge." else " New module. Let's check it out." -- Check that imported module options are consistent with -- current options (issue #2487) -- compute updated warnings if needed wt' <- ifM (not <$> asksTC envCheckOptionConsistency) {- then -} (return wt) {- else -} $ do optComp <- checkOptionsCompatible currentOptions (iOptionsUsed i) (iModuleName i) -- we might have aquired some more warnings when consistency checking if optComp then return wt else getMaybeWarnings' isMain ErrorWarnings unless (visited || stateChangesIncluded) $ do mergeInterface i Bench.billTo [Bench.Highlighting] $ ifTopLevelAndHighlightingLevelIs NonInteractive $ highlightFromInterface i file stCurrentModule `setTCLens` Just (iModuleName i) -- Interfaces are not stored if we are only scope-checking, or -- if any warnings were encountered. case (isMain, wt') of (MainInterface ScopeCheck, _) -> return () (_, SomeWarnings w) -> return () _ -> storeDecodedModule i return (i, wt') -- | Check if the options used for checking an imported module are -- compatible with the current options. Raises Non-fatal errors if -- not. checkOptionsCompatible :: PragmaOptions -> PragmaOptions -> ModuleName -> TCM Bool checkOptionsCompatible current imported importedModule = flip execStateT True $ do reportSDoc "import.iface.options" 5 $ P.nest 2 $ "current options =" P.<+> showOptions current reportSDoc "import.iface.options" 5 $ P.nest 2 $ "imported options =" P.<+> showOptions imported forM_ coinfectiveOptions $ \ (opt, optName) -> do unless ((opt current) `implies` (opt imported)) $ do put False warning (CoInfectiveImport optName importedModule) forM_ infectiveOptions $ \ (opt, optName) -> do unless ((opt imported) `implies` (opt current)) $ do put False warning (InfectiveImport optName importedModule) where implies :: Bool -> Bool -> Bool p `implies` q = p <= q showOptions opts = P.prettyList (map (\ (o, n) -> P.text n P.<> ": " P.<+> (P.pretty $ o opts)) (coinfectiveOptions ++ infectiveOptions)) -- | Check whether interface file exists and is in cache -- in the correct version (as testified by the interface file hash). isCached :: C.TopLevelModuleName -- ^ Module name of file we process. -> AbsolutePath -- ^ File we process. -> MaybeT TCM Interface isCached x file = do let ifile = filePath $ toIFile file -- Make sure the file exists in the case sensitive spelling. guardM $ liftIO $ doesFileExistCaseSensitive ifile -- Check that we have cached the module. mi <- MaybeT $ getDecodedModule x -- Check that the interface file exists and return its hash. h <- MaybeT $ fmap snd <$> getInterfaceFileHashes ifile -- Make sure the hashes match. guard $ iFullHash mi == h return mi -- | Try to get the interface from interface file or cache. getStoredInterface :: C.TopLevelModuleName -- ^ Module name of file we process. -> AbsolutePath -- ^ File we process. -> MainInterface -> Maybe SourceInfo -- ^ Optional information about the source code. -> TCM (Bool, (Interface, MaybeWarnings)) -- ^ @Bool@ is: do we have to merge the interface? getStoredInterface x file isMain msi = do -- If something goes wrong (interface outdated etc.) -- we revert to fresh type checking. let fallback = typeCheck x file isMain msi -- Examine the hash of the interface file. If it is different from the -- stored version (in stDecodedModules), or if there is no stored version, -- read and decode it. Otherwise use the stored version. let ifile = filePath $ toIFile file h <- fmap snd <$> getInterfaceFileHashes ifile mm <- getDecodedModule x (cached, mi) <- Bench.billTo [Bench.Deserialization] $ case mm of Just mi -> if Just (iFullHash mi) /= h then do dropDecodedModule x reportSLn "import.iface" 50 $ " cached hash = " ++ show (iFullHash mi) reportSLn "import.iface" 50 $ " stored hash = " ++ show h reportSLn "import.iface" 5 $ " file is newer, re-reading " ++ ifile (False,) <$> readInterface ifile else do reportSLn "import.iface" 5 $ " using stored version of " ++ ifile return (True, Just mi) Nothing -> do reportSLn "import.iface" 5 $ " no stored version, reading " ++ ifile (False,) <$> readInterface ifile -- Check that it's the right version case mi of Nothing -> do reportSLn "import.iface" 5 $ " bad interface, re-type checking" fallback Just i -> do reportSLn "import.iface" 5 $ " imports: " ++ show (iImportedModules i) -- We set the pragma options of the skipped file here, so that -- we can check that they are compatible with those of the -- imported modules. Also, if the top-level file is skipped we -- want the pragmas to apply to interactive commands in the UI. mapM_ setOptionsFromPragma (iPragmaOptions i) -- Check that options that matter haven't changed compared to -- current options (issue #2487) optionsChanged <-ifM ((not <$> asksTC envCheckOptionConsistency) `or2M` Lens.isBuiltinModule (filePath file)) {-then-} (return False) {-else-} $ do currentOptions <- useTC stPragmaOptions let disagreements = [ optName | (opt, optName) <- restartOptions, (opt currentOptions) /= (opt (iOptionsUsed i))] if null disagreements then return False else do reportSLn "import.iface.options" 4 $ " Changes in the following options in " ++ prettyShow (filePath file) ++ ", re-typechecking: " ++ prettyShow disagreements return True if optionsChanged then fallback else do hs <- map iFullHash <$> mapM getInterface (map fst $ iImportedModules i) -- If any of the imports are newer we need to retype check if hs /= map snd (iImportedModules i) then do -- liftIO close -- Close the interface file. See above. fallback else do unless cached $ do chaseMsg "Loading " x $ Just ifile -- print imported warnings let ws = filter ((Strict.Just file ==) . tcWarningOrigin) (iWarnings i) unless (null ws) $ reportSDoc "warning" 1 $ P.vcat $ P.prettyTCM <$> ws return (False, (i, NoWarnings)) -- | Run the type checker on a file and create an interface. -- -- Mostly, this function calls 'createInterface'. -- But if it is not the main module we check, -- we do it in a fresh state, suitably initialize, -- in order to forget some state changes after successful type checking. typeCheck :: C.TopLevelModuleName -- ^ Module name of file we process. -> AbsolutePath -- ^ File we process. -> MainInterface -> Maybe SourceInfo -- ^ Optional information about the source code. -> TCM (Bool, (Interface, MaybeWarnings)) -- ^ @Bool@ is: do we have to merge the interface? typeCheck x file isMain msi = do unless (includeStateChanges isMain) cleanCachedLog let checkMsg = case isMain of MainInterface ScopeCheck -> "Reading " _ -> "Checking" withMsgs = bracket_ (chaseMsg checkMsg x $ Just $ filePath file) (const $ do ws <- getAllWarnings AllWarnings let (we, wa) = classifyWarnings ws let wa' = filter ((Strict.Just file ==) . tcWarningOrigin) wa unless (null wa') $ reportSDoc "warning" 1 $ P.vcat $ P.prettyTCM <$> wa' when (null we) $ chaseMsg "Finished" x Nothing) -- Do the type checking. case isMain of MainInterface _ -> do r <- withMsgs $ createInterface file x isMain msi return (True, r) NotMainInterface -> do ms <- getImportPath nesting <- asksTC envModuleNestingLevel range <- asksTC envRange call <- asksTC envCall mf <- useTC stModuleToSource vs <- getVisitedModules ds <- getDecodedModules opts <- stPersistentOptions . stPersistentState <$> getTC isig <- useTC stImports ibuiltin <- useTC stImportedBuiltins display <- useTC stImportsDisplayForms userwarn <- useTC stImportedUserWarnings ipatsyns <- getPatternSynImports ho <- getInteractionOutputCallback -- Every interface is treated in isolation. Note: Some changes to -- the persistent state may not be preserved if an error other -- than a type error or an IO exception is encountered in an -- imported module. r <- withoutCache $ -- The cache should not be used for an imported module, and it -- should be restored after the module has been type-checked freshTCM $ withImportPath ms $ localTC (\e -> e { envModuleNestingLevel = nesting -- Andreas, 2014-08-18: -- Preserve the range of import statement -- for reporting termination errors in -- imported modules: , envRange = range , envCall = call }) $ do setDecodedModules ds setCommandLineOptions opts setInteractionOutputCallback ho stModuleToSource `setTCLens` mf setVisitedModules vs addImportedThings isig ibuiltin ipatsyns display userwarn [] r <- withMsgs $ createInterface file x isMain msi mf <- useTC stModuleToSource ds <- getDecodedModules return (r, do stModuleToSource `setTCLens` mf setDecodedModules ds case r of (i, NoWarnings) -> storeDecodedModule i _ -> return () ) case r of Left err -> throwError err Right (r, update) -> do update case r of (_, NoWarnings) -> -- We skip the file which has just been type-checked to -- be able to forget some of the local state from -- checking the module. -- Note that this doesn't actually read the interface -- file, only the cached interface. (This comment is not -- correct, see -- test/Fail/customised/NestedProjectRoots.err.) getStoredInterface x file isMain msi _ -> return (False, r) -- | Formats and outputs the "Checking", "Finished" and "Loading " messages. chaseMsg :: String -- ^ The prefix, like @Checking@, @Finished@, @Loading @. -> C.TopLevelModuleName -- ^ The module name. -> Maybe String -- ^ Optionally: the file name. -> TCM () chaseMsg kind x file = do indentation <- (`replicate` ' ') <$> asksTC envModuleNestingLevel let maybeFile = caseMaybe file "." $ \ f -> " (" ++ f ++ ")." vLvl | kind == "Checking" = 1 | otherwise = 2 reportSLn "import.chase" vLvl $ concat $ [ indentation, kind, " ", prettyShow x, maybeFile ] -- | Print the highlighting information contained in the given interface. highlightFromInterface :: Interface -> AbsolutePath -- ^ The corresponding file. -> TCM () highlightFromInterface i file = do reportSLn "import.iface" 5 $ "Generating syntax info for " ++ filePath file ++ " (read from interface)." printHighlightingInfo KeepHighlighting (iHighlighting i) readInterface :: FilePath -> TCM (Maybe Interface) readInterface file = do -- Decode the interface file (s, close) <- liftIO $ readBinaryFile' file do mi <- liftIO . E.evaluate =<< decodeInterface s -- Close the file. Note -- ⑴ that evaluate ensures that i is evaluated to WHNF (before -- the next IO operation is executed), and -- ⑵ that decode returns Nothing if an error is encountered, -- so it is safe to close the file here. liftIO close return $ constructIScope <$> mi -- Catch exceptions and close `catchError` \e -> liftIO close >> handler e -- Catch exceptions `catchError` handler where handler e = case e of IOException _ _ e -> do reportSLn "" 0 $ "IO exception: " ++ show e return Nothing -- Work-around for file locking bug. -- TODO: What does this refer to? Please -- document. _ -> throwError e -- | Writes the given interface to the given file. writeInterface :: FilePath -> Interface -> TCM () writeInterface file i = do reportSLn "import.iface.write" 5 $ "Writing interface file " ++ file ++ "." -- Andreas, 2015-07-13 -- After QName memoization (AIM XXI), scope serialization might be cheap enough. -- -- Andreas, Makoto, 2014-10-18 AIM XX: -- -- iInsideScope is bloating the interface files, so we do not serialize it? -- i <- return $ -- i { iInsideScope = emptyScopeInfo -- } -- Andreas, 2016-02-02 this causes issue #1804, so don't do it: -- i <- return $ -- i { iInsideScope = removePrivates $ iInsideScope i -- } encodeFile file i reportSLn "import.iface.write" 5 $ "Wrote interface file." reportSLn "import.iface.write" 50 $ " hash = " ++ show (iFullHash i) ++ "" `catchError` \e -> do reportSLn "" 1 $ "Failed to write interface " ++ file ++ "." liftIO $ whenM (doesFileExist file) $ removeFile file throwError e removePrivates :: ScopeInfo -> ScopeInfo removePrivates si = si { scopeModules = restrictPrivate <$> scopeModules si } concreteOptionsToOptionPragmas :: [C.Pragma] -> TCM [OptionsPragma] concreteOptionsToOptionPragmas p = do pragmas <- concat <$> concreteToAbstract_ p -- identity for top-level pragmas at the moment let getOptions (A.OptionsPragma opts) = Just opts getOptions _ = Nothing return $ mapMaybe getOptions pragmas -- | Tries to type check a module and write out its interface. The -- function only writes out an interface file if it does not encounter -- any warnings. -- -- If appropriate this function writes out syntax highlighting -- information. createInterface :: AbsolutePath -- ^ The file to type check. -> C.TopLevelModuleName -- ^ The expected module name. -> MainInterface -- ^ Are we dealing with the main module? -> Maybe SourceInfo -- ^ Optional information about the source code. -> TCM (Interface, MaybeWarnings) createInterface file mname isMain msi = Bench.billTo [Bench.TopModule mname] $ localTC (\e -> e { envCurrentPath = Just file }) $ do reportSLn "import.iface.create" 5 $ "Creating interface for " ++ prettyShow mname ++ "." verboseS "import.iface.create" 10 $ do visited <- Map.keys <$> getVisitedModules reportSLn "import.iface.create" 10 $ " visited: " ++ List.intercalate ", " (map prettyShow visited) (source, fileType, (pragmas, top)) <- do si <- case msi of Nothing -> sourceInfo file Just si -> return si case si of SourceInfo {..} -> return (siSource, siFileType, siModule) modFile <- useTC stModuleToSource fileTokenInfo <- Bench.billTo [Bench.Highlighting] $ generateTokenInfoFromSource file (T.unpack source) stTokens `setTCLens` fileTokenInfo options <- concreteOptionsToOptionPragmas pragmas mapM_ setOptionsFromPragma options -- Scope checking. reportSLn "import.iface.create" 7 $ "Starting scope checking." topLevel <- Bench.billTo [Bench.Scoping] $ concreteToAbstract_ (TopLevel file mname top) reportSLn "import.iface.create" 7 $ "Finished scope checking." let ds = topLevelDecls topLevel scope = topLevelScope topLevel -- Highlighting from scope checker. reportSLn "import.iface.create" 7 $ "Starting highlighting from scope." Bench.billTo [Bench.Highlighting] $ do -- Generate and print approximate syntax highlighting info. ifTopLevelAndHighlightingLevelIs NonInteractive $ printHighlightingInfo KeepHighlighting fileTokenInfo let onlyScope = isMain == MainInterface ScopeCheck ifTopLevelAndHighlightingLevelIsOr NonInteractive onlyScope $ mapM_ (\ d -> generateAndPrintSyntaxInfo d Partial onlyScope) ds reportSLn "import.iface.create" 7 $ "Finished highlighting from scope." -- Type checking. -- Now that all the options are in we can check if caching should -- be on. activateLoadedFileCache -- invalidate cache if pragmas change, TODO move cachingStarts opts <- useTC stPragmaOptions me <- readFromCachedLog case me of Just (Pragmas opts', _) | opts == opts' -> return () _ -> do reportSLn "cache" 10 $ "pragma changed: " ++ show (isJust me) cleanCachedLog writeToCurrentLog $ Pragmas opts case isMain of MainInterface ScopeCheck -> do reportSLn "import.iface.create" 7 $ "Skipping type checking." cacheCurrentLog _ -> do reportSLn "import.iface.create" 7 $ "Starting type checking." Bench.billTo [Bench.Typing] $ mapM_ checkDeclCached ds `finally_` cacheCurrentLog reportSLn "import.iface.create" 7 $ "Finished type checking." -- Ulf, 2013-11-09: Since we're rethrowing the error, leave it up to the -- code that handles that error to reset the state. -- Ulf, 2013-11-13: Errors are now caught and highlighted in InteractionTop. -- catchError_ (checkDecls ds) $ \e -> do -- ifTopLevelAndHighlightingLevelIs NonInteractive $ -- printErrorInfo e -- throwError e unfreezeMetas -- Profiling: Count number of metas. verboseS "profile.metas" 10 $ do MetaId n <- fresh tickN "metas" (fromIntegral n) -- Highlighting from type checker. reportSLn "import.iface.create" 7 $ "Starting highlighting from type info." Bench.billTo [Bench.Highlighting] $ do -- Move any remaining token highlighting to stSyntaxInfo. toks <- useTC stTokens ifTopLevelAndHighlightingLevelIs NonInteractive $ printHighlightingInfo KeepHighlighting toks stTokens `setTCLens` mempty -- Grabbing warnings and unsolved metas to highlight them warnings <- getAllWarnings AllWarnings unless (null warnings) $ reportSDoc "import.iface.create" 20 $ "collected warnings: " P.<> prettyTCM warnings unsolved <- getAllUnsolved unless (null unsolved) $ reportSDoc "import.iface.create" 20 $ "collected unsolved: " P.<> prettyTCM unsolved let warningInfo = compress $ foldMap warningHighlighting $ unsolved ++ warnings stSyntaxInfo `modifyTCLens` \inf -> (inf `mappend` toks) `mappend` warningInfo whenM (optGenerateVimFile <$> commandLineOptions) $ -- Generate Vim file. withScope_ scope $ generateVimFile $ filePath file reportSLn "import.iface.create" 7 $ "Finished highlighting from type info." setScope scope reportSLn "scope.top" 50 $ "SCOPE " ++ show scope -- TODO: It would be nice if unsolved things were highlighted -- after every mutual block. openMetas <- getOpenMetas unless (null openMetas) $ do reportSLn "import.metas" 10 "We have unsolved metas." reportSLn "import.metas" 10 . unlines =<< showOpenMetas ifTopLevelAndHighlightingLevelIs NonInteractive $ printUnsolvedInfo -- Andreas, 2016-08-03, issue #964 -- When open metas are allowed, -- permanently freeze them now by turning them into postulates. -- This will enable serialization. -- savedMetaStore <- useTC stMetaStore allowUnsolved <- optAllowUnsolved <$> pragmaOptions unless (includeStateChanges isMain) $ -- Andreas, 2018-11-15, re issue #3393: -- We do not get here when checking the main module -- (then includeStateChanges is True). when allowUnsolved $ do reportSLn "import.iface.create" 7 $ "Turning unsolved metas (if any) into postulates." withCurrentModule (scopeCurrent scope) $ openMetasToPostulates -- Clear constraints as they might refer to what -- they think are open metas. stAwakeConstraints `setTCLens` [] stSleepingConstraints `setTCLens` [] -- Serialization. reportSLn "import.iface.create" 7 $ "Starting serialization." i <- Bench.billTo [Bench.Serialization, Bench.BuildInterface] $ do buildInterface source fileType topLevel options reportSLn "tc.top" 101 $ unlines $ "Signature:" : [ unlines [ prettyShow x , " type: " ++ show (defType def) , " def: " ++ show cc ] | (x, def) <- HMap.toList $ iSignature i ^. sigDefinitions, Function{ funCompiled = cc } <- [theDef def] ] reportSLn "import.iface.create" 7 $ "Finished serialization." mallWarnings <- getMaybeWarnings' isMain ErrorWarnings reportSLn "import.iface.create" 7 $ "Considering writing to interface file." case (mallWarnings, isMain) of (SomeWarnings allWarnings, _) -> do -- Andreas, 2018-11-15, re issue #3393 -- The following is not sufficient to fix #3393 -- since the replacement of metas by postulates did not happen. -- -- | not (allowUnsolved && all (isUnsolvedWarning . tcWarning) allWarnings) -> do reportSLn "import.iface.create" 7 $ "We have warnings, skipping writing interface file." return () (_, MainInterface ScopeCheck) -> do reportSLn "import.iface.create" 7 $ "We are just scope-checking, skipping writing interface file." return () _ -> Bench.billTo [Bench.Serialization] $ do reportSLn "import.iface.create" 7 $ "Actually calling writeInterface." -- The file was successfully type-checked (and no warnings were -- encountered), so the interface should be written out. let ifile = filePath $ toIFile file writeInterface ifile i reportSLn "import.iface.create" 7 $ "Finished (or skipped) writing to interface file." -- -- Restore the open metas, as we might continue in interaction mode. -- Actually, we do not serialize the metas if checking the MainInterface -- stMetaStore `setTCLens` savedMetaStore -- Profiling: Print statistics. printStatistics 30 (Just mname) =<< getStatistics -- Get the statistics of the current module -- and add it to the accumulated statistics. localStatistics <- getStatistics lensAccumStatistics `modifyTCLens` Map.unionWith (+) localStatistics verboseS "profile" 1 $ do reportSLn "import.iface" 5 $ "Accumulated statistics." return $ first constructIScope (i, mallWarnings) getUniqueMetasRanges :: [MetaId] -> TCM [Range] getUniqueMetasRanges = fmap List.nub . mapM getMetaRange getUnsolvedMetas :: TCM [Range] getUnsolvedMetas = do openMetas <- getOpenMetas interactionMetas <- getInteractionMetas getUniqueMetasRanges (openMetas List.\\ interactionMetas) getAllUnsolved :: TCM [TCWarning] getAllUnsolved = do unsolvedInteractions <- getUniqueMetasRanges =<< getInteractionMetas unsolvedConstraints <- getAllConstraints unsolvedMetas <- getUnsolvedMetas let checkNonEmpty c rs = c rs <$ guard (not $ null rs) mapM warning_ $ catMaybes [ checkNonEmpty UnsolvedInteractionMetas unsolvedInteractions , checkNonEmpty UnsolvedMetaVariables unsolvedMetas , checkNonEmpty UnsolvedConstraints unsolvedConstraints ] -- | Collect all warnings that have accumulated in the state. getAllWarnings :: WhichWarnings -> TCM [TCWarning] getAllWarnings = getAllWarnings' NotMainInterface -- | Expert version of 'getAllWarnings'; if 'isMain' is a -- 'MainInterface', the warnings definitely include also unsolved -- warnings. getAllWarnings' :: MainInterface -> WhichWarnings -> TCM [TCWarning] getAllWarnings' isMain ww = do unsolved <- getAllUnsolved collectedTCWarnings <- useTC stTCWarnings let showWarn w = classifyWarning w <= ww && not (null unsolved && onlyShowIfUnsolved w) fmap (filter (showWarn . tcWarning)) $ applyFlagsToTCWarnings' isMain $ reverse $ unsolved ++ collectedTCWarnings getMaybeWarnings :: WhichWarnings -> TCM MaybeWarnings getMaybeWarnings = getMaybeWarnings' NotMainInterface getMaybeWarnings' :: MainInterface -> WhichWarnings -> TCM MaybeWarnings getMaybeWarnings' isMain ww = do allWarnings <- getAllWarnings' isMain ww return $ if null allWarnings -- Andreas, issue 964: not checking null interactionPoints -- anymore; we want to serialize with open interaction points now! then NoWarnings else SomeWarnings allWarnings getAllWarningsOfTCErr :: TCErr -> TCM [TCWarning] getAllWarningsOfTCErr err = case err of TypeError tcst cls -> case clValue cls of NonFatalErrors{} -> return [] _ -> localTCState $ do putTC tcst ws <- getAllWarnings AllWarnings -- We filter out the unsolved(Metas/Constraints) to stay -- true to the previous error messages. return $ filter (not . isUnsolvedWarning . tcWarning) ws _ -> return [] -- | Reconstruct the 'iScope' (not serialized) -- from the 'iInsideScope' (serialized). constructIScope :: Interface -> Interface constructIScope i = billToPure [ Deserialization ] $ i{ iScope = publicModules $ iInsideScope i } -- | Builds an interface for the current module, which should already -- have been successfully type checked. buildInterface :: Text -- ^ Source code. -> FileType -- ^ Agda file? Literate Agda file? -> TopLevelInfo -- ^ 'TopLevelInfo' for the current module. -> [OptionsPragma] -- ^ Options set in @OPTIONS@ pragmas. -> TCM Interface buildInterface source fileType topLevel pragmas = do reportSLn "import.iface" 5 "Building interface..." let m = topLevelModuleName topLevel scope' <- getScope let scope = scope' { scopeCurrent = m } -- Andreas, 2014-05-03: killRange did not result in significant reduction -- of .agdai file size, and lost a few seconds performance on library-test. -- Andreas, Makoto, 2014-10-18 AIM XX: repeating the experiment -- with discarding also the nameBindingSite in QName: -- Saves 10% on serialization time (and file size)! -- -- NOTE: We no longer discard all nameBindingSites (but the commit -- that introduced this change seems to have made Agda a bit -- faster and interface file sizes a bit smaller, at least for the -- standard library). builtin <- useTC stLocalBuiltins ms <- getImports mhs <- mapM (\ m -> (m,) <$> moduleHash m) $ Set.toList ms foreignCode <- useTC stForeignCode -- Ulf, 2016-04-12: -- Non-closed display forms are not applicable outside the module anyway, -- and should be dead-code eliminated (#1928). display <- HMap.filter (not . null) . HMap.map (filter isClosed) <$> useTC stImportsDisplayForms -- TODO: Kill some ranges? (display, sig) <- eliminateDeadCode display =<< getSignature userwarns <- useTC stLocalUserWarnings syntaxInfo <- useTC stSyntaxInfo optionsUsed <- useTC stPragmaOptions -- Andreas, 2015-02-09 kill ranges in pattern synonyms before -- serialization to avoid error locations pointing to external files -- when expanding a pattern synonym. patsyns <- killRange <$> getPatternSyns let builtin' = Map.mapWithKey (\ x b -> (x,) . primFunName <$> b) builtin warnings <- getAllWarnings AllWarnings reportSLn "import.iface" 7 " instantiating all meta variables" i <- instantiateFull $ Interface { iSourceHash = hashText source , iSource = source , iFileType = fileType , iImportedModules = mhs , iModuleName = m , iScope = empty -- publicModules scope , iInsideScope = topLevelScope topLevel , iSignature = sig , iDisplayForms = display , iUserWarnings = userwarns , iBuiltin = builtin' , iForeignCode = foreignCode , iHighlighting = syntaxInfo , iPragmaOptions = pragmas , iOptionsUsed = optionsUsed , iPatternSyns = patsyns , iWarnings = warnings } reportSLn "import.iface" 7 " interface complete" return i -- | Returns (iSourceHash, iFullHash) getInterfaceFileHashes :: FilePath -> TCM (Maybe (Hash, Hash)) getInterfaceFileHashes ifile = do exist <- liftIO $ doesFileExist ifile if not exist then return Nothing else do (s, close) <- liftIO $ readBinaryFile' ifile let hs = decodeHashes s liftIO $ maybe 0 (uncurry (+)) hs `seq` close return hs moduleHash :: ModuleName -> TCM Hash moduleHash m = iFullHash <$> getInterface m -- | True if the first file is newer than the second file. If a file doesn't -- exist it is considered to be infinitely old. isNewerThan :: FilePath -> FilePath -> IO Bool isNewerThan new old = do newExist <- doesFileExist new oldExist <- doesFileExist old if not (newExist && oldExist) then return newExist else do newT <- getModificationTime new oldT <- getModificationTime old return $ newT >= oldT Agda-2.6.0.1/src/full/Agda/Interaction/Library/0000755000000000000000000000000013466402171017154 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Interaction/Library/Base.hs0000644000000000000000000000150013466402171020356 0ustar0000000000000000-- | Basic data types for library management. module Agda.Interaction.Library.Base where -- | A symbolic library name. -- type LibName = String -- | The special name @\".\"@ is used to indicated that the current directory -- should count as a project root. -- libNameForCurrentDir :: LibName libNameForCurrentDir = "." -- | Content of a @.agda-lib@ file. -- data AgdaLibFile = AgdaLib { libName :: LibName -- ^ The symbolic name of the library. , libFile :: FilePath -- ^ Path to this @.agda-lib@ file (not content of the file). , libIncludes :: [FilePath] -- ^ Roots where to look for the modules of the library. , libDepends :: [LibName] -- ^ Dependencies. } deriving (Show) emptyLibFile :: AgdaLibFile emptyLibFile = AgdaLib { libName = "", libFile = "", libIncludes = [], libDepends = [] } Agda-2.6.0.1/src/full/Agda/Interaction/Library/Parse.hs0000644000000000000000000001763413466402171020575 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} -- | Parser for @.agda-lib@ files. -- -- Example file: -- -- @ -- name: Main -- depend: -- standard-library -- include: . -- src more-src -- @ -- -- Should parse as: -- -- @ -- AgdaLib -- { libName = "Main" -- , libFile = path_to_this_file -- , libIncludes = [ "." , "src" , "more-src" ] -- , libDepends = [ "standard-library" ] -- } -- @ -- module Agda.Interaction.Library.Parse ( parseLibFile , splitCommas , trimLineComment , LineNumber , runP , LibWarning'(..) ) where import Control.Exception import Control.Monad import Control.Monad.Writer import Data.Char import Data.Data import qualified Data.List as List import System.FilePath import Agda.Interaction.Library.Base import Agda.Utils.Except ( MonadError(throwError), ExceptT, runExceptT ) import Agda.Utils.IO ( catchIO ) import Agda.Utils.String ( ltrim ) -- | Parser monad: Can throw @String@ error messages, and collects -- @LibWarning'@s library warnings. type P = ExceptT String (Writer [LibWarning']) runP :: P a -> (Either String a, [LibWarning']) runP = runWriter . runExceptT -- | Library Warnings. data LibWarning' = UnknownField String deriving (Show, Data) warningP :: LibWarning' -> P () warningP = tell . pure -- | The config files we parse have the generic structure of a sequence -- of @field : content@ entries. type GenericFile = [GenericEntry] data GenericEntry = GenericEntry { geHeader :: String -- ^ E.g. field name. @trim@med. , geContent :: [String] -- ^ E.g. field content. @trim@med. } -- | Library file field format format [sic!]. data Field = forall a. Field { fName :: String -- ^ Name of the field. , fOptional :: Bool -- ^ Is it optional? , fParse :: [String] -> P a -- ^ Content parser for this field. , fSet :: a -> AgdaLibFile -> AgdaLibFile -- ^ Sets parsed content in 'AgdaLibFile' structure. } -- | @.agda-lib@ file format with parsers and setters. agdaLibFields :: [Field] agdaLibFields = -- Andreas, 2017-08-23, issue #2708, field "name" is optional. [ Field "name" True parseName $ \ name l -> l { libName = name } , Field "include" True (pure . concatMap words) $ \ inc l -> l { libIncludes = inc } , Field "depend" True (pure . concatMap splitCommas) $ \ ds l -> l { libDepends = ds } ] where parseName [s] | [name] <- words s = pure name parseName ls = throwError $ "Bad library name: '" ++ unwords ls ++ "'" -- | Parse @.agda-lib@ file. -- -- Sets 'libFile' name and turn mentioned include directories into absolute pathes -- (provided the given 'FilePath' is absolute). -- parseLibFile :: FilePath -> IO (P AgdaLibFile) parseLibFile file = (fmap setPath . parseLib <$> readFile file) `catchIO` \e -> return $ throwError $ "Failed to read library file " ++ file ++ ".\nReason: " ++ show e where setPath lib = unrelativise (takeDirectory file) lib{ libFile = file } unrelativise dir lib = lib { libIncludes = map (dir ) (libIncludes lib) } -- | Parse file contents. parseLib :: String -> P AgdaLibFile parseLib s = fromGeneric =<< parseGeneric s -- | Parse 'GenericFile' with 'agdaLibFields' descriptors. fromGeneric :: GenericFile -> P AgdaLibFile fromGeneric = fromGeneric' agdaLibFields -- | Given a list of 'Field' descriptors (with their custom parsers), -- parse a 'GenericFile' into the 'AgdaLibFile' structure. -- -- Checks mandatory fields are present; no duplicate fields, no unknown fields. fromGeneric' :: [Field] -> GenericFile -> P AgdaLibFile fromGeneric' fields fs = do checkFields fields (map geHeader fs) foldM upd emptyLibFile fs where upd :: AgdaLibFile -> GenericEntry -> P AgdaLibFile upd l (GenericEntry h cs) = do mf <- findField h fields case mf of Just Field{..} -> do x <- fParse cs return $ fSet x l Nothing -> return l -- | Ensure that there are no duplicate fields and no mandatory fields are missing. checkFields :: [Field] -> [String] -> P () checkFields fields fs = do let mandatory = [ fName f | f <- fields, not $ fOptional f ] -- Missing fields. missing = mandatory List.\\ fs -- Duplicate fields. dup = fs List.\\ List.nub fs -- Plural s for error message. s xs = if length xs > 1 then "s" else "" list xs = List.intercalate ", " [ "'" ++ f ++ "'" | f <- xs ] when (not $ null missing) $ throwError $ "Missing field" ++ s missing ++ " " ++ list missing when (not $ null dup) $ throwError $ "Duplicate field" ++ s dup ++ " " ++ list dup -- | Find 'Field' with given 'fName', throw error if unknown. findField :: String -> [Field] -> P (Maybe Field) findField s fs = maybe err (return . Just) $ List.find ((s ==) . fName) fs where err = warningP (UnknownField s) >> return Nothing -- Generic file parser ---------------------------------------------------- -- | Example: -- -- @ -- parseGeneric "name:Main--BLA\ndepend:--BLA\n standard-library--BLA\ninclude : . --BLA\n src more-src \n" -- == Right [("name",["Main"]),("depend",["standard-library"]),("include",[".","src more-src"])] -- @ parseGeneric :: String -> P GenericFile parseGeneric s = groupLines =<< concat <$> mapM (uncurry parseLine) (zip [1..] $ map stripComments $ lines s) type LineNumber = Int -- | Lines with line numbers. data GenericLine = Header LineNumber String -- ^ Header line, like a field name, e.g. "include :". Cannot be indented. -- @String@ is 'trim'med. | Content LineNumber String -- ^ Other line. Must be indented. -- @String@ is 'trim'med. deriving (Show) -- | Parse line into 'Header' and 'Content' components. -- -- Precondition: line comments and trailing whitespace have been stripped away. -- -- Example file: -- -- @ -- name: Main -- depend: -- standard-library -- include: . -- src more-src -- @ -- -- This should give -- -- @ -- [ Header 1 "name" -- , Content 1 "Main" -- , Header 2 "depend" -- , Content 3 "standard-library" -- , Header 4 "include" -- , Content 4 "." -- , Content 5 "src more-src" -- ] -- @ parseLine :: LineNumber -> String -> P [GenericLine] parseLine _ "" = pure [] parseLine l s@(c:_) -- Indented lines are 'Content'. | isSpace c = pure [Content l $ ltrim s] -- Non-indented lines are 'Header'. | otherwise = case break (==':') s of -- Headers are single words followed by a colon. -- Anything after the colon that is not whitespace is 'Content'. (h, ':' : r) -> case words h of [h] -> pure $ [Header l h] ++ [Content l r' | let r' = ltrim r, not (null r')] [] -> throwError $ show l ++ ": Missing field name" hs -> throwError $ show l ++ ": Bad field name " ++ show h _ -> throwError $ show l ++ ": Missing ':' for field " ++ show (ltrim s) -- | Collect 'Header' and subsequent 'Content's into 'GenericEntry'. -- -- Tailing 'Content's? That's an error. -- groupLines :: [GenericLine] -> P GenericFile groupLines [] = pure [] groupLines (Content l c : _) = throwError $ show l ++ ": Missing field" groupLines (Header _ h : ls) = (GenericEntry h [ c | Content _ c <- cs ] :) <$> groupLines ls1 where (cs, ls1) = span isContent ls isContent Content{} = True isContent Header{} = False -- | Remove leading whitespace and line comment. trimLineComment :: String -> String trimLineComment = stripComments . ltrim -- | Break a comma-separated string. Result strings are @trim@med. splitCommas :: String -> [String] splitCommas s = words $ map (\c -> if c == ',' then ' ' else c) s -- | ...and trailing, but not leading, whitespace. stripComments :: String -> String stripComments "" = "" stripComments ('-':'-':_) = "" stripComments (c : s) = cons c (stripComments s) where cons c "" | isSpace c = "" cons c s = c : s Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/0000755000000000000000000000000013466402171020155 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Generate.hs-boot0000644000000000000000000000032213466402171023201 0ustar0000000000000000module Agda.Interaction.Highlighting.Generate where import Agda.TypeChecking.Monad.Base import Agda.Syntax.Position (Range) highlightAsTypeChecked :: MonadTCM tcm => Range -> Range -> tcm a -> tcm a Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/JSON.hs0000644000000000000000000000465513466402171021274 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Functions which give precise syntax highlighting info in JSON format. module Agda.Interaction.Highlighting.JSON (jsonifyHighlightingInfo) where import Agda.Interaction.Highlighting.Common import Agda.Interaction.Highlighting.Precise hiding (String) import Agda.Interaction.Highlighting.Range (Range(..)) import Agda.Interaction.Response import Agda.TypeChecking.Monad (HighlightingMethod(..), ModuleToSource) import Agda.Utils.FileName (filePath) import Agda.Utils.IO.TempFile (writeToTempFile) import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as BS import qualified Data.Map as Map #include "undefined.h" import Agda.Utils.Impossible -- | Encode meta information into a JSON Value showAspects :: ModuleToSource -- ^ Must contain a mapping for the definition site's module, if any. -> (Range, Aspects) -> Value showAspects modFile (range, aspect) = object [ "range" .= [from range, to range] , "atoms" .= toAtoms aspect , "tokenBased" .= tokenBased aspect , "note" .= note aspect , "definitionSite" .= fmap defSite (definitionSite aspect) ] where defSite (DefinitionSite mdl position _ _) = object [ "filepath" .= filePath (Map.findWithDefault __IMPOSSIBLE__ mdl modFile) , "position" .= position ] instance ToJSON TokenBased where toJSON TokenBased = String "TokenBased" toJSON NotOnlyTokenBased = String "NotOnlyTokenBased" -- | Turns syntax highlighting information into a JSON value jsonifyHighlightingInfo :: HighlightingInfo -> RemoveTokenBasedHighlighting -> HighlightingMethod -> ModuleToSource -- ^ Must contain a mapping for every definition site's module. -> IO Value jsonifyHighlightingInfo info remove method modFile = case chooseHighlightingMethod info method of Direct -> direct Indirect -> indirect where result :: Value result = object [ "remove" .= case remove of RemoveHighlighting -> True KeepHighlighting -> False , "payload" .= map (showAspects modFile) (ranges info) ] direct :: IO Value direct = return $ object [ "kind" .= String "HighlightingInfo" , "direct" .= True , "info" .= result ] indirect :: IO Value indirect = do filepath <- writeToTempFile (BS.unpack (encode result)) return $ object [ "kind" .= String "HighlightingInfo" , "direct" .= False , "filepath" .= filepath ] Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Precise.hs0000644000000000000000000003054713466402171022114 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} -- | Types used for precise syntax highlighting. module Agda.Interaction.Highlighting.Precise ( -- * Files Aspect(..) , NameKind(..) , OtherAspect(..) , Aspects(..) , DefinitionSite(..) , TokenBased(..) , File(..) , HighlightingInfo -- ** Creation , parserBased , singleton , several -- ** Merging , merge -- ** Inspection , smallestPos , toMap -- * Compressed files , CompressedFile(..) , compressedFileInvariant , compress , decompress , noHighlightingInRange -- ** Creation , singletonC , severalC , splitAtC , selectC -- ** Inspection , smallestPosC -- ** Merge , mergeC ) where import Control.Applicative ((<$>), (<*>)) import Control.Arrow (second) import Control.Monad import Data.Function import qualified Data.List as List import Data.Maybe import Data.Semigroup import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Set (Set) import qualified Data.Set as Set import qualified Agda.Syntax.Position as P import qualified Agda.Syntax.Common as Common import qualified Agda.Syntax.Concrete as SC import Agda.Interaction.Highlighting.Range import Agda.Utils.String import Agda.Utils.List ------------------------------------------------------------------------ -- Files -- | Syntactic aspects of the code. (These cannot overlap.) data Aspect = Comment | Keyword | String | Number | Symbol -- ^ Symbols like forall, =, ->, etc. | PrimitiveType -- ^ Things like Set and Prop. | Name (Maybe NameKind) Bool -- ^ Is the name an operator part? | Pragma -- ^ Text occurring in pragmas that -- does not have a more specific -- aspect. | Background -- ^ Non-code contents in literate Agda | Markup -- ^ Delimiters used to separate the Agda code blocks from the -- other contents in literate Agda deriving (Eq, Show) -- | @NameKind@s are figured out during scope checking. data NameKind = Bound -- ^ Bound variable. | Generalizable -- ^ Generalizable variable. -- (This includes generalizable -- variables that have been -- generalized). | Constructor Common.Induction -- ^ Inductive or coinductive constructor. | Datatype | Field -- ^ Record field. | Function | Module -- ^ Module name. | Postulate | Primitive -- ^ Primitive. | Record -- ^ Record type. | Argument -- ^ Named argument, like x in {x = v} | Macro -- ^ Macro. deriving (Eq, Show) -- | Other aspects, generated by type checking. -- (These can overlap with each other and with 'Aspect's.) data OtherAspect = Error | DottedPattern | UnsolvedMeta | UnsolvedConstraint -- ^ Unsolved constraint not connected to meta-variable. This -- could for instance be an emptyness constraint. | TerminationProblem | PositivityProblem | Deadcode -- ^ Used for highlighting unreachable clauses, unreachable RHS -- (because of an absurd pattern), etc. | CoverageProblem | IncompletePattern -- ^ When this constructor is used it is probably a good idea to -- include a 'note' explaining why the pattern is incomplete. | TypeChecks -- ^ Code which is being type-checked. -- NB: We put CatchallClause last so that it is overwritten by other, -- more important, aspects in the emacs mode. | CatchallClause deriving (Eq, Ord, Show, Enum, Bounded) -- | Meta information which can be associated with a -- character\/character range. data Aspects = Aspects { aspect :: Maybe Aspect , otherAspects :: Set OtherAspect , note :: Maybe String -- ^ This note, if present, can be displayed as a tool-tip or -- something like that. It should contain useful information about -- the range (like the module containing a certain identifier, or -- the fixity of an operator). , definitionSite :: Maybe DefinitionSite -- ^ The definition site of the annotated thing, if applicable and -- known. File positions are counted from 1. , tokenBased :: !TokenBased -- ^ Is this entry token-based? } deriving Show data DefinitionSite = DefinitionSite { defSiteModule :: SC.TopLevelModuleName -- ^ The defining module. , defSitePos :: Int -- ^ The file position in that module. , defSiteHere :: Bool -- ^ Has this @DefinitionSite@ been created at the defining site of the name? , defSiteAnchor :: Maybe String -- ^ A pretty name for the HTML linking. } deriving Show instance Eq DefinitionSite where DefinitionSite m p _ _ == DefinitionSite m' p' _ _ = m == m' && p == p' -- | Is the highlighting \"token-based\", i.e. based only on -- information from the lexer? data TokenBased = TokenBased | NotOnlyTokenBased deriving (Eq, Show) instance Eq Aspects where Aspects a o _ d t == Aspects a' o' _ d' t' = (a, o, d, t) == (a', o', d', t') -- | A 'File' is a mapping from file positions to meta information. -- -- The first position in the file has number 1. newtype File = File { mapping :: IntMap Aspects } deriving (Eq, Show) -- | Syntax highlighting information. type HighlightingInfo = CompressedFile ------------------------------------------------------------------------ -- Creation -- | A variant of 'mempty' with 'tokenBased' set to -- 'NotOnlyTokenBased'. parserBased :: Aspects parserBased = mempty { tokenBased = NotOnlyTokenBased } -- | @'singleton' rs m@ is a file whose positions are those in @rs@, -- and in which every position is associated with @m@. singleton :: Ranges -> Aspects -> File singleton rs m = File { mapping = IntMap.fromAscList [ (p, m) | p <- rangesToPositions rs ] } -- | Like 'singleton', but with several 'Ranges' instead of only one. several :: [Ranges] -> Aspects -> File several rs m = mconcat $ map (\r -> singleton r m) rs ------------------------------------------------------------------------ -- Merging instance Semigroup TokenBased where b1@NotOnlyTokenBased <> b2 = b1 TokenBased <> b2 = b2 instance Monoid TokenBased where mempty = TokenBased mappend = (<>) -- | Merges meta information. mergeAspects :: Aspects -> Aspects -> Aspects mergeAspects m1 m2 = Aspects { aspect = (mplus `on` aspect) m1 m2 , otherAspects = (Set.union `on` otherAspects) m1 m2 , note = case (note m1, note m2) of (Just n1, Just n2) -> Just $ if n1 == n2 then n1 else addFinalNewLine n1 ++ "----\n" ++ n2 (Just n1, Nothing) -> Just n1 (Nothing, Just n2) -> Just n2 (Nothing, Nothing) -> Nothing , definitionSite = (mplus `on` definitionSite) m1 m2 , tokenBased = tokenBased m1 <> tokenBased m2 } instance Semigroup Aspects where (<>) = mergeAspects instance Monoid Aspects where mempty = Aspects { aspect = Nothing , otherAspects = Set.empty , note = Nothing , definitionSite = Nothing , tokenBased = mempty } mappend = (<>) -- | Merges files. merge :: File -> File -> File merge f1 f2 = File { mapping = (IntMap.unionWith mappend `on` mapping) f1 f2 } instance Semigroup File where (<>) = merge instance Monoid File where mempty = File { mapping = IntMap.empty } mappend = (<>) ------------------------------------------------------------------------ -- Inspection -- | Returns the smallest position, if any, in the 'File'. smallestPos :: File -> Maybe Int smallestPos = fmap (fst . fst) . IntMap.minViewWithKey . mapping -- | Convert the 'File' to a map from file positions (counting from 1) -- to meta information. toMap :: File -> IntMap Aspects toMap = mapping ------------------------------------------------------------------------ -- Compressed files -- | A compressed 'File', in which consecutive positions with the same -- 'Aspects' are stored together. newtype CompressedFile = CompressedFile { ranges :: [(Range, Aspects)] } deriving (Eq, Show) -- | Invariant for compressed files. -- -- Note that these files are not required to be /maximally/ -- compressed, because ranges are allowed to be empty, and the -- 'Aspects's in adjacent ranges are allowed to be equal. compressedFileInvariant :: CompressedFile -> Bool compressedFileInvariant (CompressedFile []) = True compressedFileInvariant (CompressedFile f) = all rangeInvariant rs && all (not . empty) rs && and (zipWith (<=) (map to $ init rs) (map from $ tail rs)) where rs = map fst f -- | Compresses a file by merging consecutive positions with equal -- meta information into longer ranges. compress :: File -> CompressedFile compress f = CompressedFile $ map join $ groupBy' p (IntMap.toAscList $ mapping f) where p (pos1, m1) (pos2, m2) = pos2 == pos1 + 1 && m1 == m2 join pms = ( Range { from = head ps, to = last ps + 1 } , head ms ) where (ps, ms) = unzip pms -- | Decompresses a compressed file. decompress :: CompressedFile -> File decompress = File . IntMap.fromList . concat . map (\(r, m) -> [ (p, m) | p <- rangeToPositions r ]) . ranges -- | Clear any highlighting info for the given ranges. Used to make sure -- unsolved meta highlighting overrides error highlighting. noHighlightingInRange :: Ranges -> CompressedFile -> CompressedFile noHighlightingInRange rs (CompressedFile hs) = CompressedFile $ concatMap clear hs where clear (r, i) = case minus (Ranges [r]) rs of Ranges [] -> [] Ranges rs -> [ (r, i) | r <- rs ] ------------------------------------------------------------------------ -- Operations that work directly with compressed files -- | @'singletonC' rs m@ is a file whose positions are those in @rs@, -- and in which every position is associated with @m@. singletonC :: Ranges -> Aspects -> CompressedFile singletonC (Ranges rs) m = CompressedFile [(r, m) | r <- rs, not (empty r)] -- | Like 'singletonR', but with a list of 'Ranges' instead of a -- single one. severalC :: [Ranges] -> Aspects -> CompressedFile severalC rss m = mconcat $ map (\rs -> singletonC rs m) rss -- | Merges compressed files. mergeC :: CompressedFile -> CompressedFile -> CompressedFile mergeC (CompressedFile f1) (CompressedFile f2) = CompressedFile (mrg f1 f2) where mrg [] f2 = f2 mrg f1 [] = f1 mrg (p1@(i1,_):f1) (p2@(i2,_):f2) | to i1 <= from i2 = p1 : mrg f1 (p2:f2) | to i2 <= from i1 = p2 : mrg (p1:f1) f2 | to i1 <= to i2 = ps1 ++ mrg f1 (ps2 ++ f2) | otherwise = ps1 ++ mrg (ps2 ++ f1) f2 where (ps1, ps2) = fuse p1 p2 -- Precondition: The ranges are overlapping. fuse (i1, m1) (i2, m2) = ( fix [ (Range { from = a, to = b }, ma) , (Range { from = b, to = c }, mergeAspects m1 m2) ] , fix [ (Range { from = c, to = d }, md) ] ) where [(a, ma), (b, _), (c, _), (d, md)] = List.sortBy (compare `on` fst) [(from i1, m1), (to i1, m1), (from i2, m2), (to i2, m2)] fix = filter (not . empty . fst) instance Semigroup CompressedFile where (<>) = mergeC instance Monoid CompressedFile where mempty = CompressedFile [] mappend = (<>) -- | @splitAtC p f@ splits the compressed file @f@ into @(f1, f2)@, -- where all the positions in @f1@ are @< p@, and all the positions -- in @f2@ are @>= p@. splitAtC :: Int -> CompressedFile -> (CompressedFile, CompressedFile) splitAtC p f = (CompressedFile f1, CompressedFile f2) where (f1, f2) = split $ ranges f split [] = ([], []) split (rx@(r,x) : f) | p <= from r = ([], rx:f) | to r <= p = (rx:f1, f2) | otherwise = ([ (toP, x) ], (fromP, x) : f) where (f1, f2) = split f toP = Range { from = from r, to = p } fromP = Range { from = p, to = to r } selectC :: P.Range -> CompressedFile -> CompressedFile selectC r cf = cf' where empty = (0,0) (from, to) = fromMaybe empty (rangeToEndPoints r) (_, (cf', _)) = (second (splitAtC to)) . splitAtC from $ cf -- | Returns the smallest position, if any, in the 'CompressedFile'. smallestPosC :: CompressedFile -> Maybe Int smallestPosC (CompressedFile []) = Nothing smallestPosC (CompressedFile ((r, _) : _)) = Just (from r) Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Dot.hs0000644000000000000000000000640213466402171021241 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Generate an import dependency graph for a given module. module Agda.Interaction.Highlighting.Dot where import Control.Monad.State import qualified Data.Map as M import Data.Map(Map) import Data.Maybe import Data.Monoid import qualified Data.Set as S import Data.Set (Set) import Agda.Interaction.Options import Agda.Syntax.Abstract import Agda.TypeChecking.Monad #include "undefined.h" import Agda.Utils.Impossible -- | Internal module identifiers for construction of dependency graph. type ModuleId = String data DotState = DotState { dsModules :: Map ModuleName ModuleId -- ^ Records already processed modules -- and maps them to an internal identifier. , dsNameSupply :: [ModuleId] -- ^ Supply of internal identifiers. , dsConnection :: Set (ModuleId, ModuleId) -- ^ Edges of dependency graph. } initialDotState :: DotState initialDotState = DotState { dsModules = mempty , dsNameSupply = map (('m':) . show) [0..] , dsConnection = mempty } type DotM = StateT DotState TCM -- | Translate a 'ModuleName' to an internal 'ModuleId'. -- Returns @True@ if the 'ModuleName' is new, i.e., has not been -- encountered before and is thus added to the map of processed modules. addModule :: ModuleName -> DotM (ModuleId, Bool) addModule m = do s <- get case M.lookup m (dsModules s) of Just r -> return (r, False) Nothing -> do let newName:nameSupply = dsNameSupply s put s { dsModules = M.insert m newName (dsModules s) , dsNameSupply = nameSupply } return (newName, True) -- | Add an arc from importer to imported. addConnection :: ModuleId -> ModuleId -> DotM () addConnection m1 m2 = modify $ \s -> s {dsConnection = S.insert (m1,m2) (dsConnection s)} -- | Recursively build import graph, starting from given 'Interface'. -- Modifies the state in 'DotM' and returns the 'ModuleId' of the 'Interface'. dottify :: Interface -> DotM ModuleId dottify inter = do let curModule = iModuleName inter (name, continue) <- addModule curModule -- If we have not visited this interface yet, -- process its imports recursively and -- add them as connections to the graph. when continue $ do importsifs <- lift $ map miInterface . catMaybes <$> mapM (getVisitedModule . toTopLevelModuleName . fst) (iImportedModules inter) imports <- mapM dottify importsifs mapM_ (addConnection name) imports return name -- | Generate a .dot file for the import graph starting with the -- given 'Interface' and write it to the file specified by the -- command line option. generateDot :: Interface -> TCM () generateDot inter = do (top, state) <- flip runStateT initialDotState $ do dottify inter fp <- fromMaybe __IMPOSSIBLE__ . optDependencyGraph <$> commandLineOptions liftIO $ writeFile fp $ mkDot state where mkDot :: DotState -> String mkDot st = unlines $ [ "digraph dependencies {" ] ++ [" " ++ repr ++ "[label=\"" ++ show (mnameToConcrete modulename) ++ "\"];" | (modulename, repr) <- M.toList (dsModules st)] ++ [" " ++ r1 ++ " -> " ++ r2 ++ ";" | (r1 , r2) <- S.toList (dsConnection st) ] ++ ["}"] Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/HTML.hs0000644000000000000000000003055613466402171021266 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Function for generating highlighted, hyperlinked HTML from Agda -- sources. module Agda.Interaction.Highlighting.HTML ( generateHTML -- Reused by PandocAgda , defaultCSSFile , generateHTMLWithPageGen , generatePage , page , tokenStream , code ) where import Prelude hiding ((!!), concatMap) import Control.Arrow ((***)) import Control.Monad import Control.Monad.Trans import Data.Function import Data.Monoid import Data.Foldable (toList, concatMap) import Data.Maybe import qualified Data.IntMap as IntMap import qualified Data.Map as Map import qualified Data.List as List import Data.List.Split (splitWhen, chunksOf) import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import qualified Network.URI.Encode import System.FilePath import System.Directory import Text.Blaze.Html5 hiding (code, map, title) import qualified Text.Blaze.Html5 as Html5 import Text.Blaze.Html5.Attributes as Attr import Text.Blaze.Html.Renderer.Text -- The imported operator (!) attaches an Attribute to an Html value -- The defined operator (!!) attaches a list of such Attributes import Paths_Agda import Agda.Interaction.Options import Agda.Interaction.Highlighting.Precise import Agda.Interaction.Highlighting.Common import Agda.Interaction.Highlighting.Generate (computeUnsolvedMetaWarnings, computeUnsolvedConstraints) import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Common import Agda.Syntax.Abstract.Name (ModuleName) import Agda.TypeChecking.Monad (TCM, useTC) import qualified Agda.TypeChecking.Monad as TCM import Agda.Utils.FileName (filePath) import Agda.Utils.Function import Agda.Utils.Lens import qualified Agda.Utils.IO.UTF8 as UTF8 import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | The name of the default CSS file. defaultCSSFile :: FilePath defaultCSSFile = "Agda.css" -- | The directive inserted before the rendered code blocks rstDelimiter :: String rstDelimiter = ".. raw:: html\n" -- | Determine how to highlight the file highlightOnlyCode :: HtmlHighlight -> FileType -> Bool highlightOnlyCode HighlightAll _ = False highlightOnlyCode HighlightCode _ = True highlightOnlyCode HighlightAuto AgdaFileType = False highlightOnlyCode HighlightAuto MdFileType = True highlightOnlyCode HighlightAuto RstFileType = True highlightOnlyCode HighlightAuto OrgFileType = True highlightOnlyCode HighlightAuto TexFileType = False -- | Determine the generated file extension highlightedFileExt :: HtmlHighlight -> FileType -> String highlightedFileExt hh ft | not $ highlightOnlyCode hh ft = "html" | otherwise = case ft of AgdaFileType -> "html" MdFileType -> "md" RstFileType -> "rst" TexFileType -> "tex" OrgFileType -> "org" -- | Generates HTML files from all the sources which have been -- visited during the type checking phase. -- -- This function should only be called after type checking has -- completed successfully. type PageGen = FilePath -- ^ Output directory -> FileType -- ^ Source file type -> Bool -- ^ Return value of `highlightOnlyCode` -> String -- ^ Output file extension (return -- value of `highlightedFileExt`) -> C.TopLevelModuleName -> Text -> CompressedFile -- ^ Highlighting information -> TCM () generateHTML :: TCM () generateHTML = generateHTMLWithPageGen pageGen where pageGen :: PageGen pageGen dir ft pc ext mod contents hinfo = generatePage (renderer pc ft) ext dir mod where renderer :: Bool -> FileType -> FilePath -> FilePath -> Text renderer onlyCode fileType css _ = page css onlyCode mod $ code onlyCode fileType $ tokenStream contents hinfo -- | Prepare information for HTML page generation. -- -- The page generator receives the output directory as well as the -- module's top level module name, its source code, and its -- highlighting information. generateHTMLWithPageGen :: PageGen -- ^ Page generator. -> TCM () generateHTMLWithPageGen generatePage = do options <- TCM.commandLineOptions -- There is a default directory given by 'defaultHTMLDir' let dir = optHTMLDir options let htmlHighlight = optHTMLHighlight options liftIO $ createDirectoryIfMissing True dir -- If the default CSS file should be used, then it is copied to -- the output directory. liftIO $ when (isNothing $ optCSSFile options) $ do cssFile <- getDataFileName defaultCSSFile copyFile cssFile (dir defaultCSSFile) TCM.reportSLn "html" 1 $ unlines [ "" , "Warning: HTML is currently generated for ALL files which can be" , "reached from the given module, including library files." ] -- Pull source code and highlighting info from the state and -- generate all the web pages. mapM_ (\(n, mi) -> let i = TCM.miInterface mi ft = TCM.iFileType i in generatePage dir ft (highlightOnlyCode htmlHighlight ft) (highlightedFileExt htmlHighlight ft) n (TCM.iSource i) (TCM.iHighlighting i)) . Map.toList =<< TCM.getVisitedModules -- | Converts module names to the corresponding HTML file names. modToFile :: C.TopLevelModuleName -> String -> FilePath modToFile m ext = Network.URI.Encode.encode $ render (pretty m) <.> ext -- | Generates a highlighted, hyperlinked version of the given module. generatePage :: (FilePath -> FilePath -> Text) -- ^ Page renderer. -> String -- ^ Output file extension. -> FilePath -- ^ Directory in which to create -- files. -> C.TopLevelModuleName -- ^ Module to be highlighted. -> TCM () generatePage renderPage ext dir mod = do f <- fromMaybe __IMPOSSIBLE__ . Map.lookup mod <$> useTC TCM.stModuleToSource css <- fromMaybe defaultCSSFile . optCSSFile <$> TCM.commandLineOptions let target = dir modToFile mod ext let html = renderPage css $ filePath f TCM.reportSLn "html" 1 $ "Generating HTML for " ++ render (pretty mod) ++ " (" ++ target ++ ")." liftIO $ UTF8.writeTextToFile target html -- | Attach multiple Attributes (!!) :: Html -> [Attribute] -> Html h !! as = h ! mconcat as -- | Constructs the web page, including headers. page :: FilePath -- ^ URL to the CSS file. -> Bool -- ^ Whether to reserve literate -> C.TopLevelModuleName -- ^ Module to be highlighted. -> Html -> Text page css htmlHighlight modName pageContent = renderHtml $ if htmlHighlight then pageContent else docTypeHtml $ hdr <> rest where hdr = Html5.head $ mconcat [ meta !! [ charset "utf-8" ] , Html5.title (toHtml $ render $ pretty modName) , link !! [ rel "stylesheet" , href $ stringValue css ] ] rest = body $ (pre ! class_ "Agda") pageContent -- | Position, Contents, Infomation type TokenInfo = ( Int , String , Aspects ) -- | Constructs token stream ready to print. tokenStream :: Text -- ^ The contents of the module. -> CompressedFile -- ^ Highlighting information. -> [TokenInfo] tokenStream contents info = map (\cs -> case cs of (mi, (pos, _)) : _ -> (pos, map (snd . snd) cs, fromMaybe mempty mi) [] -> __IMPOSSIBLE__) $ List.groupBy ((==) `on` fst) $ map (\(pos, c) -> (IntMap.lookup pos infoMap, (pos, c))) $ zip [1..] (T.unpack contents) where infoMap = toMap (decompress info) -- | Constructs the HTML displaying the code. code :: Bool -- ^ Whether to generate non-code contents as-is -> FileType -- ^ Source file type -> [TokenInfo] -> Html code onlyCode fileType = mconcat . if onlyCode then case fileType of -- Explicitly written all cases, so people -- get compile error when adding new file types -- when they forget to modify the code here RstFileType -> map mkRst . splitByMarkup MdFileType -> map mkMd . chunksOf 2 . splitByMarkup AgdaFileType -> map mkHtml -- Any points for using this option? TexFileType -> map mkMd . chunksOf 2 . splitByMarkup OrgFileType -> map mkOrg . splitByMarkup else map mkHtml where trd (_, _, a) = a splitByMarkup :: [TokenInfo] -> [[TokenInfo]] splitByMarkup = splitWhen $ (== Just Markup) . aspect . trd mkHtml :: TokenInfo -> Html mkHtml (pos, s, mi) = -- Andreas, 2017-06-16, issue #2605: -- Do not create anchors for whitespace. applyUnless (mi == mempty) (annotate pos mi) $ toHtml s -- | Proposed in #3373, implemented in #3384 mkRst :: [TokenInfo] -> Html mkRst = mconcat . (toHtml rstDelimiter :) . map go where go token@(_, s, mi) = if aspect mi == Just Background then preEscapedToHtml s else mkHtml token -- | Proposed in #3137, implemented in #3313 -- Improvement proposed in #3366, implemented in #3367 mkMd :: [[TokenInfo]] -> Html mkMd = mconcat . go where work token@(_, s, mi) = case aspect mi of Just Background -> preEscapedToHtml s Just Markup -> __IMPOSSIBLE__ _ -> mkHtml token go [a, b] = [ mconcat $ work <$> a , pre ! class_ "Agda" $ mconcat $ work <$> b ] go [a] = work <$> a go _ = __IMPOSSIBLE__ mkOrg :: [TokenInfo] -> Html mkOrg = mconcat . map go where go token@(_, s, mi) = if aspect mi == Just Background then preEscapedToHtml s else mkHtml token -- | Put anchors that enable referencing that token. -- We put a fail safe numeric anchor (file position) for internal references -- (issue #2756), as well as a heuristic name anchor for external references -- (issue #2604). annotate :: Int -> Aspects -> Html -> Html annotate pos mi = applyWhen hereAnchor (anchorage nameAttributes mempty <>) . anchorage posAttributes where -- | Warp an anchor ( tag) with the given attributes around some HTML. anchorage :: [Attribute] -> Html -> Html anchorage attrs html = a html !! attrs -- | File position anchor (unique, reliable). posAttributes :: [Attribute] posAttributes = concat [ [Attr.id $ stringValue $ show pos ] , toList $ fmap link $ definitionSite mi , class_ (stringValue $ unwords classes) <$ guard (not $ null classes) ] -- | Named anchor (not reliable, but useful in the general case for outside refs). nameAttributes :: [Attribute] nameAttributes = [ Attr.id $ stringValue $ fromMaybe __IMPOSSIBLE__ $ mDefSiteAnchor ] classes = concat [ concatMap noteClasses (note mi) , otherAspectClasses (toList $ otherAspects mi) , concatMap aspectClasses (aspect mi) ] aspectClasses (Name mKind op) = kindClass ++ opClass where kindClass = toList $ fmap showKind mKind showKind (Constructor Inductive) = "InductiveConstructor" showKind (Constructor CoInductive) = "CoinductiveConstructor" showKind k = show k opClass = if op then ["Operator"] else [] aspectClasses a = [show a] otherAspectClasses = map show -- Notes are not included. noteClasses s = [] -- | Should we output a named anchor? -- Only if we are at the definition site now (@here@) -- and such a pretty named anchor exists (see 'defSiteAnchor'). hereAnchor :: Bool hereAnchor = here && isJust mDefSiteAnchor mDefinitionSite :: Maybe DefinitionSite mDefinitionSite = definitionSite mi -- | Are we at the definition site now? here :: Bool here = maybe False defSiteHere mDefinitionSite mDefSiteAnchor :: Maybe String mDefSiteAnchor = maybe __IMPOSSIBLE__ defSiteAnchor mDefinitionSite link (DefinitionSite m pos _here _aName) = href $ stringValue $ -- If the definition site points to the top of a file, -- we drop the anchor part and just link to the file. applyUnless (pos <= 1) (++ "#" ++ Network.URI.Encode.encode (show pos)) -- Network.URI.Encode.encode (fromMaybe (show pos) aName)) -- Named links disabled (Network.URI.Encode.encode $ modToFile m "html") Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Vim.hs0000644000000000000000000000551313466402171021250 0ustar0000000000000000-- {-# LANGUAGE CPP #-} module Agda.Interaction.Highlighting.Vim where import Control.Monad.Trans import Data.Function ( on ) import qualified Data.List as List import qualified Data.Map as Map import System.FilePath import Agda.Syntax.Scope.Base import Agda.Syntax.Common import Agda.Syntax.Concrete.Name as CName import Agda.TypeChecking.Monad import qualified Agda.Utils.IO.UTF8 as UTF8 import Agda.Utils.Tuple vimFile :: FilePath -> FilePath vimFile file = case splitFileName file of (path, name) -> path "" <.> name <.> "vim" escape :: String -> String escape = concatMap esc where escchars :: String escchars = "$\\^.*~[]" esc c | c `elem` escchars = ['\\',c] | otherwise = [c] wordBounded :: String -> String wordBounded s0 = concat ["\\<", s0, "\\>"] keyword :: String -> [String] -> String keyword _ [] = "" keyword cat ws = "syn keyword " ++ unwords (cat : ws) match :: String -> [String] -> String match _ [] = "" match cat ws = "syn match " ++ cat ++ " \"" ++ concat (List.intersperse "\\|" $ map (wordBounded . escape) ws) ++ "\"" matches :: [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] matches cons icons defs idefs flds iflds = map snd $ List.sortBy (compare `on` fst) $ cons' ++ defs' ++ icons' ++ idefs' where cons' = foo "agdaConstructor" $ classify length cons icons' = foo "agdaInfixConstructor" $ classify length icons defs' = foo "agdaFunction" $ classify length defs idefs' = foo "agdaInfixFunction" $ classify length idefs flds' = foo "agdaProjection" $ classify length flds iflds' = foo "agdaInfixProjection" $ classify length iflds classify f = List.groupBy ((==) `on` f) . List.sortBy (compare `on` f) foo :: String -> [[String]] -> [(Int, String)] foo cat = map (length . head /\ match cat) toVim :: NamesInScope -> String toVim ns = unlines $ matches mcons micons mdefs midefs mflds miflds where cons = [ x | (x, def:_) <- Map.toList ns, anameKind def == ConName ] defs = [ x | (x, def:_) <- Map.toList ns, anameKind def == DefName ] flds = [ x | (x, fld:_) <- Map.toList ns, anameKind fld == FldName ] mcons = map show cons mdefs = map show defs mflds = map show flds micons = concatMap parts cons midefs = concatMap parts defs miflds = concatMap parts flds parts (NoName _ _) = [] parts (Name _ _ [_]) = [] parts (Name _ _ ps) = [ rawNameToString x | Id x <- ps ] generateVimFile :: FilePath -> TCM () generateVimFile file = do scope <- getScope liftIO $ UTF8.writeFile (vimFile file) $ toVim $ names scope where names = nsNames . everythingInScope Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/LaTeX.hs0000644000000000000000000005464213466402171021501 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ViewPatterns #-} -- | Function for generating highlighted and aligned LaTeX from literate -- Agda source. module Agda.Interaction.Highlighting.LaTeX ( generateLaTeX ) where import Prelude hiding (log) import Data.Char import Data.Maybe import Data.Function import Data.Foldable (toList) import Control.Monad.RWS.Strict import Control.Arrow (second) import System.Directory import System.Exit import System.FilePath import System.Process import Data.Text (Text) import qualified Data.Text as T #ifdef COUNT_CLUSTERS import qualified Data.Text.ICU as ICU #endif import qualified Data.Text.IO as T import qualified Data.Text.Lazy as L import qualified Data.Text.Lazy.Encoding as E import qualified Data.ByteString.Lazy as BS import Data.HashSet (HashSet) import qualified Data.HashSet as Set import qualified Data.IntMap as IntMap import qualified Data.List as List import Paths_Agda import Agda.Syntax.Abstract (toTopLevelModuleName) import Agda.Syntax.Common import Agda.Syntax.Concrete (TopLevelModuleName, moduleNameParts, projectRoot) import Agda.Syntax.Parser.Literate (literateTeX, LayerRole, atomizeLayers) import qualified Agda.Syntax.Parser.Literate as L import Agda.Syntax.Position (startPos) import qualified Agda.Interaction.FindFile as Find import Agda.Interaction.Highlighting.Precise import Agda.TypeChecking.Monad (TCM, Interface(..)) import qualified Agda.TypeChecking.Monad as TCM import qualified Agda.Interaction.Options as O import Agda.Compiler.CallCompiler import qualified Agda.Utils.IO.UTF8 as UTF8 import Agda.Utils.FileName (filePath, AbsolutePath, mkAbsolute) #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- * Datatypes. -- | The @LaTeX@ monad is a combination of @ExceptT@, @RWST@ and -- @IO@. The error part is just used to keep track whether we finished -- or not, the reader part isn't used, the writer is where the output -- goes and the state is for keeping track of the tokens and some other -- useful info, and the I/O part is used for printing debugging info. type LaTeX = RWST () [Output] State IO -- | Output items. data Output = Text !Text -- ^ A piece of text. | MaybeColumn !AlignmentColumn -- ^ A column. If it turns out to be an indentation column that is -- not used to indent or align something, then no column will be -- generated, only whitespace ('agdaSpace'). deriving Show -- | Column kinds. data Kind = Indentation -- ^ Used only for indentation (the placement of the first token -- on a line, relative to tokens on previous lines). | Alignment -- ^ Used both for indentation and for alignment. deriving (Eq, Show) -- | Unique identifiers for indentation columns. type IndentationColumnId = Int -- | Alignment and indentation columns. data AlignmentColumn = AlignmentColumn { columnCodeBlock :: !Int -- ^ The column's code block. , columnColumn :: !Int -- ^ The column number. , columnKind :: Maybe IndentationColumnId -- ^ The column kind. 'Nothing' for alignment columns and @'Just' -- i@ for indentation columns, where @i@ is the column's unique -- identifier. } deriving Show data State = State { codeBlock :: !Int -- ^ The number of the current code block. , column :: !Int -- ^ The current column number. , columns :: [AlignmentColumn] -- ^ All alignment columns found on the -- current line (so far), in reverse -- order. , columnsPrev :: [AlignmentColumn] -- ^ All alignment columns found in -- previous lines (in any code block), -- with larger columns coming first. , nextId :: !IndentationColumnId -- ^ The next indentation column -- identifier. , usedColumns :: HashSet IndentationColumnId -- ^ Indentation columns that have -- actually -- been used. , countClusters :: !Bool -- ^ Count extended grapheme clusters? } type Tokens = [Token] data Token = Token { text :: !Text , info :: Aspects } deriving Show withTokenText :: (Text -> Text) -> Token -> Token withTokenText f tok@Token{text = t} = tok{text = f t} data Debug = MoveColumn | NonCode | Code | Spaces | Output deriving (Eq, Show) -- | Says what debug information should printed. debugs :: [Debug] debugs = [] -- | Run function for the @LaTeX@ monad. runLaTeX :: LaTeX a -> () -> State -> IO (a, State, [Output]) runLaTeX = runRWST emptyState :: Bool -- ^ Count extended grapheme clusters? -> State emptyState cc = State { codeBlock = 0 , column = 0 , columns = [] , columnsPrev = [] , nextId = 0 , usedColumns = Set.empty , countClusters = cc } ------------------------------------------------------------------------ -- * Some helpers. -- | Gives the size of the string. If cluster counting is enabled, -- then the number of extended grapheme clusters is computed (the root -- locale is used), and otherwise the number of code points. size :: Text -> LaTeX Int size t = do cc <- countClusters <$> get if cc then #ifdef COUNT_CLUSTERS return $ length $ ICU.breaks (ICU.breakCharacter ICU.Root) t #else __IMPOSSIBLE__ #endif else return $ T.length t (<+>) :: Text -> Text -> Text (<+>) = T.append -- | Does the string consist solely of whitespace? isSpaces :: Text -> Bool isSpaces = T.all isSpace -- | Is the character a whitespace character distinct from '\n'? isSpaceNotNewline :: Char -> Bool isSpaceNotNewline c = isSpace c && c /= '\n' -- | Replaces all forms of whitespace, except for new-line characters, -- with spaces. replaceSpaces :: Text -> Text replaceSpaces = T.map (\c -> if isSpaceNotNewline c then ' ' else c) -- | If the `Token` consists of spaces, the internal column counter is advanced -- by the length of the token. Otherwise, `moveColumnForToken` is a no-op. moveColumnForToken :: Token -> LaTeX () moveColumnForToken t = do unless (isSpaces (text t)) $ do log MoveColumn $ text t moveColumn =<< size (text t) -- | Merges 'columns' into 'columnsPrev', resets 'column' and -- 'columns' resetColumn :: LaTeX () resetColumn = modify $ \s -> s { column = 0 , columnsPrev = merge (columns s) (columnsPrev s) , columns = [] } where -- Remove shadowed columns from old. merge [] old = old merge new old = new ++ filter ((< leastNew) . columnColumn) old where leastNew = columnColumn (last new) moveColumn :: Int -> LaTeX () moveColumn i = modify $ \s -> s { column = i + column s } -- | Registers a column of the given kind. The column is returned. registerColumn :: Kind -> LaTeX AlignmentColumn registerColumn kind = do column <- gets column codeBlock <- gets codeBlock kind <- case kind of Alignment -> return Nothing Indentation -> do nextId <- gets nextId modify $ \s -> s { nextId = succ nextId } return (Just nextId) let c = AlignmentColumn { columnColumn = column , columnCodeBlock = codeBlock , columnKind = kind } modify $ \s -> s { columns = c : columns s } return c -- | Registers the given column as used (if it is an indentation -- column). useColumn :: AlignmentColumn -> LaTeX () useColumn c = case columnKind c of Nothing -> return () Just i -> modify $ \s -> s { usedColumns = Set.insert i (usedColumns s) } -- | Alignment column zero in the current code block. columnZero :: LaTeX AlignmentColumn columnZero = do codeBlock <- gets codeBlock return $ AlignmentColumn { columnColumn = 0 , columnCodeBlock = codeBlock , columnKind = Nothing } -- | Registers column zero as an alignment column. registerColumnZero :: LaTeX () registerColumnZero = do c <- columnZero modify $ \s -> s { columns = [c] } -- | Changes to the state that are performed at the start of a code -- block. enterCode :: LaTeX () enterCode = do resetColumn modify $ \s -> s { codeBlock = codeBlock s + 1 } -- | Changes to the state that are performed at the end of a code -- block. leaveCode :: LaTeX () leaveCode = return () logHelper :: Debug -> Text -> [String] -> LaTeX () logHelper debug text extra = when (debug `elem` debugs) $ do lift $ T.putStrLn $ T.pack (show debug ++ ": ") <+> "'" <+> text <+> "' " <+> if null extra then T.empty else "(" <+> T.pack (unwords extra) <+> ")" log :: Debug -> Text -> LaTeX () log MoveColumn text = do cols <- gets columns logHelper MoveColumn text ["columns=", show cols] log Code text = do cols <- gets columns col <- gets column logHelper Code text ["columns=", show cols, "col=", show col] log debug text = logHelper debug text [] log' :: Debug -> String -> LaTeX () log' d = log d . T.pack output :: Output -> LaTeX () output item = do log' Output (show item) tell [item] ------------------------------------------------------------------------ -- * LaTeX and polytable strings. -- Polytable, http://www.ctan.org/pkg/polytable, is used for code -- alignment, similar to lhs2TeX's approach. nl, beginCode, endCode :: Text nl = "%\n" beginCode = "\\begin{code}" endCode = "\\end{code}" -- | A command that is used when two tokens are put next to each other -- in the same column. agdaSpace :: Text agdaSpace = cmdPrefix <+> "Space" <+> cmdArg T.empty <+> nl -- | The column's name. -- -- Indentation columns have unique names, distinct from all alignment -- column names. columnName :: AlignmentColumn -> Text columnName c = T.pack $ case columnKind c of Nothing -> show (columnColumn c) Just i -> show i ++ "I" -- | Opens a column with the given name. ptOpen' :: Text -> Text ptOpen' name = "\\>[" <+> name <+> "]" -- | Opens the given column. ptOpen :: AlignmentColumn -> Text ptOpen c = ptOpen' (columnName c) -- | Opens a special column that is only used at the beginning of -- lines. ptOpenBeginningOfLine :: Text ptOpenBeginningOfLine = ptOpen' "." <+> "[@{}l@{}]" -- | Opens the given column, and inserts an indentation instruction -- with the given argument at the end of it. ptOpenIndent :: AlignmentColumn -> Int -- ^ Indentation instruction argument. -> Text ptOpenIndent c delta = ptOpen c <+> "[@{}l@{" <+> cmdPrefix <+> "Indent" <+> cmdArg (T.pack $ show delta) <+> "}]" ptClose :: Text ptClose = "\\<" ptClose' :: AlignmentColumn -> Text ptClose' c = ptClose <+> "[" <+> columnName c <+> "]" ptNL :: Text ptNL = nl <+> "\\\\\n" ptEmptyLine :: Text ptEmptyLine = nl <+> "\\\\[" <+> cmdPrefix <+> "EmptyExtraSkip" <+> "]%\n" cmdPrefix :: Text cmdPrefix = "\\Agda" cmdArg :: Text -> Text cmdArg x = "{" <+> x <+> "}" ------------------------------------------------------------------------ -- * Output generation from a stream of labelled tokens. processLayers :: [(LayerRole, Tokens)] -> LaTeX () processLayers = mapM_ $ \(layerRole,toks) -> do case layerRole of L.Markup -> processMarkup toks L.Comment -> processComment toks L.Code -> processCode toks processMarkup, processComment, processCode :: Tokens -> LaTeX () -- | Deals with markup, which is output verbatim. processMarkup = mapM_ $ \t -> do moveColumnForToken t output (Text (text t)) -- | Deals with literate text, which is output verbatim processComment = mapM_ $ \t -> do unless ("%" == T.take 1 (T.stripStart (text t))) $ do moveColumnForToken t output (Text (text t)) -- | Deals with code blocks. Every token, except spaces, is pretty -- printed as a LaTeX command. processCode toks' = do output $ Text nl enterCode mapM_ go toks' ptOpenWhenColumnZero =<< gets column output $ Text $ ptClose <+> nl leaveCode where go tok' = do -- Get the column information before grabbing the token, since -- grabbing (possibly) moves the column. col <- gets column moveColumnForToken tok' let tok = text tok' log Code tok if (tok == T.empty) then return () else do if (isSpaces tok) then do spaces $ T.group $ replaceSpaces tok else do ptOpenWhenColumnZero col output $ Text $ -- we return the escaped token wrapped in commands corresponding -- to its aspect (if any) and other aspects (e.g. error, unsolved meta) foldr (\c t -> cmdPrefix <+> T.pack c <+> cmdArg t) (escape tok) $ map fromOtherAspect (toList $ otherAspects $ info tok') ++ concatMap fromAspect (toList $ aspect $ info tok') -- Non-whitespace tokens at the start of a line trigger an -- alignment column. ptOpenWhenColumnZero col = when (col == 0) $ do registerColumnZero output . Text . ptOpen =<< columnZero -- Translation from OtherAspect to command strings. So far it happens -- to correspond to @show@ but it does not have to (cf. fromAspect) fromOtherAspect :: OtherAspect -> String fromOtherAspect = show fromAspect :: Aspect -> [String] fromAspect a = let s = [show a] in case a of Comment -> s Keyword -> s String -> s Number -> s Symbol -> s PrimitiveType -> s Pragma -> s Background -> s Markup -> s Name Nothing isOp -> fromAspect (Name (Just Postulate) isOp) -- At the time of writing the case above can be encountered in -- --only-scope-checking mode, for instance for the token "Size" -- in the following code: -- -- {-# BUILTIN SIZE Size #-} -- -- The choice of "Postulate" works for this example, but might -- be less appropriate for others. Name (Just kind) isOp -> (\c -> if isOp then ["Operator", c] else [c]) $ case kind of Bound -> s Generalizable -> s Constructor Inductive -> "InductiveConstructor" Constructor CoInductive -> "CoinductiveConstructor" Datatype -> s Field -> s Function -> s Module -> s Postulate -> s Primitive -> s Record -> s Argument -> s Macro -> s where s = show kind -- | Escapes special characters. escape :: Text -> Text escape (T.uncons -> Nothing) = T.empty escape (T.uncons -> Just (c, s)) = T.pack (replace c) <+> escape s where replace :: Char -> String replace c = case c of '_' -> "\\AgdaUnderscore{}" '{' -> "\\{" '}' -> "\\}" '#' -> "\\#" '$' -> "\\$" '&' -> "\\&" '%' -> "\\%" '~' -> "\\textasciitilde{}" '^' -> "\\textasciicircum{}" '\\' -> "\\textbackslash{}" _ -> [ c ] escape _ = __IMPOSSIBLE__ -- | Every element in the list should consist of either one or more -- newline characters, or one or more space characters. Two adjacent -- list elements must not contain the same character. -- -- If the final element of the list consists of spaces, then these -- spaces are assumed to not be trailing whitespace. spaces :: [Text] -> LaTeX () spaces [] = return () -- Newlines. spaces (s@(T.uncons -> Just ('\n', _)) : ss) = do col <- gets column when (col == 0) $ output . Text . ptOpen =<< columnZero output $ Text $ ptClose <+> ptNL <+> T.replicate (T.length s - 1) ptEmptyLine resetColumn spaces ss -- Spaces followed by a newline character. spaces (_ : ss@(_ : _)) = spaces ss -- Spaces that are not followed by a newline character. spaces [ s ] = do col <- gets column let len = T.length s kind = if col /= 0 && len == 1 then Indentation else Alignment moveColumn len column <- registerColumn kind if col /= 0 then log' Spaces "col /= 0" else do columns <- gets columnsPrev codeBlock <- gets codeBlock log' Spaces $ "col == 0: " ++ show (len, columns) case filter ((<= len) . columnColumn) columns of c : _ | columnColumn c == len, isJust (columnKind c) -> do -- Align. (This happens automatically if the column is an -- alignment column, but c is an indentation column.) useColumn c output $ Text $ ptOpenBeginningOfLine output $ Text $ ptClose' c c : _ | columnColumn c < len -> do -- Indent. useColumn c output $ Text $ ptOpenIndent c (codeBlock - columnCodeBlock c) _ -> return () output $ MaybeColumn column -- | Split multi-lines string literals into multiple string literals -- Isolating leading spaces for the alignment machinery to work -- properly stringLiteral :: Token -> Tokens stringLiteral t | aspect (info t) == Just String = map (\ x -> t { text = x }) $ concatMap leadingSpaces $ List.intersperse "\n" $ T.lines (text t) where leadingSpaces :: Text -> [Text] leadingSpaces t = [pre, suf] where (pre , suf) = T.span isSpaceNotNewline t stringLiteral t = [t] ------------------------------------------------------------------------ -- * Main. defaultStyFile :: String defaultStyFile = "agda.sty" -- | Generates a LaTeX file for the given interface. -- -- The underlying source file is assumed to match the interface, but -- this is not checked. TODO: Fix this problem, perhaps by storing the -- source code in the interface. generateLaTeX :: Interface -> TCM () generateLaTeX i = do let mod = toTopLevelModuleName $ iModuleName i hi = iHighlighting i options <- TCM.commandLineOptions dir <- case O.optGHCiInteraction options of False -> return $ O.optLaTeXDir options True -> do sourceFile <- Find.findFile mod return $ filePath (projectRoot sourceFile mod) O.optLaTeXDir options liftIO $ createDirectoryIfMissing True dir (code, _, _) <- liftIO $ readProcessWithExitCode "kpsewhich" [ "--path=" ++ dir, defaultStyFile ] "" when (code /= ExitSuccess) $ do TCM.reportSLn "compile.latex" 1 $ unlines [ defaultStyFile ++ " was not found. Copying a default version of " ++ defaultStyFile , "into " ++ dir ++ "." ] liftIO $ do styFile <- getDataFileName defaultStyFile liftIO $ copyFile styFile (dir defaultStyFile) let outPath = modToFile mod inAbsPath <- liftM filePath (Find.findFile mod) liftIO $ do latex <- E.encodeUtf8 `fmap` toLaTeX (O.optCountClusters $ O.optPragmaOptions options) (mkAbsolute inAbsPath) (iSource i) hi createDirectoryIfMissing True $ dir takeDirectory outPath BS.writeFile (dir outPath) latex where modToFile :: TopLevelModuleName -> FilePath modToFile m = List.intercalate [pathSeparator] (moduleNameParts m) <.> "tex" groupByFst :: forall a b. Eq a => [(a,b)] -> [(a,[b])] groupByFst = map (\xs -> case xs of -- Float the grouping to the top level [] -> __IMPOSSIBLE__ (tag, _): _ -> (tag, map snd xs)) . List.groupBy ((==) `on` fst) -- Group together characters in the same -- role. -- | Transforms the source code into LaTeX. toLaTeX :: Bool -- ^ Count extended grapheme clusters? -> AbsolutePath -> L.Text -> HighlightingInfo -> IO L.Text toLaTeX cc path source hi = processTokens cc . map (\(role, tokens) -> (role,) $ -- This bit fixes issue 954 (if L.isCode role then -- Remove trailing whitespace from the -- final line; the function spaces -- expects trailing whitespace to be -- followed by a newline character. whenMoreThanOne (withLast $ withTokenText $ \suf -> fromMaybe suf $ fmap (T.dropWhileEnd isSpaceNotNewline) $ T.stripSuffix "\n" suf) . (withLast $ withTokenText $ T.dropWhileEnd isSpaceNotNewline) . (withFirst $ withTokenText $ \pre -> fromMaybe pre $ T.stripPrefix "\n" $ T.dropWhile isSpaceNotNewline pre) else -- do nothing id) tokens) . map (second ( -- Split tokens at newlines concatMap stringLiteral -- Head the list (the grouped chars contain the same meta info) and -- collect the characters into a string. . map (\(mi, cs) -> Token { text = T.pack cs , info = fromMaybe mempty mi }) -- Characters which share the same meta info are the same token, so -- group them together. . groupByFst )) -- Characters in different layers belong to different tokens . groupByFst -- Look up the meta info at each position in the highlighting info. . map (\(pos, (role, char)) -> (role, (IntMap.lookup pos infoMap, char))) -- Add position in file to each character. . zip [1..] -- Map each character to its role . atomizeLayers . literateTeX (startPos (Just path)) $ L.unpack source where infoMap = toMap (decompress hi) -- | This function preserves laziness of the list withLast :: (a -> a) -> [a] -> [a] withLast f [] = [] withLast f [a] = [f a] withLast f (a:as) = a:withLast f as -- | This function preserves laziness of the list withFirst :: (a -> a) -> [a] -> [a] withFirst _ [] = [] withFirst f (a:as) = f a:as whenMoreThanOne :: ([a] -> [a]) -> [a] -> [a] whenMoreThanOne f xs@(_:_:_) = f xs whenMoreThanOne _ xs = xs processTokens :: Bool -- ^ Count extended grapheme clusters? -> [(LayerRole, Tokens)] -> IO L.Text processTokens cc ts = do ((), s, os) <- runLaTeX (processLayers ts) () (emptyState cc) return $ L.fromChunks $ map (render s) os where render _ (Text s) = s render s (MaybeColumn c) | Just i <- columnKind c, not (Set.member i (usedColumns s)) = agdaSpace | otherwise = nl <+> ptOpen c Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Emacs.hs0000644000000000000000000000566313466402171021553 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Functions which give precise syntax highlighting info to Emacs. module Agda.Interaction.Highlighting.Emacs ( lispifyHighlightingInfo , lispifyTokenBased ) where import Agda.Interaction.Highlighting.Common import Agda.Interaction.Highlighting.Precise import Agda.Interaction.Highlighting.Range (Range(..)) import Agda.Interaction.EmacsCommand import Agda.Interaction.Response import Agda.TypeChecking.Monad (HighlightingMethod(..), ModuleToSource) import Agda.Utils.FileName (filePath) import Agda.Utils.IO.TempFile (writeToTempFile) import Agda.Utils.String (quote) import qualified Data.List as List import qualified Data.Map as Map import Data.Maybe #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- Read/show functions -- | Shows meta information in such a way that it can easily be read -- by Emacs. showAspects :: ModuleToSource -- ^ Must contain a mapping for the definition site's module, if any. -> (Range, Aspects) -> Lisp String showAspects modFile (r, m) = L $ (map (A . show) [from r, to r]) ++ [L $ map A $ toAtoms m] ++ dropNils ( [lispifyTokenBased (tokenBased m)] ++ [A $ maybe "nil" quote $ note m] ++ (maybeToList $ fmap defSite $ definitionSite m)) where defSite (DefinitionSite m p _ _) = Cons (A $ quote $ filePath f) (A $ show p) where f = Map.findWithDefault __IMPOSSIBLE__ m modFile dropNils = List.dropWhileEnd (== A "nil") -- | Formats the 'TokenBased' tag for the Emacs backend. No quotes are -- added. lispifyTokenBased :: TokenBased -> Lisp String lispifyTokenBased TokenBased = A "t" lispifyTokenBased NotOnlyTokenBased = A "nil" -- | Turns syntax highlighting information into a list of -- S-expressions. -- TODO: The "go-to-definition" targets can contain long strings -- (absolute paths to files). At least one of these strings (the path -- to the current module) can occur many times. Perhaps it would be a -- good idea to use a more compact format. lispifyHighlightingInfo :: HighlightingInfo -> RemoveTokenBasedHighlighting -> HighlightingMethod -> ModuleToSource -- ^ Must contain a mapping for every definition site's module. -> IO (Lisp String) lispifyHighlightingInfo h remove method modFile = case chooseHighlightingMethod h method of Direct -> direct Indirect -> indirect where info :: [Lisp String] info = (case remove of RemoveHighlighting -> A "remove" KeepHighlighting -> A "nil") : map (showAspects modFile) (ranges h) direct :: IO (Lisp String) direct = return $ L (A "agda2-highlight-add-annotations" : map Q info) indirect :: IO (Lisp String) indirect = do filepath <- writeToTempFile (show $ L info) return $ L [ A "agda2-highlight-load-and-delete-action" , A (quote filepath) ] Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Common.hs0000644000000000000000000000305513466402171021744 0ustar0000000000000000-- | Common syntax highlighting functions for Emacs and JSON module Agda.Interaction.Highlighting.Common ( toAtoms , chooseHighlightingMethod ) where import Agda.Interaction.Options import Agda.Interaction.Highlighting.Precise import Agda.Syntax.Common import Agda.TypeChecking.Monad (HighlightingMethod(..)) import Data.Maybe (maybeToList) import Data.Char (toLower) import qualified Data.Set as Set -- | Converts the 'aspect' and 'otherAspects' fields to strings that are -- friendly to editors. toAtoms :: Aspects -> [String] toAtoms m = map toAtom (Set.toList $ otherAspects m) ++ toAtoms' (aspect m) where toAtom :: Show a => a -> String toAtom = map toLower . show kindToAtom (Constructor Inductive) = "inductiveconstructor" kindToAtom (Constructor CoInductive) = "coinductiveconstructor" kindToAtom k = toAtom k toAtoms' Nothing = [] toAtoms' (Just (Name mKind op)) = map kindToAtom (maybeToList mKind) ++ opAtom where opAtom | op = ["operator"] | otherwise = [] toAtoms' (Just a) = [toAtom a] -- | Choose which method to use based on HighlightingInfo and HighlightingMethod chooseHighlightingMethod :: HighlightingInfo -> HighlightingMethod -> HighlightingMethod chooseHighlightingMethod info method = case ranges info of _ | method == Direct -> Direct ((_, mi) : _) | check mi -> Direct _ -> Indirect where check mi = otherAspects mi == Set.singleton TypeChecks || mi == mempty Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Generate.hs0000644000000000000000000011356313466402171022254 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Generates data used for precise syntax highlighting. module Agda.Interaction.Highlighting.Generate ( Level(..) , generateAndPrintSyntaxInfo , generateTokenInfo, generateTokenInfoFromSource , generateTokenInfoFromString , printSyntaxInfo , printErrorInfo, errorHighlighting , printUnsolvedInfo , printHighlightingInfo , highlightAsTypeChecked , warningHighlighting , computeUnsolvedMetaWarnings , computeUnsolvedConstraints , storeDisambiguatedName, disambiguateRecordFields ) where import Prelude hiding (null) import Control.Monad import Control.Monad.Trans import Control.Monad.Reader import Control.Arrow (second) import Data.Monoid import Data.Generics.Geniplate import qualified Data.Map as Map import Data.Maybe import Data.List ((\\), isPrefixOf) import qualified Data.List as List import qualified Data.Foldable as Fold (fold, foldMap, toList) import qualified Data.IntMap as IntMap import Data.Sequence (Seq) import qualified Data.Set as Set import qualified Data.Text.Lazy as T import Data.Void import Agda.Interaction.Response (Response(Resp_HighlightingInfo)) import Agda.Interaction.Highlighting.Precise import Agda.Interaction.Highlighting.Range import Agda.Interaction.Response (RemoveTokenBasedHighlighting(KeepHighlighting)) import qualified Agda.TypeChecking.Errors as E import Agda.TypeChecking.MetaVars (isBlockedTerm) import Agda.TypeChecking.Monad hiding (MetaInfo, Primitive, Constructor, Record, Function, Datatype) import qualified Agda.TypeChecking.Monad as M import Agda.TypeChecking.Positivity.Occurrence import Agda.TypeChecking.Warnings (runPM) import Agda.Syntax.Abstract (IsProjP(..)) import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Concrete (FieldAssignment'(..)) import Agda.Syntax.Concrete.Definitions ( DeclarationWarning(..) ) import qualified Agda.Syntax.Common as Common import qualified Agda.Syntax.Concrete.Name as C import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Fixity import Agda.Syntax.Notation import qualified Agda.Syntax.Info as SI import qualified Agda.Syntax.Internal as I import qualified Agda.Syntax.Literal as L import qualified Agda.Syntax.Parser as Pa import qualified Agda.Syntax.Parser.Tokens as T import qualified Agda.Syntax.Position as P import Agda.Syntax.Position (getRange) import Agda.Utils.FileName import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.HashMap (HashMap) import qualified Agda.Utils.HashMap as HMap #include "undefined.h" import Agda.Utils.Impossible -- | @highlightAsTypeChecked rPre r m@ runs @m@ and returns its -- result. Additionally, some code may be highlighted: -- -- * If @r@ is non-empty and not a sub-range of @rPre@ (after -- 'P.continuousPerLine' has been applied to both): @r@ is -- highlighted as being type-checked while @m@ is running (this -- highlighting is removed if @m@ completes /successfully/). -- -- * Otherwise: Highlighting is removed for @rPre - r@ before @m@ -- runs, and if @m@ completes successfully, then @rPre - r@ is -- highlighted as being type-checked. highlightAsTypeChecked :: MonadTCM tcm => P.Range -> P.Range -> tcm a -> tcm a highlightAsTypeChecked rPre r m | r /= P.noRange && delta == rPre' = wrap r' highlight clear | otherwise = wrap delta clear highlight where rPre' = rToR (P.continuousPerLine rPre) r' = rToR (P.continuousPerLine r) delta = rPre' `minus` r' clear = mempty highlight = parserBased { otherAspects = Set.singleton TypeChecks } wrap rs x y = do p rs x v <- m p rs y return v where p rs x = printHighlightingInfo KeepHighlighting (singletonC rs x) -- | Lispify and print the given highlighting information. printHighlightingInfo :: MonadTCM tcm => RemoveTokenBasedHighlighting -> HighlightingInfo -> tcm () printHighlightingInfo remove info = do modToSrc <- useTC stModuleToSource method <- viewTC eHighlightingMethod liftTCM $ reportSLn "highlighting" 50 $ unlines [ "Printing highlighting info:" , show info , " modToSrc = " ++ show modToSrc ] unless (null $ ranges info) $ do liftTCM $ appInteractionOutputCallback $ Resp_HighlightingInfo info remove method modToSrc -- | Highlighting levels. data Level = Full -- ^ Full highlighting. Should only be used after typechecking has -- completed successfully. | Partial -- ^ Highlighting without disambiguation of overloaded -- constructors. -- | Generate syntax highlighting information for the given -- declaration, and (if appropriate) print it. If the boolean is -- 'True', then the state is additionally updated with the new -- highlighting info (in case of a conflict new info takes precedence -- over old info). -- -- The procedure makes use of some of the token highlighting info in -- 'stTokens' (that corresponding to the interval covered by the -- declaration). If the boolean is 'True', then this token -- highlighting info is additionally removed from 'stTokens'. generateAndPrintSyntaxInfo :: A.Declaration -> Level -> Bool -- ^ Update the state? -> TCM () generateAndPrintSyntaxInfo decl _ _ | null $ P.getRange decl = return () generateAndPrintSyntaxInfo decl hlLevel updateState = do file <- getCurrentPath reportSLn "import.iface.create" 15 $ "Generating syntax info for " ++ filePath file ++ ' ' : case hlLevel of Full {} -> "(final)" Partial {} -> "(first approximation)" ++ "." reportSLn "highlighting.names" 60 $ "highlighting names = " ++ prettyShow names M.ignoreAbstractMode $ do modMap <- sourceToModule kinds <- nameKinds hlLevel decl let nameInfo = mconcat $ map (generate modMap file kinds) names -- Constructors are only highlighted after type checking, since they -- can be overloaded. constructorInfo <- case hlLevel of Full{} -> generateConstructorInfo modMap file kinds decl _ -> return mempty cm <- P.rangeFile <$> viewTC eRange reportSLn "highlighting.warning" 60 $ "current path = " ++ show cm warnInfo <- Fold.foldMap warningHighlighting . filter ((cm ==) . tcWarningOrigin) <$> useTC stTCWarnings let (from, to) = case P.rangeToInterval (P.getRange decl) of Nothing -> __IMPOSSIBLE__ Just i -> ( fromIntegral $ P.posPos $ P.iStart i , fromIntegral $ P.posPos $ P.iEnd i) (prevTokens, (curTokens, postTokens)) <- second (splitAtC to) . splitAtC from <$> useTC stTokens -- theRest needs to be placed before nameInfo here since record -- field declarations contain QNames. constructorInfo also needs -- to be placed before nameInfo since, when typechecking is done, -- constructors are included in both lists. Finally the token -- information is placed last since token highlighting is more -- crude than the others. let syntaxInfo = compress (mconcat [ constructorInfo , theRest modMap file , nameInfo , warnInfo ]) `mappend` curTokens when updateState $ do stSyntaxInfo `modifyTCLens` mappend syntaxInfo stTokens `setTCLens` (prevTokens `mappend` postTokens) ifTopLevelAndHighlightingLevelIs NonInteractive $ printHighlightingInfo KeepHighlighting syntaxInfo where -- All names mentioned in the syntax tree (not bound variables). names :: [A.AmbiguousQName] names = (map I.unambiguous $ filter (not . isExtendedLambdaName) $ universeBi decl) ++ universeBi decl -- Bound variables, dotted patterns, record fields, module names, -- the "as" and "to" symbols. theRest modMap file = mconcat [ Fold.foldMap getFieldDecl $ universeBi decl , Fold.foldMap getVarAndField $ universeBi decl , Fold.foldMap getLet $ universeBi decl , Fold.foldMap getLam $ universeBi decl , Fold.foldMap getTyped $ universeBi decl , Fold.foldMap getPattern $ universeBi decl , Fold.foldMap getPatternSyn $ universeBi decl , Fold.foldMap getExpr $ universeBi decl , Fold.foldMap getPatSynArgs $ universeBi decl , Fold.foldMap getModuleName $ universeBi decl , Fold.foldMap getModuleInfo $ universeBi decl , Fold.foldMap getNamedArgE $ universeBi decl , Fold.foldMap getNamedArgP $ universeBi decl , Fold.foldMap getNamedArgB $ universeBi decl , Fold.foldMap getNamedArgL $ universeBi decl ] where bound (A.BindName n) = nameToFile modMap file [] (A.nameConcrete n) P.noRange (\isOp -> parserBased { aspect = Just $ Name (Just Bound) isOp }) (Just $ A.nameBindingSite n) patsyn n = -- TODO: resolve overloading nameToFileA modMap file (I.headAmbQ n) True $ \isOp -> parserBased { aspect = Just $ Name (Just $ Constructor Common.Inductive) isOp } macro n = nameToFileA modMap file n True $ \isOp -> parserBased { aspect = Just $ Name (Just Macro) isOp } field :: [C.Name] -> C.Name -> File field m n = nameToFile modMap file m n P.noRange (\isOp -> parserBased { aspect = Just $ Name (Just Field) isOp }) Nothing asName n = nameToFile modMap file [] n P.noRange (\isOp -> parserBased { aspect = Just $ Name (Just Module) isOp }) Nothing -- For top level modules, we set the binding site to the beginning of the file -- so that clicking on an imported module will jump to the beginning of the file -- which defines this module. mod isTopLevelModule n = nameToFile modMap file [] (A.nameConcrete n) P.noRange (\isOp -> parserBased { aspect = Just $ Name (Just Module) isOp }) (Just $ applyWhen isTopLevelModule P.beginningOfFile $ A.nameBindingSite n) getVarAndField :: A.Expr -> File getVarAndField (A.Var x) = bound $ A.BindName x -- Andreas, 2018-06-09, issue #3120 -- The highlighting for record field tags is now created by the type checker in -- function disambiguateRecordFields. -- Andreas, Nisse, 2018-10-26, issue #3322 -- Still, we extract the highlighting info here for uses such as QuickLatex. -- The aspects from the disambiguation will be merged in. getVarAndField (A.Rec _ fs) = mconcat [ field [] x | Left (FieldAssignment x _) <- fs ] getVarAndField (A.RecUpdate _ _ fs) = mconcat [ field [] x | (FieldAssignment x _) <- fs ] getVarAndField _ = mempty -- Ulf, 2019-01-30: It would be nicer to not have to specialize it, but -- you can't have polymorphic functions in universeBi. getNamedArgE :: Common.NamedArg A.Expr -> File getNamedArgE = getNamedArg getNamedArgP :: Common.NamedArg A.Pattern -> File getNamedArgP = getNamedArg getNamedArgB :: Common.NamedArg A.BindName -> File getNamedArgB = getNamedArg getNamedArgL :: Common.NamedArg A.LHSCore -> File getNamedArgL = getNamedArg getNamedArg :: Common.NamedArg a -> File getNamedArg x = caseMaybe (Common.nameOf $ Common.unArg x) mempty $ \ s -> singleton (rToR $ P.getRange s) $ parserBased { aspect = Just $ Name (Just Argument) False } getLet :: A.LetBinding -> File getLet (A.LetBind _ _ x _ _) = bound x getLet A.LetPatBind{} = mempty getLet A.LetApply{} = mempty getLet A.LetOpen{} = mempty getLet (A.LetDeclaredVariable x) = bound x getLam :: A.LamBinding -> File getLam (A.DomainFree x) = bound $ Common.namedArg x getLam (A.DomainFull {}) = mempty getTyped :: A.TypedBinding -> File getTyped (A.TBind _ xs _) = mconcat $ map (bound . Common.namedArg) xs getTyped A.TLet{} = mempty getPatSynArgs :: A.Declaration -> File getPatSynArgs (A.PatternSynDef _ xs _) = mconcat $ map (bound . A.BindName . Common.unArg) xs getPatSynArgs _ = mempty getPattern' :: IsProjP e => A.Pattern' e -> File getPattern' (A.VarP x) = bound x getPattern' (A.AsP _ x _) = bound x getPattern' (A.DotP pi e) | Just _ <- isProjP e = mempty | otherwise = singleton (rToR $ P.getRange pi) (parserBased { otherAspects = Set.singleton DottedPattern }) getPattern' (A.PatternSynP _ q _) = patsyn q -- Andreas, 2018-06-09, issue #3120 -- The highlighting for record field tags is now created by the type checker in -- function disambiguateRecordFields. -- Andreas, Nisse, 2018-10-26, issue #3322 -- Still, we extract the highlighting info here for uses such as QuickLatex. -- The aspects from the disambiguation will be merged in. getPattern' (A.RecP _ fs) = mconcat [ field [] x | FieldAssignment x _ <- fs ] getPattern' _ = mempty getPattern :: A.Pattern -> File getPattern = getPattern' getPatternSyn :: A.Pattern' Void -> File getPatternSyn = getPattern' getExpr :: A.Expr -> File getExpr (A.PatternSyn q) = patsyn q getExpr (A.Macro q) = macro q getExpr _ = mempty getFieldDecl :: A.Declaration -> File getFieldDecl (A.RecDef _ _ _ _ _ _ _ _ fs) = Fold.foldMap extractField fs where extractField (A.ScopedDecl _ ds) = Fold.foldMap extractField ds extractField (A.Field _ x _) = field (concreteQualifier x) (concreteBase x) extractField _ = mempty getFieldDecl _ = mempty getModuleName :: A.ModuleName -> File getModuleName m@(A.MName { A.mnameToList = xs }) = mconcat $ map (mod isTopLevelModule) xs where isTopLevelModule = case mapMaybe (join . fmap (Strict.toLazy . P.srcFile) . P.rStart . A.nameBindingSite) xs of f : _ -> Map.lookup f modMap == Just (C.toTopLevelModuleName $ A.mnameToConcrete m) [] -> False getModuleInfo :: SI.ModuleInfo -> File getModuleInfo (SI.ModuleInfo { SI.minfoAsTo = asTo , SI.minfoAsName = name }) = singleton (rToR asTo) (parserBased { aspect = Just Symbol }) `mappend` maybe mempty asName name -- | Generate and return the syntax highlighting information for the -- tokens in the given file. generateTokenInfo :: AbsolutePath -> TCM CompressedFile generateTokenInfo file = generateTokenInfoFromSource file . T.unpack =<< runPM (Pa.readFilePM file) -- | Generate and return the syntax highlighting information for the -- tokens in the given file. generateTokenInfoFromSource :: AbsolutePath -- ^ The module to highlight. -> String -- ^ The file contents. Note that the file is /not/ read from -- disk. -> TCM CompressedFile generateTokenInfoFromSource file input = runPM $ tokenHighlighting <$> fst <$> Pa.parseFile Pa.tokensParser file input -- | Generate and return the syntax highlighting information for the -- tokens in the given string, which is assumed to correspond to the -- given range. generateTokenInfoFromString :: P.Range -> String -> TCM CompressedFile generateTokenInfoFromString r _ | r == P.noRange = return mempty generateTokenInfoFromString r s = do runPM $ tokenHighlighting <$> Pa.parsePosString Pa.tokensParser p s where Just p = P.rStart r -- | Compute syntax highlighting for the given tokens. tokenHighlighting :: [T.Token] -> CompressedFile tokenHighlighting = merge . map tokenToCFile where -- Converts an aspect and a range to a file. aToF a r = singletonC (rToR r) (mempty { aspect = Just a }) -- Merges /sorted, non-overlapping/ compressed files. merge = CompressedFile . concat . map ranges tokenToCFile :: T.Token -> CompressedFile tokenToCFile (T.TokSetN (i, _)) = aToF PrimitiveType (P.getRange i) tokenToCFile (T.TokPropN (i, _)) = aToF PrimitiveType (P.getRange i) tokenToCFile (T.TokKeyword T.KwSet i) = aToF PrimitiveType (P.getRange i) tokenToCFile (T.TokKeyword T.KwProp i) = aToF PrimitiveType (P.getRange i) tokenToCFile (T.TokKeyword T.KwForall i) = aToF Symbol (P.getRange i) tokenToCFile (T.TokKeyword _ i) = aToF Keyword (P.getRange i) tokenToCFile (T.TokSymbol _ i) = aToF Symbol (P.getRange i) tokenToCFile (T.TokLiteral (L.LitNat r _)) = aToF Number r tokenToCFile (T.TokLiteral (L.LitWord64 r _)) = aToF Number r tokenToCFile (T.TokLiteral (L.LitFloat r _)) = aToF Number r tokenToCFile (T.TokLiteral (L.LitString r _)) = aToF String r tokenToCFile (T.TokLiteral (L.LitChar r _)) = aToF String r tokenToCFile (T.TokLiteral (L.LitQName r _)) = aToF String r tokenToCFile (T.TokLiteral (L.LitMeta r _ _)) = aToF String r tokenToCFile (T.TokComment (i, _)) = aToF Comment (P.getRange i) tokenToCFile (T.TokTeX (i, _)) = aToF Background (P.getRange i) tokenToCFile (T.TokMarkup (i, _)) = aToF Markup (P.getRange i) tokenToCFile (T.TokId {}) = mempty tokenToCFile (T.TokQId {}) = mempty tokenToCFile (T.TokString (i,s)) = aToF Pragma (P.getRange i) tokenToCFile (T.TokDummy {}) = mempty tokenToCFile (T.TokEOF {}) = mempty -- | A function mapping names to the kind of name they stand for. type NameKinds = A.QName -> Maybe NameKind -- | Builds a 'NameKinds' function. nameKinds :: Level -- ^ This should only be @'Full'@ if -- type-checking completed successfully (without any -- errors). -> A.Declaration -> TCM NameKinds nameKinds hlLevel decl = do imported <- fix <$> useTC stImports local <- case hlLevel of Full{} -> fix <$> useTC stSignature _ -> return HMap.empty -- Traverses the syntax tree and constructs a map from qualified -- names to name kinds. TODO: Handle open public. let syntax = foldr ($) HMap.empty $ map declToKind $ universeBi decl let merged = unions [local, imported, syntax] return (\n -> HMap.lookup n merged) where fix = HMap.map (defnToKind . theDef) . (^. sigDefinitions) -- | The 'M.Axiom' constructor is used to represent various things -- which are not really axioms, so when maps are merged 'Postulate's -- are thrown away whenever possible. The 'declToKind' function -- below can return several explanations for one qualified name; the -- 'Postulate's are bogus. merge Postulate k = k merge _ Macro = Macro -- If the abstract syntax says macro, it's a macro. merge k _ = k unions = foldr (HMap.unionWith merge) HMap.empty insert = HMap.insertWith merge defnToKind :: Defn -> NameKind defnToKind M.Axiom{} = Postulate defnToKind M.DataOrRecSig{} = Postulate defnToKind M.GeneralizableVar{} = Generalizable defnToKind d@M.Function{} | isProperProjection d = Field | otherwise = Function defnToKind M.Datatype{} = Datatype defnToKind M.Record{} = Record defnToKind M.Constructor{ M.conInd = i } = Constructor i defnToKind M.Primitive{} = Primitive defnToKind M.AbstractDefn{} = __IMPOSSIBLE__ declToKind :: A.Declaration -> HashMap A.QName NameKind -> HashMap A.QName NameKind declToKind (A.Axiom _ i _ _ q _) | SI.defMacro i == Common.MacroDef = insert q Macro | otherwise = insert q Postulate declToKind (A.Field _ q _) = insert q Field -- Function -- Note that the name q can be used both as a field name and as a -- projection function. Highlighting of field names is taken care -- of by "theRest" above, which does not use NameKinds. declToKind (A.Primitive _ q _) = insert q Primitive declToKind (A.Mutual {}) = id declToKind (A.Section {}) = id declToKind (A.Apply {}) = id declToKind (A.Import {}) = id declToKind (A.Pragma {}) = id declToKind (A.ScopedDecl {}) = id declToKind (A.Open {}) = id declToKind (A.PatternSynDef q _ _) = insert q (Constructor Common.Inductive) declToKind (A.Generalize _ _ _ q _) = insert q Generalizable declToKind (A.FunDef _ q _ _) = insert q Function declToKind (A.UnquoteDecl _ _ qs _) = foldr (\ q f -> insert q Function . f) id qs declToKind (A.UnquoteDef _ qs _) = foldr (\ q f -> insert q Function . f) id qs declToKind (A.DataSig _ q _ _) = insert q Datatype declToKind (A.DataDef _ q _ _ cs) = \m -> insert q Datatype $ foldr (\d -> insert (A.axiomName d) (Constructor Common.Inductive)) m cs declToKind (A.RecSig _ q _ _) = insert q Record declToKind (A.RecDef _ q _ _ _ c _ _ _) = insert q Record . case c of Nothing -> id Just q -> insert q (Constructor Common.Inductive) -- | Generates syntax highlighting information for all constructors -- occurring in patterns and expressions in the given declaration. -- -- This function should only be called after type checking. -- Constructors can be overloaded, and the overloading is resolved by -- the type checker. generateConstructorInfo :: SourceToModule -- ^ Maps source file paths to module names. -> AbsolutePath -- ^ The module to highlight. -> NameKinds -> A.Declaration -> TCM File generateConstructorInfo modMap file kinds decl = do -- Get boundaries of current declaration. -- @noRange@ should be impossible, but in case of @noRange@ -- it makes sense to return the empty File. ifNull (P.rangeIntervals $ P.getRange decl) (return mempty) $ \is -> do let start = fromIntegral $ P.posPos $ P.iStart $ head is end = fromIntegral $ P.posPos $ P.iEnd $ last is -- Get all disambiguated names that fall within the range of decl. m0 <- useTC stDisambiguatedNames let (_, m1) = IntMap.split (pred start) m0 (m2, _) = IntMap.split end m1 constrs = IntMap.elems m2 -- Return suitable syntax highlighting information. let files = for constrs $ \ q -> generate modMap file kinds $ I.unambiguous q return $ Fold.fold files printSyntaxInfo :: P.Range -> TCM () printSyntaxInfo r = do syntaxInfo <- useTC stSyntaxInfo ifTopLevelAndHighlightingLevelIs NonInteractive $ printHighlightingInfo KeepHighlighting (selectC r syntaxInfo) -- | Prints syntax highlighting info for an error. printErrorInfo :: TCErr -> TCM () printErrorInfo e = printHighlightingInfo KeepHighlighting . compress =<< errorHighlighting e -- | Generate highlighting for error. -- Does something special for termination errors. errorHighlighting :: TCErr -> TCM File errorHighlighting e = do -- Erase previous highlighting. let r = P.getRange e erase = singleton (rToR $ P.continuousPerLine r) mempty -- Print new highlighting. s <- E.prettyError e let error = singleton (rToR r) $ parserBased { otherAspects = Set.singleton Error , note = Just s } return $ mconcat [ erase, error ] -- | Generate syntax highlighting for warnings. warningHighlighting :: TCWarning -> File warningHighlighting w = case tcWarning w of TerminationIssue terrs -> terminationErrorHighlighting terrs NotStrictlyPositive d ocs -> positivityErrorHighlighting d ocs UnreachableClauses{} -> deadcodeHighlighting $ P.getRange w CoverageIssue{} -> coverageErrorHighlighting $ P.getRange w CoverageNoExactSplit{} -> catchallHighlighting $ P.getRange w UnsolvedConstraints cs -> constraintsHighlighting cs UnsolvedMetaVariables rs -> metasHighlighting rs AbsurdPatternRequiresNoRHS{} -> deadcodeHighlighting $ P.getRange w ModuleDoesntExport{} -> deadcodeHighlighting $ P.getRange w -- expanded catch-all case to get a warning for new constructors CantGeneralizeOverSorts{} -> mempty UnsolvedInteractionMetas{} -> mempty OldBuiltin{} -> mempty EmptyRewritePragma{} -> deadcodeHighlighting $ P.getRange w IllformedAsClause{} -> deadcodeHighlighting $ P.getRange w UselessPublic{} -> mempty UselessInline{} -> mempty WrongInstanceDeclaration{} -> mempty InstanceWithExplicitArg{} -> deadcodeHighlighting $ P.getRange w InstanceNoOutputTypeName{} -> mempty InstanceArgWithExplicitArg{} -> mempty ParseWarning{} -> mempty InversionDepthReached{} -> mempty GenericWarning{} -> mempty GenericNonFatalError{} -> mempty SafeFlagPostulate{} -> mempty SafeFlagPragma{} -> mempty SafeFlagNonTerminating -> mempty SafeFlagTerminating -> mempty SafeFlagWithoutKFlagPrimEraseEquality -> mempty WithoutKFlagPrimEraseEquality -> mempty SafeFlagNoPositivityCheck -> mempty SafeFlagPolarity -> mempty SafeFlagNoUniverseCheck -> mempty DeprecationWarning{} -> mempty UserWarning{} -> mempty LibraryWarning{} -> mempty InfectiveImport{} -> mempty CoInfectiveImport{} -> mempty NicifierIssue w -> case w of -- we intentionally override the binding of `w` here so that our pattern of -- using `P.getRange w` still yields the most precise range information we -- can get. NotAllowedInMutual{} -> deadcodeHighlighting $ P.getRange w EmptyAbstract{} -> deadcodeHighlighting $ P.getRange w EmptyInstance{} -> deadcodeHighlighting $ P.getRange w EmptyMacro{} -> deadcodeHighlighting $ P.getRange w EmptyMutual{} -> deadcodeHighlighting $ P.getRange w EmptyPostulate{} -> deadcodeHighlighting $ P.getRange w EmptyPrivate{} -> deadcodeHighlighting $ P.getRange w EmptyGeneralize{} -> deadcodeHighlighting $ P.getRange w UselessAbstract{} -> deadcodeHighlighting $ P.getRange w UselessInstance{} -> deadcodeHighlighting $ P.getRange w UselessPrivate{} -> deadcodeHighlighting $ P.getRange w -- TODO: explore highlighting opportunities here! EmptyPrimitive{} -> mempty InvalidCatchallPragma{} -> mempty InvalidNoPositivityCheckPragma{} -> mempty InvalidNoUniverseCheckPragma{} -> mempty InvalidTerminationCheckPragma{} -> mempty MissingDefinitions{} -> mempty PolarityPragmasButNotPostulates{} -> mempty PragmaNoTerminationCheck{} -> mempty PragmaCompiled{} -> mempty UnknownFixityInMixfixDecl{} -> mempty UnknownNamesInFixityDecl{} -> mempty UnknownNamesInPolarityPragmas{} -> mempty -- | Generate syntax highlighting for termination errors. terminationErrorHighlighting :: [TerminationError] -> File terminationErrorHighlighting termErrs = functionDefs `mappend` callSites where m = parserBased { otherAspects = Set.singleton TerminationProblem } functionDefs = Fold.foldMap (\x -> singleton (rToR $ bindingSite x) m) $ concatMap M.termErrFunctions termErrs callSites = Fold.foldMap (\r -> singleton (rToR r) m) $ concatMap (map M.callInfoRange . M.termErrCalls) termErrs -- | Generate syntax highlighting for not-strictly-positive inductive -- definitions. -- TODO: highlight also the problematic occurrences positivityErrorHighlighting :: I.QName -> Seq OccursWhere -> File positivityErrorHighlighting q os = several (rToR <$> P.getRange q : rs) m where rs = map (\(OccursWhere r _ _) -> r) (Fold.toList os) m = parserBased { otherAspects = Set.singleton PositivityProblem } deadcodeHighlighting :: P.Range -> File deadcodeHighlighting r = singleton (rToR $ P.continuousPerLine r) m where m = parserBased { otherAspects = Set.singleton Deadcode } coverageErrorHighlighting :: P.Range -> File coverageErrorHighlighting r = singleton (rToR $ P.continuousPerLine r) m where m = parserBased { otherAspects = Set.singleton CoverageProblem } catchallHighlighting :: P.Range -> File catchallHighlighting r = singleton (rToR $ P.continuousPerLine r) m where m = parserBased { otherAspects = Set.singleton CatchallClause } -- | Generates and prints syntax highlighting information for unsolved -- meta-variables and certain unsolved constraints. printUnsolvedInfo :: TCM () printUnsolvedInfo = do metaInfo <- computeUnsolvedMetaWarnings constraintInfo <- computeUnsolvedConstraints printHighlightingInfo KeepHighlighting (compress $ metaInfo `mappend` constraintInfo) -- | Generates syntax highlighting information for unsolved meta -- variables. computeUnsolvedMetaWarnings :: TCM File computeUnsolvedMetaWarnings = do is <- getInteractionMetas -- We don't want to highlight blocked terms, since -- * there is always at least one proper meta responsible for the blocking -- * in many cases the blocked term covers the highlighting for this meta let notBlocked m = not <$> isBlockedTerm m ms <- filterM notBlocked =<< getOpenMetas rs <- mapM getMetaRange (ms \\ is) return $ metasHighlighting rs metasHighlighting :: [P.Range] -> File metasHighlighting rs = several (map (rToR . P.continuousPerLine) rs) $ parserBased { otherAspects = Set.singleton UnsolvedMeta } -- | Generates syntax highlighting information for unsolved constraints -- (ideally: that are not connected to a meta variable). computeUnsolvedConstraints :: TCM File computeUnsolvedConstraints = constraintsHighlighting <$> getAllConstraints constraintsHighlighting :: Constraints -> File constraintsHighlighting cs = several (map (rToR . P.continuousPerLine) rs) (parserBased { otherAspects = Set.singleton UnsolvedConstraint }) where -- get ranges of interesting unsolved constraints rs = (`mapMaybe` (map theConstraint cs)) $ \case Closure{ clValue = IsEmpty r t } -> Just r Closure{ clEnv = e, clValue = ValueCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = ElimCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = TypeCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = TelCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = SortCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = LevelCmp{} } -> Just $ getRange (envRange e) Closure{ clEnv = e, clValue = CheckSizeLtSat{} } -> Just $ getRange (envRange e) _ -> Nothing -- | Generates a suitable file for a possibly ambiguous name. generate :: SourceToModule -- ^ Maps source file paths to module names. -> AbsolutePath -- ^ The module to highlight. -> NameKinds -> A.AmbiguousQName -> File generate modMap file kinds (A.AmbQ qs) = Fold.foldMap (\ q -> nameToFileA modMap file q include m) qs where ks = map kinds (Fold.toList qs) -- Ulf, 2014-06-03: [issue1064] It's better to pick the first rather -- than doing no highlighting if there's an ambiguity between an -- inductive and coinductive constructor. kind = case [ k | Just k <- ks ] of k : _ -> Just k [] -> Nothing -- kind = case (allEqual ks, ks) of -- (True, Just k : _) -> Just k -- _ -> Nothing -- Note that all names in an AmbiguousQName should have the same -- concrete name, so either they are all operators, or none of -- them are. m isOp = parserBased { aspect = Just $ Name kind isOp } include = allEqual (map bindingSite $ Fold.toList qs) -- | Converts names to suitable 'File's. nameToFile :: SourceToModule -- ^ Maps source file paths to module names. -> AbsolutePath -- ^ The file name of the current module. Used for -- consistency checking. -> [C.Name] -- ^ The name qualifier (may be empty). -> C.Name -- ^ The base name. -> P.Range -- ^ The 'Range' of the name in its fixity declaration (if any). -> (Bool -> Aspects) -- ^ Meta information to be associated with the name. -- The argument is 'True' iff the name is an operator. -> Maybe P.Range -- ^ The definition site of the name. The calculated -- meta information is extended with this information, -- if possible. -> File nameToFile modMap file xs x fr m mR = -- We don't care if we get any funny ranges. if all (== Strict.Just file) fileNames then frFile `mappend` several (map rToR rs) (aspects { definitionSite = mFilePos }) else mempty where aspects = m $ C.isOperator x fileNames = mapMaybe (fmap P.srcFile . P.rStart . P.getRange) (x : xs) frFile = singleton (rToR fr) (aspects { definitionSite = notHere <$> mFilePos }) rs = map P.getRange (x : xs) -- The fixity declaration should not get a symbolic anchor. notHere d = d { defSiteHere = False } mFilePos :: Maybe DefinitionSite mFilePos = do r <- mR P.Pn { P.srcFile = Strict.Just f, P.posPos = p } <- P.rStart r mod <- Map.lookup f modMap -- Andreas, 2017-06-16, Issue #2604: Symbolic anchors. -- We drop the file name part from the qualifiers, since -- this is contained in the html file name already. -- We want to get anchors of the form: -- @@ let qualifiers = drop (length $ C.moduleNameParts mod) xs -- For bound variables, we do not create symbolic anchors. local = maybe True isLocalAspect $ aspect aspects return $ DefinitionSite { defSiteModule = mod , defSitePos = fromIntegral p -- Is our current position the definition site? , defSiteHere = r == P.getRange x -- For bound variables etc. we do not create a symbolic anchor name. -- Also not for names that include anonymous modules, -- otherwise, we do not get unique anchors. , defSiteAnchor = if local || C.isNoName x || any Common.isUnderscore qualifiers then Nothing else Just $ prettyShow $ foldr C.Qual (C.QName x) qualifiers } -- Is the name a bound variable or similar? If in doubt, yes. isLocalAspect :: Aspect -> Bool isLocalAspect = \case Name mkind _ -> maybe True isLocal mkind _ -> True isLocal :: NameKind -> Bool isLocal = \case Bound -> True Generalizable -> True Argument -> True Constructor{} -> False Datatype -> False Field -> False Function -> False Module -> False Postulate -> False Primitive -> False Record -> False Macro -> False -- | A variant of 'nameToFile' for qualified abstract names. nameToFileA :: SourceToModule -- ^ Maps source file paths to module names. -> AbsolutePath -- ^ The file name of the current module. Used for -- consistency checking. -> A.QName -- ^ The name. -> Bool -- ^ Should the binding site be included in the file? -> (Bool -> Aspects) -- ^ Meta information to be associated with the name. -- ^ The argument is 'True' iff the name is an operator. -> File nameToFileA modMap file x include m = nameToFile modMap file (concreteQualifier x) (concreteBase x) r m (if include then Just $ bindingSite x else Nothing) `mappend` notationFile where -- Andreas, 2016-09-08, for issue #2140: -- Range of name from fixity declaration: fr = theNameRange $ A.nameFixity $ A.qnameName x -- Somehow we import fixity ranges from other files, we should ignore them. -- (I do not understand how we get them as they should not be serialized...) r = if P.rangeFile fr == Strict.Just file then fr else P.noRange notationFile = mconcat $ map genPartFile $ theNotation $ A.nameFixity $ A.qnameName x boundAspect = parserBased{ aspect = Just $ Name (Just Bound) False } genPartFile (BindHole r i) = several [rToR r, rToR $ getRange i] boundAspect genPartFile (NormalHole r i) = several [rToR r, rToR $ getRange i] boundAspect genPartFile WildHole{} = mempty genPartFile (IdPart x) = singleton (rToR $ P.getRange x) (m False) concreteBase :: I.QName -> C.Name concreteBase = A.nameConcrete . A.qnameName concreteQualifier :: I.QName -> [C.Name] concreteQualifier = map A.nameConcrete . A.mnameToList . A.qnameModule bindingSite :: I.QName -> P.Range bindingSite = A.nameBindingSite . A.qnameName -- | Remember a name disambiguation (during type checking). -- To be used later during syntax highlighting. storeDisambiguatedName :: A.QName -> TCM () storeDisambiguatedName q = whenJust (start $ P.getRange q) $ \ i -> stDisambiguatedNames `modifyTCLens` IntMap.insert i q where start r = fromIntegral . P.posPos <$> P.rStart' r -- | Store a disambiguation of record field tags for the purpose of highlighting. disambiguateRecordFields :: [C.Name] -- ^ Record field names in a record expression. -> [A.QName] -- ^ Record field names in the corresponding record type definition -> TCM () disambiguateRecordFields cxs axs = forM_ cxs $ \ cx -> do caseMaybe (List.find ((cx ==) . A.nameConcrete . A.qnameName) axs) (return ()) $ \ ax -> do storeDisambiguatedName ax { A.qnameName = (A.qnameName ax) { A.nameConcrete = cx } } Agda-2.6.0.1/src/full/Agda/Interaction/Highlighting/Range.hs0000644000000000000000000000612513466402171021551 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} -- | Ranges. module Agda.Interaction.Highlighting.Range ( Range(..) , rangeInvariant , Ranges(..) , rangesInvariant , overlapping , empty , rangeToPositions , rangesToPositions , rToR , rangeToEndPoints , minus ) where import Control.Applicative ((<$>)) import qualified Agda.Syntax.Position as P import Agda.Utils.List -- | Character ranges. The first character in the file has position 1. -- Note that the 'to' position is considered to be outside of the -- range. -- -- Invariant: @'from' '<=' 'to'@. data Range = Range { from, to :: Int } deriving (Eq, Ord, Show) -- | The 'Range' invariant. rangeInvariant :: Range -> Bool rangeInvariant r = from r <= to r -- | Zero or more consecutive and separated ranges. newtype Ranges = Ranges [Range] deriving (Eq, Show) -- | The 'Ranges' invariant. rangesInvariant :: Ranges -> Bool rangesInvariant (Ranges []) = True rangesInvariant (Ranges rs) = and (zipWith (<) (map to $ init rs) (map from $ tail rs)) ------------------------------------------------------------------------ -- Queries -- | 'True' iff the ranges overlap. -- -- The ranges are assumed to be well-formed. overlapping :: Range -> Range -> Bool overlapping r1 r2 = not $ to r1 <= from r2 || to r2 <= from r1 -- | 'True' iff the range is empty. empty :: Range -> Bool empty r = to r <= from r ------------------------------------------------------------------------ -- Conversion -- | Converts a range to a list of positions. rangeToPositions :: Range -> [Int] rangeToPositions r = [from r .. to r - 1] -- | Converts several ranges to a list of positions. rangesToPositions :: Ranges -> [Int] rangesToPositions (Ranges rs) = concatMap rangeToPositions rs -- | Converts a 'P.Range' to a 'Ranges'. rToR :: P.Range -> Ranges rToR r = Ranges (map iToR (P.rangeIntervals r)) where iToR (P.Interval { P.iStart = P.Pn { P.posPos = pos1 } , P.iEnd = P.Pn { P.posPos = pos2 } }) = Range { from = fromIntegral pos1, to = fromIntegral pos2 } rangeToEndPoints :: P.Range -> Maybe (Int,Int) rangeToEndPoints r = case P.rangeToInterval r of Nothing -> Nothing Just i -> Just ( fromIntegral $ P.posPos $ P.iStart i , fromIntegral $ P.posPos $ P.iEnd i) ------------------------------------------------------------------------ -- Operations -- | @minus xs ys@ computes the difference between @xs@ and @ys@: the -- result contains those positions which are present in @xs@ but not -- in @ys@. -- -- Linear in the lengths of the input ranges. minus :: Ranges -> Ranges -> Ranges minus (Ranges rs1) (Ranges rs2) = Ranges (m rs1 rs2) where m [] _ = [] m xs [] = xs m (x:xs) (y:ys) | empty y = m (x:xs) ys | to x < from y = x : m xs (y:ys) | to y < from x = m (x:xs) ys | from x < from y = Range { from = from x, to = from y } : m (Range { from = from y, to = to x } : xs) (y:ys) | to y < to x = m (Range { from = to y, to = to x } : xs) ys | otherwise = m xs (y:ys) Agda-2.6.0.1/src/full/Agda/Interaction/Options/0000755000000000000000000000000013466402171017203 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Interaction/Options/Lenses.hs0000644000000000000000000002565113466402171021001 0ustar0000000000000000-- | Lenses for 'CommandLineOptions' and 'PragmaOptions'. -- -- Add as needed. -- -- Nothing smart happening here. module Agda.Interaction.Options.Lenses where import Control.Monad.State import Data.Set (Set) import qualified Data.Set as Set import System.FilePath (()) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.State import Agda.Interaction.Options import Agda.Utils.Lens import Agda.Utils.FileName --------------------------------------------------------------------------- -- * Pragma options --------------------------------------------------------------------------- class LensPragmaOptions a where getPragmaOptions :: a -> PragmaOptions setPragmaOptions :: PragmaOptions -> a -> a mapPragmaOptions :: (PragmaOptions -> PragmaOptions) -> a -> a lensPragmaOptions :: Lens' PragmaOptions a -- lensPragmaOptions :: forall f. Functor f => (PragmaOptions -> f PragmaOptions) -> a -> f a -- default implementations setPragmaOptions = mapPragmaOptions . const mapPragmaOptions f a = setPragmaOptions (f $ getPragmaOptions a) a instance LensPragmaOptions CommandLineOptions where getPragmaOptions = optPragmaOptions setPragmaOptions opts st = st { optPragmaOptions = opts } lensPragmaOptions f st = f (optPragmaOptions st) <&> \ opts -> st { optPragmaOptions = opts } instance LensPragmaOptions TCState where getPragmaOptions = (^.stPragmaOptions) setPragmaOptions = set stPragmaOptions lensPragmaOptions = stPragmaOptions modifyPragmaOptions :: (PragmaOptions -> PragmaOptions) -> TCM () modifyPragmaOptions = modifyTC . mapPragmaOptions --------------------------------------------------------------------------- -- ** Verbosity in the local pragma options --------------------------------------------------------------------------- class LensVerbosity a where getVerbosity :: a -> Verbosity setVerbosity :: Verbosity -> a -> a mapVerbosity :: (Verbosity -> Verbosity) -> a -> a -- default implementations setVerbosity = mapVerbosity . const mapVerbosity f a = setVerbosity (f $ getVerbosity a) a instance LensVerbosity PragmaOptions where getVerbosity = optVerbose setVerbosity is opts = opts { optVerbose = is } instance LensVerbosity TCState where getVerbosity = getVerbosity . getPragmaOptions mapVerbosity = mapPragmaOptions . mapVerbosity modifyVerbosity :: (Verbosity -> Verbosity) -> TCM () modifyVerbosity = modifyTC . mapVerbosity putVerbosity :: Verbosity -> TCM () putVerbosity = modifyTC . setVerbosity --------------------------------------------------------------------------- -- * Command line options --------------------------------------------------------------------------- class LensCommandLineOptions a where getCommandLineOptions :: a -> CommandLineOptions setCommandLineOptions :: CommandLineOptions -> a -> a mapCommandLineOptions :: (CommandLineOptions -> CommandLineOptions) -> a -> a -- default implementations setCommandLineOptions = mapCommandLineOptions . const mapCommandLineOptions f a = setCommandLineOptions (f $ getCommandLineOptions a) a instance LensCommandLineOptions PersistentTCState where getCommandLineOptions = stPersistentOptions setCommandLineOptions opts st = st { stPersistentOptions = opts } instance LensCommandLineOptions TCState where getCommandLineOptions = getCommandLineOptions . stPersistentState mapCommandLineOptions = updatePersistentState . mapCommandLineOptions modifyCommandLineOptions :: (CommandLineOptions -> CommandLineOptions) -> TCM () modifyCommandLineOptions = modifyTC . mapCommandLineOptions --------------------------------------------------------------------------- -- ** Safe mode --------------------------------------------------------------------------- type SafeMode = Bool class LensSafeMode a where getSafeMode :: a -> SafeMode setSafeMode :: SafeMode -> a -> a mapSafeMode :: (SafeMode -> SafeMode) -> a -> a -- default implementations setSafeMode = mapSafeMode . const mapSafeMode f a = setSafeMode (f $ getSafeMode a) a instance LensSafeMode PragmaOptions where getSafeMode = optSafe setSafeMode is opts = opts { optSafe = is } -- setSafeOption instance LensSafeMode CommandLineOptions where getSafeMode = getSafeMode . getPragmaOptions mapSafeMode = mapPragmaOptions . mapSafeMode instance LensSafeMode PersistentTCState where getSafeMode = getSafeMode . getCommandLineOptions mapSafeMode = mapCommandLineOptions . mapSafeMode instance LensSafeMode TCState where getSafeMode = getSafeMode . getCommandLineOptions mapSafeMode = mapCommandLineOptions . mapSafeMode modifySafeMode :: (SafeMode -> SafeMode) -> TCM () modifySafeMode = modifyTC . mapSafeMode putSafeMode :: SafeMode -> TCM () putSafeMode = modifyTC . setSafeMode -- | These builtins may use postulates, and are still considered --safe builtinModulesWithSafePostulates :: Set FilePath builtinModulesWithSafePostulates = primitiveModules `Set.union` (Set.fromList [ "Agda" "Builtin" "Bool.agda" , "Agda" "Builtin" "Char.agda" , "Agda" "Builtin" "Char" "Properties.agda" , "Agda" "Builtin" "Coinduction.agda" , "Agda" "Builtin" "Cubical" "Glue.agda" , "Agda" "Builtin" "Cubical" "Id.agda" , "Agda" "Builtin" "Cubical" "Path.agda" , "Agda" "Builtin" "Cubical" "Sub.agda" , "Agda" "Builtin" "Equality" "Erase.agda" , "Agda" "Builtin" "Equality.agda" , "Agda" "Builtin" "Float.agda" , "Agda" "Builtin" "FromNat.agda" , "Agda" "Builtin" "FromNeg.agda" , "Agda" "Builtin" "FromString.agda" , "Agda" "Builtin" "Int.agda" , "Agda" "Builtin" "IO.agda" , "Agda" "Builtin" "List.agda" , "Agda" "Builtin" "Nat.agda" , "Agda" "Builtin" "Reflection.agda" , "Agda" "Builtin" "Sigma.agda" , "Agda" "Builtin" "Size.agda" , "Agda" "Builtin" "Strict.agda" , "Agda" "Builtin" "String.agda" , "Agda" "Builtin" "String" "Properties.agda" , "Agda" "Builtin" "Unit.agda" , "Agda" "Builtin" "Word.agda" , "Agda" "Builtin" "Word" "Properties.agda" ]) -- | These builtins may not use postulates under --safe. They are not -- automatically unsafe, but will be if they use an unsafe feature. builtinModulesWithUnsafePostulates :: Set FilePath builtinModulesWithUnsafePostulates = Set.fromList [ "Agda" "Builtin" "TrustMe.agda" , "Agda" "Builtin" "Equality" "Rewrite.agda" ] primitiveModules :: Set FilePath primitiveModules = Set.fromList [ "Agda" "Primitive.agda" , "Agda" "Primitive" "Cubical.agda" ] builtinModules :: Set FilePath builtinModules = builtinModulesWithSafePostulates `Set.union` builtinModulesWithUnsafePostulates isBuiltinModule :: FilePath -> TCM Bool isBuiltinModule file = do libdirPrim <- ( "prim") <$> liftIO defaultLibDir return (file `Set.member` Set.map (libdirPrim ) builtinModules) isBuiltinModuleWithSafePostulates :: FilePath -> TCM Bool isBuiltinModuleWithSafePostulates file = do libdirPrim <- ( "prim") <$> liftIO defaultLibDir let safeBuiltins = Set.map (libdirPrim ) builtinModulesWithSafePostulates return (file `Set.member` safeBuiltins) --------------------------------------------------------------------------- -- ** Include directories --------------------------------------------------------------------------- class LensIncludePaths a where getIncludePaths :: a -> [FilePath] setIncludePaths :: [FilePath] -> a -> a mapIncludePaths :: ([FilePath] -> [FilePath]) -> a -> a getAbsoluteIncludePaths :: a -> [AbsolutePath] setAbsoluteIncludePaths :: [AbsolutePath] -> a -> a mapAbsoluteIncludePaths :: ([AbsolutePath] -> [AbsolutePath]) -> a -> a -- default implementations setIncludePaths = mapIncludePaths . const mapIncludePaths f a = setIncludePaths (f $ getIncludePaths a) a setAbsoluteIncludePaths = mapAbsoluteIncludePaths . const mapAbsoluteIncludePaths f a = setAbsoluteIncludePaths (f $ getAbsoluteIncludePaths a) a instance LensIncludePaths CommandLineOptions where getIncludePaths = optIncludePaths setIncludePaths is opts = opts { optIncludePaths = is } getAbsoluteIncludePaths = optAbsoluteIncludePaths setAbsoluteIncludePaths is opts = opts { optAbsoluteIncludePaths = is } instance LensIncludePaths PersistentTCState where getIncludePaths = getIncludePaths . getCommandLineOptions mapIncludePaths = mapCommandLineOptions . mapIncludePaths getAbsoluteIncludePaths = getAbsoluteIncludePaths . getCommandLineOptions mapAbsoluteIncludePaths = mapCommandLineOptions . mapAbsoluteIncludePaths instance LensIncludePaths TCState where getIncludePaths = getIncludePaths . getCommandLineOptions mapIncludePaths = mapCommandLineOptions . mapIncludePaths getAbsoluteIncludePaths = getAbsoluteIncludePaths . getCommandLineOptions mapAbsoluteIncludePaths = mapCommandLineOptions . mapAbsoluteIncludePaths modifyIncludePaths :: ([FilePath] -> [FilePath]) -> TCM () modifyIncludePaths = modifyTC . mapIncludePaths putIncludePaths :: [FilePath] -> TCM () putIncludePaths = modifyTC . setIncludePaths modifyAbsoluteIncludePaths :: ([AbsolutePath] -> [AbsolutePath]) -> TCM () modifyAbsoluteIncludePaths = modifyTC . mapAbsoluteIncludePaths putAbsoluteIncludePaths :: [AbsolutePath] -> TCM () putAbsoluteIncludePaths = modifyTC . setAbsoluteIncludePaths --------------------------------------------------------------------------- -- ** Include directories --------------------------------------------------------------------------- type PersistentVerbosity = Verbosity class LensPersistentVerbosity a where getPersistentVerbosity :: a -> PersistentVerbosity setPersistentVerbosity :: PersistentVerbosity -> a -> a mapPersistentVerbosity :: (PersistentVerbosity -> PersistentVerbosity) -> a -> a -- default implementations setPersistentVerbosity = mapPersistentVerbosity . const mapPersistentVerbosity f a = setPersistentVerbosity (f $ getPersistentVerbosity a) a instance LensPersistentVerbosity PragmaOptions where getPersistentVerbosity = getVerbosity setPersistentVerbosity = setVerbosity instance LensPersistentVerbosity CommandLineOptions where getPersistentVerbosity = getPersistentVerbosity . getPragmaOptions mapPersistentVerbosity = mapPragmaOptions . mapPersistentVerbosity instance LensPersistentVerbosity PersistentTCState where getPersistentVerbosity = getPersistentVerbosity . getCommandLineOptions mapPersistentVerbosity = mapCommandLineOptions . mapPersistentVerbosity instance LensPersistentVerbosity TCState where getPersistentVerbosity = getPersistentVerbosity . getCommandLineOptions mapPersistentVerbosity = mapCommandLineOptions . mapPersistentVerbosity modifyPersistentVerbosity :: (PersistentVerbosity -> PersistentVerbosity) -> TCM () modifyPersistentVerbosity = modifyTC . mapPersistentVerbosity putPersistentVerbosity :: PersistentVerbosity -> TCM () putPersistentVerbosity = modifyTC . setPersistentVerbosity Agda-2.6.0.1/src/full/Agda/Interaction/Options/Warnings.hs0000644000000000000000000003056513466402171021340 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Interaction.Options.Warnings ( WarningMode (..) , warningSet , warn2Error , defaultWarningSet , allWarnings , usualWarnings , noWarnings , unsolvedWarnings , errorWarnings , defaultWarningMode , warningModeUpdate , warningSets , WarningName (..) , warningName2String , string2WarningName , usageWarning ) where import Control.Arrow ( (&&&) ) import Control.Monad ( guard ) import Data.Traversable ( for ) import Text.Read ( readMaybe ) import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe ( fromMaybe ) import Data.List ( stripPrefix, intercalate ) import Agda.Utils.Lens import Agda.Utils.Maybe #include "undefined.h" import Agda.Utils.Impossible -- | A @WarningMode@ has two components: a set of warnings to be displayed -- and a flag stating whether warnings should be turned into fatal errors. data WarningMode = WarningMode { _warningSet :: Set WarningName , _warn2Error :: Bool } deriving (Eq, Show) warningSet :: Lens' (Set WarningName) WarningMode warningSet f o = (\ ws -> o { _warningSet = ws }) <$> f (_warningSet o) warn2Error :: Lens' Bool WarningMode warn2Error f o = (\ ws -> o { _warn2Error = ws }) <$> f (_warn2Error o) -- | The @defaultWarningMode@ is a curated set of warnings covering non-fatal -- errors and disabling style-related ones defaultWarningSet :: String defaultWarningSet = "warn" defaultWarningMode :: WarningMode defaultWarningMode = WarningMode ws False where ws = fst $ fromMaybe __IMPOSSIBLE__ $ lookup defaultWarningSet warningSets -- | @warningModeUpdate str@ computes the action of @str@ over the current -- @WarningMode@: it may reset the set of warnings, add or remove a specific -- flag or demand that any warning be turned into an error warningModeUpdate :: String -> Maybe (WarningMode -> WarningMode) warningModeUpdate str = case str of "error" -> Just $ set warn2Error True "noerror" -> Just $ set warn2Error False _ | Just ws <- fst <$> lookup str warningSets -> Just $ set warningSet ws _ -> case stripPrefix "no" str of Just str' -> (over warningSet . Set.delete) <$> string2WarningName str' Nothing -> (over warningSet . Set.insert) <$> string2WarningName str -- | Common sets of warnings warningSets :: [(String, (Set WarningName, String))] warningSets = [ ("all" , (allWarnings, "All of the existing warnings")) , ("warn" , (usualWarnings, "Default warning level")) , ("ignore", (errorWarnings, "Ignore all the benign warnings")) ] noWarnings :: Set WarningName noWarnings = Set.empty unsolvedWarnings :: Set WarningName unsolvedWarnings = Set.fromList [ UnsolvedMetaVariables_ , UnsolvedInteractionMetas_ , UnsolvedConstraints_ ] errorWarnings :: Set WarningName errorWarnings = Set.fromList [ CoverageIssue_ , GenericNonFatalError_ , MissingDefinitions_ , NotAllowedInMutual_ , NotStrictlyPositive_ , OverlappingTokensWarning_ , PragmaCompiled_ , SafeFlagPostulate_ , SafeFlagPragma_ , SafeFlagNonTerminating_ , SafeFlagTerminating_ , SafeFlagWithoutKFlagPrimEraseEquality_ , SafeFlagNoPositivityCheck_ , SafeFlagPolarity_ , SafeFlagNoUniverseCheck_ , TerminationIssue_ , UnsolvedMetaVariables_ , UnsolvedInteractionMetas_ , UnsolvedConstraints_ , InfectiveImport_ , CoInfectiveImport_ ] allWarnings :: Set WarningName allWarnings = Set.fromList [minBound..maxBound] usualWarnings :: Set WarningName usualWarnings = allWarnings Set.\\ Set.fromList [ UnknownFixityInMixfixDecl_ , CoverageNoExactSplit_ ] -- | The @WarningName@ data enumeration is meant to have a one-to-one correspondance -- to existing warnings in the codebase. data WarningName = -- Parser Warnings OverlappingTokensWarning_ -- Library Warnings | LibUnknownField_ -- Nicifer Warnings | EmptyAbstract_ | EmptyInstance_ | EmptyMacro_ | EmptyMutual_ | EmptyPostulate_ | EmptyPrivate_ | EmptyGeneralize_ | EmptyPrimitive_ | InvalidCatchallPragma_ | InvalidNoUniverseCheckPragma_ | InvalidTerminationCheckPragma_ | InvalidNoPositivityCheckPragma_ | MissingDefinitions_ | NotAllowedInMutual_ | PolarityPragmasButNotPostulates_ | PragmaNoTerminationCheck_ | PragmaCompiled_ | UnknownFixityInMixfixDecl_ | UnknownNamesInFixityDecl_ | UnknownNamesInPolarityPragmas_ | UselessAbstract_ | UselessInstance_ | UselessPrivate_ -- Scope and Type Checking Warnings | OldBuiltin_ | EmptyRewritePragma_ | IllformedAsClause_ | UselessPublic_ | UnreachableClauses_ | UselessInline_ | WrongInstanceDeclaration_ | InstanceWithExplicitArg_ | InstanceNoOutputTypeName_ | InstanceArgWithExplicitArg_ | GenericWarning_ | DeprecationWarning_ | InversionDepthReached_ | TerminationIssue_ | CoverageIssue_ | CoverageNoExactSplit_ | ModuleDoesntExport_ | NotStrictlyPositive_ | UnsolvedMetaVariables_ | UnsolvedInteractionMetas_ | UnsolvedConstraints_ | GenericNonFatalError_ | SafeFlagPostulate_ | SafeFlagPragma_ | SafeFlagNonTerminating_ | SafeFlagTerminating_ | SafeFlagWithoutKFlagPrimEraseEquality_ | SafeFlagNoPositivityCheck_ | SafeFlagPolarity_ | SafeFlagNoUniverseCheck_ | UserWarning_ | WithoutKFlagPrimEraseEquality_ | CantGeneralizeOverSorts_ | AbsurdPatternRequiresNoRHS_ -- Checking consistency of options | InfectiveImport_ | CoInfectiveImport_ deriving (Eq, Ord, Show, Read, Enum, Bounded) -- | The flag corresponding to a warning is precisely the name of the constructor -- minus the trailing underscore. -- sorry string2WarningName :: String -> Maybe WarningName string2WarningName = readMaybe . (++ "_") warningName2String :: WarningName -> String warningName2String = init . show -- | @warningUsage@ generated using @warningNameDescription@ usageWarning :: String usageWarning = intercalate "\n" -- Looks like CPP doesn't like multiline string literals [ concat [ "The -W or --warning option can be used to disable or enable " , "different warnings. The flag -W error (or --warning=error) " , "can be used to turn all warnings into errors, while -W noerror " , "turns this off again." ] , "" , concat [ "A group of warnings can be enabled by -W group, where group is " , "one of the following:" ] , "" , untable (fmap (fst &&& snd . snd) warningSets) , concat [ "Individual warnings can be turned on and off by -W Name and " , "-W noName respectively. The flags available are:" ] , "" , untable $ forMaybe [minBound..maxBound] $ \ w -> let wnd = warningNameDescription w in (warningName2String w, wnd) <$ guard (not $ null wnd) ] where untable :: [(String, String)] -> String untable rows = let len = maximum (map (length . fst) rows) in unlines $ flip map rows $ \ (hdr, cnt) -> concat [ hdr, replicate (1 + len - length hdr) ' ', cnt ] -- | @WarningName@ descriptions used for generating usage information -- Leave String empty to skip that name. warningNameDescription :: WarningName -> String warningNameDescription w = case w of OverlappingTokensWarning_ -> "Multi-line comments spanning one or more literate text blocks." -- Library Warnings LibUnknownField_ -> "Unknown field in library file" -- Nicifer Warnings EmptyAbstract_ -> "Empty `abstract' blocks." EmptyInstance_ -> "Empty `instance' blocks." EmptyMacro_ -> "Empty `macro' blocks." EmptyMutual_ -> "Empty `mutual' blocks." EmptyPostulate_ -> "Empty `postulate' blocks." EmptyPrivate_ -> "Empty `private' blocks." EmptyGeneralize_ -> "Empty `variable' blocks." EmptyPrimitive_ -> "Empty `primitive' blocks." InvalidCatchallPragma_ -> "`CATCHALL' pragmas before a non-function clause." InvalidNoPositivityCheckPragma_ -> "No positivity checking pragmas before non-`data', `record' or `mutual' blocks." InvalidNoUniverseCheckPragma_ -> "No universe checking pragmas before non-`data' or `record' declaration." InvalidTerminationCheckPragma_ -> "Termination checking pragmas before non-function or `mutual' blocks." MissingDefinitions_ -> "Declarations not associated to a definition." NotAllowedInMutual_ -> "Declarations not allowed in a mutual block." PolarityPragmasButNotPostulates_ -> "Polarity pragmas for non-postulates." PragmaNoTerminationCheck_ -> "`NO_TERMINATION_CHECK' pragmas are deprecated" PragmaCompiled_ -> "'COMPILE' pragmas not allowed in safe mode." UnknownFixityInMixfixDecl_ -> "Mixfix names without an associated fixity declaration." UnknownNamesInFixityDecl_ -> "Names not declared in the same scope as their syntax or fixity declaration." UnknownNamesInPolarityPragmas_ -> "Names not declared in the same scope as their polarity pragmas." UselessAbstract_ -> "`abstract' blocks where they have no effect." UselessInstance_ -> "`instance' blocks where they have no effect." UselessPrivate_ -> "`private' blocks where they have no effect." -- Scope and Type Checking Warnings OldBuiltin_ -> "Deprecated `BUILTIN' pragmas." EmptyRewritePragma_ -> "Empty `REWRITE' pragmas." IllformedAsClause_ -> "Illformed `as'-clauses in `import' statements." UselessPublic_ -> "`public' blocks where they have no effect." UselessInline_ -> "`INLINE' pragmas where they have no effect." WrongInstanceDeclaration_ -> "Terms marked as eligible for instance search should end with a name." InstanceWithExplicitArg_ -> "`instance` declarations with explicit arguments are never considered by instance search." InstanceNoOutputTypeName_ -> "instance arguments whose type does not end in a named or variable type are never considered by instance search." InstanceArgWithExplicitArg_ -> "instance arguments with explicit arguments are never considered by instance search." UnreachableClauses_ -> "Unreachable function clauses." GenericWarning_ -> "" DeprecationWarning_ -> "Feature deprecation." InversionDepthReached_ -> "Inversions of pattern-matching failed due to exhausted inversion depth." TerminationIssue_ -> "Failed termination checks." CoverageIssue_ -> "Failed coverage checks." CoverageNoExactSplit_ -> "Failed exact split checks." ModuleDoesntExport_ -> "Imported name is not actually exported." NotStrictlyPositive_ -> "Failed strict positivity checks." UnsolvedMetaVariables_ -> "Unsolved meta variables." UnsolvedInteractionMetas_ -> "Unsolved interaction meta variables." UnsolvedConstraints_ -> "Unsolved constraints." GenericNonFatalError_ -> "" SafeFlagPostulate_ -> "`postulate' blocks with the safe flag" SafeFlagPragma_ -> "Unsafe `OPTIONS' pragmas with the safe flag." SafeFlagNonTerminating_ -> "`NON_TERMINATING' pragmas with the safe flag." SafeFlagTerminating_ -> "`TERMINATING' pragmas with the safe flag." SafeFlagWithoutKFlagPrimEraseEquality_ -> "`primEraseEquality' usages with the safe and without-K flags." SafeFlagNoPositivityCheck_ -> "`NO_POSITIVITY_CHECK' pragmas with the safe flag." SafeFlagPolarity_ -> "`POLARITY' pragmas with the safe flag." SafeFlagNoUniverseCheck_ -> "`NO_UNIVERSE_CHECK' pragmas with the safe flag." UserWarning_ -> "User-defined warning added using the 'WARNING_ON_USAGE' pragma." AbsurdPatternRequiresNoRHS_ -> "A clause with an absurd pattern does not need a Right Hand Side." CantGeneralizeOverSorts_ -> "Attempt to generalize over sort metas in 'variable' declaration." WithoutKFlagPrimEraseEquality_ -> "`primEraseEquality' usages with the without-K flags." InfectiveImport_ -> "Importing a file using e.g. `--cubical' into one which doesn't" CoInfectiveImport_ -> "Importing a file not using e.g. `--safe' from one which does" Agda-2.6.0.1/src/full/Agda/Interaction/Options/Help.hs0000644000000000000000000000220113466402171020422 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Interaction.Options.Help ( Help (..) , helpTopicUsage , string2HelpTopic , allHelpTopics ) where import Data.Tuple ( swap ) import Data.Maybe ( fromMaybe ) import Agda.Interaction.Options.Warnings #include "undefined.h" import Agda.Utils.Impossible -- | Interface to the @help@ function data Help = GeneralHelp -- ^ General usage information | HelpFor HelpTopic -- ^ Specialised usage information about TOPIC deriving (Eq, Show) -- | List of Help Topics -- NOTA BENE: -- You need to add each new topic together with its name to @allHelpTopics@ data HelpTopic = Warning deriving (Eq, Show) allHelpTopics :: [(String, HelpTopic)] allHelpTopics = [("warning", Warning)] -- | Usage information generation helpTopicUsage :: HelpTopic -> String helpTopicUsage tp = case tp of Warning -> usageWarning -- | Conversion functions to strings string2HelpTopic :: String -> Maybe HelpTopic string2HelpTopic str = lookup str allHelpTopics helpTopic2String :: HelpTopic -> String helpTopic2String w = fromMaybe __IMPOSSIBLE__ $ lookup w (map swap allHelpTopics) Agda-2.6.0.1/src/full/Agda/Interaction/Options/IORefs.hs0000644000000000000000000000102713466402171020666 0ustar0000000000000000-- | Some IORefs to access option values in pure code module Agda.Interaction.Options.IORefs ( UnicodeOrAscii(..) , unicodeOrAscii ) where import Data.IORef import qualified System.IO.Unsafe as UNSAFE -- | In `Agda.Syntax.Concrete.Pretty` and `Agda.Utils.String` we want to know -- whether we are allowed to insert unicode characters or not. data UnicodeOrAscii = UnicodeOk | AsciiOnly {-# NOINLINE unicodeOrAscii #-} unicodeOrAscii :: IORef UnicodeOrAscii unicodeOrAscii = UNSAFE.unsafePerformIO $ newIORef UnicodeOk Agda-2.6.0.1/src/full/Agda/Syntax/0000755000000000000000000000000013466402171014557 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/IdiomBrackets.hs0000644000000000000000000000346213466402171017640 0ustar0000000000000000module Agda.Syntax.IdiomBrackets (parseIdiomBrackets) where import Control.Monad import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Concrete import Agda.Syntax.Concrete.Operators import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.TypeChecking.Monad import Agda.Utils.Pretty ( prettyShow ) parseIdiomBrackets :: Range -> Expr -> ScopeM Expr parseIdiomBrackets r e = do let qPure = QName $ Name noRange InScope [Id "pure"] qAp = QName $ Name noRange InScope [Hole, Id "<*>", Hole] ePure = App r (Ident qPure) . defaultNamedArg eAp a b = App r (App r (Ident qAp) (defaultNamedArg a)) (defaultNamedArg b) mapM_ ensureInScope [qPure, qAp] case e of RawApp _ es -> do e : es <- appViewM =<< parseApplication es return $ foldl eAp (ePure e) es _ -> return $ ePure e appViewM :: Expr -> ScopeM [Expr] appViewM e = case e of App{} -> let AppView e' es = appView e in (e' :) <$> mapM onlyVisible es OpApp _ op _ es -> (Ident op :) <$> mapM (ordinary <=< noPlaceholder <=< onlyVisible) es _ -> return [e] where onlyVisible a | defaultNamedArg () == (fmap (() <$) a) = return $ namedArg a | otherwise = genericError $ "Only regular arguments are allowed in idiom brackets (no implicit or instance arguments)" noPlaceholder Placeholder{} = genericError "Naked sections are not allowed in idiom brackets" noPlaceholder (NoPlaceholder _ x) = return x ordinary (Ordinary a) = return a ordinary _ = genericError "Binding syntax is not allowed in idiom brackets" ensureInScope :: QName -> ScopeM () ensureInScope q = do r <- resolveName q case r of UnknownName -> genericError $ prettyShow q ++ " needs to be in scope to use idiom brackets (| ... |)" _ -> return () Agda-2.6.0.1/src/full/Agda/Syntax/Reflected.hs0000644000000000000000000000247313466402171017016 0ustar0000000000000000{-# OPTIONS_GHC -fwarn-missing-signatures #-} module Agda.Syntax.Reflected where import Agda.Syntax.Common import Agda.Syntax.Literal import Agda.Syntax.Abstract.Name type Args = [Arg Term] data Elim' a = Apply (Arg a) -- no record projections for now deriving (Show) type Elim = Elim' Term type Elims = [Elim] argsToElims :: Args -> Elims argsToElims = map Apply data Abs a = Abs String a deriving (Show) data Term = Var Int Elims | Con QName Elims | Def QName Elims | Meta MetaId Elims | Lam Hiding (Abs Term) | ExtLam [Clause] Elims | Pi (Dom Type) (Abs Type) | Sort Sort | Lit Literal | Unknown deriving (Show) type Type = Term data Sort = SetS Term | LitS Integer | UnknownS deriving (Show) data Pattern = ConP QName [Arg Pattern] | DotP | VarP String | LitP Literal | AbsurdP | ProjP QName deriving (Show) data Clause = Clause [Arg Pattern] Term | AbsurdClause [Arg Pattern] deriving (Show) data Definition = FunDef Type [Clause] | DataDef -- nothing for now | RecordDef -- nothing for now | DataConstructor | Axiom | Primitive deriving (Show) Agda-2.6.0.1/src/full/Agda/Syntax/DoNotation.hs0000644000000000000000000001150613466402171017174 0ustar0000000000000000{-| Desugaring for do-notation. Uses whatever `_>>=_` and `_>>_` happen to be in scope. Example: ``` foo = do x ← m₁ m₂ just y ← m₃ where nothing → m₄ let z = t m₅ ``` desugars to ``` foo = m₁ >>= λ x → m₂ >> m₃ >>= λ where just y → let z = t in m₅ nothing → m₄ ``` -} module Agda.Syntax.DoNotation (desugarDoNotation) where import Control.Monad import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Concrete import Agda.Syntax.Concrete.Operators import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.TypeChecking.Monad import Agda.Utils.Pretty ( prettyShow ) import Agda.Utils.List ( initMaybe ) desugarDoNotation :: Range -> [DoStmt] -> ScopeM Expr desugarDoNotation r ss = do let qBind = QName $ Name noRange InScope [Hole, Id ">>=", Hole] qThen = QName $ Name noRange InScope [Hole, Id ">>", Hole] isBind DoBind{} = True isBind _ = False isThen DoThen{} = True isThen _ = False -- Only check the operation we actually need. One could imagine to fall back -- on _>>=_ if _>>_ is not in scope, but if we are desugaring to _>>_ at all -- I think we should throw an error rather than silently switching to _>>=_. -- / Ulf mapM_ ensureInScope $ [qBind | any isBind ss] ++ [qThen | any isThen $ fromMaybe ss $ initMaybe ss] -- ignore the last 'DoThen' desugarDo qBind qThen ss desugarDo :: QName -> QName -> [DoStmt] -> ScopeM Expr -- The parser doesn't generate empty 'do' blocks at the moment, but if that -- changes throwing the error is the right thing to do. desugarDo qBind qThen [] = genericError "Empty 'do' block" -- The last statement must be a DoThen desugarDo qBind qThen [s] | DoThen e <- s = return e | otherwise = genericError "The last statement in a 'do' block must be an expression" -- `DoThen` and `DoLet` are easy desugarDo qBind qThen (DoThen e : ss) = appOp qThen e <$> desugarDo qBind qThen ss desugarDo qBind qThen (DoLet r ds : ss) = Let r ds . Just <$> desugarDo qBind qThen ss -- `DoBind` requires more work since we want to generate plain lambdas when -- possible. desugarDo qBind qThen (DoBind r p e [] : ss) | Just x <- singleName p = do -- In this case we have a single name in the bind pattern and no where clauses. -- It could still be a pattern bind though (for instance, `refl ← pure eq`), so -- to figure out which one to use we look up the name in the scope; if it's a -- constructor or pattern synonym we desugar to a pattern lambda. res <- resolveName (QName x) let isMatch = case res of ConstructorName{} -> True PatternSynResName{} -> True _ -> False rest <- desugarDo qBind qThen ss if isMatch then return $ matchingBind qBind r p e rest [] else return $ nonMatchingBind qBind r x e rest desugarDo qBind qThen (DoBind r p e cs : ss) = do -- If there are where clauses we have to desugar to a pattern lambda. rest <- desugarDo qBind qThen ss return $ matchingBind qBind r p e rest cs singleName :: Pattern -> Maybe Name singleName (IdentP (QName x)) = Just x singleName (RawAppP _ [p]) = singleName p singleName _ = Nothing matchingBind :: QName -> Range -> Pattern -> Expr -> Expr -> [LamClause] -> Expr matchingBind qBind r p e body cs = appOp (setRange r qBind) e -- Set the range of the lambda to that of the $ ExtendedLam (getRange cs) -- where-clauses to make highlighting of overlapping $ map addParens (mainClause : cs) -- patterns not highlight the rest of the do-block. where mainClause = LamClause { lamLHS = LHS p [] [] , lamRHS = RHS body , lamWhere = NoWhere , lamCatchAll = False } -- Add parens to left-hand sides: there can only be one pattern in these clauses. addParens c = c { lamLHS = addP (lamLHS c) } where addP (LHS p rw we) = LHS (RawAppP noRange [ParenP noRange p]) rw we nonMatchingBind :: QName -> Range -> Name -> Expr -> Expr -> Expr nonMatchingBind qBind r x e body = appOp (setRange r qBind) e $ Lam (getRange (x, body)) [bx] body where bx = DomainFree $ defaultNamedArg $ mkBoundName_ x appOp :: QName -> Expr -> Expr -> Expr appOp q e1 e2 = app (Ident q) [par e1, par e2] where par e = Paren (getRange e) e -- Add parens to get the right precedence context (#3152) app e es = foldl (\ e1 e2 -> App (getRange (e1, e2)) e1 (defaultNamedArg e2)) e es ensureInScope :: QName -> ScopeM () ensureInScope q = do r <- resolveName q case r of UnknownName -> genericError $ prettyShow q ++ " needs to be in scope to desugar 'do' block" _ -> return () Agda-2.6.0.1/src/full/Agda/Syntax/Fixity.hs-boot0000644000000000000000000000041013466402171017323 0ustar0000000000000000module Agda.Syntax.Fixity where import Control.DeepSeq (NFData) import Data.Data (Data) import Agda.Syntax.Position ( KillRange ) data Fixity' instance KillRange Fixity' instance Data Fixity' instance NFData Fixity' instance Show Fixity' noFixity' :: Fixity' Agda-2.6.0.1/src/full/Agda/Syntax/Fixity.hs0000644000000000000000000003315513466402171016376 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-| Definitions for fixity, precedence levels, and declared syntax. -} module Agda.Syntax.Fixity where import Prelude hiding (concatMap) import Control.DeepSeq import Data.Foldable import Data.Function import qualified Data.List as List import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable import Data.Data (Data) import Agda.Syntax.Position import Agda.Syntax.Common import qualified Agda.Syntax.Abstract.Name as A import Agda.Syntax.Concrete.Name import Agda.Syntax.Notation import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- * Notation coupled with 'Fixity' -- | The notation is handled as the fixity in the renamer. -- Hence, they are grouped together in this type. data Fixity' = Fixity' { theFixity :: !Fixity , theNotation :: Notation , theNameRange :: Range -- ^ Range of the name in the fixity declaration -- (used for correct highlighting, see issue #2140). } deriving (Data, Show) instance Eq Fixity' where Fixity' f n _ == Fixity' f' n' _ = f == f' && n == n' -- | Decorating something with @Fixity'@. data ThingWithFixity x = ThingWithFixity x Fixity' deriving (Functor, Foldable, Traversable, Data, Show) -- | All the notation information related to a name. data NewNotation = NewNotation { notaName :: QName , notaNames :: Set A.Name -- ^ The names the syntax and/or fixity belong to. -- -- Invariant: The set is non-empty. Every name in the list matches -- 'notaName'. , notaFixity :: Fixity -- ^ Associativity and precedence (fixity) of the names. , notation :: Notation -- ^ Syntax associated with the names. , notaIsOperator :: Bool -- ^ True if the notation comes from an operator (rather than a -- syntax declaration). } deriving Show -- | If an operator has no specific notation, then it is computed from -- its name. namesToNotation :: QName -> A.Name -> NewNotation namesToNotation q n = NewNotation { notaName = q , notaNames = Set.singleton n , notaFixity = f , notation = if null syn then syntaxOf (unqualify q) else syn , notaIsOperator = null syn } where Fixity' f syn _ = A.nameFixity n -- | Replace 'noFixity' by 'defaultFixity'. useDefaultFixity :: NewNotation -> NewNotation useDefaultFixity n | notaFixity n == noFixity = n { notaFixity = defaultFixity } | otherwise = n -- | Return the 'IdPart's of a notation, the first part qualified, -- the other parts unqualified. -- This allows for qualified use of operators, e.g., -- @M.for x ∈ xs return e@, or @x ℕ.+ y@. notationNames :: NewNotation -> [QName] notationNames (NewNotation q _ _ parts _) = zipWith ($) (reQualify : repeat QName) [Name noRange InScope [Id $ rangedThing x] | IdPart x <- parts ] where -- The qualification of @q@. modules = init (qnameParts q) -- Putting the qualification onto @x@. reQualify x = List.foldr Qual (QName x) modules -- | Create a 'Notation' (without binders) from a concrete 'Name'. -- Does the obvious thing: -- 'Hole's become 'NormalHole's, 'Id's become 'IdParts'. -- If 'Name' has no 'Hole's, it returns 'noNotation'. syntaxOf :: Name -> Notation syntaxOf (NoName _ _) = noNotation syntaxOf (Name _ _ [_]) = noNotation syntaxOf (Name _ _ xs) = mkSyn 0 xs where -- Turn a concrete name into a Notation, -- numbering the holes from left to right. -- Result will have no 'BindingHole's. mkSyn :: Int -> [NamePart] -> Notation mkSyn n [] = [] mkSyn n (Hole : xs) = NormalHole noRange (defaultNamedArg $ unranged n) : mkSyn (1 + n) xs mkSyn n (Id x : xs) = IdPart (unranged x) : mkSyn n xs noFixity' :: Fixity' noFixity' = Fixity' noFixity noNotation noRange -- | Merges 'NewNotation's that have the same precedence level and -- notation, with two exceptions: -- -- * Operators and notations coming from syntax declarations are kept -- separate. -- -- * If /all/ instances of a given 'NewNotation' have the same -- precedence level or are \"unrelated\", then they are merged. They -- get the given precedence level, if any, and otherwise they become -- unrelated (but related to each other). -- -- If 'NewNotation's that are merged have distinct associativities, -- then they get 'NonAssoc' as their associativity. -- -- Precondition: No 'A.Name' may occur in more than one list element. -- Every 'NewNotation' must have the same 'notaName'. -- -- Postcondition: No 'A.Name' occurs in more than one list element. mergeNotations :: [NewNotation] -> [NewNotation] mergeNotations = map merge . concatMap groupIfLevelsMatch . groupOn (\n -> ( notation n , notaIsOperator n )) where groupIfLevelsMatch :: [NewNotation] -> [[NewNotation]] groupIfLevelsMatch [] = __IMPOSSIBLE__ groupIfLevelsMatch ns@(n : _) = if allEqual (map fixityLevel related) then [sameAssoc (sameLevel ns)] else map (: []) ns where -- Fixities of operators whose precedence level is not Unrelated. related = mapMaybe (\f -> case fixityLevel f of Unrelated -> Nothing Related {} -> Just f) (map notaFixity ns) -- Precondition: All related operators have the same precedence -- level. -- -- Gives all unrelated operators the same level. sameLevel = map (set (_notaFixity . _fixityLevel) level) where level = case related of f : _ -> fixityLevel f [] -> Unrelated -- If all related operators have the same associativity, then the -- unrelated operators get the same associativity, and otherwise -- all operators get the associativity NonAssoc. sameAssoc = map (set (_notaFixity . _fixityAssoc) assoc) where assoc = case related of f : _ | allEqual (map fixityAssoc related) -> fixityAssoc f _ -> NonAssoc merge :: [NewNotation] -> NewNotation merge [] = __IMPOSSIBLE__ merge ns@(n : _) = n { notaNames = Set.unions $ map notaNames ns } -- * Sections -- | Sections, as well as non-sectioned operators. data NotationSection = NotationSection { sectNotation :: NewNotation , sectKind :: NotationKind -- ^ For non-sectioned operators this should match the notation's -- 'notationKind'. , sectLevel :: Maybe PrecedenceLevel -- ^ Effective precedence level. 'Nothing' for closed notations. , sectIsSection :: Bool -- ^ 'False' for non-sectioned operators. } deriving Show -- | Converts a notation to a (non-)section. noSection :: NewNotation -> NotationSection noSection n = NotationSection { sectNotation = n , sectKind = notationKind (notation n) , sectLevel = Just (fixityLevel (notaFixity n)) , sectIsSection = False } -- * Fixity -- | Precedence levels for operators. data PrecedenceLevel = Unrelated -- ^ No fixity declared. | Related !Integer -- ^ Fixity level declared as the @Integer@. deriving (Eq, Ord, Show, Data) -- | Associativity. data Associativity = NonAssoc | LeftAssoc | RightAssoc deriving (Eq, Ord, Show, Data) -- | Fixity of operators. data Fixity = Fixity { fixityRange :: Range -- ^ Range of the whole fixity declaration. , fixityLevel :: !PrecedenceLevel , fixityAssoc :: !Associativity } deriving (Data, Show) instance Eq Fixity where f1 == f2 = compare f1 f2 == EQ instance Ord Fixity where compare = compare `on` (\f -> (fixityLevel f, fixityAssoc f)) -- For @instance Pretty Fixity@, see Agda.Syntax.Concrete.Pretty noFixity :: Fixity noFixity = Fixity noRange Unrelated NonAssoc defaultFixity :: Fixity defaultFixity = Fixity noRange (Related 20) NonAssoc -- | Do we prefer parens around arguments like @λ x → x@ or not? -- See 'lamBrackets'. data ParenPreference = PreferParen | PreferParenless deriving (Eq, Ord, Show, Data) preferParen :: ParenPreference -> Bool preferParen p = PreferParen == p preferParenless :: ParenPreference -> Bool preferParenless p = PreferParenless == p -- * Precendence -- | Precedence is associated with a context. data Precedence = TopCtx | FunctionSpaceDomainCtx | LeftOperandCtx Fixity | RightOperandCtx Fixity ParenPreference | FunctionCtx | ArgumentCtx ParenPreference | InsideOperandCtx | WithFunCtx | WithArgCtx | DotPatternCtx deriving (Show, Data, Eq) instance Pretty Precedence where pretty = text . show -- | When printing we keep track of a stack of precedences in order to be able -- to decide whether it's safe to leave out parens around lambdas. An empty -- stack is equivalent to `TopCtx`. Invariant: `notElem TopCtx`. type PrecedenceStack = [Precedence] pushPrecedence :: Precedence -> PrecedenceStack -> PrecedenceStack pushPrecedence TopCtx _ = [] pushPrecedence p ps = p : ps headPrecedence :: PrecedenceStack -> Precedence headPrecedence [] = TopCtx headPrecedence (p : _) = p -- | Argument context preferring parens. argumentCtx_ :: Precedence argumentCtx_ = ArgumentCtx PreferParen -- | Do we need to bracket an operator application of the given fixity -- in a context with the given precedence. opBrackets :: Fixity -> PrecedenceStack -> Bool opBrackets = opBrackets' False -- | Do we need to bracket an operator application of the given fixity -- in a context with the given precedence. opBrackets' :: Bool -> -- Is the last argument a parenless lambda? Fixity -> PrecedenceStack -> Bool opBrackets' isLam f ps = brack f (headPrecedence ps) where false = isLam && lamBrackets ps -- require more parens for `e >>= λ x → e₁` than `e >>= e₁` brack (Fixity _ (Related n1) LeftAssoc) (LeftOperandCtx (Fixity _ (Related n2) LeftAssoc)) | n1 >= n2 = false brack (Fixity _ (Related n1) RightAssoc) (RightOperandCtx (Fixity _ (Related n2) RightAssoc) _) | n1 >= n2 = false brack f1 (LeftOperandCtx f2) | Related f1 <- fixityLevel f1 , Related f2 <- fixityLevel f2 , f1 > f2 = false brack f1 (RightOperandCtx f2 _) | Related f1 <- fixityLevel f1 , Related f2 <- fixityLevel f2 , f1 > f2 = false brack _ TopCtx = false brack _ FunctionSpaceDomainCtx = false brack _ InsideOperandCtx = false brack _ WithArgCtx = false brack _ WithFunCtx = false brack _ _ = True -- | Does a lambda-like thing (lambda, let or pi) need brackets in the -- given context? A peculiar thing with lambdas is that they don't -- need brackets in certain right operand contexts. To decide we need to look -- at the stack of precedences and not just the current precedence. -- Example: @m₁ >>= (λ x → x) >>= m₂@ (for @_>>=_@ left associative). lamBrackets :: PrecedenceStack -> Bool lamBrackets [] = False lamBrackets (p : ps) = case p of TopCtx -> __IMPOSSIBLE__ ArgumentCtx pref -> preferParen pref || lamBrackets ps RightOperandCtx _ pref -> preferParen pref || lamBrackets ps FunctionSpaceDomainCtx -> True LeftOperandCtx{} -> True FunctionCtx -> True InsideOperandCtx -> True WithFunCtx -> True WithArgCtx -> True DotPatternCtx -> True -- | Does a function application need brackets? appBrackets :: PrecedenceStack -> Bool appBrackets = appBrackets' False -- | Does a function application need brackets? appBrackets' :: Bool -> -- Is the argument of the application a parenless lambda? PrecedenceStack -> Bool appBrackets' isLam ps = brack (headPrecedence ps) where brack ArgumentCtx{} = True brack DotPatternCtx = True brack _ = isLam && lamBrackets ps -- allow e + e₁ λ x → e₂ -- | Does a with application need brackets? withAppBrackets :: PrecedenceStack -> Bool withAppBrackets = brack . headPrecedence where brack TopCtx = False brack FunctionSpaceDomainCtx = False brack WithFunCtx = False brack _ = True -- | Does a function space need brackets? piBrackets :: PrecedenceStack -> Bool piBrackets [] = False piBrackets _ = True roundFixBrackets :: PrecedenceStack -> Bool roundFixBrackets ps = DotPatternCtx == headPrecedence ps instance HasRange Fixity where getRange = fixityRange instance KillRange Fixity where killRange f = f { fixityRange = noRange } instance KillRange Fixity' where killRange (Fixity' f n r) = killRange3 Fixity' f n r instance KillRange x => KillRange (ThingWithFixity x) where killRange (ThingWithFixity c f) = ThingWithFixity (killRange c) f -- * Some lenses _notaFixity :: Lens' Fixity NewNotation _notaFixity f r = f (notaFixity r) <&> \x -> r { notaFixity = x } _fixityAssoc :: Lens' Associativity Fixity _fixityAssoc f r = f (fixityAssoc r) <&> \x -> r { fixityAssoc = x } _fixityLevel :: Lens' PrecedenceLevel Fixity _fixityLevel f r = f (fixityLevel r) <&> \x -> r { fixityLevel = x } ------------------------------------------------------------------------ -- * Printing ------------------------------------------------------------------------ -- deriving instance Show Fixity' ------------------------------------------------------------------------ -- * NFData instances ------------------------------------------------------------------------ instance NFData Fixity' where rnf (Fixity' _ a _) = rnf a -- | Ranges are not forced. instance NFData Fixity where rnf (Fixity _ _ _) = () Agda-2.6.0.1/src/full/Agda/Syntax/Position.hs0000644000000000000000000007244213466402171016730 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-| Position information for syntax. Crucial for giving good error messages. -} module Agda.Syntax.Position ( -- * Positions Position , PositionWithoutFile , Position'(..) , SrcFile , positionInvariant , startPos , movePos , movePosByString , backupPos , startPos' -- * Intervals , Interval , IntervalWithoutFile , Interval'(..) , intervalInvariant , posToInterval , getIntervalFile , iLength , fuseIntervals , setIntervalFile -- * Ranges , Range , Range'(..) , rangeInvariant , consecutiveAndSeparated , intervalsToRange , intervalToRange , rangeIntervals , rangeFile , rightMargin , noRange , posToRange, posToRange' , rStart, rStart' , rEnd, rEnd' , rangeToInterval , rangeToIntervalWithFile , continuous , continuousPerLine , PrintRange(..) , HasRange(..) , SetRange(..) , KillRange(..) , KillRangeT , killRangeMap , killRange1, killRange2, killRange3, killRange4, killRange5, killRange6, killRange7 , killRange8, killRange9, killRange10, killRange11, killRange12, killRange13, killRange14 , killRange15, killRange16, killRange17, killRange18, killRange19 , withRangeOf , fuseRange , fuseRanges , beginningOf , beginningOfFile , interleaveRanges ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Applicative hiding (empty) import Control.Monad import Control.Monad.Writer (runWriter, Writer, tell) import Data.Foldable (Foldable) import qualified Data.Foldable as Fold import Data.Function import Data.Int import Data.List hiding (null) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable (Traversable) import Data.Data (Data) import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Data.Void import GHC.Generics (Generic) import Agda.Utils.FileName import Agda.Utils.List import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible {-------------------------------------------------------------------------- Types and classes --------------------------------------------------------------------------} -- | Represents a point in the input. -- -- If two positions have the same 'srcFile' and 'posPos' components, -- then the final two components should be the same as well, but since -- this can be hard to enforce the program should not rely too much on -- the last two components; they are mainly there to improve error -- messages for the user. -- -- Note the invariant which positions have to satisfy: 'positionInvariant'. data Position' a = Pn { srcFile :: !a -- ^ File. , posPos :: !Int32 -- ^ Position, counting from 1. , posLine :: !Int32 -- ^ Line number, counting from 1. , posCol :: !Int32 -- ^ Column number, counting from 1. } deriving (Data, Functor, Foldable, Traversable, Generic) positionInvariant :: Position' a -> Bool positionInvariant p = posPos p > 0 && posLine p > 0 && posCol p > 0 importantPart :: Position' a -> (a, Int32) importantPart p = (srcFile p, posPos p) instance Eq a => Eq (Position' a) where (==) = (==) `on` importantPart instance Ord a => Ord (Position' a) where compare = compare `on` importantPart type SrcFile = Strict.Maybe AbsolutePath type Position = Position' SrcFile type PositionWithoutFile = Position' () -- | An interval. The @iEnd@ position is not included in the interval. -- -- Note the invariant which intervals have to satisfy: 'intervalInvariant'. data Interval' a = Interval { iStart, iEnd :: !(Position' a) } deriving (Data, Eq, Ord, Functor, Foldable, Traversable, Generic) type Interval = Interval' SrcFile type IntervalWithoutFile = Interval' () intervalInvariant :: Ord a => Interval' a -> Bool intervalInvariant i = all positionInvariant [iStart i, iEnd i] && iStart i <= iEnd i && srcFile (iStart i) == srcFile (iEnd i) -- | Sets the 'srcFile' components of the interval. setIntervalFile :: a -> Interval' b -> Interval' a setIntervalFile f (Interval p1 p2) = Interval (p1 { srcFile = f }) (p2 { srcFile = f }) -- | Gets the 'srcFile' component of the interval. Because of the invariant, -- they are both the same. getIntervalFile :: Interval' a -> a getIntervalFile = srcFile . iStart -- | Converts a file name and two positions to an interval. posToInterval :: a -> PositionWithoutFile -> PositionWithoutFile -> Interval' a posToInterval f p1 p2 = setIntervalFile f $ if p1 < p2 then Interval p1 p2 else Interval p2 p1 -- | The length of an interval. iLength :: Interval' a -> Int32 iLength i = posPos (iEnd i) - posPos (iStart i) -- | A range is a file name, plus a sequence of intervals, assumed to -- point to the given file. The intervals should be consecutive and -- separated. -- -- Note the invariant which ranges have to satisfy: 'rangeInvariant'. data Range' a = NoRange | Range !a (Seq IntervalWithoutFile) deriving (Data, Eq, Ord, Functor, Foldable, Traversable, Generic) type Range = Range' SrcFile instance Null (Range' a) where null NoRange = True null Range{} = False empty = NoRange -- | The intervals that make up the range. The intervals are -- consecutive and separated ('consecutiveAndSeparated'). rangeIntervals :: Range' a -> [IntervalWithoutFile] rangeIntervals NoRange = [] rangeIntervals (Range _ is) = Fold.toList is -- | Turns a file name plus a list of intervals into a range. -- -- Precondition: 'consecutiveAndSeparated'. intervalsToRange :: a -> [IntervalWithoutFile] -> Range' a intervalsToRange _ [] = NoRange intervalsToRange f is = Range f (Seq.fromList is) -- | Are the intervals consecutive and separated, do they all point to -- the same file, and do they satisfy the interval invariant? consecutiveAndSeparated :: Ord a => [Interval' a] -> Bool consecutiveAndSeparated is = all intervalInvariant is && allEqual (map (srcFile . iStart) is) && (null is || and (zipWith (<) (map iEnd (init is)) (map iStart (tail is)))) -- | Range invariant. rangeInvariant :: Ord a => Range' a -> Bool rangeInvariant r = consecutiveAndSeparated (rangeIntervals r) && case r of Range _ is -> not (null is) NoRange -> True -- | The file the range is pointing to. rangeFile :: Range -> SrcFile rangeFile NoRange = Strict.Nothing rangeFile (Range f _) = f -- | Conflate a range to its right margin. rightMargin :: Range -> Range rightMargin r@NoRange = r rightMargin r@(Range f is) = case Seq.viewr is of Seq.EmptyR -> __IMPOSSIBLE__ _ Seq.:> i -> intervalToRange f (i { iStart = iEnd i }) -- | Wrapper to indicate that range should be printed. newtype PrintRange a = PrintRange a deriving (Eq, Ord, HasRange, SetRange, KillRange) -- | Things that have a range are instances of this class. class HasRange t where getRange :: t -> Range instance HasRange Interval where getRange i = intervalToRange (srcFile (iStart i)) (setIntervalFile () i) instance HasRange Range where getRange = id instance HasRange Bool where getRange _ = noRange -- | Precondition: The ranges of the list elements must point to the -- same file (or be empty). instance HasRange a => HasRange [a] where getRange = foldr fuseRange noRange -- | Precondition: The ranges of the list elements must point to the -- same file (or be empty). instance HasRange a => HasRange (NonemptyList a) where getRange = Fold.foldr fuseRange noRange -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b) => HasRange (a,b) where getRange = uncurry fuseRange -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b, HasRange c) => HasRange (a,b,c) where getRange (x,y,z) = getRange (x,(y,z)) -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b, HasRange c, HasRange d) => HasRange (a,b,c,d) where getRange (x,y,z,w) = getRange (x,(y,(z,w))) -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e) => HasRange (a,b,c,d,e) where getRange (x,y,z,w,v) = getRange (x,(y,(z,(w,v)))) -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e, HasRange f) => HasRange (a,b,c,d,e,f) where getRange (x,y,z,w,v,u) = getRange (x,(y,(z,(w,(v,u))))) -- | Precondition: The ranges of the tuple elements must point to the -- same file (or be empty). instance (HasRange a, HasRange b, HasRange c, HasRange d, HasRange e, HasRange f, HasRange g) => HasRange (a,b,c,d,e,f,g) where getRange (x,y,z,w,v,u,t) = getRange (x,(y,(z,(w,(v,(u,t)))))) instance HasRange a => HasRange (Maybe a) where getRange Nothing = noRange getRange (Just a) = getRange a instance (HasRange a, HasRange b) => HasRange (Either a b) where getRange = either getRange getRange -- | If it is also possible to set the range, this is the class. -- -- Instances should satisfy @'getRange' ('setRange' r x) == r@. class HasRange t => SetRange t where setRange :: Range -> t -> t instance SetRange Range where setRange = const instance SetRange a => SetRange [a] where setRange r = fmap $ setRange r -- | Killing the range of an object sets all range information to 'noRange'. class KillRange a where killRange :: KillRangeT a type KillRangeT a = a -> a -- | Remove ranges in keys and values of a map. killRangeMap :: (KillRange k, KillRange v) => KillRangeT (Map k v) killRangeMap = Map.mapKeysMonotonic killRange . Map.map killRange killRange1 :: KillRange a => (a -> b) -> a -> b killRange2 :: (KillRange a, KillRange b) => (a -> b -> c) -> a -> b -> c killRange3 :: (KillRange a, KillRange b, KillRange c) => (a -> b -> c -> d) -> a -> b -> c -> d killRange4 :: (KillRange a, KillRange b, KillRange c, KillRange d) => (a -> b -> c -> d -> e) -> a -> b -> c -> d -> e killRange5 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e ) => (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> f killRange6 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f ) => (a -> b -> c -> d -> e -> f -> g) -> a -> b -> c -> d -> e -> f -> g killRange7 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g ) => (a -> b -> c -> d -> e -> f -> g -> h) -> a -> b -> c -> d -> e -> f -> g -> h killRange8 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h ) => (a -> b -> c -> d -> e -> f -> g -> h -> i) -> a -> b -> c -> d -> e -> f -> g -> h -> i killRange9 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j killRange10 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k killRange11 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l killRange12 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m killRange13 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n killRange14 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o killRange15 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n, KillRange o ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p killRange16 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n, KillRange o, KillRange p ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q killRange17 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n, KillRange o, KillRange p , KillRange q ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r killRange18 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n, KillRange o, KillRange p , KillRange q, KillRange r ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s killRange19 :: ( KillRange a, KillRange b, KillRange c, KillRange d , KillRange e, KillRange f, KillRange g, KillRange h , KillRange i, KillRange j, KillRange k, KillRange l , KillRange m, KillRange n, KillRange o, KillRange p , KillRange q, KillRange r, KillRange s ) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> p -> q -> r -> s -> t killRange1 f a = f (killRange a) killRange2 f a = killRange1 (f $ killRange a) killRange3 f a = killRange2 (f $ killRange a) killRange4 f a = killRange3 (f $ killRange a) killRange5 f a = killRange4 (f $ killRange a) killRange6 f a = killRange5 (f $ killRange a) killRange7 f a = killRange6 (f $ killRange a) killRange8 f a = killRange7 (f $ killRange a) killRange9 f a = killRange8 (f $ killRange a) killRange10 f a = killRange9 (f $ killRange a) killRange11 f a = killRange10 (f $ killRange a) killRange12 f a = killRange11 (f $ killRange a) killRange13 f a = killRange12 (f $ killRange a) killRange14 f a = killRange13 (f $ killRange a) killRange15 f a = killRange14 (f $ killRange a) killRange16 f a = killRange15 (f $ killRange a) killRange17 f a = killRange16 (f $ killRange a) killRange18 f a = killRange17 (f $ killRange a) killRange19 f a = killRange18 (f $ killRange a) instance KillRange Range where killRange _ = noRange instance KillRange Void where killRange = id instance KillRange () where killRange = id instance KillRange Bool where killRange = id instance KillRange Int where killRange = id instance KillRange Integer where killRange = id instance {-# OVERLAPPABLE #-} KillRange a => KillRange [a] where killRange = map killRange instance KillRange a => KillRange (NonemptyList a) where killRange = fmap killRange -- | Overlaps with @KillRange [a]@. instance {-# OVERLAPPING #-} KillRange String where killRange = id instance {-# OVERLAPPABLE #-} KillRange a => KillRange (Map k a) where killRange = fmap killRange instance {-# OVERLAPPABLE #-} (Ord a, KillRange a) => KillRange (Set a) where killRange = Set.map killRange instance (KillRange a, KillRange b) => KillRange (a, b) where killRange (x, y) = (killRange x, killRange y) instance (KillRange a, KillRange b, KillRange c) => KillRange (a, b, c) where killRange (x, y, z) = killRange3 (,,) x y z instance (KillRange a, KillRange b, KillRange c, KillRange d) => KillRange (a, b, c, d) where killRange (x, y, z, u) = killRange4 (,,,) x y z u instance KillRange a => KillRange (Maybe a) where killRange = fmap killRange instance (KillRange a, KillRange b) => KillRange (Either a b) where killRange (Left x) = Left $ killRange x killRange (Right x) = Right $ killRange x ------------------------------------------------------------------------ -- Showing ------------------------------------------------------------------------ -- TODO: 'Show' should output Haskell-parseable representations. -- The following instances are deprecated, and Pretty should be used -- instead. Later, simply derive Show for these types. -- ASR (02 December 2014). This instance is not used anymore (module -- the test suite) when reporting errors. See Issue 1293. instance Show a => Show (Position' (Strict.Maybe a)) where show (Pn (Strict.Just f) _ l c) = show f ++ ":" ++ show l ++ "," ++ show c show (Pn Strict.Nothing _ l c) = show l ++ "," ++ show c instance Show PositionWithoutFile where show p = show (p { srcFile = Strict.Nothing } :: Position) instance Show IntervalWithoutFile where show (Interval s e) = start ++ "-" ++ end where sl = posLine s el = posLine e sc = posCol s ec = posCol e start :: String start = show sl ++ "," ++ show sc end :: String end | sl == el = show ec | otherwise = show el ++ "," ++ show ec instance Show a => Show (Interval' (Strict.Maybe a)) where show i@(Interval s _) = file ++ show (setIntervalFile () i) where file :: String file = case srcFile s of Strict.Nothing -> "" Strict.Just f -> show f ++ ":" instance Show a => Show (Range' (Strict.Maybe a)) where show r = case rangeToIntervalWithFile r of Nothing -> "" Just i -> show i instance Show a => Show (Range' (Maybe a)) where show = show . fmap Strict.toStrict ------------------------------------------------------------------------ -- Printing ------------------------------------------------------------------------ instance Pretty a => Pretty (Position' (Strict.Maybe a)) where pretty (Pn Strict.Nothing _ l c) = pretty l <> "," <> pretty c pretty (Pn (Strict.Just f) _ l c) = pretty f <> ":" <> pretty l <> "," <> pretty c instance Pretty PositionWithoutFile where pretty p = pretty (p { srcFile = Strict.Nothing } :: Position) instance Pretty IntervalWithoutFile where pretty (Interval s e) = start <> "-" <> end where sl = posLine s el = posLine e sc = posCol s ec = posCol e start :: Doc start = pretty sl <> comma <> pretty sc end :: Doc | sl == el = pretty ec | otherwise = pretty el <> comma <> pretty ec instance Pretty a => Pretty (Interval' (Strict.Maybe a)) where pretty i@(Interval s _) = file <> pretty (setIntervalFile () i) where file :: Doc file = case srcFile s of Strict.Nothing -> empty Strict.Just f -> pretty f <> colon instance Pretty a => Pretty (Range' (Strict.Maybe a)) where pretty r = case rangeToIntervalWithFile r of Nothing -> empty Just i -> pretty i instance (Pretty a, HasRange a) => Pretty (PrintRange a) where pretty (PrintRange a) = pretty a <+> parens ("at" <+> pretty (getRange a)) {-------------------------------------------------------------------------- Functions on positions and ranges --------------------------------------------------------------------------} -- | The first position in a file: position 1, line 1, column 1. startPos' :: a -> Position' a startPos' f = Pn { srcFile = f , posPos = 1 , posLine = 1 , posCol = 1 } -- | The first position in a file: position 1, line 1, column 1. startPos :: Maybe AbsolutePath -> Position startPos = startPos' . Strict.toStrict -- | Ranges between two unknown positions noRange :: Range' a noRange = NoRange -- | Advance the position by one character. -- A newline character (@'\n'@) moves the position to the first -- character in the next line. Any other character moves the -- position to the next column. movePos :: Position' a -> Char -> Position' a movePos (Pn f p l c) '\n' = Pn f (p + 1) (l + 1) 1 movePos (Pn f p l c) _ = Pn f (p + 1) l (c + 1) -- | Advance the position by a string. -- -- > movePosByString = foldl' movePos movePosByString :: Position' a -> String -> Position' a movePosByString = foldl' movePos -- | Backup the position by one character. -- -- Precondition: The character must not be @'\n'@. backupPos :: Position' a -> Position' a backupPos (Pn f p l c) = Pn f (p - 1) l (c - 1) -- | Converts a file name and two positions to a range. posToRange' :: a -> PositionWithoutFile -> PositionWithoutFile -> Range' a posToRange' f p1 p2 = intervalToRange f (posToInterval () p1 p2) -- | Converts two positions to a range. -- -- Precondition: The positions have to point to the same file. posToRange :: Position' a -> Position' a -> Range' a posToRange p1 p2 = posToRange' (srcFile p1) (p1 { srcFile = () }) (p2 { srcFile = () }) -- | Converts a file name and an interval to a range. intervalToRange :: a -> IntervalWithoutFile -> Range' a intervalToRange f i = Range f (Seq.singleton i) -- | Converts a range to an interval, if possible. rangeToIntervalWithFile :: Range' a -> Maybe (Interval' a) rangeToIntervalWithFile NoRange = Nothing rangeToIntervalWithFile (Range f is) = case (Seq.viewl is, Seq.viewr is) of (head Seq.:< _, _ Seq.:> last) -> Just $ setIntervalFile f $ Interval { iStart = iStart head , iEnd = iEnd last } _ -> __IMPOSSIBLE__ -- | Converts a range to an interval, if possible. Note that the -- information about the source file is lost. rangeToInterval :: Range' a -> Maybe IntervalWithoutFile rangeToInterval NoRange = Nothing rangeToInterval (Range _ is) = case (Seq.viewl is, Seq.viewr is) of (head Seq.:< _, _ Seq.:> last) -> Just $ Interval { iStart = iStart head , iEnd = iEnd last } _ -> __IMPOSSIBLE__ -- | Returns the shortest continuous range containing the given one. continuous :: Range' a -> Range' a continuous NoRange = NoRange continuous r@(Range f _) = case rangeToInterval r of Nothing -> __IMPOSSIBLE__ Just i -> intervalToRange f i -- | Removes gaps between intervals on the same line. continuousPerLine :: Ord a => Range' a -> Range' a continuousPerLine r@NoRange = r continuousPerLine r@(Range f _) = Range f (Seq.unfoldr step (rangeIntervals r)) where step [] = Nothing step [i] = Just (i, []) step (i : is@(j : js)) | sameLine = step (fuseIntervals i j : js) | otherwise = Just (i, is) where sameLine = posLine (iEnd i) == posLine (iStart j) -- | The initial position in the range, if any. rStart' :: Range' a -> Maybe PositionWithoutFile rStart' r = iStart <$> rangeToInterval r -- | The initial position in the range, if any. rStart :: Range' a -> Maybe (Position' a) rStart NoRange = Nothing rStart r@(Range f _) = (\p -> p { srcFile = f }) <$> rStart' r -- | The position after the final position in the range, if any. rEnd' :: Range' a -> Maybe PositionWithoutFile rEnd' r = iEnd <$> rangeToInterval r -- | The position after the final position in the range, if any. rEnd :: Range' a -> Maybe (Position' a) rEnd NoRange = Nothing rEnd r@(Range f _) = (\p -> p { srcFile = f }) <$> rEnd' r -- | Finds the least interval which covers the arguments. -- -- Precondition: The intervals must point to the same file. fuseIntervals :: Ord a => Interval' a -> Interval' a -> Interval' a fuseIntervals x y = Interval { iStart = head ss, iEnd = last es } where ss = sort [iStart x, iStart y] es = sort [iEnd x, iEnd y] -- | @fuseRanges r r'@ unions the ranges @r@ and @r'@. -- -- Meaning it finds the least range @r0@ that covers @r@ and @r'@. -- -- Precondition: The ranges must point to the same file (or be empty). fuseRanges :: (Ord a) => Range' a -> Range' a -> Range' a fuseRanges NoRange is2 = is2 fuseRanges is1 NoRange = is1 fuseRanges (Range f is1) (Range _ is2) = Range f (fuse is1 is2) where fuse is1 is2 = case (Seq.viewl is1, Seq.viewr is1, Seq.viewl is2, Seq.viewr is2) of (Seq.EmptyL, _, _, _) -> is2 (_, _, Seq.EmptyL, _) -> is1 (s1 Seq.:< r1, l1 Seq.:> e1, s2 Seq.:< r2, l2 Seq.:> e2) -- Special cases. | iEnd e1 < iStart s2 -> is1 Seq.>< is2 | iEnd e2 < iStart s1 -> is2 Seq.>< is1 | iEnd e1 == iStart s2 -> mergeTouching l1 e1 s2 r2 | iEnd e2 == iStart s1 -> mergeTouching l2 e2 s1 r1 -- General cases. | iEnd s1 < iStart s2 -> outputLeftPrefix s1 r1 s2 is2 | iEnd s2 < iStart s1 -> outputLeftPrefix s2 r2 s1 is1 | iEnd s1 < iEnd s2 -> fuseSome s1 r1 s2 r2 | otherwise -> fuseSome s2 r2 s1 r1 _ -> __IMPOSSIBLE__ mergeTouching l e s r = l Seq.>< i Seq.<| r where i = Interval { iStart = iStart e, iEnd = iEnd s } -- The following two functions could use binary search instead of -- linear. outputLeftPrefix s1 r1 s2 is2 = s1 Seq.<| r1' Seq.>< fuse r1'' is2 where (r1', r1'') = Seq.spanl (\s -> iEnd s < iStart s2) r1 fuseSome s1 r1 s2 r2 = fuse r1' (fuseIntervals s1 s2 Seq.<| r2) where r1' = Seq.dropWhileL (\s -> iEnd s <= iEnd s2) r1 -- | Precondition: The ranges must point to the same file (or be -- empty). fuseRange :: (HasRange u, HasRange t) => u -> t -> Range fuseRange x y = fuseRanges (getRange x) (getRange y) -- | @beginningOf r@ is an empty range (a single, empty interval) -- positioned at the beginning of @r@. If @r@ does not have a -- beginning, then 'noRange' is returned. beginningOf :: Range -> Range beginningOf NoRange = NoRange beginningOf r@(Range f _) = case rStart' r of Nothing -> __IMPOSSIBLE__ Just pos -> posToRange' f pos pos -- | @beginningOfFile r@ is an empty range (a single, empty interval) -- at the beginning of @r@'s starting position's file. If there is no -- such position, then an empty range is returned. beginningOfFile :: Range -> Range beginningOfFile NoRange = NoRange beginningOfFile (Range f _) = posToRange' f p p where p = startPos' () -- | @x \`withRangeOf\` y@ sets the range of @x@ to the range of @y@. withRangeOf :: (SetRange t, HasRange u) => t -> u -> t x `withRangeOf` y = setRange (getRange y) x -- | Interleaves two streams of ranged elements -- -- It will report the conflicts as a list of conflicting pairs. -- In case of conflict, the element with the earliest start position -- is placed first. In case of a tie, the element with the earliest -- ending position is placed first. If both tie, the element from the -- first list is placed first. interleaveRanges :: (HasRange a) => [a] -> [a] -> ([a], [(a,a)]) interleaveRanges as bs = runWriter$ go as bs where go [] as = return as go as [] = return as go as@(a:as') bs@(b:bs') = let ra = getRange a rb = getRange b ra0 = rStart ra rb0 = rStart rb ra1 = rEnd ra rb1 = rEnd rb in if ra1 <= rb0 then (a:) <$> go as' bs else if rb1 <= ra0 then (b:) <$> go as bs' else do tell [(a,b)] if ra0 < rb0 || (ra0 == rb0 && ra1 <= rb1) then (a:) <$> go as' bs else (b:) <$> go as bs' Agda-2.6.0.1/src/full/Agda/Syntax/Treeless.hs0000644000000000000000000001430513466402171016704 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE PatternSynonyms #-} -- | The treeless syntax is intended to be used as input for the compiler backends. -- It is more low-level than Internal syntax and is not used for type checking. -- -- Some of the features of treeless syntax are: -- - case expressions instead of case trees -- - no instantiated datatypes / constructors module Agda.Syntax.Treeless ( module Agda.Syntax.Abstract.Name , module Agda.Syntax.Treeless ) where import Control.Arrow (first, second) import Data.Map (Map) import Data.Data (Data) import Data.Word import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Abstract.Name data Compiled = Compiled { cTreeless :: TTerm , cArgUsage :: [Bool] } deriving (Data, Show, Eq, Ord) -- | The treeless compiler can behave differently depending on the target -- language evaluation strategy. For instance, more aggressive erasure for -- lazy targets. data EvaluationStrategy = LazyEvaluation | EagerEvaluation deriving (Eq, Show) type Args = [TTerm] -- this currently assumes that TApp is translated in a lazy/cbn fashion. -- The AST should also support strict translation. -- -- All local variables are using de Bruijn indices. data TTerm = TVar Int | TPrim TPrim | TDef QName | TApp TTerm Args | TLam TTerm | TLit Literal | TCon QName | TLet TTerm TTerm -- ^ introduces a new local binding. The bound term -- MUST only be evaluated if it is used inside the body. -- Sharing may happen, but is optional. -- It is also perfectly valid to just inline the bound term in the body. | TCase Int CaseInfo TTerm [TAlt] -- ^ Case scrutinee (always variable), case type, default value, alternatives -- First, all TACon alternatives are tried; then all TAGuard alternatives -- in top to bottom order. -- TACon alternatives must not overlap. | TUnit -- used for levels right now | TSort | TErased | TCoerce TTerm -- ^ Used by the GHC backend | TError TError -- ^ A runtime error, something bad has happened. deriving (Data, Show, Eq, Ord) -- | Compiler-related primitives. This are NOT the same thing as primitives -- in Agda's surface or internal syntax! -- Some of the primitives have a suffix indicating which type of arguments they take, -- using the following naming convention: -- Char | Type -- C | Character -- F | Float -- I | Integer -- Q | QName -- S | String data TPrim = PAdd | PAdd64 | PSub | PSub64 | PMul | PMul64 | PQuot | PQuot64 | PRem | PRem64 | PGeq | PLt | PLt64 | PEqI | PEq64 | PEqF | PEqS | PEqC | PEqQ | PIf | PSeq | PITo64 | P64ToI deriving (Data, Show, Eq, Ord) isPrimEq :: TPrim -> Bool isPrimEq p = p `elem` [PEqI, PEqF, PEqS, PEqC, PEqQ, PEq64] mkTApp :: TTerm -> Args -> TTerm mkTApp x [] = x mkTApp (TApp x as) bs = TApp x (as ++ bs) mkTApp x as = TApp x as tAppView :: TTerm -> [TTerm] tAppView = view where view t = case t of TApp a bs -> view a ++ bs _ -> [t] tLetView :: TTerm -> ([TTerm], TTerm) tLetView (TLet e b) = first (e :) $ tLetView b tLetView e = ([], e) tLamView :: TTerm -> (Int, TTerm) tLamView = go 0 where go n (TLam b) = go (n + 1) b go n t = (n, t) mkTLam :: Int -> TTerm -> TTerm mkTLam n b = foldr ($) b $ replicate n TLam -- | Introduces a new binding mkLet :: TTerm -> TTerm -> TTerm mkLet x body = TLet x body tInt :: Integer -> TTerm tInt = TLit . LitNat noRange intView :: TTerm -> Maybe Integer intView (TLit (LitNat _ x)) = Just x intView _ = Nothing word64View :: TTerm -> Maybe Word64 word64View (TLit (LitWord64 _ x)) = Just x word64View _ = Nothing tPlusK :: Integer -> TTerm -> TTerm tPlusK 0 n = n tPlusK k n | k < 0 = tOp PSub n (tInt (-k)) tPlusK k n = tOp PAdd (tInt k) n -- -(k + n) tNegPlusK :: Integer -> TTerm -> TTerm tNegPlusK k n = tOp PSub (tInt (-k)) n plusKView :: TTerm -> Maybe (Integer, TTerm) plusKView (TApp (TPrim PAdd) [k, n]) | Just k <- intView k = Just (k, n) plusKView (TApp (TPrim PSub) [n, k]) | Just k <- intView k = Just (-k, n) plusKView _ = Nothing negPlusKView :: TTerm -> Maybe (Integer, TTerm) negPlusKView (TApp (TPrim PSub) [k, n]) | Just k <- intView k = Just (-k, n) negPlusKView _ = Nothing tOp :: TPrim -> TTerm -> TTerm -> TTerm tOp op a b = TPOp op a b pattern TPOp :: TPrim -> TTerm -> TTerm -> TTerm pattern TPOp op a b = TApp (TPrim op) [a, b] pattern TPFn :: TPrim -> TTerm -> TTerm pattern TPFn op a = TApp (TPrim op) [a] tUnreachable :: TTerm tUnreachable = TError TUnreachable tIfThenElse :: TTerm -> TTerm -> TTerm -> TTerm tIfThenElse c i e = TApp (TPrim PIf) [c, i, e] data CaseType = CTData QName -- case on datatype | CTNat | CTInt | CTChar | CTString | CTFloat | CTQName deriving (Data, Show, Eq, Ord) data CaseInfo = CaseInfo { caseLazy :: Bool , caseType :: CaseType } deriving (Data, Show, Eq, Ord) data TAlt = TACon { aCon :: QName, aArity :: Int, aBody :: TTerm } -- ^ Matches on the given constructor. If the match succeeds, -- the pattern variables are prepended to the current environment -- (pushes all existing variables aArity steps further away) | TAGuard { aGuard :: TTerm, aBody :: TTerm } -- ^ Binds no variables | TALit { aLit :: Literal, aBody:: TTerm } deriving (Data, Show, Eq, Ord) data TError = TUnreachable -- ^ Code which is unreachable. E.g. absurd branches or missing case defaults. -- Runtime behaviour of unreachable code is undefined, but preferably -- the program will exit with an error message. The compiler is free -- to assume that this code is unreachable and to remove it. deriving (Data, Show, Eq, Ord) class Unreachable a where -- | Checks if the given expression is unreachable or not. isUnreachable :: a -> Bool instance Unreachable TAlt where isUnreachable = isUnreachable . aBody instance Unreachable TTerm where isUnreachable (TError TUnreachable{}) = True isUnreachable (TLet _ b) = isUnreachable b isUnreachable _ = False instance KillRange Compiled where killRange c = c -- bogus, but not used anyway Agda-2.6.0.1/src/full/Agda/Syntax/Notation.hs0000644000000000000000000002263013466402171016711 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-| As a concrete name, a notation is a non-empty list of alternating 'IdPart's and holes. In contrast to concrete names, holes can be binders. Example: @ syntax fmap (λ x → e) xs = for x ∈ xs return e @ The declared notation for @fmap@ is @for_∈_return_@ where the first hole is a binder. -} module Agda.Syntax.Notation where import Control.DeepSeq import Control.Monad import qualified Data.List as List import Data.Maybe import Data.Data (Data) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Utils.Except ( MonadError(throwError) ) import Agda.Utils.List import Agda.Utils.Impossible #include "undefined.h" -- | Data type constructed in the Happy parser; converted to 'GenPart' -- before it leaves the Happy code. data HoleName = LambdaHole { _bindHoleName :: RString , holeName :: RString } -- ^ @\ x -> y@; 1st argument is the bound name (unused for now). | ExprHole { holeName :: RString } -- ^ Simple named hole with hiding. -- | Is the hole a binder? isLambdaHole :: HoleName -> Bool isLambdaHole (LambdaHole _ _) = True isLambdaHole _ = False -- | Notation as provided by the @syntax@ declaration. type Notation = [GenPart] -- | Part of a Notation data GenPart = BindHole Range (Ranged Int) -- ^ Argument is the position of the hole (with binding) where the binding should occur. -- First range is the rhs range and second is the binder. | NormalHole Range (NamedArg (Ranged Int)) -- ^ Argument is where the expression should go. | WildHole (Ranged Int) -- ^ An underscore in binding position. | IdPart RString deriving (Data, Show) instance Eq GenPart where BindHole _ i == BindHole _ j = i == j NormalHole _ x == NormalHole _ y = x == y WildHole i == WildHole j = i == j IdPart x == IdPart y = x == y _ == _ = False instance Ord GenPart where BindHole _ i `compare` BindHole _ j = i `compare` j NormalHole _ x `compare` NormalHole _ y = x `compare` y WildHole i `compare` WildHole j = i `compare` j IdPart x `compare` IdPart y = x `compare` y BindHole{} `compare` _ = LT _ `compare` BindHole{} = GT NormalHole{} `compare` _ = LT _ `compare` NormalHole{} = GT WildHole{} `compare` _ = LT _ `compare` WildHole{} = GT instance HasRange GenPart where getRange p = case p of IdPart x -> getRange x BindHole r _ -> r WildHole i -> getRange i NormalHole r _ -> r instance SetRange GenPart where setRange r p = case p of IdPart x -> IdPart x BindHole _ i -> BindHole r i WildHole i -> WildHole i NormalHole _ i -> NormalHole r i instance KillRange GenPart where killRange p = case p of IdPart x -> IdPart $ killRange x BindHole _ i -> BindHole noRange $ killRange i WildHole i -> WildHole $ killRange i NormalHole _ x -> NormalHole noRange $ killRange x instance NFData GenPart where rnf (BindHole _ a) = rnf a rnf (NormalHole _ a) = rnf a rnf (WildHole a) = rnf a rnf (IdPart a) = rnf a -- | Get a flat list of identifier parts of a notation. stringParts :: Notation -> [String] stringParts gs = [ rangedThing x | IdPart x <- gs ] -- | Target argument position of a part (Nothing if it is not a hole). holeTarget :: GenPart -> Maybe Int holeTarget (BindHole _ n) = Just $ rangedThing n holeTarget (WildHole n) = Just $ rangedThing n holeTarget (NormalHole _ n) = Just $ rangedThing $ namedArg n holeTarget IdPart{} = Nothing -- | Is the part a hole? WildHoles don't count since they don't correspond to -- anything the user writes. isAHole :: GenPart -> Bool isAHole BindHole{} = True isAHole NormalHole{} = True isAHole WildHole{} = False isAHole IdPart{} = False -- | Is the part a normal hole? isNormalHole :: GenPart -> Bool isNormalHole NormalHole{} = True isNormalHole BindHole{} = False isNormalHole WildHole{} = False isNormalHole IdPart{} = False -- | Is the part a binder? isBindingHole :: GenPart -> Bool isBindingHole BindHole{} = True isBindingHole WildHole{} = True isBindingHole _ = False -- | Classification of notations. data NotationKind = InfixNotation -- ^ Ex: @_bla_blub_@. | PrefixNotation -- ^ Ex: @_bla_blub@. | PostfixNotation -- ^ Ex: @bla_blub_@. | NonfixNotation -- ^ Ex: @bla_blub@. | NoNotation deriving (Eq, Show) -- | Classify a notation by presence of leading and/or trailing -- /normal/ holes. notationKind :: Notation -> NotationKind notationKind [] = NoNotation notationKind syn = case (isNormalHole $ head syn, isNormalHole $ last syn) of (True , True ) -> InfixNotation (True , False) -> PostfixNotation (False, True ) -> PrefixNotation (False, False) -> NonfixNotation -- | From notation with names to notation with indices. -- -- Example: -- @ -- ids = ["for", "x", "∈", "xs", "return", "e"] -- holes = [ LambdaHole "x" "e", ExprHole "xs" ] -- @ -- creates the notation -- @ -- [ IdPart "for" , BindHole 0 -- , IdPart "∈" , NormalHole 1 -- , IdPart "return" , NormalHole 0 -- ] -- @ mkNotation :: [NamedArg HoleName] -> [RString] -> Either String Notation mkNotation _ [] = throwError "empty notation is disallowed" mkNotation holes ids = do unless uniqueHoleNames $ throwError "syntax must use unique argument names" let xs :: Notation = map mkPart ids unless (isAlternating xs) $ throwError $ concat [ "syntax must alternate holes (" , prettyHoles , ") and non-holes (" , prettyNonHoles xs , ")" ] unless (isExprLinear xs) $ throwError "syntax must use holes exactly once" unless (isLambdaLinear xs) $ throwError "syntax must use binding holes exactly once" -- Andreas, 2018-10-18, issue #3285: -- syntax that is just a single hole is ill-formed and crashes the operator parser when (isSingleHole xs) $ throwError "syntax cannot be a single hole" return $ insertWildHoles xs where holeNames :: [RString] holeNames = map namedArg holes >>= \case LambdaHole x y -> [x, y] ExprHole y -> [y] prettyHoles :: String prettyHoles = List.unwords $ map (rawNameToString . rangedThing) holeNames nonHoleNames :: Notation -> [RString] nonHoleNames xs = flip mapMaybe xs $ \case WildHole{} -> Just $ unranged "_" IdPart x -> Just x BindHole{} -> Nothing NormalHole{} -> Nothing prettyNonHoles :: Notation -> String prettyNonHoles = List.unwords . map (rawNameToString . rangedThing) . nonHoleNames mkPart ident = maybe (IdPart ident) (`withRangeOf` ident) $ lookup ident holeMap holeNumbers = [0 .. length holes - 1] numberedHoles :: [(Int, NamedArg HoleName)] numberedHoles = zip holeNumbers holes -- The WildHoles don't correspond to anything in the right-hand side so -- we add them next to their corresponding body. Slightly subtle: due to -- the way the operator parsing works they can't be added first or last. insertWildHoles :: [GenPart] -> [GenPart] insertWildHoles xs = foldr ins xs wilds where wilds = [ i | (_, WildHole i) <- holeMap ] ins w (NormalHole r h : hs) | namedArg h == w = NormalHole r h : WildHole w : hs ins w (h : hs) = h : insBefore w hs ins _ [] = __IMPOSSIBLE__ insBefore w (NormalHole r h : hs) | namedArg h == w = WildHole w : NormalHole r h : hs insBefore w (h : hs) = h : insBefore w hs insBefore _ [] = __IMPOSSIBLE__ -- Create a map (association list) from hole names to holes. -- A @LambdaHole@ contributes two entries: -- both names are mapped to the same number, -- but distinguished by BindHole vs. NormalHole. holeMap :: [(RString, GenPart)] holeMap = do (i, h) <- numberedHoles -- v This range is filled in by mkPart let ri x = Ranged (getRange x) i normalHole y = NormalHole noRange $ fmap (ri y <$) h case namedArg h of ExprHole y -> [(y, normalHole y)] LambdaHole x y | "_" <- rangedThing x -> [(x, WildHole (ri x)), (y, normalHole y)] | otherwise -> [(x, BindHole noRange (ri x)), (y, normalHole y)] -- Filled in by mkPart -- Check whether all hole names are distinct. -- The hole names are the keys of the @holeMap@. uniqueHoleNames = distinct [ x | (x, _) <- holeMap, rangedThing x /= "_" ] isExprLinear xs = List.sort [ i | x <- xs, isNormalHole x, let Just i = holeTarget x ] == holeNumbers isLambdaLinear xs = List.sort [ rangedThing x | BindHole _ x <- xs ] == [ i | (i, h) <- numberedHoles, LambdaHole x _ <- [namedArg h], rangedThing x /= "_" ] isAlternating :: [GenPart] -> Bool isAlternating [] = __IMPOSSIBLE__ isAlternating [x] = True isAlternating (x:y:xs) = isAHole x /= isAHole y && isAlternating (y:xs) isSingleHole :: [GenPart] -> Bool isSingleHole = \case [ IdPart{} ] -> False [ _hole ] -> True _ -> False noNotation :: Notation noNotation = [] Agda-2.6.0.1/src/full/Agda/Syntax/Literal.hs0000644000000000000000000001201313466402171016504 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} module Agda.Syntax.Literal where import Control.DeepSeq import Data.Char import Data.Word import Data.Data (Data) import Numeric.IEEE ( IEEE(identicalIEEE) ) import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Abstract.Name import Agda.Utils.Pretty import Agda.Utils.FileName data Literal = LitNat Range !Integer | LitWord64 Range !Word64 | LitFloat Range !Double | LitString Range String | LitChar Range !Char | LitQName Range QName | LitMeta Range AbsolutePath MetaId deriving Data instance Show Literal where showsPrec p l = showParen (p > 9) $ case l of LitNat _ n -> sh "LitNat _" n LitWord64 _ n -> sh "LitWord64 _" n LitFloat _ x -> sh "LitFloat _" x LitString _ s -> sh "LitString _" s LitChar _ c -> sh "LitChar _" c LitQName _ q -> sh "LitQName _" q LitMeta _ _ x -> sh "LitMeta _ _" x where sh :: Show a => String -> a -> ShowS sh c x = showString (c ++ " ") . shows x instance Pretty Literal where pretty (LitNat _ n) = text $ show n pretty (LitWord64 _ n) = text $ show n pretty (LitFloat _ d) = text $ show d pretty (LitString _ s) = text $ showString' s "" pretty (LitChar _ c) = text $ "'" ++ showChar' c "" ++ "'" pretty (LitQName _ x) = pretty x pretty (LitMeta _ _ x) = pretty x showString' :: String -> ShowS showString' s = foldr (.) id $ [ showString "\"" ] ++ map showChar' s ++ [ showString "\"" ] showChar' :: Char -> ShowS showChar' '"' = showString "\\\"" showChar' c | escapeMe c = showLitChar c | otherwise = showString [c] where escapeMe c = not (isPrint c) || c == '\\' instance Eq Literal where LitNat _ n == LitNat _ m = n == m -- ASR (2016-09-29). We use bitwise equality for comparing Double -- because Haskell's Eq, which equates 0.0 and -0.0, allows to prove -- a contradiction (see Issue #2169). LitWord64 _ n == LitWord64 _ m = n == m LitFloat _ x == LitFloat _ y = identicalIEEE x y || (isNaN x && isNaN y) LitString _ s == LitString _ t = s == t LitChar _ c == LitChar _ d = c == d LitQName _ x == LitQName _ y = x == y LitMeta _ f x == LitMeta _ g y = (f, x) == (f, y) _ == _ = False instance Ord Literal where LitNat _ n `compare` LitNat _ m = n `compare` m LitWord64 _ n `compare` LitWord64 _ m = n `compare` m LitFloat _ x `compare` LitFloat _ y = compareFloat x y LitString _ s `compare` LitString _ t = s `compare` t LitChar _ c `compare` LitChar _ d = c `compare` d LitQName _ x `compare` LitQName _ y = x `compare` y LitMeta _ f x `compare` LitMeta _ g y = (f, x) `compare` (g, y) compare LitNat{} _ = LT compare _ LitNat{} = GT compare LitWord64{} _ = LT compare _ LitWord64{} = GT compare LitFloat{} _ = LT compare _ LitFloat{} = GT compare LitString{} _ = LT compare _ LitString{} = GT compare LitChar{} _ = LT compare _ LitChar{} = GT compare LitQName{} _ = LT compare _ LitQName{} = GT -- compare LitMeta{} _ = LT -- compare _ LitMeta{} = GT -- NOTE: This is not the same ordering as primFloatNumericalEquality! -- This ordering must be a total order of all allowed float values, -- while primFloatNumericalEquality is only a preorder compareFloat :: Double -> Double -> Ordering compareFloat x y | identicalIEEE x y = EQ | isNegInf x = LT | isNegInf y = GT | isNaN x && isNaN y = EQ | isNaN x = LT | isNaN y = GT | isNegativeZero x && x == y = LT | isNegativeZero y && x == y = GT | otherwise = compare x y where isNegInf z = z < 0 && isInfinite z instance HasRange Literal where getRange (LitNat r _) = r getRange (LitWord64 r _) = r getRange (LitFloat r _) = r getRange (LitString r _) = r getRange (LitChar r _) = r getRange (LitQName r _) = r getRange (LitMeta r _ _) = r instance SetRange Literal where setRange r (LitNat _ x) = LitNat r x setRange r (LitWord64 _ x) = LitWord64 r x setRange r (LitFloat _ x) = LitFloat r x setRange r (LitString _ x) = LitString r x setRange r (LitChar _ x) = LitChar r x setRange r (LitQName _ x) = LitQName r x setRange r (LitMeta _ f x) = LitMeta r f x instance KillRange Literal where killRange (LitNat r x) = LitNat (killRange r) x killRange (LitWord64 r x) = LitWord64 (killRange r) x killRange (LitFloat r x) = LitFloat (killRange r) x killRange (LitString r x) = LitString (killRange r) x killRange (LitChar r x) = LitChar (killRange r) x killRange (LitQName r x) = killRange2 LitQName r x killRange (LitMeta r f x) = LitMeta (killRange r) f x -- | Ranges are not forced. instance NFData Literal where rnf (LitNat _ _) = () rnf (LitWord64 _ _) = () rnf (LitFloat _ _) = () rnf (LitString _ a) = rnf a rnf (LitChar _ _) = () rnf (LitQName _ a) = rnf a rnf (LitMeta _ _ x) = rnf x Agda-2.6.0.1/src/full/Agda/Syntax/Info.hs0000644000000000000000000001774313466402171016022 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| An info object contains additional information about a piece of abstract syntax that isn't part of the actual syntax. For instance, it might contain the source code position of an expression or the concrete syntax that an internal expression originates from. -} module Agda.Syntax.Info where import Prelude hiding (null) import Data.Data (Data) import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Concrete import Agda.Syntax.Fixity import Agda.Syntax.Scope.Base (ScopeInfo, emptyScopeInfo) import Agda.Utils.Function import Agda.Utils.Null {-------------------------------------------------------------------------- Meta information --------------------------------------------------------------------------} data MetaInfo = MetaInfo { metaRange :: Range , metaScope :: ScopeInfo , metaNumber :: Maybe MetaId , metaNameSuggestion :: String } deriving (Data, Show, Eq) emptyMetaInfo :: MetaInfo emptyMetaInfo = MetaInfo { metaRange = noRange , metaScope = emptyScopeInfo , metaNumber = Nothing , metaNameSuggestion = "" } instance HasRange MetaInfo where getRange = metaRange instance KillRange MetaInfo where killRange m = m { metaRange = noRange } {-------------------------------------------------------------------------- General expression information --------------------------------------------------------------------------} newtype ExprInfo = ExprRange Range deriving (Data, Show, Eq, Null) exprNoRange :: ExprInfo exprNoRange = ExprRange noRange instance HasRange ExprInfo where getRange (ExprRange r) = r instance KillRange ExprInfo where killRange (ExprRange r) = exprNoRange {-------------------------------------------------------------------------- Application information --------------------------------------------------------------------------} -- | Information about application data AppInfo = AppInfo { appRange :: Range , appOrigin :: Origin , appParens :: ParenPreference -- ^ Do we prefer a appbda argument with or without parens? } deriving (Data, Show, Eq, Ord) -- | Default is system inserted and prefer parens. defaultAppInfo :: Range -> AppInfo defaultAppInfo r = AppInfo{ appRange = r, appOrigin = Inserted, appParens = PreferParen } -- | `AppInfo` with no range information. defaultAppInfo_ :: AppInfo defaultAppInfo_ = defaultAppInfo noRange instance HasRange AppInfo where getRange = appRange instance KillRange AppInfo where killRange (AppInfo r o p) = AppInfo (killRange r) o p instance LensOrigin AppInfo where getOrigin = appOrigin setOrigin o i = i { appOrigin = o } {-------------------------------------------------------------------------- Module information --------------------------------------------------------------------------} data ModuleInfo = ModuleInfo { minfoRange :: Range , minfoAsTo :: Range -- ^ The range of the \"as\" and \"to\" keywords, -- if any. Retained for highlighting purposes. , minfoAsName :: Maybe C.Name -- ^ The \"as\" module name, if any. Retained for highlighting purposes. , minfoOpenShort :: Maybe OpenShortHand , minfoDirective :: Maybe ImportDirective -- ^ Retained for @abstractToConcrete@ of 'ModuleMacro'. } deriving (Data, Eq) deriving instance Show ModuleInfo instance HasRange ModuleInfo where getRange = minfoRange instance SetRange ModuleInfo where setRange r i = i { minfoRange = r } instance KillRange ModuleInfo where killRange m = m { minfoRange = noRange } --------------------------------------------------------------------------- -- Let info --------------------------------------------------------------------------- newtype LetInfo = LetRange Range deriving (Data, Show, Eq, Null) instance HasRange LetInfo where getRange (LetRange r) = r instance KillRange LetInfo where killRange (LetRange r) = LetRange noRange {-------------------------------------------------------------------------- Definition information (declarations that actually define something) --------------------------------------------------------------------------} data DefInfo = DefInfo { defFixity :: Fixity' , defAccess :: Access , defAbstract :: IsAbstract , defInstance :: IsInstance , defMacro :: IsMacro , defInfo :: DeclInfo } deriving (Data, Show, Eq) mkDefInfo :: Name -> Fixity' -> Access -> IsAbstract -> Range -> DefInfo mkDefInfo x f a ab r = DefInfo f a ab NotInstanceDef NotMacroDef (DeclInfo x r) -- | Same as @mkDefInfo@ but where we can also give the @IsInstance@ mkDefInfoInstance :: Name -> Fixity' -> Access -> IsAbstract -> IsInstance -> IsMacro -> Range -> DefInfo mkDefInfoInstance x f a ab i m r = DefInfo f a ab i m (DeclInfo x r) instance HasRange DefInfo where getRange = getRange . defInfo instance SetRange DefInfo where setRange r i = i { defInfo = setRange r (defInfo i) } instance KillRange DefInfo where killRange i = i { defInfo = killRange $ defInfo i } {-------------------------------------------------------------------------- General declaration information --------------------------------------------------------------------------} data DeclInfo = DeclInfo { declName :: Name , declRange :: Range } deriving (Data, Show, Eq) instance HasRange DeclInfo where getRange = declRange instance SetRange DeclInfo where setRange r i = i { declRange = r } instance KillRange DeclInfo where killRange i = i { declRange = noRange } {-------------------------------------------------------------------------- Mutual block information --------------------------------------------------------------------------} data MutualInfo = MutualInfo { mutualTermCheck :: TerminationCheck Name , mutualPositivityCheck :: PositivityCheck , mutualRange :: Range } deriving (Data, Show, Eq) -- | Default value for 'MutualInfo'. instance Null MutualInfo where empty = MutualInfo TerminationCheck True noRange instance HasRange MutualInfo where getRange = mutualRange instance KillRange MutualInfo where killRange i = i { mutualRange = noRange } {-------------------------------------------------------------------------- Left hand side information --------------------------------------------------------------------------} newtype LHSInfo = LHSRange Range deriving (Data, Show, Eq, Null) instance HasRange LHSInfo where getRange (LHSRange r) = r instance KillRange LHSInfo where killRange (LHSRange r) = LHSRange noRange {-------------------------------------------------------------------------- Pattern information --------------------------------------------------------------------------} -- | For a general pattern we remember the source code position. newtype PatInfo = PatRange Range deriving (Data, Eq, Null, Show, SetRange, HasRange, KillRange) -- | Empty range for patterns. patNoRange :: PatInfo patNoRange = PatRange noRange -- | Constructor pattern info. data ConPatInfo = ConPatInfo { patOrigin :: ConOrigin -- ^ Does this pattern come form the eta-expansion of an implicit pattern? --- Or from a user written constructor or record pattern? , patInfo :: PatInfo , patLazy :: ConPatLazy } deriving (Data, Eq) instance Show ConPatInfo where show (ConPatInfo po i l) = applyWhen (l == ConPatLazy) ("lazy " ++) $ applyWhen (po == ConOSystem) ("implicit " ++) $ show i instance HasRange ConPatInfo where getRange = getRange . patInfo instance KillRange ConPatInfo where killRange (ConPatInfo b i l) = ConPatInfo b (killRange i) l instance SetRange ConPatInfo where setRange r (ConPatInfo b i l) = ConPatInfo b (PatRange r) l -- | Has the constructor pattern a dotted (forced) constructor? data ConPatLazy = ConPatLazy -- ^ Dotted constructor. | ConPatEager -- ^ Ordinary constructor. deriving (Data, Eq, Ord, Show, Bounded, Enum) Agda-2.6.0.1/src/full/Agda/Syntax/Parser.hs0000644000000000000000000001633713466402171016361 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.Syntax.Parser ( -- * Types Parser -- * Parse functions , Agda.Syntax.Parser.parse , Agda.Syntax.Parser.parsePosString , parseFile -- * Parsers , moduleParser , moduleNameParser , acceptableFileExts , exprParser , exprWhereParser , holeContentParser , tokensParser -- * Reading files. , readFilePM -- * Parse errors , ParseError(..) , ParseWarning(..) , PM(..) , runPMIO ) where import Control.Arrow (second) import Control.Exception import Control.Monad ((>=>), forM_) import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer hiding ((<>)) import qualified Data.List as List import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Parser.Monad as M hiding (Parser, parseFlags) import qualified Agda.Syntax.Parser.Monad as M import qualified Agda.Syntax.Parser.Parser as P import Agda.Syntax.Parser.Lexer import Agda.Syntax.Parser.Literate import Agda.Syntax.Concrete import Agda.Syntax.Concrete.Definitions import Agda.Syntax.Parser.Tokens import Agda.Utils.Except ( ExceptT , MonadError(catchError, throwError) , runExceptT ) import Agda.Utils.FileName import Agda.Utils.IO.UTF8 (readTextFile) import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible ------------------------------------------------------------------------ -- Wrapping parse results wrap :: ParseResult a -> PM a wrap (ParseOk _ x) = return x wrap (ParseFailed err) = throwError err wrapIOM :: (MonadError e m, MonadIO m) => (IOError -> e) -> IO a -> m a wrapIOM f m = do a <- liftIO$ (Right <$> m) `catch` (\err -> return$ Left (err :: IOError)) case a of Right x -> return x Left err -> throwError (f err) wrapM :: IO (ParseResult a) -> PM a wrapM m = liftIO m >>= wrap -- | A monad for handling parse results newtype PM a = PM { unPM :: ExceptT ParseError (StateT [ParseWarning] IO) a } deriving (Functor, Applicative, Monad, MonadError ParseError, MonadIO) warning :: ParseWarning -> PM () warning w = PM (modify (w:)) runPMIO :: (MonadIO m) => PM a -> m (Either ParseError a, [ParseWarning]) runPMIO = liftIO . fmap (second reverse) . flip runStateT [] . runExceptT . unPM ------------------------------------------------------------------------ -- Parse functions -- | Wrapped Parser type. data Parser a = Parser { parser :: M.Parser a , parseFlags :: ParseFlags , parseLiterate :: LiterateParser a } type LiterateParser a = Parser a -> [Layer] -> PM a parse :: Parser a -> String -> PM a parse p = wrapM . return . M.parse (parseFlags p) [normal] (parser p) parseStringFromFile :: SrcFile -> Parser a -> String -> PM a parseStringFromFile src p = wrapM . return . M.parseFromSrc (parseFlags p) [layout, normal] (parser p) src parseLiterateWithoutComments :: LiterateParser a parseLiterateWithoutComments p layers = parseStringFromFile (literateSrcFile layers) p $ illiterate layers parseLiterateWithComments :: LiterateParser [Token] parseLiterateWithComments p layers = do code <- map Left <$> parseLiterateWithoutComments p layers let literate = Right <$> filter (not . isCodeLayer) layers let (terms, overlaps) = interleaveRanges code literate forM_ (map fst overlaps) $ \c -> warning$ OverlappingTokensWarning { warnRange = getRange c } return$ concat [ case m of Left t -> [t] Right (Layer Comment interval s) -> [TokTeX (interval, s)] Right (Layer Markup interval s) -> [TokMarkup (interval, s)] Right (Layer Code _ _) -> [] | m <- terms ] -- | Returns the contents of the given file. readFilePM :: AbsolutePath -> PM Text readFilePM path = wrapIOM (ReadFileError path) (readTextFile $ filePath path) parseLiterateFile :: Processor -> Parser a -> AbsolutePath -- ^ The path to the file. -> String -- ^ The file contents. Note that the file is /not/ read from -- disk. -> PM a parseLiterateFile po p path = parseLiterate p p . po (startPos (Just path)) parsePosString :: Parser a -> Position -> String -> PM a parsePosString p pos = wrapM . return . M.parsePosString pos (parseFlags p) [normal] (parser p) -- | Extensions supported by `parseFile`. acceptableFileExts :: [String] acceptableFileExts = ".agda" : (fst <$> literateProcessors) parseFile :: Show a => Parser a -> AbsolutePath -- ^ The path to the file. -> String -- ^ The file contents. Note that the file is /not/ read from -- disk. -> PM (a, FileType) parseFile p file input = if ".agda" `List.isSuffixOf` filePath file then (, AgdaFileType) <$> Agda.Syntax.Parser.parseStringFromFile (Strict.Just file) p input else go literateProcessors where go [] = throwError InvalidExtensionError { errPath = file , errValidExts = acceptableFileExts } go ((ext, (po, ft)) : pos) | ext `List.isSuffixOf` filePath file = (, ft) <$> parseLiterateFile po p file input | otherwise = go pos ------------------------------------------------------------------------ -- Specific parsers -- | Parses a module. moduleParser :: Parser Module moduleParser = Parser { parser = P.moduleParser , parseFlags = withoutComments , parseLiterate = parseLiterateWithoutComments } -- | Parses a module name. moduleNameParser :: Parser QName moduleNameParser = Parser { parser = P.moduleNameParser , parseFlags = withoutComments , parseLiterate = parseLiterateWithoutComments } -- | Parses an expression. exprParser :: Parser Expr exprParser = Parser { parser = P.exprParser , parseFlags = withoutComments , parseLiterate = parseLiterateWithoutComments } -- | Parses an expression followed by a where clause. exprWhereParser :: Parser ExprWhere exprWhereParser = Parser { parser = P.exprWhereParser , parseFlags = withoutComments , parseLiterate = parseLiterateWithoutComments } -- | Parses an expression or some other content of an interaction hole. holeContentParser :: Parser HoleContent holeContentParser = Parser { parser = P.holeContentParser , parseFlags = withoutComments , parseLiterate = parseLiterateWithoutComments } -- | Gives the parsed token stream (including comments). tokensParser :: Parser [Token] tokensParser = Parser { parser = P.tokensParser , parseFlags = withComments , parseLiterate = parseLiterateWithComments } -- | Keep comments in the token stream generated by the lexer. withComments :: ParseFlags withComments = defaultParseFlags { parseKeepComments = True } -- | Do not keep comments in the token stream generated by the lexer. withoutComments :: ParseFlags withoutComments = defaultParseFlags { parseKeepComments = False } Agda-2.6.0.1/src/full/Agda/Syntax/Common.hs0000644000000000000000000015112013466402171016343 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE UndecidableInstances #-} -- for: LensNamed name (Arg a) {-| Some common syntactic entities are defined in this module. -} module Agda.Syntax.Common where import Control.DeepSeq import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as ByteString import Data.Foldable import Data.Hashable (Hashable(..)) import qualified Data.Strict.Maybe as Strict import Data.Semigroup hiding (Arg) import Data.Traversable import Data.Data (Data) import Data.Word import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import GHC.Generics (Generic) import Agda.Syntax.Position import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.PartialOrd import Agda.Utils.POMonoid import Agda.Utils.Pretty hiding ((<>)) #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Delayed --------------------------------------------------------------------------- -- | Used to specify whether something should be delayed. data Delayed = Delayed | NotDelayed deriving (Data, Show, Eq, Ord) instance KillRange Delayed where killRange = id --------------------------------------------------------------------------- -- * File --------------------------------------------------------------------------- data FileType = AgdaFileType | MdFileType | RstFileType | TexFileType | OrgFileType deriving (Data, Eq, Ord, Show) instance Pretty FileType where pretty = \case AgdaFileType -> "Agda" MdFileType -> "Markdown" RstFileType -> "ReStructedText" TexFileType -> "LaTeX" OrgFileType -> "org-mode" --------------------------------------------------------------------------- -- * Eta-equality --------------------------------------------------------------------------- data HasEta = NoEta | YesEta deriving (Data, Show, Eq, Ord) instance HasRange HasEta where getRange _ = noRange instance KillRange HasEta where killRange = id instance NFData HasEta where rnf NoEta = () rnf YesEta = () --------------------------------------------------------------------------- -- * Induction --------------------------------------------------------------------------- data Induction = Inductive | CoInductive deriving (Data, Eq, Ord, Show) instance Pretty Induction where pretty Inductive = "inductive" pretty CoInductive = "coinductive" instance HasRange Induction where getRange _ = noRange instance KillRange Induction where killRange = id instance NFData Induction where rnf Inductive = () rnf CoInductive = () --------------------------------------------------------------------------- -- * Hiding --------------------------------------------------------------------------- data Overlappable = YesOverlap | NoOverlap deriving (Data, Show, Eq, Ord) data Hiding = Hidden | Instance Overlappable | NotHidden deriving (Data, Show, Eq, Ord) instance Pretty Hiding where pretty = \case Hidden -> "hidden" NotHidden -> "visible" Instance{} -> "instance" -- | Just for the 'Hiding' instance. Should never combine different -- overlapping. instance Semigroup Overlappable where NoOverlap <> NoOverlap = NoOverlap YesOverlap <> YesOverlap = YesOverlap _ <> _ = __IMPOSSIBLE__ -- | 'Hiding' is an idempotent partial monoid, with unit 'NotHidden'. -- 'Instance' and 'NotHidden' are incompatible. instance Semigroup Hiding where NotHidden <> h = h h <> NotHidden = h Hidden <> Hidden = Hidden Instance o <> Instance o' = Instance (o <> o') _ <> _ = __IMPOSSIBLE__ instance Monoid Overlappable where mempty = NoOverlap mappend = (<>) instance Monoid Hiding where mempty = NotHidden mappend = (<>) instance KillRange Hiding where killRange = id instance NFData Overlappable where rnf NoOverlap = () rnf YesOverlap = () instance NFData Hiding where rnf Hidden = () rnf (Instance o) = rnf o rnf NotHidden = () -- | Decorating something with 'Hiding' information. data WithHiding a = WithHiding { whHiding :: !Hiding , whThing :: a } deriving (Data, Eq, Ord, Show, Functor, Foldable, Traversable) instance Decoration WithHiding where traverseF f (WithHiding h a) = WithHiding h <$> f a instance Applicative WithHiding where pure = WithHiding mempty WithHiding h f <*> WithHiding h' a = WithHiding (mappend h h') (f a) instance HasRange a => HasRange (WithHiding a) where getRange = getRange . dget instance SetRange a => SetRange (WithHiding a) where setRange = fmap . setRange instance KillRange a => KillRange (WithHiding a) where killRange = fmap killRange instance NFData a => NFData (WithHiding a) where rnf (WithHiding _ a) = rnf a -- | A lens to access the 'Hiding' attribute in data structures. -- Minimal implementation: @getHiding@ and one of @setHiding@ or @mapHiding@. class LensHiding a where getHiding :: a -> Hiding setHiding :: Hiding -> a -> a setHiding h = mapHiding (const h) mapHiding :: (Hiding -> Hiding) -> a -> a mapHiding f a = setHiding (f $ getHiding a) a instance LensHiding Hiding where getHiding = id setHiding = const mapHiding = id instance LensHiding (WithHiding a) where getHiding (WithHiding h _) = h setHiding h (WithHiding _ a) = WithHiding h a mapHiding f (WithHiding h a) = WithHiding (f h) a -- | Monoidal composition of 'Hiding' information in some data. mergeHiding :: LensHiding a => WithHiding a -> a mergeHiding (WithHiding h a) = mapHiding (mappend h) a -- | 'NotHidden' arguments are @visible@. visible :: LensHiding a => a -> Bool visible a = getHiding a == NotHidden -- | 'Instance' and 'Hidden' arguments are @notVisible@. notVisible :: LensHiding a => a -> Bool notVisible a = getHiding a /= NotHidden -- | 'Hidden' arguments are @hidden@. hidden :: LensHiding a => a -> Bool hidden a = getHiding a == Hidden hide :: LensHiding a => a -> a hide = setHiding Hidden hideOrKeepInstance :: LensHiding a => a -> a hideOrKeepInstance x = case getHiding x of Hidden -> x Instance{} -> x NotHidden -> setHiding Hidden x makeInstance :: LensHiding a => a -> a makeInstance = makeInstance' NoOverlap makeInstance' :: LensHiding a => Overlappable -> a -> a makeInstance' o = setHiding (Instance o) isOverlappable :: LensHiding a => a -> Bool isOverlappable x = case getHiding x of Instance YesOverlap -> True _ -> False isInstance :: LensHiding a => a -> Bool isInstance x = case getHiding x of Instance{} -> True _ -> False -- | Ignores 'Overlappable'. sameHiding :: (LensHiding a, LensHiding b) => a -> b -> Bool sameHiding x y = case (getHiding x, getHiding y) of (Instance{}, Instance{}) -> True (hx, hy) -> hx == hy --------------------------------------------------------------------------- -- * Modalities --------------------------------------------------------------------------- -- | We have a tuple of modalities, which might not be fully orthogonal. -- For instance, irrelevant stuff is also run-time irrelevant. data Modality = Modality { modRelevance :: Relevance -- ^ Legacy irrelevance. -- See Pfenning, LiCS 2001; Abel/Vezzosi/Winterhalter, ICFP 2017. , modQuantity :: Quantity -- ^ Cardinality / runtime erasure. -- See Conor McBride, I got plenty o' nutting, Wadlerfest 2016. -- See Bob Atkey, Syntax and Semantics of Quantitative Type Theory, LiCS 2018. } deriving (Data, Eq, Ord, Show, Generic) defaultModality :: Modality defaultModality = Modality defaultRelevance defaultQuantity -- | Pointwise composition. instance Semigroup Modality where Modality r q <> Modality r' q' = Modality (r <> r') (q <> q') -- | Pointwise unit. instance Monoid Modality where mempty = Modality mempty mempty mappend = (<>) -- | Dominance ordering. instance PartialOrd Modality where comparable (Modality r q) (Modality r' q') = comparable (r, q) (r', q') instance POSemigroup Modality where instance POMonoid Modality where instance LeftClosedPOMonoid Modality where inverseCompose = inverseComposeModality -- | @m `moreUsableModality` m'@ means that an @m@ can be used -- where ever an @m'@ is required. moreUsableModality :: Modality -> Modality -> Bool moreUsableModality m m' = related m POLE m' usableModality :: LensModality a => a -> Bool usableModality a = usableRelevance m && usableQuantity m where m = getModality a composeModality :: Modality -> Modality -> Modality composeModality = (<>) -- | Compose with modality flag from the left. -- This function is e.g. used to update the modality information -- on pattern variables @a@ after a match against something of modality @q@. applyModality :: LensModality a => Modality -> a -> a applyModality m = mapModality (m `composeModality`) -- | @inverseComposeModality r x@ returns the least modality @y@ -- such that forall @x@, @y@ we have -- @x \`moreUsableModality\` (r \`composeModality\` y)@ -- iff -- @(r \`inverseComposeModality\` x) \`moreUsableModality\` y@ (Galois connection). inverseComposeModality :: Modality -> Modality -> Modality inverseComposeModality (Modality r q) (Modality r' q') = Modality (r `inverseComposeRelevance` r') (q `inverseComposeQuantity` q') -- | Left division by a 'Modality'. -- Used e.g. to modify context when going into a @m@ argument. inverseApplyModality :: LensModality a => Modality -> a -> a inverseApplyModality m = mapModality (m `inverseComposeModality`) -- boilerplate instances instance KillRange Modality where killRange = id instance NFData Modality where -- Lens stuff lModRelevance :: Lens' Relevance Modality lModRelevance f m = f (modRelevance m) <&> \ r -> m { modRelevance = r } lModQuantity :: Lens' Quantity Modality lModQuantity f m = f (modQuantity m) <&> \ q -> m { modQuantity = q } class LensModality a where getModality :: a -> Modality setModality :: Modality -> a -> a setModality = mapModality . const mapModality :: (Modality -> Modality) -> a -> a mapModality f a = setModality (f $ getModality a) a instance LensModality Modality where getModality = id setModality = const mapModality = id instance LensRelevance Modality where getRelevance = modRelevance setRelevance h m = m { modRelevance = h } mapRelevance f m = m { modRelevance = f (modRelevance m) } instance LensQuantity Modality where getQuantity = modQuantity setQuantity h m = m { modQuantity = h } mapQuantity f m = m { modQuantity = f (modQuantity m) } -- default accessors for Relevance getRelevanceMod :: LensModality a => LensGet Relevance a getRelevanceMod = getRelevance . getModality setRelevanceMod :: LensModality a => LensSet Relevance a setRelevanceMod = mapModality . setRelevance mapRelevanceMod :: LensModality a => LensMap Relevance a mapRelevanceMod = mapModality . mapRelevance -- default accessors for Quantity getQuantityMod :: LensModality a => LensGet Quantity a getQuantityMod = getQuantity . getModality setQuantityMod :: LensModality a => LensSet Quantity a setQuantityMod = mapModality . setQuantity mapQuantityMod :: LensModality a => LensMap Quantity a mapQuantityMod = mapModality . mapQuantity --------------------------------------------------------------------------- -- * Quantities --------------------------------------------------------------------------- -- | Quantity for linearity. -- -- A quantity is a set of natural numbers, indicating possible semantic -- uses of a variable. A singleton set @{n}@ requires that the -- corresponding variable is used exactly @n@ times. -- data Quantity = Quantity0 -- ^ Zero uses @{0}@, erased at runtime. | Quantity1 -- ^ Linear use @{1}@ (could be updated destructively). -- Mostly TODO (needs postponable constraints between quantities to compute uses). | Quantityω -- ^ Unrestricted use @ℕ@. deriving (Data, Show, Generic, Eq, Enum, Bounded, Ord) -- @Ord@ instance in case @Quantity@ is used in keys for maps etc. defaultQuantity :: Quantity defaultQuantity = Quantityω -- | Composition of quantities (multiplication). -- -- 'Quantity0' is dominant. -- 'Quantity1' is neutral. -- instance Semigroup Quantity where Quantity1 <> q = q q <> Quantity1 = q Quantity0 <> _ = Quantity0 _ <> Quantity0 = Quantity0 Quantityω <> _ = Quantityω -- _ <> Quantityω = Quantityω -- redundant -- | In the absense of finite quantities besides 0, ω is the unit. -- Otherwise, 1 is the unit. instance Monoid Quantity where mempty = Quantity1 mappend = (<>) -- | Note that the order is @ω ≤ 0,1@, more options is smaller. instance PartialOrd Quantity where comparable = curry $ \case (q, q') | q == q' -> POEQ -- ω is least (Quantityω, _) -> POLT (_, Quantityω) -> POGT -- others are uncomparable _ -> POAny instance POSemigroup Quantity where instance POMonoid Quantity where instance LeftClosedPOMonoid Quantity where inverseCompose = inverseComposeQuantity -- | @m `moreUsableQuantity` m'@ means that an @m@ can be used -- where ever an @m'@ is required. moreQuantity :: Quantity -> Quantity -> Bool moreQuantity m m' = related m POLE m' -- | A thing of quantity 0 is unusable, all others are usable. usableQuantity :: LensQuantity a => a -> Bool usableQuantity a = getQuantity a /= Quantity0 composeQuantity :: Quantity -> Quantity -> Quantity composeQuantity = (<>) -- | Compose with quantity flag from the left. -- This function is e.g. used to update the quantity information -- on pattern variables @a@ after a match against something of quantity @q@. applyQuantity :: LensQuantity a => Quantity -> a -> a applyQuantity q = mapQuantity (q `composeQuantity`) -- | @inverseComposeQuantity r x@ returns the least quantity @y@ -- such that forall @x@, @y@ we have -- @x \`moreQuantity\` (r \`composeQuantity\` y)@ -- iff -- @(r \`inverseComposeQuantity\` x) \`moreQuantity\` y@ (Galois connection). inverseComposeQuantity :: Quantity -> Quantity -> Quantity inverseComposeQuantity q x = case (q, x) of (Quantity1 , x) -> x -- going to linear arg: nothing changes (Quantity0 , x) -> Quantityω -- going to erased arg: every thing usable (Quantityω , Quantityω) -> Quantityω (Quantityω , _) -> Quantity0 -- linear resources are unusable as arguments to unrestricted functions -- | Left division by a 'Quantity'. -- Used e.g. to modify context when going into a @q@ argument. inverseApplyQuantity :: LensQuantity a => Quantity -> a -> a inverseApplyQuantity q = mapQuantity (q `inverseComposeQuantity`) -- boilerplate instances class LensQuantity a where getQuantity :: a -> Quantity setQuantity :: Quantity -> a -> a setQuantity = mapQuantity . const mapQuantity :: (Quantity -> Quantity) -> a -> a mapQuantity f a = setQuantity (f $ getQuantity a) a instance LensQuantity Quantity where getQuantity = id setQuantity = const mapQuantity = id instance KillRange Quantity where killRange = id instance NFData Quantity where rnf Quantity0 = () rnf Quantity1 = () rnf Quantityω = () --------------------------------------------------------------------------- -- * Relevance --------------------------------------------------------------------------- -- | A function argument can be relevant or irrelevant. -- See "Agda.TypeChecking.Irrelevance". data Relevance = Relevant -- ^ The argument is (possibly) relevant at compile-time. | NonStrict -- ^ The argument may never flow into evaluation position. -- Therefore, it is irrelevant at run-time. -- It is treated relevantly during equality checking. | Irrelevant -- ^ The argument is irrelevant at compile- and runtime. deriving (Data, Show, Eq, Enum, Bounded, Generic) allRelevances :: [Relevance] allRelevances = [minBound..maxBound] defaultRelevance :: Relevance defaultRelevance = Relevant instance KillRange Relevance where killRange rel = rel -- no range to kill instance NFData Relevance where rnf Relevant = () rnf NonStrict = () rnf Irrelevant = () -- | A lens to access the 'Relevance' attribute in data structures. -- Minimal implementation: @getRelevance@ and one of @setRelevance@ or @mapRelevance@. class LensRelevance a where getRelevance :: a -> Relevance setRelevance :: Relevance -> a -> a setRelevance h = mapRelevance (const h) mapRelevance :: (Relevance -> Relevance) -> a -> a mapRelevance f a = setRelevance (f $ getRelevance a) a instance LensRelevance Relevance where getRelevance = id setRelevance = const mapRelevance = id isRelevant :: LensRelevance a => a -> Bool isRelevant a = getRelevance a == Relevant isIrrelevant :: LensRelevance a => a -> Bool isIrrelevant a = getRelevance a == Irrelevant isNonStrict :: LensRelevance a => a -> Bool isNonStrict a = getRelevance a == NonStrict -- | Information ordering. -- @Relevant \`moreRelevant\` -- NonStrict \`moreRelevant\` -- Irrelevant@ moreRelevant :: Relevance -> Relevance -> Bool moreRelevant = (<=) -- | More relevant is smaller. instance Ord Relevance where compare = curry $ \case (r, r') | r == r' -> EQ -- top (_, Irrelevant) -> LT (Irrelevant, _) -> GT -- bottom (Relevant, _) -> LT (_, Relevant) -> GT -- redundant case (NonStrict,NonStrict) -> EQ -- | More relevant is smaller. instance PartialOrd Relevance where comparable = comparableOrd -- | @usableRelevance rel == False@ iff we cannot use a variable of @rel@. usableRelevance :: LensRelevance a => a -> Bool usableRelevance a = case getRelevance a of Irrelevant -> False NonStrict -> False Relevant -> True -- | 'Relevance' composition. -- 'Irrelevant' is dominant, 'Relevant' is neutral. composeRelevance :: Relevance -> Relevance -> Relevance composeRelevance r r' = case (r, r') of (Irrelevant, _) -> Irrelevant (_, Irrelevant) -> Irrelevant (NonStrict, _) -> NonStrict (_, NonStrict) -> NonStrict (Relevant, Relevant) -> Relevant -- | Compose with relevance flag from the left. -- This function is e.g. used to update the relevance information -- on pattern variables @a@ after a match against something @rel@. applyRelevance :: LensRelevance a => Relevance -> a -> a applyRelevance rel = mapRelevance (rel `composeRelevance`) -- | @inverseComposeRelevance r x@ returns the most irrelevant @y@ -- such that forall @x@, @y@ we have -- @x \`moreRelevant\` (r \`composeRelevance\` y)@ -- iff -- @(r \`inverseComposeRelevance\` x) \`moreRelevant\` y@ (Galois connection). inverseComposeRelevance :: Relevance -> Relevance -> Relevance inverseComposeRelevance r x = case (r, x) of (Relevant , x) -> x -- going to relevant arg.: nothing changes -- because Relevant is comp.-neutral (Irrelevant, x) -> Relevant -- going irrelevant: every thing usable (NonStrict , Irrelevant) -> Irrelevant -- otherwise: irrelevant things remain unusable (NonStrict , _) -> Relevant -- but @NonStrict@s become usable -- | Left division by a 'Relevance'. -- Used e.g. to modify context when going into a @rel@ argument. inverseApplyRelevance :: LensRelevance a => Relevance -> a -> a inverseApplyRelevance rel = mapRelevance (rel `inverseComposeRelevance`) -- | 'Relevance' forms a semigroup under composition. instance Semigroup Relevance where (<>) = composeRelevance -- | 'Relevant' is the unit. instance Monoid Relevance where mempty = Relevant mappend = (<>) instance POSemigroup Relevance where instance POMonoid Relevance where instance LeftClosedPOMonoid Relevance where inverseCompose = inverseComposeRelevance -- | Irrelevant function arguments may appear non-strictly in the codomain type. irrToNonStrict :: Relevance -> Relevance irrToNonStrict Irrelevant = NonStrict irrToNonStrict rel = rel -- | Applied when working on types (unless --experimental-irrelevance). nonStrictToRel :: Relevance -> Relevance nonStrictToRel NonStrict = Relevant nonStrictToRel rel = rel nonStrictToIrr :: Relevance -> Relevance nonStrictToIrr NonStrict = Irrelevant nonStrictToIrr rel = rel --------------------------------------------------------------------------- -- * Origin of arguments (user-written, inserted or reflected) --------------------------------------------------------------------------- -- | Origin of arguments. data Origin = UserWritten -- ^ From the source file / user input. (Preserve!) | Inserted -- ^ E.g. inserted hidden arguments. | Reflected -- ^ Produced by the reflection machinery. | CaseSplit -- ^ Produced by an interactive case split. | Substitution -- ^ Named application produced to represent a substitution. E.g. "?0 (x = n)" instead of "?0 n" deriving (Data, Show, Eq, Ord) instance KillRange Origin where killRange = id instance NFData Origin where rnf UserWritten = () rnf Inserted = () rnf Reflected = () rnf CaseSplit = () rnf Substitution = () -- | Decorating something with 'Origin' information. data WithOrigin a = WithOrigin { woOrigin :: !Origin , woThing :: a } deriving (Data, Eq, Ord, Show, Functor, Foldable, Traversable) instance Decoration WithOrigin where traverseF f (WithOrigin h a) = WithOrigin h <$> f a instance HasRange a => HasRange (WithOrigin a) where getRange = getRange . dget instance SetRange a => SetRange (WithOrigin a) where setRange = fmap . setRange instance KillRange a => KillRange (WithOrigin a) where killRange = fmap killRange instance NFData a => NFData (WithOrigin a) where rnf (WithOrigin _ a) = rnf a -- | A lens to access the 'Origin' attribute in data structures. -- Minimal implementation: @getOrigin@ and one of @setOrigin@ or @mapOrigin@. class LensOrigin a where getOrigin :: a -> Origin setOrigin :: Origin -> a -> a setOrigin o = mapOrigin (const o) mapOrigin :: (Origin -> Origin) -> a -> a mapOrigin f a = setOrigin (f $ getOrigin a) a instance LensOrigin Origin where getOrigin = id setOrigin = const mapOrigin = id instance LensOrigin (WithOrigin a) where getOrigin (WithOrigin h _) = h setOrigin h (WithOrigin _ a) = WithOrigin h a mapOrigin f (WithOrigin h a) = WithOrigin (f h) a ----------------------------------------------------------------------------- -- * Free variable annotations ----------------------------------------------------------------------------- data FreeVariables = UnknownFVs | KnownFVs IntSet deriving (Data, Eq, Ord, Show) instance Semigroup FreeVariables where UnknownFVs <> _ = UnknownFVs _ <> UnknownFVs = UnknownFVs KnownFVs vs1 <> KnownFVs vs2 = KnownFVs (IntSet.union vs1 vs2) instance Monoid FreeVariables where mempty = KnownFVs IntSet.empty mappend = (<>) instance NFData FreeVariables where rnf UnknownFVs = () rnf (KnownFVs fv) = rnf fv unknownFreeVariables :: FreeVariables unknownFreeVariables = UnknownFVs noFreeVariables :: FreeVariables noFreeVariables = mempty oneFreeVariable :: Int -> FreeVariables oneFreeVariable = KnownFVs . IntSet.singleton freeVariablesFromList :: [Int] -> FreeVariables freeVariablesFromList = mconcat . map oneFreeVariable -- | A lens to access the 'FreeVariables' attribute in data structures. -- Minimal implementation: @getFreeVariables@ and one of @setFreeVariables@ or @mapFreeVariables@. class LensFreeVariables a where getFreeVariables :: a -> FreeVariables setFreeVariables :: FreeVariables -> a -> a setFreeVariables o = mapFreeVariables (const o) mapFreeVariables :: (FreeVariables -> FreeVariables) -> a -> a mapFreeVariables f a = setFreeVariables (f $ getFreeVariables a) a instance LensFreeVariables FreeVariables where getFreeVariables = id setFreeVariables = const mapFreeVariables = id hasNoFreeVariables :: LensFreeVariables a => a -> Bool hasNoFreeVariables x = case getFreeVariables x of UnknownFVs -> False KnownFVs fv -> IntSet.null fv --------------------------------------------------------------------------- -- * Argument decoration --------------------------------------------------------------------------- -- | A function argument can be hidden and/or irrelevant. data ArgInfo = ArgInfo { argInfoHiding :: Hiding , argInfoModality :: Modality , argInfoOrigin :: Origin , argInfoFreeVariables :: FreeVariables } deriving (Data, Eq, Ord, Show) instance KillRange ArgInfo where killRange i = i -- There are no ranges in ArgInfo's class LensArgInfo a where getArgInfo :: a -> ArgInfo setArgInfo :: ArgInfo -> a -> a setArgInfo ai = mapArgInfo (const ai) mapArgInfo :: (ArgInfo -> ArgInfo) -> a -> a mapArgInfo f a = setArgInfo (f $ getArgInfo a) a instance LensArgInfo ArgInfo where getArgInfo = id setArgInfo = const mapArgInfo = id instance NFData ArgInfo where rnf (ArgInfo a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d instance LensHiding ArgInfo where getHiding = argInfoHiding setHiding h ai = ai { argInfoHiding = h } mapHiding f ai = ai { argInfoHiding = f (argInfoHiding ai) } instance LensModality ArgInfo where getModality = argInfoModality setModality m ai = ai { argInfoModality = m } mapModality f ai = ai { argInfoModality = f (argInfoModality ai) } instance LensOrigin ArgInfo where getOrigin = argInfoOrigin setOrigin o ai = ai { argInfoOrigin = o } mapOrigin f ai = ai { argInfoOrigin = f (argInfoOrigin ai) } instance LensFreeVariables ArgInfo where getFreeVariables = argInfoFreeVariables setFreeVariables o ai = ai { argInfoFreeVariables = o } mapFreeVariables f ai = ai { argInfoFreeVariables = f (argInfoFreeVariables ai) } -- inherited instances instance LensRelevance ArgInfo where getRelevance = getRelevanceMod setRelevance = setRelevanceMod mapRelevance = mapRelevanceMod instance LensQuantity ArgInfo where getQuantity = getQuantityMod setQuantity = setQuantityMod mapQuantity = mapQuantityMod defaultArgInfo :: ArgInfo defaultArgInfo = ArgInfo { argInfoHiding = NotHidden , argInfoModality = defaultModality , argInfoOrigin = UserWritten , argInfoFreeVariables = UnknownFVs } -- Accessing through ArgInfo -- default accessors for Hiding getHidingArgInfo :: LensArgInfo a => LensGet Hiding a getHidingArgInfo = getHiding . getArgInfo setHidingArgInfo :: LensArgInfo a => LensSet Hiding a setHidingArgInfo = mapArgInfo . setHiding mapHidingArgInfo :: LensArgInfo a => LensMap Hiding a mapHidingArgInfo = mapArgInfo . mapHiding -- default accessors for Modality getModalityArgInfo :: LensArgInfo a => LensGet Modality a getModalityArgInfo = getModality . getArgInfo setModalityArgInfo :: LensArgInfo a => LensSet Modality a setModalityArgInfo = mapArgInfo . setModality mapModalityArgInfo :: LensArgInfo a => LensMap Modality a mapModalityArgInfo = mapArgInfo . mapModality -- default accessors for Origin getOriginArgInfo :: LensArgInfo a => LensGet Origin a getOriginArgInfo = getOrigin . getArgInfo setOriginArgInfo :: LensArgInfo a => LensSet Origin a setOriginArgInfo = mapArgInfo . setOrigin mapOriginArgInfo :: LensArgInfo a => LensMap Origin a mapOriginArgInfo = mapArgInfo . mapOrigin -- default accessors for FreeVariables getFreeVariablesArgInfo :: LensArgInfo a => LensGet FreeVariables a getFreeVariablesArgInfo = getFreeVariables . getArgInfo setFreeVariablesArgInfo :: LensArgInfo a => LensSet FreeVariables a setFreeVariablesArgInfo = mapArgInfo . setFreeVariables mapFreeVariablesArgInfo :: LensArgInfo a => LensMap FreeVariables a mapFreeVariablesArgInfo = mapArgInfo . mapFreeVariables --------------------------------------------------------------------------- -- * Arguments --------------------------------------------------------------------------- data Arg e = Arg { argInfo :: ArgInfo , unArg :: e } deriving (Data, Ord, Show, Functor, Foldable, Traversable) instance Decoration Arg where traverseF f (Arg ai a) = Arg ai <$> f a instance HasRange a => HasRange (Arg a) where getRange = getRange . unArg instance SetRange a => SetRange (Arg a) where setRange r = fmap $ setRange r instance KillRange a => KillRange (Arg a) where killRange (Arg info a) = killRange2 Arg info a -- | Ignores 'Quantity', 'Relevance', 'Origin', and 'FreeVariables'. -- Ignores content of argument if 'Irrelevant'. -- instance Eq a => Eq (Arg a) where Arg (ArgInfo h1 m1 _ _) x1 == Arg (ArgInfo h2 m2 _ _) x2 = h1 == h2 && (isIrrelevant m1 || isIrrelevant m2 || x1 == x2) -- Andreas, 2017-10-04, issue #2775, ignore irrelevant arguments during with-abstraction. -- This is a hack, we should not use '(==)' in with-abstraction -- and more generally not use it on Syntax. -- Andrea: except for caching. -- instance Show a => Show (Arg a) where -- show (Arg (ArgInfo h (Modality r q) o fv) a) = showFVs fv $ showQ q $ showR r $ showO o $ showH h $ show a -- where -- showH Hidden s = "{" ++ s ++ "}" -- showH NotHidden s = "(" ++ s ++ ")" -- showH (Instance o) s = showOv o ++ "{{" ++ s ++ "}}" -- where showOv YesOverlap = "overlap " -- showOv NoOverlap = "" -- showR r s = case r of -- Irrelevant -> "." ++ s -- NonStrict -> "?" ++ s -- Relevant -> "r" ++ s -- Andreas: I want to see it explicitly -- showQ q s = case q of -- Quantity0 -> "0" ++ s -- Quantity1 -> "1" ++ s -- Quantityω -> "ω" ++ s -- showO o s = case o of -- UserWritten -> "u" ++ s -- Inserted -> "i" ++ s -- Reflected -> "g" ++ s -- generated by reflection -- CaseSplit -> "c" ++ s -- generated by case split -- Substitution -> "s" ++ s -- showFVs UnknownFVs s = s -- showFVs (KnownFVs fv) s = "fv" ++ show (IntSet.toList fv) ++ s -- -- defined in Concrete.Pretty -- instance Pretty a => Pretty (Arg a) where -- pretty (Arg (ArgInfo h (Modality r q) o fv) a) = prettyFVs fv $ prettyQ q $ prettyR r $ prettyO o $ prettyH h $ pretty a -- where -- prettyH Hidden s = "{" <> s <> "}" -- prettyH NotHidden s = "(" <> s <> ")" -- prettyH (Instance o) s = prettyOv o <> "{{" <> s <> "}}" -- where prettyOv YesOverlap = "overlap " -- prettyOv NoOverlap = "" -- prettyR r s = case r of -- Irrelevant -> "." <> s -- NonStrict -> "?" <> s -- Relevant -> "r" <> s -- Andreas: I want to see it explicitly -- prettyQ q s = case q of -- Quantity0 -> "0" <> s -- Quantity1 -> "1" <> s -- Quantityω -> "ω" <> s -- prettyO o s = case o of -- UserWritten -> "u" <> s -- Inserted -> "i" <> s -- Reflected -> "g" <> s -- generated by reflection -- CaseSplit -> "c" <> s -- generated by case split -- Substitution -> "s" <> s -- prettyFVs UnknownFVs s = s -- prettyFVs (KnownFVs fv) s = "fv" <> pretty (IntSet.toList fv) <> s instance NFData e => NFData (Arg e) where rnf (Arg a b) = rnf a `seq` rnf b instance LensArgInfo (Arg a) where getArgInfo = argInfo setArgInfo ai arg = arg { argInfo = ai } mapArgInfo f arg = arg { argInfo = f $ argInfo arg } -- The other lenses are defined through LensArgInfo instance LensHiding (Arg e) where getHiding = getHidingArgInfo setHiding = setHidingArgInfo mapHiding = mapHidingArgInfo instance LensModality (Arg e) where getModality = getModalityArgInfo setModality = setModalityArgInfo mapModality = mapModalityArgInfo instance LensOrigin (Arg e) where getOrigin = getOriginArgInfo setOrigin = setOriginArgInfo mapOrigin = mapOriginArgInfo instance LensFreeVariables (Arg e) where getFreeVariables = getFreeVariablesArgInfo setFreeVariables = setFreeVariablesArgInfo mapFreeVariables = mapFreeVariablesArgInfo -- Since we have LensModality, we get relevance and quantity by default instance LensRelevance (Arg e) where getRelevance = getRelevanceMod setRelevance = setRelevanceMod mapRelevance = mapRelevanceMod instance LensQuantity (Arg e) where getQuantity = getQuantityMod setQuantity = setQuantityMod mapQuantity = mapQuantityMod defaultArg :: a -> Arg a defaultArg = Arg defaultArgInfo -- | @xs \`withArgsFrom\` args@ translates @xs@ into a list of 'Arg's, -- using the elements in @args@ to fill in the non-'unArg' fields. -- -- Precondition: The two lists should have equal length. withArgsFrom :: [a] -> [Arg b] -> [Arg a] xs `withArgsFrom` args = zipWith (\x arg -> fmap (const x) arg) xs args withNamedArgsFrom :: [a] -> [NamedArg b] -> [NamedArg a] xs `withNamedArgsFrom` args = zipWith (\x -> fmap (x <$)) xs args --------------------------------------------------------------------------- -- * Names --------------------------------------------------------------------------- class Eq a => Underscore a where underscore :: a isUnderscore :: a -> Bool isUnderscore = (== underscore) instance Underscore String where underscore = "_" instance Underscore ByteString where underscore = ByteString.pack underscore instance Underscore Doc where underscore = text underscore --------------------------------------------------------------------------- -- * Function type domain --------------------------------------------------------------------------- -- | Similar to 'Arg', but we need to distinguish -- an irrelevance annotation in a function domain -- (the domain itself is not irrelevant!) -- from an irrelevant argument. -- -- @Dom@ is used in 'Pi' of internal syntax, in 'Context' and 'Telescope'. -- 'Arg' is used for actual arguments ('Var', 'Con', 'Def' etc.) -- and in 'Abstract' syntax and other situations. -- -- [ cubical ] When @domFinite = True@ for the domain of a 'Pi' -- type, the elements should be compared by tabulating the domain type. -- Only supported in case the domain type is primIsOne, to obtain -- the correct equality for partial elements. data Dom e = Dom { domInfo :: ArgInfo , domFinite :: !Bool , domName :: Maybe RString , unDom :: e } deriving (Data, Ord, Show, Functor, Foldable, Traversable) instance Decoration Dom where traverseF f (Dom ai b x a) = Dom ai b x <$> f a instance HasRange a => HasRange (Dom a) where getRange = getRange . unDom instance KillRange a => KillRange (Dom a) where killRange (Dom info b x a) = killRange4 Dom info b x a -- | Ignores 'Origin' and 'FreeVariables'. instance Eq a => Eq (Dom a) where Dom (ArgInfo h1 m1 _ _) b1 s1 x1 == Dom (ArgInfo h2 m2 _ _) b2 s2 x2 = (h1, m1, b1, s1, x1) == (h2, m2, b2, s2, x2) -- instance Show a => Show (Dom a) where -- show = show . argFromDom instance LensArgInfo (Dom e) where getArgInfo = domInfo setArgInfo ai dom = dom { domInfo = ai } mapArgInfo f dom = dom { domInfo = f $ domInfo dom } -- The other lenses are defined through LensArgInfo instance LensHiding (Dom e) where getHiding = getHidingArgInfo setHiding = setHidingArgInfo mapHiding = mapHidingArgInfo instance LensModality (Dom e) where getModality = getModalityArgInfo setModality = setModalityArgInfo mapModality = mapModalityArgInfo instance LensOrigin (Dom e) where getOrigin = getOriginArgInfo setOrigin = setOriginArgInfo mapOrigin = mapOriginArgInfo instance LensFreeVariables (Dom e) where getFreeVariables = getFreeVariablesArgInfo setFreeVariables = setFreeVariablesArgInfo mapFreeVariables = mapFreeVariablesArgInfo -- Since we have LensModality, we get relevance and quantity by default instance LensRelevance (Dom e) where getRelevance = getRelevanceMod setRelevance = setRelevanceMod mapRelevance = mapRelevanceMod instance LensQuantity (Dom e) where getQuantity = getQuantityMod setQuantity = setQuantityMod mapQuantity = mapQuantityMod argFromDom :: Dom a -> Arg a argFromDom (Dom i _ _ a) = Arg i a namedArgFromDom :: Dom a -> NamedArg a namedArgFromDom (Dom i _ s a) = Arg i $ Named s a domFromArg :: Arg a -> Dom a domFromArg (Arg i a) = Dom i False Nothing a domFromNamedArg :: NamedArg a -> Dom a domFromNamedArg (Arg i a) = Dom i False (nameOf a) (namedThing a) defaultDom :: a -> Dom a defaultDom = defaultArgDom defaultArgInfo defaultArgDom :: ArgInfo -> a -> Dom a defaultArgDom info x = Dom info False Nothing x defaultNamedArgDom :: ArgInfo -> String -> a -> Dom a defaultNamedArgDom info s = Dom info False (Just $ unranged s) --------------------------------------------------------------------------- -- * Named arguments --------------------------------------------------------------------------- -- | Something potentially carrying a name. data Named name a = Named { nameOf :: Maybe name , namedThing :: a } deriving (Eq, Ord, Show, Data, Functor, Foldable, Traversable) -- | Standard naming. type Named_ = Named RString unnamed :: a -> Named name a unnamed = Named Nothing named :: name -> a -> Named name a named = Named . Just -- | Accessor/editor for the 'nameOf' component. class LensNamed name a | a -> name where lensNamed :: Lens' (Maybe name) a instance LensNamed name (Named name a) where lensNamed f (Named mn a) = f mn <&> \ mn' -> Named mn' a getNameOf :: LensNamed name a => a -> Maybe name getNameOf a = a ^. lensNamed setNameOf :: LensNamed name a => Maybe name -> a -> a setNameOf = set lensNamed mapNameOf :: LensNamed name a => (Maybe name -> Maybe name) -> a -> a mapNameOf = over lensNamed -- Lenses lift through decorations: -- instance (Decoration f, LensNamed name a) => LensNamed name (f a) where instance LensNamed name a => LensNamed name (Arg a) where lensNamed = traverseF . lensNamed -- Standard instances for 'Named': instance Decoration (Named name) where traverseF f (Named n a) = Named n <$> f a instance HasRange a => HasRange (Named name a) where getRange = getRange . namedThing instance SetRange a => SetRange (Named name a) where setRange r = fmap $ setRange r instance (KillRange name, KillRange a) => KillRange (Named name a) where killRange (Named n a) = Named (killRange n) (killRange a) -- instance Show a => Show (Named_ a) where -- show (Named Nothing a) = show a -- show (Named (Just n) a) = rawNameToString (rangedThing n) ++ " = " ++ show a -- -- Defined in Concrete.Pretty -- instance Pretty a => Pretty (Named_ a) where -- pretty (Named Nothing a) = pretty a -- pretty (Named (Just n) a) = text (rawNameToString (rangedThing n)) <+> "=" <+> pretty a instance (NFData name, NFData a) => NFData (Named name a) where rnf (Named a b) = rnf a `seq` rnf b -- | Only 'Hidden' arguments can have names. type NamedArg a = Arg (Named_ a) -- | Get the content of a 'NamedArg'. namedArg :: NamedArg a -> a namedArg = namedThing . unArg defaultNamedArg :: a -> NamedArg a defaultNamedArg = unnamedArg defaultArgInfo unnamedArg :: ArgInfo -> a -> NamedArg a unnamedArg info = Arg info . unnamed -- | The functor instance for 'NamedArg' would be ambiguous, -- so we give it another name here. updateNamedArg :: (a -> b) -> NamedArg a -> NamedArg b updateNamedArg = fmap . fmap -- | @setNamedArg a b = updateNamedArg (const b) a@ setNamedArg :: NamedArg a -> b -> NamedArg b setNamedArg a b = (b <$) <$> a --------------------------------------------------------------------------- -- * Range decoration. --------------------------------------------------------------------------- -- | Thing with range info. data Ranged a = Ranged { rangeOf :: Range , rangedThing :: a } deriving (Data, Show, Functor, Foldable, Traversable) -- | Thing with no range info. unranged :: a -> Ranged a unranged = Ranged noRange instance Pretty a => Pretty (Ranged a) where pretty = pretty . rangedThing -- instance Show a => Show (Ranged a) where -- show = show . rangedThing instance Eq a => Eq (Ranged a) where Ranged _ x == Ranged _ y = x == y instance Ord a => Ord (Ranged a) where compare (Ranged _ x) (Ranged _ y) = compare x y instance HasRange (Ranged a) where getRange = rangeOf instance KillRange (Ranged a) where killRange (Ranged _ x) = Ranged noRange x instance Decoration Ranged where traverseF f (Ranged r x) = Ranged r <$> f x -- | Ranges are not forced. instance NFData a => NFData (Ranged a) where rnf (Ranged _ a) = rnf a --------------------------------------------------------------------------- -- * Raw names (before parsing into name parts). --------------------------------------------------------------------------- -- | A @RawName@ is some sort of string. type RawName = String rawNameToString :: RawName -> String rawNameToString = id stringToRawName :: String -> RawName stringToRawName = id -- | String with range info. type RString = Ranged RawName --------------------------------------------------------------------------- -- * Further constructor and projection info --------------------------------------------------------------------------- -- | Where does the 'ConP' or 'Con' come from? data ConOrigin = ConOSystem -- ^ Inserted by system or expanded from an implicit pattern. | ConOCon -- ^ User wrote a constructor (pattern). | ConORec -- ^ User wrote a record (pattern). | ConOSplit -- ^ Generated by interactive case splitting. deriving (Data, Show, Eq, Ord, Enum, Bounded) instance KillRange ConOrigin where killRange = id -- | Prefer user-written over system-inserted. bestConInfo :: ConOrigin -> ConOrigin -> ConOrigin bestConInfo ConOSystem o = o bestConInfo o _ = o -- | Where does a projection come from? data ProjOrigin = ProjPrefix -- ^ User wrote a prefix projection. | ProjPostfix -- ^ User wrote a postfix projection. | ProjSystem -- ^ Projection was generated by the system. deriving (Data, Show, Eq, Ord, Enum, Bounded) instance KillRange ProjOrigin where killRange = id data DataOrRecord = IsData | IsRecord deriving (Data, Eq, Ord, Show) --------------------------------------------------------------------------- -- * Infixity, access, abstract, etc. --------------------------------------------------------------------------- -- | Functions can be defined in both infix and prefix style. See -- 'Agda.Syntax.Concrete.LHS'. data IsInfix = InfixDef | PrefixDef deriving (Data, Show, Eq, Ord) -- | Access modifier. data Access = PrivateAccess Origin -- ^ Store the 'Origin' of the private block that lead to this qualifier. -- This is needed for more faithful printing of declarations. | PublicAccess | OnlyQualified -- ^ Visible from outside, but not exported when opening the module -- Used for qualified constructors. deriving (Data, Show, Eq, Ord) instance Pretty Access where pretty = text . \case PrivateAccess _ -> "private" PublicAccess -> "public" OnlyQualified -> "only-qualified" instance NFData Access where rnf _ = () instance HasRange Access where getRange _ = noRange instance KillRange Access where killRange = id -- | Abstract or concrete data IsAbstract = AbstractDef | ConcreteDef deriving (Data, Show, Eq, Ord) instance KillRange IsAbstract where killRange = id -- | Is this definition eligible for instance search? data IsInstance = InstanceDef | NotInstanceDef deriving (Data, Show, Eq, Ord) instance KillRange IsInstance where killRange = id instance HasRange IsInstance where getRange _ = noRange instance NFData IsInstance where rnf InstanceDef = () rnf NotInstanceDef = () -- | Is this a macro definition? data IsMacro = MacroDef | NotMacroDef deriving (Data, Show, Eq, Ord) instance KillRange IsMacro where killRange = id instance HasRange IsMacro where getRange _ = noRange type Nat = Int type Arity = Nat --------------------------------------------------------------------------- -- * NameId --------------------------------------------------------------------------- -- | The unique identifier of a name. Second argument is the top-level module -- identifier. data NameId = NameId {-# UNPACK #-} !Word64 {-# UNPACK #-} !Word64 deriving (Eq, Ord, Data, Generic, Show) instance KillRange NameId where killRange = id instance Pretty NameId where pretty (NameId n m) = text $ show n ++ "@" ++ show m instance Enum NameId where succ (NameId n m) = NameId (n + 1) m pred (NameId n m) = NameId (n - 1) m toEnum n = __IMPOSSIBLE__ -- should not be used fromEnum (NameId n _) = fromIntegral n instance NFData NameId where rnf (NameId _ _) = () instance Hashable NameId where {-# INLINE hashWithSalt #-} hashWithSalt salt (NameId n m) = hashWithSalt salt (n, m) --------------------------------------------------------------------------- -- * Meta variables --------------------------------------------------------------------------- -- | A meta variable identifier is just a natural number. -- newtype MetaId = MetaId { metaId :: Nat } deriving (Eq, Ord, Num, Real, Enum, Integral, Data) instance Pretty MetaId where pretty (MetaId n) = text $ "_" ++ show n -- | Show non-record version of this newtype. instance Show MetaId where showsPrec p (MetaId n) = showParen (p > 0) $ showString "MetaId " . shows n instance NFData MetaId where rnf (MetaId x) = rnf x newtype Constr a = Constr a ------------------------------------------------------------------------ -- * Placeholders (used to parse sections) ------------------------------------------------------------------------ -- | The position of a name part or underscore in a name. data PositionInName = Beginning -- ^ The following underscore is at the beginning of the name: -- @_foo@. | Middle -- ^ The following underscore is in the middle of the name: -- @foo_bar@. | End -- ^ The following underscore is at the end of the name: @foo_@. deriving (Show, Eq, Ord, Data) -- | Placeholders are used to represent the underscores in a section. data MaybePlaceholder e = Placeholder !PositionInName | NoPlaceholder !(Strict.Maybe PositionInName) e -- ^ The second argument is used only (but not always) for name -- parts other than underscores. deriving (Data, Eq, Ord, Functor, Foldable, Traversable, Show) -- | An abbreviation: @noPlaceholder = 'NoPlaceholder' -- 'Strict.Nothing'@. noPlaceholder :: e -> MaybePlaceholder e noPlaceholder = NoPlaceholder Strict.Nothing instance HasRange a => HasRange (MaybePlaceholder a) where getRange Placeholder{} = noRange getRange (NoPlaceholder _ e) = getRange e instance KillRange a => KillRange (MaybePlaceholder a) where killRange p@Placeholder{} = p killRange (NoPlaceholder p e) = killRange1 (NoPlaceholder p) e instance NFData a => NFData (MaybePlaceholder a) where rnf (Placeholder _) = () rnf (NoPlaceholder _ a) = rnf a --------------------------------------------------------------------------- -- * Interaction meta variables --------------------------------------------------------------------------- newtype InteractionId = InteractionId { interactionId :: Nat } deriving ( Eq , Ord , Show , Num , Integral , Real , Enum , Data ) instance Pretty InteractionId where pretty (InteractionId i) = text $ "?" ++ show i instance KillRange InteractionId where killRange = id ----------------------------------------------------------------------------- -- * Import directive ----------------------------------------------------------------------------- -- | The things you are allowed to say when you shuffle names between name -- spaces (i.e. in @import@, @namespace@, or @open@ declarations). data ImportDirective' n m = ImportDirective { importDirRange :: Range , using :: Using' n m , hiding :: [ImportedName' n m] , impRenaming :: [Renaming' n m] , publicOpen :: Bool -- ^ Only for @open@. Exports the opened names from the current module. } deriving (Data, Eq) data Using' n m = UseEverything | Using [ImportedName' n m] deriving (Data, Eq) instance Semigroup (Using' n m) where UseEverything <> u = u u <> UseEverything = u Using xs <> Using ys = Using (xs ++ ys) instance Monoid (Using' n m) where mempty = UseEverything mappend = (<>) -- | Default is directive is @private@ (use everything, but do not export). defaultImportDir :: ImportDirective' n m defaultImportDir = ImportDirective noRange UseEverything [] [] False isDefaultImportDir :: ImportDirective' n m -> Bool isDefaultImportDir (ImportDirective _ UseEverything [] [] False) = True isDefaultImportDir _ = False -- | An imported name can be a module or a defined name. data ImportedName' n m = ImportedModule m -- ^ Imported module name of type @m@. | ImportedName n -- ^ Imported name of type @n@. deriving (Data, Eq, Ord, Show) setImportedName :: ImportedName' a a -> a -> ImportedName' a a setImportedName (ImportedName x) y = ImportedName y setImportedName (ImportedModule x) y = ImportedModule y -- -- Defined in Concrete.Pretty -- instance (Pretty n, Pretty m) => Pretty (ImportedName' n m) where -- pretty (ImportedModule x) = "module" <+> pretty x -- pretty (ImportedName x) = pretty x -- instance (Show n, Show m) => Show (ImportedName' n m) where -- show (ImportedModule x) = "module " ++ show x -- show (ImportedName x) = show x data Renaming' n m = Renaming { renFrom :: ImportedName' n m -- ^ Rename from this name. , renTo :: ImportedName' n m -- ^ To this one. Must be same kind as 'renFrom'. , renToRange :: Range -- ^ The range of the \"to\" keyword. Retained for highlighting purposes. } deriving (Data, Eq) -- ** HasRange instances instance (HasRange a, HasRange b) => HasRange (ImportDirective' a b) where getRange = importDirRange instance (HasRange a, HasRange b) => HasRange (Using' a b) where getRange (Using xs) = getRange xs getRange UseEverything = noRange instance (HasRange a, HasRange b) => HasRange (Renaming' a b) where getRange r = getRange (renFrom r, renTo r) instance (HasRange a, HasRange b) => HasRange (ImportedName' a b) where getRange (ImportedName x) = getRange x getRange (ImportedModule x) = getRange x -- ** KillRange instances instance (KillRange a, KillRange b) => KillRange (ImportDirective' a b) where killRange (ImportDirective _ u h r p) = killRange3 (\u h r -> ImportDirective noRange u h r p) u h r instance (KillRange a, KillRange b) => KillRange (Using' a b) where killRange (Using i) = killRange1 Using i killRange UseEverything = UseEverything instance (KillRange a, KillRange b) => KillRange (Renaming' a b) where killRange (Renaming i n _) = killRange2 (\i n -> Renaming i n noRange) i n instance (KillRange a, KillRange b) => KillRange (ImportedName' a b) where killRange (ImportedModule n) = killRange1 ImportedModule n killRange (ImportedName n) = killRange1 ImportedName n -- ** NFData instances -- | Ranges are not forced. instance (NFData a, NFData b) => NFData (ImportDirective' a b) where rnf (ImportDirective _ a b c _) = rnf a `seq` rnf b `seq` rnf c instance (NFData a, NFData b) => NFData (Using' a b) where rnf UseEverything = () rnf (Using a) = rnf a -- | Ranges are not forced. instance (NFData a, NFData b) => NFData (Renaming' a b) where rnf (Renaming a b _) = rnf a `seq` rnf b instance (NFData a, NFData b) => NFData (ImportedName' a b) where rnf (ImportedModule a) = rnf a rnf (ImportedName a) = rnf a ----------------------------------------------------------------------------- -- * Termination ----------------------------------------------------------------------------- -- | Termination check? (Default = TerminationCheck). data TerminationCheck m = TerminationCheck -- ^ Run the termination checker. | NoTerminationCheck -- ^ Skip termination checking (unsafe). | NonTerminating -- ^ Treat as non-terminating. | Terminating -- ^ Treat as terminating (unsafe). Same effect as 'NoTerminationCheck'. | TerminationMeasure Range m -- ^ Skip termination checking but use measure instead. deriving (Data, Show, Eq, Functor) instance KillRange m => KillRange (TerminationCheck m) where killRange (TerminationMeasure _ m) = TerminationMeasure noRange (killRange m) killRange t = t instance NFData a => NFData (TerminationCheck a) where rnf TerminationCheck = () rnf NoTerminationCheck = () rnf NonTerminating = () rnf Terminating = () rnf (TerminationMeasure _ a) = rnf a ----------------------------------------------------------------------------- -- * Positivity ----------------------------------------------------------------------------- -- | Positivity check? (Default = True). type PositivityCheck = Bool ----------------------------------------------------------------------------- -- * Universe checking ----------------------------------------------------------------------------- -- | Universe check? (Default is yes). data UniverseCheck = YesUniverseCheck | NoUniverseCheck deriving (Eq, Ord, Show, Bounded, Enum, Data) instance KillRange UniverseCheck where killRange = id Agda-2.6.0.1/src/full/Agda/Syntax/Builtin.hs0000644000000000000000000003160413466402171016525 0ustar0000000000000000-- | This module defines the names of all BUILTINs. module Agda.Syntax.Builtin where builtinNat, builtinSuc, builtinZero, builtinNatPlus, builtinNatMinus, builtinNatTimes, builtinNatDivSucAux, builtinNatModSucAux, builtinNatEquals, builtinNatLess, builtinInteger, builtinIntegerPos, builtinIntegerNegSuc, builtinWord64, builtinFloat, builtinChar, builtinString, builtinUnit, builtinUnitUnit, builtinSigma, builtinBool, builtinTrue, builtinFalse, builtinList, builtinNil, builtinCons, builtinIO, builtinPath, builtinPathP, builtinInterval, builtinIZero, builtinIOne, builtinPartial, builtinPartialP, builtinIMin, builtinIMax, builtinINeg, builtinIsOne, builtinItIsOne, builtinIsOne1, builtinIsOne2, builtinIsOneEmpty, builtinComp, builtinPOr, builtinTrans, builtinHComp, builtinSub, builtinSubIn, builtinSubOut, builtinEquiv, builtinEquivFun, builtinEquivProof, builtinPathToEquiv, builtinGlue, builtin_glue, builtin_unglue, builtinFaceForall, builtinId, builtinConId, builtinIdElim, builtinSizeUniv, builtinSize, builtinSizeLt, builtinSizeSuc, builtinSizeInf, builtinSizeMax, builtinInf, builtinSharp, builtinFlat, builtinEquality, builtinRefl, builtinRewrite, builtinLevelMax, builtinLevel, builtinLevelZero, builtinLevelSuc, builtinSetOmega, builtinFromNat, builtinFromNeg, builtinFromString, builtinQName, builtinAgdaSort, builtinAgdaSortSet, builtinAgdaSortLit, builtinAgdaSortUnsupported, builtinHiding, builtinHidden, builtinInstance, builtinVisible, builtinRelevance, builtinRelevant, builtinIrrelevant, builtinArg, builtinAssoc, builtinAssocLeft, builtinAssocRight, builtinAssocNon, builtinPrecedence, builtinPrecRelated, builtinPrecUnrelated, builtinFixity, builtinFixityFixity, builtinArgInfo, builtinArgArgInfo, builtinArgArg, builtinAbs, builtinAbsAbs, builtinAgdaTerm, builtinAgdaTermVar, builtinAgdaTermLam, builtinAgdaTermExtLam, builtinAgdaTermDef, builtinAgdaTermCon, builtinAgdaTermPi, builtinAgdaTermSort, builtinAgdaTermLit, builtinAgdaTermUnsupported, builtinAgdaTermMeta, builtinAgdaErrorPart, builtinAgdaErrorPartString, builtinAgdaErrorPartTerm, builtinAgdaErrorPartName, builtinAgdaLiteral, builtinAgdaLitNat, builtinAgdaLitWord64, builtinAgdaLitFloat, builtinAgdaLitChar, builtinAgdaLitString, builtinAgdaLitQName, builtinAgdaLitMeta, builtinAgdaClause, builtinAgdaClauseClause, builtinAgdaClauseAbsurd, builtinAgdaPattern, builtinAgdaPatVar, builtinAgdaPatCon, builtinAgdaPatDot, builtinAgdaPatLit, builtinAgdaPatProj, builtinAgdaPatAbsurd, builtinAgdaDefinitionFunDef, builtinAgdaDefinitionDataDef, builtinAgdaDefinitionRecordDef, builtinAgdaDefinitionDataConstructor, builtinAgdaDefinitionPostulate, builtinAgdaDefinitionPrimitive, builtinAgdaDefinition, builtinAgdaMeta, builtinAgdaTCM, builtinAgdaTCMReturn, builtinAgdaTCMBind, builtinAgdaTCMUnify, builtinAgdaTCMTypeError, builtinAgdaTCMInferType, builtinAgdaTCMCheckType, builtinAgdaTCMNormalise, builtinAgdaTCMReduce, builtinAgdaTCMCatchError, builtinAgdaTCMGetContext, builtinAgdaTCMExtendContext, builtinAgdaTCMInContext, builtinAgdaTCMFreshName, builtinAgdaTCMDeclareDef, builtinAgdaTCMDeclarePostulate, builtinAgdaTCMDefineFun, builtinAgdaTCMGetType, builtinAgdaTCMGetDefinition, builtinAgdaTCMQuoteTerm, builtinAgdaTCMUnquoteTerm, builtinAgdaTCMBlockOnMeta, builtinAgdaTCMCommit, builtinAgdaTCMIsMacro, builtinAgdaTCMWithNormalisation, builtinAgdaTCMDebugPrint, builtinAgdaTCMNoConstraints, builtinAgdaTCMRunSpeculative :: String builtinNat = "NATURAL" builtinSuc = "SUC" builtinZero = "ZERO" builtinNatPlus = "NATPLUS" builtinNatMinus = "NATMINUS" builtinNatTimes = "NATTIMES" builtinNatDivSucAux = "NATDIVSUCAUX" builtinNatModSucAux = "NATMODSUCAUX" builtinNatEquals = "NATEQUALS" builtinNatLess = "NATLESS" builtinWord64 = "WORD64" builtinInteger = "INTEGER" builtinIntegerPos = "INTEGERPOS" builtinIntegerNegSuc = "INTEGERNEGSUC" builtinFloat = "FLOAT" builtinChar = "CHAR" builtinString = "STRING" builtinUnit = "UNIT" builtinUnitUnit = "UNITUNIT" builtinSigma = "SIGMA" builtinBool = "BOOL" builtinTrue = "TRUE" builtinFalse = "FALSE" builtinList = "LIST" builtinNil = "NIL" builtinCons = "CONS" builtinIO = "IO" builtinId = "ID" builtinConId = "CONID" builtinIdElim = "primIdElim" builtinPath = "PATH" builtinPathP = "PATHP" builtinInterval = "INTERVAL" builtinIMin = "primIMin" builtinIMax = "primIMax" builtinINeg = "primINeg" builtinIZero = "IZERO" builtinIOne = "IONE" builtinPartial = "PARTIAL" builtinPartialP = "PARTIALP" builtinIsOne = "ISONE" builtinItIsOne = "ITISONE" builtinEquiv = "EQUIV" builtinEquivFun = "EQUIVFUN" builtinEquivProof = "EQUIVPROOF" builtinPathToEquiv = "PATHTOEQUIV" builtinGlue = "primGlue" builtin_glue = "prim^glue" builtin_unglue = "prim^unglue" builtinFaceForall = "primFaceForall" builtinIsOne1 = "ISONE1" builtinIsOne2 = "ISONE2" builtinIsOneEmpty = "ISONEEMPTY" builtinComp = "primComp" builtinPOr = "primPOr" builtinTrans = "primTransp" builtinHComp = "primHComp" builtinSub = "SUB" builtinSubIn = "SUBIN" builtinSubOut = "primSubOut" builtinSizeUniv = "SIZEUNIV" builtinSize = "SIZE" builtinSizeLt = "SIZELT" builtinSizeSuc = "SIZESUC" builtinSizeInf = "SIZEINF" builtinSizeMax = "SIZEMAX" builtinInf = "INFINITY" builtinSharp = "SHARP" builtinFlat = "FLAT" builtinEquality = "EQUALITY" builtinRefl = "REFL" builtinRewrite = "REWRITE" builtinLevelMax = "LEVELMAX" builtinLevel = "LEVEL" builtinLevelZero = "LEVELZERO" builtinLevelSuc = "LEVELSUC" builtinSetOmega = "SETOMEGA" builtinFromNat = "FROMNAT" builtinFromNeg = "FROMNEG" builtinFromString = "FROMSTRING" builtinQName = "QNAME" builtinAgdaSort = "AGDASORT" builtinAgdaSortSet = "AGDASORTSET" builtinAgdaSortLit = "AGDASORTLIT" builtinAgdaSortUnsupported = "AGDASORTUNSUPPORTED" builtinHiding = "HIDING" builtinHidden = "HIDDEN" builtinInstance = "INSTANCE" builtinVisible = "VISIBLE" builtinRelevance = "RELEVANCE" builtinRelevant = "RELEVANT" builtinIrrelevant = "IRRELEVANT" builtinAssoc = "ASSOC" builtinAssocLeft = "ASSOCLEFT" builtinAssocRight = "ASSOCRIGHT" builtinAssocNon = "ASSOCNON" builtinPrecedence = "PRECEDENCE" builtinPrecRelated = "PRECRELATED" builtinPrecUnrelated = "PRECUNRELATED" builtinFixity = "FIXITY" builtinFixityFixity = "FIXITYFIXITY" builtinArg = "ARG" builtinArgInfo = "ARGINFO" builtinArgArgInfo = "ARGARGINFO" builtinArgArg = "ARGARG" builtinAbs = "ABS" builtinAbsAbs = "ABSABS" builtinAgdaTerm = "AGDATERM" builtinAgdaTermVar = "AGDATERMVAR" builtinAgdaTermLam = "AGDATERMLAM" builtinAgdaTermExtLam = "AGDATERMEXTLAM" builtinAgdaTermDef = "AGDATERMDEF" builtinAgdaTermCon = "AGDATERMCON" builtinAgdaTermPi = "AGDATERMPI" builtinAgdaTermSort = "AGDATERMSORT" builtinAgdaTermLit = "AGDATERMLIT" builtinAgdaTermUnsupported = "AGDATERMUNSUPPORTED" builtinAgdaTermMeta = "AGDATERMMETA" builtinAgdaErrorPart = "AGDAERRORPART" builtinAgdaErrorPartString = "AGDAERRORPARTSTRING" builtinAgdaErrorPartTerm = "AGDAERRORPARTTERM" builtinAgdaErrorPartName = "AGDAERRORPARTNAME" builtinAgdaLiteral = "AGDALITERAL" builtinAgdaLitNat = "AGDALITNAT" builtinAgdaLitWord64 = "AGDALITWORD64" builtinAgdaLitFloat = "AGDALITFLOAT" builtinAgdaLitChar = "AGDALITCHAR" builtinAgdaLitString = "AGDALITSTRING" builtinAgdaLitQName = "AGDALITQNAME" builtinAgdaLitMeta = "AGDALITMETA" builtinAgdaClause = "AGDACLAUSE" builtinAgdaClauseClause = "AGDACLAUSECLAUSE" builtinAgdaClauseAbsurd = "AGDACLAUSEABSURD" builtinAgdaPattern = "AGDAPATTERN" builtinAgdaPatVar = "AGDAPATVAR" builtinAgdaPatCon = "AGDAPATCON" builtinAgdaPatDot = "AGDAPATDOT" builtinAgdaPatLit = "AGDAPATLIT" builtinAgdaPatProj = "AGDAPATPROJ" builtinAgdaPatAbsurd = "AGDAPATABSURD" builtinAgdaDefinitionFunDef = "AGDADEFINITIONFUNDEF" builtinAgdaDefinitionDataDef = "AGDADEFINITIONDATADEF" builtinAgdaDefinitionRecordDef = "AGDADEFINITIONRECORDDEF" builtinAgdaDefinitionDataConstructor = "AGDADEFINITIONDATACONSTRUCTOR" builtinAgdaDefinitionPostulate = "AGDADEFINITIONPOSTULATE" builtinAgdaDefinitionPrimitive = "AGDADEFINITIONPRIMITIVE" builtinAgdaDefinition = "AGDADEFINITION" builtinAgdaMeta = "AGDAMETA" builtinAgdaTCM = "AGDATCM" builtinAgdaTCMReturn = "AGDATCMRETURN" builtinAgdaTCMBind = "AGDATCMBIND" builtinAgdaTCMUnify = "AGDATCMUNIFY" builtinAgdaTCMTypeError = "AGDATCMTYPEERROR" builtinAgdaTCMInferType = "AGDATCMINFERTYPE" builtinAgdaTCMCheckType = "AGDATCMCHECKTYPE" builtinAgdaTCMNormalise = "AGDATCMNORMALISE" builtinAgdaTCMReduce = "AGDATCMREDUCE" builtinAgdaTCMCatchError = "AGDATCMCATCHERROR" builtinAgdaTCMGetContext = "AGDATCMGETCONTEXT" builtinAgdaTCMExtendContext = "AGDATCMEXTENDCONTEXT" builtinAgdaTCMInContext = "AGDATCMINCONTEXT" builtinAgdaTCMFreshName = "AGDATCMFRESHNAME" builtinAgdaTCMDeclareDef = "AGDATCMDECLAREDEF" builtinAgdaTCMDeclarePostulate = "AGDATCMDECLAREPOSTULATE" builtinAgdaTCMDefineFun = "AGDATCMDEFINEFUN" builtinAgdaTCMGetType = "AGDATCMGETTYPE" builtinAgdaTCMGetDefinition = "AGDATCMGETDEFINITION" builtinAgdaTCMBlockOnMeta = "AGDATCMBLOCKONMETA" builtinAgdaTCMCommit = "AGDATCMCOMMIT" builtinAgdaTCMQuoteTerm = "AGDATCMQUOTETERM" builtinAgdaTCMUnquoteTerm = "AGDATCMUNQUOTETERM" builtinAgdaTCMIsMacro = "AGDATCMISMACRO" builtinAgdaTCMWithNormalisation = "AGDATCMWITHNORMALISATION" builtinAgdaTCMDebugPrint = "AGDATCMDEBUGPRINT" builtinAgdaTCMNoConstraints = "AGDATCMNOCONSTRAINTS" builtinAgdaTCMRunSpeculative = "AGDATCMRUNSPECULATIVE" -- | Builtins that come without a definition in Agda syntax. -- These are giving names to Agda internal concepts which -- cannot be assigned an Agda type. -- -- An example would be a user-defined name for @Set@. -- -- {-# BUILTIN TYPE Type #-} -- -- The type of @Type@ would be @Type : Level → Setω@ -- which is not valid Agda. builtinsNoDef :: [String] builtinsNoDef = sizeBuiltins ++ [ builtinConId , builtinInterval , builtinPartial , builtinPartialP , builtinIsOne , builtinSub , builtinIZero , builtinIOne , builtinSetOmega ] sizeBuiltins :: [String] sizeBuiltins = [ builtinSizeUniv , builtinSize , builtinSizeLt , builtinSizeSuc , builtinSizeInf , builtinSizeMax ] Agda-2.6.0.1/src/full/Agda/Syntax/Internal.hs0000644000000000000000000013755213466402171016704 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} -- because of shortcomings of FunctionalDependencies module Agda.Syntax.Internal ( module Agda.Syntax.Internal , module Agda.Syntax.Abstract.Name , MetaId(..) ) where import Prelude hiding (foldr, mapM, null) import Control.Applicative hiding (empty) import Control.Monad.Identity hiding (mapM) import Control.DeepSeq import Data.Foldable ( Foldable, foldMap ) import Data.Function import qualified Data.List as List import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup, (<>), Sum(..) ) import Data.Traversable import Data.Data (Data) import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Literal import Agda.Syntax.Concrete.Pretty (prettyHiding) import Agda.Syntax.Abstract.Name import Agda.Utils.Empty import Agda.Utils.Functor import Agda.Utils.Geniplate import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Size import qualified Agda.Utils.Pretty as P import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- | Type of argument lists. -- type Args = [Arg Term] type NamedArgs = [NamedArg Term] -- | Store the names of the record fields in the constructor. -- This allows reduction of projection redexes outside of TCM. -- For instance, during substitution and application. data ConHead = ConHead { conName :: QName -- ^ The name of the constructor. , conInductive :: Induction -- ^ Record constructors can be coinductive. , conFields :: [Arg QName] -- ^ The name of the record fields. -- Empty list for data constructors. -- 'Arg' is stored since the info in the constructor args -- might not be accurate because of subtyping (issue #2170). } deriving (Data, Show) instance Eq ConHead where (==) = (==) `on` conName instance Ord ConHead where (<=) = (<=) `on` conName instance Pretty ConHead where pretty = pretty . conName instance HasRange ConHead where getRange = getRange . conName instance SetRange ConHead where setRange r = mapConName (setRange r) class LensConName a where getConName :: a -> QName setConName :: QName -> a -> a setConName = mapConName . const mapConName :: (QName -> QName) -> a -> a mapConName f a = setConName (f (getConName a)) a instance LensConName ConHead where getConName = conName setConName c con = con { conName = c } -- | Raw values. -- -- @Def@ is used for both defined and undefined constants. -- Assume there is a type declaration and a definition for -- every constant, even if the definition is an empty -- list of clauses. -- data Term = Var {-# UNPACK #-} !Int Elims -- ^ @x es@ neutral | Lam ArgInfo (Abs Term) -- ^ Terms are beta normal. Relevance is ignored | Lit Literal | Def QName Elims -- ^ @f es@, possibly a delta/iota-redex | Con ConHead ConInfo Elims -- ^ @c es@ or @record { fs = es }@ -- @es@ allows only Apply and IApply eliminations, -- and IApply only for data constructors. | Pi (Dom Type) (Abs Type) -- ^ dependent or non-dependent function space | Sort Sort | Level Level | MetaV {-# UNPACK #-} !MetaId Elims | DontCare Term -- ^ Irrelevant stuff in relevant position, but created -- in an irrelevant context. Basically, an internal -- version of the irrelevance axiom @.irrAx : .A -> A@. | Dummy String -- ^ A (part of a) term or type which is only used for internal purposes. -- Replaces the @Sort Prop@ hack. -- The @String@ typically describes the location where we create this dummy, -- but can contain other information as well. deriving (Data, Show) type ConInfo = ConOrigin -- | Eliminations, subsuming applications and projections. -- data Elim' a = Apply (Arg a) -- ^ Application. | Proj ProjOrigin QName -- ^ Projection. 'QName' is name of a record projection. | IApply a a a -- ^ IApply x y r, x and y are the endpoints deriving (Data, Show, Functor, Foldable, Traversable) type Elim = Elim' Term type Elims = [Elim] -- ^ eliminations ordered left-to-right. -- | This instance cheats on 'Proj', use with care. -- 'Proj's are always assumed to be 'UserWritten', since they have no 'ArgInfo'. -- Same for IApply instance LensOrigin (Elim' a) where getOrigin (Apply a) = getOrigin a getOrigin Proj{} = UserWritten getOrigin IApply{} = UserWritten mapOrigin f (Apply a) = Apply $ mapOrigin f a mapOrigin f e@Proj{} = e mapOrigin f e@IApply{} = e -- | Names in binders and arguments. type ArgName = String argNameToString :: ArgName -> String argNameToString = id stringToArgName :: String -> ArgName stringToArgName = id appendArgNames :: ArgName -> ArgName -> ArgName appendArgNames = (++) nameToArgName :: Name -> ArgName nameToArgName = stringToArgName . prettyShow namedArgName :: NamedArg Name -> ArgName namedArgName x = maybe (nameToArgName $ namedArg x) rangedThing $ nameOf $ unArg x -- | Binder. -- 'Abs': The bound variable might appear in the body. -- 'NoAbs' is pseudo-binder, it does not introduce a fresh variable, -- similar to the @const@ of Haskell. data Abs a = Abs { absName :: ArgName, unAbs :: a } -- ^ The body has (at least) one free variable. -- Danger: 'unAbs' doesn't shift variables properly | NoAbs { absName :: ArgName, unAbs :: a } deriving (Data, Functor, Foldable, Traversable) instance Decoration Abs where traverseF f (Abs x a) = Abs x <$> f a traverseF f (NoAbs x a) = NoAbs x <$> f a -- | Types are terms with a sort annotation. -- data Type' a = El { _getSort :: Sort, unEl :: a } deriving (Data, Show, Functor, Foldable, Traversable) type Type = Type' Term instance Decoration Type' where traverseF f (El s a) = El s <$> f a class LensSort a where lensSort :: Lens' Sort a getSort :: a -> Sort getSort a = a ^. lensSort instance LensSort (Type' a) where lensSort f (El s a) = f s <&> \ s' -> El s' a -- General instance leads to overlapping instances. -- instance (Decoration f, LensSort a) => LensSort (f a) where instance LensSort a => LensSort (Dom a) where lensSort = traverseF . lensSort instance LensSort a => LensSort (Arg a) where lensSort = traverseF . lensSort instance LensSort a => LensSort (Abs a) where lensSort = traverseF . lensSort -- | Sequence of types. An argument of the first type is bound in later types -- and so on. data Tele a = EmptyTel | ExtendTel a (Abs (Tele a)) -- ^ 'Abs' is never 'NoAbs'. deriving (Data, Show, Functor, Foldable, Traversable) type Telescope = Tele (Dom Type) -- | Sorts. -- data Sort = Type Level -- ^ @Set ℓ@. | Prop Level -- ^ @Prop ℓ@. | Inf -- ^ @Setω@. | SizeUniv -- ^ @SizeUniv@, a sort inhabited by type @Size@. | PiSort Sort (Abs Sort) -- ^ Sort of the pi type. | UnivSort Sort -- ^ Sort of another sort. | MetaS {-# UNPACK #-} !MetaId Elims | DefS QName Elims -- ^ A postulated sort. | DummyS String -- ^ A (part of a) term or type which is only used for internal purposes. -- Replaces the abuse of @Prop@ for a dummy sort. -- The @String@ typically describes the location where we create this dummy, -- but can contain other information as well. deriving (Data, Show) -- | A level is a maximum expression of 0..n 'PlusLevel' expressions -- each of which is a number or an atom plus a number. -- -- The empty maximum is the canonical representation for level 0. newtype Level = Max [PlusLevel] deriving (Show, Data) data PlusLevel = ClosedLevel Integer -- ^ @n@, to represent @Setₙ@. | Plus Integer LevelAtom -- ^ @n + ℓ@. deriving (Show, Data) -- | An atomic term of type @Level@. data LevelAtom = MetaLevel MetaId Elims -- ^ A meta variable targeting @Level@ under some eliminations. | BlockedLevel MetaId Term -- ^ A term of type @Level@ whose reduction is blocked by a meta. | NeutralLevel NotBlocked Term -- ^ A neutral term of type @Level@. | UnreducedLevel Term -- ^ Introduced by 'instantiate', removed by 'reduce'. deriving (Show, Data) --------------------------------------------------------------------------- -- * Blocked Terms --------------------------------------------------------------------------- -- | Even if we are not stuck on a meta during reduction -- we can fail to reduce a definition by pattern matching -- for another reason. data NotBlocked = StuckOn Elim -- ^ The 'Elim' is neutral and blocks a pattern match. | Underapplied -- ^ Not enough arguments were supplied to complete the matching. | AbsurdMatch -- ^ We matched an absurd clause, results in a neutral 'Def'. | MissingClauses -- ^ We ran out of clauses, all considered clauses -- produced an actual mismatch. -- This can happen when try to reduce a function application -- but we are still missing some function clauses. -- See "Agda.TypeChecking.Patterns.Match". | ReallyNotBlocked -- ^ Reduction was not blocked, we reached a whnf -- which can be anything but a stuck @'Def'@. deriving (Show, Data) -- | 'ReallyNotBlocked' is the unit. -- 'MissingClauses' is dominant. -- @'StuckOn'{}@ should be propagated, if tied, we take the left. instance Semigroup NotBlocked where ReallyNotBlocked <> b = b -- MissingClauses is dominant (absorptive) b@MissingClauses <> _ = b _ <> b@MissingClauses = b -- StuckOn is second strongest b@StuckOn{} <> _ = b _ <> b@StuckOn{} = b b <> _ = b instance Monoid NotBlocked where -- ReallyNotBlocked is neutral mempty = ReallyNotBlocked mappend = (<>) -- | Something where a meta variable may block reduction. data Blocked t = Blocked { theBlockingMeta :: MetaId , ignoreBlocking :: t } | NotBlocked { blockingStatus :: NotBlocked, ignoreBlocking :: t } deriving (Show, Functor, Foldable, Traversable) -- deriving (Eq, Ord, Functor, Foldable, Traversable) -- | Blocking by a meta is dominant. instance Applicative Blocked where pure = notBlocked f <*> e = ((f $> ()) `mappend` (e $> ())) $> ignoreBlocking f (ignoreBlocking e) -- -- | Blocking by a meta is dominant. -- instance Applicative Blocked where -- pure = notBlocked -- Blocked x f <*> e = Blocked x $ f (ignoreBlocking e) -- NotBlocked nb f <*> Blocked x e = Blocked x $ f e -- NotBlocked nb f <*> NotBlocked nb' e = NotBlocked (nb `mappend` nb') $ f e -- | @'Blocked' t@ without the @t@. type Blocked_ = Blocked () instance Semigroup Blocked_ where b@Blocked{} <> _ = b _ <> b@Blocked{} = b NotBlocked x _ <> NotBlocked y _ = NotBlocked (x <> y) () instance Monoid Blocked_ where mempty = notBlocked () mappend = (<>) -- | When trying to reduce @f es@, on match failed on one -- elimination @e ∈ es@ that came with info @r :: NotBlocked@. -- @stuckOn e r@ produces the new @NotBlocked@ info. -- -- 'MissingClauses' must be propagated, as this is blockage -- that can be lifted in the future (as more clauses are added). -- -- @'StuckOn' e0@ is also propagated, since it provides more -- precise information as @StuckOn e@ (as @e0@ is the original -- reason why reduction got stuck and usually a subterm of @e@). -- An information like @StuckOn (Apply (Arg info (Var i [])))@ -- (stuck on a variable) could be used by the lhs/coverage checker -- to trigger a split on that (pattern) variable. -- -- In the remaining cases for @r@, we are terminally stuck -- due to @StuckOn e@. Propagating @'AbsurdMatch'@ does not -- seem useful. -- -- 'Underapplied' must not be propagated, as this would mean -- that @f es@ is underapplied, which is not the case (it is stuck). -- Note that 'Underapplied' can only arise when projection patterns were -- missing to complete the original match (in @e@). -- (Missing ordinary pattern would mean the @e@ is of function type, -- but we cannot match against something of function type.) stuckOn :: Elim -> NotBlocked -> NotBlocked stuckOn e r = case r of MissingClauses -> r StuckOn{} -> r Underapplied -> r' AbsurdMatch -> r' ReallyNotBlocked -> r' where r' = StuckOn e --------------------------------------------------------------------------- -- * Definitions --------------------------------------------------------------------------- -- | Named pattern arguments. type NAPs = [NamedArg DeBruijnPattern] -- | A clause is a list of patterns and the clause body. -- -- The telescope contains the types of the pattern variables and the -- de Bruijn indices say how to get from the order the variables occur in -- the patterns to the order they occur in the telescope. The body -- binds the variables in the order they appear in the telescope. -- -- @clauseTel ~ permute clausePerm (patternVars namedClausePats)@ -- -- Terms in dot patterns are valid in the clause telescope. -- -- For the purpose of the permutation and the body dot patterns count -- as variables. TODO: Change this! data Clause = Clause { clauseLHSRange :: Range , clauseFullRange :: Range , clauseTel :: Telescope -- ^ @Δ@: The types of the pattern variables in dependency order. , namedClausePats :: NAPs -- ^ @Δ ⊢ ps@. The de Bruijn indices refer to @Δ@. , clauseBody :: Maybe Term -- ^ @Just v@ with @Δ ⊢ v@ for a regular clause, or @Nothing@ for an -- absurd one. , clauseType :: Maybe (Arg Type) -- ^ @Δ ⊢ t@. The type of the rhs under @clauseTel@. -- Used, e.g., by @TermCheck@. -- Can be 'Irrelevant' if we encountered an irrelevant projection -- pattern on the lhs. , clauseCatchall :: Bool -- ^ Clause has been labelled as CATCHALL. , clauseUnreachable :: Maybe Bool -- ^ Clause has been labelled as unreachable by the coverage checker. -- @Nothing@ means coverage checker has not run yet (clause may be unreachable). -- @Just False@ means clause is not unreachable. -- @Just True@ means clause is unreachable. } deriving (Data, Show) clausePats :: Clause -> [Arg DeBruijnPattern] clausePats = map (fmap namedThing) . namedClausePats instance HasRange Clause where getRange = clauseLHSRange -- | Pattern variables. type PatVarName = ArgName patVarNameToString :: PatVarName -> String patVarNameToString = argNameToString nameToPatVarName :: Name -> PatVarName nameToPatVarName = nameToArgName -- | Origin of the pattern: what did the user write in this position? data PatOrigin = PatOSystem -- ^ Pattern inserted by the system | PatOSplit -- ^ Pattern generated by case split | PatOVar Name -- ^ User wrote a variable pattern | PatODot -- ^ User wrote a dot pattern | PatOWild -- ^ User wrote a wildcard pattern | PatOCon -- ^ User wrote a constructor pattern | PatORec -- ^ User wrote a record pattern | PatOLit -- ^ User wrote a literal pattern | PatOAbsurd -- ^ User wrote an absurd pattern deriving (Data, Show, Eq) -- | Patterns are variables, constructors, or wildcards. -- @QName@ is used in @ConP@ rather than @Name@ since -- a constructor might come from a particular namespace. -- This also meshes well with the fact that values (i.e. -- the arguments we are matching with) use @QName@. -- data Pattern' x = VarP PatOrigin x -- ^ @x@ | DotP PatOrigin Term -- ^ @.t@ | ConP ConHead ConPatternInfo [NamedArg (Pattern' x)] -- ^ @c ps@ -- The subpatterns do not contain any projection copatterns. | LitP Literal -- ^ E.g. @5@, @"hello"@. | ProjP ProjOrigin QName -- ^ Projection copattern. Can only appear by itself. | IApplyP PatOrigin Term Term x -- ^ Path elimination pattern, like @VarP@ but keeps track of endpoints. | DefP PatOrigin QName [NamedArg (Pattern' x)] -- ^ Used for HITs, the QName should be the one from primHComp. deriving (Data, Show, Functor, Foldable, Traversable) type Pattern = Pattern' PatVarName -- ^ The @PatVarName@ is a name suggestion. varP :: a -> Pattern' a varP = VarP PatOSystem dotP :: Term -> Pattern' a dotP = DotP PatOSystem -- | Type used when numbering pattern variables. data DBPatVar = DBPatVar { dbPatVarName :: PatVarName , dbPatVarIndex :: Int } deriving (Data, Show, Eq) type DeBruijnPattern = Pattern' DBPatVar namedVarP :: PatVarName -> Named_ Pattern namedVarP x = Named named $ varP x where named = if isUnderscore x then Nothing else Just $ unranged x namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern namedDBVarP m = (fmap . fmap) (\x -> DBPatVar x m) . namedVarP -- | Make an absurd pattern with the given de Bruijn index. absurdP :: Int -> DeBruijnPattern absurdP = VarP PatOAbsurd . DBPatVar absurdPatternName -- | The @ConPatternInfo@ states whether the constructor belongs to -- a record type (@Just@) or data type (@Nothing@). -- In the former case, the @PatOrigin@ says whether the record pattern -- orginates from the expansion of an implicit pattern. -- The @Type@ is the type of the whole record pattern. -- The scope used for the type is given by any outer scope -- plus the clause's telescope ('clauseTel'). data ConPatternInfo = ConPatternInfo { conPRecord :: Maybe PatOrigin -- ^ @Nothing@ if data constructor. -- @Just@ if record constructor. , conPFallThrough :: Bool -- ^ Should the match block on non-canonical terms or can it -- proceed to the catch-all clause? , conPType :: Maybe (Arg Type) -- ^ The type of the whole constructor pattern. -- Should be present (@Just@) if constructor pattern is -- is generated ordinarily by type-checking. -- Could be absent (@Nothing@) if pattern comes from some -- plugin (like Agsy). -- Needed e.g. for with-clause stripping. , conPLazy :: Bool -- ^ Lazy patterns are generated by the forcing translation -- ('Agda.TypeChecking.Forcing.forcingTranslation') and are dropped by -- the clause compiler (TODO: not yet) -- ('Agda.TypeChecking.CompiledClause.Compile.compileClauses') when the -- variables they bind are unused. The GHC backend compiles lazy matches -- to lazy patterns in Haskell (TODO: not yet). } deriving (Data, Show) noConPatternInfo :: ConPatternInfo noConPatternInfo = ConPatternInfo Nothing False Nothing False -- | Build partial 'ConPatternInfo' from 'ConInfo' toConPatternInfo :: ConInfo -> ConPatternInfo toConPatternInfo ConORec = noConPatternInfo{ conPRecord = Just PatORec } toConPatternInfo _ = noConPatternInfo -- | Build 'ConInfo' from 'ConPatternInfo'. fromConPatternInfo :: ConPatternInfo -> ConInfo fromConPatternInfo = fromMaybe ConOCon . fmap patToConO . conPRecord where patToConO :: PatOrigin -> ConOrigin patToConO = \case PatOSystem -> ConOSystem PatOSplit -> ConOSplit PatOVar{} -> ConOSystem PatODot -> ConOSystem PatOWild -> ConOSystem PatOCon -> ConOCon PatORec -> ConORec PatOLit -> __IMPOSSIBLE__ PatOAbsurd -> ConOSystem -- | Extract pattern variables in left-to-right order. -- A 'DotP' is also treated as variable (see docu for 'Clause'). class PatternVars a b | b -> a where patternVars :: b -> [Arg (Either a Term)] instance PatternVars a (Arg (Pattern' a)) where -- patternVars :: Arg (Pattern' a) -> [Arg (Either a Term)] patternVars (Arg i (VarP _ x) ) = [Arg i $ Left x] patternVars (Arg i (DotP _ t) ) = [Arg i $ Right t] patternVars (Arg _ (ConP _ _ ps)) = patternVars ps patternVars (Arg _ (DefP _ _ ps)) = patternVars ps patternVars (Arg _ (LitP _) ) = [] patternVars (Arg _ ProjP{} ) = [] patternVars (Arg i (IApplyP _ _ _ x)) = [Arg i $ Left x] instance PatternVars a (NamedArg (Pattern' a)) where patternVars = patternVars . fmap namedThing instance PatternVars a b => PatternVars a [b] where patternVars = concatMap patternVars -- | Retrieve the origin of a pattern patternOrigin :: Pattern' x -> Maybe PatOrigin patternOrigin (VarP o _) = Just o patternOrigin (DotP o _) = Just o patternOrigin LitP{} = Nothing patternOrigin (ConP _ ci _) = conPRecord ci patternOrigin ProjP{} = Nothing patternOrigin (IApplyP o _ _ _) = Just o patternOrigin (DefP o _ _) = Just o -- | Does the pattern perform a match that could fail? properlyMatching :: DeBruijnPattern -> Bool properlyMatching p | patternOrigin p == Just PatOAbsurd = True properlyMatching VarP{} = False properlyMatching DotP{} = False properlyMatching LitP{} = True properlyMatching (ConP _ ci ps) = isNothing (conPRecord ci) || -- not a record cons List.any (properlyMatching . namedArg) ps -- or one of subpatterns is a proper m properlyMatching ProjP{} = True properlyMatching IApplyP{} = False properlyMatching DefP{} = True instance IsProjP (Pattern' a) where isProjP (ProjP o d) = Just (o, unambiguous d) isProjP _ = Nothing ----------------------------------------------------------------------------- -- * Explicit substitutions ----------------------------------------------------------------------------- -- | Substitutions. data Substitution' a = IdS -- ^ Identity substitution. -- @Γ ⊢ IdS : Γ@ | EmptyS Empty -- ^ Empty substitution, lifts from the empty context. First argument is @__IMPOSSIBLE__@. -- Apply this to closed terms you want to use in a non-empty context. -- @Γ ⊢ EmptyS : ()@ | a :# Substitution' a -- ^ Substitution extension, ``cons''. -- @ -- Γ ⊢ u : Aρ Γ ⊢ ρ : Δ -- ---------------------- -- Γ ⊢ u :# ρ : Δ, A -- @ | Strengthen Empty (Substitution' a) -- ^ Strengthening substitution. First argument is @__IMPOSSIBLE__@. -- Apply this to a term which does not contain variable 0 -- to lower all de Bruijn indices by one. -- @ -- Γ ⊢ ρ : Δ -- --------------------------- -- Γ ⊢ Strengthen ρ : Δ, A -- @ | Wk !Int (Substitution' a) -- ^ Weakning substitution, lifts to an extended context. -- @ -- Γ ⊢ ρ : Δ -- ------------------- -- Γ, Ψ ⊢ Wk |Ψ| ρ : Δ -- @ | Lift !Int (Substitution' a) -- ^ Lifting substitution. Use this to go under a binder. -- @Lift 1 ρ == var 0 :# Wk 1 ρ@. -- @ -- Γ ⊢ ρ : Δ -- ------------------------- -- Γ, Ψρ ⊢ Lift |Ψ| ρ : Δ, Ψ -- @ deriving ( Show , Functor , Foldable , Traversable , Data ) type Substitution = Substitution' Term type PatternSubstitution = Substitution' DeBruijnPattern infixr 4 :# instance Null (Substitution' a) where empty = IdS null IdS = True null _ = False --------------------------------------------------------------------------- -- * Views --------------------------------------------------------------------------- -- | View type as equality type. data EqualityView = EqualityType { eqtSort :: Sort -- ^ Sort of this type. , eqtName :: QName -- ^ Builtin EQUALITY. , eqtParams :: [Arg Term] -- ^ Hidden. Empty or @Level@. , eqtType :: Arg Term -- ^ Hidden , eqtLhs :: Arg Term -- ^ NotHidden , eqtRhs :: Arg Term -- ^ NotHidden } | OtherType Type -- ^ reduced isEqualityType :: EqualityView -> Bool isEqualityType EqualityType{} = True isEqualityType OtherType{} = False -- | View type as path type. data PathView = PathType { pathSort :: Sort -- ^ Sort of this type. , pathName :: QName -- ^ Builtin PATH. , pathLevel :: Arg Term -- ^ Hidden , pathType :: Arg Term -- ^ Hidden , pathLhs :: Arg Term -- ^ NotHidden , pathRhs :: Arg Term -- ^ NotHidden } | OType Type -- ^ reduced isPathType :: PathView -> Bool isPathType PathType{} = True isPathType OType{} = False data IntervalView = IZero | IOne | IMin (Arg Term) (Arg Term) | IMax (Arg Term) (Arg Term) | INeg (Arg Term) | OTerm Term deriving Show --------------------------------------------------------------------------- -- * Absurd Lambda --------------------------------------------------------------------------- -- | Absurd lambdas are internally represented as identity -- with variable name "()". absurdBody :: Abs Term absurdBody = Abs absurdPatternName $ Var 0 [] isAbsurdBody :: Abs Term -> Bool isAbsurdBody (Abs x (Var 0 [])) = isAbsurdPatternName x isAbsurdBody _ = False absurdPatternName :: PatVarName absurdPatternName = "()" isAbsurdPatternName :: PatVarName -> Bool isAbsurdPatternName x = x == absurdPatternName --------------------------------------------------------------------------- -- * Smart constructors --------------------------------------------------------------------------- -- | An unapplied variable. var :: Nat -> Term var i | i >= 0 = Var i [] | otherwise = __IMPOSSIBLE__ -- | Add 'DontCare' is it is not already a @DontCare@. dontCare :: Term -> Term dontCare v = case v of DontCare{} -> v _ -> DontCare v -- | Aux: A dummy term to constitute a dummy term/level/sort/type. dummyTerm' :: String -> Int -> Term dummyTerm' file line = Dummy $ file ++ ":" ++ show line -- | Aux: A dummy level to constitute a level/sort. dummyLevel' :: String -> Int -> Level dummyLevel' file line = unreducedLevel $ dummyTerm' file line -- | A dummy term created at location. -- Note: use macro __DUMMY_TERM__ ! dummyTerm :: String -> Int -> Term dummyTerm file line = dummyTerm' ("dummyTerm: " ++ file) line -- | A dummy level created at location. -- Note: use macro __DUMMY_LEVEL__ ! dummyLevel :: String -> Int -> Level dummyLevel file line = dummyLevel' ("dummyLevel: " ++ file) line -- | A dummy sort created at location. -- Note: use macro __DUMMY_SORT__ ! dummySort :: String -> Int -> Sort dummySort file line = DummyS $ file ++ ":" ++ show line -- | A dummy type created at location. -- Note: use macro __DUMMY_TYPE__ ! dummyType :: String -> Int -> Type dummyType file line = El (DummyS "") $ dummyTerm' ("dummyType: " ++ file) line -- | Context entries without a type have this dummy type. -- Note: use macro __DUMMY_DOM__ ! dummyDom :: String -> Int -> Dom Type dummyDom file line = defaultDom $ dummyType file line unreducedLevel :: Term -> Level unreducedLevel v = Max [ Plus 0 $ UnreducedLevel v ] -- | Top sort (Set\omega). topSort :: Type topSort = sort Inf sort :: Sort -> Type sort s = El (UnivSort s) $ Sort s varSort :: Int -> Sort varSort n = Type $ Max [Plus 0 $ NeutralLevel mempty $ var n] tmSort :: Term -> Sort tmSort t = Type $ Max [Plus 0 $ UnreducedLevel t] levelSuc :: Level -> Level levelSuc (Max []) = Max [ClosedLevel 1] levelSuc (Max as) = Max $ map inc as where inc (ClosedLevel n) = ClosedLevel (n + 1) inc (Plus n l) = Plus (n + 1) l mkType :: Integer -> Sort mkType n = Type $ Max [ClosedLevel n | n > 0] mkProp :: Integer -> Sort mkProp n = Prop $ Max [ClosedLevel n | n > 0] isSort :: Term -> Maybe Sort isSort v = case v of Sort s -> Just s _ -> Nothing impossibleTerm :: String -> Int -> Term impossibleTerm file line = Dummy $ unlines [ "An internal error has occurred. Please report this as a bug." , "Location of the error: " ++ file ++ ":" ++ show line ] --------------------------------------------------------------------------- -- * Telescopes. --------------------------------------------------------------------------- -- | A traversal for the names in a telescope. mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a) mapAbsNamesM f EmptyTel = pure EmptyTel mapAbsNamesM f (ExtendTel a ( Abs x b)) = ExtendTel a <$> ( Abs <$> f x <*> mapAbsNamesM f b) mapAbsNamesM f (ExtendTel a (NoAbs x b)) = ExtendTel a <$> (NoAbs <$> f x <*> mapAbsNamesM f b) -- Ulf, 2013-11-06: Last case is really impossible but I'd rather find out we -- violated that invariant somewhere other than here. mapAbsNames :: (ArgName -> ArgName) -> Tele a -> Tele a mapAbsNames f = runIdentity . mapAbsNamesM (Identity . f) -- Ulf, 2013-11-06 -- The record parameter is named "" inside the record module so we can avoid -- printing it (issue 208), but we don't want that to show up in the type of -- the functions in the module (issue 892). This function is used on the record -- module telescope before adding it to a type in -- TypeChecking.Monad.Signature.addConstant (to handle functions defined in -- record modules) and TypeChecking.Rules.Record.checkProjection (to handle -- record projections). replaceEmptyName :: ArgName -> Tele a -> Tele a replaceEmptyName x = mapAbsNames $ \ y -> if null y then x else y -- | Telescope as list. type ListTel' a = [Dom (a, Type)] type ListTel = ListTel' ArgName telFromList' :: (a -> ArgName) -> ListTel' a -> Telescope telFromList' f = List.foldr extTel EmptyTel where extTel dom@(Dom{unDom = (x, a)}) = ExtendTel (dom{unDom = a}) . Abs (f x) -- | Convert a list telescope to a telescope. telFromList :: ListTel -> Telescope telFromList = telFromList' id -- | Convert a telescope to its list form. telToList :: Tele (Dom t) -> [Dom (ArgName,t)] telToList EmptyTel = [] telToList (ExtendTel arg (Abs x tel)) = fmap (x,) arg : telToList tel telToList (ExtendTel _ NoAbs{} ) = __IMPOSSIBLE__ -- | Lens to edit a 'Telescope' as a list. listTel :: Lens' ListTel Telescope listTel f = fmap telFromList . f . telToList -- | Drop the types from a telescope. class TelToArgs a where telToArgs :: a -> [Arg ArgName] instance TelToArgs ListTel where telToArgs = map $ \ dom -> Arg (domInfo dom) (fst $ unDom dom) instance TelToArgs Telescope where telToArgs = telToArgs . telToList -- | Constructing a singleton telescope. class SgTel a where sgTel :: a -> Telescope instance SgTel (ArgName, Dom Type) where sgTel (x, !dom) = ExtendTel dom $ Abs x EmptyTel instance SgTel (Dom (ArgName, Type)) where sgTel dom = ExtendTel (snd <$> dom) $ Abs (fst $ unDom dom) EmptyTel instance SgTel (Dom Type) where sgTel dom = sgTel (stringToArgName "_", dom) --------------------------------------------------------------------------- -- * Handling blocked terms. --------------------------------------------------------------------------- blockingMeta :: Blocked t -> Maybe MetaId blockingMeta (Blocked m _) = Just m blockingMeta NotBlocked{} = Nothing blocked :: MetaId -> a -> Blocked a blocked x = Blocked x notBlocked :: a -> Blocked a notBlocked = NotBlocked ReallyNotBlocked --------------------------------------------------------------------------- -- * Simple operations on terms and types. --------------------------------------------------------------------------- -- | Removing a topmost 'DontCare' constructor. stripDontCare :: Term -> Term stripDontCare v = case v of DontCare v -> v _ -> v -- | Doesn't do any reduction. arity :: Type -> Nat arity t = case unEl t of Pi _ b -> 1 + arity (unAbs b) _ -> 0 -- | Pick the better name suggestion, i.e., the one that is not just underscore. class Suggest a b where suggest :: a -> b -> String instance Suggest String String where suggest "_" y = y suggest x _ = x instance Suggest (Abs a) (Abs b) where suggest b1 b2 = suggest (absName b1) (absName b2) instance Suggest String (Abs b) where suggest x b = suggest x (absName b) instance Suggest Name (Abs b) where suggest n b = suggest (nameToArgName n) (absName b) --------------------------------------------------------------------------- -- * Eliminations. --------------------------------------------------------------------------- -- | Convert top-level postfix projections into prefix projections. unSpine :: Term -> Term unSpine = unSpine' $ const True -- | Convert 'Proj' projection eliminations -- according to their 'ProjOrigin' into -- 'Def' projection applications. unSpine' :: (ProjOrigin -> Bool) -> Term -> Term unSpine' p v = case hasElims v of Just (h, es) -> loop h [] es Nothing -> v where loop :: (Elims -> Term) -> Elims -> Elims -> Term loop h res es = case es of [] -> v Proj o f : es' | p o -> loop (Def f) [Apply (defaultArg v)] es' e : es' -> loop h (e : res) es' where v = h $ reverse res -- | A view distinguishing the neutrals @Var@, @Def@, and @MetaV@ which -- can be projected. hasElims :: Term -> Maybe (Elims -> Term, Elims) hasElims v = case v of Var i es -> Just (Var i, es) Def f es -> Just (Def f, es) MetaV x es -> Just (MetaV x, es) Con{} -> Nothing Lit{} -> Nothing -- Andreas, 2016-04-13, Issue 1932: We convert λ x → x .f into f Lam _ (Abs _ v) -> case v of Var 0 [Proj _o f] -> Just (Def f, []) _ -> Nothing Lam{} -> Nothing Pi{} -> Nothing Sort{} -> Nothing Level{} -> Nothing DontCare{} -> Nothing Dummy{} -> Nothing -- | Drop 'Apply' constructor. (Safe) isApplyElim :: Elim' a -> Maybe (Arg a) isApplyElim (Apply u) = Just u isApplyElim Proj{} = Nothing isApplyElim (IApply _ _ r) = Just (defaultArg r) isApplyElim' :: Empty -> Elim' a -> Arg a isApplyElim' e = fromMaybe (absurd e) . isApplyElim -- | Drop 'Apply' constructors. (Safe) allApplyElims :: [Elim' a] -> Maybe [Arg a] allApplyElims = mapM isApplyElim -- | Split at first non-'Apply' splitApplyElims :: [Elim' a] -> ([Arg a], [Elim' a]) splitApplyElims (Apply u : es) = mapFst (u :) $ splitApplyElims es splitApplyElims es = ([], es) class IsProjElim e where isProjElim :: e -> Maybe (ProjOrigin, QName) instance IsProjElim Elim where isProjElim (Proj o d) = Just (o, d) isProjElim Apply{} = Nothing isProjElim IApply{} = Nothing -- | Discards @Proj f@ entries. argsFromElims :: Elims -> Args argsFromElims = mapMaybe isApplyElim -- | Drop 'Proj' constructors. (Safe) allProjElims :: Elims -> Maybe [(ProjOrigin, QName)] allProjElims = mapM isProjElim --------------------------------------------------------------------------- -- * Null instances. --------------------------------------------------------------------------- instance Null (Tele a) where empty = EmptyTel null EmptyTel = True null ExtendTel{} = False -- | A 'null' clause is one with no patterns and no rhs. -- Should not exist in practice. instance Null Clause where empty = Clause empty empty empty empty empty empty False Nothing null (Clause _ _ tel pats body _ _ _) = null tel && null pats && null body --------------------------------------------------------------------------- -- * Show instances. --------------------------------------------------------------------------- instance Show a => Show (Abs a) where showsPrec p (Abs x a) = showParen (p > 0) $ showString "Abs " . shows x . showString " " . showsPrec 10 a showsPrec p (NoAbs x a) = showParen (p > 0) $ showString "NoAbs " . shows x . showString " " . showsPrec 10 a -- instance Show t => Show (Blocked t) where -- showsPrec p (Blocked m x) = showParen (p > 0) $ -- showString "Blocked " . shows m . showString " " . showsPrec 10 x -- showsPrec p (NotBlocked x) = showsPrec p x --------------------------------------------------------------------------- -- * Sized instances and TermSize. --------------------------------------------------------------------------- -- | The size of a telescope is its length (as a list). instance Sized (Tele a) where size EmptyTel = 0 size (ExtendTel _ tel) = 1 + size tel instance Sized a => Sized (Abs a) where size = size . unAbs -- | The size of a term is roughly the number of nodes in its -- syntax tree. This number need not be precise for logical -- correctness of Agda, it is only used for reporting -- (and maybe decisions regarding performance). -- -- Not counting towards the term size are: -- -- * sort and color annotations, -- * projections. -- class TermSize a where termSize :: a -> Int termSize = getSum . tsize tsize :: a -> Sum Int instance {-# OVERLAPPABLE #-} (Foldable t, TermSize a) => TermSize (t a) where tsize = foldMap tsize instance TermSize Term where tsize v = case v of Var _ vs -> 1 + tsize vs Def _ vs -> 1 + tsize vs Con _ _ vs -> 1 + tsize vs MetaV _ vs -> 1 + tsize vs Level l -> tsize l Lam _ f -> 1 + tsize f Lit _ -> 1 Pi a b -> 1 + tsize a + tsize b Sort s -> tsize s DontCare mv -> tsize mv Dummy{} -> 1 instance TermSize Sort where tsize s = case s of Type l -> 1 + tsize l Prop l -> 1 + tsize l Inf -> 1 SizeUniv -> 1 PiSort s s' -> 1 + tsize s + tsize s' UnivSort s -> 1 + tsize s MetaS _ es -> 1 + tsize es DefS _ es -> 1 + tsize es DummyS{} -> 1 instance TermSize Level where tsize (Max as) = 1 + tsize as instance TermSize PlusLevel where tsize (ClosedLevel _) = 1 tsize (Plus _ a) = tsize a instance TermSize LevelAtom where tsize (MetaLevel _ vs) = 1 + tsize vs tsize (BlockedLevel _ v) = tsize v tsize (NeutralLevel _ v) = tsize v tsize (UnreducedLevel v) = tsize v instance TermSize a => TermSize (Substitution' a) where tsize IdS = 1 tsize (EmptyS _) = 1 tsize (Wk _ rho) = 1 + tsize rho tsize (t :# rho) = 1 + tsize t + tsize rho tsize (Strengthen _ rho) = 1 + tsize rho tsize (Lift _ rho) = 1 + tsize rho --------------------------------------------------------------------------- -- * KillRange instances. --------------------------------------------------------------------------- instance KillRange ConHead where killRange (ConHead c i fs) = killRange3 ConHead c i fs instance KillRange Term where killRange v = case v of Var i vs -> killRange1 (Var i) vs Def c vs -> killRange2 Def c vs Con c ci vs -> killRange3 Con c ci vs MetaV m vs -> killRange1 (MetaV m) vs Lam i f -> killRange2 Lam i f Lit l -> killRange1 Lit l Level l -> killRange1 Level l Pi a b -> killRange2 Pi a b Sort s -> killRange1 Sort s DontCare mv -> killRange1 DontCare mv Dummy{} -> v instance KillRange Level where killRange (Max as) = killRange1 Max as instance KillRange PlusLevel where killRange l@ClosedLevel{} = l killRange (Plus n l) = killRange1 (Plus n) l instance KillRange LevelAtom where killRange (MetaLevel n as) = killRange1 (MetaLevel n) as killRange (BlockedLevel m v) = killRange1 (BlockedLevel m) v killRange (NeutralLevel r v) = killRange1 (NeutralLevel r) v killRange (UnreducedLevel v) = killRange1 UnreducedLevel v instance (KillRange a) => KillRange (Type' a) where killRange (El s v) = killRange2 El s v instance KillRange Sort where killRange s = case s of Inf -> Inf SizeUniv -> SizeUniv Type a -> killRange1 Type a Prop a -> killRange1 Prop a PiSort s1 s2 -> killRange2 PiSort s1 s2 UnivSort s -> killRange1 UnivSort s MetaS x es -> killRange1 (MetaS x) es DefS d es -> killRange2 DefS d es DummyS{} -> s instance KillRange Substitution where killRange IdS = IdS killRange (EmptyS err) = EmptyS err killRange (Wk n rho) = killRange1 (Wk n) rho killRange (t :# rho) = killRange2 (:#) t rho killRange (Strengthen err rho) = killRange1 (Strengthen err) rho killRange (Lift n rho) = killRange1 (Lift n) rho instance KillRange PatOrigin where killRange = id instance KillRange ConPatternInfo where killRange (ConPatternInfo mr b mt lz) = killRange1 (ConPatternInfo mr b) mt lz instance KillRange DBPatVar where killRange (DBPatVar x i) = killRange2 DBPatVar x i instance KillRange a => KillRange (Pattern' a) where killRange p = case p of VarP o x -> killRange2 VarP o x DotP o v -> killRange2 DotP o v ConP con info ps -> killRange3 ConP con info ps LitP l -> killRange1 LitP l ProjP o q -> killRange1 (ProjP o) q IApplyP o u t x -> killRange3 (IApplyP o) u t x DefP o q ps -> killRange2 (DefP o) q ps instance KillRange Clause where killRange (Clause rl rf tel ps body t catchall unreachable) = killRange8 Clause rl rf tel ps body t catchall unreachable instance KillRange a => KillRange (Tele a) where killRange = fmap killRange instance KillRange a => KillRange (Blocked a) where killRange = fmap killRange instance KillRange a => KillRange (Abs a) where killRange = fmap killRange instance KillRange a => KillRange (Elim' a) where killRange = fmap killRange --------------------------------------------------------------------------- -- * UniverseBi instances. --------------------------------------------------------------------------- instanceUniverseBiT' [] [t| (([Type], [Clause]), Pattern) |] instanceUniverseBiT' [] [t| (Args, Pattern) |] instanceUniverseBiT' [] [t| (Elims, Pattern) |] -- ? instanceUniverseBiT' [] [t| (([Type], [Clause]), Term) |] instanceUniverseBiT' [] [t| (Args, Term) |] instanceUniverseBiT' [] [t| (Elims, Term) |] -- ? instanceUniverseBiT' [] [t| ([Term], Term) |] ----------------------------------------------------------------------------- -- * Simple pretty printing ----------------------------------------------------------------------------- instance Pretty a => Pretty (Substitution' a) where prettyPrec p rho = pr p rho where pr p rho = case rho of IdS -> "idS" EmptyS err -> "emptyS" t :# rho -> mparens (p > 2) $ sep [ pr 2 rho P.<> ",", prettyPrec 3 t ] Strengthen _ rho -> mparens (p > 9) $ "strS" <+> pr 10 rho Wk n rho -> mparens (p > 9) $ text ("wkS " ++ show n) <+> pr 10 rho Lift n rho -> mparens (p > 9) $ text ("liftS " ++ show n) <+> pr 10 rho instance Pretty Term where prettyPrec p v = case v of Var x els -> text ("@" ++ show x) `pApp` els Lam ai b -> mparens (p > 0) $ sep [ "λ" <+> prettyHiding ai id (text . absName $ b) <+> "->" , nest 2 $ pretty (unAbs b) ] Lit l -> pretty l Def q els -> pretty q `pApp` els Con c ci vs -> pretty (conName c) `pApp` vs Pi a (NoAbs _ b) -> mparens (p > 0) $ sep [ prettyPrec 1 (unDom a) <+> "->" , nest 2 $ pretty b ] Pi a b -> mparens (p > 0) $ sep [ pDom (domInfo a) (text (absName b) <+> ":" <+> pretty (unDom a)) <+> "->" , nest 2 $ pretty (unAbs b) ] Sort s -> prettyPrec p s Level l -> prettyPrec p l MetaV x els -> pretty x `pApp` els DontCare v -> prettyPrec p v Dummy s -> parens $ text s where pApp d els = mparens (not (null els) && p > 9) $ sep [d, nest 2 $ fsep (map (prettyPrec 10) els)] pDom :: LensHiding a => a -> Doc -> Doc pDom i = case getHiding i of NotHidden -> parens Hidden -> braces Instance{} -> braces . braces instance Pretty Clause where pretty Clause{clauseTel = tel, namedClausePats = ps, clauseBody = b, clauseType = t} = sep [ pretty tel <+> "|-" , nest 2 $ sep [ fsep (map (prettyPrec 10) ps) <+> "=" , nest 2 $ pBody b t ] ] where pBody Nothing _ = "(absurd)" pBody (Just b) Nothing = pretty b pBody (Just b) (Just t) = sep [ pretty b <+> ":", nest 2 $ pretty t ] instance Pretty a => Pretty (Tele (Dom a)) where pretty tel = fsep [ pDom a (text x <+> ":" <+> pretty (unDom a)) | (x, a) <- telToList tel ] where telToList EmptyTel = [] telToList (ExtendTel a tel) = (absName tel, a) : telToList (unAbs tel) instance Pretty Level where prettyPrec p (Max as) = case as of [] -> prettyPrec p (ClosedLevel 0) [a] -> prettyPrec p a _ -> mparens (p > 9) $ List.foldr1 (\a b -> "lub" <+> a <+> b) $ map (prettyPrec 10) as instance Pretty PlusLevel where prettyPrec p l = case l of ClosedLevel n -> sucs p n $ \_ -> "lzero" Plus n a -> sucs p n $ \p -> prettyPrec p a where sucs p 0 d = d p sucs p n d = mparens (p > 9) $ "lsuc" <+> sucs 10 (n - 1) d instance Pretty LevelAtom where prettyPrec p a = case a of MetaLevel x els -> prettyPrec p (MetaV x els) BlockedLevel _ v -> prettyPrec p v NeutralLevel _ v -> prettyPrec p v UnreducedLevel v -> prettyPrec p v instance Pretty Sort where prettyPrec p s = case s of Type (Max []) -> "Set" Type (Max [ClosedLevel n]) -> text $ "Set" ++ show n Type l -> mparens (p > 9) $ "Set" <+> prettyPrec 10 l Prop (Max []) -> "Prop" Prop (Max [ClosedLevel n]) -> text $ "Prop" ++ show n Prop l -> mparens (p > 9) $ "Prop" <+> prettyPrec 10 l Inf -> "Setω" SizeUniv -> "SizeUniv" PiSort s b -> mparens (p > 9) $ "piSort" <+> prettyPrec 10 s <+> parens (sep [ text ("λ " ++ absName b ++ " ->") , nest 2 $ pretty (unAbs b) ]) UnivSort s -> mparens (p > 9) $ "univSort" <+> prettyPrec 10 s MetaS x es -> prettyPrec p $ MetaV x es DefS d es -> prettyPrec p $ Def d es DummyS s -> parens $ text s instance Pretty Type where prettyPrec p (El _ a) = prettyPrec p a instance Pretty tm => Pretty (Elim' tm) where prettyPrec p (Apply v) = prettyPrec p v prettyPrec _ (Proj _o x) = text ("." ++ prettyShow x) prettyPrec p (IApply x y r) = prettyPrec p r instance Pretty DBPatVar where prettyPrec _ x = text $ patVarNameToString (dbPatVarName x) ++ "@" ++ show (dbPatVarIndex x) instance Pretty a => Pretty (Pattern' a) where prettyPrec n (VarP _o x) = prettyPrec n x prettyPrec _ (DotP _o t) = "." P.<> prettyPrec 10 t prettyPrec n (ConP c i nps)= mparens (n > 0 && not (null nps)) $ pretty (conName c) <+> fsep (map (prettyPrec 10) ps) where ps = map (fmap namedThing) nps prettyPrec n (DefP o q nps)= mparens (n > 0 && not (null nps)) $ pretty q <+> fsep (map (prettyPrec 10) ps) where ps = map (fmap namedThing) nps -- -- Version with printing record type: -- prettyPrec _ (ConP c i ps) = (if b then braces else parens) $ prTy $ -- text (show $ conName c) <+> fsep (map (pretty . namedArg) ps) -- where -- b = maybe False (== ConOSystem) $ conPRecord i -- prTy d = caseMaybe (conPType i) d $ \ t -> d <+> ":" <+> pretty t prettyPrec _ (LitP l) = pretty l prettyPrec _ (ProjP _o q) = text ("." ++ prettyShow q) prettyPrec n (IApplyP _o _ _ x) = prettyPrec n x ----------------------------------------------------------------------------- -- * NFData instances ----------------------------------------------------------------------------- -- Note: only strict in the shape of the terms. instance NFData Term where rnf v = case v of Var _ es -> rnf es Lam _ b -> rnf (unAbs b) Lit l -> rnf l Def _ es -> rnf es Con _ _ vs -> rnf vs Pi a b -> rnf (unDom a, unAbs b) Sort s -> rnf s Level l -> rnf l MetaV _ es -> rnf es DontCare v -> rnf v Dummy _ -> () instance NFData Type where rnf (El s v) = rnf (s, v) instance NFData Sort where rnf s = case s of Type l -> rnf l Prop l -> rnf l Inf -> () SizeUniv -> () PiSort a b -> rnf (a, unAbs b) UnivSort a -> rnf a MetaS _ es -> rnf es DefS _ es -> rnf es DummyS _ -> () instance NFData Level where rnf (Max as) = rnf as instance NFData PlusLevel where rnf (ClosedLevel n) = rnf n rnf (Plus n l) = rnf (n, l) instance NFData LevelAtom where rnf (MetaLevel _ es) = rnf es rnf (BlockedLevel _ v) = rnf v rnf (NeutralLevel _ v) = rnf v rnf (UnreducedLevel v) = rnf v instance NFData a => NFData (Elim' a) where rnf (Apply x) = rnf x rnf Proj{} = () rnf (IApply x y r) = rnf x `seq` rnf y `seq` rnf r Agda-2.6.0.1/src/full/Agda/Syntax/Concrete.hs0000644000000000000000000012701313466402171016661 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE LambdaCase #-} {-| The concrete syntax is a raw representation of the program text without any desugaring at all. This is what the parser produces. The idea is that if we figure out how to keep the concrete syntax around, it can be printed exactly as the user wrote it. -} module Agda.Syntax.Concrete ( -- * Expressions Expr(..) , OpApp(..), fromOrdinary , module Agda.Syntax.Concrete.Name , appView, AppView(..) , isSingleIdentifierP, removeSingletonRawAppP -- * Bindings , LamBinding , LamBinding'(..) , TypedBinding , TypedBinding'(..) , RecordAssignment , RecordAssignments , FieldAssignment, FieldAssignment'(..), nameFieldA, exprFieldA , ModuleAssignment(..) , BoundName(..), mkBoundName_, mkBoundName , Telescope -- (..) , countTelVars , lamBindingsToTelescope , makePi -- * Declarations , Declaration(..) , ModuleApplication(..) , TypeSignature , TypeSignatureOrInstanceBlock , ImportDirective, Using, ImportedName , Renaming , AsName'(..), AsName , OpenShortHand(..), RewriteEqn, WithExpr , LHS(..), Pattern(..), LHSCore(..) , LamClause(..) , RHS, RHS'(..), WhereClause, WhereClause'(..), ExprWhere(..) , DoStmt(..) , Pragma(..) , Module , ThingWithFixity(..) , HoleContent, HoleContent'(..) , topLevelModuleName , spanAllowedBeforeModule ) where import Prelude hiding (null) import Control.DeepSeq import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Data.List hiding (null) import Data.Set (Set) import Data.Monoid import Data.Data (Data) import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Literal import Agda.Syntax.Concrete.Name import qualified Agda.Syntax.Abstract.Name as A import Agda.TypeChecking.Positivity.Occurrence import Agda.Utils.Lens import Agda.Utils.Null #include "undefined.h" import Agda.Utils.Impossible data OpApp e = SyntaxBindingLambda Range [LamBinding] e -- ^ An abstraction inside a special syntax declaration -- (see Issue 358 why we introduce this). | Ordinary e deriving (Data, Functor, Foldable, Traversable) fromOrdinary :: e -> OpApp e -> e fromOrdinary d (Ordinary e) = e fromOrdinary d _ = d data FieldAssignment' a = FieldAssignment { _nameFieldA :: Name, _exprFieldA :: a } deriving (Data, Functor, Foldable, Traversable, Show, Eq) type FieldAssignment = FieldAssignment' Expr data ModuleAssignment = ModuleAssignment { _qnameModA :: QName , _exprModA :: [Expr] , _importDirModA :: ImportDirective } deriving Data type RecordAssignment = Either FieldAssignment ModuleAssignment type RecordAssignments = [RecordAssignment] nameFieldA :: Lens' Name (FieldAssignment' a) nameFieldA f r = f (_nameFieldA r) <&> \x -> r { _nameFieldA = x } exprFieldA :: Lens' a (FieldAssignment' a) exprFieldA f r = f (_exprFieldA r) <&> \x -> r { _exprFieldA = x } qnameModA :: Lens' QName ModuleAssignment qnameModA f r = f (_qnameModA r) <&> \x -> r { _qnameModA = x } exprModA :: Lens' [Expr] ModuleAssignment exprModA f r = f (_exprModA r) <&> \x -> r { _exprModA = x } importDirModA :: Lens' ImportDirective ModuleAssignment importDirModA f r = f (_importDirModA r) <&> \x -> r { _importDirModA = x } -- | Concrete expressions. Should represent exactly what the user wrote. data Expr = Ident QName -- ^ ex: @x@ | Lit Literal -- ^ ex: @1@ or @\"foo\"@ | QuestionMark Range (Maybe Nat) -- ^ ex: @?@ or @{! ... !}@ | Underscore Range (Maybe String) -- ^ ex: @_@ or @_A_5@ | RawApp Range [Expr] -- ^ before parsing operators | App Range Expr (NamedArg Expr) -- ^ ex: @e e@, @e {e}@, or @e {x = e}@ | OpApp Range QName (Set A.Name) [NamedArg (MaybePlaceholder (OpApp Expr))] -- ^ ex: @e + e@ -- The 'QName' is -- possibly ambiguous, -- but it must -- correspond to one of -- the names in the -- set. | WithApp Range Expr [Expr] -- ^ ex: @e | e1 | .. | en@ | HiddenArg Range (Named_ Expr) -- ^ ex: @{e}@ or @{x=e}@ | InstanceArg Range (Named_ Expr) -- ^ ex: @{{e}}@ or @{{x=e}}@ | Lam Range [LamBinding] Expr -- ^ ex: @\\x {y} -> e@ or @\\(x:A){y:B} -> e@ | AbsurdLam Range Hiding -- ^ ex: @\\ ()@ | ExtendedLam Range [LamClause] -- ^ ex: @\\ { p11 .. p1a -> e1 ; .. ; pn1 .. pnz -> en }@ | Fun Range (Arg Expr) Expr -- ^ ex: @e -> e@ or @.e -> e@ (NYI: @{e} -> e@) | Pi Telescope Expr -- ^ ex: @(xs:e) -> e@ or @{xs:e} -> e@ | Set Range -- ^ ex: @Set@ | Prop Range -- ^ ex: @Prop@ | SetN Range Integer -- ^ ex: @Set0, Set1, ..@ | PropN Range Integer -- ^ ex: @Prop0, Prop1, ..@ | Rec Range RecordAssignments -- ^ ex: @record {x = a; y = b}@, or @record { x = a; M1; M2 }@ | RecUpdate Range Expr [FieldAssignment] -- ^ ex: @record e {x = a; y = b}@ | Let Range [Declaration] (Maybe Expr) -- ^ ex: @let Ds in e@, missing body when parsing do-notation let | Paren Range Expr -- ^ ex: @(e)@ | IdiomBrackets Range Expr -- ^ ex: @(| e |)@ | DoBlock Range [DoStmt] -- ^ ex: @do x <- m1; m2@ | Absurd Range -- ^ ex: @()@ or @{}@, only in patterns | As Range Name Expr -- ^ ex: @x\@p@, only in patterns | Dot Range Expr -- ^ ex: @.p@, only in patterns | ETel Telescope -- ^ only used for printing telescopes | QuoteGoal Range Name Expr -- ^ ex: @quoteGoal x in e@ | QuoteContext Range -- ^ ex: @quoteContext@ | Quote Range -- ^ ex: @quote@, should be applied to a name | QuoteTerm Range -- ^ ex: @quoteTerm@, should be applied to a term | Tactic Range Expr [Expr] -- ^ @tactic solve | subgoal1 | .. | subgoalN@ | Unquote Range -- ^ ex: @unquote@, should be applied to a term of type @Term@ | DontCare Expr -- ^ to print irrelevant things | Equal Range Expr Expr -- ^ ex: @a = b@, used internally in the parser | Ellipsis Range -- ^ @...@, used internally to parse patterns. | Generalized Expr deriving Data -- | Concrete patterns. No literals in patterns at the moment. data Pattern = IdentP QName -- ^ @c@ or @x@ | QuoteP Range -- ^ @quote@ | AppP Pattern (NamedArg Pattern) -- ^ @p p'@ or @p {x = p'}@ | RawAppP Range [Pattern] -- ^ @p1..pn@ before parsing operators | OpAppP Range QName (Set A.Name) [NamedArg Pattern] -- ^ eg: @p => p'@ for operator @_=>_@ -- The 'QName' is possibly -- ambiguous, but it must -- correspond to one of -- the names in the set. | HiddenP Range (Named_ Pattern) -- ^ @{p}@ or @{x = p}@ | InstanceP Range (Named_ Pattern) -- ^ @{{p}}@ or @{{x = p}}@ | ParenP Range Pattern -- ^ @(p)@ | WildP Range -- ^ @_@ | AbsurdP Range -- ^ @()@ | AsP Range Name Pattern -- ^ @x\@p@ unused | DotP Range Expr -- ^ @.e@ | LitP Literal -- ^ @0@, @1@, etc. | RecP Range [FieldAssignment' Pattern] -- ^ @record {x = p; y = q}@ | EqualP Range [(Expr,Expr)] -- ^ @i = i1@ i.e. cubical face lattice generator | EllipsisP Range -- ^ @...@, only as left-most pattern. | WithP Range Pattern -- ^ @| p@, for with-patterns. deriving Data data DoStmt = DoBind Range Pattern Expr [LamClause] -- ^ @p ← e where cs@ | DoThen Expr | DoLet Range [Declaration] deriving Data -- | A lambda binding is either domain free or typed. type LamBinding = LamBinding' TypedBinding data LamBinding' a = DomainFree (NamedArg BoundName) -- ^ . @x@ or @{x}@ or @.x@ or @.{x}@ or @{.x}@ | DomainFull a -- ^ . @(xs : e)@ or @{xs : e}@ deriving (Data, Functor, Foldable, Traversable) data BoundName = BName { boundName :: Name , bnameFixity :: Fixity' } deriving (Data, Eq, Show) mkBoundName_ :: Name -> BoundName mkBoundName_ x = mkBoundName x noFixity' mkBoundName :: Name -> Fixity' -> BoundName mkBoundName x f = BName x f -- | A typed binding. type TypedBinding = TypedBinding' Expr data TypedBinding' e = TBind Range [NamedArg BoundName] e -- ^ Binding @(x1 ... xn : A)@. | TLet Range [Declaration] -- ^ Let binding @(let Ds)@ or @(open M args)@. deriving (Data, Functor, Foldable, Traversable) -- | A telescope is a sequence of typed bindings. Bound variables are in scope -- in later types. type Telescope = [TypedBinding] countTelVars :: Telescope -> Nat countTelVars tel = sum [ case b of TBind _ xs _ -> genericLength xs TLet{} -> 0 | b <- tel ] -- | We can try to get a @Telescope@ from a @[LamBinding]@. -- If we have a type annotation already, we're happy. -- Otherwise we manufacture a binder with an underscore for the type. lamBindingsToTelescope :: Range -> [LamBinding] -> Telescope lamBindingsToTelescope r = map $ \case DomainFull ty -> ty DomainFree nm -> TBind r [nm] $ Underscore r Nothing -- | Smart constructor for @Pi@: check whether the @Telescope@ is empty makePi :: Telescope -> Expr -> Expr makePi [] e = e makePi bs e = Pi bs e {-| Left hand sides can be written in infix style. For example: > n + suc m = suc (n + m) > (f ∘ g) x = f (g x) We use fixity information to see which name is actually defined. -} data LHS = LHS { lhsOriginalPattern :: Pattern -- ^ e.g. @f ps | wps@ , lhsRewriteEqn :: [RewriteEqn] -- ^ @rewrite e@ (many) , lhsWithExpr :: [WithExpr] -- ^ @with e@ (many) } -- ^ Original pattern (including with-patterns), rewrite equations and with-expressions. deriving Data type RewriteEqn = Expr type WithExpr = Expr -- | Processed (operator-parsed) intermediate form of the core @f ps@ of 'LHS'. -- Corresponds to 'lhsOriginalPattern'. data LHSCore = LHSHead { lhsDefName :: QName -- ^ @f@ , lhsPats :: [NamedArg Pattern] -- ^ @ps@ } | LHSProj { lhsDestructor :: QName -- ^ Record projection. , lhsPatsLeft :: [NamedArg Pattern] -- ^ Patterns for record indices (currently none). , lhsFocus :: NamedArg LHSCore -- ^ Main argument. , lhsPats :: [NamedArg Pattern] -- ^ More application patterns. } | LHSWith { lhsHead :: LHSCore , lhsWithPatterns :: [Pattern] -- ^ Non-empty; at least one @(| p)@. , lhsPats :: [NamedArg Pattern] -- ^ More application patterns. } type RHS = RHS' Expr data RHS' e = AbsurdRHS -- ^ No right hand side because of absurd match. | RHS e deriving (Data, Functor, Foldable, Traversable) type WhereClause = WhereClause' [Declaration] data WhereClause' decls = NoWhere -- ^ No @where@ clauses. | AnyWhere decls -- ^ Ordinary @where@. | SomeWhere Name Access decls -- ^ Named where: @module M where@. -- The 'Access' flag applies to the 'Name' (not the module contents!) -- and is propagated from the parent function. deriving (Data, Functor, Foldable, Traversable) data LamClause = LamClause { lamLHS :: LHS , lamRHS :: RHS , lamWhere :: WhereClause -- ^ always 'NoWhere' (see parser) , lamCatchAll :: Bool } deriving Data -- | An expression followed by a where clause. -- Currently only used to give better a better error message in interaction. data ExprWhere = ExprWhere Expr WhereClause -- | The things you are allowed to say when you shuffle names between name -- spaces (i.e. in @import@, @namespace@, or @open@ declarations). type ImportDirective = ImportDirective' Name Name type Using = Using' Name Name type Renaming = Renaming' Name Name -- | An imported name can be a module or a defined name. type ImportedName = ImportedName' Name Name -- | The content of the @as@-clause of the import statement. data AsName' a = AsName { asName :: a -- ^ The \"as\" name. , asRange :: Range -- ^ The range of the \"as\" keyword. Retained for highlighting purposes. } deriving (Data, Show, Functor, Foldable, Traversable) -- | From the parser, we get an expression for the @as@-'Name', which -- we have to parse into a 'Name'. type AsName = AsName' (Either Expr Name) {-------------------------------------------------------------------------- Declarations --------------------------------------------------------------------------} -- | Just type signatures. type TypeSignature = Declaration -- | Just type signatures or instance blocks. type TypeSignatureOrInstanceBlock = Declaration {-| The representation type of a declaration. The comments indicate which type in the intended family the constructor targets. -} data Declaration = TypeSig ArgInfo Name Expr -- ^ Axioms and functions can be irrelevant. (Hiding should be NotHidden) | Generalize Range [TypeSignature] -- ^ Variables to be generalized, can be hidden and/or irrelevant. | Field IsInstance Name (Arg Expr) -- ^ Record field, can be hidden and/or irrelevant. | FunClause LHS RHS WhereClause Bool | DataSig Range Induction Name [LamBinding] Expr -- ^ lone data signature in mutual block | Data Range Induction Name [LamBinding] Expr [TypeSignatureOrInstanceBlock] | DataDef Range Induction Name [LamBinding] [TypeSignatureOrInstanceBlock] | RecordSig Range Name [LamBinding] Expr -- ^ lone record signature in mutual block | RecordDef Range Name (Maybe (Ranged Induction)) (Maybe HasEta) (Maybe (Name, IsInstance)) [LamBinding] [Declaration] | Record Range Name (Maybe (Ranged Induction)) (Maybe HasEta) (Maybe (Name, IsInstance)) [LamBinding] Expr [Declaration] -- ^ The optional name is a name for the record constructor. | Infix Fixity [Name] | Syntax Name Notation -- ^ notation declaration for a name | PatternSyn Range Name [Arg Name] Pattern | Mutual Range [Declaration] -- @Range@ of the whole @mutual@ block. | Abstract Range [Declaration] | Private Range Origin [Declaration] -- ^ In "Agda.Syntax.Concrete.Definitions" we generate private blocks -- temporarily, which should be treated different that user-declared -- private blocks. Thus the 'Origin'. | InstanceB Range [Declaration] | Macro Range [Declaration] | Postulate Range [TypeSignatureOrInstanceBlock] | Primitive Range [TypeSignature] | Open Range QName ImportDirective | Import Range QName (Maybe AsName) !OpenShortHand ImportDirective | ModuleMacro Range Name ModuleApplication !OpenShortHand ImportDirective | Module Range QName Telescope [Declaration] | UnquoteDecl Range [Name] Expr | UnquoteDef Range [Name] Expr | Pragma Pragma deriving Data data ModuleApplication = SectionApp Range Telescope Expr -- ^ @tel. M args@ | RecordModuleInstance Range QName -- ^ @M {{...}}@ deriving Data data OpenShortHand = DoOpen | DontOpen deriving (Data, Eq, Show) -- Pragmas ---------------------------------------------------------------- data Pragma = OptionsPragma Range [String] | BuiltinPragma Range String QName | RewritePragma Range [QName] | ForeignPragma Range String String -- ^ first string is backend name | CompilePragma Range String QName String -- ^ first string is backend name | StaticPragma Range QName | InlinePragma Range Bool QName -- ^ INLINE or NOINLINE | ImpossiblePragma Range -- ^ Throws an internal error in the scope checker. | EtaPragma Range QName -- ^ For coinductive records, use pragma instead of regular -- @eta-equality@ definition (as it is might make Agda loop). | WarningOnUsage Range QName String -- ^ Applies to the named function | InjectivePragma Range QName -- ^ Mark a definition as injective for the pattern matching unifier. | DisplayPragma Range Pattern Expr -- ^ Display lhs as rhs (modifies the printer). -- Attached (more or less) pragmas handled in the nicifier (Concrete.Definitions): | CatchallPragma Range -- ^ Applies to the following function clause. | TerminationCheckPragma Range (TerminationCheck Name) -- ^ Applies to the following function (and all that are mutually recursive with it) -- or to the functions in the following mutual block. | NoPositivityCheckPragma Range -- ^ Applies to the following data/record type or mutual block. | PolarityPragma Range Name [Occurrence] | NoUniverseCheckPragma Range -- ^ Applies to the following data/record type. deriving Data --------------------------------------------------------------------------- -- | Modules: Top-level pragmas plus other top-level declarations. type Module = ([Pragma], [Declaration]) -- | Computes the top-level module name. -- -- Precondition: The 'Module' has to be well-formed. -- This means that there are only allowed declarations before the -- first module declaration, typically import declarations. -- See 'spanAllowedBeforeModule'. topLevelModuleName :: Module -> TopLevelModuleName topLevelModuleName (_, []) = __IMPOSSIBLE__ topLevelModuleName (_, ds) = case spanAllowedBeforeModule ds of (_, Module _ n _ _ : _) -> toTopLevelModuleName n _ -> __IMPOSSIBLE__ -- | Splits off allowed (= import) declarations before the first -- non-allowed declaration. -- After successful parsing, the first non-allowed declaration -- should be a module declaration. spanAllowedBeforeModule :: [Declaration] -> ([Declaration], [Declaration]) spanAllowedBeforeModule = span isAllowedBeforeModule where isAllowedBeforeModule (Pragma OptionsPragma{}) = True isAllowedBeforeModule (Pragma BuiltinPragma{}) = True isAllowedBeforeModule (Private _ _ ds) = all isAllowedBeforeModule ds isAllowedBeforeModule Import{} = True isAllowedBeforeModule ModuleMacro{} = True isAllowedBeforeModule Open{} = True isAllowedBeforeModule _ = False {-------------------------------------------------------------------------- Things we parse but are not part of the Agda file syntax --------------------------------------------------------------------------} -- | Extended content of an interaction hole. data HoleContent' e = HoleContentExpr e -- ^ @e@ | HoleContentRewrite [e] -- ^ @rewrite e0 | ... | en@ deriving (Functor, Foldable, Traversable) type HoleContent = HoleContent' Expr {-------------------------------------------------------------------------- Views --------------------------------------------------------------------------} -- | The 'Expr' is not an application. data AppView = AppView Expr [NamedArg Expr] appView :: Expr -> AppView appView e = case e of App r e1 e2 -> vApp (appView e1) e2 RawApp _ (e:es) -> AppView e $ map arg es _ -> AppView e [] where vApp (AppView e es) arg = AppView e (es ++ [arg]) arg (HiddenArg _ e) = hide $ defaultArg e arg (InstanceArg _ e) = makeInstance $ defaultArg e arg e = defaultArg (unnamed e) isSingleIdentifierP :: Pattern -> Maybe Name isSingleIdentifierP p = case removeSingletonRawAppP p of IdentP (QName x) -> Just x WildP r -> Just $ noName r _ -> Nothing removeSingletonRawAppP :: Pattern -> Pattern removeSingletonRawAppP p = case p of RawAppP _ [p'] -> removeSingletonRawAppP p' ParenP _ p' -> removeSingletonRawAppP p' _ -> p {-------------------------------------------------------------------------- Instances --------------------------------------------------------------------------} -- Null ------------------------------------------------------------------------ -- | A 'WhereClause' is 'null' when the @where@ keyword is absent. -- An empty list of declarations does not count as 'null' here. instance Null (WhereClause' a) where empty = NoWhere null NoWhere = True null AnyWhere{} = False null SomeWhere{} = False -- Lenses ------------------------------------------------------------------------ instance LensHiding LamBinding where getHiding (DomainFree x) = getHiding x getHiding (DomainFull a) = getHiding a mapHiding f (DomainFree x) = DomainFree $ mapHiding f x mapHiding f (DomainFull a) = DomainFull $ mapHiding f a instance LensHiding TypedBinding where getHiding (TBind _ (x : _) _) = getHiding x -- Slightly dubious getHiding (TBind _ [] _) = __IMPOSSIBLE__ getHiding TLet{} = mempty mapHiding f (TBind r xs e) = TBind r ((map . mapHiding) f xs) e mapHiding f b@TLet{} = b instance LensRelevance TypedBinding where getRelevance (TBind _ (x : _) _) = getRelevance x -- Slightly dubious getRelevance (TBind _ [] _) = __IMPOSSIBLE__ getRelevance TLet{} = mempty mapRelevance f (TBind r xs e) = TBind r ((map . mapRelevance) f xs) e mapRelevance f b@TLet{} = b -- HasRange instances ------------------------------------------------------------------------ instance HasRange e => HasRange (OpApp e) where getRange e = case e of Ordinary e -> getRange e SyntaxBindingLambda r _ _ -> r instance HasRange Expr where getRange e = case e of Ident x -> getRange x Lit x -> getRange x QuestionMark r _ -> r Underscore r _ -> r App r _ _ -> r RawApp r _ -> r OpApp r _ _ _ -> r WithApp r _ _ -> r Lam r _ _ -> r AbsurdLam r _ -> r ExtendedLam r _ -> r Fun r _ _ -> r Pi b e -> fuseRange b e Set r -> r Prop r -> r SetN r _ -> r PropN r _ -> r Let r _ _ -> r Paren r _ -> r IdiomBrackets r _ -> r DoBlock r _ -> r As r _ _ -> r Dot r _ -> r Absurd r -> r HiddenArg r _ -> r InstanceArg r _ -> r Rec r _ -> r RecUpdate r _ _ -> r ETel tel -> getRange tel QuoteGoal r _ _ -> r QuoteContext r -> r Quote r -> r QuoteTerm r -> r Unquote r -> r Tactic r _ _ -> r DontCare{} -> noRange Equal r _ _ -> r Ellipsis r -> r Generalized e -> getRange e -- instance HasRange Telescope where -- getRange (TeleBind bs) = getRange bs -- getRange (TeleFun x y) = fuseRange x y instance HasRange TypedBinding where getRange (TBind r _ _) = r getRange (TLet r _) = r instance HasRange LamBinding where getRange (DomainFree x) = getRange x getRange (DomainFull b) = getRange b instance HasRange BoundName where getRange = getRange . boundName instance HasRange WhereClause where getRange NoWhere = noRange getRange (AnyWhere ds) = getRange ds getRange (SomeWhere _ _ ds) = getRange ds instance HasRange ModuleApplication where getRange (SectionApp r _ _) = r getRange (RecordModuleInstance r _) = r instance HasRange a => HasRange (FieldAssignment' a) where getRange (FieldAssignment a b) = fuseRange a b instance HasRange ModuleAssignment where getRange (ModuleAssignment a b c) = fuseRange a b `fuseRange` c instance HasRange Declaration where getRange (TypeSig _ x t) = fuseRange x t getRange (Field _ x t) = fuseRange x t getRange (FunClause lhs rhs wh _) = fuseRange lhs rhs `fuseRange` wh getRange (DataSig r _ _ _ _) = r getRange (Data r _ _ _ _ _) = r getRange (DataDef r _ _ _ _) = r getRange (RecordSig r _ _ _) = r getRange (RecordDef r _ _ _ _ _ _) = r getRange (Record r _ _ _ _ _ _ _) = r getRange (Mutual r _) = r getRange (Abstract r _) = r getRange (Generalize r _) = r getRange (Open r _ _) = r getRange (ModuleMacro r _ _ _ _) = r getRange (Import r _ _ _ _) = r getRange (InstanceB r _) = r getRange (Macro r _) = r getRange (Private r _ _) = r getRange (Postulate r _) = r getRange (Primitive r _) = r getRange (Module r _ _ _) = r getRange (Infix f _) = getRange f getRange (Syntax n _) = getRange n getRange (PatternSyn r _ _ _) = r getRange (UnquoteDecl r _ _) = r getRange (UnquoteDef r _ _) = r getRange (Pragma p) = getRange p instance HasRange LHS where getRange (LHS p eqns ws) = fuseRange p (eqns ++ ws) instance HasRange LHSCore where getRange (LHSHead f ps) = fuseRange f ps getRange (LHSProj d ps1 lhscore ps2) = d `fuseRange` ps1 `fuseRange` lhscore `fuseRange` ps2 getRange (LHSWith f wps ps) = f `fuseRange` wps `fuseRange` ps instance HasRange RHS where getRange AbsurdRHS = noRange getRange (RHS e) = getRange e instance HasRange LamClause where getRange (LamClause lhs rhs wh _) = getRange (lhs, rhs, wh) instance HasRange DoStmt where getRange (DoBind r _ _ _) = r getRange (DoThen e) = getRange e getRange (DoLet r _) = r instance HasRange Pragma where getRange (OptionsPragma r _) = r getRange (BuiltinPragma r _ _) = r getRange (RewritePragma r _) = r getRange (CompilePragma r _ _ _) = r getRange (ForeignPragma r _ _) = r getRange (StaticPragma r _) = r getRange (InjectivePragma r _) = r getRange (InlinePragma r _ _) = r getRange (ImpossiblePragma r) = r getRange (EtaPragma r _) = r getRange (TerminationCheckPragma r _) = r getRange (WarningOnUsage r _ _) = r getRange (CatchallPragma r) = r getRange (DisplayPragma r _ _) = r getRange (NoPositivityCheckPragma r) = r getRange (PolarityPragma r _ _) = r getRange (NoUniverseCheckPragma r) = r instance HasRange AsName where getRange a = getRange (asRange a, asName a) instance HasRange Pattern where getRange (IdentP x) = getRange x getRange (AppP p q) = fuseRange p q getRange (OpAppP r _ _ _) = r getRange (RawAppP r _) = r getRange (ParenP r _) = r getRange (WildP r) = r getRange (AsP r _ _) = r getRange (AbsurdP r) = r getRange (LitP l) = getRange l getRange (QuoteP r) = r getRange (HiddenP r _) = r getRange (InstanceP r _) = r getRange (DotP r _) = r getRange (RecP r _) = r getRange (EqualP r _) = r getRange (EllipsisP r) = r getRange (WithP r _) = r -- SetRange instances ------------------------------------------------------------------------ instance SetRange Pattern where setRange r (IdentP x) = IdentP (setRange r x) setRange r (AppP p q) = AppP (setRange r p) (setRange r q) setRange r (OpAppP _ x ns ps) = OpAppP r x ns ps setRange r (RawAppP _ ps) = RawAppP r ps setRange r (ParenP _ p) = ParenP r p setRange r (WildP _) = WildP r setRange r (AsP _ x p) = AsP r (setRange r x) p setRange r (AbsurdP _) = AbsurdP r setRange r (LitP l) = LitP (setRange r l) setRange r (QuoteP _) = QuoteP r setRange r (HiddenP _ p) = HiddenP r p setRange r (InstanceP _ p) = InstanceP r p setRange r (DotP _ e) = DotP r e setRange r (RecP _ fs) = RecP r fs setRange r (EqualP _ es) = EqualP r es setRange r (EllipsisP _) = EllipsisP r setRange r (WithP _ p) = WithP r p instance SetRange TypedBinding where setRange r (TBind _ xs e) = TBind r xs e setRange r (TLet _ ds) = TLet r ds -- KillRange instances ------------------------------------------------------------------------ instance KillRange a => KillRange (FieldAssignment' a) where killRange (FieldAssignment a b) = killRange2 FieldAssignment a b instance KillRange ModuleAssignment where killRange (ModuleAssignment a b c) = killRange3 ModuleAssignment a b c instance KillRange AsName where killRange (AsName n _) = killRange1 (flip AsName noRange) n instance KillRange BoundName where killRange (BName n f) = killRange2 BName n f instance KillRange Declaration where killRange (TypeSig i n e) = killRange2 (TypeSig i) n e killRange (Generalize r ds ) = killRange1 (Generalize noRange) ds killRange (Field i n a) = killRange2 (Field i) n a killRange (FunClause l r w ca) = killRange4 FunClause l r w ca killRange (DataSig _ i n l e) = killRange4 (DataSig noRange) i n l e killRange (Data _ i n l e c) = killRange4 (Data noRange i) n l e c killRange (DataDef _ i n l c) = killRange3 (DataDef noRange i) n l c killRange (RecordSig _ n l e) = killRange3 (RecordSig noRange) n l e killRange (RecordDef _ n mi mb mn k d) = killRange6 (RecordDef noRange) n mi mb mn k d killRange (Record _ n mi mb mn k e d) = killRange7 (Record noRange) n mi mb mn k e d killRange (Infix f n) = killRange2 Infix f n killRange (Syntax n no) = killRange1 (\n -> Syntax n no) n killRange (PatternSyn _ n ns p) = killRange3 (PatternSyn noRange) n ns p killRange (Mutual _ d) = killRange1 (Mutual noRange) d killRange (Abstract _ d) = killRange1 (Abstract noRange) d killRange (Private _ o d) = killRange2 (Private noRange) o d killRange (InstanceB _ d) = killRange1 (InstanceB noRange) d killRange (Macro _ d) = killRange1 (Macro noRange) d killRange (Postulate _ t) = killRange1 (Postulate noRange) t killRange (Primitive _ t) = killRange1 (Primitive noRange) t killRange (Open _ q i) = killRange2 (Open noRange) q i killRange (Import _ q a o i) = killRange3 (\q a -> Import noRange q a o) q a i killRange (ModuleMacro _ n m o i) = killRange3 (\n m -> ModuleMacro noRange n m o) n m i killRange (Module _ q t d) = killRange3 (Module noRange) q t d killRange (UnquoteDecl _ x t) = killRange2 (UnquoteDecl noRange) x t killRange (UnquoteDef _ x t) = killRange2 (UnquoteDef noRange) x t killRange (Pragma p) = killRange1 Pragma p instance KillRange Expr where killRange (Ident q) = killRange1 Ident q killRange (Lit l) = killRange1 Lit l killRange (QuestionMark _ n) = QuestionMark noRange n killRange (Underscore _ n) = Underscore noRange n killRange (RawApp _ e) = killRange1 (RawApp noRange) e killRange (App _ e a) = killRange2 (App noRange) e a killRange (OpApp _ n ns o) = killRange3 (OpApp noRange) n ns o killRange (WithApp _ e es) = killRange2 (WithApp noRange) e es killRange (HiddenArg _ n) = killRange1 (HiddenArg noRange) n killRange (InstanceArg _ n) = killRange1 (InstanceArg noRange) n killRange (Lam _ l e) = killRange2 (Lam noRange) l e killRange (AbsurdLam _ h) = killRange1 (AbsurdLam noRange) h killRange (ExtendedLam _ lrw) = killRange1 (ExtendedLam noRange) lrw killRange (Fun _ e1 e2) = killRange2 (Fun noRange) e1 e2 killRange (Pi t e) = killRange2 Pi t e killRange (Set _) = Set noRange killRange (Prop _) = Prop noRange killRange (SetN _ n) = SetN noRange n killRange (PropN _ n) = PropN noRange n killRange (Rec _ ne) = killRange1 (Rec noRange) ne killRange (RecUpdate _ e ne) = killRange2 (RecUpdate noRange) e ne killRange (Let _ d e) = killRange2 (Let noRange) d e killRange (Paren _ e) = killRange1 (Paren noRange) e killRange (IdiomBrackets _ e) = killRange1 (IdiomBrackets noRange) e killRange (DoBlock _ ss) = killRange1 (DoBlock noRange) ss killRange (Absurd _) = Absurd noRange killRange (As _ n e) = killRange2 (As noRange) n e killRange (Dot _ e) = killRange1 (Dot noRange) e killRange (ETel t) = killRange1 ETel t killRange (QuoteGoal _ n e) = killRange2 (QuoteGoal noRange) n e killRange (QuoteContext _) = QuoteContext noRange killRange (Quote _) = Quote noRange killRange (QuoteTerm _) = QuoteTerm noRange killRange (Unquote _) = Unquote noRange killRange (Tactic _ t es) = killRange2 (Tactic noRange) t es killRange (DontCare e) = killRange1 DontCare e killRange (Equal _ x y) = Equal noRange x y killRange (Ellipsis _) = Ellipsis noRange killRange (Generalized e) = killRange1 Generalized e instance KillRange LamBinding where killRange (DomainFree b) = killRange1 DomainFree b killRange (DomainFull t) = killRange1 DomainFull t instance KillRange LHS where killRange (LHS p r w) = killRange3 LHS p r w instance KillRange LamClause where killRange (LamClause a b c d) = killRange4 LamClause a b c d instance KillRange DoStmt where killRange (DoBind r p e w) = killRange4 DoBind r p e w killRange (DoThen e) = killRange1 DoThen e killRange (DoLet r ds) = killRange2 DoLet r ds instance KillRange ModuleApplication where killRange (SectionApp _ t e) = killRange2 (SectionApp noRange) t e killRange (RecordModuleInstance _ q) = killRange1 (RecordModuleInstance noRange) q instance KillRange e => KillRange (OpApp e) where killRange (SyntaxBindingLambda _ l e) = killRange2 (SyntaxBindingLambda noRange) l e killRange (Ordinary e) = killRange1 Ordinary e instance KillRange Pattern where killRange (IdentP q) = killRange1 IdentP q killRange (AppP p ps) = killRange2 AppP p ps killRange (RawAppP _ p) = killRange1 (RawAppP noRange) p killRange (OpAppP _ n ns p) = killRange3 (OpAppP noRange) n ns p killRange (HiddenP _ n) = killRange1 (HiddenP noRange) n killRange (InstanceP _ n) = killRange1 (InstanceP noRange) n killRange (ParenP _ p) = killRange1 (ParenP noRange) p killRange (WildP _) = WildP noRange killRange (AbsurdP _) = AbsurdP noRange killRange (AsP _ n p) = killRange2 (AsP noRange) n p killRange (DotP _ e) = killRange1 (DotP noRange) e killRange (LitP l) = killRange1 LitP l killRange (QuoteP _) = QuoteP noRange killRange (RecP _ fs) = killRange1 (RecP noRange) fs killRange (EqualP _ es) = killRange1 (EqualP noRange) es killRange (EllipsisP _) = EllipsisP noRange killRange (WithP _ p) = killRange1 (WithP noRange) p instance KillRange Pragma where killRange (OptionsPragma _ s) = OptionsPragma noRange s killRange (BuiltinPragma _ s e) = killRange1 (BuiltinPragma noRange s) e killRange (RewritePragma _ qs) = killRange1 (RewritePragma noRange) qs killRange (StaticPragma _ q) = killRange1 (StaticPragma noRange) q killRange (InjectivePragma _ q) = killRange1 (InjectivePragma noRange) q killRange (InlinePragma _ b q) = killRange1 (InlinePragma noRange b) q killRange (CompilePragma _ b q s) = killRange1 (\ q -> CompilePragma noRange b q s) q killRange (ForeignPragma _ b s) = ForeignPragma noRange b s killRange (ImpossiblePragma _) = ImpossiblePragma noRange killRange (TerminationCheckPragma _ t) = TerminationCheckPragma noRange (killRange t) killRange (WarningOnUsage _ nm str) = WarningOnUsage noRange (killRange nm) str killRange (CatchallPragma _) = CatchallPragma noRange killRange (DisplayPragma _ lhs rhs) = killRange2 (DisplayPragma noRange) lhs rhs killRange (EtaPragma _ q) = killRange1 (EtaPragma noRange) q killRange (NoPositivityCheckPragma _) = NoPositivityCheckPragma noRange killRange (PolarityPragma _ q occs) = killRange1 (\q -> PolarityPragma noRange q occs) q killRange (NoUniverseCheckPragma _) = NoUniverseCheckPragma noRange instance KillRange RHS where killRange AbsurdRHS = AbsurdRHS killRange (RHS e) = killRange1 RHS e instance KillRange TypedBinding where killRange (TBind _ b e) = killRange2 (TBind noRange) b e killRange (TLet r ds) = killRange2 TLet r ds instance KillRange WhereClause where killRange NoWhere = NoWhere killRange (AnyWhere d) = killRange1 AnyWhere d killRange (SomeWhere n a d) = killRange3 SomeWhere n a d ------------------------------------------------------------------------ -- NFData instances -- | Ranges are not forced. instance NFData Expr where rnf (Ident a) = rnf a rnf (Lit a) = rnf a rnf (QuestionMark _ a) = rnf a rnf (Underscore _ a) = rnf a rnf (RawApp _ a) = rnf a rnf (App _ a b) = rnf a `seq` rnf b rnf (OpApp _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (WithApp _ a b) = rnf a `seq` rnf b rnf (HiddenArg _ a) = rnf a rnf (InstanceArg _ a) = rnf a rnf (Lam _ a b) = rnf a `seq` rnf b rnf (AbsurdLam _ a) = rnf a rnf (ExtendedLam _ a) = rnf a rnf (Fun _ a b) = rnf a `seq` rnf b rnf (Pi a b) = rnf a `seq` rnf b rnf (Set _) = () rnf (Prop _) = () rnf (SetN _ a) = rnf a rnf (PropN _ a) = rnf a rnf (Rec _ a) = rnf a rnf (RecUpdate _ a b) = rnf a `seq` rnf b rnf (Let _ a b) = rnf a `seq` rnf b rnf (Paren _ a) = rnf a rnf (IdiomBrackets _ a)= rnf a rnf (DoBlock _ a) = rnf a rnf (Absurd _) = () rnf (As _ a b) = rnf a `seq` rnf b rnf (Dot _ a) = rnf a rnf (ETel a) = rnf a rnf (QuoteGoal _ a b) = rnf a `seq` rnf b rnf (QuoteContext _) = () rnf (Quote _) = () rnf (QuoteTerm _) = () rnf (Tactic _ a b) = rnf a `seq` rnf b rnf (Unquote _) = () rnf (DontCare a) = rnf a rnf (Equal _ a b) = rnf a `seq` rnf b rnf (Ellipsis _) = () rnf (Generalized e) = rnf e -- | Ranges are not forced. instance NFData Pattern where rnf (IdentP a) = rnf a rnf (QuoteP _) = () rnf (AppP a b) = rnf a `seq` rnf b rnf (RawAppP _ a) = rnf a rnf (OpAppP _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (HiddenP _ a) = rnf a rnf (InstanceP _ a) = rnf a rnf (ParenP _ a) = rnf a rnf (WildP _) = () rnf (AbsurdP _) = () rnf (AsP _ a b) = rnf a `seq` rnf b rnf (DotP _ a) = rnf a rnf (LitP a) = rnf a rnf (RecP _ a) = rnf a rnf (EqualP _ es) = rnf es rnf (EllipsisP _) = () rnf (WithP _ a) = rnf a -- | Ranges are not forced. instance NFData Declaration where rnf (TypeSig a b c) = rnf a `seq` rnf b `seq` rnf c rnf (Generalize _ a) = rnf a rnf (Field a b c) = rnf a `seq` rnf b `seq` rnf c rnf (FunClause a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d rnf (DataSig _ a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d rnf (Data _ a b c d e) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d `seq` rnf e rnf (DataDef _ a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d rnf (RecordSig _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (RecordDef _ a b c d e f) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d `seq` rnf e `seq` rnf f rnf (Record _ a b c d e f g) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d `seq` rnf e `seq` rnf f `seq` rnf g rnf (Infix a b) = rnf a `seq` rnf b rnf (Syntax a b) = rnf a `seq` rnf b rnf (PatternSyn _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (Mutual _ a) = rnf a rnf (Abstract _ a) = rnf a rnf (Private _ _ a) = rnf a rnf (InstanceB _ a) = rnf a rnf (Macro _ a) = rnf a rnf (Postulate _ a) = rnf a rnf (Primitive _ a) = rnf a rnf (Open _ a b) = rnf a `seq` rnf b rnf (Import _ a b _ c) = rnf a `seq` rnf b `seq` rnf c rnf (ModuleMacro _ a b _ c) = rnf a `seq` rnf b `seq` rnf c rnf (Module _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (UnquoteDecl _ a b) = rnf a `seq` rnf b rnf (UnquoteDef _ a b) = rnf a `seq` rnf b rnf (Pragma a) = rnf a -- | Ranges are not forced. instance NFData Pragma where rnf (OptionsPragma _ a) = rnf a rnf (BuiltinPragma _ a b) = rnf a `seq` rnf b rnf (RewritePragma _ a) = rnf a rnf (CompilePragma _ a b c) = rnf a `seq` rnf b `seq` rnf c rnf (ForeignPragma _ b s) = rnf b `seq` rnf s rnf (StaticPragma _ a) = rnf a rnf (InjectivePragma _ a) = rnf a rnf (InlinePragma _ _ a) = rnf a rnf (ImpossiblePragma _) = () rnf (EtaPragma _ a) = rnf a rnf (TerminationCheckPragma _ a) = rnf a rnf (WarningOnUsage _ a b) = rnf a `seq` rnf b rnf (CatchallPragma _) = () rnf (DisplayPragma _ a b) = rnf a `seq` rnf b rnf (NoPositivityCheckPragma _) = () rnf (PolarityPragma _ a b) = rnf a `seq` rnf b rnf (NoUniverseCheckPragma _) = () -- | Ranges are not forced. instance NFData AsName where rnf (AsName a _) = rnf a -- | Ranges are not forced. instance NFData a => NFData (TypedBinding' a) where rnf (TBind _ a b) = rnf a `seq` rnf b rnf (TLet _ a) = rnf a -- | Ranges are not forced. instance NFData ModuleApplication where rnf (SectionApp _ a b) = rnf a `seq` rnf b rnf (RecordModuleInstance _ a) = rnf a -- | Ranges are not forced. instance NFData a => NFData (OpApp a) where rnf (SyntaxBindingLambda _ a b) = rnf a `seq` rnf b rnf (Ordinary a) = rnf a -- | Ranges are not forced. instance NFData LHS where rnf (LHS a b c) = rnf a `seq` rnf b `seq` rnf c instance NFData a => NFData (FieldAssignment' a) where rnf (FieldAssignment a b) = rnf a `seq` rnf b instance NFData ModuleAssignment where rnf (ModuleAssignment a b c) = rnf a `seq` rnf b `seq` rnf c instance NFData a => NFData (WhereClause' a) where rnf NoWhere = () rnf (AnyWhere a) = rnf a rnf (SomeWhere a b c) = rnf a `seq` rnf b `seq` rnf c instance NFData LamClause where rnf (LamClause a b c d) = rnf (a, b, c, d) instance NFData a => NFData (LamBinding' a) where rnf (DomainFree a) = rnf a rnf (DomainFull a) = rnf a instance NFData BoundName where rnf (BName a b) = rnf a `seq` rnf b instance NFData a => NFData (RHS' a) where rnf AbsurdRHS = () rnf (RHS a) = rnf a instance NFData DoStmt where rnf (DoBind _ p e w) = rnf (p, e, w) rnf (DoThen e) = rnf e rnf (DoLet _ ds) = rnf ds Agda-2.6.0.1/src/full/Agda/Syntax/Abstract.hs0000644000000000000000000014316413466402171016667 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| The abstract syntax. This is what you get after desugaring and scope analysis of the concrete syntax. The type checker works on abstract syntax, producing internal syntax ("Agda.Syntax.Internal"). -} module Agda.Syntax.Abstract ( module Agda.Syntax.Abstract , module Agda.Syntax.Abstract.Name ) where import Prelude import Control.Arrow (first, second, (***)) import Data.Foldable (Foldable) import qualified Data.Foldable as Fold import Data.Function (on) import Data.Map (Map) import Data.Maybe import Data.Sequence (Seq, (<|), (><)) import qualified Data.Sequence as Seq import qualified Data.Set as Set import Data.Set (Set) import Data.Traversable import Data.Void import Data.Data (Data) import Data.Monoid (mappend) import Agda.Syntax.Concrete.Name (NumHoles(..)) import Agda.Syntax.Concrete (FieldAssignment'(..), exprFieldA, HoleContent'(..)) import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Abstract.Name import Agda.Syntax.Abstract.Name as A (QNamed) import qualified Agda.Syntax.Internal as I import Agda.Syntax.Common import Agda.Syntax.Info import Agda.Syntax.Fixity ( Fixity' ) import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Scope.Base import Agda.TypeChecking.Positivity.Occurrence import Agda.Utils.Functor import Agda.Utils.Geniplate import Agda.Utils.Lens import Agda.Utils.NonemptyList import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- | A name in a binding position: we also compare the nameConcrete -- when comparing the binders for equality. -- -- With @--caching@ on we compare abstract syntax to determine if we can -- reuse previous typechecking results: during that comparison two -- names can have the same nameId but be semantically different, -- e.g. in @{_ : A} -> ..@ vs. @{r : A} -> ..@. newtype BindName = BindName { unBind :: Name } deriving (Show, Data, HasRange, SetRange, KillRange) instance Eq BindName where (BindName n) == (BindName m) = ((==) `on` nameId) n m && ((==) `on` nameConcrete) n m instance Ord BindName where (BindName n) `compare` (BindName m) = (compare `on` nameId) n m `mappend` (compare `on` nameConcrete) n m type Args = [NamedArg Expr] -- | Expressions after scope checking (operators parsed, names resolved). data Expr = Var Name -- ^ Bound variable. | Def QName -- ^ Constant: axiom, function, data or record type. | Proj ProjOrigin AmbiguousQName -- ^ Projection (overloaded). | Con AmbiguousQName -- ^ Constructor (overloaded). | PatternSyn AmbiguousQName -- ^ Pattern synonym. | Macro QName -- ^ Macro. | Lit Literal -- ^ Literal. | QuestionMark MetaInfo InteractionId -- ^ Meta variable for interaction. -- The 'InteractionId' is usually identical with the -- 'metaNumber' of 'MetaInfo'. -- However, if you want to print an interaction meta as -- just @?@ instead of @?n@, you should set the -- 'metaNumber' to 'Nothing' while keeping the 'InteractionId'. | Underscore MetaInfo -- ^ Meta variable for hidden argument (must be inferred locally). | Dot ExprInfo Expr -- ^ @.e@, for postfix projection. | App AppInfo Expr (NamedArg Expr) -- ^ Ordinary (binary) application. | WithApp ExprInfo Expr [Expr] -- ^ With application. | Lam ExprInfo LamBinding Expr -- ^ @λ bs → e@. | AbsurdLam ExprInfo Hiding -- ^ @λ()@ or @λ{}@. | ExtendedLam ExprInfo DefInfo QName [Clause] | Pi ExprInfo Telescope Expr -- ^ Dependent function space @Γ → A@. | Generalized (Set.Set QName) Expr -- ^ Like a Pi, but the ordering is not known | Fun ExprInfo (Arg Expr) Expr -- ^ Non-dependent function space. | Set ExprInfo Integer -- ^ @Set@, @Set1@, @Set2@, ... | Prop ExprInfo Integer -- ^ @Prop@, @Prop1@, @Prop2@, ... | Let ExprInfo [LetBinding] Expr -- ^ @let bs in e@. | ETel Telescope -- ^ Only used when printing telescopes. | Rec ExprInfo RecordAssigns -- ^ Record construction. | RecUpdate ExprInfo Expr Assigns -- ^ Record update. | ScopedExpr ScopeInfo Expr -- ^ Scope annotation. | QuoteGoal ExprInfo Name Expr -- ^ Binds @Name@ to current type in @Expr@. | QuoteContext ExprInfo -- ^ Returns the current context. | Quote ExprInfo -- ^ Quote an identifier 'QName'. | QuoteTerm ExprInfo -- ^ Quote a term. | Unquote ExprInfo -- ^ The splicing construct: unquote ... | Tactic ExprInfo Expr [NamedArg Expr] [NamedArg Expr] -- ^ @tactic e x1 .. xn | y1 | .. | yn@ | DontCare Expr -- ^ For printing @DontCare@ from @Syntax.Internal@. deriving (Data, Show) -- | Smart constructor for Generalized generalized :: Set.Set QName -> Expr -> Expr generalized s e | Set.null s = e | otherwise = Generalized s e -- | Record field assignment @f = e@. type Assign = FieldAssignment' Expr type Assigns = [Assign] type RecordAssign = Either Assign ModuleName type RecordAssigns = [RecordAssign] -- | Is a type signature a `postulate' or a function signature? data Axiom = FunSig -- ^ A function signature. | NoFunSig -- ^ Not a function signature, i.e., a postulate (in user input) -- or another (e.g. data/record) type signature (internally). deriving (Data, Eq, Ord, Show) -- | Renaming (generic). type Ren a = [(a, a)] data ScopeCopyInfo = ScopeCopyInfo { renModules :: Ren ModuleName , renNames :: Ren QName } deriving (Eq, Show, Data) initCopyInfo :: ScopeCopyInfo initCopyInfo = ScopeCopyInfo { renModules = [] , renNames = [] } instance Pretty ScopeCopyInfo where pretty i = vcat [ prRen "renModules =" (renModules i) , prRen "renNames =" (renNames i) ] where prRen s r = sep [ text s, nest 2 $ vcat (map pr r) ] pr (x, y) = pretty x <+> "->" <+> pretty y data Declaration = Axiom Axiom DefInfo ArgInfo (Maybe [Occurrence]) QName Expr -- ^ Type signature (can be irrelevant, but not hidden). -- -- The fourth argument contains an optional assignment of -- polarities to arguments. | Generalize (Set.Set QName) DefInfo ArgInfo QName Expr -- ^ First argument is set of generalizable variables used in the type. | Field DefInfo QName (Arg Expr) -- ^ record field | Primitive DefInfo QName Expr -- ^ primitive function | Mutual MutualInfo [Declaration] -- ^ a bunch of mutually recursive definitions | Section ModuleInfo ModuleName GeneralizeTelescope [Declaration] | Apply ModuleInfo ModuleName ModuleApplication ScopeCopyInfo ImportDirective -- ^ The @ImportDirective@ is for highlighting purposes. | Import ModuleInfo ModuleName ImportDirective -- ^ The @ImportDirective@ is for highlighting purposes. | Pragma Range Pragma | Open ModuleInfo ModuleName ImportDirective -- ^ only retained for highlighting purposes | FunDef DefInfo QName Delayed [Clause] -- ^ sequence of function clauses | DataSig DefInfo QName GeneralizeTelescope Expr -- ^ lone data signature | DataDef DefInfo QName UniverseCheck DataDefParams [Constructor] -- ^ the 'LamBinding's are 'DomainFree' and bind the parameters of the datatype. | RecSig DefInfo QName GeneralizeTelescope Expr -- ^ lone record signature | RecDef DefInfo QName UniverseCheck (Maybe (Ranged Induction)) (Maybe HasEta) (Maybe QName) DataDefParams Expr [Declaration] -- ^ The 'LamBinding's are 'DomainFree' and bind the parameters of the datatype. -- The 'Expr' gives the constructor type telescope, @(x1 : A1)..(xn : An) -> Prop@, -- and the optional name is the constructor's name. | PatternSynDef QName [Arg Name] (Pattern' Void) -- ^ Only for highlighting purposes | UnquoteDecl MutualInfo [DefInfo] [QName] Expr | UnquoteDef [DefInfo] [QName] Expr | ScopedDecl ScopeInfo [Declaration] -- ^ scope annotation deriving (Data, Show) class GetDefInfo a where getDefInfo :: a -> Maybe DefInfo instance GetDefInfo Declaration where getDefInfo (Axiom _ i _ _ _ _) = Just i getDefInfo (Generalize _ i _ _ _) = Just i getDefInfo (Field i _ _) = Just i getDefInfo (Primitive i _ _) = Just i getDefInfo (ScopedDecl _ (d:_)) = getDefInfo d getDefInfo (FunDef i _ _ _) = Just i getDefInfo (DataSig i _ _ _) = Just i getDefInfo (DataDef i _ _ _ _) = Just i getDefInfo (RecSig i _ _ _) = Just i getDefInfo (RecDef i _ _ _ _ _ _ _ _) = Just i getDefInfo _ = Nothing type ImportDirective = ImportDirective' QName ModuleName type Renaming = Renaming' QName ModuleName type ImportedName = ImportedName' QName ModuleName data ModuleApplication = SectionApp Telescope ModuleName [NamedArg Expr] -- ^ @tel. M args@: applies @M@ to @args@ and abstracts @tel@. | RecordModuleInstance ModuleName -- ^ @M {{...}}@ deriving (Data, Show, Eq) data Pragma = OptionsPragma [String] | BuiltinPragma String ResolvedName -- ^ 'ResolvedName' is not 'UnknownName'. -- Name can be ambiguous e.g. for built-in constructors. | BuiltinNoDefPragma String QName -- ^ Builtins that do not come with a definition, -- but declare a name for an Agda concept. | RewritePragma QName | CompilePragma String QName String | StaticPragma QName | EtaPragma QName -- ^ For coinductive records, use pragma instead of regular -- @eta-equality@ definition (as it is might make Agda loop). | InjectivePragma QName | InlinePragma Bool QName -- INLINE or NOINLINE | DisplayPragma QName [NamedArg Pattern] Expr deriving (Data, Show, Eq) -- | Bindings that are valid in a @let@. data LetBinding = LetBind LetInfo ArgInfo BindName Expr Expr -- ^ @LetBind info rel name type defn@ | LetPatBind LetInfo Pattern Expr -- ^ Irrefutable pattern binding. | LetApply ModuleInfo ModuleName ModuleApplication ScopeCopyInfo ImportDirective -- ^ @LetApply mi newM (oldM args) renamings dir@. -- The @ImportDirective@ is for highlighting purposes. | LetOpen ModuleInfo ModuleName ImportDirective -- ^ only for highlighting and abstractToConcrete | LetDeclaredVariable BindName -- ^ Only used for highlighting. Refers to the first occurrence of -- @x@ in @let x : A; x = e@. -- | LetGeneralize DefInfo ArgInfo Expr deriving (Data, Show, Eq) -- | Only 'Axiom's. type TypeSignature = Declaration type Constructor = TypeSignature type Field = TypeSignature -- | A lambda binding is either domain free or typed. data LamBinding = DomainFree (NamedArg BindName) -- ^ . @x@ or @{x}@ or @.x@ or @{x = y}@ | DomainFull TypedBinding -- ^ . @(xs:e)@ or @{xs:e}@ or @(let Ds)@ deriving (Data, Show, Eq) -- | A typed binding. Appears in dependent function spaces, typed lambdas, and -- telescopes. It might be tempting to simplify this to only bind a single -- name at a time, and translate, say, @(x y : A)@ to @(x : A)(y : A)@ -- before type-checking. However, this would be slightly problematic: -- -- 1. We would have to typecheck the type @A@ several times. -- -- 2. If @A@ contains a meta variable or hole, it would be duplicated -- by such a translation. -- -- While 1. is only slightly inefficient, 2. would be an outright bug. -- Duplicating @A@ could not be done naively, we would have to make sure -- that the metas of the copy are aliases of the metas of the original. data TypedBinding = TBind Range [NamedArg BindName] Expr -- ^ As in telescope @(x y z : A)@ or type @(x y z : A) -> B@. | TLet Range [LetBinding] -- ^ E.g. @(let x = e)@ or @(let open M)@. deriving (Data, Show, Eq) type Telescope = [TypedBinding] data GeneralizeTelescope = GeneralizeTel { generalizeTelVars :: Map QName Name -- ^ Maps generalize variables to the corresponding bound variable (to be -- introduced by the generalisation). , generalizeTel :: Telescope } deriving (Data, Show, Eq) data DataDefParams = DataDefParams { dataDefGeneralizedParams :: Set Name -- ^ We don't yet know the position of generalized parameters from the data -- sig, so we keep these in a set on the side. , dataDefParams :: [LamBinding] } deriving (Data, Show, Eq) noDataDefParams :: DataDefParams noDataDefParams = DataDefParams Set.empty [] -- | A user pattern together with an internal term that it should be equal to -- after splitting is complete. -- Special cases: -- * User pattern is a variable but internal term isn't: -- this will be turned into an as pattern. -- * User pattern is a dot pattern: -- this pattern won't trigger any splitting but will be checked -- for equality after all splitting is complete and as patterns have -- been bound. -- * User pattern is an absurd pattern: -- emptiness of the type will be checked after splitting is complete. data ProblemEq = ProblemEq { problemInPat :: Pattern , problemInst :: I.Term , problemType :: Dom I.Type } deriving (Data, Show) -- These are not relevant for caching purposes instance Eq ProblemEq where _ == _ = True -- | We could throw away @where@ clauses at this point and translate them to -- @let@. It's not obvious how to remember that the @let@ was really a -- @where@ clause though, so for the time being we keep it here. data Clause' lhs = Clause { clauseLHS :: lhs , clauseStrippedPats :: [ProblemEq] -- ^ Only in with-clauses where we inherit some already checked patterns from the parent. -- These live in the context of the parent clause left-hand side. , clauseRHS :: RHS , clauseWhereDecls :: WhereDeclarations , clauseCatchall :: Bool } deriving (Data, Show, Functor, Foldable, Traversable, Eq) data WhereDeclarations = WhereDecls { whereModule :: Maybe ModuleName , whereDecls :: [Declaration] } deriving (Data, Show, Eq) noWhereDecls :: WhereDeclarations noWhereDecls = WhereDecls Nothing [] type Clause = Clause' LHS type SpineClause = Clause' SpineLHS data RHS = RHS { rhsExpr :: Expr , rhsConcrete :: Maybe C.Expr -- ^ We store the original concrete expression in case -- we have to reproduce it during interactive case splitting. -- 'Nothing' for internally generated rhss. } | AbsurdRHS | WithRHS QName [Expr] [Clause] -- ^ The 'QName' is the name of the with function. | RewriteRHS { rewriteExprs :: [(QName, Expr)] -- ^ The 'QName's are the names of the generated with functions, -- one for each 'Expr'. , rewriteStrippedPats :: [ProblemEq] -- ^ The patterns stripped by with-desugaring. These are only present -- if this rewrite follows a with. , rewriteRHS :: RHS -- ^ The RHS should not be another @RewriteRHS@. , rewriteWhereDecls :: WhereDeclarations -- ^ The where clauses are attached to the @RewriteRHS@ by --- the scope checker (instead of to the clause). } deriving (Data, Show) -- | Ignore 'rhsConcrete' when comparing 'RHS's. instance Eq RHS where RHS e _ == RHS e' _ = e == e' AbsurdRHS == AbsurdRHS = True WithRHS a b c == WithRHS a' b' c' = and [ a == a', b == b', c == c' ] RewriteRHS a b c d == RewriteRHS a' b' c' d' = and [ a == a', b == b', c == c' , d == d' ] _ == _ = False -- | The lhs of a clause in spine view (inside-out). -- Projection patterns are contained in @spLhsPats@, -- represented as @ProjP d@. data SpineLHS = SpineLHS { spLhsInfo :: LHSInfo -- ^ Range. , spLhsDefName :: QName -- ^ Name of function we are defining. , spLhsPats :: [NamedArg Pattern] -- ^ Elimination by pattern, projections, with-patterns. } deriving (Data, Show, Eq) -- | Ignore 'Range' when comparing 'LHS's. instance Eq LHS where LHS _ core == LHS _ core' = core == core' -- | The lhs of a clause in focused (projection-application) view (outside-in). -- Projection patters are represented as 'LHSProj's. data LHS = LHS { lhsInfo :: LHSInfo -- ^ Range. , lhsCore :: LHSCore -- ^ Copatterns. } deriving (Data, Show) -- | The lhs in projection-application and with-pattern view. -- Parameterised over the type @e@ of dot patterns. data LHSCore' e -- | The head applied to ordinary patterns. = LHSHead { lhsDefName :: QName -- ^ Head @f@. , lhsPats :: [NamedArg (Pattern' e)] -- ^ Applied to patterns @ps@. } -- | Projection. | LHSProj { lhsDestructor :: AmbiguousQName -- ^ Record projection identifier. , lhsFocus :: NamedArg (LHSCore' e) -- ^ Main argument of projection. , lhsPats :: [NamedArg (Pattern' e)] -- ^ Further applied to patterns. } -- | With patterns. | LHSWith { lhsHead :: LHSCore' e -- ^ E.g. the 'LHSHead'. , lhsWithPatterns :: [Pattern' e] -- ^ Applied to with patterns @| p1 | ... | pn@. -- These patterns are not prefixed with @WithP@! , lhsPats :: [NamedArg (Pattern' e)] -- ^ Further applied to patterns. } deriving (Data, Show, Functor, Foldable, Traversable, Eq) type LHSCore = LHSCore' Expr --------------------------------------------------------------------------- -- * Patterns --------------------------------------------------------------------------- -- | Parameterised over the type of dot patterns. data Pattern' e = VarP BindName | ConP ConPatInfo AmbiguousQName (NAPs e) | ProjP PatInfo ProjOrigin AmbiguousQName -- ^ Destructor pattern @d@. | DefP PatInfo AmbiguousQName (NAPs e) -- ^ Defined pattern: function definition @f ps@. -- It is also abused to convert destructor patterns into concrete syntax -- thus, we put AmbiguousQName here as well. | WildP PatInfo -- ^ Underscore pattern entered by user. -- Or generated at type checking for implicit arguments. | AsP PatInfo BindName (Pattern' e) | DotP PatInfo e -- ^ Dot pattern @.e@ | AbsurdP PatInfo | LitP Literal | PatternSynP PatInfo AmbiguousQName (NAPs e) | RecP PatInfo [FieldAssignment' (Pattern' e)] | EqualP PatInfo [(e, e)] | WithP PatInfo (Pattern' e) -- ^ @| p@, for with-patterns. deriving (Data, Show, Functor, Foldable, Traversable, Eq) type NAPs e = [NamedArg (Pattern' e)] type Pattern = Pattern' Expr type Patterns = [NamedArg Pattern] instance IsProjP (Pattern' e) where -- Andreas, 2018-06-19, issue #3130 -- Do not interpret things like .(p) as projection pattern any more. -- maybePostfixProjP (DotP _ e) = isProjP e <&> \ (_o, d) -> (ProjPostfix, d) isProjP (ProjP _ o d) = Just (o, d) isProjP _ = Nothing instance IsProjP Expr where isProjP (Proj o ds) = Just (o, ds) isProjP (ScopedExpr _ e) = isProjP e isProjP _ = Nothing {-------------------------------------------------------------------------- Things we parse but are not part of the Agda file syntax --------------------------------------------------------------------------} type HoleContent = C.HoleContent' Expr {-------------------------------------------------------------------------- Instances --------------------------------------------------------------------------} -- | Does not compare 'ScopeInfo' fields. -- Does not distinguish between prefix and postfix projections. instance Eq Expr where ScopedExpr _ a1 == ScopedExpr _ a2 = a1 == a2 Var a1 == Var a2 = a1 == a2 Def a1 == Def a2 = a1 == a2 Proj _ a1 == Proj _ a2 = a1 == a2 Con a1 == Con a2 = a1 == a2 PatternSyn a1 == PatternSyn a2 = a1 == a2 Macro a1 == Macro a2 = a1 == a2 Lit a1 == Lit a2 = a1 == a2 QuestionMark a1 b1 == QuestionMark a2 b2 = (a1, b1) == (a2, b2) Underscore a1 == Underscore a2 = a1 == a2 Dot r1 e1 == Dot r2 e2 = (r1, e1) == (r2, e2) App a1 b1 c1 == App a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) WithApp a1 b1 c1 == WithApp a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Lam a1 b1 c1 == Lam a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) AbsurdLam a1 b1 == AbsurdLam a2 b2 = (a1, b1) == (a2, b2) ExtendedLam a1 b1 c1 d1 == ExtendedLam a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) Pi a1 b1 c1 == Pi a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Generalized a1 b1 == Generalized a2 b2 = (a1, b1) == (a2, b2) Fun a1 b1 c1 == Fun a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Set a1 b1 == Set a2 b2 = (a1, b1) == (a2, b2) Prop a1 b1 == Prop a2 b2 = (a1, b1) == (a2, b2) Let a1 b1 c1 == Let a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) ETel a1 == ETel a2 = a1 == a2 Rec a1 b1 == Rec a2 b2 = (a1, b1) == (a2, b2) RecUpdate a1 b1 c1 == RecUpdate a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) QuoteGoal a1 b1 c1 == QuoteGoal a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) QuoteContext a1 == QuoteContext a2 = a1 == a2 Quote a1 == Quote a2 = a1 == a2 QuoteTerm a1 == QuoteTerm a2 = a1 == a2 Unquote a1 == Unquote a2 = a1 == a2 Tactic a1 b1 c1 d1 == Tactic a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) DontCare a1 == DontCare a2 = a1 == a2 _ == _ = False -- | Does not compare 'ScopeInfo' fields. instance Eq Declaration where ScopedDecl _ a1 == ScopedDecl _ a2 = a1 == a2 Axiom a1 b1 c1 d1 e1 f1 == Axiom a2 b2 c2 d2 e2 f2 = (a1, b1, c1, d1, e1, f1) == (a2, b2, c2, d2, e2, f2) Generalize a1 b1 c1 d1 e1 == Generalize a2 b2 c2 d2 e2 = (a1, b1, c1, d1, e1) == (a2, b2, c2, d2, e2) Field a1 b1 c1 == Field a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Primitive a1 b1 c1 == Primitive a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Mutual a1 b1 == Mutual a2 b2 = (a1, b1) == (a2, b2) Section a1 b1 c1 d1 == Section a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) Apply a1 b1 c1 d1 e1 == Apply a2 b2 c2 d2 e2 = (a1, b1, c1, d1, e1) == (a2, b2, c2, d2, e2) Import a1 b1 c1 == Import a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) Pragma a1 b1 == Pragma a2 b2 = (a1, b1) == (a2, b2) Open a1 b1 c1 == Open a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) FunDef a1 b1 c1 d1 == FunDef a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) DataSig a1 b1 c1 d1 == DataSig a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) DataDef a1 b1 c1 d1 e1 == DataDef a2 b2 c2 d2 e2 = (a1, b1, c1, d1, e1) == (a2, b2, c2, d2, e2) RecSig a1 b1 c1 d1 == RecSig a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) RecDef a1 b1 c1 d1 e1 f1 g1 h1 i1 == RecDef a2 b2 c2 d2 e2 f2 g2 h2 i2 = (a1, b1, c1, d1, e1, f1, g1, h1, i1) == (a2, b2, c2, d2, e2, f2, g2, h2, i2) PatternSynDef a1 b1 c1 == PatternSynDef a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) UnquoteDecl a1 b1 c1 d1 == UnquoteDecl a2 b2 c2 d2 = (a1, b1, c1, d1) == (a2, b2, c2, d2) UnquoteDef a1 b1 c1 == UnquoteDef a2 b2 c2 = (a1, b1, c1) == (a2, b2, c2) _ == _ = False instance Underscore Expr where underscore = Underscore emptyMetaInfo isUnderscore = __IMPOSSIBLE__ instance LensHiding LamBinding where getHiding (DomainFree x) = getHiding x getHiding (DomainFull tb) = getHiding tb mapHiding f (DomainFree x) = DomainFree $ mapHiding f x mapHiding f (DomainFull tb) = DomainFull $ mapHiding f tb instance LensHiding TypedBinding where getHiding (TBind _ (x : _) _) = getHiding x -- Slightly dubious getHiding (TBind _ [] _) = __IMPOSSIBLE__ getHiding TLet{} = mempty mapHiding f (TBind r xs e) = TBind r ((map . mapHiding) f xs) e mapHiding f b@TLet{} = b instance HasRange LamBinding where getRange (DomainFree x) = getRange x getRange (DomainFull b) = getRange b instance HasRange TypedBinding where getRange (TBind r _ _) = r getRange (TLet r _) = r instance HasRange Expr where getRange (Var x) = getRange x getRange (Def x) = getRange x getRange (Proj _ x) = getRange x getRange (Con x) = getRange x getRange (Lit l) = getRange l getRange (QuestionMark i _) = getRange i getRange (Underscore i) = getRange i getRange (Dot i _) = getRange i getRange (App i _ _) = getRange i getRange (WithApp i _ _) = getRange i getRange (Lam i _ _) = getRange i getRange (AbsurdLam i _) = getRange i getRange (ExtendedLam i _ _ _) = getRange i getRange (Pi i _ _) = getRange i getRange (Generalized _ x) = getRange x getRange (Fun i _ _) = getRange i getRange (Set i _) = getRange i getRange (Prop i _) = getRange i getRange (Let i _ _) = getRange i getRange (Rec i _) = getRange i getRange (RecUpdate i _ _) = getRange i getRange (ETel tel) = getRange tel getRange (ScopedExpr _ e) = getRange e getRange (QuoteGoal _ _ e) = getRange e getRange (QuoteContext i) = getRange i getRange (Quote i) = getRange i getRange (QuoteTerm i) = getRange i getRange (Unquote i) = getRange i getRange (Tactic i _ _ _) = getRange i getRange (DontCare{}) = noRange getRange (PatternSyn x) = getRange x getRange (Macro x) = getRange x instance HasRange Declaration where getRange (Axiom _ i _ _ _ _ ) = getRange i getRange (Generalize _ i _ _ _) = getRange i getRange (Field i _ _ ) = getRange i getRange (Mutual i _ ) = getRange i getRange (Section i _ _ _ ) = getRange i getRange (Apply i _ _ _ _) = getRange i getRange (Import i _ _ ) = getRange i getRange (Primitive i _ _ ) = getRange i getRange (Pragma i _ ) = getRange i getRange (Open i _ _ ) = getRange i getRange (ScopedDecl _ d ) = getRange d getRange (FunDef i _ _ _ ) = getRange i getRange (DataSig i _ _ _ ) = getRange i getRange (DataDef i _ _ _ _ ) = getRange i getRange (RecSig i _ _ _ ) = getRange i getRange (RecDef i _ _ _ _ _ _ _ _) = getRange i getRange (PatternSynDef x _ _ ) = getRange x getRange (UnquoteDecl _ i _ _) = getRange i getRange (UnquoteDef i _ _) = getRange i instance HasRange (Pattern' e) where getRange (VarP x) = getRange x getRange (ConP i _ _) = getRange i getRange (ProjP i _ _) = getRange i getRange (DefP i _ _) = getRange i getRange (WildP i) = getRange i getRange (AsP i _ _) = getRange i getRange (DotP i _) = getRange i getRange (AbsurdP i) = getRange i getRange (LitP l) = getRange l getRange (PatternSynP i _ _) = getRange i getRange (RecP i _) = getRange i getRange (EqualP i _) = getRange i getRange (WithP i _) = getRange i instance HasRange SpineLHS where getRange (SpineLHS i _ _) = getRange i instance HasRange LHS where getRange (LHS i _) = getRange i instance HasRange (LHSCore' e) where getRange (LHSHead f ps) = fuseRange f ps getRange (LHSProj d lhscore ps) = d `fuseRange` lhscore `fuseRange` ps getRange (LHSWith h wps ps) = h `fuseRange` wps `fuseRange` ps instance HasRange a => HasRange (Clause' a) where getRange (Clause lhs _ rhs ds catchall) = getRange (lhs, rhs, ds) instance HasRange RHS where getRange AbsurdRHS = noRange getRange (RHS e _) = getRange e getRange (WithRHS _ e cs) = fuseRange e cs getRange (RewriteRHS xes _ rhs wh) = getRange (map snd xes, rhs, wh) instance HasRange WhereDeclarations where getRange (WhereDecls _ ds) = getRange ds instance HasRange LetBinding where getRange (LetBind i _ _ _ _ ) = getRange i getRange (LetPatBind i _ _ ) = getRange i getRange (LetApply i _ _ _ _ ) = getRange i getRange (LetOpen i _ _ ) = getRange i getRange (LetDeclaredVariable x) = getRange x -- setRange for patterns applies the range to the outermost pattern constructor instance SetRange (Pattern' a) where setRange r (VarP x) = VarP (setRange r x) setRange r (ConP i ns as) = ConP (setRange r i) ns as setRange r (ProjP _ o ns) = ProjP (PatRange r) o ns setRange r (DefP _ ns as) = DefP (PatRange r) ns as -- (setRange r n) as setRange r (WildP _) = WildP (PatRange r) setRange r (AsP _ n p) = AsP (PatRange r) (setRange r n) p setRange r (DotP _ e) = DotP (PatRange r) e setRange r (AbsurdP _) = AbsurdP (PatRange r) setRange r (LitP l) = LitP (setRange r l) setRange r (PatternSynP _ n as) = PatternSynP (PatRange r) n as setRange r (RecP i as) = RecP (PatRange r) as setRange r (EqualP _ es) = EqualP (PatRange r) es setRange r (WithP i p) = WithP (setRange r i) p instance KillRange LamBinding where killRange (DomainFree x) = killRange1 DomainFree x killRange (DomainFull b) = killRange1 DomainFull b instance KillRange GeneralizeTelescope where killRange (GeneralizeTel s tel) = GeneralizeTel s (killRange tel) instance KillRange DataDefParams where killRange (DataDefParams s tel) = DataDefParams s (killRange tel) instance KillRange TypedBinding where killRange (TBind r xs e) = killRange3 TBind r xs e killRange (TLet r lbs) = killRange2 TLet r lbs instance KillRange Expr where killRange (Var x) = killRange1 Var x killRange (Def x) = killRange1 Def x killRange (Proj o x) = killRange1 (Proj o) x killRange (Con x) = killRange1 Con x killRange (Lit l) = killRange1 Lit l killRange (QuestionMark i ii) = killRange2 QuestionMark i ii killRange (Underscore i) = killRange1 Underscore i killRange (Dot i e) = killRange2 Dot i e killRange (App i e1 e2) = killRange3 App i e1 e2 killRange (WithApp i e es) = killRange3 WithApp i e es killRange (Lam i b e) = killRange3 Lam i b e killRange (AbsurdLam i h) = killRange2 AbsurdLam i h killRange (ExtendedLam i n d ps) = killRange4 ExtendedLam i n d ps killRange (Pi i a b) = killRange3 Pi i a b killRange (Generalized s x) = killRange1 (Generalized s) x killRange (Fun i a b) = killRange3 Fun i a b killRange (Set i n) = killRange2 Set i n killRange (Prop i n) = killRange2 Prop i n killRange (Let i ds e) = killRange3 Let i ds e killRange (Rec i fs) = killRange2 Rec i fs killRange (RecUpdate i e fs) = killRange3 RecUpdate i e fs killRange (ETel tel) = killRange1 ETel tel killRange (ScopedExpr s e) = killRange1 (ScopedExpr s) e killRange (QuoteGoal i x e) = killRange3 QuoteGoal i x e killRange (QuoteContext i) = killRange1 QuoteContext i killRange (Quote i) = killRange1 Quote i killRange (QuoteTerm i) = killRange1 QuoteTerm i killRange (Unquote i) = killRange1 Unquote i killRange (Tactic i e xs ys) = killRange4 Tactic i e xs ys killRange (DontCare e) = killRange1 DontCare e killRange (PatternSyn x) = killRange1 PatternSyn x killRange (Macro x) = killRange1 Macro x instance KillRange Declaration where killRange (Axiom p i a b c d ) = killRange4 (\i a c d -> Axiom p i a b c d) i a c d killRange (Generalize s i j x e ) = killRange4 (Generalize s) i j x e killRange (Field i a b ) = killRange3 Field i a b killRange (Mutual i a ) = killRange2 Mutual i a killRange (Section i a b c ) = killRange4 Section i a b c killRange (Apply i a b c d ) = killRange5 Apply i a b c d killRange (Import i a b ) = killRange3 Import i a b killRange (Primitive i a b ) = killRange3 Primitive i a b killRange (Pragma i a ) = Pragma (killRange i) a killRange (Open i x dir ) = killRange3 Open i x dir killRange (ScopedDecl a d ) = killRange1 (ScopedDecl a) d killRange (FunDef i a b c ) = killRange4 FunDef i a b c killRange (DataSig i a b c ) = killRange4 DataSig i a b c killRange (DataDef i a b c d ) = killRange5 DataDef i a b c d killRange (RecSig i a b c ) = killRange4 RecSig i a b c killRange (RecDef i a b c d e f g h) = killRange9 RecDef i a b c d e f g h killRange (PatternSynDef x xs p ) = killRange3 PatternSynDef x xs p killRange (UnquoteDecl mi i x e ) = killRange4 UnquoteDecl mi i x e killRange (UnquoteDef i x e ) = killRange3 UnquoteDef i x e instance KillRange ModuleApplication where killRange (SectionApp a b c ) = killRange3 SectionApp a b c killRange (RecordModuleInstance a) = killRange1 RecordModuleInstance a instance KillRange ScopeCopyInfo where killRange (ScopeCopyInfo a b) = killRange2 ScopeCopyInfo a b instance KillRange e => KillRange (Pattern' e) where killRange (VarP x) = killRange1 VarP x killRange (ConP i a b) = killRange3 ConP i a b killRange (ProjP i o a) = killRange3 ProjP i o a killRange (DefP i a b) = killRange3 DefP i a b killRange (WildP i) = killRange1 WildP i killRange (AsP i a b) = killRange3 AsP i a b killRange (DotP i a) = killRange2 DotP i a killRange (AbsurdP i) = killRange1 AbsurdP i killRange (LitP l) = killRange1 LitP l killRange (PatternSynP i a p) = killRange3 PatternSynP i a p killRange (RecP i as) = killRange2 RecP i as killRange (EqualP i es) = killRange2 EqualP i es killRange (WithP i p) = killRange2 WithP i p instance KillRange SpineLHS where killRange (SpineLHS i a b) = killRange3 SpineLHS i a b instance KillRange LHS where killRange (LHS i a) = killRange2 LHS i a instance KillRange e => KillRange (LHSCore' e) where killRange (LHSHead a b) = killRange2 LHSHead a b killRange (LHSProj a b c) = killRange3 LHSProj a b c killRange (LHSWith a b c) = killRange3 LHSWith a b c instance KillRange a => KillRange (Clause' a) where killRange (Clause lhs spats rhs ds catchall) = killRange5 Clause lhs spats rhs ds catchall instance KillRange ProblemEq where killRange (ProblemEq p v a) = killRange3 ProblemEq p v a instance KillRange RHS where killRange AbsurdRHS = AbsurdRHS killRange (RHS e c) = killRange2 RHS e c killRange (WithRHS q e cs) = killRange3 WithRHS q e cs killRange (RewriteRHS xes spats rhs wh) = killRange4 RewriteRHS xes spats rhs wh instance KillRange WhereDeclarations where killRange (WhereDecls a b) = killRange2 WhereDecls a b instance KillRange LetBinding where killRange (LetBind i info a b c) = killRange5 LetBind i info a b c killRange (LetPatBind i a b ) = killRange3 LetPatBind i a b killRange (LetApply i a b c d ) = killRange5 LetApply i a b c d killRange (LetOpen i x dir ) = killRange3 LetOpen i x dir killRange (LetDeclaredVariable x) = killRange1 LetDeclaredVariable x -- See Agda.Utils.GeniPlate: -- Does not descend into ScopeInfo and renaming maps, for instance. instanceUniverseBiT' [] [t| (Declaration, QName) |] instanceUniverseBiT' [] [t| (Declaration, AmbiguousQName) |] instanceUniverseBiT' [] [t| (Declaration, Expr) |] instanceUniverseBiT' [] [t| (Declaration, LetBinding) |] instanceUniverseBiT' [] [t| (Declaration, LamBinding) |] instanceUniverseBiT' [] [t| (Declaration, TypedBinding) |] instanceUniverseBiT' [] [t| (Declaration, Pattern) |] instanceUniverseBiT' [] [t| (Declaration, Pattern' Void) |] instanceUniverseBiT' [] [t| (Declaration, Declaration) |] instanceUniverseBiT' [] [t| (Declaration, ModuleName) |] instanceUniverseBiT' [] [t| (Declaration, ModuleInfo) |] instanceUniverseBiT' [] [t| (Declaration, NamedArg LHSCore) |] instanceUniverseBiT' [] [t| (Declaration, NamedArg BindName) |] instanceUniverseBiT' [] [t| (Declaration, NamedArg Expr) |] instanceUniverseBiT' [] [t| (Declaration, NamedArg Pattern) |] ------------------------------------------------------------------------ -- Queries ------------------------------------------------------------------------ -- | Extracts all the names which are declared in a 'Declaration'. -- This does not include open public or let expressions, but it does -- include local modules, where clauses and the names of extended -- lambdas. class AllNames a where allNames :: a -> Seq QName instance AllNames a => AllNames [a] where allNames = Fold.foldMap allNames instance AllNames a => AllNames (Maybe a) where allNames = Fold.foldMap allNames instance AllNames a => AllNames (Arg a) where allNames = Fold.foldMap allNames instance AllNames a => AllNames (Named name a) where allNames = Fold.foldMap allNames instance (AllNames a, AllNames b) => AllNames (a,b) where allNames (a,b) = allNames a >< allNames b instance AllNames QName where allNames q = Seq.singleton q instance AllNames Declaration where allNames (Axiom _ _ _ _ q _) = Seq.singleton q allNames (Generalize _ _ _ q _) = Seq.singleton q allNames (Field _ q _) = Seq.singleton q allNames (Primitive _ q _) = Seq.singleton q allNames (Mutual _ defs) = allNames defs allNames (DataSig _ q _ _) = Seq.singleton q allNames (DataDef _ q _ _ decls) = q <| allNames decls allNames (RecSig _ q _ _) = Seq.singleton q allNames (RecDef _ q _ _ _ c _ _ decls) = q <| allNames c >< allNames decls allNames (PatternSynDef q _ _) = Seq.singleton q allNames (UnquoteDecl _ _ qs _) = Seq.fromList qs allNames (UnquoteDef _ qs _) = Seq.fromList qs allNames (FunDef _ q _ cls) = q <| allNames cls allNames (Section _ _ _ decls) = allNames decls allNames Apply{} = Seq.empty allNames Import{} = Seq.empty allNames Pragma{} = Seq.empty allNames Open{} = Seq.empty allNames (ScopedDecl _ decls) = allNames decls instance AllNames Clause where allNames cl = allNames (clauseRHS cl, clauseWhereDecls cl) instance AllNames RHS where allNames (RHS e _) = allNames e allNames AbsurdRHS{} = Seq.empty allNames (WithRHS q _ cls) = q <| allNames cls allNames (RewriteRHS qes _ rhs cls) = Seq.fromList (map fst qes) >< allNames rhs >< allNames cls instance AllNames WhereDeclarations where allNames (WhereDecls _ ds) = allNames ds instance AllNames Expr where allNames Var{} = Seq.empty allNames Def{} = Seq.empty allNames Proj{} = Seq.empty allNames Con{} = Seq.empty allNames Lit{} = Seq.empty allNames QuestionMark{} = Seq.empty allNames Underscore{} = Seq.empty allNames (Dot _ e) = allNames e allNames (App _ e1 e2) = allNames e1 >< allNames e2 allNames (WithApp _ e es) = allNames e >< allNames es allNames (Lam _ b e) = allNames b >< allNames e allNames AbsurdLam{} = Seq.empty allNames (ExtendedLam _ _ q cls) = q <| allNames cls allNames (Pi _ tel e) = allNames tel >< allNames e allNames (Generalized s e) = Seq.fromList (Set.toList s) >< allNames e -- TODO: or just (allNames e)? allNames (Fun _ e1 e2) = allNames e1 >< allNames e2 allNames Set{} = Seq.empty allNames Prop{} = Seq.empty allNames (Let _ lbs e) = allNames lbs >< allNames e allNames ETel{} = __IMPOSSIBLE__ allNames (Rec _ fields) = allNames [ a ^. exprFieldA | Left a <- fields ] allNames (RecUpdate _ e fs) = allNames e >< allNames (map (view exprFieldA) fs) allNames (ScopedExpr _ e) = allNames e allNames (QuoteGoal _ _ e) = allNames e allNames (QuoteContext _) = Seq.empty allNames Quote{} = Seq.empty allNames QuoteTerm{} = Seq.empty allNames Unquote{} = Seq.empty allNames (Tactic _ e xs ys) = allNames e >< allNames xs >< allNames ys allNames DontCare{} = Seq.empty allNames PatternSyn{} = Seq.empty allNames Macro{} = Seq.empty instance AllNames LamBinding where allNames DomainFree{} = Seq.empty allNames (DomainFull binds) = allNames binds instance AllNames TypedBinding where allNames (TBind _ _ e) = allNames e allNames (TLet _ lbs) = allNames lbs instance AllNames LetBinding where allNames (LetBind _ _ _ e1 e2) = allNames e1 >< allNames e2 allNames (LetPatBind _ _ e) = allNames e allNames (LetApply _ _ app _ _) = allNames app allNames LetOpen{} = Seq.empty allNames (LetDeclaredVariable _) = Seq.empty instance AllNames ModuleApplication where allNames (SectionApp bindss _ es) = allNames bindss >< allNames es allNames RecordModuleInstance{} = Seq.empty -- | The name defined by the given axiom. -- -- Precondition: The declaration has to be a (scoped) 'Axiom'. axiomName :: Declaration -> QName axiomName (Axiom _ _ _ _ q _) = q axiomName (ScopedDecl _ (d:_)) = axiomName d axiomName _ = __IMPOSSIBLE__ -- | Are we in an abstract block? -- -- In that case some definition is abstract. class AnyAbstract a where anyAbstract :: a -> Bool instance AnyAbstract a => AnyAbstract [a] where anyAbstract = Fold.any anyAbstract instance AnyAbstract Declaration where anyAbstract (Axiom _ i _ _ _ _) = defAbstract i == AbstractDef anyAbstract (Field i _ _) = defAbstract i == AbstractDef anyAbstract (Mutual _ ds) = anyAbstract ds anyAbstract (ScopedDecl _ ds) = anyAbstract ds anyAbstract (Section _ _ _ ds) = anyAbstract ds anyAbstract (FunDef i _ _ _) = defAbstract i == AbstractDef anyAbstract (DataDef i _ _ _ _) = defAbstract i == AbstractDef anyAbstract (RecDef i _ _ _ _ _ _ _ _) = defAbstract i == AbstractDef anyAbstract (DataSig i _ _ _) = defAbstract i == AbstractDef anyAbstract (RecSig i _ _ _) = defAbstract i == AbstractDef anyAbstract _ = __IMPOSSIBLE__ class NameToExpr a where nameExpr :: a -> Expr -- | Turn an 'AbstractName' to an expression. instance NameToExpr AbstractName where nameExpr d = mk (anameKind d) $ anameName d where mk DefName x = Def x mk GeneralizeName x = Def x mk DisallowedGeneralizeName x = Def x mk FldName x = Proj ProjSystem $ unambiguous x mk ConName x = Con $ unambiguous x mk PatternSynName x = PatternSyn $ unambiguous x mk MacroName x = Macro x mk QuotableName x = App (defaultAppInfo r) (Quote i) (defaultNamedArg $ Def x) where i = ExprRange r r = getRange x -- | Assumes name is not 'UnknownName'. instance NameToExpr ResolvedName where nameExpr = \case VarName x _ -> Var x DefinedName _ x -> nameExpr x -- Can be 'DefName', 'MacroName', 'QuotableName'. FieldName xs -> Proj ProjSystem . AmbQ . fmap anameName $ xs ConstructorName xs -> Con . AmbQ . fmap anameName $ xs PatternSynResName xs -> PatternSyn . AmbQ . fmap anameName $ xs UnknownName -> __IMPOSSIBLE__ app :: Expr -> [NamedArg Expr] -> Expr app = foldl (App defaultAppInfo_) mkLet :: ExprInfo -> [LetBinding] -> Expr -> Expr mkLet i [] e = e mkLet i ds e = Let i ds e patternToExpr :: Pattern -> Expr patternToExpr (VarP x) = Var (unBind x) patternToExpr (ConP _ c ps) = Con c `app` map (fmap (fmap patternToExpr)) ps patternToExpr (ProjP _ o ds) = Proj o ds patternToExpr (DefP _ fs ps) = Def (headAmbQ fs) `app` map (fmap (fmap patternToExpr)) ps patternToExpr (WildP _) = Underscore emptyMetaInfo patternToExpr (AsP _ _ p) = patternToExpr p patternToExpr (DotP _ e) = e patternToExpr (AbsurdP _) = Underscore emptyMetaInfo -- TODO: could this happen? patternToExpr (LitP l) = Lit l patternToExpr (PatternSynP _ c ps) = PatternSyn c `app` (map . fmap . fmap) patternToExpr ps patternToExpr (RecP _ as) = Rec exprNoRange $ map (Left . fmap patternToExpr) as patternToExpr EqualP{} = __IMPOSSIBLE__ -- Andrea TODO: where is this used? patternToExpr (WithP r p) = __IMPOSSIBLE__ type PatternSynDefn = ([Arg Name], Pattern' Void) type PatternSynDefns = Map QName PatternSynDefn lambdaLiftExpr :: [Name] -> Expr -> Expr lambdaLiftExpr [] e = e lambdaLiftExpr (n:ns) e = Lam exprNoRange (DomainFree $ defaultNamedArg $ BindName n) $ lambdaLiftExpr ns e class SubstExpr a where substExpr :: [(Name, Expr)] -> a -> a instance SubstExpr a => SubstExpr [a] where substExpr = fmap . substExpr instance SubstExpr a => SubstExpr (Arg a) where substExpr = fmap . substExpr instance SubstExpr a => SubstExpr (Named name a) where substExpr = fmap . substExpr instance (SubstExpr a, SubstExpr b) => SubstExpr (a, b) where substExpr s (x, y) = (substExpr s x, substExpr s y) instance (SubstExpr a, SubstExpr b) => SubstExpr (Either a b) where substExpr s (Left x) = Left (substExpr s x) substExpr s (Right y) = Right (substExpr s y) instance SubstExpr C.Name where substExpr _ = id instance SubstExpr ModuleName where substExpr _ = id instance SubstExpr Assign where substExpr s (FieldAssignment n x) = FieldAssignment n (substExpr s x) instance SubstExpr Expr where substExpr s e = case e of Var n -> fromMaybe e (lookup n s) Def _ -> e Proj{} -> e Con _ -> e Lit _ -> e QuestionMark{} -> e Underscore _ -> e Dot i e -> Dot i (substExpr s e) App i e e' -> App i (substExpr s e) (substExpr s e') WithApp i e es -> WithApp i (substExpr s e) (substExpr s es) Lam i lb e -> Lam i lb (substExpr s e) AbsurdLam i h -> e ExtendedLam i di n cs -> __IMPOSSIBLE__ -- Maybe later... Pi i t e -> Pi i (substExpr s t) (substExpr s e) Generalized ns e -> Generalized ns (substExpr s e) Fun i ae e -> Fun i (substExpr s ae) (substExpr s e) Set i n -> e Prop i n -> e Let i ls e -> Let i (substExpr s ls) (substExpr s e) ETel t -> e Rec i nes -> Rec i (substExpr s nes) RecUpdate i e nes -> RecUpdate i (substExpr s e) (substExpr s nes) -- XXX: Do we need to do more with ScopedExprs? ScopedExpr si e -> ScopedExpr si (substExpr s e) QuoteGoal i n e -> QuoteGoal i n (substExpr s e) QuoteContext i -> e Quote i -> e QuoteTerm i -> e Unquote i -> e Tactic i e xs ys -> Tactic i (substExpr s e) (substExpr s xs) (substExpr s ys) DontCare e -> DontCare (substExpr s e) PatternSyn{} -> e Macro{} -> e instance SubstExpr LetBinding where substExpr s lb = case lb of LetBind i r n e e' -> LetBind i r n (substExpr s e) (substExpr s e') LetPatBind i p e -> LetPatBind i p (substExpr s e) -- Andreas, 2012-06-04: what about the pattern p _ -> lb -- Nicolas, 2013-11-11: what about "LetApply" there is experessions in there instance SubstExpr TypedBinding where substExpr s tb = case tb of TBind r ns e -> TBind r ns $ substExpr s e TLet r lbs -> TLet r $ substExpr s lbs -- TODO: more informative failure insertImplicitPatSynArgs :: HasRange a => (Range -> a) -> Range -> [Arg Name] -> [NamedArg a] -> Maybe ([(Name, a)], [Arg Name]) insertImplicitPatSynArgs wild r ns as = matchArgs r ns as where matchNextArg r n as@(~(a : as')) | matchNext n as = return (namedArg a, as') | visible n = Nothing | otherwise = return (wild r, as) matchNext _ [] = False matchNext n (a:as) = sameHiding n a && matchName where x = unranged $ C.nameToRawName $ nameConcrete $ unArg n matchName = maybe True (== x) (nameOf $ unArg a) matchArgs r [] [] = return ([], []) matchArgs r [] as = Nothing matchArgs r (n:ns) [] | visible n = return ([], n : ns) -- under-applied matchArgs r (n:ns) as = do (p, as) <- matchNextArg r n as first ((unArg n, p) :) <$> matchArgs (getRange p) ns as Agda-2.6.0.1/src/full/Agda/Syntax/Internal/0000755000000000000000000000000013466402171016333 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Internal/Names.hs0000644000000000000000000001516613466402171017743 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- | Extract all names from things. module Agda.Syntax.Internal.Names where import Data.Foldable import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Agda.Syntax.Common import Agda.Syntax.Literal import Agda.Syntax.Internal import qualified Agda.Syntax.Concrete as C import qualified Agda.Syntax.Abstract as A import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.CompiledClause import Agda.Utils.Functor import Agda.Utils.NonemptyList import Agda.Utils.Impossible #include "undefined.h" class NamesIn a where namesIn :: a -> Set QName default namesIn :: (Foldable f, NamesIn b, f b ~ a) => a -> Set QName namesIn = foldMap namesIn instance NamesIn a => NamesIn (Maybe a) where instance NamesIn a => NamesIn [a] where instance NamesIn a => NamesIn (NonemptyList a) where instance NamesIn a => NamesIn (Arg a) where instance NamesIn a => NamesIn (Dom a) where instance NamesIn a => NamesIn (Named n a) where instance NamesIn a => NamesIn (Abs a) where instance NamesIn a => NamesIn (WithArity a) where instance NamesIn a => NamesIn (Tele a) where instance NamesIn a => NamesIn (C.FieldAssignment' a) where instance (NamesIn a, NamesIn b) => NamesIn (a, b) where namesIn (x, y) = Set.union (namesIn x) (namesIn y) instance (NamesIn a, NamesIn b, NamesIn c) => NamesIn (a, b, c) where namesIn (x, y, z) = namesIn (x, (y, z)) instance NamesIn CompKit where namesIn (CompKit a b) = namesIn (a,b) -- Andreas, 2017-07-27 -- In the following clauses, the choice of fields is not obvious -- to the reader. Please comment on the choices. -- -- Also, this would be more robust if these were constructor-style -- matches instead of record-style matches. -- If someone adds a field containing names, this would go unnoticed. instance NamesIn Definition where namesIn def = namesIn (defType def, theDef def, defDisplay def) instance NamesIn Defn where namesIn def = case def of Axiom -> Set.empty DataOrRecSig{} -> Set.empty GeneralizableVar{} -> Set.empty -- Andreas 2017-07-27, Q: which names can be in @cc@ which are not already in @cl@? Function { funClauses = cl, funCompiled = cc } -> namesIn (cl, cc) Datatype { dataClause = cl, dataCons = cs, dataSort = s } -> namesIn (cl, cs, s) Record { recClause = cl, recConHead = c, recFields = fs, recComp = comp } -> namesIn (cl, c, (fs, comp)) -- Don't need recTel since those will be reachable from the constructor Constructor { conSrcCon = c, conData = d, conComp = cn } -> namesIn (c, d, cn) Primitive { primClauses = cl, primCompiled = cc } -> namesIn (cl, cc) AbstractDefn{} -> __IMPOSSIBLE__ instance NamesIn Clause where namesIn Clause{ clauseTel = tel, namedClausePats = ps, clauseBody = b, clauseType = t } = namesIn ((tel, ps, b), t) instance NamesIn CompiledClauses where namesIn (Case _ c) = namesIn c namesIn (Done _ v) = namesIn v namesIn Fail = Set.empty -- Andreas, 2017-07-27 -- Why ignoring the litBranches? instance NamesIn a => NamesIn (Case a) where namesIn Branches{ conBranches = bs, catchAllBranch = c } = namesIn (Map.toList bs, c) instance NamesIn (Pattern' a) where namesIn p = case p of VarP{} -> Set.empty LitP l -> namesIn l DotP _ v -> namesIn v ConP c _ args -> namesIn (c, args) DefP o q args -> namesIn (q, args) ProjP _ f -> namesIn f IApplyP _ t u _ -> namesIn (t, u) instance NamesIn a => NamesIn (Type' a) where namesIn (El s t) = namesIn (s, t) instance NamesIn Sort where namesIn s = case s of Type l -> namesIn l Prop l -> namesIn l Inf -> Set.empty SizeUniv -> Set.empty PiSort a b -> namesIn (a, b) UnivSort a -> namesIn a MetaS _ es -> namesIn es DefS d es -> namesIn (d, es) DummyS{} -> Set.empty instance NamesIn Term where namesIn v = case v of Var _ args -> namesIn args Lam _ b -> namesIn b Lit l -> namesIn l Def f args -> namesIn (f, args) Con c _ args -> namesIn (c, args) Pi a b -> namesIn (a, b) Sort s -> namesIn s Level l -> namesIn l MetaV _ args -> namesIn args DontCare v -> namesIn v Dummy{} -> Set.empty instance NamesIn Level where namesIn (Max ls) = namesIn ls instance NamesIn PlusLevel where namesIn ClosedLevel{} = Set.empty namesIn (Plus _ l) = namesIn l instance NamesIn LevelAtom where namesIn l = case l of MetaLevel _ args -> namesIn args BlockedLevel _ v -> namesIn v NeutralLevel _ v -> namesIn v UnreducedLevel v -> namesIn v -- For QName literals! instance NamesIn Literal where namesIn l = case l of LitNat{} -> Set.empty LitWord64{} -> Set.empty LitString{} -> Set.empty LitChar{} -> Set.empty LitFloat{} -> Set.empty LitQName _ x -> namesIn x LitMeta{} -> Set.empty instance NamesIn a => NamesIn (Elim' a) where namesIn (Apply arg) = namesIn arg namesIn (Proj _ f) = namesIn f namesIn (IApply x y arg) = namesIn (x, y, arg) instance NamesIn QName where namesIn x = Set.singleton x -- interesting case instance NamesIn ConHead where namesIn h = namesIn (conName h) instance NamesIn a => NamesIn (Open a) where instance NamesIn DisplayForm where namesIn (Display _ ps v) = namesIn (ps, v) instance NamesIn DisplayTerm where namesIn v = case v of DWithApp v us es -> namesIn (v, us, es) DCon c _ vs -> namesIn (c, vs) DDef f es -> namesIn (f, es) DDot v -> namesIn v DTerm v -> namesIn v -- Pattern synonym stuff -- newtype PSyn = PSyn A.PatternSynDefn instance NamesIn PSyn where namesIn (PSyn (_args, p)) = namesIn p instance NamesIn (A.Pattern' a) where namesIn p = case p of A.VarP{} -> Set.empty A.ConP _ c args -> namesIn (c, args) A.ProjP _ _ d -> namesIn d A.DefP _ f args -> namesIn (f, args) A.WildP{} -> Set.empty A.AsP _ _ p -> namesIn p A.AbsurdP{} -> Set.empty A.LitP l -> namesIn l A.PatternSynP _ c args -> namesIn (c, args) A.RecP _ fs -> namesIn fs A.DotP{} -> __IMPOSSIBLE__ -- Dot patterns are not allowed in pattern synonyms A.EqualP{} -> __IMPOSSIBLE__ -- Andrea: should we allow these in pattern synonyms? A.WithP _ p -> namesIn p instance NamesIn AmbiguousQName where namesIn (AmbQ cs) = namesIn cs Agda-2.6.0.1/src/full/Agda/Syntax/Internal/SanityCheck.hs0000644000000000000000000000554213466402171021102 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Sanity checking for internal syntax. Mostly checking variable scoping. module Agda.Syntax.Internal.SanityCheck where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Monad import qualified Data.IntSet as Set import Text.PrettyPrint (empty) import Agda.Syntax.Internal import Agda.TypeChecking.Free import Agda.TypeChecking.Monad import Agda.TypeChecking.Substitute import Agda.Utils.List ( dropEnd ) import Agda.Utils.Pretty import Agda.Utils.Size import Agda.Utils.Impossible #include "undefined.h" sanityCheckVars :: (Pretty a, Free a) => Telescope -> a -> TCM () sanityCheckVars tel v = case filter bad (Set.toList $ allFreeVars v) of [] -> return () xs -> do reportSDoc "impossible" 1 . return $ sep [ hang "Sanity check failed for" 2 (hang (pretty tel <+> "|-") 2 (pretty v)) , text $ "out of scope: " ++ show xs ] __IMPOSSIBLE__ where n = size tel bad x = x < 0 || x >= n -- | Check that @Γ ⊢ ρ : Δ@. sanityCheckSubst :: (Pretty a, Free a) => Telescope -> Substitution' a -> Telescope -> TCM () sanityCheckSubst gamma rho delta = go gamma rho delta where go gamma rho delta = case rho of IdS -> unless (size gamma == size delta) $ err $ "idS:" <+> hang (pretty gamma <+> "/=") 2 (pretty delta) EmptyS _ -> unless (size delta == 0) $ err $ "emptyS:" <+> pretty delta <+> "is not empty" v :# rho -> do unless (size delta > 0) $ err $ "consS: empty target" sanityCheckVars gamma v sanityCheckSubst gamma rho (dropLast delta) Strengthen _ rho -> do unless (size delta > 0) $ err $ "strS: empty target" sanityCheckSubst gamma rho (dropLast delta) Wk n rho -> do unless (size gamma >= n) $ err $ "wkS:" <+> sep [ "|" <> pretty gamma <> "|" , text $ "< " ++ show n ] sanityCheckSubst (dropLastN n gamma) rho delta Lift n rho -> do unless (size gamma >= n) $ err $ "liftS: source" <+> sep [ "|" <> pretty gamma <> "|" , text $ "< " ++ show n ] unless (size delta >= n) $ err $ "liftS: target" <+> sep [ "|" <> pretty delta <> "|" , text $ "< " ++ show n ] sanityCheckSubst (dropLastN n gamma) rho (dropLastN n delta) dropLast = telFromList . init . telToList dropLastN n = telFromList . dropEnd n . telToList err reason = do reportSDoc "impossible" 1 . return $ sep [ hang "Sanity check failed for" 2 $ hang (pretty gamma <+> "|-") 2 $ hang (pretty rho <+> ":") 2 $ pretty delta , reason ] __IMPOSSIBLE__ Agda-2.6.0.1/src/full/Agda/Syntax/Internal/Generic.hs0000644000000000000000000001330713466402171020247 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- | Tree traversal for internal syntax. module Agda.Syntax.Internal.Generic where import Data.Traversable import Data.Monoid import Data.Foldable import Agda.Syntax.Common import Agda.Syntax.Internal -- | Generic term traversal. -- -- Note: ignores sorts in terms! -- (Does not traverse into or collect from them.) class TermLike a where -- | Generic traversal with post-traversal action. -- Ignores sorts. traverseTermM :: Monad m => (Term -> m Term) -> a -> m a default traverseTermM :: (Monad m, Traversable f, TermLike b, f b ~ a) => (Term -> m Term) -> a -> m a traverseTermM = traverse . traverseTermM -- | Generic fold, ignoring sorts. foldTerm :: Monoid m => (Term -> m) -> a -> m default foldTerm :: (Monoid m, Foldable f, TermLike b, f b ~ a) => (Term -> m) -> a -> m foldTerm = foldMap . foldTerm -- Constants instance TermLike Bool where traverseTermM _ = pure foldTerm _ = mempty instance TermLike Int where traverseTermM _ = pure foldTerm _ = mempty instance TermLike Integer where traverseTermM _ = pure foldTerm _ = mempty instance TermLike Char where traverseTermM _ = pure foldTerm _ = mempty instance TermLike QName where traverseTermM _ = pure foldTerm _ = mempty -- Functors instance TermLike a => TermLike (Elim' a) where instance TermLike a => TermLike (Arg a) where instance TermLike a => TermLike (Dom a) where instance TermLike a => TermLike [a] where instance TermLike a => TermLike (Maybe a) where instance TermLike a => TermLike (Abs a) where instance TermLike a => TermLike (Blocked a) where instance TermLike a => TermLike (Tele a) where -- Tuples instance (TermLike a, TermLike b) => TermLike (a, b) where traverseTermM f (x, y) = (,) <$> traverseTermM f x <*> traverseTermM f y foldTerm f (x, y) = foldTerm f x `mappend` foldTerm f y instance (TermLike a, TermLike b, TermLike c) => TermLike (a, b, c) where traverseTermM f (x, y, z) = (,,) <$> traverseTermM f x <*> traverseTermM f y <*> traverseTermM f z foldTerm f (x, y, z) = mconcat [foldTerm f x, foldTerm f y, foldTerm f z] instance (TermLike a, TermLike b, TermLike c, TermLike d) => TermLike (a, b, c, d) where traverseTermM f (x, y, z, u) = (,,,) <$> traverseTermM f x <*> traverseTermM f y <*> traverseTermM f z <*> traverseTermM f u foldTerm f (x, y, z, u) = mconcat [foldTerm f x, foldTerm f y, foldTerm f z, foldTerm f u] -- Real terms instance TermLike Term where traverseTermM f t = case t of Var i xs -> f =<< Var i <$> traverseTermM f xs Def c xs -> f =<< Def c <$> traverseTermM f xs Con c ci xs -> f =<< Con c ci <$> traverseTermM f xs Lam h b -> f =<< Lam h <$> traverseTermM f b Pi a b -> f =<< uncurry Pi <$> traverseTermM f (a, b) MetaV m xs -> f =<< MetaV m <$> traverseTermM f xs Level l -> f =<< Level <$> traverseTermM f l Lit _ -> f t Sort s -> f =<< Sort <$> traverseTermM f s DontCare mv -> f =<< DontCare <$> traverseTermM f mv Dummy{} -> f t foldTerm f t = f t `mappend` case t of Var i xs -> foldTerm f xs Def c xs -> foldTerm f xs Con c ci xs -> foldTerm f xs Lam h b -> foldTerm f b Pi a b -> foldTerm f (a, b) MetaV m xs -> foldTerm f xs Level l -> foldTerm f l Lit _ -> mempty Sort s -> foldTerm f s DontCare mv -> foldTerm f mv Dummy{} -> mempty instance TermLike Level where traverseTermM f (Max as) = Max <$> traverseTermM f as foldTerm f (Max as) = foldTerm f as instance TermLike PlusLevel where traverseTermM f l = case l of ClosedLevel{} -> return l Plus n l -> Plus n <$> traverseTermM f l foldTerm f ClosedLevel{} = mempty foldTerm f (Plus _ l) = foldTerm f l instance TermLike LevelAtom where traverseTermM f l = case l of MetaLevel m vs -> MetaLevel m <$> traverseTermM f vs NeutralLevel r v -> NeutralLevel r <$> traverseTermM f v BlockedLevel m v -> BlockedLevel m <$> traverseTermM f v UnreducedLevel v -> UnreducedLevel <$> traverseTermM f v foldTerm f l = case l of MetaLevel m vs -> foldTerm f vs NeutralLevel _ v -> foldTerm f v BlockedLevel _ v -> foldTerm f v UnreducedLevel v -> foldTerm f v instance TermLike Type where traverseTermM f (El s t) = El s <$> traverseTermM f t foldTerm f (El s t) = foldTerm f t instance TermLike Sort where traverseTermM f s = case s of Type l -> Type <$> traverseTermM f l Prop l -> Prop <$> traverseTermM f l Inf -> pure s SizeUniv -> pure s PiSort a b -> PiSort <$> traverseTermM f a <*> traverseTermM f b UnivSort a -> UnivSort <$> traverseTermM f a MetaS x es -> MetaS x <$> traverseTermM f es DefS q es -> DefS q <$> traverseTermM f es DummyS{} -> pure s foldTerm f s = case s of Type l -> foldTerm f l Prop l -> foldTerm f l Inf -> mempty SizeUniv -> mempty PiSort a b -> foldTerm f a <> foldTerm f b UnivSort a -> foldTerm f a MetaS _ es -> foldTerm f es DefS _ es -> foldTerm f es DummyS{} -> mempty instance TermLike EqualityView where traverseTermM f v = case v of OtherType t -> OtherType <$> traverseTermM f t EqualityType s eq l t a b -> EqualityType s eq <$> traverse (traverseTermM f) l <*> traverseTermM f t <*> traverseTermM f a <*> traverseTermM f b foldTerm f v = case v of OtherType t -> foldTerm f t EqualityType s eq l t a b -> foldTerm f (l ++ [t, a, b]) -- | Put it in a monad to make it possible to do strictly. copyTerm :: (TermLike a, Monad m) => a -> m a copyTerm = traverseTermM return Agda-2.6.0.1/src/full/Agda/Syntax/Internal/Pattern.hs0000644000000000000000000003041013466402171020302 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- because of type equality ~ {-# LANGUAGE UndecidableInstances #-} -- because of func. deps. module Agda.Syntax.Internal.Pattern where import Control.Arrow (first, second) import Control.Monad.State import Data.Maybe import Data.Monoid import qualified Data.List as List import Data.Foldable import Data.Traversable import Agda.Syntax.Common import Agda.Syntax.Abstract (IsProjP(..)) import Agda.Syntax.Internal import qualified Agda.Syntax.Internal as I import Agda.Utils.Empty import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Permutation import Agda.Utils.Size (size) import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- * Tools for clauses -- | Translate the clause patterns to terms with free variables bound by the -- clause telescope. -- -- Precondition: no projection patterns. clauseArgs :: Clause -> Args clauseArgs cl = fromMaybe __IMPOSSIBLE__ $ allApplyElims $ clauseElims cl -- | Translate the clause patterns to an elimination spine -- with free variables bound by the clause telescope. clauseElims :: Clause -> Elims clauseElims cl = patternsToElims $ namedClausePats cl -- | Arity of a function, computed from clauses. class FunArity a where funArity :: a -> Int -- | Get the number of initial 'Apply' patterns. instance {-# OVERLAPPABLE #-} IsProjP p => FunArity [p] where funArity = length . takeWhile (isNothing . isProjP) -- | Get the number of initial 'Apply' patterns in a clause. instance FunArity Clause where funArity = funArity . namedClausePats -- | Get the number of common initial 'Apply' patterns in a list of clauses. instance {-# OVERLAPPING #-} FunArity [Clause] where funArity [] = 0 funArity cls = minimum $ map funArity cls -- * Tools for patterns -- | Label the pattern variables from left to right -- using one label for each variable pattern and one for each dot pattern. class LabelPatVars a b i | b -> i where labelPatVars :: a -> State [i] b unlabelPatVars :: b -> a -- ^ Intended, but unpractical due to the absence of type-level lambda, is: -- @labelPatVars :: f (Pattern' x) -> State [i] (f (Pattern' (i,x)))@ default labelPatVars :: (Traversable f, LabelPatVars a' b' i, f a' ~ a, f b' ~ b) => a -> State [i] b labelPatVars = traverse labelPatVars default unlabelPatVars :: (Traversable f, LabelPatVars a' b' i, f a' ~ a, f b' ~ b) => b -> a unlabelPatVars = fmap unlabelPatVars instance LabelPatVars a b i => LabelPatVars (Arg a) (Arg b) i where instance LabelPatVars a b i => LabelPatVars (Named x a) (Named x b) i where instance LabelPatVars a b i => LabelPatVars [a] [b] i where instance LabelPatVars Pattern DeBruijnPattern Int where labelPatVars p = case p of VarP o x -> do i <- next return $ VarP o (DBPatVar x i) DotP o t -> DotP o t <$ next ConP c mt ps -> ConP c mt <$> labelPatVars ps DefP o q ps -> DefP o q <$> labelPatVars ps LitP l -> return $ LitP l ProjP o q -> return $ ProjP o q IApplyP o u t x -> do i <- next return $ IApplyP o u t (DBPatVar x i) where next = caseListM get __IMPOSSIBLE__ $ \ x xs -> do put xs; return x unlabelPatVars = fmap dbPatVarName -- | Augment pattern variables with their de Bruijn index. {-# SPECIALIZE numberPatVars :: Int -> Permutation -> [NamedArg Pattern] -> [NamedArg DeBruijnPattern] #-} -- -- Example: -- @ -- f : (A : Set) (n : Nat) (v : Vec A n) -> ... -- f A .(suc n) (cons n x xs) -- -- clauseTel = (A : Set) (n : Nat) (x : A) (xs : Vec A n) -- perm = Perm 5 [0,2,3,4] -- invertP __IMPOSSIBLE__ perm = Perm 4 [0,__IMPOSSIBLE__,1,2,3] -- flipP ... = Perm 4 [3,__IMPOSSIBLE__,2,1,0] -- pats = A .(suc 2) (cons n x xs) -- dBpats = 3 .(suc 2) (cons 2 1 0 ) -- @ -- numberPatVars :: LabelPatVars a b Int => Int -> Permutation -> a -> b numberPatVars err perm ps = evalState (labelPatVars ps) $ permPicks $ flipP $ invertP err perm unnumberPatVars :: LabelPatVars a b i => b -> a unnumberPatVars = unlabelPatVars dbPatPerm :: [NamedArg DeBruijnPattern] -> Maybe Permutation dbPatPerm = dbPatPerm' True -- | Computes the permutation from the clause telescope -- to the pattern variables. -- -- Use as @fromMaybe __IMPOSSIBLE__ . dbPatPerm@ to crash -- in a controlled way if a de Bruijn index is out of scope here. -- -- The first argument controls whether dot patterns counts as variables or -- not. dbPatPerm' :: Bool -> [NamedArg DeBruijnPattern] -> Maybe Permutation dbPatPerm' countDots ps = Perm (size ixs) <$> picks where ixs = concatMap (getIndices . namedThing . unArg) ps n = size $ catMaybes ixs picks = forM (downFrom n) $ \ i -> List.findIndex (Just i ==) ixs getIndices :: DeBruijnPattern -> [Maybe Int] getIndices (VarP _ x) = [Just $ dbPatVarIndex x] getIndices (ConP c _ ps) = concatMap (getIndices . namedThing . unArg) ps getIndices (DefP _ _ ps) = concatMap (getIndices . namedThing . unArg) ps getIndices (DotP _ _) = [Nothing | countDots] getIndices (LitP _) = [] getIndices ProjP{} = [] getIndices (IApplyP _ _ _ x) = [Just $ dbPatVarIndex x] -- | Computes the permutation from the clause telescope -- to the pattern variables. -- -- Use as @fromMaybe __IMPOSSIBLE__ . clausePerm@ to crash -- in a controlled way if a de Bruijn index is out of scope here. clausePerm :: Clause -> Maybe Permutation clausePerm = dbPatPerm . namedClausePats -- | Turn a pattern into a term. -- Projection patterns are turned into projection eliminations, -- other patterns into apply elimination. patternToElim :: Arg DeBruijnPattern -> Elim patternToElim (Arg ai (VarP o x)) = Apply $ Arg ai $ var $ dbPatVarIndex x patternToElim (Arg ai (ConP c cpi ps)) = Apply $ Arg ai $ Con c ci $ map (patternToElim . fmap namedThing) ps where ci = fromConPatternInfo cpi patternToElim (Arg ai (DefP o q ps)) = Apply $ Arg ai $ Def q $ map (patternToElim . fmap namedThing) ps patternToElim (Arg ai (DotP o t) ) = Apply $ Arg ai t patternToElim (Arg ai (LitP l) ) = Apply $ Arg ai $ Lit l patternToElim (Arg ai (ProjP o dest)) = Proj o dest patternToElim (Arg ai (IApplyP o t u x)) = IApply t u $ var $ dbPatVarIndex x patternsToElims :: [NamedArg DeBruijnPattern] -> [Elim] patternsToElims ps = map build ps where build :: NamedArg DeBruijnPattern -> Elim build = patternToElim . fmap namedThing patternToTerm :: DeBruijnPattern -> Term patternToTerm p = case patternToElim (defaultArg p) of Apply x -> unArg x Proj{} -> __IMPOSSIBLE__ IApply _ _ x -> x class MapNamedArgPattern a p where mapNamedArgPattern :: (NamedArg (Pattern' a) -> NamedArg (Pattern' a)) -> p -> p default mapNamedArgPattern :: (Functor f, MapNamedArgPattern a p', p ~ f p') => (NamedArg (Pattern' a) -> NamedArg (Pattern' a)) -> p -> p mapNamedArgPattern = fmap . mapNamedArgPattern -- | Modify the content of @VarP@, and the closest surrounding @NamedArg@. -- -- Note: the @mapNamedArg@ for @Pattern'@ is not expressible simply -- by @fmap@ or @traverse@ etc., since @ConP@ has @NamedArg@ subpatterns, -- which are taken into account by @mapNamedArg@. instance MapNamedArgPattern a (NamedArg (Pattern' a)) where mapNamedArgPattern f np = case namedArg np of VarP o x -> f np DotP o t -> f np LitP l -> f np ProjP o q -> f np ConP c i ps -> f $ setNamedArg np $ ConP c i $ mapNamedArgPattern f ps DefP o q ps -> f $ setNamedArg np $ DefP o q $ mapNamedArgPattern f ps IApplyP o u t x -> f np instance MapNamedArgPattern a p => MapNamedArgPattern a [p] where -- | Generic pattern traversal. -- -- Pre-applies a pattern modification, recurses, and post-applies another one. class PatternLike a b where -- | Fold pattern. foldrPattern :: Monoid m => (Pattern' a -> m -> m) -- ^ Combine a pattern and the value computed from its subpatterns. -> b -> m default foldrPattern :: (Monoid m, Foldable f, PatternLike a p, f p ~ b) => (Pattern' a -> m -> m) -> b -> m foldrPattern = foldMap . foldrPattern -- | Traverse pattern. traversePatternM :: Monad m => (Pattern' a -> m (Pattern' a)) -- ^ @pre@: Modification before recursion. -> (Pattern' a -> m (Pattern' a)) -- ^ @post@: Modification after recursion. -> b -> m b default traversePatternM :: (Traversable f, PatternLike a p, f p ~ b, Monad m) => (Pattern' a -> m (Pattern' a)) -> (Pattern' a -> m (Pattern' a)) -> b -> m b traversePatternM pre post = traverse $ traversePatternM pre post -- | Compute from each subpattern a value and collect them all in a monoid. foldPattern :: (PatternLike a b, Monoid m) => (Pattern' a -> m) -> b -> m foldPattern f = foldrPattern $ \ p m -> f p `mappend` m -- | Traverse pattern(s) with a modification before the recursive descent. preTraversePatternM :: (PatternLike a b, Monad m) => (Pattern' a -> m (Pattern' a)) -- ^ @pre@: Modification before recursion. -> b -> m b preTraversePatternM pre = traversePatternM pre return -- | Traverse pattern(s) with a modification after the recursive descent. postTraversePatternM :: (PatternLike a b, Monad m) => (Pattern' a -> m (Pattern' a)) -- ^ @post@: Modification after recursion. -> b -> m b postTraversePatternM = traversePatternM return -- This is where the action is: instance PatternLike a (Pattern' a) where foldrPattern f p = f p $ case p of ConP _ _ ps -> foldrPattern f ps DefP _ _ ps -> foldrPattern f ps VarP _ _ -> mempty LitP _ -> mempty DotP _ _ -> mempty ProjP _ _ -> mempty IApplyP{} -> mempty traversePatternM pre post = pre >=> recurse >=> post where recurse p = case p of ConP c ci ps -> ConP c ci <$> traversePatternM pre post ps DefP o q ps -> DefP o q <$> traversePatternM pre post ps VarP _ _ -> return p LitP _ -> return p DotP _ _ -> return p ProjP _ _ -> return p IApplyP{} -> return p -- Boilerplate instances: instance PatternLike a b => PatternLike a [b] where instance PatternLike a b => PatternLike a (Arg b) where instance PatternLike a b => PatternLike a (Named x b) where -- Counting pattern variables --------------------------------------------- class CountPatternVars a where countPatternVars :: a -> Int default countPatternVars :: (Foldable f, CountPatternVars b, f b ~ a) => a -> Int countPatternVars = getSum . foldMap (Sum . countPatternVars) instance CountPatternVars a => CountPatternVars [a] where instance CountPatternVars a => CountPatternVars (Arg a) where instance CountPatternVars a => CountPatternVars (Named x a) where instance CountPatternVars (Pattern' x) where countPatternVars p = case p of VarP{} -> 1 ConP _ _ ps -> countPatternVars ps DotP{} -> 1 -- dot patterns are treated as variables in the clauses _ -> 0 -- Computing modalities of pattern variables ------------------------------ class PatternVarModalities p x | p -> x where -- | Get the list of pattern variables annotated with modalities. patternVarModalities :: p -> [(x, Modality)] instance PatternVarModalities a x => PatternVarModalities [a] x where patternVarModalities = foldMap patternVarModalities instance PatternVarModalities a x => PatternVarModalities (Named s a) x where patternVarModalities = foldMap patternVarModalities instance PatternVarModalities a x => PatternVarModalities (Arg a) x where patternVarModalities arg = map (second (m <>)) (patternVarModalities $ unArg arg) where m = getModality arg instance PatternVarModalities a x => PatternVarModalities (Elim' a) x where patternVarModalities (Apply x) = patternVarModalities x -- Note: x :: Arg a patternVarModalities (IApply x y p) = patternVarModalities [x, y, p] patternVarModalities Proj{} = [] instance PatternVarModalities (Pattern' x) x where patternVarModalities p = case p of VarP _ x -> [(x, defaultModality)] ConP _ _ ps -> patternVarModalities ps DefP _ _ ps -> patternVarModalities ps DotP{} -> [] LitP{} -> [] ProjP{} -> [] IApplyP _ _ _ x -> [(x, defaultModality)] Agda-2.6.0.1/src/full/Agda/Syntax/Internal/Defs.hs0000644000000000000000000000657013466402171017560 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} -- | Extract used definitions from terms. module Agda.Syntax.Internal.Defs where import Control.Monad.Reader import Control.Monad.Writer import Data.Foldable (Foldable) import qualified Data.Foldable as Fold import Agda.Syntax.Common import Agda.Syntax.Internal -- | @getDefs' lookup emb a@ extracts all used definitions -- (functions, data/record types) from @a@, embedded into a monoid via @emb@. -- Instantiations of meta variables are obtained via @lookup@. -- -- Typical monoid instances would be @[QName]@ or @Set QName@. -- Note that @emb@ can also choose to discard a used definition -- by mapping to the unit of the monoid. getDefs' :: (GetDefs a, Monoid b) => (MetaId -> Maybe Term) -> (QName -> b) -> a -> b getDefs' lookup emb = execWriter . (`runReaderT` GetDefsEnv lookup emb) . getDefs -- | Inputs to and outputs of @getDefs'@ are organized as a monad. type GetDefsM b = ReaderT (GetDefsEnv b) (Writer b) data GetDefsEnv b = GetDefsEnv { lookupMeta :: MetaId -> Maybe Term , embDef :: QName -> b } -- | What it takes to get the used definitions. class Monad m => MonadGetDefs m where doDef :: QName -> m () doMeta :: MetaId -> m () instance Monoid b => MonadGetDefs (GetDefsM b) where doDef d = tell . ($ d) =<< asks embDef doMeta x = getDefs . ($ x) =<< asks lookupMeta -- | Getting the used definitions. -- -- Note: in contrast to 'Agda.Syntax.Internal.Generic.foldTerm' -- @getDefs@ also collects from sorts in terms. -- Thus, this is not an instance of @foldTerm@. class GetDefs a where getDefs :: MonadGetDefs m => a -> m () default getDefs :: (MonadGetDefs m, Foldable f, GetDefs b, f b ~ a) => a -> m () getDefs = Fold.mapM_ getDefs instance GetDefs Clause where getDefs = getDefs . clauseBody instance GetDefs Term where getDefs v = case v of Def d vs -> doDef d >> getDefs vs Con _ _ vs -> getDefs vs Lit l -> return () Var i vs -> getDefs vs Lam _ v -> getDefs v Pi a b -> getDefs a >> getDefs b Sort s -> getDefs s Level l -> getDefs l MetaV x vs -> getDefs x >> getDefs vs DontCare v -> getDefs v Dummy{} -> return () instance GetDefs MetaId where getDefs x = doMeta x instance GetDefs Type where getDefs (El s t) = getDefs s >> getDefs t instance GetDefs Sort where getDefs s = case s of Type l -> getDefs l Prop l -> getDefs l Inf -> return () SizeUniv -> return () PiSort s s' -> getDefs s >> getDefs s' UnivSort s -> getDefs s MetaS x es -> getDefs x >> getDefs es DefS d es -> doDef d >> getDefs es DummyS{} -> return () instance GetDefs Level where getDefs (Max ls) = getDefs ls instance GetDefs PlusLevel where getDefs ClosedLevel{} = return () getDefs (Plus _ l) = getDefs l instance GetDefs LevelAtom where getDefs a = case a of MetaLevel x vs -> getDefs x >> getDefs vs BlockedLevel _ v -> getDefs v NeutralLevel _ v -> getDefs v UnreducedLevel v -> getDefs v -- collection instances instance GetDefs a => GetDefs (Maybe a) where instance GetDefs a => GetDefs [a] where instance GetDefs a => GetDefs (Elim' a) where instance GetDefs a => GetDefs (Arg a) where instance GetDefs a => GetDefs (Dom a) where instance GetDefs a => GetDefs (Abs a) where instance (GetDefs a, GetDefs b) => GetDefs (a,b) where getDefs (a,b) = getDefs a >> getDefs b Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/0000755000000000000000000000000013466402171016322 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/Pretty.hs0000644000000000000000000000157213466402171020152 0ustar0000000000000000 module Agda.Syntax.Abstract.Pretty where import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Fixity import Agda.Syntax.Translation.AbstractToConcrete import Agda.TypeChecking.Monad import Agda.Utils.Pretty showA :: (Show c, ToConcrete a c) => a -> TCM String showA x = show <$> abstractToConcrete_ x prettyA :: (Pretty c, ToConcrete a c) => a -> TCM Doc prettyA x = pretty <$> abstractToConcrete_ x prettyAs :: (Pretty c, ToConcrete a [c]) => a -> TCM Doc prettyAs x = fsep . map pretty <$> abstractToConcrete_ x -- | Variant of 'showA' which does not insert outermost parentheses. showATop :: (Show c, ToConcrete a c) => a -> TCM String showATop x = show <$> abstractToConcreteCtx TopCtx x -- | Variant of 'prettyA' which does not insert outermost parentheses. prettyATop :: (Pretty c, ToConcrete a c) => a -> TCM Doc prettyATop x = pretty <$> abstractToConcreteCtx TopCtx x Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/Views.hs0000644000000000000000000003652013466402171017761 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoMonoLocalBinds #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Agda.Syntax.Abstract.Views where import Control.Applicative ( Const(Const), getConst ) import Control.Arrow (first) import Control.Monad.Identity import Data.Foldable (foldMap) import Data.Monoid import Data.Traversable import Data.Void import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Abstract as A import Agda.Syntax.Concrete (FieldAssignment', exprFieldA) import Agda.Syntax.Info import Agda.Syntax.Scope.Base (emptyScopeInfo) import Agda.Utils.Either import Agda.Utils.Lens data AppView' arg = Application Expr [NamedArg arg] deriving (Functor) type AppView = AppView' Expr -- | Gather applications to expose head and spine. -- -- Note: everything is an application, possibly of itself to 0 arguments appView :: Expr -> AppView appView = fmap snd . appView' appView' :: Expr -> AppView' (AppInfo, Expr) appView' e = case e of App i e1 e2 | Dot _ e2' <- unScope $ namedArg e2 , Just f <- maybeProjTurnPostfix e2' , getHiding e2 == NotHidden -- Jesper, 2018-12-13: postfix projections shouldn't be hidden -> Application f [defaultNamedArg (i, e1)] App i e1 arg | Application hd es <- appView' e1 -> Application hd $ es ++ [(fmap . fmap) (i,) arg] ScopedExpr _ e -> appView' e _ -> Application e [] maybeProjTurnPostfix :: Expr -> Maybe Expr maybeProjTurnPostfix e = case e of ScopedExpr i e' -> ScopedExpr i <$> maybeProjTurnPostfix e' Proj _ x -> return $ Proj ProjPostfix x _ -> Nothing unAppView :: AppView -> Expr unAppView (Application h es) = foldl (App defaultAppInfo_) h es -- | Collects plain lambdas. data LamView = LamView [LamBinding] Expr lamView :: Expr -> LamView lamView (Lam i b e) = cons b $ lamView e where cons b (LamView bs e) = LamView (b : bs) e lamView (ScopedExpr _ e) = lamView e lamView e = LamView [] e -- | Gather top-level 'AsP'atterns to expose underlying pattern. asView :: A.Pattern -> ([Name], A.Pattern) asView (A.AsP _ x p) = first (unBind x :) $ asView p asView p = ([], p) -- | Check whether we are dealing with a universe. isSet :: Expr -> Bool isSet (ScopedExpr _ e) = isSet e isSet (App _ e _) = isSet e isSet (Set{}) = True isSet _ = False -- | Remove top 'ScopedExpr' wrappers. unScope :: Expr -> Expr unScope (ScopedExpr scope e) = unScope e unScope (QuestionMark i ii) = QuestionMark (i {metaScope = emptyScopeInfo}) ii unScope (Underscore i) = Underscore (i {metaScope = emptyScopeInfo}) unScope e = e -- | Remove 'ScopedExpr' wrappers everywhere. -- -- NB: Unless the implementation of 'ExprLike' for clauses -- has been finished, this does not work for clauses yet. deepUnscope :: ExprLike a => a -> a deepUnscope = mapExpr unScope deepUnscopeDecls :: [A.Declaration] -> [A.Declaration] deepUnscopeDecls = concatMap deepUnscopeDecl deepUnscopeDecl :: A.Declaration -> [A.Declaration] deepUnscopeDecl (A.ScopedDecl _ ds) = deepUnscopeDecls ds deepUnscopeDecl (A.Mutual i ds) = [A.Mutual i (deepUnscopeDecls ds)] deepUnscopeDecl (A.Section i m tel ds) = [A.Section i m (deepUnscope tel) (deepUnscopeDecls ds)] deepUnscopeDecl (A.RecDef i x uc ind eta c bs e ds) = [A.RecDef i x uc ind eta c (deepUnscope bs) (deepUnscope e) (deepUnscopeDecls ds)] deepUnscopeDecl d = [deepUnscope d] -- * Traversal -- | Apply an expression rewriting to every subexpression, inside-out. -- See "Agda.Syntax.Internal.Generic". class ExprLike a where -- | The first expression is pre-traversal, the second one post-traversal. recurseExpr :: (Applicative m) => (Expr -> m Expr -> m Expr) -> a -> m a default recurseExpr :: (Traversable f, ExprLike a', a ~ f a', Applicative m) => (Expr -> m Expr -> m Expr) -> a -> m a recurseExpr = traverse . recurseExpr foldExpr :: Monoid m => (Expr -> m) -> a -> m foldExpr f = getConst . recurseExpr (\ pre post -> Const (f pre) <* post) traverseExpr :: (Applicative m, Monad m) => (Expr -> m Expr) -> a -> m a traverseExpr f = recurseExpr (\ pre post -> f =<< post) mapExpr :: (Expr -> Expr) -> (a -> a) mapExpr f = runIdentity . traverseExpr (Identity . f) instance ExprLike Expr where recurseExpr f e0 = f e0 $ do let recurse e = recurseExpr f e case e0 of Var{} -> pure e0 Def{} -> pure e0 Proj{} -> pure e0 Con{} -> pure e0 Lit{} -> pure e0 QuestionMark{} -> pure e0 Underscore{} -> pure e0 Dot ei e -> Dot ei <$> recurse e App ei e arg -> App ei <$> recurse e <*> recurse arg WithApp ei e es -> WithApp ei <$> recurse e <*> recurse es Lam ei b e -> Lam ei <$> recurse b <*> recurse e AbsurdLam{} -> pure e0 ExtendedLam ei di x cls -> ExtendedLam ei di x <$> recurse cls Pi ei tel e -> Pi ei <$> recurse tel <*> recurse e Generalized s e -> Generalized s <$> recurse e Fun ei arg e -> Fun ei <$> recurse arg <*> recurse e Set{} -> pure e0 Prop{} -> pure e0 Let ei bs e -> Let ei <$> recurse bs <*> recurse e ETel tel -> ETel <$> recurse tel Rec ei bs -> Rec ei <$> recurse bs RecUpdate ei e bs -> RecUpdate ei <$> recurse e <*> recurse bs ScopedExpr sc e -> ScopedExpr sc <$> recurse e QuoteGoal ei n e -> QuoteGoal ei n <$> recurse e QuoteContext ei -> pure e0 Quote{} -> pure e0 QuoteTerm{} -> pure e0 Unquote{} -> pure e0 DontCare e -> DontCare <$> recurse e PatternSyn{} -> pure e0 Tactic ei e xs ys -> Tactic ei <$> recurse e <*> recurse xs <*> recurse ys Macro{} -> pure e0 foldExpr f e = case e of Var{} -> m Def{} -> m Proj{} -> m Con{} -> m PatternSyn{} -> m Macro{} -> m Lit{} -> m QuestionMark{} -> m Underscore{} -> m Dot _ e -> m `mappend` fold e App _ e e' -> m `mappend` fold e `mappend` fold e' WithApp _ e es -> m `mappend` fold e `mappend` fold es Lam _ b e -> m `mappend` fold b `mappend` fold e AbsurdLam{} -> m ExtendedLam _ _ _ cs -> m `mappend` fold cs Pi _ tel e -> m `mappend` fold tel `mappend` fold e Generalized _ e -> m `mappend` fold e Fun _ e e' -> m `mappend` fold e `mappend` fold e' Set{} -> m Prop{} -> m Let _ bs e -> m `mappend` fold bs `mappend` fold e ETel tel -> m `mappend` fold tel Rec _ as -> m `mappend` fold as RecUpdate _ e as -> m `mappend` fold e `mappend` fold as ScopedExpr _ e -> m `mappend` fold e QuoteGoal _ _ e -> m `mappend` fold e QuoteContext _ -> m Quote{} -> m QuoteTerm{} -> m Unquote{} -> m Tactic _ e xs ys -> m `mappend` fold e `mappend` fold xs `mappend` fold ys DontCare e -> m `mappend` fold e where m = f e fold = foldExpr f traverseExpr f e = do let trav e = traverseExpr f e case e of Var{} -> f e Def{} -> f e Proj{} -> f e Con{} -> f e Lit{} -> f e QuestionMark{} -> f e Underscore{} -> f e Dot ei e -> f =<< Dot ei <$> trav e App ei e arg -> f =<< App ei <$> trav e <*> trav arg WithApp ei e es -> f =<< WithApp ei <$> trav e <*> trav es Lam ei b e -> f =<< Lam ei <$> trav b <*> trav e AbsurdLam{} -> f e ExtendedLam ei di x cls -> f =<< ExtendedLam ei di x <$> trav cls Pi ei tel e -> f =<< Pi ei <$> trav tel <*> trav e Generalized s e -> f =<< Generalized s <$> trav e Fun ei arg e -> f =<< Fun ei <$> trav arg <*> trav e Set{} -> f e Prop{} -> f e Let ei bs e -> f =<< Let ei <$> trav bs <*> trav e ETel tel -> f =<< ETel <$> trav tel Rec ei bs -> f =<< Rec ei <$> trav bs RecUpdate ei e bs -> f =<< RecUpdate ei <$> trav e <*> trav bs ScopedExpr sc e -> f =<< ScopedExpr sc <$> trav e QuoteGoal ei n e -> f =<< QuoteGoal ei n <$> trav e QuoteContext{} -> f e Quote{} -> f e QuoteTerm{} -> f e Unquote{} -> f e Tactic ei e xs ys -> f =<< Tactic ei <$> trav e <*> trav xs <*> trav ys DontCare e -> f =<< DontCare <$> trav e PatternSyn{} -> f e Macro{} -> f e instance ExprLike a => ExprLike (Arg a) where instance ExprLike a => ExprLike (Named x a) where instance ExprLike a => ExprLike [a] where instance (ExprLike a, ExprLike b) => ExprLike (a, b) where recurseExpr f (x, y) = (,) <$> recurseExpr f x <*> recurseExpr f y instance ExprLike Void where recurseExpr f = absurd instance ExprLike a => ExprLike (FieldAssignment' a) where recurseExpr = exprFieldA . recurseExpr instance (ExprLike a, ExprLike b) => ExprLike (Either a b) where recurseExpr f = traverseEither (recurseExpr f) (recurseExpr f) instance ExprLike ModuleName where recurseExpr f = pure instance ExprLike QName where recurseExpr _ = pure instance ExprLike LamBinding where recurseExpr f e = case e of DomainFree{} -> pure e DomainFull bs -> DomainFull <$> recurseExpr f bs foldExpr f e = case e of DomainFree{} -> mempty DomainFull bs -> foldExpr f bs traverseExpr f e = case e of DomainFree{} -> pure e DomainFull bs -> DomainFull <$> traverseExpr f bs instance ExprLike GeneralizeTelescope where recurseExpr f (GeneralizeTel s tel) = GeneralizeTel s <$> recurseExpr f tel foldExpr f (GeneralizeTel s tel) = foldExpr f tel traverseExpr f (GeneralizeTel s tel) = GeneralizeTel s <$> traverseExpr f tel instance ExprLike DataDefParams where recurseExpr f (DataDefParams s tel) = DataDefParams s <$> recurseExpr f tel foldExpr f (DataDefParams s tel) = foldExpr f tel traverseExpr f (DataDefParams s tel) = DataDefParams s <$> traverseExpr f tel instance ExprLike TypedBinding where recurseExpr f e = case e of TBind r xs e -> TBind r xs <$> recurseExpr f e TLet r ds -> TLet r <$> recurseExpr f ds foldExpr f e = case e of TBind _ _ e -> foldExpr f e TLet _ ds -> foldExpr f ds traverseExpr f e = case e of TBind r xs e -> TBind r xs <$> traverseExpr f e TLet r ds -> TLet r <$> traverseExpr f ds instance ExprLike LetBinding where recurseExpr f e = do let recurse e = recurseExpr f e case e of LetBind li ai x e e' -> LetBind li ai x <$> recurse e <*> recurse e' LetPatBind li p e -> LetPatBind li <$> recurse p <*> recurse e LetApply{} -> pure e LetOpen{} -> pure e LetDeclaredVariable _ -> pure e foldExpr f e = case e of LetBind _ _ _ e e' -> fold e `mappend` fold e' LetPatBind _ p e -> fold p `mappend` fold e LetApply{} -> mempty LetOpen{} -> mempty LetDeclaredVariable _ -> mempty where fold e = foldExpr f e traverseExpr f e = do let trav e = traverseExpr f e case e of LetBind li ai x e e' -> LetBind li ai x <$> trav e <*> trav e' LetPatBind li p e -> LetPatBind li <$> trav p <*> trav e LetApply{} -> pure e LetOpen{} -> pure e LetDeclaredVariable _ -> pure e instance ExprLike a => ExprLike (Pattern' a) where instance ExprLike a => ExprLike (Clause' a) where recurseExpr f (Clause lhs spats rhs ds ca) = Clause <$> rec lhs <*> pure spats <*> rec rhs <*> rec ds <*> pure ca where rec = recurseExpr f instance ExprLike RHS where recurseExpr f rhs = case rhs of RHS e c -> RHS <$> rec e <*> pure c AbsurdRHS{} -> pure rhs WithRHS x es cs -> WithRHS x <$> rec es <*> rec cs RewriteRHS xes spats rhs ds -> RewriteRHS <$> rec xes <*> pure spats <*> rec rhs <*> rec ds where rec e = recurseExpr f e instance ExprLike WhereDeclarations where recurseExpr f (WhereDecls a b) = WhereDecls a <$> recurseExpr f b instance ExprLike ModuleApplication where recurseExpr f a = case a of SectionApp tel m es -> SectionApp <$> rec tel <*> rec m <*> rec es RecordModuleInstance{} -> pure a where rec e = recurseExpr f e instance ExprLike Pragma where recurseExpr f p = case p of BuiltinPragma s x -> pure p OptionsPragma{} -> pure p BuiltinNoDefPragma{} -> pure p RewritePragma{} -> pure p CompilePragma{} -> pure p StaticPragma{} -> pure p InjectivePragma{} -> pure p InlinePragma{} -> pure p EtaPragma{} -> pure p DisplayPragma f xs e -> DisplayPragma f <$> rec xs <*> rec e where rec e = recurseExpr f e instance ExprLike LHS where recurseExpr f (LHS i p) = LHS i <$> recurseExpr f p instance ExprLike a => ExprLike (LHSCore' a) where instance ExprLike SpineLHS where recurseExpr f (SpineLHS i x ps) = SpineLHS i x <$> recurseExpr f ps instance ExprLike Declaration where recurseExpr f d = case d of Axiom a d i mp x e -> Axiom a d i mp x <$> rec e Generalize s i j x e -> Generalize s i j x <$> rec e Field i x e -> Field i x <$> rec e Primitive i x e -> Primitive i x <$> rec e Mutual i ds -> Mutual i <$> rec ds Section i m tel ds -> Section i m <$> rec tel <*> rec ds Apply i m a ci d -> (\ a -> Apply i m a ci d) <$> rec a Import{} -> pure d Pragma i p -> Pragma i <$> rec p Open{} -> pure d FunDef i f d cs -> FunDef i f d <$> rec cs DataSig i d tel e -> DataSig i d <$> rec tel <*> rec e DataDef i d uc bs cs -> DataDef i d uc <$> rec bs <*> rec cs RecSig i r tel e -> RecSig i r <$> rec tel <*> rec e RecDef i r uc n co c bs e ds -> RecDef i r uc n co c <$> rec bs <*> rec e <*> rec ds PatternSynDef f xs p -> PatternSynDef f xs <$> rec p UnquoteDecl i is xs e -> UnquoteDecl i is xs <$> rec e UnquoteDef i xs e -> UnquoteDef i xs <$> rec e ScopedDecl s ds -> ScopedDecl s <$> rec ds where rec e = recurseExpr f e Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/Pattern.hs0000644000000000000000000003677713466402171020317 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- | Auxiliary functions to handle patterns in the abstract syntax. -- -- Generic and specific traversals. module Agda.Syntax.Abstract.Pattern where import Prelude hiding (null) import Control.Arrow ((***), second) import Control.Monad ((>=>)) import Control.Monad.Identity import Control.Applicative (Applicative, liftA2) import Data.Foldable (Foldable, foldMap) import Data.Functor import Data.Traversable (Traversable, traverse) import Data.Maybe import Data.Monoid import Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Concrete (FieldAssignment', exprFieldA) import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Pattern (IsWithP(..)) import Agda.Syntax.Info import Agda.Syntax.Position import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Null #include "undefined.h" import Agda.Utils.Impossible -- * Generic traversals ------------------------------------------------------------------------ type NAP = NamedArg Pattern class MapNamedArgPattern a where mapNamedArgPattern :: (NAP -> NAP) -> a -> a default mapNamedArgPattern :: (Functor f, MapNamedArgPattern a', a ~ f a') => (NAP -> NAP) -> a -> a mapNamedArgPattern = fmap . mapNamedArgPattern instance MapNamedArgPattern NAP where mapNamedArgPattern f p = case namedArg p of -- no sub patterns: VarP{} -> f p WildP{} -> f p DotP{} -> f p EqualP{} -> f p LitP{} -> f p AbsurdP{} -> f p ProjP{} -> f p -- list of NamedArg subpatterns: ConP i qs ps -> f $ setNamedArg p $ ConP i qs $ mapNamedArgPattern f ps DefP i qs ps -> f $ setNamedArg p $ DefP i qs $ mapNamedArgPattern f ps PatternSynP i x ps -> f $ setNamedArg p $ PatternSynP i x $ mapNamedArgPattern f ps -- Pattern subpattern(s): -- RecP: we copy the NamedArg info to the subpatterns but discard it after recursion RecP i fs -> f $ setNamedArg p $ RecP i $ map (fmap namedArg) $ mapNamedArgPattern f $ map (fmap (setNamedArg p)) fs -- AsP: we hand the NamedArg info to the subpattern AsP i x p0 -> f $ updateNamedArg (AsP i x) $ mapNamedArgPattern f $ setNamedArg p p0 -- WithP: like AsP WithP i p0 -> f $ updateNamedArg (WithP i) $ mapNamedArgPattern f $ setNamedArg p p0 instance MapNamedArgPattern a => MapNamedArgPattern [a] where instance MapNamedArgPattern a => MapNamedArgPattern (FieldAssignment' a) where instance MapNamedArgPattern a => MapNamedArgPattern (Maybe a) where instance (MapNamedArgPattern a, MapNamedArgPattern b) => MapNamedArgPattern (a,b) where mapNamedArgPattern f (a, b) = (mapNamedArgPattern f a, mapNamedArgPattern f b) -- | Generic pattern traversal. class APatternLike a p | p -> a where -- | Fold pattern. foldrAPattern :: Monoid m => (Pattern' a -> m -> m) -- ^ Combine a pattern and the value computed from its subpatterns. -> p -> m default foldrAPattern :: (Monoid m, Foldable f, APatternLike a b, f b ~ p) => (Pattern' a -> m -> m) -> p -> m foldrAPattern = foldMap . foldrAPattern -- | Traverse pattern. traverseAPatternM :: Monad m => (Pattern' a -> m (Pattern' a)) -- ^ @pre@: Modification before recursion. -> (Pattern' a -> m (Pattern' a)) -- ^ @post@: Modification after recursion. -> p -> m p default traverseAPatternM :: (Traversable f, APatternLike a q, f q ~ p, Monad m) => (Pattern' a -> m (Pattern' a)) -> (Pattern' a -> m (Pattern' a)) -> p -> m p traverseAPatternM pre post = traverse $ traverseAPatternM pre post -- | Compute from each subpattern a value and collect them all in a monoid. foldAPattern :: (APatternLike a p, Monoid m) => (Pattern' a -> m) -> p -> m foldAPattern f = foldrAPattern $ \ p m -> f p `mappend` m -- | Traverse pattern(s) with a modification before the recursive descent. preTraverseAPatternM :: (APatternLike a b, Monad m ) => (Pattern' a -> m (Pattern' a)) -- ^ @pre@: Modification before recursion. -> b -> m b preTraverseAPatternM pre p = traverseAPatternM pre return p -- | Traverse pattern(s) with a modification after the recursive descent. postTraverseAPatternM :: (APatternLike a b, Monad m) => (Pattern' a -> m (Pattern' a)) -- ^ @post@: Modification after recursion. -> b -> m b postTraverseAPatternM post p = traverseAPatternM return post p -- | Map pattern(s) with a modification after the recursive descent. mapAPattern :: APatternLike a p => (Pattern' a -> Pattern' a) -> p -> p mapAPattern f = runIdentity . postTraverseAPatternM (Identity . f) -- Interesting instance: instance APatternLike a (Pattern' a) where foldrAPattern f p = f p $ case p of AsP _ _ p -> foldrAPattern f p ConP _ _ ps -> foldrAPattern f ps DefP _ _ ps -> foldrAPattern f ps RecP _ ps -> foldrAPattern f ps PatternSynP _ _ ps -> foldrAPattern f ps WithP _ p -> foldrAPattern f p VarP _ -> mempty ProjP _ _ _ -> mempty WildP _ -> mempty DotP _ _ -> mempty AbsurdP _ -> mempty LitP _ -> mempty EqualP _ _ -> mempty traverseAPatternM pre post = pre >=> recurse >=> post where recurse p = case p of -- Non-recursive cases: A.VarP{} -> return p A.WildP{} -> return p A.DotP{} -> return p A.LitP{} -> return p A.AbsurdP{} -> return p A.ProjP{} -> return p A.EqualP{} -> return p -- Recursive cases: A.ConP i ds ps -> A.ConP i ds <$> traverseAPatternM pre post ps A.DefP i q ps -> A.DefP i q <$> traverseAPatternM pre post ps A.AsP i x p -> A.AsP i x <$> traverseAPatternM pre post p A.RecP i ps -> A.RecP i <$> traverseAPatternM pre post ps A.PatternSynP i x ps -> A.PatternSynP i x <$> traverseAPatternM pre post ps A.WithP i p -> A.WithP i <$> traverseAPatternM pre post p -- The following instances need UndecidableInstances -- for the FunctionalDependency (since injectivity is not taken into account). instance APatternLike a b => APatternLike a (Arg b) where instance APatternLike a b => APatternLike a (Named n b) where instance APatternLike a b => APatternLike a [b] where instance APatternLike a b => APatternLike a (Maybe b) where instance APatternLike a b => APatternLike a (FieldAssignment' b) where instance (APatternLike a b, APatternLike a c) => APatternLike a (b,c) where foldrAPattern f (p, p') = foldrAPattern f p `mappend` foldrAPattern f p' traverseAPatternM pre post (p, p') = liftA2 (,) (traverseAPatternM pre post p) (traverseAPatternM pre post p') -- * Specific folds ------------------------------------------------------------------------ -- | Collect pattern variables in left-to-right textual order. patternVars :: forall a p. APatternLike a p => p -> [A.Name] patternVars p = foldAPattern f p `appEndo` [] where -- We use difference lists @[A.Name] -> [A.Name]@ to avoid reconcatenation. f :: Pattern' a -> Endo [A.Name] f = \case A.VarP x -> Endo (unBind x :) A.AsP _ x _ -> Endo (unBind x :) A.LitP {} -> mempty A.ConP {} -> mempty A.RecP {} -> mempty A.DefP {} -> mempty A.ProjP {} -> mempty A.WildP {} -> mempty A.DotP {} -> mempty A.AbsurdP {} -> mempty A.EqualP {} -> mempty A.PatternSynP {} -> mempty A.WithP _ _ -> mempty -- | Check if a pattern contains a specific (sub)pattern. containsAPattern :: APatternLike a p => (Pattern' a -> Bool) -> p -> Bool containsAPattern f = getAny . foldAPattern (Any . f) -- | Check if a pattern contains an absurd pattern. -- For instance, @suc ()@, does so. -- -- Precondition: contains no pattern synonyms. containsAbsurdPattern :: APatternLike a p => p -> Bool containsAbsurdPattern = containsAPattern $ \case A.PatternSynP{} -> __IMPOSSIBLE__ A.AbsurdP{} -> True _ -> False -- | Check if a pattern contains an @-pattern. -- -- Precondition: contains no pattern synonyms. containsAsPattern :: APatternLike a p => p -> Bool containsAsPattern = containsAPattern $ \case A.PatternSynP{} -> __IMPOSSIBLE__ A.AsP{} -> True _ -> False -- | Check if any user-written pattern variables occur more than once, -- and throw the given error if they do. checkPatternLinearity :: (Monad m, APatternLike a p) => p -> ([C.Name] -> m ()) -> m () checkPatternLinearity ps err = unlessNull (duplicates $ map nameConcrete $ patternVars ps) $ \ys -> err ys -- * Specific traversals ------------------------------------------------------------------------ -- | Pattern substitution. -- -- For the embedded expression, the given pattern substitution is turned into -- an expression substitution. substPattern :: [(Name, Pattern)] -> Pattern -> Pattern substPattern s = substPattern' (substExpr $ map (second patternToExpr) s) s -- | Pattern substitution, parametrized by substitution function for embedded expressions. substPattern' :: (e -> e) -- ^ Substitution function for expressions. -> [(Name, Pattern' e)] -- ^ (Parallel) substitution. -> Pattern' e -- ^ Input pattern. -> Pattern' e substPattern' subE s = mapAPattern $ \ p -> case p of VarP x -> fromMaybe p $ lookup (A.unBind x) s DotP i e -> DotP i $ subE e EqualP i es -> EqualP i $ map (subE *** subE) es -- No action on the other patterns (besides the recursion): ConP _ _ _ -> p RecP _ _ -> p ProjP _ _ _ -> p WildP _ -> p AbsurdP _ -> p LitP _ -> p DefP _ _ _ -> p AsP _ _ _ -> p -- Note: cannot substitute into as-variable PatternSynP _ _ _ -> p WithP _ _ -> p -- * Other pattern utilities ------------------------------------------------------------------------ -- | Check for with-pattern. instance IsWithP (Pattern' e) where isWithP = \case WithP _ p -> Just p _ -> Nothing -- | Split patterns into (patterns, trailing with-patterns). splitOffTrailingWithPatterns :: A.Patterns -> (A.Patterns, A.Patterns) splitOffTrailingWithPatterns = spanEnd (isJust . isWithP) -- | Get the tail of with-patterns of a pattern spine. trailingWithPatterns :: Patterns -> Patterns trailingWithPatterns = snd . splitOffTrailingWithPatterns -- | The next patterns are ... -- -- (This view discards 'PatInfo'.) data LHSPatternView e = LHSAppP (NAPs e) -- ^ Application patterns (non-empty list). | LHSProjP ProjOrigin AmbiguousQName (NamedArg (Pattern' e)) -- ^ A projection pattern. Is also stored unmodified here. | LHSWithP [Pattern' e] -- ^ With patterns (non-empty list). -- These patterns are not prefixed with 'WithP'. deriving (Show) -- | Construct the 'LHSPatternView' of the given list (if not empty). -- -- Return the view and the remaining patterns. lhsPatternView :: IsProjP e => NAPs e -> Maybe (LHSPatternView e, NAPs e) lhsPatternView [] = Nothing lhsPatternView (p0 : ps) = case namedArg p0 of ProjP _i o d -> Just (LHSProjP o d p0, ps) -- If the next pattern is a with-pattern, collect more with-patterns WithP _i p -> Just (LHSWithP (p : map namedArg ps1), ps2) where (ps1, ps2) = spanJust isWithP ps -- If the next pattern is an application pattern, collect more of these _ -> Just (LHSAppP (p0 : ps1), ps2) where (ps1, ps2) = span (\ p -> isNothing (isProjP p) && isNothing (isWithP p)) ps -- * Left-hand-side manipulation ------------------------------------------------------------------------ -- | Convert a focused lhs to spine view and back. class LHSToSpine a b where lhsToSpine :: a -> b spineToLhs :: b -> a -- | Clause instance. instance LHSToSpine Clause SpineClause where lhsToSpine = fmap lhsToSpine spineToLhs = fmap spineToLhs -- | List instance (for clauses). instance LHSToSpine a b => LHSToSpine [a] [b] where lhsToSpine = map lhsToSpine spineToLhs = map spineToLhs -- | LHS instance. instance LHSToSpine LHS SpineLHS where lhsToSpine (LHS i core) = SpineLHS i f ps where QNamed f ps = lhsCoreToSpine core spineToLhs (SpineLHS i f ps) = LHS i (spineToLhsCore $ QNamed f ps) lhsCoreToSpine :: LHSCore' e -> A.QNamed [NamedArg (Pattern' e)] lhsCoreToSpine = \case LHSHead f ps -> QNamed f ps LHSProj d h ps -> lhsCoreToSpine (namedArg h) <&> (++ (p : ps)) where p = updateNamedArg (const $ ProjP empty ProjPrefix d) h LHSWith h wps ps -> lhsCoreToSpine h <&> (++ map (defaultNamedArg . mkWithP) wps ++ ps) where mkWithP p = WithP (PatRange $ getRange p) p spineToLhsCore :: IsProjP e => QNamed [NamedArg (Pattern' e)] -> LHSCore' e spineToLhsCore (QNamed f ps) = lhsCoreAddSpine (LHSHead f []) ps -- | Add applicative patterns (non-projection / non-with patterns) to the right. lhsCoreApp :: LHSCore' e -> [NamedArg (Pattern' e)] -> LHSCore' e lhsCoreApp core ps = core { lhsPats = lhsPats core ++ ps } -- | Add with-patterns to the right. lhsCoreWith :: LHSCore' e -> [Pattern' e] -> LHSCore' e lhsCoreWith (LHSWith core wps []) wps' = LHSWith core (wps ++ wps') [] lhsCoreWith core wps' = LHSWith core wps' [] lhsCoreAddChunk :: IsProjP e => LHSCore' e -> LHSPatternView e -> LHSCore' e lhsCoreAddChunk core = \case LHSAppP ps -> lhsCoreApp core ps LHSWithP wps -> lhsCoreWith core wps LHSProjP ProjPrefix d np -> LHSProj d (setNamedArg np core) [] -- Prefix projection pattern. LHSProjP _ _ np -> lhsCoreApp core [np] -- Postfix projection pattern. -- | Add projection, with, and applicative patterns to the right. lhsCoreAddSpine :: IsProjP e => LHSCore' e -> [NamedArg (Pattern' e)] -> LHSCore' e lhsCoreAddSpine core ps = -- Recurse on lhsPatternView until no patterns left. case lhsPatternView ps of Nothing -> core Just (v, ps') -> lhsCoreAddChunk core chunk `lhsCoreAddSpine` ps' where -- Andreas, 2016-06-13 -- If the projection was written prefix by the user -- or it is a fully applied operator -- we turn it to prefix projection form. chunk = case v of LHSProjP ProjPrefix _ _ -> v LHSProjP _ d np | let nh = C.numHoles d, nh > 0, nh <= 1 + length ps' -> LHSProjP ProjPrefix d np _ -> v -- | Used for checking pattern linearity. lhsCoreAllPatterns :: LHSCore' e -> [Pattern' e] lhsCoreAllPatterns = map namedArg . qnamed . lhsCoreToSpine -- | Used in ''Agda.Syntax.Translation.AbstractToConcrete''. -- Returns a 'DefP'. lhsCoreToPattern :: LHSCore -> Pattern lhsCoreToPattern lc = case lc of LHSHead f aps -> DefP noInfo (unambiguous f) aps LHSProj d lhscore aps -> DefP noInfo d $ fmap (fmap lhsCoreToPattern) lhscore : aps LHSWith h wps aps -> case lhsCoreToPattern h of DefP r q ps -> DefP r q $ ps ++ map (\ p -> defaultNamedArg $ WithP (PatRange $ getRange p) p) wps ++ aps _ -> __IMPOSSIBLE__ where noInfo = empty -- TODO, preserve range! mapLHSHead :: (QName -> [NamedArg Pattern] -> LHSCore) -> LHSCore -> LHSCore mapLHSHead f = \case LHSHead x ps -> f x ps LHSProj d h ps -> LHSProj d (fmap (fmap (mapLHSHead f)) h) ps LHSWith h wps ps -> LHSWith (mapLHSHead f h) wps ps Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/Copatterns.hs0000644000000000000000000003412113466402171021001 0ustar0000000000000000{-# LANGUAGE CPP #-} module Agda.Syntax.Abstract.Copatterns (translateCopatternClauses) where import Prelude hiding (mapM) import Control.Monad hiding (mapM) import Control.Monad.Writer hiding (mapM) import Data.Function import Data.List import Data.Traversable as T import Agda.Syntax.Abstract import Agda.Syntax.Common import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Concrete (FieldAssignment'(..)) import Agda.Syntax.Info import Agda.Syntax.Position import Agda.Syntax.Scope.Monad import Agda.TypeChecking.Monad.Base (TypeError(..), typeError) import Agda.Utils.Either import Agda.Utils.Maybe import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible {- Andreas 2012-04-07, 2012-05-08 Translating copatterns into record expressions This is a preliminary solution until we have proper copattern type checking and evaluation. Example 1: record Stream (A : Set) : Set where field head : A tail : Stream A open Stream alternate : Stream Nat ( head alternate ) = zero (head (tail alternate)) = suc zero (tail (tail alternate)) = alternate with pathes Path [head] zero Path [tail,head] (suc zero) Path [tail,tail] alternate is translated into alternate = record { head = zero ; tail = record { head = suc zero ; tail = alternate } } Example 2: record State (S A : Set) : Set where constructor state field runState : S → A × S open State record Monad (M : Set → Set) : Set1 where constructor monad field return : {A : Set} → A → M A _>>=_ : {A B : Set} → M A → (A → M B) → M B open Monad stateMonad : {S : Set} → Monad (State S) runState (return stateMonad a ) s = a , s runState (_>>=_ stateMonad m k) s₀ = let as₁ = runState m s₀ in runState (k (proj₁ as₁)) (proj₂ as₁) with pathes Path [(return,[a] ), (runstate,[s ])] (a,s) Path [(_>>=_, [m,k]), (runstate,[s₀])] (let...) is translated to stateMonad = record { return = λ a → record { runState = λ s → a , s } ; _>>=_ = λ m k → record { runState = λ s₀ → let as₁ = runState m s₀ in runState (k (proj₁ as₁)) (proj₂ as₁) } Example 3: swap3 : {A B C X : Set} → (X → A) × ((X → B) × C) → (X → C) × (X → (B × A)) fst (swap3 t) x = snd (snd t) fst (snd (swap3 t) y) = fst (snd t) y snd (snd (swap3 t) z) = fst t z with pathes Path [(fst,[x])] (snd (snd t)) Path [(snd,[y]), (fst,[])] (fst (snd t) y) Path [(snd,[z]), (snd,[])] (fst t z) ist translated to swap3 t = record { fst = λ x → snd (snd t) ; snd = λ y → record { fst = fst (snd t) y ; snd = (fst t z){z := y} } } How to translate: - group clauses into those with same LHSCore and same withpatterns -} translateCopatternClauses :: [Clause] -> ScopeM (Delayed, [Clause]) translateCopatternClauses cs = if all noCopats cs then return (NotDelayed, cs) else (Delayed,) <$> do pcs :: [ProjPath Clause] <- mapM clauseToPath cs let cps :: [(Clause, [ProjPath Expr])] cps = groupClauses pcs ces <- mapM (mapSndM pathToRecord) $ map (mapSnd $ sortBy (compare `on` thePath)) cps return $ map (\ (c, e) -> c { clauseRHS = RHS e Nothing }) ces -- TODO: preserve C.Expr where noCopats Clause{ clauseLHS = LHS _ LHSHead{} } = True noCopats _ = False -- | A sequence of decisions @b@ leading to a head @a@. data Path a b = Path { thePath :: [a] -- ^ the list of choices , theContent :: b } deriving (Functor) -- NB: this means @Path a@ is a functor for any @a@ mapContent :: (b -> c) -> Path a b -> Path a c mapContent f (Path p c) = Path p (f c) data ProjEntry = ProjEntry { projPE :: AmbiguousQName , patsPE :: [NamedArg Name] -- ^ currently we only support variable patterns } deriving (Eq, Ord) type ProjPath = Path ProjEntry instance HasRange ProjEntry where getRange (ProjEntry p ps) = getRange (p,ps) -- | This is a n^2 grouping algorithm which uses only alpha-equality groupClauses :: [ProjPath Clause] -> [(Clause, [ProjPath Expr])] groupClauses [] = [] groupClauses (pc@(Path p c) : pcs) = (c, Path p (rhs c) : grp) : groupClauses rest where (grp, rest) = collect pcs -- Collect l splits l into pc's group and the remainder -- If the lhs of the next clause is alpha-equivalent to the current lhs -- then add the next clause to this group, performing the alpha-conversion collect (Path p' c' : pcs) | Just rho <- alpha (clauseLHS c') (clauseLHS c) = mapFst (Path p' (rename' rho (rhs c')) :) $ collect pcs -- we go through all the clauses, since they could be in random order... collect (pc : pcs) = mapSnd (pc :) $ collect pcs collect [] = ([], []) rhs = rhsExpr . clauseRHS rhsExpr (RHS e _ ) = e -- TODO: preserve C.Expr rhsExpr _ = __IMPOSSIBLE__ clauseToPath :: Clause -> ScopeM (ProjPath Clause) clauseToPath (Clause (LHS i lhs) spats (RHS e c) wh@(WhereDecls _ []) catchall) = fmap (\ lhs -> Clause (LHS i lhs) spats (RHS e c) wh catchall) <$> lhsToPath [] lhs clauseToPath (Clause lhs _ (RHS e _) (WhereDecls _ (_:_)) _) = typeError $ NotImplemented $ "copattern clauses with where declarations" clauseToPath (Clause lhs _ _ wheredecls _) = typeError $ NotImplemented $ "copattern clauses with absurd, with or rewrite right hand side" lhsToPath :: [ProjEntry] -> LHSCore -> ScopeM (ProjPath LHSCore) lhsToPath acc lhs@LHSHead{} = return $ Path acc lhs lhsToPath acc (LHSWith h wps ps) = __IMPOSSIBLE__ -- TODO! lhsToPath acc (LHSProj f lhs ps) = do let xs = fromMaybe __IMPOSSIBLE__ $ mapM (T.mapM (T.mapM fromVarP)) ps lhsToPath (ProjEntry f xs : acc) $ namedArg lhs where fromVarP :: Pattern -> Maybe Name fromVarP (VarP n) = Just $ unBind n fromVarP _ = Nothing -- | Expects a sorted list. pathToRecord :: [ProjPath Expr] -> ScopeM Expr pathToRecord [] = __IMPOSSIBLE__ pathToRecord [Path [] e] = return e pathToRecord pps = case pathHeads pps of Nothing -> typeError $ GenericError $ "overlapping copattern clauses" Just pps -> do pes <- mapM (mapSndM pathToRecord) $ groupPathes pps let ei = ExprRange $ getRange $ map fst pes Rec ei <$> mapM abstractions pes where abstractions :: (ProjEntry, Expr) -> ScopeM RecordAssign abstractions (ProjEntry p xs, e) = Left . FieldAssignment (C.unqualify $ qnameToConcrete $ headAmbQ p) <$> foldr abstract (return e) xs abstract :: NamedArg Name -> ScopeM Expr -> ScopeM Expr abstract (Arg info (Named Nothing x)) me = Lam exprNoRange (DomainFree $ unnamedArg info $ BindName x) <$> me abstract (Arg _ (Named Just{} _)) me = typeError $ NotImplemented $ "named arguments in projection patterns" -- | Similar to 'groupClauses'. groupPathes :: [(ProjEntry, ProjPath Expr)] -> [(ProjEntry, [ProjPath Expr])] groupPathes [] = [] groupPathes ((pe@(ProjEntry p xs), path) : pps) = (pe, path : grp) : groupPathes rest -- Now group all following pps that have the same projection p -- We expect that they have alpha-equivalent xs where (grp, rest) = collect pps collect l@((ProjEntry p' xs', path) : pps) | p == p', Just rho <- alpha xs' xs = -- add the alpha-converted path to the group -- NOTE: because the path contains only projections and pattern vars -- we only alpha-convert the content (rhs Expr) -- When the path will contain dot patterns, we have to rename in them mapFst (mapContent (rename' rho) path :) $ collect pps collect l = ([], l) -- null or different projection: close group pathHeads :: [Path a b] -> Maybe [(a, Path a b)] pathHeads = mapM pathSplit pathSplit :: Path a b -> Maybe (a, Path a b) pathSplit (Path [] b) = Nothing pathSplit (Path (a:as) b) = Just (a, Path as b) -- * Alpha conversion type NameMap = [(Name,Name)] class Rename e where rename :: (Name -> Maybe Name) -> e -> e rename' :: NameMap -> e -> e rename' rho = rename (flip lookup rho) -- | 'QName's are not renamed. instance Rename QName where rename _ q = q instance Rename Name where rename rho x = fromMaybe x (rho x) instance Rename BindName where rename rho (BindName x) = BindName $ rename rho x instance Rename Expr where rename rho e = case e of Var x -> Var (rename rho x) Def f -> e Proj{} -> e Con c -> e Lit l -> e QuestionMark{} -> e Underscore i -> e Dot i e -> Dot i (rename rho e) App i e es -> App i (rename rho e) (rename rho es) WithApp i e es -> WithApp i (rename rho e) (rename rho es) Lam i lb e -> Lam i (rename rho lb) (rename rho e) AbsurdLam{} -> e ExtendedLam i i' n cs -> ExtendedLam i i' n (rename rho cs) Pi i tel e -> Pi i (rename rho tel) (rename rho e) Generalized s e -> Generalized s (rename rho e) Fun i a e -> Fun i (rename rho a) (rename rho e) Set{} -> e Prop{} -> e Let i bs e -> Let i (rename rho bs) (rename rho e) ETel tel -> ETel (rename rho tel) Rec i fes -> Rec i $ rename rho fes RecUpdate i e fes -> RecUpdate i (rename rho e) (rename rho fes) ScopedExpr i e -> ScopedExpr i (rename rho e) QuoteGoal i n e -> QuoteGoal i n (rename rho e) QuoteContext i -> e Quote i -> e QuoteTerm i -> e Unquote i -> e Tactic i e xs ys -> Tactic i (rename rho e) (rename rho xs) (rename rho ys) DontCare e -> DontCare (rename rho e) PatternSyn{} -> e Macro{} -> e instance Rename ModuleName where rename rho x = x instance Rename a => Rename (FieldAssignment' a) where rename rho = fmap (rename rho) instance Rename LetBinding where rename rho e = case e of LetBind i r n e e' -> LetBind i r n (rename rho e) (rename rho e') LetPatBind i p e -> LetPatBind i (rename rho p) (rename rho e) LetApply{} -> e LetOpen{} -> e LetDeclaredVariable x -> LetDeclaredVariable (rename rho x) instance Rename LamBinding where rename rho e = case e of DomainFree{} -> e DomainFull tb -> DomainFull (rename rho tb) instance Rename TypedBinding where rename rho (TBind r ns e) = TBind r ns (rename rho e) rename rho (TLet r lbs) = TLet r (rename rho lbs) instance Rename ProblemEq where rename rho (ProblemEq p v a) = ProblemEq (rename rho p) v a instance Rename Clause where rename rho (Clause lhs spats rhs wheredecls catchall) = Clause (rename rho lhs) (rename rho spats) (rename rho rhs) (rename rho wheredecls) catchall instance Rename RHS where rename rho e = case e of RHS e c -> RHS (rename rho e) c AbsurdRHS -> e WithRHS n es cs -> WithRHS n (rename rho es) (rename rho cs) RewriteRHS nes spats r ds -> RewriteRHS (rename rho nes) (rename rho spats) (rename rho r) (rename rho ds) instance Rename WhereDeclarations where rename rho (WhereDecls m ds) = WhereDecls m (rename rho ds) instance Rename LHS where rename rho (LHS i core) = LHS i (rename rho core) instance Rename LHSCore where rename rho = fmap (rename rho) -- only rename in dot patterns instance Rename Pattern where rename rho = fmap (rename rho) -- only rename in dot patterns instance Rename Declaration where rename rho d = __IMPOSSIBLE__ instance Rename a => Rename (Arg a) where rename rho = fmap (rename rho) instance Rename a => Rename (Named n a) where rename rho = fmap (rename rho) instance Rename a => Rename [a] where rename rho = map (rename rho) instance (Rename a, Rename b) => Rename (Either a b) where rename rho = mapEither (rename rho) (rename rho) instance (Rename a, Rename b) => Rename (a, b) where rename rho (a,b) = (rename rho a, rename rho b) -- | Alpha-Equivalence of patterns, ignoring dot patterns class Alpha t where alpha :: t -> t -> Maybe NameMap alpha t t' = fmap snd $ runWriterT $ alpha' t t' alpha' :: t -> t -> WriterT NameMap Maybe () alpha' t t' = WriterT $ fmap ((),) $ alpha t t' instance Alpha Name where alpha' x x' = tell1 (x, x') instance Alpha (Pattern' e) where alpha' p p' = case (p,p') of ((VarP x) , (VarP x') ) -> tell1 (unBind x, unBind x') ((ConP _ x ps) , (ConP _ x' ps') ) -> guard (x == x') >> alpha' ps ps' ((DefP _ x ps) , (DefP _ x' ps') ) -> guard (x == x') >> alpha' ps ps' ((WildP _) , (WildP _) ) -> return () ((AsP _ x p) , (AsP _ x' p') ) -> tell1 (unBind x, unBind x') >> alpha' p p' ((DotP _ _) , (DotP _ _) ) -> return () (AbsurdP{} , AbsurdP{} ) -> return () ((LitP l) , (LitP l') ) -> guard (l == l') ((PatternSynP _ x ps) , (PatternSynP _ x' ps')) -> guard (x == x') >> alpha' ps ps' (_ , _ ) -> fail "not alpha equivalent" tell1 :: (MonadWriter [a] m) => a -> m () tell1 a = tell [a] instance Alpha (LHSCore' e) where alpha' (LHSHead f ps) (LHSHead f' ps') = guard (f == f') >> alpha' ps ps' alpha' (LHSProj d lhs ps) (LHSProj d' lhs' ps') = guard (d == d') >> alpha' lhs lhs' >> alpha' ps ps' alpha' (LHSWith h wps ps) (LHSWith h' wps' ps') = alpha' h h' >> alpha' wps wps' >> alpha' ps ps' alpha' _ _ = fail "not alpha equivalent" instance Alpha LHS where alpha' (LHS _ core) (LHS _ core') = alpha' core core' instance Alpha a => Alpha (Arg a) where alpha' a a' = alpha' (unArg a) (unArg a') instance (Eq n, Alpha a) => Alpha (Named n a) where alpha' a a' = guard (nameOf a == nameOf a') >> alpha' (namedThing a) (namedThing a') instance Alpha a => Alpha [a] where alpha' l l' = guard (length l == length l') >> zipWithM_ alpha' l l' Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/PatternSynonyms.hs0000644000000000000000000000633713466402171022064 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Pattern synonym utilities: folding pattern synonym definitions for -- printing and merging pattern synonym definitions to handle overloaded -- pattern synonyms. module Agda.Syntax.Abstract.PatternSynonyms ( matchPatternSyn , matchPatternSynP , mergePatternSynDefs ) where import Control.Applicative ( Alternative(empty) ) import Control.Monad.Writer hiding (forM) import Data.Map (Map) import qualified Data.Map as Map import Data.Traversable (forM) import Data.List import Data.Void import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Abstract import Agda.Syntax.Abstract.Views import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Impossible #include "undefined.h" -- | Merge a list of pattern synonym definitions. Fails unless all definitions -- have the same shape (i.e. equal up to renaming of variables and constructor -- names). mergePatternSynDefs :: NonemptyList PatternSynDefn -> Maybe PatternSynDefn mergePatternSynDefs (def :! defs) = foldM mergeDef def defs mergeDef :: PatternSynDefn -> PatternSynDefn -> Maybe PatternSynDefn mergeDef (xs, p) (ys, q) = do guard $ map getArgInfo xs == map getArgInfo ys let ren = zip (map unArg xs) (map unArg ys) (xs,) <$> merge ren p q where merge ren p@(VarP x) (VarP y) = p <$ guard (elem (unBind x, unBind y) ren) merge ren p@(LitP l) (LitP l') = p <$ guard (l == l') merge ren p@(WildP _) (WildP _) = return p merge ren (ConP i (AmbQ cs) ps) (ConP _ (AmbQ cs') qs) = do guard $ map getArgInfo ps == map getArgInfo qs ConP i (AmbQ $ unionNe cs cs') <$> zipWithM (mergeArg ren) ps qs merge _ _ _ = empty mergeArg ren p q = setNamedArg p <$> merge ren (namedArg p) (namedArg q) -- | Match an expression against a pattern synonym. matchPatternSyn :: PatternSynDefn -> Expr -> Maybe [Arg Expr] matchPatternSyn = runMatch match where match (VarP x) e = unBind x ==> e match (LitP l) (Lit l') = guard (l == l') match (ConP _ (AmbQ cs) ps) e = do Application (Con (AmbQ cs')) args <- return (appView e) guard $ null (toList cs' \\ toList cs) -- check all possible constructors appear in the synonym guard $ map getArgInfo ps == map getArgInfo args -- check that we agree on the hiding (TODO: too strict?) zipWithM_ match (map namedArg ps) (map namedArg args) match _ _ = empty -- | Match a pattern against a pattern synonym. matchPatternSynP :: PatternSynDefn -> Pattern' e -> Maybe [Arg (Pattern' e)] matchPatternSynP = runMatch match where match (VarP x) q = unBind x ==> q match (LitP l) (LitP l') = guard (l == l') match (WildP _) (WildP _) = return () match (ConP _ (AmbQ cs) ps) (ConP _ (AmbQ cs') qs) = do guard $ null (toList cs' \\ toList cs) guard $ map getArgInfo ps == map getArgInfo qs zipWithM_ match (map namedArg ps) (map namedArg qs) match _ _ = empty type Match e = WriterT (Map Name e) Maybe (==>) :: Name -> e -> Match e () x ==> e = tell (Map.singleton x e) runMatch :: (Pattern' Void -> e -> Match e ()) -> PatternSynDefn -> e -> Maybe [Arg e] runMatch match (xs, pat) e = do sub <- execWriterT (match pat e) forM xs $ \ x -> (<$ x) <$> Map.lookup (unArg x) sub Agda-2.6.0.1/src/full/Agda/Syntax/Abstract/Name.hs0000644000000000000000000003433113466402171017542 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| Abstract names carry unique identifiers and stuff. -} module Agda.Syntax.Abstract.Name ( module Agda.Syntax.Abstract.Name , IsNoName(..) ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.DeepSeq import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Data.Data (Data) import Data.List import Data.Function import Data.Hashable (Hashable(..)) import Data.Set (Set) import qualified Data.Set as Set import Data.Void import Agda.Syntax.Position import Agda.Syntax.Common import {-# SOURCE #-} Agda.Syntax.Fixity import Agda.Syntax.Concrete.Name (IsNoName(..), NumHoles(..), NameInScope(..), LensInScope(..)) import qualified Agda.Syntax.Concrete.Name as C import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Pretty import Agda.Utils.Size #include "undefined.h" import Agda.Utils.Impossible -- | A name is a unique identifier and a suggestion for a concrete name. The -- concrete name contains the source location (if any) of the name. The -- source location of the binding site is also recorded. data Name = Name { nameId :: !NameId , nameConcrete :: C.Name , nameBindingSite :: Range , nameFixity :: Fixity' , nameIsRecordName :: Bool } deriving Data -- | Useful for debugging scoping problems uglyShowName :: Name -> String uglyShowName (Name i c _ _ _) = show (i,c) -- | Qualified names are non-empty lists of names. Equality on qualified names -- are just equality on the last name, i.e. the module part is just -- for show. -- -- The 'SetRange' instance for qualified names sets all individual -- ranges (including those of the module prefix) to the given one. data QName = QName { qnameModule :: ModuleName , qnameName :: Name } deriving Data -- | Something preceeded by a qualified name. data QNamed a = QNamed { qname :: QName , qnamed :: a } deriving (Functor, Foldable, Traversable) -- | A module name is just a qualified name. -- -- The 'SetRange' instance for module names sets all individual ranges -- to the given one. newtype ModuleName = MName { mnameToList :: [Name] } deriving (Eq, Ord, Data) -- | Ambiguous qualified names. Used for overloaded constructors. -- -- Invariant: All the names in the list must have the same concrete, -- unqualified name. (This implies that they all have the same 'Range'). newtype AmbiguousQName = AmbQ { unAmbQ :: NonemptyList QName } deriving (Eq, Ord, Data) -- | A singleton "ambiguous" name. unambiguous :: QName -> AmbiguousQName unambiguous x = AmbQ (x :! []) -- | Get the first of the ambiguous names. headAmbQ :: AmbiguousQName -> QName headAmbQ (AmbQ xs) = headNe xs -- | Is a name ambiguous. isAmbiguous :: AmbiguousQName -> Bool isAmbiguous (AmbQ (_ :! xs)) = not (null xs) -- | Get the name if unambiguous. getUnambiguous :: AmbiguousQName -> Maybe QName getUnambiguous (AmbQ (x :! [])) = Just x getUnambiguous _ = Nothing -- | Check whether we are a projection pattern. class IsProjP a where isProjP :: a -> Maybe (ProjOrigin, AmbiguousQName) instance IsProjP a => IsProjP (Arg a) where isProjP p = case isProjP $ unArg p of Just (ProjPostfix , f) | getHiding p /= NotHidden -> Nothing x -> x instance IsProjP a => IsProjP (Named n a) where isProjP = isProjP . namedThing instance IsProjP Void where isProjP _ = __IMPOSSIBLE__ -- | A module is anonymous if the qualification path ends in an underscore. isAnonymousModuleName :: ModuleName -> Bool isAnonymousModuleName (MName []) = False isAnonymousModuleName (MName ms) = isNoName $ last ms -- | Sets the ranges of the individual names in the module name to -- match those of the corresponding concrete names. If the concrete -- names are fewer than the number of module name name parts, then the -- initial name parts get the range 'noRange'. -- -- @C.D.E \`withRangesOf\` [A, B]@ returns @C.D.E@ but with ranges set -- as follows: -- -- * @C@: 'noRange'. -- -- * @D@: the range of @A@. -- -- * @E@: the range of @B@. -- -- Precondition: The number of module name name parts has to be at -- least as large as the length of the list. withRangesOf :: ModuleName -> [C.Name] -> ModuleName MName ms `withRangesOf` ns = if m < n then __IMPOSSIBLE__ else MName $ zipWith setRange (replicate (m - n) noRange ++ map getRange ns) ms where m = length ms n = length ns -- | Like 'withRangesOf', but uses the name parts (qualifier + name) -- of the qualified name as the list of concrete names. withRangesOfQ :: ModuleName -> C.QName -> ModuleName m `withRangesOfQ` q = m `withRangesOf` C.qnameParts q mnameFromList :: [Name] -> ModuleName mnameFromList = MName noModuleName :: ModuleName noModuleName = mnameFromList [] commonParentModule :: ModuleName -> ModuleName -> ModuleName commonParentModule m1 m2 = mnameFromList $ commonPrefix (mnameToList m1) (mnameToList m2) -- | Make a 'Name' from some kind of string. class MkName a where -- | The 'Range' sets the /definition site/ of the name, not the use site. mkName :: Range -> NameId -> a -> Name mkName_ :: NameId -> a -> Name mkName_ = mkName noRange instance MkName String where mkName r i s = Name i (C.Name noRange InScope (C.stringNameParts s)) r noFixity' False qnameToList :: QName -> [Name] qnameToList (QName m x) = mnameToList m ++ [x] qnameFromList :: [Name] -> QName qnameFromList [] = __IMPOSSIBLE__ qnameFromList xs = QName (mnameFromList $ init xs) (last xs) qnameToMName :: QName -> ModuleName qnameToMName = mnameFromList . qnameToList mnameToQName :: ModuleName -> QName mnameToQName = qnameFromList . mnameToList showQNameId :: QName -> String showQNameId q = show ns ++ "@" ++ show m where is = map nameId $ mnameToList (qnameModule q) ++ [qnameName q] ns = [ n | NameId n _ <- is ] m = head [ m | NameId _ m <- is ] -- | Turn a qualified name into a concrete name. This should only be used as a -- fallback when looking up the right concrete name in the scope fails. qnameToConcrete :: QName -> C.QName qnameToConcrete (QName m x) = foldr C.Qual (C.QName $ nameConcrete x) $ map nameConcrete $ mnameToList m mnameToConcrete :: ModuleName -> C.QName mnameToConcrete (MName []) = __IMPOSSIBLE__ -- C.QName C.noName_ -- should never happen? mnameToConcrete (MName xs) = foldr C.Qual (C.QName $ last cs) $ init cs where cs = map nameConcrete xs -- | Computes the 'TopLevelModuleName' corresponding to the given -- module name, which is assumed to represent a top-level module name. -- -- Precondition: The module name must be well-formed. toTopLevelModuleName :: ModuleName -> C.TopLevelModuleName toTopLevelModuleName (MName []) = __IMPOSSIBLE__ toTopLevelModuleName (MName ms) = C.TopLevelModuleName (getRange ms) $ map (C.nameToRawName . nameConcrete) ms qualifyM :: ModuleName -> ModuleName -> ModuleName qualifyM m1 m2 = mnameFromList $ mnameToList m1 ++ mnameToList m2 qualifyQ :: ModuleName -> QName -> QName qualifyQ m x = qnameFromList $ mnameToList m ++ qnameToList x qualify :: ModuleName -> Name -> QName qualify = QName -- | Convert a 'Name' to a 'QName' (add no module name). qualify_ :: Name -> QName qualify_ = qualify noModuleName -- | Is the name an operator? isOperator :: QName -> Bool isOperator q = C.isOperator (nameConcrete (qnameName q)) isSubModuleOf :: ModuleName -> ModuleName -> Bool isSubModuleOf x y = xs /= ys && isPrefixOf ys xs where xs = mnameToList x ys = mnameToList y isInModule :: QName -> ModuleName -> Bool isInModule q m = mnameToList m `isPrefixOf` qnameToList q -- | Get the next version of the concrete name. For instance, @nextName "x" = "x₁"@. -- The name must not be a 'NoName'. nextName :: Name -> Name nextName x = x { nameConcrete = C.nextName (nameConcrete x) } sameRoot :: Name -> Name -> Bool sameRoot = C.sameRoot `on` nameConcrete ------------------------------------------------------------------------ -- * Important instances: Eq, Ord, Hashable -- -- For the identity and comparing of names, only the 'NameId' matters! ------------------------------------------------------------------------ instance Eq Name where (==) = (==) `on` nameId instance Ord Name where compare = compare `on` nameId instance Hashable Name where {-# INLINE hashWithSalt #-} hashWithSalt salt = hashWithSalt salt . nameId instance Eq QName where (==) = (==) `on` qnameName instance Ord QName where compare = compare `on` qnameName instance Hashable QName where {-# INLINE hashWithSalt #-} hashWithSalt salt = hashWithSalt salt . qnameName ------------------------------------------------------------------------ -- * IsNoName instances (checking for "_") ------------------------------------------------------------------------ -- | An abstract name is empty if its concrete name is empty. instance IsNoName Name where isNoName = isNoName . nameConcrete instance NumHoles Name where numHoles = numHoles . nameConcrete instance NumHoles QName where numHoles = numHoles . qnameName -- | We can have an instance for ambiguous names as all share a common concrete name. instance NumHoles AmbiguousQName where numHoles = numHoles . headAmbQ ------------------------------------------------------------------------ -- * LensInScope instances ------------------------------------------------------------------------ instance LensInScope Name where lensInScope f n@Name{ nameConcrete = x } = (\y -> n { nameConcrete = y }) <$> lensInScope f x instance LensInScope QName where lensInScope f q@QName{ qnameName = n } = (\n' -> q { qnameName = n' }) <$> lensInScope f n ------------------------------------------------------------------------ -- * Show instances (only for debug printing!) -- -- | Use 'prettyShow' to print names to the user. ------------------------------------------------------------------------ -- deriving instance Show Name -- deriving instance Show ModuleName -- deriving instance Show QName deriving instance Show a => Show (QNamed a) deriving instance Show AmbiguousQName -- | Only use this @show@ function in debugging! To convert an -- abstract 'Name' into a string use @prettyShow@. instance Show Name where -- Andreas, 2014-10-02: Reverted to nice printing. -- Reason: I do not have time just now to properly fix the -- use of Show Name for pretty printing everywhere. -- But I want to push the fix for Issue 836 now. show = prettyShow -- | Only use this @show@ function in debugging! To convert an -- abstract 'ModuleName' into a string use @prettyShow@. instance Show ModuleName where show = prettyShow -- | Only use this @show@ function in debugging! To convert an -- abstract 'QName' into a string use @prettyShow@. instance Show QName where show = prettyShow ------------------------------------------------------------------------ -- * Pretty instances ------------------------------------------------------------------------ instance Pretty Name where pretty = pretty . nameConcrete instance Pretty ModuleName where pretty = hcat . punctuate "." . map pretty . mnameToList instance Pretty QName where pretty = hcat . punctuate "." . map pretty . qnameToList instance Pretty AmbiguousQName where pretty (AmbQ qs) = hcat $ punctuate " | " $ map pretty (toList qs) instance Pretty a => Pretty (QNamed a) where pretty (QNamed a b) = pretty a <> "." <> pretty b ------------------------------------------------------------------------ -- * Range instances ------------------------------------------------------------------------ -- ** HasRange instance HasRange Name where getRange = getRange . nameConcrete instance HasRange ModuleName where getRange (MName []) = noRange getRange (MName xs) = getRange xs instance HasRange QName where getRange q = getRange (qnameModule q, qnameName q) -- | The range of an @AmbiguousQName@ is the range of any of its -- disambiguations (they are the same concrete name). instance HasRange AmbiguousQName where getRange (AmbQ (c :! _)) = getRange c -- ** SetRange instance SetRange Name where setRange r x = x { nameConcrete = setRange r $ nameConcrete x } instance SetRange QName where setRange r q = q { qnameModule = setRange r $ qnameModule q , qnameName = setRange r $ qnameName q } instance SetRange ModuleName where setRange r (MName ns) = MName (zipWith setRange rs ns) where -- Put the range only on the last name. Otherwise -- we get overlapping jump-to-definition links for all -- the parts (See #2666). rs = replicate (length ns - 1) noRange ++ [r] -- ** KillRange instance KillRange Name where killRange (Name a b c d e) = (killRange4 Name a b c d e) { nameBindingSite = c } -- Andreas, 2017-07-25, issue #2649 -- Preserve the nameBindingSite for error message. -- -- Older remarks: -- -- Andreas, 2014-03-30 -- An experiment: what happens if we preserve -- the range of the binding site, but kill all -- other ranges before serialization? -- -- Andreas, Makoto, 2014-10-18 AIM XX -- Kill all ranges in signature, including nameBindingSite. instance KillRange ModuleName where killRange (MName xs) = MName $ killRange xs instance KillRange QName where killRange (QName a b) = killRange2 QName a b -- killRange q = q { qnameModule = killRange $ qnameModule q -- , qnameName = killRange $ qnameName q -- } instance KillRange AmbiguousQName where killRange (AmbQ xs) = AmbQ $ killRange xs ------------------------------------------------------------------------ -- * Sized instances ------------------------------------------------------------------------ instance Sized QName where size = size . qnameToList instance Sized ModuleName where size = size . mnameToList ------------------------------------------------------------------------ -- * NFData instances ------------------------------------------------------------------------ -- | The range is not forced. instance NFData Name where rnf (Name _ a _ b c) = rnf a `seq` rnf b `seq` rnf c instance NFData QName where rnf (QName a b) = rnf a `seq` rnf b instance NFData ModuleName where rnf (MName a) = rnf a Agda-2.6.0.1/src/full/Agda/Syntax/Parser/0000755000000000000000000000000013466402171016013 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Tokens.hs0000644000000000000000000000675313466402171017625 0ustar0000000000000000module Agda.Syntax.Parser.Tokens ( Token(..) , Keyword(..) , layoutKeywords , Symbol(..) ) where import Agda.Syntax.Literal (Literal) import Agda.Syntax.Position data Keyword = KwLet | KwIn | KwWhere | KwData | KwCoData | KwDo | KwPostulate | KwMutual | KwAbstract | KwPrivate | KwInstance | KwOverlap | KwOpen | KwImport | KwModule | KwPrimitive | KwMacro | KwInfix | KwInfixL | KwInfixR | KwWith | KwRewrite | KwSet | KwProp | KwForall | KwRecord | KwConstructor | KwField | KwInductive | KwCoInductive | KwEta | KwNoEta | KwHiding | KwUsing | KwRenaming | KwTo | KwPublic | KwOPTIONS | KwBUILTIN | KwLINE | KwFOREIGN | KwCOMPILE | KwIMPOSSIBLE | KwSTATIC | KwINJECTIVE | KwINLINE | KwNOINLINE | KwETA | KwNO_TERMINATION_CHECK | KwTERMINATING | KwNON_TERMINATING | KwWARNING_ON_USAGE | KwMEASURE | KwDISPLAY | KwREWRITE | KwQuoteGoal | KwQuoteContext | KwQuote | KwQuoteTerm | KwUnquote | KwUnquoteDecl | KwUnquoteDef | KwSyntax | KwPatternSyn | KwTactic | KwCATCHALL | KwVariable | KwNO_POSITIVITY_CHECK | KwPOLARITY | KwNO_UNIVERSE_CHECK deriving (Eq, Show) layoutKeywords :: [Keyword] layoutKeywords = [ KwLet, KwWhere, KwDo, KwPostulate, KwMutual, KwAbstract, KwPrivate, KwInstance, KwMacro, KwPrimitive, KwField, KwVariable ] data Symbol = SymDot | SymSemi | SymVirtualSemi | SymBar | SymColon | SymArrow | SymEqual | SymLambda | SymUnderscore | SymQuestionMark | SymAs | SymOpenParen | SymCloseParen | SymOpenIdiomBracket | SymCloseIdiomBracket | SymDoubleOpenBrace | SymDoubleCloseBrace | SymOpenBrace | SymCloseBrace | SymOpenVirtualBrace | SymCloseVirtualBrace | SymOpenPragma | SymClosePragma | SymEllipsis | SymDotDot | SymEndComment -- ^ A misplaced end-comment "-}". deriving (Eq, Show) data Token -- Keywords = TokKeyword Keyword Interval -- Identifiers and operators | TokId (Interval, String) | TokQId [(Interval, String)] -- Non-empty namespace. The intervals for -- "A.B.x" correspond to "A.", "B." and "x". -- Literals | TokLiteral Literal -- Special symbols | TokSymbol Symbol Interval -- Other tokens | TokString (Interval, String) -- arbitrary string, used in pragmas | TokSetN (Interval, Integer) | TokPropN (Interval, Integer) | TokTeX (Interval, String) | TokMarkup (Interval, String) | TokComment (Interval, String) | TokDummy -- Dummy token to make Happy not complain -- about overlapping cases. | TokEOF Interval deriving (Eq, Show) instance HasRange Token where getRange (TokKeyword _ i) = getRange i getRange (TokId (i, _)) = getRange i getRange (TokQId iss) = getRange (map fst iss) getRange (TokLiteral lit) = getRange lit getRange (TokSymbol _ i) = getRange i getRange (TokString (i, _)) = getRange i getRange (TokSetN (i, _)) = getRange i getRange (TokPropN (i, _)) = getRange i getRange (TokTeX (i, _)) = getRange i getRange (TokMarkup (i, _)) = getRange i getRange (TokComment (i, _)) = getRange i getRange TokDummy = noRange getRange (TokEOF i) = getRange i Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Parser.y0000644000000000000000000026562413466402171017460 0ustar0000000000000000{ {-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} {-| The parser is generated by Happy (). - - Ideally, ranges should be as precise as possible, to get messages that - emphasize precisely the faulting term(s) upon error. - - However, interactive highlighting is only applied at the end of each - mutual block, keywords are only highlighted once (see - `TypeChecking.Rules.Decl'). So if the ranges of two declarations - interleave, one must ensure that keyword ranges are not included in - the intersection. (Otherwise they are uncolored by the interactive - highlighting.) - -} module Agda.Syntax.Parser.Parser ( moduleParser , moduleNameParser , exprParser , exprWhereParser , tokensParser , holeContentParser , splitOnDots -- only used by the internal test-suite ) where import Control.Monad import Data.Char import Data.Functor import Data.List import Data.Maybe import Data.Monoid import qualified Data.Traversable as T import Debug.Trace import Agda.Syntax.Position hiding (tests) import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Lexer import Agda.Syntax.Parser.Tokens import Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Attribute import Agda.Syntax.Concrete.Pattern import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Literal import Agda.TypeChecking.Positivity.Occurrence hiding (tests) import Agda.Utils.Either hiding (tests) import Agda.Utils.Functor import Agda.Utils.Hash import Agda.Utils.List ( spanJust, chopWhen ) import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Utils.Singleton import Agda.Utils.Tuple import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Impossible #include "undefined.h" } %name tokensParser Tokens %name exprParser Expr %name exprWhereParser ExprWhere %name moduleParser File %name moduleNameParser ModuleName %name funclauseParser FunClause %name holeContentParser HoleContent %tokentype { Token } %monad { Parser } %lexer { lexer } { TokEOF{} } %expect 9 -- * shift/reduce for \ x y z -> foo = bar -- shifting means it'll parse as \ x y z -> (foo = bar) rather than -- (\ x y z -> foo) = bar -- -- * Telescope let and do-notation let. -- Expr2 -> 'let' Declarations . LetBody -- TypedBinding -> '(' 'let' Declarations . ')' -- ')' shift, and enter state 486 -- (reduce using rule 189) -- A do-block cannot end in a 'let' so committing to TypedBinding with a -- shift is the right thing to do here. -- -- * Named implicits in TypedBinding {x = y}. When encountering the '=' shift -- treats this as a named implicit and reducing would fail later. -- This is a trick to get rid of shift/reduce conflicts arising because we want -- to parse things like "m >>= \x -> k x". See the Expr rule for more -- information. %nonassoc LOWEST %nonassoc '->' %token 'abstract' { TokKeyword KwAbstract $$ } 'codata' { TokKeyword KwCoData $$ } 'coinductive' { TokKeyword KwCoInductive $$ } 'constructor' { TokKeyword KwConstructor $$ } 'data' { TokKeyword KwData $$ } 'eta-equality' { TokKeyword KwEta $$ } 'field' { TokKeyword KwField $$ } 'forall' { TokKeyword KwForall $$ } 'variable' { TokKeyword KwVariable $$ } 'hiding' { TokKeyword KwHiding $$ } 'import' { TokKeyword KwImport $$ } 'in' { TokKeyword KwIn $$ } 'inductive' { TokKeyword KwInductive $$ } 'infix' { TokKeyword KwInfix $$ } 'infixl' { TokKeyword KwInfixL $$ } 'infixr' { TokKeyword KwInfixR $$ } 'instance' { TokKeyword KwInstance $$ } 'overlap' { TokKeyword KwOverlap $$ } 'let' { TokKeyword KwLet $$ } 'macro' { TokKeyword KwMacro $$ } 'module' { TokKeyword KwModule $$ } 'mutual' { TokKeyword KwMutual $$ } 'no-eta-equality' { TokKeyword KwNoEta $$ } 'open' { TokKeyword KwOpen $$ } 'pattern' { TokKeyword KwPatternSyn $$ } 'postulate' { TokKeyword KwPostulate $$ } 'primitive' { TokKeyword KwPrimitive $$ } 'private' { TokKeyword KwPrivate $$ } 'Prop' { TokKeyword KwProp $$ } 'public' { TokKeyword KwPublic $$ } 'quote' { TokKeyword KwQuote $$ } 'quoteContext' { TokKeyword KwQuoteContext $$ } 'quoteGoal' { TokKeyword KwQuoteGoal $$ } 'quoteTerm' { TokKeyword KwQuoteTerm $$ } 'record' { TokKeyword KwRecord $$ } 'renaming' { TokKeyword KwRenaming $$ } 'rewrite' { TokKeyword KwRewrite $$ } 'Set' { TokKeyword KwSet $$ } 'syntax' { TokKeyword KwSyntax $$ } 'tactic' { TokKeyword KwTactic $$ } 'to' { TokKeyword KwTo $$ } 'unquote' { TokKeyword KwUnquote $$ } 'unquoteDecl' { TokKeyword KwUnquoteDecl $$ } 'unquoteDef' { TokKeyword KwUnquoteDef $$ } 'using' { TokKeyword KwUsing $$ } 'where' { TokKeyword KwWhere $$ } 'do' { TokKeyword KwDo $$ } 'with' { TokKeyword KwWith $$ } 'BUILTIN' { TokKeyword KwBUILTIN $$ } 'CATCHALL' { TokKeyword KwCATCHALL $$ } 'DISPLAY' { TokKeyword KwDISPLAY $$ } 'ETA' { TokKeyword KwETA $$ } 'FOREIGN' { TokKeyword KwFOREIGN $$ } 'COMPILE' { TokKeyword KwCOMPILE $$ } 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $$ } 'INJECTIVE' { TokKeyword KwINJECTIVE $$ } 'INLINE' { TokKeyword KwINLINE $$ } 'NOINLINE' { TokKeyword KwNOINLINE $$ } 'MEASURE' { TokKeyword KwMEASURE $$ } 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $$ } 'NO_POSITIVITY_CHECK' { TokKeyword KwNO_POSITIVITY_CHECK $$ } 'NO_UNIVERSE_CHECK' { TokKeyword KwNO_UNIVERSE_CHECK $$ } 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $$ } 'OPTIONS' { TokKeyword KwOPTIONS $$ } 'POLARITY' { TokKeyword KwPOLARITY $$ } 'WARNING_ON_USAGE' { TokKeyword KwWARNING_ON_USAGE $$ } 'REWRITE' { TokKeyword KwREWRITE $$ } 'STATIC' { TokKeyword KwSTATIC $$ } 'TERMINATING' { TokKeyword KwTERMINATING $$ } setN { TokSetN $$ } propN { TokPropN $$ } tex { TokTeX $$ } comment { TokComment $$ } '...' { TokSymbol SymEllipsis $$ } '..' { TokSymbol SymDotDot $$ } '.' { TokSymbol SymDot $$ } ';' { TokSymbol SymSemi $$ } ':' { TokSymbol SymColon $$ } '=' { TokSymbol SymEqual $$ } '_' { TokSymbol SymUnderscore $$ } '?' { TokSymbol SymQuestionMark $$ } '->' { TokSymbol SymArrow $$ } '\\' { TokSymbol SymLambda $$ } '@' { TokSymbol SymAs $$ } '|' { TokSymbol SymBar $$ } '(' { TokSymbol SymOpenParen $$ } ')' { TokSymbol SymCloseParen $$ } '(|' { TokSymbol SymOpenIdiomBracket $$ } '|)' { TokSymbol SymCloseIdiomBracket $$ } '{{' { TokSymbol SymDoubleOpenBrace $$ } '}}' { TokSymbol SymDoubleCloseBrace $$ } '{' { TokSymbol SymOpenBrace $$ } '}' { TokSymbol SymCloseBrace $$ } -- ':{' { TokSymbol SymColonBrace $$ } vopen { TokSymbol SymOpenVirtualBrace $$ } vclose { TokSymbol SymCloseVirtualBrace $$ } vsemi { TokSymbol SymVirtualSemi $$ } '{-#' { TokSymbol SymOpenPragma $$ } '#-}' { TokSymbol SymClosePragma $$ } id { TokId $$ } q_id { TokQId $$ } string { TokString $$ } literal { TokLiteral $$ } %% {-------------------------------------------------------------------------- Parsing the token stream. Used by the TeX compiler. --------------------------------------------------------------------------} -- Parse a list of tokens. Tokens :: { [Token] } Tokens : TokensR { reverse $1 } -- Happy is much better at parsing left recursive grammars (constant -- stack size vs. linear stack size for right recursive). TokensR :: { [Token] } TokensR : TokensR Token { $2 : $1 } | { [] } -- Parse single token. Token :: { Token } Token : 'abstract' { TokKeyword KwAbstract $1 } | 'codata' { TokKeyword KwCoData $1 } | 'coinductive' { TokKeyword KwCoInductive $1 } | 'constructor' { TokKeyword KwConstructor $1 } | 'data' { TokKeyword KwData $1 } | 'eta-equality' { TokKeyword KwEta $1 } | 'field' { TokKeyword KwField $1 } | 'forall' { TokKeyword KwForall $1 } | 'variable' { TokKeyword KwVariable $1 } | 'hiding' { TokKeyword KwHiding $1 } | 'import' { TokKeyword KwImport $1 } | 'in' { TokKeyword KwIn $1 } | 'inductive' { TokKeyword KwInductive $1 } | 'infix' { TokKeyword KwInfix $1 } | 'infixl' { TokKeyword KwInfixL $1 } | 'infixr' { TokKeyword KwInfixR $1 } | 'instance' { TokKeyword KwInstance $1 } | 'overlap' { TokKeyword KwOverlap $1 } | 'let' { TokKeyword KwLet $1 } | 'macro' { TokKeyword KwMacro $1 } | 'module' { TokKeyword KwModule $1 } | 'mutual' { TokKeyword KwMutual $1 } | 'no-eta-equality' { TokKeyword KwNoEta $1 } | 'open' { TokKeyword KwOpen $1 } | 'pattern' { TokKeyword KwPatternSyn $1 } | 'postulate' { TokKeyword KwPostulate $1 } | 'primitive' { TokKeyword KwPrimitive $1 } | 'private' { TokKeyword KwPrivate $1 } | 'Prop' { TokKeyword KwProp $1 } | 'public' { TokKeyword KwPublic $1 } | 'quote' { TokKeyword KwQuote $1 } | 'quoteContext' { TokKeyword KwQuoteContext $1 } | 'quoteGoal' { TokKeyword KwQuoteGoal $1 } | 'quoteTerm' { TokKeyword KwQuoteTerm $1 } | 'record' { TokKeyword KwRecord $1 } | 'renaming' { TokKeyword KwRenaming $1 } | 'rewrite' { TokKeyword KwRewrite $1 } | 'Set' { TokKeyword KwSet $1 } | 'syntax' { TokKeyword KwSyntax $1 } | 'tactic' { TokKeyword KwTactic $1 } | 'to' { TokKeyword KwTo $1 } | 'unquote' { TokKeyword KwUnquote $1 } | 'unquoteDecl' { TokKeyword KwUnquoteDecl $1 } | 'unquoteDef' { TokKeyword KwUnquoteDef $1 } | 'using' { TokKeyword KwUsing $1 } | 'where' { TokKeyword KwWhere $1 } | 'do' { TokKeyword KwDo $1 } | 'with' { TokKeyword KwWith $1 } | 'BUILTIN' { TokKeyword KwBUILTIN $1 } | 'CATCHALL' { TokKeyword KwCATCHALL $1 } | 'DISPLAY' { TokKeyword KwDISPLAY $1 } | 'ETA' { TokKeyword KwETA $1 } | 'FOREIGN' { TokKeyword KwFOREIGN $1 } | 'COMPILE' { TokKeyword KwCOMPILE $1 } | 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $1 } | 'INJECTIVE' { TokKeyword KwINJECTIVE $1 } | 'INLINE' { TokKeyword KwINLINE $1 } | 'NOINLINE' { TokKeyword KwNOINLINE $1 } | 'MEASURE' { TokKeyword KwMEASURE $1 } | 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $1 } | 'NO_POSITIVITY_CHECK' { TokKeyword KwNO_POSITIVITY_CHECK $1 } | 'NO_UNIVERSE_CHECK' { TokKeyword KwNO_UNIVERSE_CHECK $1 } | 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $1 } | 'OPTIONS' { TokKeyword KwOPTIONS $1 } | 'POLARITY' { TokKeyword KwPOLARITY $1 } | 'REWRITE' { TokKeyword KwREWRITE $1 } | 'STATIC' { TokKeyword KwSTATIC $1 } | 'TERMINATING' { TokKeyword KwTERMINATING $1 } | 'WARNING_ON_USAGE' { TokKeyword KwWARNING_ON_USAGE $1 } | setN { TokSetN $1 } | propN { TokPropN $1 } | tex { TokTeX $1 } | comment { TokComment $1 } | '...' { TokSymbol SymEllipsis $1 } | '..' { TokSymbol SymDotDot $1 } | '.' { TokSymbol SymDot $1 } | ';' { TokSymbol SymSemi $1 } | ':' { TokSymbol SymColon $1 } | '=' { TokSymbol SymEqual $1 } | '_' { TokSymbol SymUnderscore $1 } | '?' { TokSymbol SymQuestionMark $1 } | '->' { TokSymbol SymArrow $1 } | '\\' { TokSymbol SymLambda $1 } | '@' { TokSymbol SymAs $1 } | '|' { TokSymbol SymBar $1 } | '(' { TokSymbol SymOpenParen $1 } | ')' { TokSymbol SymCloseParen $1 } | '(|' { TokSymbol SymOpenIdiomBracket $1 } | '|)' { TokSymbol SymCloseIdiomBracket $1 } | '{{' { TokSymbol SymDoubleOpenBrace $1 } | '}}' { TokSymbol SymDoubleCloseBrace $1 } | '{' { TokSymbol SymOpenBrace $1 } | '}' { TokSymbol SymCloseBrace $1 } | vopen { TokSymbol SymOpenVirtualBrace $1 } | vclose { TokSymbol SymCloseVirtualBrace $1 } | vsemi { TokSymbol SymVirtualSemi $1 } | '{-#' { TokSymbol SymOpenPragma $1 } | '#-}' { TokSymbol SymClosePragma $1 } | id { TokId $1 } | q_id { TokQId $1 } | string { TokString $1 } | literal { TokLiteral $1 } {-------------------------------------------------------------------------- Top level --------------------------------------------------------------------------} File :: { ([Pragma], [Declaration]) } File : vopen TopLevel maybe_vclose { takeOptionsPragmas $2 } maybe_vclose :: { () } maybe_vclose : {- empty -} { () } | vclose { () } {-------------------------------------------------------------------------- Meta rules --------------------------------------------------------------------------} -- The first token in a file decides the indentation of the top-level layout -- block. Or not. It will if we allow the top-level module to be omitted. -- topen : {- empty -} {% pushCurrentContext } {- A layout block might have to be closed by a parse error. Example: let x = e in e' Here the 'let' starts a layout block which should end before the 'in'. The problem is that the lexer doesn't know this, so there is no virtual close brace. However when the parser sees the 'in' there will be a parse error. This is our cue to close the layout block. -} close :: { () } close : vclose { () } | error {% popContext } -- You can use concrete semi colons in a layout block started with a virtual -- brace, so we don't have to distinguish between the two semi colons. You can't -- use a virtual semi colon in a block started by a concrete brace, but this is -- simply because the lexer will not generate virtual semis in this case. semi :: { Interval } semi : ';' { $1 } | vsemi { $1 } -- Enter the 'imp_dir' lex state, where we can parse the keyword 'to'. beginImpDir :: { () } beginImpDir : {- empty -} {% pushLexState imp_dir } {-------------------------------------------------------------------------- Helper rules --------------------------------------------------------------------------} -- An integer. Used in fixity declarations. Int :: { Integer } Int : literal {% case $1 of { LitNat _ i -> return i; _ -> parseError $ "Expected integer" } } {-------------------------------------------------------------------------- Names --------------------------------------------------------------------------} -- A name is really a sequence of parts, but the lexer just sees it as a -- string, so we have to do the translation here. Id :: { Name } Id : id {% mkName $1 } -- Space separated list of one or more identifiers. SpaceIds :: { [Name] } SpaceIds : Id SpaceIds { $1 : $2 } | Id { [$1] } -- When looking for a double closed brace, we accept either a single token '}}' -- (which is what the unicode character "RIGHT WHITE CURLY BRACKET" is -- postprocessed into in LexActions.hs), but also two consecutive tokens '}' -- (which a string '}}' is lexed to). This small hack allows us to keep -- "record { a = record { }}" working. In the second case, we check that the two -- tokens '}' are immediately consecutive. DoubleCloseBrace :: { Range } DoubleCloseBrace : '}}' { getRange $1 } | '}' '}' {% if posPos (fromJust (rEnd' (getRange $2))) - posPos (fromJust (rStart' (getRange $1))) > 2 then parseErrorRange $2 "Expecting '}}', found separated '}'s." else return $ getRange ($1, $2) } -- A possibly dotted identifier. MaybeDottedId :: { Arg Name } MaybeDottedId : '..' Id { setRelevance NonStrict $ defaultArg $2 } | '.' Id { setRelevance Irrelevant $ defaultArg $2 } | Id { defaultArg $1 } -- Space separated list of one or more possibly dotted identifiers. MaybeDottedIds :: { [Arg Name] } MaybeDottedIds : MaybeDottedId MaybeDottedIds { $1 : $2 } | MaybeDottedId { [$1] } -- Space separated list of one or more identifiers, some of which may -- be surrounded by braces or dotted. ArgIds :: { [Arg Name] } ArgIds : MaybeDottedId ArgIds { $1 : $2 } | MaybeDottedId { [$1] } | '{{' MaybeDottedIds DoubleCloseBrace ArgIds { map makeInstance $2 ++ $4 } | '{{' MaybeDottedIds DoubleCloseBrace { map makeInstance $2 } | '{' MaybeDottedIds '}' ArgIds { map hide $2 ++ $4 } | '{' MaybeDottedIds '}' { map hide $2 } | '.' '{' SpaceIds '}' ArgIds { map (hide . setRelevance Irrelevant . defaultArg) $3 ++ $5 } | '.' '{' SpaceIds '}' { map (hide . setRelevance Irrelevant . defaultArg) $3 } | '.' '{{' SpaceIds DoubleCloseBrace ArgIds { map (makeInstance . setRelevance Irrelevant . defaultArg) $3 ++ $5 } | '.' '{{' SpaceIds DoubleCloseBrace { map (makeInstance . setRelevance Irrelevant . defaultArg) $3 } | '..' '{' SpaceIds '}' ArgIds { map (hide . setRelevance NonStrict . defaultArg) $3 ++ $5 } | '..' '{' SpaceIds '}' { map (hide . setRelevance NonStrict . defaultArg) $3 } | '..' '{{' SpaceIds DoubleCloseBrace ArgIds { map (makeInstance . setRelevance NonStrict . defaultArg) $3 ++ $5 } | '..' '{{' SpaceIds DoubleCloseBrace { map (makeInstance . setRelevance NonStrict . defaultArg) $3 } -- Modalities preceeding identifiers ModalArgIds :: { [Arg Name] } ModalArgIds : Attributes ArgIds {% mapM (applyAttrs $1) $2 } -- Attributes are parsed as '@' followed by an atomic expression. Attribute :: { Attr } Attribute : '@' ExprOrAttr {% setRange (getRange ($1,$2)) `fmap` toAttribute $2 } -- Parse a reverse list of modalities Attributes :: { [Attr] } Attributes : {- empty -} { [] } | Attributes Attribute { $2 : $1 } Attributes1 :: { [Attr] } Attributes1 : Attribute { [$1] } | Attributes1 Attribute { $2 : $1 } QId :: { QName } QId : q_id {% mkQName $1 } | Id { QName $1 } -- A module name is just a qualified name ModuleName :: { QName } ModuleName : QId { $1 } -- A binding variable. Can be '_' BId :: { Name } BId : Id { $1 } | '_' { Name (getRange $1) InScope [Hole] } {- UNUSED -- A binding variable. Can be '_' MaybeDottedBId :: { (Relevance, Name) } MaybeDottedBId : BId { (Relevant , $1) } | '.' BId { (Irrelevant, $2) } | '..' BId { (NonStrict, $2) } -} -- Space separated list of binding identifiers. Used in fixity -- declarations infixl 100 + - SpaceBIds :: { [Name] } SpaceBIds : BId SpaceBIds { $1 : $2 } | BId { [$1] } {- DOES PRODUCE REDUCE/REDUCE CONFLICTS! -- Space-separated list of binding identifiers. Used in dependent -- function spaces: (x y z : Nat) -> ... -- (Used to be comma-separated; hence the name) -- QUESTION: Should this be replaced by SpaceBIds above? --CommaBIds :: { [(Relevance,Name)] } CommaBIds :: { [Name] } CommaBIds : CommaBIds BId { $1 ++ [$2] } -- SWITCHING DOES NOT HELP | BId { [$1] } -} -- Space-separated list of binding identifiers. Used in dependent -- function spaces: (x y z : Nat) -> ... -- (Used to be comma-separated; hence the name) -- QUESTION: Should this be replaced by SpaceBIds above? -- Andreas, 2011-04-07 the trick avoids reduce/reduce conflicts -- when parsing (x y z : A) -> B -- at point (x y it is not clear whether x y is an application or -- a variable list. We could be parsing (x y z) -> B -- with ((x y) z) being a type. CommaBIds :: { [NamedArg BoundName] } CommaBIds : CommaBIdAndAbsurds {% case $1 of Left ns -> return ns Right _ -> parseError $ "expected sequence of bound identifiers, not absurd pattern" } CommaBIdAndAbsurds :: { Either [NamedArg BoundName] [Expr] } CommaBIdAndAbsurds : Application {% boundNamesOrAbsurd $1 } | QId '=' QId {% fmap (Left . (:[])) $ mkNamedArg (Just $1) (Left $3) } | '_' '=' QId {% fmap (Left . (:[])) $ mkNamedArg Nothing (Left $3) } | QId '=' '_' {% fmap (Left . (:[])) $ mkNamedArg (Just $1) (Right $ getRange $3) } | '_' '=' '_' {% fmap (Left . (:[])) $ mkNamedArg Nothing (Right $ getRange $3) } -- Parse a sequence of identifiers, including hiding info. -- Does not include instance arguments. -- E.g. x {y z} _ {v} -- To be used in typed bindings, like (x {y z} _ {v} : Nat). BIdsWithHiding :: { [NamedArg BoundName] } BIdsWithHiding : Application {% let -- interpret an expression as name getName :: Expr -> Maybe Name getName (Ident (QName x)) = Just x getName (Underscore r _) = Just (Name r InScope [Hole]) getName _ = Nothing getNames :: Expr -> Maybe [Name] getNames (RawApp _ es) = mapM getName es getNames e = singleton `fmap` getName e -- interpret an expression as name or list of hidden names getName1 :: Expr -> Maybe [Arg Name] getName1 (Ident (QName x)) = Just [defaultArg x] getName1 (Underscore r _) = Just [defaultArg $ Name r InScope [Hole]] getName1 (HiddenArg _ (Named Nothing e)) = map (setHiding Hidden . defaultArg) `fmap` getNames e getName1 _ = Nothing in case mapM getName1 $1 of Just good -> return $ (map . fmap) (unnamed . mkBoundName_) $ concat good Nothing -> parseError $ "expected sequence of possibly hidden bound identifiers" } -- Space separated list of strings in a pragma. PragmaStrings :: { [String] } PragmaStrings : {- empty -} { [] } | string PragmaStrings { snd $1 : $2 } PragmaString :: { String } PragmaString : string { snd $1 } Strings :: { [(Interval, String)] } Strings : {- empty -} { [] } | string Strings { $1 : $2 } ForeignCode :: { [(Interval, String)] } ForeignCode : {- empty -} { [] } | string ForeignCode { $1 : $2 } | '{-#' ForeignCode '#-}' ForeignCode { [($1, "{-#")] ++ $2 ++ [($3, "#-}")] ++ $4 } PragmaName :: { Name } PragmaName : string {% mkName $1 } PragmaQName :: { QName } PragmaQName : string {% pragmaQName $1 } -- Issue 2125. WAS: string {% fmap QName (mkName $1) } PragmaQNames :: { [QName] } PragmaQNames : Strings {% mapM pragmaQName $1 } {-------------------------------------------------------------------------- Expressions (terms and types) --------------------------------------------------------------------------} {- Expressions. You might expect lambdas and lets to appear in the first expression category (lowest precedence). The reason they don't is that we want to parse things like m >>= \x -> k x This will leads to a conflict in the following case m >>= \x -> k x >>= \y -> k' y At the second '>>=' we can either shift or reduce. We solve this problem using Happy's precedence directives. The rule 'Expr -> Expr1' (which is the rule you shouldn't use to reduce when seeing '>>=') is given LOWEST precedence. The terminals '->' and op (which is what you should shift) is given higher precedence. -} -- Top level: Function types. Expr :: { Expr } Expr : TeleArrow Expr { Pi $1 $2 } | Application3 '->' Expr { Fun (getRange ($1,$2,$3)) (defaultArg $ RawApp (getRange $1) $1) $3 } | Attributes1 Application3 '->' Expr {% applyAttrs $1 (defaultArg $ RawApp (getRange ($1,$2)) $2) <&> \ dom -> Fun (getRange ($1,$2,$3,$4)) dom $4 } | Expr1 '=' Expr { Equal (getRange ($1, $2, $3)) $1 $3 } | Expr1 %prec LOWEST { $1 } -- Level 1: Application Expr1 :: { Expr } Expr1 : WithExprs {% case $1 of { [e] -> return e ; e : es -> return $ WithApp (fuseRange e es) e es ; [] -> parseError "impossible: empty with expressions" } } WithExprs :: { [Expr] } WithExprs : Application3 '|' WithExprs { RawApp (getRange $1) $1 : $3 } | Application { [RawApp (getRange $1) $1] } Application :: { [Expr] } Application : Expr2 { [$1] } | Expr3 Application { $1 : $2 } -- Level 2: Lambdas and lets Expr2 :: { Expr } Expr2 : '\\' LamBindings Expr { Lam (getRange ($1,$2,$3)) $2 $3 } | ExtendedOrAbsurdLam { $1 } | 'forall' ForallBindings Expr { forallPi $2 $3 } | 'let' Declarations LetBody { Let (getRange ($1,$2,$3)) $2 $3 } | 'do' vopen DoStmts close { DoBlock (getRange ($1, $3)) $3 } | Expr3 { $1 } | 'quoteGoal' Id 'in' Expr { QuoteGoal (getRange ($1,$2,$3,$4)) $2 $4 } | 'tactic' Application3 { Tactic (getRange ($1, $2)) (RawApp (getRange $2) $2) [] } | 'tactic' Application3 '|' WithExprs { Tactic (getRange ($1, $2, $3, $4)) (RawApp (getRange $2) $2) $4 } LetBody :: { Maybe Expr } LetBody : 'in' Expr { Just $2 } | {- empty -} { Nothing } ExtendedOrAbsurdLam :: { Expr } ExtendedOrAbsurdLam : '\\' '{' LamClauses '}' { ExtendedLam (getRange ($1,$2,$3,$4)) (reverse $3) } | '\\' 'where' vopen LamWhereClauses close { ExtendedLam (getRange ($1, $2, $4)) (reverse $4) } | '\\' AbsurdLamBindings {% case $2 of Left (bs, h) -> if null bs then return $ AbsurdLam r h else return $ Lam r bs (AbsurdLam r h) where r = fuseRange $1 bs Right es -> do -- it is of the form @\ { p1 ... () }@ p <- exprToLHS (RawApp (getRange es) es); return $ ExtendedLam (fuseRange $1 es) [LamClause (p [] []) AbsurdRHS NoWhere False] } Application3 :: { [Expr] } Application3 : Expr3 { [$1] } | Expr3 Application3 { $1 : $2 } -- Christian Sattler, 2017-08-04, issue #2671 -- We allow empty lists of expressions for the LHS of extended lambda clauses. -- I am not sure what Application3 is otherwise used for, so I keep the -- original type and create this copy solely for extended lambda clauses. Application3PossiblyEmpty :: { [Expr] } Application3PossiblyEmpty : { [] } | Expr3 Application3PossiblyEmpty { $1 : $2 } -- Level 3: Atoms Expr3Curly :: { Expr } Expr3Curly : '{' Expr '}' { HiddenArg (getRange ($1,$2,$3)) (maybeNamed $2) } | '{' '}' { let r = fuseRange $1 $2 in HiddenArg r $ unnamed $ Absurd r } Expr3NoCurly :: { Expr } Expr3NoCurly : '?' { QuestionMark (getRange $1) Nothing } | '_' { Underscore (getRange $1) Nothing } | 'Prop' { Prop (getRange $1) } | 'Set' { Set (getRange $1) } | 'quote' { Quote (getRange $1) } | 'quoteTerm' { QuoteTerm (getRange $1) } | 'quoteContext' { QuoteContext (getRange $1) } | 'unquote' { Unquote (getRange $1) } | setN { SetN (getRange (fst $1)) (snd $1) } | propN { PropN (getRange (fst $1)) (snd $1) } | '{{' Expr DoubleCloseBrace { InstanceArg (getRange ($1,$2,$3)) (maybeNamed $2) } | '(|' Expr '|)' { IdiomBrackets (getRange ($1,$2,$3)) $2 } | '(' ')' { Absurd (fuseRange $1 $2) } | '{{' DoubleCloseBrace { let r = fuseRange $1 $2 in InstanceArg r $ unnamed $ Absurd r } | Id '@' Expr3 { As (getRange ($1,$2,$3)) $1 $3 } | '.' Expr3 { Dot (fuseRange $1 $2) $2 } | 'record' '{' RecordAssignments '}' { Rec (getRange ($1,$2,$3,$4)) $3 } | 'record' Expr3NoCurly '{' FieldAssignments '}' { RecUpdate (getRange ($1,$2,$3,$4,$5)) $2 $4 } | '...' { Ellipsis (getRange $1) } | ExprOrAttr { $1 } ExprOrAttr :: { Expr } ExprOrAttr : QId { Ident $1 } | literal { Lit $1 } | '(' Expr ')' { Paren (getRange ($1,$2,$3)) $2 } Expr3 :: { Expr } Expr3 : Expr3Curly { $1 } | Expr3NoCurly { $1 } RecordAssignments :: { RecordAssignments } RecordAssignments : {- empty -} { [] } | RecordAssignments1 { $1 } RecordAssignments1 :: { RecordAssignments } RecordAssignments1 : RecordAssignment { [$1] } | RecordAssignment ';' RecordAssignments1 { $1 : $3 } RecordAssignment :: { RecordAssignment } RecordAssignment : FieldAssignment { Left $1 } | ModuleAssignment { Right $1 } ModuleAssignment :: { ModuleAssignment } ModuleAssignment : ModuleName OpenArgs ImportDirective { ModuleAssignment $1 $2 $3 } FieldAssignments :: { [FieldAssignment] } FieldAssignments : {- empty -} { [] } | FieldAssignments1 { $1 } FieldAssignments1 :: { [FieldAssignment] } FieldAssignments1 : FieldAssignment { [$1] } | FieldAssignment ';' FieldAssignments1 { $1 : $3 } FieldAssignment :: { FieldAssignment } FieldAssignment : Id '=' Expr { FieldAssignment $1 $3 } {-------------------------------------------------------------------------- Bindings --------------------------------------------------------------------------} -- "Delta ->" to avoid conflict between Delta -> Gamma and Delta -> A. TeleArrow :: { Telescope } TeleArrow : Telescope1 '->' { $1 } Telescope1 :: { Telescope } Telescope1 : TypedBindings { $1 } TypedBindings :: { [TypedBinding] } TypedBindings : TypedBinding TypedBindings { $1 : $2 } | TypedBinding { [$1] } -- A typed binding is either (x1 .. xn : A) or {y1 .. ym : B} -- Andreas, 2011-04-07: or .(x1 .. xn : A) or .{y1 .. ym : B} -- Andreas, 2011-04-27: or ..(x1 .. xn : A) or ..{y1 .. ym : B} TypedBinding :: { TypedBinding } TypedBinding : '.' '(' TBindWithHiding ')' { setRange (getRange ($2,$3,$4)) $ setRelevance Irrelevant $3 } | '.' '{' TBind '}' { setRange (getRange ($2,$3,$4)) $ setHiding Hidden $ setRelevance Irrelevant $3 } | '.' '{{' TBind DoubleCloseBrace { setRange (getRange ($2,$3,$4)) $ makeInstance $ setRelevance Irrelevant $3 } | '..' '(' TBindWithHiding ')' { setRange (getRange ($2,$3,$4)) $ setRelevance NonStrict $3 } | '..' '{' TBind '}' { setRange (getRange ($2,$3,$4)) $ setHiding Hidden $ setRelevance NonStrict $3 } | '..' '{{' TBind DoubleCloseBrace { setRange (getRange ($2,$3,$4)) $ makeInstance $ setRelevance NonStrict $3 } | '(' TBindWithHiding ')' { setRange (getRange ($1,$2,$3)) $2 } | '(' ModalTBindWithHiding ')' { setRange (getRange ($1,$2,$3)) $2 } | '{{' TBind DoubleCloseBrace { setRange (getRange ($1,$2,$3)) $ makeInstance $2 } | '{{' ModalTBind DoubleCloseBrace { setRange (getRange ($1,$2,$3)) $ makeInstance $2 } | '{' TBind '}' { setRange (getRange ($1,$2,$3)) $ setHiding Hidden $2 } | '{' ModalTBind '}' { setRange (getRange ($1,$2,$3)) $ setHiding Hidden $2 } | '(' Open ')' { TLet (getRange ($1,$3)) $2 } | '(' 'let' Declarations ')' { TLet (getRange ($1,$4)) $3 } -- x1 .. xn : A -- x1 .. xn :{i1 i2 ..} A TBind :: { TypedBinding } TBind : CommaBIds ':' Expr { let r = getRange ($1,$2,$3) -- the range is approximate only for TypedBindings in TBind r $1 $3 } ModalTBind :: { TypedBinding } ModalTBind : Attributes1 CommaBIds ':' Expr {% do let r = getRange ($1,$2,$3,$4) -- the range is approximate only for TypedBindings xs <- mapM (applyAttrs $1) $2 return $ TBind r xs $4 } -- x {y z} _ {v} : A TBindWithHiding :: { TypedBinding } TBindWithHiding : BIdsWithHiding ':' Expr { let r = getRange ($1,$2,$3) -- the range is approximate only for TypedBindings in TBind r $1 $3 } ModalTBindWithHiding :: { TypedBinding } ModalTBindWithHiding : Attributes1 BIdsWithHiding ':' Expr {% do let r = getRange ($1,$2,$3,$4) -- the range is approximate only for TypedBindings xs <- mapM (applyAttrs $1) $2 return $ TBind r xs $4 } -- A non-empty sequence of lambda bindings. LamBindings :: { [LamBinding] } LamBindings : LamBinds '->' {% case reverse $1 of Left _ : _ -> parseError "Absurd lambda cannot have a body." _ : _ -> return [ b | Right b <- $1 ] [] -> parsePanic "Empty LamBinds" } AbsurdLamBindings :: { Either ([LamBinding], Hiding) [Expr] } AbsurdLamBindings : LamBindsAbsurd {% case $1 of Left lb -> case reverse lb of Right _ : _ -> parseError "Missing body for lambda" Left h : _ -> return $ Left ([ b | Right b <- init lb], h) _ -> parseError "Unsupported variant of lambda" Right es -> return $ Right es } -- absurd lambda is represented by @Left hiding@ LamBinds :: { [Either Hiding LamBinding] } LamBinds : DomainFreeBinding LamBinds { map Right $1 ++ $2 } | TypedBinding LamBinds { Right (DomainFull $1) : $2 } | DomainFreeBinding { map Right $1 } | TypedBinding { [Right $ DomainFull $1] } | '(' ')' { [Left NotHidden] } | '{' '}' { [Left Hidden] } | '{{' DoubleCloseBrace { [Left (Instance NoOverlap)] } -- Like LamBinds, but could also parse an absurd LHS of an extended lambda @{ p1 ... () }@ LamBindsAbsurd :: { Either [Either Hiding LamBinding] [Expr] } LamBindsAbsurd : DomainFreeBinding LamBinds { Left $ map Right $1 ++ $2 } | TypedBinding LamBinds { Left $ Right (DomainFull $1) : $2 } | DomainFreeBindingAbsurd { case $1 of Left lb -> Left $ map Right lb Right es -> Right es } | TypedBinding { Left [Right $ DomainFull $1] } | '(' ')' { Left [Left NotHidden] } | '{' '}' { Left [Left Hidden] } | '{{' DoubleCloseBrace { Left [Left (Instance NoOverlap)] } -- FNF, 2011-05-05: No where clauses in extended lambdas for now NonAbsurdLamClause :: { LamClause } NonAbsurdLamClause : Application3PossiblyEmpty '->' Expr {% do p <- exprToLHS (RawApp (getRange $1) $1) ; return LamClause{ lamLHS = p [] [] , lamRHS = RHS $3 , lamWhere = NoWhere , lamCatchAll = False } } | CatchallPragma Application3PossiblyEmpty '->' Expr {% do p <- exprToLHS (RawApp (getRange $2) $2) ; return LamClause{ lamLHS = p [] [] , lamRHS = RHS $4 , lamWhere = NoWhere , lamCatchAll = True } } AbsurdLamClause :: { LamClause } AbsurdLamClause -- FNF, 2011-05-09: By being more liberal here, we avoid shift/reduce and reduce/reduce errors. -- Later stages such as scope checking will complain if we let something through which we should not : Application {% do p <- exprToLHS (RawApp (getRange $1) $1); return LamClause{ lamLHS = p [] [] , lamRHS = AbsurdRHS , lamWhere = NoWhere , lamCatchAll = False } } | CatchallPragma Application {% do p <- exprToLHS (RawApp (getRange $2) $2); return LamClause{ lamLHS = p [] [] , lamRHS = AbsurdRHS , lamWhere = NoWhere , lamCatchAll = True } } LamClause :: { LamClause } LamClause : NonAbsurdLamClause { $1 } | AbsurdLamClause { $1 } -- Parses all extended lambda clauses except for a single absurd clause, which is taken care of -- in AbsurdLambda LamClauses :: { [LamClause] } LamClauses : LamClauses semi LamClause { $3 : $1 } | AbsurdLamClause semi LamClause { [$3, $1] } | NonAbsurdLamClause { [$1] } -- | {- empty -} { [] } -- Parses all extended lambda clauses including a single absurd clause. For λ -- where this is not taken care of in AbsurdLambda LamWhereClauses :: { [LamClause] } LamWhereClauses : LamWhereClauses semi LamClause { $3 : $1 } | LamClause { [$1] } ForallBindings :: { [LamBinding] } ForallBindings : TypedUntypedBindings1 '->' { $1 } -- A non-empty sequence of possibly untyped bindings. TypedUntypedBindings1 :: { [LamBinding] } TypedUntypedBindings1 : DomainFreeBinding TypedUntypedBindings1 { $1 ++ $2 } | TypedBinding TypedUntypedBindings1 { DomainFull $1 : $2 } | DomainFreeBinding { $1 } | TypedBinding { [DomainFull $1] } -- A possibly empty sequence of possibly untyped bindings. -- This is used as telescope in data and record decls. TypedUntypedBindings :: { [LamBinding] } TypedUntypedBindings : DomainFreeBinding TypedUntypedBindings { $1 ++ $2 } | TypedBinding TypedUntypedBindings { DomainFull $1 : $2 } | { [] } -- A domain free binding is either x or {x1 .. xn} DomainFreeBinding :: { [LamBinding] } DomainFreeBinding : DomainFreeBindingAbsurd {% case $1 of Left lbs -> return lbs Right _ -> parseError "expected sequence of bound identifiers, not absurd pattern" } -- A domain free binding is either x or {x1 .. xn} DomainFreeBindingAbsurd :: { Either [LamBinding] [Expr]} DomainFreeBindingAbsurd : BId { Left [DomainFree $ defaultNamedArg $ mkBoundName_ $1] } | '.' BId { Left [DomainFree $ setRelevance Irrelevant $ defaultNamedArg $ mkBoundName_ $2] } | '..' BId { Left [DomainFree $ setRelevance NonStrict $ defaultNamedArg $ mkBoundName_ $2] } | '(' CommaBIdAndAbsurds ')' { mapLeft (map DomainFree) $2 } | '(' Attributes1 CommaBIdAndAbsurds ')' {% applyAttrs $2 defaultArgInfo <&> \ ai -> mapLeft (map (DomainFree . setArgInfo ai)) $3 } | '{' CommaBIdAndAbsurds '}' { mapLeft (map (DomainFree . setHiding Hidden)) $2 } | '{' Attributes1 CommaBIdAndAbsurds '}' {% applyAttrs $2 defaultArgInfo <&> \ ai -> mapLeft (map (DomainFree . setHiding Hidden . setArgInfo ai)) $3 } | '{{' CommaBIds DoubleCloseBrace { Left $ map (DomainFree . makeInstance) $2 } | '{{' Attributes1 CommaBIds DoubleCloseBrace {% applyAttrs $2 defaultArgInfo <&> \ ai -> Left $ map (DomainFree . makeInstance . setArgInfo ai) $3 } | '.' '{' CommaBIds '}' { Left $ map (DomainFree . setHiding Hidden . setRelevance Irrelevant) $3 } | '.' '{{' CommaBIds DoubleCloseBrace { Left $ map (DomainFree . makeInstance . setRelevance Irrelevant) $3 } | '..' '{' CommaBIds '}' { Left $ map (DomainFree . setHiding Hidden . setRelevance NonStrict) $3 } | '..' '{{' CommaBIds DoubleCloseBrace { Left $ map (DomainFree . makeInstance . setRelevance NonStrict) $3 } {-------------------------------------------------------------------------- Do-notation --------------------------------------------------------------------------} DoStmts :: { [DoStmt] } DoStmts : DoStmt { [$1] } | DoStmt vsemi { [$1] } -- #3046 | DoStmt semi DoStmts { $1 : $3 } DoStmt :: { DoStmt } DoStmt : Expr DoWhere {% buildDoStmt $1 $2 } DoWhere :: { [LamClause] } DoWhere : {- empty -} { [] } | 'where' vopen LamWhereClauses close { reverse $3 } {-------------------------------------------------------------------------- Modules and imports --------------------------------------------------------------------------} -- Import directives ImportDirective :: { ImportDirective } ImportDirective : ImportDirectives {% mergeImportDirectives $1 } ImportDirectives :: { [ImportDirective] } ImportDirectives : ImportDirective1 ImportDirectives { $1 : $2 } | {- empty -} { [] } ImportDirective1 :: { ImportDirective } : 'public' { defaultImportDir { importDirRange = getRange $1, publicOpen = True } } | Using { defaultImportDir { importDirRange = snd $1, using = fst $1 } } | Hiding { defaultImportDir { importDirRange = snd $1, hiding = fst $1 } } | RenamingDir { defaultImportDir { importDirRange = snd $1, impRenaming = fst $1 } } Using :: { (Using, Range) } Using : 'using' '(' CommaImportNames ')' { (Using $3 , getRange ($1,$2,$3,$4)) } -- using can have an empty list Hiding :: { ([ImportedName], Range) } Hiding : 'hiding' '(' CommaImportNames ')' { ($3 , getRange ($1,$2,$3,$4)) } -- if you want to hide nothing that's fine, isn't it? RenamingDir :: { ([Renaming] , Range) } RenamingDir : 'renaming' '(' Renamings ')' { ($3 , getRange ($1,$2,$3,$4)) } | 'renaming' '(' ')' { ([] , getRange ($1,$2,$3)) } -- Renamings of the form 'x to y' Renamings :: { [Renaming] } Renamings : Renaming ';' Renamings { $1 : $3 } | Renaming { [$1] } Renaming :: { Renaming } Renaming : ImportName_ 'to' Id { Renaming $1 (setImportedName $1 $3) (getRange $2) } -- We need a special imported name here, since we have to trigger -- the imp_dir state exactly one token before the 'to' ImportName_ :: { ImportedName } ImportName_ : beginImpDir Id { ImportedName $2 } | 'module' beginImpDir Id { ImportedModule $3 } ImportName :: { ImportedName } ImportName : Id { ImportedName $1 } | 'module' Id { ImportedModule $2 } -- Actually semi-colon separated CommaImportNames :: { [ImportedName] } CommaImportNames : {- empty -} { [] } | CommaImportNames1 { $1 } CommaImportNames1 :: { [ImportedName] } CommaImportNames1 : ImportName { [$1] } | ImportName ';' CommaImportNames1 { $1 : $3 } {-------------------------------------------------------------------------- Function clauses --------------------------------------------------------------------------} -- A left hand side of a function clause. We parse it as an expression, and -- then check that it is a valid left hand side. LHS :: { LHS } LHS : Expr1 RewriteEquations WithExpressions {% exprToLHS $1 >>= \p -> return (p $2 $3) } WithExpressions :: { [Expr] } WithExpressions : {- empty -} { [] } | 'with' Expr { case $2 of { WithApp _ e es -> e : es; e -> [e] } } RewriteEquations :: { [Expr] } RewriteEquations : {- empty -} { [] } | 'rewrite' Expr1 { case $2 of { WithApp _ e es -> e : es; e -> [e] } } -- Parsing either an expression @e@ or a @rewrite e1 | ... | en@. HoleContent :: { HoleContent } HoleContent : Expr { HoleContentExpr $1 } | RewriteEquations { HoleContentRewrite $1 } -- Where clauses are optional. WhereClause :: { WhereClause } WhereClause : {- empty -} { NoWhere } | 'where' Declarations0 { AnyWhere $2 } | 'module' Id 'where' Declarations0 { SomeWhere $2 PublicAccess $4 } | 'module' Underscore 'where' Declarations0 { SomeWhere $2 PublicAccess $4 } ExprWhere :: { ExprWhere } ExprWhere : Expr WhereClause { ExprWhere $1 $2 } {-------------------------------------------------------------------------- Different kinds of declarations --------------------------------------------------------------------------} -- Top-level definitions. Declaration :: { [Declaration] } Declaration : Fields { $1 } | FunClause { $1 } -- includes type signatures | Data { [$1] } | DataSig { [$1] } -- lone data type signature in mutual block | Record { [$1] } | RecordSig { [$1] } -- lone record signature in mutual block | Infix { [$1] } | Generalize { $1 } | Mutual { [$1] } | Abstract { [$1] } | Private { [$1] } | Instance { [$1] } | Macro { [$1] } | Postulate { [$1] } | Primitive { [$1] } | Open { $1 } -- | Import { [$1] } | ModuleMacro { [$1] } | Module { [$1] } | Pragma { [$1] } | Syntax { [$1] } | PatternSyn { [$1] } | UnquoteDecl { [$1] } {-------------------------------------------------------------------------- Individual declarations --------------------------------------------------------------------------} -- Type signatures of the form "n1 n2 n3 ... : Type", with at least -- one bound name. TypeSigs :: { [Declaration] } TypeSigs : SpaceIds ':' Expr { map (\ x -> typeSig defaultArgInfo x $3) $1 } -- A variant of TypeSigs where any sub-sequence of names can be marked -- as hidden or irrelevant using braces and dots: -- {n1 .n2} n3 .n4 {n5} .{n6 n7} ... : Type. ArgTypeSigs :: { [Arg Declaration] } ArgTypeSigs : ModalArgIds ':' Expr { map (fmap (\ x -> typeSig defaultArgInfo x $3)) $1 } | 'overlap' ModalArgIds ':' Expr {% let setOverlap x = case getHiding x of Instance _ -> return $ makeInstance' YesOverlap x _ -> parseErrorRange $1 "The 'overlap' keyword only applies to instance fields (fields marked with {{ }})" in T.traverse (setOverlap . fmap (\ x -> typeSig defaultArgInfo x $4)) $2 } | 'instance' ArgTypeSignatures { let setInstance (TypeSig info x t) = TypeSig (makeInstance info) x t setInstance _ = __IMPOSSIBLE__ in map (fmap setInstance) $2 } -- Function declarations. The left hand side is parsed as an expression to allow -- declarations like 'x::xs ++ ys = e', when '::' has higher precedence than '++'. -- FunClause also handle possibly dotted type signatures. FunClause :: { [Declaration] } FunClause : LHS RHS WhereClause {% funClauseOrTypeSigs [] $1 $2 $3 } | Attributes1 LHS RHS WhereClause {% funClauseOrTypeSigs $1 $2 $3 $4 } RHS :: { RHSOrTypeSigs } RHS : '=' Expr { JustRHS (RHS $2) } | ':' Expr { TypeSigsRHS $2 } | {- empty -} { JustRHS AbsurdRHS } -- Data declaration. Can be local. Data :: { Declaration } Data : 'data' Id TypedUntypedBindings ':' Expr 'where' Declarations0 { Data (getRange ($1,$2,$3,$4,$5,$6,$7)) Inductive $2 $3 $5 $7 } | 'codata' Id TypedUntypedBindings ':' Expr 'where' Declarations0 { Data (getRange ($1,$2,$3,$4,$5,$6,$7)) CoInductive $2 $3 $5 $7 } -- New cases when we already had a DataSig. Then one can omit the sort. | 'data' Id TypedUntypedBindings 'where' Declarations0 { DataDef (getRange ($1,$2,$3,$4,$5)) Inductive $2 $3 $5 } | 'codata' Id TypedUntypedBindings 'where' Declarations0 { DataDef (getRange ($1,$2,$3,$4,$5)) CoInductive $2 $3 $5 } -- Data type signature. Found in mutual blocks. DataSig :: { Declaration } DataSig : 'data' Id TypedUntypedBindings ':' Expr { DataSig (getRange ($1,$2,$3,$4,$5)) Inductive $2 $3 $5 } -- Andreas, 2012-03-16: The Expr3NoCurly instead of Id in everything -- following 'record' is to remove the (harmless) shift/reduce conflict -- introduced by record update expressions. -- Record declarations. Record :: { Declaration } Record : 'record' Expr3NoCurly TypedUntypedBindings ':' Expr 'where' RecordDeclarations {% exprToName $2 >>= \ n -> let ((x,y,z),ds) = $7 in return $ Record (getRange ($1,$2,$3,$4,$5,$6,$7)) n x y z $3 $5 ds } | 'record' Expr3NoCurly TypedUntypedBindings 'where' RecordDeclarations {% exprToName $2 >>= \ n -> let ((x,y,z),ds) = $5 in return $ RecordDef (getRange ($1,$2,$3,$4,$5)) n x y z $3 ds } -- Record type signature. In mutual blocks. RecordSig :: { Declaration } RecordSig : 'record' Expr3NoCurly TypedUntypedBindings ':' Expr {% exprToName $2 >>= \ n -> return $ RecordSig (getRange ($1,$2,$3,$4,$5)) n $3 $5 } -- Declaration of record constructor name. RecordConstructorName :: { (Name, IsInstance) } RecordConstructorName : 'constructor' Id { ($2, NotInstanceDef) } | 'instance' vopen 'constructor' Id vclose { ($4, InstanceDef) } -- Fixity declarations. Infix :: { Declaration } Infix : 'infix' Int SpaceBIds { Infix (Fixity (getRange ($1,$3)) (Related $2) NonAssoc) $3 } | 'infixl' Int SpaceBIds { Infix (Fixity (getRange ($1,$3)) (Related $2) LeftAssoc) $3 } | 'infixr' Int SpaceBIds { Infix (Fixity (getRange ($1,$3)) (Related $2) RightAssoc) $3 } -- Field declarations. Fields :: { [Declaration] } Fields : 'field' ArgTypeSignatures { let inst i = case getHiding i of Instance _ -> InstanceDef _ -> NotInstanceDef toField (Arg info (TypeSig info' x t)) = Field (inst info') x (Arg info t) in map toField $2 } -- | 'field' ModalArgTypeSignatures -- { let -- inst i = case getHiding i of -- Instance _ -> InstanceDef -- _ -> NotInstanceDef -- toField (Arg info (TypeSig info' x t)) = Field (inst info') x (Arg info t) -- in map toField $2 } -- Variable declarations for automatic generalization Generalize :: { [Declaration] } Generalize : 'variable' ArgTypeSignaturesOrEmpty { let toGeneralize (Arg info (TypeSig _ x t)) = TypeSig info x t in [ Generalize (fuseRange $1 $2) (map toGeneralize $2) ] } -- Mutually recursive declarations. Mutual :: { Declaration } Mutual : 'mutual' Declarations0 { Mutual (fuseRange $1 $2) $2 } -- Abstract declarations. Abstract :: { Declaration } Abstract : 'abstract' Declarations0 { Abstract (fuseRange $1 $2) $2 } -- Private can only appear on the top-level (or rather the module level). Private :: { Declaration } Private : 'private' Declarations0 { Private (fuseRange $1 $2) UserWritten $2 } -- Instance declarations. Instance :: { Declaration } Instance : 'instance' Declarations0 { InstanceB (fuseRange $1 $2) $2 } -- Macro declarations. Macro :: { Declaration } Macro : 'macro' Declarations0 { Macro (fuseRange $1 $2) $2 } -- Postulates. Postulate :: { Declaration } Postulate : 'postulate' Declarations0 { Postulate (fuseRange $1 $2) $2 } -- Primitives. Can only contain type signatures. Primitive :: { Declaration } Primitive : 'primitive' TypeSignatures0 { Primitive (fuseRange $1 $2) $2 } -- Unquoting declarations. UnquoteDecl :: { Declaration } UnquoteDecl : 'unquoteDecl' '=' Expr { UnquoteDecl (fuseRange $1 $3) [] $3 } | 'unquoteDecl' SpaceIds '=' Expr { UnquoteDecl (fuseRange $1 $4) $2 $4 } | 'unquoteDef' SpaceIds '=' Expr { UnquoteDef (fuseRange $1 $4) $2 $4 } -- Syntax declaration (To declare eg. mixfix binders) Syntax :: { Declaration } Syntax : 'syntax' Id HoleNames '=' SimpleIds {% case $2 of Name _ _ [_] -> case mkNotation $3 $5 of Left err -> parseError $ "Malformed syntax declaration: " ++ err Right n -> return $ Syntax $2 n _ -> parseError "Syntax declarations are allowed only for simple names (without holes)" } -- Pattern synonyms. PatternSyn :: { Declaration } PatternSyn : 'pattern' Id PatternSynArgs '=' Expr {% do p <- exprToPattern $5 return (PatternSyn (getRange ($1,$2,$3,$4,$5)) $2 $3 p) } PatternSynArgs :: { [Arg Name] } PatternSynArgs : {- empty -} { [] } | LamBinds {% patternSynArgs $1 } SimpleIds :: { [RString] } SimpleIds : SimpleId { [$1] } | SimpleIds SimpleId {$1 ++ [$2]} HoleNames :: { [NamedArg HoleName] } HoleNames : HoleName { [$1] } | HoleNames HoleName {$1 ++ [$2]} HoleName :: { NamedArg HoleName } HoleName : SimpleTopHole { defaultNamedArg $1 } | '{' SimpleHole '}' { hide $ defaultNamedArg $2 } | '{{' SimpleHole '}}' { makeInstance $ defaultNamedArg $2 } | '{' SimpleId '=' SimpleHole '}' { hide $ defaultArg $ named $2 $4 } | '{{' SimpleId '=' SimpleHole '}}' { makeInstance $ defaultArg $ named $2 $4 } SimpleTopHole :: { HoleName } SimpleTopHole : SimpleId { ExprHole $1 } | '(' '\\' SimpleId '->' SimpleId ')' { LambdaHole $3 $5 } | '(' '\\' '_' '->' SimpleId ')' { LambdaHole (Ranged (getRange $3) "_") $5 } SimpleHole :: { HoleName } SimpleHole : SimpleId { ExprHole $1 } | '\\' SimpleId '->' SimpleId { LambdaHole $2 $4 } | '\\' '_' '->' SimpleId { LambdaHole (Ranged (getRange $3) "_") $4 } -- Variable name hole to be implemented later. -- Discard the interval. SimpleId :: { RString } SimpleId : id { Ranged (getRange $ fst $1) (stringToRawName $ snd $1) } MaybeOpen :: { Maybe Range } MaybeOpen : 'open' { Just (getRange $1) } | {- empty -} { Nothing } -- Open Open :: { [Declaration] } Open : MaybeOpen 'import' ModuleName OpenArgs ImportDirective {% let { doOpen = maybe DontOpen (const DoOpen) $1 ; m = $3 ; es = $4 ; dir = $5 ; r = getRange ($1, $2, m, es, dir) ; mr = getRange m ; unique = hashString $ prettyShow $ (Strict.Nothing :: Strict.Maybe ()) <$ r -- turn range into unique id, but delete file path -- which is absolute and messes up suite of failing tests -- (different hashs on different installations) -- TODO: Don't use (insecure) hashes in this way. ; fresh = Name mr NotInScope [ Id $ stringToRawName $ ".#" ++ prettyShow m ++ "-" ++ show unique ] ; fresh' = Name mr NotInScope [ Id $ stringToRawName $ ".#" ++ prettyShow m ++ "-" ++ show (unique + 1) ] ; impStm asR = Import r m (Just (AsName (Right fresh) asR)) DontOpen defaultImportDir ; appStm m' es = Private r Inserted [ ModuleMacro r m' (SectionApp (getRange es) [] (RawApp (getRange es) (Ident (QName fresh) : es))) doOpen dir ] ; (initArgs, last2Args) = splitAt (length es - 2) es ; parseAsClause = case last2Args of { [ Ident (QName (Name asR InScope [Id x])) , e -- Andreas, 2018-11-03, issue #3364, accept anything after 'as' -- but require it to be a 'Name' in the scope checker. ] | rawNameToString x == "as" -> Just . (asR,) $ if | Ident (QName m') <- e -> Right m' | otherwise -> Left e ; _ -> Nothing } } in case es of { [] -> return [Import r m Nothing doOpen dir] ; _ | Just (asR, m') <- parseAsClause -> if null initArgs then return [ Import (getRange (m, asR, m', dir)) m (Just (AsName m' asR)) doOpen dir ] else return [ impStm asR, appStm (fromRight (const fresh') m') initArgs ] -- Andreas, 2017-05-13, issue #2579 -- Nisse reports that importing with instantation but without open -- could be usefule for bringing instances into scope. -- Ulf, 2018-12-6: Not since fixes of #1913 and #2489 which require -- instances to be in scope. | DontOpen <- doOpen -> parseErrorRange $2 "An import statement with module instantiation is useless without either an `open' keyword or an `as` binding giving a name to the instantiated module." | otherwise -> return [ impStm noRange , appStm (noName $ beginningOf $ getRange m) es ] } } |'open' ModuleName OpenArgs ImportDirective { let { m = $2 ; es = $3 ; dir = $4 ; r = getRange ($1, m, es, dir) } in [ case es of { [] -> Open r m dir ; _ -> Private r Inserted [ ModuleMacro r (noName $ beginningOf $ getRange m) (SectionApp (getRange (m , es)) [] (RawApp (fuseRange m es) (Ident m : es))) DoOpen dir ] } ] } | 'open' ModuleName '{{' '...' DoubleCloseBrace ImportDirective { let r = getRange $2 in [ Private r Inserted [ ModuleMacro r (noName $ beginningOf $ getRange $2) (RecordModuleInstance r $2) DoOpen $6 ] ] } OpenArgs :: { [Expr] } OpenArgs : {- empty -} { [] } | Expr3 OpenArgs { $1 : $2 } ModuleApplication :: { Telescope -> Parser ModuleApplication } ModuleApplication : ModuleName '{{' '...' DoubleCloseBrace { (\ts -> if null ts then return $ RecordModuleInstance (getRange ($1,$2,$3,$4)) $1 else parseError "No bindings allowed for record module with non-canonical implicits" ) } | ModuleName OpenArgs { (\ts -> return $ SectionApp (getRange ($1, $2)) ts (RawApp (fuseRange $1 $2) (Ident $1 : $2)) ) } -- Module instantiation ModuleMacro :: { Declaration } ModuleMacro : 'module' ModuleName TypedUntypedBindings '=' ModuleApplication ImportDirective {% do { ma <- $5 (map addType $3) ; name <- ensureUnqual $2 ; return $ ModuleMacro (getRange ($1, $2, ma, $6)) name ma DontOpen $6 } } | 'open' 'module' Id TypedUntypedBindings '=' ModuleApplication ImportDirective {% do {ma <- $6 (map addType $4); return $ ModuleMacro (getRange ($1, $2, $3, ma, $7)) $3 ma DoOpen $7 } } -- Module Module :: { Declaration } Module : 'module' ModuleName TypedUntypedBindings 'where' Declarations0 { Module (getRange ($1,$2,$3,$4,$5)) $2 (map addType $3) $5 } | 'module' Underscore TypedUntypedBindings 'where' Declarations0 { Module (getRange ($1,$2,$3,$4,$5)) (QName $2) (map addType $3) $5 } Underscore :: { Name } Underscore : '_' { noName (getRange $1) } TopLevel :: { [Declaration] } TopLevel : TopDeclarations { figureOutTopLevelModule $1 } Pragma :: { Declaration } Pragma : DeclarationPragma { Pragma $1 } DeclarationPragma :: { Pragma } DeclarationPragma : BuiltinPragma { $1 } | RewritePragma { $1 } | CompilePragma { $1 } | ForeignPragma { $1 } | StaticPragma { $1 } | InjectivePragma { $1 } | InlinePragma { $1 } | NoInlinePragma { $1 } | ImpossiblePragma { $1 } | TerminatingPragma { $1 } | NonTerminatingPragma { $1 } | NoTerminationCheckPragma { $1 } | WarningOnUsagePragma { $1 } | MeasurePragma { $1 } | CatchallPragma { $1 } | DisplayPragma { $1 } | EtaPragma { $1 } | NoPositivityCheckPragma { $1 } | NoUniverseCheckPragma { $1 } | PolarityPragma { $1 } | OptionsPragma { $1 } -- Andreas, 2014-03-06 -- OPTIONS pragma not allowed everywhere, but don't give parse error. -- Give better error during type checking instead. OptionsPragma :: { Pragma } OptionsPragma : '{-#' 'OPTIONS' PragmaStrings '#-}' { OptionsPragma (getRange ($1,$2,$4)) $3 } BuiltinPragma :: { Pragma } BuiltinPragma : '{-#' 'BUILTIN' string PragmaQName '#-}' { BuiltinPragma (getRange ($1,$2,fst $3,$4,$5)) (snd $3) $4 } -- Extra rule to accept keyword REWRITE also as built-in: | '{-#' 'BUILTIN' 'REWRITE' PragmaQName '#-}' { BuiltinPragma (getRange ($1,$2,$3,$4,$5)) "REWRITE" $4 } RewritePragma :: { Pragma } RewritePragma : '{-#' 'REWRITE' PragmaQNames '#-}' { RewritePragma (getRange ($1,$2,$3,$4)) $3 } ForeignPragma :: { Pragma } ForeignPragma : '{-#' 'FOREIGN' string ForeignCode '#-}' { ForeignPragma (getRange ($1, $2, fst $3, $5)) (snd $3) (recoverLayout $4) } CompilePragma :: { Pragma } CompilePragma : '{-#' 'COMPILE' string PragmaQName PragmaStrings '#-}' { CompilePragma (getRange ($1,$2,fst $3,$4,$6)) (snd $3) $4 (unwords $5) } StaticPragma :: { Pragma } StaticPragma : '{-#' 'STATIC' PragmaQName '#-}' { StaticPragma (getRange ($1,$2,$3,$4)) $3 } InlinePragma :: { Pragma } InlinePragma : '{-#' 'INLINE' PragmaQName '#-}' { InlinePragma (getRange ($1,$2,$3,$4)) True $3 } NoInlinePragma :: { Pragma } NoInlinePragma : '{-#' 'NOINLINE' PragmaQName '#-}' { InlinePragma (getRange ($1,$2,$3,$4)) False $3 } InjectivePragma :: { Pragma } InjectivePragma : '{-#' 'INJECTIVE' PragmaQName '#-}' { InjectivePragma (getRange ($1,$2,$3,$4)) $3 } DisplayPragma :: { Pragma } DisplayPragma : '{-#' 'DISPLAY' string PragmaStrings '#-}' {% let (r, s) = $3 in parseDisplayPragma (fuseRange $1 $5) (iStart r) (unwords (s : $4)) } EtaPragma :: { Pragma } EtaPragma : '{-#' 'ETA' PragmaQName '#-}' { EtaPragma (getRange ($1,$2,$3,$4)) $3 } NoTerminationCheckPragma :: { Pragma } NoTerminationCheckPragma : '{-#' 'NO_TERMINATION_CHECK' '#-}' { TerminationCheckPragma (getRange ($1,$2,$3)) NoTerminationCheck } NonTerminatingPragma :: { Pragma } NonTerminatingPragma : '{-#' 'NON_TERMINATING' '#-}' { TerminationCheckPragma (getRange ($1,$2,$3)) NonTerminating } TerminatingPragma :: { Pragma } TerminatingPragma : '{-#' 'TERMINATING' '#-}' { TerminationCheckPragma (getRange ($1,$2,$3)) Terminating } MeasurePragma :: { Pragma } MeasurePragma : '{-#' 'MEASURE' PragmaName '#-}' { let r = getRange ($1, $2, $3, $4) in TerminationCheckPragma r (TerminationMeasure r $3) } CatchallPragma :: { Pragma } CatchallPragma : '{-#' 'CATCHALL' '#-}' { CatchallPragma (getRange ($1,$2,$3)) } ImpossiblePragma :: { Pragma } : '{-#' 'IMPOSSIBLE' '#-}' { ImpossiblePragma (getRange ($1,$2,$3)) } NoPositivityCheckPragma :: { Pragma } NoPositivityCheckPragma : '{-#' 'NO_POSITIVITY_CHECK' '#-}' { NoPositivityCheckPragma (getRange ($1,$2,$3)) } NoUniverseCheckPragma :: { Pragma } NoUniverseCheckPragma : '{-#' 'NO_UNIVERSE_CHECK' '#-}' { NoUniverseCheckPragma (getRange ($1,$2,$3)) } PolarityPragma :: { Pragma } PolarityPragma : '{-#' 'POLARITY' PragmaName Polarities '#-}' { let (rs, occs) = unzip (reverse $4) in PolarityPragma (getRange ($1,$2,$3,rs,$5)) $3 occs } WarningOnUsagePragma :: { Pragma } WarningOnUsagePragma : '{-#' 'WARNING_ON_USAGE' PragmaQName literal '#-}' {% case $4 of { LitString r str -> return $ WarningOnUsage (getRange ($1,$2,$3,r,$5)) $3 str ; _ -> parseError "Expected string literal" } } -- Possibly empty list of polarities. Reversed. Polarities :: { [(Range, Occurrence)] } Polarities : {- empty -} { [] } | Polarities Polarity { $2 : $1 } Polarity :: { (Range, Occurrence) } Polarity : string {% polarity $1 } {-------------------------------------------------------------------------- Sequences of declarations --------------------------------------------------------------------------} -- Possibly empty list of type signatures, with several identifiers allowed -- for every signature. TypeSignatures0 :: { [TypeSignature] } TypeSignatures : vopen close { [] } | TypeSignatures { $1 } -- Non-empty list of type signatures, with several identifiers allowed -- for every signature. TypeSignatures :: { [TypeSignature] } TypeSignatures : vopen TypeSignatures1 close { reverse $2 } -- Inside the layout block. TypeSignatures1 :: { [TypeSignature] } TypeSignatures1 : TypeSignatures1 semi TypeSigs { reverse $3 ++ $1 } | TypeSigs { reverse $1 } -- A variant of TypeSignatures which uses ArgTypeSigs instead of -- TypeSigs. ArgTypeSignatures :: { [Arg TypeSignature] } ArgTypeSignatures : vopen ArgTypeSignatures1 close { reverse $2 } -- Inside the layout block. ArgTypeSignatures1 :: { [Arg TypeSignature] } ArgTypeSignatures1 : ArgTypeSignatures1 semi ArgTypeSigs { reverse $3 ++ $1 } | ArgTypeSigs { reverse $1 } -- A variant of TypeSignatures which uses ArgTypeSigs instead of -- TypeSigs. ArgTypeSignaturesOrEmpty :: { [Arg TypeSignature] } ArgTypeSignaturesOrEmpty : vopen ArgTypeSignatures0 close { reverse $2 } -- Inside the layout block. ArgTypeSignatures0 :: { [Arg TypeSignature] } ArgTypeSignatures0 : ArgTypeSignatures0 semi ArgTypeSigs { reverse $3 ++ $1 } | ArgTypeSigs { reverse $1 } | {- empty -} { [] } -- -- A variant of TypeSignatures which uses ModalArgTypeSigs instead of -- -- TypeSigs. -- ModalArgTypeSignatures :: { [Arg TypeSignature] } -- ModalArgTypeSignatures -- : vopen ModalArgTypeSignatures1 close { reverse $2 } -- -- Inside the layout block. -- ModalArgTypeSignatures1 :: { [Arg TypeSignature] } -- ModalArgTypeSignatures1 -- : ModalArgTypeSignatures1 semi ModalArgTypeSigs { reverse $3 ++ $1 } -- | ModalArgTypeSigs { reverse $1 } -- Record declarations, including an optional record constructor name. RecordDeclarations :: { ((Maybe (Ranged Induction), Maybe HasEta, Maybe (Name, IsInstance)), [Declaration]) } RecordDeclarations : vopen RecordDirectives close {% ((,) `fmap` verifyRecordDirectives $2 <*> pure []) } | vopen RecordDirectives semi Declarations1 close {% ((,) `fmap` verifyRecordDirectives $2 <*> pure $4) } | vopen Declarations1 close {% ((,) `fmap` verifyRecordDirectives [] <*> pure $2) } RecordDirectives :: { [RecordDirective] } RecordDirectives : { [] } | RecordDirectives semi RecordDirective { $3 : $1 } | RecordDirective { [$1] } RecordDirective :: { RecordDirective } RecordDirective : RecordConstructorName { Constructor $1 } | RecordInduction { Induction $1 } | RecordEta { Eta $1 } RecordEta :: { Ranged HasEta } RecordEta : 'eta-equality' { Ranged (getRange $1) YesEta } | 'no-eta-equality' { Ranged (getRange $1) NoEta } -- Declaration of record as 'inductive' or 'coinductive'. RecordInduction :: { Ranged Induction } RecordInduction : 'inductive' { Ranged (getRange $1) Inductive } | 'coinductive' { Ranged (getRange $1) CoInductive } -- Arbitrary declarations Declarations :: { [Declaration] } Declarations : vopen Declarations1 close { $2 } -- Arbitrary declarations (possibly empty) Declarations0 :: { [Declaration] } Declarations0 : vopen close { [] } | Declarations { $1 } Declarations1 :: { [Declaration] } Declarations1 : Declaration semi Declarations1 { $1 ++ $3 } | Declaration vsemi { $1 } -- #3046 | Declaration { $1 } TopDeclarations :: { [Declaration] } TopDeclarations : {- empty -} { [] } | Declarations1 { $1 } { {-------------------------------------------------------------------------- Parsers --------------------------------------------------------------------------} -- | Parse the token stream. Used by the TeX compiler. tokensParser :: Parser [Token] -- | Parse an expression. Could be used in interactions. exprParser :: Parser Expr -- | Parse an expression followed by a where clause. Could be used in interactions. exprWhereParser :: Parser ExprWhere -- | Parse a module. moduleParser :: Parser Module {-------------------------------------------------------------------------- Happy stuff --------------------------------------------------------------------------} -- | Required by Happy. happyError :: Parser a happyError = parseError "Parse error" {-------------------------------------------------------------------------- Utility functions --------------------------------------------------------------------------} -- | Grab leading OPTIONS pragmas. takeOptionsPragmas :: [Declaration] -> ([Pragma], [Declaration]) takeOptionsPragmas = spanJust $ \ d -> case d of Pragma p@OptionsPragma{} -> Just p _ -> Nothing -- | Insert a top-level module if there is none. -- Also fix-up for the case the declarations in the top-level module -- are not indented (this is allowed as a special case). figureOutTopLevelModule :: [Declaration] -> [Declaration] figureOutTopLevelModule ds = case spanAllowedBeforeModule ds of -- Andreas 2016-02-01, issue #1388. -- We need to distinguish two additional cases. -- Case 1: Regular file layout: imports followed by one module. Nothing to do. (ds0, [ Module{} ]) -> ds -- Case 2: The declarations in the module are not indented. -- This is allowed for the top level module, and thus rectified here. (ds0, Module r m tel [] : ds2) -> ds0 ++ [Module r m tel ds2] -- Case 3: There is a module with indented declarations, -- followed by non-indented declarations. This should be a -- parse error and be reported later (see @toAbstract TopLevel{}@), -- thus, we do not do anything here. (ds0, Module r m tel ds1 : ds2) -> ds -- Gives parse error in scope checker. -- OLD code causing issue 1388: -- (ds0, Module r m tel ds1 : ds2) -> ds0 ++ [Module r m tel $ ds1 ++ ds2] -- Case 4: a top-level module declaration is missing. -- Andreas, 2017-01-01, issue #2229: -- Put everything (except OPTIONS pragmas) into an anonymous module. _ -> ds0 ++ [Module r (QName $ noName r) [] ds1] where (ds0, ds1) = (`span` ds) $ \case Pragma OptionsPragma{} -> True _ -> False -- Andreas, 2017-05-17, issue #2574. -- Since the module noName will act as jump target, it needs a range. -- We use the beginning of the file as beginning of the top level module. r = beginningOfFile $ getRange ds1 -- | Create a name from a string. mkName :: (Interval, String) -> Parser Name mkName (i, s) = do let xs = C.stringNameParts s mapM_ isValidId xs unless (alternating xs) $ parseError $ "a name cannot contain two consecutive underscores" return $ Name (getRange i) InScope xs where isValidId Hole = return () isValidId (Id y) = do let x = rawNameToString y err = "in the name " ++ s ++ ", the part " ++ x ++ " is not valid" case parse defaultParseFlags [0] (lexer return) x of ParseOk _ TokId{} -> return () ParseFailed{} -> parseError err ParseOk _ TokEOF{} -> parseError err ParseOk _ t -> parseError . ((err ++ " because it is ") ++) $ case t of TokId{} -> __IMPOSSIBLE__ TokQId{} -> __IMPOSSIBLE__ -- "qualified" TokKeyword{} -> "a keyword" TokLiteral{} -> "a literal" TokSymbol s _ -> case s of SymDot -> __IMPOSSIBLE__ -- "reserved" SymSemi -> "used to separate declarations" SymVirtualSemi -> __IMPOSSIBLE__ SymBar -> "used for with-arguments" SymColon -> "part of declaration syntax" SymArrow -> "the function arrow" SymEqual -> "part of declaration syntax" SymLambda -> "used for lambda-abstraction" SymUnderscore -> "used for anonymous identifiers" SymQuestionMark -> "a meta variable" SymAs -> "used for as-patterns" SymOpenParen -> "used to parenthesize expressions" SymCloseParen -> "used to parenthesize expressions" SymOpenIdiomBracket -> "an idiom bracket" SymCloseIdiomBracket -> "an idiom bracket" SymDoubleOpenBrace -> "used for instance arguments" SymDoubleCloseBrace -> "used for instance arguments" SymOpenBrace -> "used for hidden arguments" SymCloseBrace -> "used for hidden arguments" SymOpenVirtualBrace -> __IMPOSSIBLE__ SymCloseVirtualBrace -> __IMPOSSIBLE__ SymOpenPragma -> __IMPOSSIBLE__ -- "used for pragmas" SymClosePragma -> __IMPOSSIBLE__ -- "used for pragmas" SymEllipsis -> "used for function clauses" SymDotDot -> __IMPOSSIBLE__ -- "a modality" SymEndComment -> "the end-of-comment brace" TokString{} -> __IMPOSSIBLE__ TokSetN{} -> "a type universe" TokPropN{} -> "a prop universe" TokTeX{} -> __IMPOSSIBLE__ -- used by the LaTeX backend only TokMarkup{} -> __IMPOSSIBLE__ -- ditto TokComment{} -> __IMPOSSIBLE__ TokDummy{} -> __IMPOSSIBLE__ TokEOF{} -> __IMPOSSIBLE__ -- we know that there are no two Ids in a row alternating (Hole : Hole : _) = False alternating (_ : xs) = alternating xs alternating [] = True -- | Create a qualified name from a list of strings mkQName :: [(Interval, String)] -> Parser QName mkQName ss = do xs <- mapM mkName ss return $ foldr Qual (QName $ last xs) (init xs) -- | Create a qualified name from a string (used in pragmas). -- Range of each name component is range of whole string. -- TODO: precise ranges! pragmaQName :: (Interval, String) -> Parser QName pragmaQName (r, s) = do let ss = chopWhen (== '.') s mkQName $ map (r,) ss mkNamedArg :: Maybe QName -> Either QName Range -> Parser (NamedArg BoundName) mkNamedArg x y = do lbl <- case x of Nothing -> return $ Just $ unranged "_" Just (QName x) -> return $ Just $ Ranged (getRange x) (prettyShow x) _ -> parseError "expected unqualified variable name" var <- case y of Left (QName y) -> return $ BName y noFixity' Right r -> return $ BName (noName r) noFixity' _ -> parseError "expected unqualified variable name" return $ defaultArg $ Named lbl var -- | Polarity parser. polarity :: (Interval, String) -> Parser (Range, Occurrence) polarity (i, s) = case s of "_" -> ret Unused "++" -> ret StrictPos "+" -> ret JustPos "-" -> ret JustNeg "*" -> ret Mixed _ -> parseError $ "Not a valid polarity: " ++ s where ret x = return (getRange i, x) recoverLayout :: [(Interval, String)] -> String recoverLayout [] = "" recoverLayout xs@((i, _) : _) = go (iStart i) xs where c0 = posCol (iStart i) go cur [] = "" go cur ((i, s) : xs) = padding cur (iStart i) ++ s ++ go (iEnd i) xs padding Pn{ posLine = l1, posCol = c1 } Pn{ posLine = l2, posCol = c2 } | l1 < l2 = genericReplicate (l2 - l1) '\n' ++ genericReplicate (max 0 (c2 - c0)) ' ' | l1 == l2 = genericReplicate (c2 - c1) ' ' ensureUnqual :: QName -> Parser Name ensureUnqual (QName x) = return x ensureUnqual q@Qual{} = parseError' (rStart' $ getRange q) "Qualified name not allowed here" -- | Match a particular name. isName :: String -> (Interval, String) -> Parser () isName s (_,s') | s == s' = return () | otherwise = parseError $ "expected " ++ s ++ ", found " ++ s' -- | Build a forall pi (forall x y z -> ...) forallPi :: [LamBinding] -> Expr -> Expr forallPi bs e = Pi (map addType bs) e -- | Converts lambda bindings to typed bindings. addType :: LamBinding -> TypedBinding addType (DomainFull b) = b addType (DomainFree x) = TBind r [x] $ Underscore r Nothing where r = getRange x boundNamesOrAbsurd :: [Expr] -> Parser (Either [NamedArg BoundName] [Expr]) boundNamesOrAbsurd es | any isAbsurd es = return $ Right es | otherwise = case mapM getBName es of Just good -> return $ Left $ map defaultNamedArg good Nothing -> parseError $ "expected sequence of bound identifiers" where getName :: Expr -> Maybe Name getName (Ident (QName x)) = Just x getName (Underscore r _) = Just $ Name r NotInScope [Hole] getName _ = Nothing getBName :: Expr -> Maybe BoundName getBName e = fmap mkBoundName_ $ getName e isAbsurd :: Expr -> Bool isAbsurd (Absurd _) = True isAbsurd (HiddenArg _ (Named _ e)) = isAbsurd e isAbsurd (InstanceArg _ (Named _ e)) = isAbsurd e isAbsurd (Paren _ expr) = isAbsurd expr isAbsurd (RawApp _ exprs) = any isAbsurd exprs isAbsurd _ = False -- | Build a do-statement buildDoStmt :: Expr -> [LamClause] -> Parser DoStmt buildDoStmt (RawApp r [e]) cs = buildDoStmt e cs buildDoStmt (Let r ds Nothing) [] = return $ DoLet r ds buildDoStmt (RawApp r es) cs | (es1, arr : es2) <- break isLeftArrow es = case filter isLeftArrow es2 of arr : _ -> parseError' (rStart' $ getRange arr) $ "Unexpected " ++ prettyShow arr [] -> DoBind (getRange arr) <$> exprToPattern (RawApp (getRange es1) es1) <*> pure (RawApp (getRange es2) es2) <*> pure cs where isLeftArrow (Ident (QName (Name _ _ [Id arr]))) = elem arr ["<-", "←"] isLeftArrow _ = False buildDoStmt e (_ : _) = parseError' (rStart' $ getRange e) "Only pattern matching do-statements can have where clauses." buildDoStmt e [] = return $ DoThen e mergeImportDirectives :: [ImportDirective] -> Parser ImportDirective mergeImportDirectives is = do i <- foldl merge (return defaultImportDir) is verifyImportDirective i where merge mi i2 = do i1 <- mi let err = parseError' (rStart' $ getRange i2) "Cannot mix using and hiding module directives" return $ ImportDirective { importDirRange = fuseRange i1 i2 , using = mappend (using i1) (using i2) , hiding = hiding i1 ++ hiding i2 , impRenaming = impRenaming i1 ++ impRenaming i2 , publicOpen = publicOpen i1 || publicOpen i2 } -- | Check that an import directive doesn't contain repeated names verifyImportDirective :: ImportDirective -> Parser ImportDirective verifyImportDirective i = case filter ((>1) . length) $ group $ sort xs of [] -> return i yss -> parseErrorRange (head $ concat yss) $ "Repeated name" ++ s ++ " in import directive: " ++ concat (intersperse ", " $ map (prettyShow . head) yss) where s = case yss of [_] -> "" _ -> "s" where xs = names (using i) ++ hiding i ++ map renFrom (impRenaming i) names (Using xs) = xs names UseEverything = [] data RecordDirective = Induction (Ranged Induction) | Constructor (Name, IsInstance) | Eta (Ranged HasEta) deriving (Eq,Show) verifyRecordDirectives :: [RecordDirective] -> Parser (Maybe (Ranged Induction), Maybe HasEta, Maybe (Name, IsInstance)) verifyRecordDirectives xs | null rs = return (ltm is, ltm es, ltm cs) | otherwise = parseErrorRange (head rs) $ "Repeated record directives at: \n" ++ intercalate "\n" (map prettyShow rs) where ltm :: [a] -> Maybe a ltm [] = Nothing ltm (x:xs) = Just x errorFromList [] = [] errorFromList [x] = [] errorFromList xs = map getRange xs rs = sort (concat ([errorFromList is, errorFromList es', errorFromList cs])) is = [ i | Induction i <- xs ] es' = [ i | Eta i <- xs ] es = map rangedThing es' cs = [ i | Constructor i <- xs ] -- | Breaks up a string into substrings. Returns every maximal -- subsequence of zero or more characters distinct from @'.'@. -- -- > splitOnDots "" == [""] -- > splitOnDots "foo.bar" == ["foo", "bar"] -- > splitOnDots ".foo.bar" == ["", "foo", "bar"] -- > splitOnDots "foo.bar." == ["foo", "bar", ""] -- > splitOnDots "foo..bar" == ["foo", "", "bar"] splitOnDots :: String -> [String] splitOnDots "" = [""] splitOnDots ('.' : s) = [] : splitOnDots s splitOnDots (c : s) = case splitOnDots s of p : ps -> (c : p) : ps -- | Returns 'True' iff the name is a valid Haskell (hierarchical) -- module name. validHaskellModuleName :: String -> Bool validHaskellModuleName = all ok . splitOnDots where -- Checks if a dot-less module name is well-formed. ok :: String -> Bool ok [] = False ok (c : s) = isUpper c && all (\c -> isLower c || c == '_' || isUpper c || generalCategory c == DecimalNumber || c == '\'') s {-------------------------------------------------------------------------- Patterns --------------------------------------------------------------------------} -- | Turn an expression into a left hand side. exprToLHS :: Expr -> Parser ([Expr] -> [Expr] -> LHS) exprToLHS e = LHS <$> exprToPattern e -- | Turn an expression into a pattern. Fails if the expression is not a -- valid pattern. exprToPattern :: Expr -> Parser Pattern exprToPattern e = do let failure = parseErrorRange e $ "Not a valid pattern: " ++ prettyShow e case e of Ident x -> return $ IdentP x App _ e1 e2 -> AppP <$> exprToPattern e1 <*> T.mapM (T.mapM exprToPattern) e2 Paren r e -> ParenP r <$> exprToPattern e Underscore r _ -> return $ WildP r Absurd r -> return $ AbsurdP r As r x e -> AsP r x <$> exprToPattern e Dot r (HiddenArg _ e) -> return $ HiddenP r $ fmap (DotP r) e Dot r e -> return $ DotP r e Lit l -> return $ LitP l HiddenArg r e -> HiddenP r <$> T.mapM exprToPattern e InstanceArg r e -> InstanceP r <$> T.mapM exprToPattern e RawApp r es -> RawAppP r <$> mapM exprToPattern es Quote r -> return $ QuoteP r Rec r es | Just fs <- mapM maybeLeft es -> do RecP r <$> T.mapM (T.mapM exprToPattern) fs Equal r e1 e2 -> return $ EqualP r [(e1, e2)] Ellipsis r -> return $ EllipsisP r -- WithApp has already lost the range information of the bars '|' WithApp r e es -> do p <- exprToPattern e ps <- forM es $ \ e -> defaultNamedArg . WithP (getRange e) <$> exprToPattern e -- TODO #2822: Range! return $ foldl AppP p ps _ -> failure opAppExprToPattern :: OpApp Expr -> Parser Pattern opAppExprToPattern (SyntaxBindingLambda _ _ _) = parseError "Syntax binding lambda cannot appear in a pattern" opAppExprToPattern (Ordinary e) = exprToPattern e -- | Turn an expression into a name. Fails if the expression is not a -- valid identifier. exprToName :: Expr -> Parser Name exprToName (Ident (QName x)) = return x exprToName e = parseErrorRange e $ "Not a valid identifier: " ++ prettyShow e stripSingletonRawApp :: Expr -> Expr stripSingletonRawApp (RawApp _ [e]) = stripSingletonRawApp e stripSingletonRawApp e = e isEqual :: Expr -> Maybe (Expr, Expr) isEqual e = case stripSingletonRawApp e of Equal _ a b -> Just (stripSingletonRawApp a, stripSingletonRawApp b) _ -> Nothing maybeNamed :: Expr -> Named_ Expr maybeNamed e = case isEqual e of Just (Ident (QName x), b) -> named (Ranged (getRange x) (nameToRawName x)) b _ -> unnamed e patternSynArgs :: [Either Hiding LamBinding] -> Parser [Arg Name] patternSynArgs = mapM pSynArg where pSynArg Left{} = parseError "Absurd patterns are not allowed in pattern synonyms" pSynArg (Right DomainFull{}) = parseError "Unexpected type signature in pattern synonym argument" pSynArg (Right (DomainFree x)) | let h = getHiding x, h `notElem` [Hidden, NotHidden] = parseError $ prettyShow h ++ " arguments not allowed to pattern synonyms" | getRelevance x /= Relevant = parseError "Arguments to pattern synonyms must be relevant" | otherwise = return $ fmap (boundName . namedThing) x parsePanic s = parseError $ "Internal parser error: " ++ s ++ ". Please report this as a bug." {- RHS or type signature -} data RHSOrTypeSigs = JustRHS RHS | TypeSigsRHS Expr deriving Show patternToNames :: Pattern -> Parser [(ArgInfo, Name)] patternToNames p = case p of IdentP (QName i) -> return [(defaultArgInfo, i)] WildP r -> return [(defaultArgInfo, C.noName r)] DotP _ (Ident (QName i)) -> return [(setRelevance Irrelevant defaultArgInfo, i)] RawAppP _ ps -> concat <$> mapM patternToNames ps _ -> parseError $ "Illegal name in type signature: " ++ prettyShow p funClauseOrTypeSigs :: [Attr] -> LHS -> RHSOrTypeSigs -> WhereClause -> Parser [Declaration] funClauseOrTypeSigs attrs lhs mrhs wh = do -- traceShowM lhs case mrhs of JustRHS rhs -> do unless (null attrs) $ parseErrorRange attrs $ "A function clause cannot have attributes" return [FunClause lhs rhs wh False] TypeSigsRHS e -> case wh of NoWhere -> case lhs of LHS p _ _ | hasEllipsis p -> parseError "The ellipsis ... cannot have a type signature" LHS _ _ (_:_) -> parseError "Illegal: with in type signature" LHS _ (_:_) _ -> parseError "Illegal: rewrite in type signature" LHS p _ _ | hasWithPatterns p -> parseError "Illegal: with patterns in type signature" LHS p [] [] -> forMM (patternToNames p) $ \ (info, x) -> do info <- applyAttrs attrs info return $ typeSig info x e _ -> parseError "A type signature cannot have a where clause" parseDisplayPragma :: Range -> Position -> String -> Parser Pragma parseDisplayPragma r pos s = case parsePosString pos defaultParseFlags [normal] funclauseParser s of ParseOk s [FunClause (LHS lhs [] []) (RHS rhs) NoWhere ca] | null (parseInp s) -> return $ DisplayPragma r lhs rhs _ -> parseError "Invalid DISPLAY pragma. Should have form {-# DISPLAY LHS = RHS #-}." typeSig :: ArgInfo -> Name -> Expr -> Declaration typeSig i n e = TypeSig i n (Generalized e) -- * Attributes -- | Parsed attribute. data Attr = Attr { attrRange :: Range -- ^ Range includes the @. , attrName :: String -- ^ Concrete, user written attribute for error reporting. , theAttr :: Attribute -- ^ Parsed attribute. } instance HasRange Attr where getRange = attrRange instance SetRange Attr where setRange r (Attr _ x a) = Attr r x a -- | Parse an attribute. toAttribute :: (HasRange e, Pretty e) => e -> Parser Attr toAttribute x = maybe failure (return . Attr (getRange x) y) $ stringToAttribute y where y = prettyShow x failure = parseErrorRange x $ "Unknown attribute: " ++ y -- | Apply an attribute to thing (usually `Arg`). -- This will fail if one of the attributes is already set -- in the thing to something else than the default value. applyAttr :: (LensAttribute a) => Attr -> a -> Parser a applyAttr attr@(Attr r x a) = maybe failure return . setPristineAttribute a where failure = errorConflictingAttribute attr -- | Apply attributes to thing (usually `Arg`). -- Expects a reversed list of attributes. -- This will fail if one of the attributes is already set -- in the thing to something else than the default value. applyAttrs :: (LensAttribute a) => [Attr] -> a -> Parser a applyAttrs rattrs arg = do let attrs = reverse rattrs checkForUniqueAttribute (isJust . isQuantityAttribute ) attrs checkForUniqueAttribute (isJust . isRelevanceAttribute) attrs foldM (flip applyAttr) arg attrs -- | Report a parse error if two attributes in the list are of the same kind, -- thus, present conflicting information. checkForUniqueAttribute :: (Attribute -> Bool) -> [Attr] -> Parser () checkForUniqueAttribute p attrs = do let pAttrs = filter (p . theAttr) attrs when (length pAttrs >= 2) $ errorConflictingAttributes pAttrs -- | Report an attribute as conflicting (e.g., with an already set value). errorConflictingAttribute :: Attr -> Parser a errorConflictingAttribute a = parseErrorRange a $ "Conflicting attribute: " ++ attrName a -- | Report attributes as conflicting (e.g., with each other). -- Precondition: List not emtpy. errorConflictingAttributes :: [Attr] -> Parser a errorConflictingAttributes [a] = errorConflictingAttribute a errorConflictingAttributes as = parseErrorRange as $ "Conflicting attributes: " ++ unwords (map attrName as) } Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Layout.hs-boot0000644000000000000000000000032513466402171020565 0ustar0000000000000000module Agda.Syntax.Parser.Layout where import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Tokens offsideRule :: LexAction Token newLayoutContext :: LexAction Token emptyLayout :: LexAction Token Agda-2.6.0.1/src/full/Agda/Syntax/Parser/LookAhead.hs0000644000000000000000000001003413466402171020174 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| When lexing by hand (for instance string literals) we need to do some looking ahead. The 'LookAhead' monad keeps track of the position we are currently looking at, and provides facilities to synchronise the look-ahead position with the actual position of the 'Parser' monad (see 'sync' and 'rollback'). -} module Agda.Syntax.Parser.LookAhead ( -- * The LookAhead monad LookAhead , runLookAhead -- * Operations , lookAheadError , getInput, setInput, liftP , nextChar, eatNextChar , sync, rollback , match, match' ) where import Control.Monad.Reader import Control.Monad.State import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Monad {-------------------------------------------------------------------------- The look-ahead monad --------------------------------------------------------------------------} {-| The LookAhead monad is basically a state monad keeping with an extra 'AlexInput', wrapped around the 'Parser' monad. -} newtype LookAhead a = LookAhead { unLookAhead :: ReaderT ErrorFunction (StateT AlexInput Parser) a } deriving (Functor, Applicative, Monad) newtype ErrorFunction = ErrorFun { throwError :: forall a. String -> LookAhead a } -- | Throw an error message according to the supplied method. lookAheadError :: String -> LookAhead a lookAheadError s = ($ s) =<< do LookAhead $ asks throwError {-------------------------------------------------------------------------- Operations --------------------------------------------------------------------------} -- | Get the current look-ahead position. getInput :: LookAhead AlexInput getInput = LookAhead get -- | Set the look-ahead position. setInput :: AlexInput -> LookAhead () setInput = LookAhead . put -- | Lift a computation in the 'Parser' monad to the 'LookAhead' monad. liftP :: Parser a -> LookAhead a liftP = LookAhead . lift . lift -- | Look at the next character. Fails if there are no more characters. nextChar :: LookAhead Char nextChar = do inp <- getInput case alexGetChar inp of Nothing -> lookAheadError "unexpected end of file" Just (c,inp') -> do setInput inp' return c -- | Consume all the characters up to the current look-ahead position. sync :: LookAhead () sync = do inp <- getInput liftP $ setLexInput inp -- | Undo look-ahead. Restores the input from the 'ParseState'. rollback :: LookAhead () rollback = do inp <- liftP getLexInput setInput inp -- | Consume the next character. Does 'nextChar' followed by 'sync'. eatNextChar :: LookAhead Char eatNextChar = do c <- nextChar sync return c {-| Do a case on the current input string. If any of the given strings match we move past it and execute the corresponding action. If no string matches, we execute a default action, advancing the input one character. This function only affects the look-ahead position. -} match :: [(String, LookAhead a)] -> LookAhead a -> LookAhead a match xs def = do c <- nextChar match' c xs def {-| Same as 'match' but takes the initial character from the first argument instead of reading it from the input. Consequently, in the default case the input is not advanced. -} match' :: Char -> [(String, LookAhead a)] -> LookAhead a -> LookAhead a match' c xs def = do inp <- getInput match'' inp xs c where match'' inp bs c = case bs' of [] -> setInput inp >> def [("",p)] -> p _ -> match'' inp bs' =<< nextChar where bs' = [ (s, p) | (c':s, p) <- bs, c == c' ] -- | Run a 'LookAhead' computation. The first argument is the error function. runLookAhead :: (forall b. String -> LookAhead b) -> LookAhead a -> Parser a runLookAhead err (LookAhead m) = do inp <- getLexInput evalStateT (runReaderT m (ErrorFun err)) inp Agda-2.6.0.1/src/full/Agda/Syntax/Parser/StringLiterals.hs0000644000000000000000000001521113466402171021315 0ustar0000000000000000{-| The code to lex string and character literals. Basically the same code as in GHC. -} module Agda.Syntax.Parser.StringLiterals ( litString, litChar ) where import Data.Char import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Tokens import Agda.Syntax.Parser.LookAhead import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Utils.Char ( decDigit, hexDigit, octDigit ) import Agda.Utils.Tuple ( (-*-) ) {-------------------------------------------------------------------------- Exported actions --------------------------------------------------------------------------} -- | Lex a string literal. Assumes that a double quote has been lexed. litString :: LexAction Token litString = stringToken '"' (\i s -> return $ TokLiteral $ LitString (getRange i) s) {-| Lex a character literal. Assumes that a single quote has been lexed. A character literal is lexed in exactly the same way as a string literal. Only before returning the token do we check that the lexed string is of length 1. This is maybe not the most efficient way of doing things, but on the other hand it will only be inefficient if there is a lexical error. -} litChar :: LexAction Token litChar = stringToken '\'' $ \i s -> do case s of [c] -> return $ TokLiteral $ LitChar (getRange i) c _ -> lexError "character literal must contain a single character" {-------------------------------------------------------------------------- Errors --------------------------------------------------------------------------} -- | Custom error function. litError :: String -> LookAhead a litError msg = do sync liftP $ lexError $ "Lexical error in string or character literal: " ++ msg {-------------------------------------------------------------------------- The meat --------------------------------------------------------------------------} -- | The general function to lex a string or character literal token. The -- character argument is the delimiter (@\"@ for strings and @\'@ for -- characters). stringToken :: Char -> (Interval -> String -> Parser tok) -> LexAction tok stringToken del mkTok inp inp' n = do setLastPos (backupPos $ lexPos inp') setLexInput inp' -- TODO: Should setPrevToken be run here? Compare with -- Agda.Syntax.Parser.LexActions.token. tok <- runLookAhead litError $ lexString del "" i <- getParseInterval mkTok i tok -- | This is where the work happens. The string argument is an accumulating -- parameter for the string being lexed. lexString :: Char -> String -> LookAhead String lexString del s = do c <- nextChar case c of c | c == del -> sync >> return (reverse s) '\\' -> do c' <- nextChar case c' of '&' -> sync >> lexString del s c | isSpace c -> sync >> lexStringGap del s _ -> normalChar _ -> normalChar where normalChar = do rollback c <- lexChar lexString del (c:s) -- | A string gap consists of whitespace (possibly including line breaks) -- enclosed in backslashes. The gap is not part of the resulting string. lexStringGap :: Char -> String -> LookAhead String lexStringGap del s = do c <- eatNextChar case c of '\\' -> lexString del s c | isSpace c -> lexStringGap del s _ -> lookAheadError "non-space in string gap" -- | Lex a single character. lexChar :: LookAhead Char lexChar = do c <- eatNextChar case c of '\\' -> lexEscape _ -> return c -- | Lex an escaped character. Assumes the backslash has been lexed. lexEscape :: LookAhead Char lexEscape = do c <- eatNextChar case c of '^' -> do c <- eatNextChar if c >= '@' && c <= '_' then return (chr (ord c - ord '@')) else lookAheadError "invalid control character" 'x' -> readNum isHexDigit 16 hexDigit 'o' -> readNum isOctDigit 8 octDigit x | isDigit x -> readNumAcc isDigit 10 decDigit (decDigit x) c -> -- Try to match the input (starting with c) against the -- silly escape codes. do esc <- match' c (map (id -*- return) sillyEscapeChars) (lookAheadError "bad escape code") sync return esc -- | Read a number in the specified base. readNum :: (Char -> Bool) -> Int -> (Char -> Int) -> LookAhead Char readNum isDigit base conv = do c <- eatNextChar if isDigit c then readNumAcc isDigit base conv (conv c) else lookAheadError "non-digit in numeral" -- | Same as 'readNum' but with an accumulating parameter. readNumAcc :: (Char -> Bool) -> Int -> (Char -> Int) -> Int -> LookAhead Char readNumAcc isDigit base conv i = scan i where scan i = do inp <- getInput c <- nextChar case c of c | isDigit c -> scan (i*base + conv c) _ -> do setInput inp sync if i >= ord minBound && i <= ord maxBound then return (chr i) else lookAheadError "character literal out of bounds" -- | The escape codes. sillyEscapeChars :: [(String, Char)] sillyEscapeChars = [ ("a", '\a') , ("b", '\b') , ("f", '\f') , ("n", '\n') , ("r", '\r') , ("t", '\t') , ("v", '\v') , ("\\", '\\') , ("\"", '\"') , ("'", '\'') , ("NUL", '\NUL') , ("SOH", '\SOH') , ("STX", '\STX') , ("ETX", '\ETX') , ("EOT", '\EOT') , ("ENQ", '\ENQ') , ("ACK", '\ACK') , ("BEL", '\BEL') , ("BS", '\BS') , ("HT", '\HT') , ("LF", '\LF') , ("VT", '\VT') , ("FF", '\FF') , ("CR", '\CR') , ("SO", '\SO') , ("SI", '\SI') , ("DLE", '\DLE') , ("DC1", '\DC1') , ("DC2", '\DC2') , ("DC3", '\DC3') , ("DC4", '\DC4') , ("NAK", '\NAK') , ("SYN", '\SYN') , ("ETB", '\ETB') , ("CAN", '\CAN') , ("EM", '\EM') , ("SUB", '\SUB') , ("ESC", '\ESC') , ("FS", '\FS') , ("GS", '\GS') , ("RS", '\RS') , ("US", '\US') , ("SP", '\SP') , ("DEL", '\DEL') ] Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Comments.hs0000644000000000000000000000514513466402171020141 0ustar0000000000000000-- {-# LANGUAGE CPP #-} {-| This module defines the lex action to lex nested comments. As is well-known this cannot be done by regular expressions (which, incidently, is probably the reason why C-comments don't nest). When scanning nested comments we simply keep track of the nesting level, counting up for /open comments/ and down for /close comments/. -} module Agda.Syntax.Parser.Comments where import qualified Data.List as List import {-# SOURCE #-} Agda.Syntax.Parser.LexActions import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Tokens import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.LookAhead import Agda.Syntax.Position import Agda.Utils.Monad -- | Should comment tokens be output? keepComments :: LexPredicate keepComments (_, s) _ _ _ = parseKeepComments s -- | Should comment tokens be output? keepCommentsM :: Parser Bool keepCommentsM = fmap parseKeepComments getParseFlags -- | Manually lexing a block comment. Assumes an /open comment/ has been lexed. -- In the end the comment is discarded and 'lexToken' is called to lex a real -- token. nestedComment :: LexAction Token nestedComment inp inp' _ = do setLexInput inp' runLookAhead err $ skipBlock "{-" "-}" keep <- keepCommentsM if keep then do inp'' <- getLexInput let p1 = lexPos inp; p2 = lexPos inp'' i = posToInterval (lexSrcFile inp) p1 p2 s = case (p1, p2) of (Pn { posPos = p1 }, Pn { posPos = p2 }) -> List.genericTake (p2 - p1) $ lexInput inp return $ TokComment (i, s) else lexToken where err _ = liftP $ parseErrorAt (lexPos inp) "Unterminated '{-'" -- | Lex a hole (@{! ... !}@). Holes can be nested. -- Returns @'TokSymbol' 'SymQuestionMark'@. hole :: LexAction Token hole inp inp' _ = do setLexInput inp' runLookAhead err $ skipBlock "{!" "!}" p <- lexPos <$> getLexInput return $ TokSymbol SymQuestionMark $ posToInterval (lexSrcFile inp) (lexPos inp) p where err _ = liftP $ parseErrorAt (lexPos inp) "Unterminated '{!'" -- | Skip a block of text enclosed by the given open and close strings. Assumes -- the first open string has been consumed. Open-close pairs may be nested. skipBlock :: String -> String -> LookAhead () skipBlock open close = scan 1 where scan 0 = sync scan n = match [ open ==> scan (n + 1) , close ==> scan (n - 1) ] `other` scan n where (==>) = (,) other = ($) Agda-2.6.0.1/src/full/Agda/Syntax/Parser/LexActions.hs-boot0000644000000000000000000000165713466402171021372 0ustar0000000000000000module Agda.Syntax.Parser.LexActions where import Agda.Syntax.Literal import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Tokens import Agda.Syntax.Position lexToken :: Parser Token token :: (String -> Parser tok) -> LexAction tok withInterval :: ((Interval, String) -> tok) -> LexAction tok withInterval' :: (String -> a) -> ((Interval, a) -> tok) -> LexAction tok withLayout :: LexAction r -> LexAction r begin :: LexState -> LexAction Token beginWith :: LexState -> LexAction a -> LexAction a endWith :: LexAction a -> LexAction a begin_ :: LexState -> LexAction Token end_ :: LexAction Token keyword :: Keyword -> LexAction Token symbol :: Symbol -> LexAction Token identifier :: LexAction Token literal :: Read a => (Range -> a -> Literal) -> LexAction Token followedBy :: Char -> LexPredicate eof :: LexPredicate inState :: LexState -> LexPredicate Agda-2.6.0.1/src/full/Agda/Syntax/Parser/LexActions.hs0000644000000000000000000002011413466402171020416 0ustar0000000000000000{-# LANGUAGE CPP #-} {-| This module contains the building blocks used to construct the lexer. -} module Agda.Syntax.Parser.LexActions ( -- * Main function lexToken -- * Lex actions -- ** General actions , token , withInterval, withInterval', withInterval_ , withLayout , begin, end, beginWith, endWith , begin_, end_ , lexError -- ** Specialized actions , keyword, symbol, identifier, literal -- * Lex predicates , followedBy, eof, inState ) where import Data.Char import Agda.Syntax.Parser.Lexer import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Tokens import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible {-------------------------------------------------------------------------- Scan functions --------------------------------------------------------------------------} -- | Called at the end of a file. Returns 'TokEOF'. returnEOF :: AlexInput -> Parser Token returnEOF AlexInput{ lexSrcFile, lexPos } = do -- Andreas, 2018-12-30, issue #3480 -- The following setLastPos leads to parse error reporting -- far away from the interesting position, in particular -- if there is a long comment before the EOF. -- (Such a long comment is frequent in interactive programming, as -- commenting out until the end of the file is a common habit.) -- -- setLastPos lexPos -- Without it, we get much more useful error locations. setPrevToken "" return $ TokEOF $ posToInterval lexSrcFile lexPos lexPos -- | Set the current input and lex a new token (calls 'lexToken'). skipTo :: AlexInput -> Parser Token skipTo inp = do setLexInput inp lexToken {-| Scan the input to find the next token. Calls 'Agda.Syntax.Parser.Lexer.alexScanUser'. This is the main lexing function where all the work happens. The function 'Agda.Syntax.Parser.Lexer.lexer', used by the parser is the continuation version of this function. -} lexToken :: Parser Token lexToken = do inp <- getLexInput lss <- getLexState flags <- getParseFlags case alexScanUser (lss, flags) inp (headWithDefault __IMPOSSIBLE__ lss) of AlexEOF -> returnEOF inp AlexSkip inp' len -> skipTo inp' AlexToken inp' len action -> fmap postToken $ action inp inp' len AlexError i -> parseError $ concat [ "Lexical error" , case headMaybe $ lexInput i of Just '\t' -> " (you may want to replace tabs with spaces)" Just c | not (isPrint c) -> " (unprintable character)" _ -> "" , ":" ] isSub :: Char -> Bool isSub c = '\x2080' <= c && c <= '\x2089' readSubscript :: [Char] -> Integer readSubscript = read . map (\c -> toEnum (fromEnum c - 0x2080 + fromEnum '0')) postToken :: Token -> Token postToken (TokId (r, "\x03bb")) = TokSymbol SymLambda r postToken (TokId (r, "\x2026")) = TokSymbol SymEllipsis r postToken (TokId (r, "\x2192")) = TokSymbol SymArrow r postToken (TokId (r, "\x2983")) = TokSymbol SymDoubleOpenBrace r postToken (TokId (r, "\x2984")) = TokSymbol SymDoubleCloseBrace r postToken (TokId (r, "\x2987")) = TokSymbol SymOpenIdiomBracket r postToken (TokId (r, "\x2988")) = TokSymbol SymCloseIdiomBracket r postToken (TokId (r, "\x2200")) = TokKeyword KwForall r postToken (TokId (r, s)) | set == "Set" && all isSub n = TokSetN (r, readSubscript n) where (set, n) = splitAt 3 s postToken (TokId (r, s)) | prop == "Prop" && all isSub n = TokPropN (r, readSubscript n) where (prop, n) = splitAt 4 s postToken t = t {-------------------------------------------------------------------------- Lex actions --------------------------------------------------------------------------} -- | The most general way of parsing a token. token :: (String -> Parser tok) -> LexAction tok token action inp inp' len = do setLexInput inp' setPrevToken t setLastPos $ lexPos inp action t where t = take len $ lexInput inp -- | Parse a token from an 'Interval' and the lexed string. withInterval :: ((Interval, String) -> tok) -> LexAction tok withInterval f = token $ \s -> do r <- getParseInterval return $ f (r,s) -- | Like 'withInterval', but applies a function to the string. withInterval' :: (String -> a) -> ((Interval, a) -> tok) -> LexAction tok withInterval' f t = withInterval (t . (id -*- f)) -- | Return a token without looking at the lexed string. withInterval_ :: (Interval -> r) -> LexAction r withInterval_ f = withInterval (f . fst) -- | Executed for layout keywords. Enters the 'Agda.Syntax.Parser.Lexer.layout' -- state and performs the given action. withLayout :: LexAction r -> LexAction r withLayout a i1 i2 n = do pushLexState layout a i1 i2 n -- | Enter a new state without consuming any input. begin :: LexState -> LexAction Token begin code _ _ _ = do pushLexState code lexToken -- | Enter a new state throwing away the current lexeme. begin_ :: LexState -> LexAction Token begin_ code _ inp' _ = do pushLexState code skipTo inp' -- | Exit the current state throwing away the current lexeme. end_ :: LexAction Token end_ _ inp' _ = do popLexState skipTo inp' -- | Enter a new state and perform the given action. beginWith :: LexState -> LexAction a -> LexAction a beginWith code a inp inp' n = do pushLexState code a inp inp' n -- | Exit the current state and perform the given action. endWith :: LexAction a -> LexAction a endWith a inp inp' n = do popLexState a inp inp' n -- | Exit the current state without consuming any input end :: LexAction Token end _ _ _ = do popLexState lexToken -- | Parse a 'Keyword' token, triggers layout for 'layoutKeywords'. keyword :: Keyword -> LexAction Token keyword k = layout $ withInterval_ (TokKeyword k) where layout | elem k layoutKeywords = withLayout | otherwise = id -- | Parse a 'Symbol' token. symbol :: Symbol -> LexAction Token symbol s = withInterval_ (TokSymbol s) -- | Parse a literal. literal :: Read a => (Range -> a -> Literal) -> LexAction Token literal lit = withInterval' read (TokLiteral . uncurry lit . mapFst getRange) -- | Parse an identifier. Identifiers can be qualified (see 'Name'). -- Example: @Foo.Bar.f@ identifier :: LexAction Token identifier = qualified (either TokId TokQId) -- | Parse a possibly qualified name. qualified :: (Either (Interval, String) [(Interval, String)] -> a) -> LexAction a qualified tok = token $ \s -> do i <- getParseInterval case mkName i $ wordsBy (=='.') s of [] -> lexError "lex error on .." [x] -> return $ tok $ Left x xs -> return $ tok $ Right xs where -- Compute the ranges for the substrings (separated by '.') of -- a name. Dots are included: the intervals generated for -- "A.B.x" correspond to "A.", "B." and "x". mkName :: Interval -> [String] -> [(Interval, String)] mkName _ [] = [] mkName i [x] = [(i, x)] mkName i (x:xs) = (i0, x) : mkName i1 xs where p0 = iStart i p1 = iEnd i p' = movePos (movePosByString p0 x) '.' i0 = Interval p0 p' i1 = Interval p' p1 {-------------------------------------------------------------------------- Predicates --------------------------------------------------------------------------} -- | True when the given character is the next character of the input string. followedBy :: Char -> LexPredicate followedBy c' _ _ _ inp = case lexInput inp of [] -> False c:_ -> c == c' -- | True if we are at the end of the file. eof :: LexPredicate eof _ _ _ inp = null $ lexInput inp -- | True if the given state appears somewhere on the state stack inState :: LexState -> LexPredicate inState s (ls, _) _ _ _ = s `elem` ls Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Literate.hs0000644000000000000000000002227313466402171020126 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE ViewPatterns #-} -- | Preprocessors for literate code formats. module Agda.Syntax.Parser.Literate ( literateProcessors , literateExtsShortList , literateSrcFile , literateTeX , literateRsT , literateMd , literateOrg , illiterate , atomizeLayers , Processor , Layers , Layer(..) , LayerRole(..) , isCode , isCodeLayer ) where import Prelude hiding (getLine) import Data.Char (isSpace, isControl) import Data.List (isPrefixOf) import Agda.Syntax.Common import Agda.Syntax.Position import Text.Regex.TDFA #include "undefined.h" import Agda.Utils.Impossible -- | Role of a character in the file. data LayerRole = Markup | Comment | Code deriving (Show, Eq) -- | A sequence of characters in a file playing the same role. data Layer = Layer { layerRole :: LayerRole , interval :: Interval , layerContent :: String } deriving Show -- | A list of contiguous layers. type Layers = [Layer] instance HasRange Layer where getRange = getRange . interval -- | Annotates a tokenized string with position information. mkLayers :: Position -> [(LayerRole, String)] -> Layers mkLayers pos [] = emptyLiterate pos mkLayers pos ((_,"") : xs) = mkLayers pos xs -- Empty layers are ignored. mkLayers pos ((ty,s) : xs) = Layer ty (Interval pos next) s : mkLayers next xs where next = movePosByString pos s unMkLayers :: Layers -> [(LayerRole, String)] unMkLayers = map ((,) <$> layerRole <*> layerContent) atomizeLayers :: Layers -> [(LayerRole, Char)] atomizeLayers = (>>= fmap <$> ((,) . fst) <*> snd) . unMkLayers -- | Type of a literate preprocessor: -- Invariants: -- -- > f : Processor -- -- prop> f pos s /= [] -- -- prop> f pos s >>= layerContent == s type Processor = Position -> String -> [Layer] literateSrcFile :: [Layer] -> SrcFile literateSrcFile [] = __IMPOSSIBLE__ literateSrcFile (Layer{interval} : _) = getIntervalFile interval -- | List of valid extensions for literate Agda files, and their -- corresponding preprocessors. -- -- If you add new extensions, remember to update test/Utils.hs so -- that test cases ending in the new extensions are found. literateProcessors :: [(String, (Processor, FileType))] literateProcessors = ((,) <$> (".lagda" ++) . fst <*> snd) <$> [ ("" , (literateTeX, TexFileType)) , (".rst", (literateRsT, RstFileType)) , (".tex", (literateTeX, TexFileType)) , (".md", (literateMd, MdFileType )) , (".org", (literateOrg, OrgFileType)) ] -- | Returns @True@ if the role corresponds to Agda code. isCode :: LayerRole -> Bool isCode Code = True isCode Markup = False isCode Comment = False -- | Returns @True@ if the layer contains Agda code. isCodeLayer :: Layer -> Bool isCodeLayer = isCode . layerRole -- | Blanks the non-code parts of a given file, preserving positions of -- characters corresponding to code. This way, there is a direct -- correspondence between source positions and positions in the -- processed result. illiterate :: [Layer] -> String illiterate xs = concat [ (if isCode layerRole then id else bleach) layerContent | Layer{layerRole, layerContent} <- xs ] -- | Replaces non-space characters in a string with spaces. bleach :: String -> String bleach s = map go s where go c | isSpace c = c go _ = ' ' -- | Check if a character is a blank character. isBlank :: Char -> Bool isBlank = (&&) <$> isSpace <*> not . (== '\n') -- | Short list of extensions for literate Agda files. -- For display purposes. literateExtsShortList :: [String] literateExtsShortList = [".lagda"] -- | Breaks a list just /after/ an element satisfying the predicate is -- found. -- -- >>> break1 even [1,3,5,2,4,7,8] -- ([1,3,5,2],[4,7,8]) break1 :: (a -> Bool) -> [a] -> ([a],[a]) break1 _ [] = ([], []) break1 p (x:xs) | p x = (x:[],xs) break1 p (x:xs) = let (ys,zs) = break1 p xs in (x:ys,zs) -- | Returns a tuple consisting of the first line of the input, and the rest -- of the input. getLine :: String -> (String, String) getLine = break1 (== '\n') -- | Canonical decomposition of an empty literate file. emptyLiterate :: Position -> [Layer] emptyLiterate pos = [Layer Markup (Interval pos pos) ""] -- | Create a regular expression that: -- - Must match the whole string -- - Works across line boundaries rex :: String -> Regex rex s = makeRegexOpts blankCompOpt{newSyntax = True} blankExecOpt $ "\\`" ++ s ++ "\\'" -- | Preprocessor for literate TeX. literateTeX :: Position -> String -> [Layer] literateTeX pos s = mkLayers pos (tex s) where tex :: String -> [(LayerRole, String)] tex [] = [] tex s = let (line, rest) = getLine s in case r_begin `matchM` line of Just (getAllTextSubmatches -> [_, pre, _, markup, whitespace]) -> (Comment, pre) : (Markup, markup) : (Code, whitespace) : code rest Just _ -> __IMPOSSIBLE__ Nothing -> (Comment, line):tex rest r_begin = rex "(([^\\%]|\\\\.)*)(\\\\begin\\{code\\}[^\n]*)(\n)?" code :: String -> [(LayerRole, String)] code [] = [] code s = let (line, rest) = getLine s in case r_end `matchM` line of Just (getAllTextSubmatches -> [_, code, markup, post]) -> (Code, code) : (Markup, markup) : (Comment, post) : tex rest Just _ -> __IMPOSSIBLE__ Nothing -> (Code, line) : code rest r_end = rex "([[:blank:]]*)(\\\\end\\{code\\})(.*)" -- | Preprocessor for Markdown. literateMd :: Position -> String -> [Layer] literateMd pos s = mkLayers pos$ md s where md :: String -> [(LayerRole, String)] md [] = [] md s = let (line, rest) = getLine s in case md_begin `matchM` line of Just (getAllTextSubmatches -> [_, pre, markup, _]) -> (Comment, pre) : (Markup, markup) : code rest Just _ -> __IMPOSSIBLE__ Nothing -> (Comment, line) : if md_begin_other `match` line then code_other rest else md rest md_begin = rex "(.*)([[:space:]]*```(agda)?[[:space:]]*)" md_begin_other = rex "[[:space:]]*```[a-zA-Z0-9-]*[[:space:]]*" code :: String -> [(LayerRole, String)] code [] = [] code s = let (line, rest) = getLine s in case md_end `matchM` line of Just (getAllTextSubmatches -> [_, markup]) -> (Markup, markup) : md rest Just _ -> __IMPOSSIBLE__ Nothing -> (Code, line) : code rest -- A non-Agda code block. code_other :: String -> [(LayerRole, String)] code_other [] = [] code_other s = let (line, rest) = getLine s in (Comment, line) : if md_end `match` line then md rest else code_other rest md_end = rex "([[:space:]]*```[[:space:]]*)" -- | Preprocessor for reStructuredText. literateRsT :: Position -> String -> [Layer] literateRsT pos s = mkLayers pos$ rst s where rst :: String -> [(LayerRole, String)] rst [] = [] rst s = maybe_code s maybe_code s = if r_comment `match` line then not_code else case r_code `match` line of [] -> not_code [[_, before, "::", after]] -> -- Code starts if null before || isBlank (last before) then (Markup, line) : code rest else (Comment, before ++ ":") : (Markup, ":" ++ after) : code rest _ -> __IMPOSSIBLE__ where (line, rest) = getLine s not_code = (Comment, line) : rst rest -- Finds the next indented block in the input. code :: String -> [(LayerRole, String)] code [] = [] code s = let (line, rest) = getLine s in if all isSpace line then (Markup, line) : code rest else let xs = takeWhile isBlank line in if null xs then maybe_code s else (Code, line) : indented xs rest -- Process an indented block. indented :: String -> String -> [(LayerRole, String)] indented _ [] = [] indented ind s = let (line, rest) = getLine s in if all isSpace line then (Code, line) : indented ind rest else if ind `isPrefixOf` line then (Code, line) : indented ind rest else maybe_code s -- Beginning of a code block. r_code = rex "(.*)(::)([[:space:]]*)" -- Beginning of a comment block. r_comment = rex "[[:space:]]*\\.\\.([[:space:]].*)?" -- | Preprocessor for Org mode documents. literateOrg :: Position -> String -> [Layer] literateOrg pos s = mkLayers pos$ org s where org :: String -> [(LayerRole, String)] org [] = [] org s = let (line, rest) = getLine s in if org_begin `match` line then (Markup, line) : code rest else (Comment, line) : org rest -- Valid: #+begin_src agda2 :tangle yes -- Valid: #+begin_src agda2 -- Invalid: #+begin_src adga2-foo org_begin = rex' "\\`(.*)([[:space:]]*\\#\\+begin_src agda2[[:space:]]+)" code :: String -> [(LayerRole, String)] code [] = [] code s = let (line, rest) = getLine s in if org_end `match` line then (Markup, line) : org rest else (Code, line) : code rest org_end = rex' "\\`([[:space:]]*\\#\\+end_src[[:space:]]*)(.*)" -- Explicit type annotation required to disambiguate source. rex' :: String -> Regex -- Source blocks start with `#+begin_src` but the casing does not matter. rex' = makeRegexOpts blankCompOpt{newSyntax = True, caseSensitive = False} blankExecOpt Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Lexer.x0000644000000000000000000002777413466402171017304 0ustar0000000000000000{ {-# OPTIONS_GHC -fno-warn-deprecated-flags #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-tabs #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE BangPatterns #-} {-| The lexer is generated by Alex () and is an adaptation of GHC's lexer. The main lexing function 'lexer' is called by the "Agda.Syntax.Parser.Parser" to get the next token from the input. -} module Agda.Syntax.Parser.Lexer ( -- * The main function lexer -- * Lex states , normal, code , layout, empty_layout, bol, imp_dir -- * Alex generated functions , AlexReturn(..), alexScanUser ) where import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Comments #ifndef __HADDOCK__ import {-# SOURCE #-} Agda.Syntax.Parser.Layout import {-# SOURCE #-} Agda.Syntax.Parser.LexActions #endif import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.StringLiterals import Agda.Syntax.Parser.Tokens import Agda.Syntax.Literal } -- Unicode is not handled by the following regular expressions. -- Instead, unicode characters are translated to 7-bit ASCII -- by Agda.Syntax.Parser.LexActions.foolAlex in a preprocessing pass. $digit = 0-9 $hexdigit = [ $digit a-f A-F ] $alpha = [ A-Z a-z _ ] $op = [ \- \! \# \$ \% \& \* \+ \/ \< \= \> \^ \| \~ \? \` \[ \] \, \: ] $idstart = [ $digit $alpha $op ] $idchar = [ $idstart ' \\ ] $nonalpha = $idchar # $alpha $white_notab = $white # \t $white_nonl = $white_notab # \n @number = $digit+ | "0x" $hexdigit+ @integer = [\-]? @number @exponent = [eE] [\-\+]? @number @float = @integer \. @number @exponent? | @number @exponent -- A name can't start with \x (to allow \x -> x). -- Bug in alex: [ _ op ]+ doesn't seem to work! @start = ($idstart # [_]) | \\ [ $nonalpha ] @ident = @start $idchar* | [_] $idchar+ @namespace = (@ident \.)* @q_ident = @namespace @ident tokens :- -- White space <0,code,bol_,layout_,empty_layout_,imp_dir_> $white_nonl+ ; $white_notab ; -- Pragmas <0,code,pragma_> "{-#" { beginWith pragma $ symbol SymOpenPragma } "{-#" { beginWith fpragma $ symbol SymOpenPragma } "#-}" { endWith $ symbol SymClosePragma } "BUILTIN" { keyword KwBUILTIN } "CATCHALL" { keyword KwCATCHALL } "COMPILE" { endWith $ beginWith fpragma $ keyword KwCOMPILE } "FOREIGN" { endWith $ beginWith fpragma $ keyword KwFOREIGN } "DISPLAY" { keyword KwDISPLAY } "ETA" { keyword KwETA } "IMPOSSIBLE" { keyword KwIMPOSSIBLE } "INJECTIVE" { keyword KwINJECTIVE } "INLINE" { keyword KwINLINE } "NOINLINE" { keyword KwNOINLINE } "LINE" { keyword KwLINE } "MEASURE" { keyword KwMEASURE } "NO_POSITIVITY_CHECK" { keyword KwNO_POSITIVITY_CHECK } "NO_TERMINATION_CHECK" { keyword KwNO_TERMINATION_CHECK } "NO_UNIVERSE_CHECK" { keyword KwNO_UNIVERSE_CHECK } "NON_TERMINATING" { keyword KwNON_TERMINATING } "OPTIONS" { keyword KwOPTIONS } "POLARITY" { keyword KwPOLARITY } "REWRITE" { keyword KwREWRITE } "STATIC" { keyword KwSTATIC } "TERMINATING" { keyword KwTERMINATING } "WARNING_ON_USAGE" { keyword KwWARNING_ON_USAGE } . # [ $white \" ] + { withInterval $ TokString } -- we recognise string literals in pragmas . # [ $white ] + { withInterval $ TokString } -- Comments -- We need to rule out pragmas here. Usually longest match would take -- precedence, but in some states pragmas aren't valid but comments are. <0,code,bol_,layout_,empty_layout_,imp_dir_> "{-" / { not' (followedBy '#') } { nestedComment } -- A misplaced end-comment, like in @f {x-} = x-@ gives a parse error. "-}" { symbol SymEndComment } @ident "-}" { symbol SymEndComment } -- Dashes followed by a name symbol should be parsed as a name. <0,code,bol_,layout_,empty_layout_,imp_dir_> "--" .* / { keepComments .&&. (followedBy '\n' .||. eof) } { withInterval TokComment } <0,code,bol_,layout_,empty_layout_,imp_dir_> "--" .* / { followedBy '\n' .||. eof } ; -- We need to check the offside rule for the first token on each line. We -- should not check the offside rule for the end of file token or an -- '\end{code}' <0,code,imp_dir_> \n { begin bol_ } { \n ; -- ^ \\ "end{code}" { end } () / { not' eof } { offsideRule } } -- After a layout keyword there is either an open brace (no layout) or the -- indentation of the first token decides the column of the layout block. { \n ; -- \{ { endWith openBrace } () { endWith newLayoutContext } } -- The only rule for the empty_layout state. Generates a close brace. () { emptyLayout } -- Keywords <0,code> let { keyword KwLet } <0,code> in { keyword KwIn } <0,code> where { keyword KwWhere } <0,code> do { keyword KwDo } <0,code> field { keyword KwField } <0,code> with { keyword KwWith } <0,code> rewrite { keyword KwRewrite } <0,code> postulate { keyword KwPostulate } <0,code> primitive { keyword KwPrimitive } <0,code> open { keyword KwOpen } <0,code> import { keyword KwImport } <0,code> module { keyword KwModule } <0,code> data { keyword KwData } <0,code> codata { keyword KwCoData } <0,code> record { keyword KwRecord } <0,code> constructor { keyword KwConstructor } <0,code> inductive { keyword KwInductive } <0,code> coinductive { keyword KwCoInductive } <0,code> "eta-equality" { keyword KwEta } <0,code> "no-eta-equality" { keyword KwNoEta } <0,code> infix { keyword KwInfix } <0,code> infixl { keyword KwInfixL } <0,code> infixr { keyword KwInfixR } <0,code> mutual { keyword KwMutual } <0,code> abstract { keyword KwAbstract } <0,code> private { keyword KwPrivate } <0,code> instance { keyword KwInstance } <0,code> overlap { keyword KwOverlap } <0,code> macro { keyword KwMacro } <0,code> Set { keyword KwSet } <0,code> Prop { keyword KwProp } <0,code> forall { keyword KwForall } <0,code> Set @number { withInterval' (read . drop 3) TokSetN } <0,code> Prop @number { withInterval' (read . drop 4) TokPropN } <0,code> quoteGoal { keyword KwQuoteGoal } <0,code> quoteContext { keyword KwQuoteContext } <0,code> quote { keyword KwQuote } <0,code> quoteTerm { keyword KwQuoteTerm } <0,code> unquote { keyword KwUnquote } <0,code> unquoteDecl { keyword KwUnquoteDecl } <0,code> unquoteDef { keyword KwUnquoteDef } <0,code> tactic { keyword KwTactic } <0,code> syntax { keyword KwSyntax } <0,code> pattern { keyword KwPatternSyn } <0,code> variable { keyword KwVariable } -- The parser is responsible to put the lexer in the imp_dir_ state when it -- expects an import directive keyword. This means that if you run the -- tokensParser you will never see these keywords. <0,code> using { keyword KwUsing } <0,code> hiding { keyword KwHiding } <0,code> renaming { keyword KwRenaming } to { endWith $ keyword KwTo } <0,code> public { keyword KwPublic } -- Holes <0,code> "{!" { hole } -- Special symbols <0,code> "..." { symbol SymEllipsis } <0,code> ".." { symbol SymDotDot } <0,code> "." { symbol SymDot } <0,code> ";" { symbol SymSemi } <0,code> ":" { symbol SymColon } <0,code> "=" { symbol SymEqual } <0,code> "_" { symbol SymUnderscore } <0,code> "?" { symbol SymQuestionMark } <0,code> "|" { symbol SymBar } <0,code> "(|" /[$white] { symbol SymOpenIdiomBracket } <0,code> "|)" { symbol SymCloseIdiomBracket } <0,code> "(" { symbol SymOpenParen } <0,code> ")" { symbol SymCloseParen } <0,code> "->" { symbol SymArrow } <0,code> "\" { symbol SymLambda } -- " <0,code> "@" { symbol SymAs } <0,code> "{{" /[^!] { symbol SymDoubleOpenBrace } -- We don't lex '}}' into a SymDoubleCloseBrace. Instead, we lex it as -- two SymCloseBrace's. When the parser is looking for a double -- closing brace, it will also accept two SymCloseBrace's, after -- verifying that they are immediately next to each other. -- This trick allows us to keep "record { a = record {}}" working -- properly. -- <0,code> "}}" { symbol SymDoubleCloseBrace } <0,code> "{" { symbol SymOpenBrace } -- you can't use braces for layout <0,code> "}" { symbol SymCloseBrace } -- Literals <0,code> \' { litChar } <0,code,pragma_> \" { litString } <0,code> @integer { literal LitNat } <0,code> @float { literal LitFloat } -- Identifiers <0,code,imp_dir_> @q_ident { identifier } -- Andreas, 2013-02-21, added identifiers to the 'imp_dir_' state. -- This is to fix issue 782: 'toz' should not be lexed as 'to' -- (followed by 'z' after leaving imp_dir_). -- With identifiers in state imp_dir_, 'toz' should be lexed as -- identifier 'toz' in imp_dir_ state, leading to a parse error later. { -- | This is the initial state for parsing a regular, non-literate file. normal :: LexState normal = 0 {-| The layout state. Entered when we see a layout keyword ('withLayout') and exited either when seeing an open brace ('openBrace') or at the next token ('newLayoutContext'). Update: we don't use braces for layout anymore. -} layout :: LexState layout = layout_ {-| The state inside a pragma. -} pragma :: LexState pragma = pragma_ -- | The state inside a FOREIGN pragma. This needs to be different so that we don't -- lex further strings as pragma keywords. fpragma :: LexState fpragma = fpragma_ {-| We enter this state from 'newLayoutContext' when the token following a layout keyword is to the left of (or at the same column as) the current layout context. Example: > data Empty : Set where > foo : Empty -> Nat Here the second line is not part of the @where@ clause since it is has the same indentation as the @data@ definition. What we have to do is insert an empty layout block @{}@ after the @where@. The only thing that can happen in this state is that 'emptyLayout' is executed, generating the closing brace. The open brace is generated when entering by 'newLayoutContext'. -} empty_layout :: LexState empty_layout = empty_layout_ -- | This state is entered at the beginning of each line. You can't lex -- anything in this state, and to exit you have to check the layout rule. -- Done with 'offsideRule'. bol :: LexState bol = bol_ -- | This state can only be entered by the parser. In this state you can only -- lex the keywords @using@, @hiding@, @renaming@ and @to@. Moreover they are -- only keywords in this particular state. The lexer will never enter this -- state by itself, that has to be done in the parser. imp_dir :: LexState imp_dir = imp_dir_ -- | Return the next token. This is the function used by Happy in the parser. -- -- @lexer k = 'lexToken' >>= k@ lexer :: (Token -> Parser a) -> Parser a lexer k = lexToken >>= k -- | Do not use this function; it sets the 'ParseFlags' to -- 'undefined'. alexScan :: AlexInput -> Int -> AlexReturn (LexAction Token) -- | This is the main lexing function generated by Alex. alexScanUser :: ([LexState], ParseFlags) -> AlexInput -> Int -> AlexReturn (LexAction Token) } Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Monad.hs0000644000000000000000000003114613466402171017412 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Agda.Syntax.Parser.Monad ( -- * The parser monad Parser , ParseResult(..) , ParseState(..) , ParseError(..), ParseWarning(..) , LexState , LayoutContext(..) , ParseFlags (..) -- * Running the parser , initState , defaultParseFlags , parse , parsePosString , parseFromSrc -- * Manipulating the state , setParsePos, setLastPos, getParseInterval , setPrevToken , getParseFlags , getLexState, pushLexState, popLexState -- ** Layout , topContext, popContext, pushContext , pushCurrentContext -- ** Errors , parseWarningName , parseError, parseErrorAt, parseError', parseErrorRange , lexError ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.Exception (catch, displayException) import Data.Int import Data.Data (Data) import qualified Data.Text.Lazy as T import Control.Monad.State import Control.Monad.Except import Agda.Interaction.Options.Warnings import Agda.Syntax.Position import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.FileName import Agda.Utils.List ( tailWithDefault ) import qualified Agda.Utils.IO.UTF8 as UTF8 import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible {-------------------------------------------------------------------------- The parse monad --------------------------------------------------------------------------} -- | The parse monad. newtype Parser a = P { runP :: StateT ParseState (Either ParseError) a } deriving (Functor, Applicative, Monad, MonadState ParseState, MonadError ParseError) -- | The parser state. Contains everything the parser and the lexer could ever -- need. data ParseState = PState { parseSrcFile :: !SrcFile , parsePos :: !PositionWithoutFile -- ^ position at current input location , parseLastPos :: !PositionWithoutFile -- ^ position of last token , parseInp :: String -- ^ the current input , parsePrevChar :: !Char -- ^ the character before the input , parsePrevToken:: String -- ^ the previous token , parseLayout :: [LayoutContext] -- ^ the stack of layout contexts , parseLexState :: [LexState] -- ^ the state of the lexer -- (states can be nested so we need a stack) , parseFlags :: ParseFlags -- ^ parametrization of the parser } deriving Show {-| For context sensitive lexing alex provides what is called /start codes/ in the Alex documentation. It is really an integer representing the state of the lexer, so we call it @LexState@ instead. -} type LexState = Int -- | We need to keep track of the context to do layout. The context -- specifies the indentation (if any) of a layout block. See -- "Agda.Syntax.Parser.Layout" for more informaton. data LayoutContext = NoLayout -- ^ no layout | Layout Int32 -- ^ layout at specified column deriving Show -- | Parser flags. data ParseFlags = ParseFlags { parseKeepComments :: Bool -- ^ Should comment tokens be returned by the lexer? } deriving Show -- | Parse errors: what you get if parsing fails. data ParseError -- | Errors that arise at a specific position in the file = ParseError { errSrcFile :: !SrcFile -- ^ The file in which the error occurred. , errPos :: !PositionWithoutFile -- ^ Where the error occurred. , errInput :: String -- ^ The remaining input. , errPrevToken :: String -- ^ The previous token. , errMsg :: String -- ^ Hopefully an explanation of what happened. } -- | Parse errors that concern a range in a file. | OverlappingTokensError { errRange :: !(Range' SrcFile) -- ^ The range of the bigger overlapping token } -- | Parse errors that concern a whole file. | InvalidExtensionError { errPath :: !AbsolutePath -- ^ The file which the error concerns. , errValidExts :: [String] } | ReadFileError { errPath :: !AbsolutePath , errIOError :: IOError } -- | Warnings for parsing. data ParseWarning -- | Parse errors that concern a range in a file. = OverlappingTokensWarning { warnRange :: !(Range' SrcFile) -- ^ The range of the bigger overlapping token } deriving Data parseWarningName :: ParseWarning -> WarningName parseWarningName = \case OverlappingTokensWarning{} -> OverlappingTokensWarning_ -- | The result of parsing something. data ParseResult a = ParseOk ParseState a | ParseFailed ParseError deriving Show -- | Old interface to parser. unP :: Parser a -> ParseState -> ParseResult a unP (P m) s = case runStateT m s of Left err -> ParseFailed err Right (a, s) -> ParseOk s a -- | Throw a parse error at the current position. parseError :: String -> Parser a parseError msg = do s <- get throwError $ ParseError { errSrcFile = parseSrcFile s , errPos = parseLastPos s , errInput = parseInp s , errPrevToken = parsePrevToken s , errMsg = msg } {-------------------------------------------------------------------------- Instances --------------------------------------------------------------------------} instance Show ParseError where show = prettyShow instance Pretty ParseError where pretty ParseError{errPos,errSrcFile,errMsg,errPrevToken,errInput} = vcat [ pretty (errPos { srcFile = errSrcFile }) <> colon <+> text errMsg , text $ errPrevToken ++ "" , text $ take 30 errInput ++ "..." ] pretty OverlappingTokensError{errRange} = vcat [ pretty errRange <> colon <+> "Multi-line comment spans one or more literate text blocks." ] pretty InvalidExtensionError{errPath,errValidExts} = vcat [ pretty errPath <> colon <+> "Unsupported extension." , "Supported extensions are:" <+> prettyList_ errValidExts ] pretty ReadFileError{errPath,errIOError} = vcat [ "Cannot read file" <+> pretty errPath , "Error:" <+> text (displayException errIOError) ] instance HasRange ParseError where getRange err = case err of ParseError{ errSrcFile, errPos = p } -> posToRange' errSrcFile p p OverlappingTokensError{ errRange } -> errRange InvalidExtensionError{} -> errPathRange ReadFileError{} -> errPathRange where errPathRange = posToRange p p where p = startPos $ Just $ errPath err instance Show ParseWarning where show = prettyShow instance Pretty ParseWarning where pretty OverlappingTokensWarning{warnRange} = vcat [ pretty warnRange <> colon <+> "Multi-line comment spans one or more literate text blocks." ] instance HasRange ParseWarning where getRange OverlappingTokensWarning{warnRange} = warnRange {-------------------------------------------------------------------------- Running the parser --------------------------------------------------------------------------} initStatePos :: Position -> ParseFlags -> String -> [LexState] -> ParseState initStatePos pos flags inp st = PState { parseSrcFile = srcFile pos , parsePos = pos' , parseLastPos = pos' , parseInp = inp , parsePrevChar = '\n' , parsePrevToken = "" , parseLexState = st , parseLayout = [NoLayout] , parseFlags = flags } where pos' = pos { srcFile = () } -- | Constructs the initial state of the parser. The string argument -- is the input string, the file path is only there because it's part -- of a position. initState :: Maybe AbsolutePath -> ParseFlags -> String -> [LexState] -> ParseState initState file = initStatePos (startPos file) -- | The default flags. defaultParseFlags :: ParseFlags defaultParseFlags = ParseFlags { parseKeepComments = False } -- | The most general way of parsing a string. The "Agda.Syntax.Parser" will define -- more specialised functions that supply the 'ParseFlags' and the -- 'LexState'. parse :: ParseFlags -> [LexState] -> Parser a -> String -> ParseResult a parse flags st p input = parseFromSrc flags st p Strict.Nothing input -- | The even more general way of parsing a string. parsePosString :: Position -> ParseFlags -> [LexState] -> Parser a -> String -> ParseResult a parsePosString pos flags st p input = unP p (initStatePos pos flags input st) -- | Parses a string as if it were the contents of the given file -- Useful for integrating preprocessors. parseFromSrc :: ParseFlags -> [LexState] -> Parser a -> SrcFile -> String -> ParseResult a parseFromSrc flags st p src input = unP p (initState (Strict.toLazy src) flags input st) {-------------------------------------------------------------------------- Manipulating the state --------------------------------------------------------------------------} setParsePos :: PositionWithoutFile -> Parser () setParsePos p = modify $ \s -> s { parsePos = p } setLastPos :: PositionWithoutFile -> Parser () setLastPos p = modify $ \s -> s { parseLastPos = p } setPrevToken :: String -> Parser () setPrevToken t = modify $ \s -> s { parsePrevToken = t } getLastPos :: Parser PositionWithoutFile getLastPos = gets parseLastPos -- | The parse interval is between the last position and the current position. getParseInterval :: Parser Interval getParseInterval = do s <- get return $ posToInterval (parseSrcFile s) (parseLastPos s) (parsePos s) getLexState :: Parser [LexState] getLexState = parseLexState <$> get setLexState :: [LexState] -> Parser () setLexState ls = modify $ \ s -> s { parseLexState = ls } modifyLexState :: ([LexState] -> [LexState]) -> Parser () modifyLexState f = modify $ \ s -> s { parseLexState = f (parseLexState s) } pushLexState :: LexState -> Parser () pushLexState l = modifyLexState (l:) popLexState :: Parser () popLexState = modifyLexState $ tailWithDefault __IMPOSSIBLE__ getParseFlags :: Parser ParseFlags getParseFlags = gets parseFlags -- | Fake a parse error at the specified position. Used, for instance, when -- lexing nested comments, which when failing will always fail at the end -- of the file. A more informative position is the beginning of the failing -- comment. parseErrorAt :: PositionWithoutFile -> String -> Parser a parseErrorAt p msg = do setLastPos p parseError msg -- | Use 'parseErrorAt' or 'parseError' as appropriate. parseError' :: Maybe PositionWithoutFile -> String -> Parser a parseError' = maybe parseError parseErrorAt -- | Report a parse error at the beginning of the given 'Range'. parseErrorRange :: HasRange r => r -> String -> Parser a parseErrorRange = parseError' . rStart' . getRange -- | For lexical errors we want to report the current position as the site of -- the error, whereas for parse errors the previous position is the one -- we're interested in (since this will be the position of the token we just -- lexed). This function does 'parseErrorAt' the current position. lexError :: String -> Parser a lexError msg = do p <- gets parsePos parseErrorAt p msg {-------------------------------------------------------------------------- Layout --------------------------------------------------------------------------} getContext :: Parser [LayoutContext] getContext = gets parseLayout setContext :: [LayoutContext] -> Parser () setContext ctx = modify $ \ s -> s { parseLayout = ctx } -- | Return the current layout context. topContext :: Parser LayoutContext topContext = do ctx <- getContext case ctx of [] -> parseError "No layout context in scope" l:_ -> return l popContext :: Parser () popContext = do ctx <- getContext case ctx of [] -> parseError "There is no layout block to close at this point." _:ctx -> setContext ctx pushContext :: LayoutContext -> Parser () pushContext l = do ctx <- getContext setContext (l : ctx) -- | Should only be used at the beginning of a file. When we start parsing -- we should be in layout mode. Instead of forcing zero indentation we use -- the indentation of the first token. pushCurrentContext :: Parser () pushCurrentContext = do p <- getLastPos pushContext (Layout (posCol p)) Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Layout.hs0000644000000000000000000001236513466402171017633 0ustar0000000000000000-- {-# LANGUAGE CPP #-} {-| This module contains the lex actions that handle the layout rules. The way it works is that the 'Parser' monad keeps track of a stack of 'LayoutContext's specifying the indentation of the layout blocks in scope. For instance, consider the following incomplete (Haskell) program: > f x = x' > where > x' = case x of { True -> False; False -> ... At the @...@ the layout context would be > [NoLayout, Layout 4, Layout 0] The closest layout block is the one containing the @case@ branches. This block starts with an open brace (@\'{\'@) and so doesn't use layout. The second closest block is the @where@ clause. Here, there is no open brace so the block is started by the @x'@ token which has indentation 4. Finally there is a top-level layout block with indentation 0. -} module Agda.Syntax.Parser.Layout ( openBrace, closeBrace , withLayout , offsideRule , newLayoutContext , emptyLayout ) where import Agda.Syntax.Parser.Lexer import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Tokens import Agda.Syntax.Parser.LexActions import Agda.Syntax.Position -- | Executed upon lexing an open brace (@\'{\'@). Enters the 'NoLayout' -- context. openBrace :: LexAction Token openBrace = token $ \_ -> do pushContext NoLayout i <- getParseInterval return (TokSymbol SymOpenBrace i) {-| Executed upon lexing a close brace (@\'}\'@). Exits the current layout context. This might look a bit funny--the lexer will happily use a close brace to close a context open by a virtual brace. This is not a problem since the parser will make sure the braces are appropriately matched. -} closeBrace :: LexAction Token closeBrace = token $ \_ -> do popContext i <- getParseInterval return (TokSymbol SymCloseBrace i) {-| Executed for the first token in each line (see 'Agda.Syntax.Parser.Lexer.bol'). Checks the position of the token relative to the current layout context. If the token is - /to the left/ : Exit the current context and a return virtual close brace (stay in the 'Agda.Syntax.Parser.Lexer.bol' state). - /same column/ : Exit the 'Agda.Syntax.Parser.Lexer.bol' state and return a virtual semi colon. - /to the right/ : Exit the 'Agda.Syntax.Parser.Lexer.bol' state and continue lexing. If the current block doesn't use layout (i.e. it was started by 'openBrace') all positions are considered to be /to the right/. -} offsideRule :: LexAction Token offsideRule inp _ _ = do offs <- getOffside p case offs of LT -> do popContext return (TokSymbol SymCloseVirtualBrace i) EQ -> do popLexState return (TokSymbol SymVirtualSemi i) GT -> do popLexState lexToken where p = lexPos inp i = posToInterval (lexSrcFile inp) p p {-| This action is only executed from the 'Agda.Syntax.Parser.Lexer.empty_layout' state. It will exit this state, enter the 'Agda.Syntax.Parser.Lexer.bol' state, and return a virtual close brace (closing the empty layout block started by 'newLayoutContext'). -} emptyLayout :: LexAction Token emptyLayout inp _ _ = do popLexState pushLexState bol return (TokSymbol SymCloseVirtualBrace i) where p = lexPos inp i = posToInterval (lexSrcFile inp) p p {-| Start a new layout context. This is one of two ways to get out of the 'Agda.Syntax.Parser.Lexer.layout' state (the other is 'openBrace'). There are two possibilities: - The current token is to the right of the current layout context (or we're in a no layout context). - The current token is to the left of or in the same column as the current context. In the first case everything is fine and we enter a new layout context at the column of the current token. In the second case we have an empty layout block so we enter the 'Agda.Syntax.Parser.Lexer.empty_layout' state. In both cases we return a virtual open brace without consuming any input. Entering a new state when we know we want to generate a virtual @{}@ may seem a bit roundabout. The thing is that we can only generate one token at a time, so the way to generate two tokens is to generate the first one and then enter a state in which the only thing you can do is generate the second one. -} newLayoutContext :: LexAction Token newLayoutContext inp _ _ = do let offset = posCol p ctx <- topContext case ctx of Layout prevOffs | prevOffs >= offset -> do pushLexState empty_layout return (TokSymbol SymOpenVirtualBrace i) _ -> do pushContext (Layout offset) return (TokSymbol SymOpenVirtualBrace i) where p = lexPos inp i = posToInterval (lexSrcFile inp) p p -- | Compute the relative position of a location to the -- current layout context. getOffside :: Position' a -> Parser Ordering getOffside loc = do ctx <- topContext return $ case ctx of Layout n -> compare (posCol loc) n _ -> GT Agda-2.6.0.1/src/full/Agda/Syntax/Parser/Alex.hs0000644000000000000000000001145413466402171017245 0ustar0000000000000000{-| This module defines the things required by Alex and some other Alex related things. -} module Agda.Syntax.Parser.Alex ( -- * Alex requirements AlexInput(..) , lensLexInput , alexInputPrevChar , alexGetChar, alexGetByte -- * Lex actions , LexAction, LexPredicate , (.&&.), (.||.), not' , PreviousInput, CurrentInput, TokenLength -- * Monad operations , getLexInput, setLexInput ) where import Control.Monad.State import Data.Char import Data.Word import Agda.Syntax.Position import Agda.Syntax.Parser.Monad import Agda.Utils.Lens import Agda.Utils.Monad import Agda.Utils.Tuple -- | This is what the lexer manipulates. data AlexInput = AlexInput { lexSrcFile :: !SrcFile -- ^ File. , lexPos :: !PositionWithoutFile -- ^ Current position. , lexInput :: String -- ^ Current input. , lexPrevChar :: !Char -- ^ Previously read character. } -- | A lens for 'lexInput'. lensLexInput :: Lens' String AlexInput lensLexInput f r = f (lexInput r) <&> \ s -> r { lexInput = s } -- | Get the previously lexed character. Same as 'lexPrevChar'. Alex needs this -- to be defined to handle \"patterns with a left-context\". alexInputPrevChar :: AlexInput -> Char alexInputPrevChar = lexPrevChar -- | Returns the next character, and updates the 'AlexInput' value. -- -- This function is not suitable for use by Alex 2, because it can -- return non-ASCII characters. alexGetChar :: AlexInput -> Maybe (Char, AlexInput) alexGetChar (AlexInput { lexInput = [] }) = Nothing alexGetChar inp@(AlexInput { lexInput = c:s, lexPos = p }) = Just (c, AlexInput { lexSrcFile = lexSrcFile inp , lexInput = s , lexPos = movePos p c , lexPrevChar = c } ) -- | Returns the next byte, and updates the 'AlexInput' value. -- -- A trick is used to handle the fact that there are more than 256 -- Unicode code points. The function translates characters to bytes in -- the following way: -- -- * Whitespace characters other than \'\\t\' and \'\\n\' are -- translated to \' \'. -- * Non-ASCII alphabetical characters are translated to \'z\'. -- * Other non-ASCII printable characters are translated to \'+\'. -- * Everything else is translated to \'\\1\'. -- -- Note that it is important that there are no keywords containing -- \'z\', \'+\', \' \' or \'\\1\'. -- -- This function is used by Alex (version 3). alexGetByte :: AlexInput -> Maybe (Word8, AlexInput) alexGetByte ai = mapFst (fromIntegral . fromEnum . toASCII) <$> alexGetChar ai where toASCII c | isSpace c && c /= '\t' && c /= '\n' = ' ' | isAscii c = c | isPrint c = if isAlpha c then 'z' else '+' | otherwise = '\1' {-------------------------------------------------------------------------- Monad operations --------------------------------------------------------------------------} getLexInput :: Parser AlexInput getLexInput = getInp <$> get where getInp s = AlexInput { lexSrcFile = parseSrcFile s , lexPos = parsePos s , lexInput = parseInp s , lexPrevChar = parsePrevChar s } setLexInput :: AlexInput -> Parser () setLexInput inp = modify upd where upd s = s { parseSrcFile = lexSrcFile inp , parsePos = lexPos inp , parseInp = lexInput inp , parsePrevChar = lexPrevChar inp } {-------------------------------------------------------------------------- Lex actions --------------------------------------------------------------------------} type PreviousInput = AlexInput type CurrentInput = AlexInput type TokenLength = Int -- | In the lexer, regular expressions are associated with lex actions who's -- task it is to construct the tokens. type LexAction r = PreviousInput -> CurrentInput -> TokenLength -> Parser r -- | Sometimes regular expressions aren't enough. Alex provides a way to do -- arbitrary computations to see if the input matches. This is done with a -- lex predicate. type LexPredicate = ([LexState], ParseFlags) -> PreviousInput -> TokenLength -> CurrentInput -> Bool -- | Conjunction of 'LexPredicate's. (.&&.) :: LexPredicate -> LexPredicate -> LexPredicate p1 .&&. p2 = \x y z u -> p1 x y z u && p2 x y z u -- | Disjunction of 'LexPredicate's. (.||.) :: LexPredicate -> LexPredicate -> LexPredicate p1 .||. p2 = \x y z u -> p1 x y z u || p2 x y z u -- | Negation of 'LexPredicate's. not' :: LexPredicate -> LexPredicate not' p = \x y z u -> not (p x y z u) Agda-2.6.0.1/src/full/Agda/Syntax/Translation/0000755000000000000000000000000013466402171017055 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs0000644000000000000000000017610713466402171023156 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- {-# OPTIONS -fwarn-unused-binds #-} {-| The translation of abstract syntax to concrete syntax has two purposes. First it allows us to pretty print abstract syntax values without having to write a dedicated pretty printer, and second it serves as a sanity check for the concrete to abstract translation: translating from concrete to abstract and then back again should be (more or less) the identity. -} module Agda.Syntax.Translation.AbstractToConcrete ( ToConcrete(..) , toConcreteCtx , abstractToConcrete_ , abstractToConcreteScope , abstractToConcreteHiding , runAbsToCon , RangeAndPragma(..) , abstractToConcreteCtx , withScope , preserveInteractionIds , AbsToCon, Env , noTakenNames ) where import Prelude hiding (null) import Control.Applicative hiding (empty) import Control.Monad.Reader import Control.Monad.State import Data.Either import qualified Data.Map as Map import Data.Maybe import Data.Monoid import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Data.Traversable (traverse) import Data.Void import Data.List (sortBy) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Info as A import Agda.Syntax.Internal (MetaId(..)) import qualified Agda.Syntax.Internal as I import Agda.Syntax.Fixity import Agda.Syntax.Concrete as C import Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Views as A import Agda.Syntax.Abstract.Pattern as A import Agda.Syntax.Abstract.PatternSynonyms import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad ( resolveName' ) import Agda.TypeChecking.Monad.State (getScope, getAllPatternSyns) import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Builtin import Agda.Interaction.Options import qualified Agda.Utils.AssocList as AssocList import Agda.Utils.Either import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.NonemptyList import Agda.Utils.Singleton import Agda.Utils.Tuple import Agda.Utils.Pretty #include "undefined.h" import Agda.Utils.Impossible -- Environment ------------------------------------------------------------ data Env = Env { takenVarNames :: Set A.Name -- ^ Abstract names currently in scope. Unlike the -- ScopeInfo, this includes names for hidden -- arguments inserted by the system. , takenDefNames :: Set C.Name -- ^ Concrete names of all definitions in scope , currentScope :: ScopeInfo , builtins :: Map String A.QName -- ^ Certain builtins (like `fromNat`) have special printing , preserveIIds :: Bool -- ^ Preserve interaction point ids , foldPatternSynonyms :: Bool } makeEnv :: ScopeInfo -> TCM Env makeEnv scope = do -- zero and suc doesn't have to be in scope for natural number literals to work let noScopeCheck b = elem b [builtinZero, builtinSuc] name (I.Def q _) = Just q name (I.Con q _ _) = Just (I.conName q) name _ = Nothing builtin b = getBuiltin' b >>= \ case Just v | Just q <- name v, noScopeCheck b || isNameInScope q scope -> return [(b, q)] _ -> return [] vars <- map (fst . unDom) <$> asksTC envContext -- pick concrete names for in-scope names now so we don't -- accidentally shadow them forM_ (scopeLocals scope) $ \(y , x) -> do pickConcreteName (localVar x) y builtinList <- concat <$> mapM builtin [ builtinFromNat, builtinFromString, builtinFromNeg, builtinZero, builtinSuc ] foldPatSyns <- optPrintPatternSynonyms <$> pragmaOptions return $ Env { takenVarNames = Set.fromList vars , takenDefNames = defs , currentScope = scope , builtins = Map.fromList builtinList , preserveIIds = False , foldPatternSynonyms = foldPatSyns } where -- Jesper, 2018-12-10: It's fine to shadow generalizable names as -- they will never show up directly in printed terms. notGeneralizeName AbsName{ anameKind = k } = not (k == GeneralizeName || k == DisallowedGeneralizeName) defs = Map.keysSet $ Map.filter (all notGeneralizeName) $ nsNames $ everythingInScope scope currentPrecedence :: AbsToCon PrecedenceStack currentPrecedence = asks $ scopePrecedence . currentScope preserveInteractionIds :: AbsToCon a -> AbsToCon a preserveInteractionIds = local $ \ e -> e { preserveIIds = True } withPrecedence' :: PrecedenceStack -> AbsToCon a -> AbsToCon a withPrecedence' ps = local $ \e -> e { currentScope = (currentScope e) { scopePrecedence = ps } } withPrecedence :: Precedence -> AbsToCon a -> AbsToCon a withPrecedence p ret = do ps <- currentPrecedence withPrecedence' (pushPrecedence p ps) ret withScope :: ScopeInfo -> AbsToCon a -> AbsToCon a withScope scope = local $ \e -> e { currentScope = scope } noTakenNames :: AbsToCon a -> AbsToCon a noTakenNames = local $ \e -> e { takenVarNames = Set.empty } dontFoldPatternSynonyms :: AbsToCon a -> AbsToCon a dontFoldPatternSynonyms = local $ \ e -> e { foldPatternSynonyms = False } -- | Bind a concrete name to an abstract in the translation environment. addBinding :: C.Name -> A.Name -> Env -> Env addBinding y x e = e { takenVarNames = Set.insert x $ takenVarNames e , currentScope = (`updateScopeLocals` currentScope e) $ AssocList.insert y (LocalVar x __IMPOSSIBLE__ []) } -- | Get a function to check if a name refers to a particular builtin function. isBuiltinFun :: AbsToCon (A.QName -> String -> Bool) isBuiltinFun = asks $ is . builtins where is m q b = Just q == Map.lookup b m -- The Monad -------------------------------------------------------------- -- | We put the translation into TCM in order to print debug messages. type AbsToCon = ReaderT Env TCM runAbsToCon :: AbsToCon c -> TCM c runAbsToCon m = do scope <- getScope reportSLn "toConcrete" 50 $ render $ "entering AbsToCon with scope:" <+> prettyList_ (map (text . C.nameToRawName . fst) $ scopeLocals scope) runReaderT m =<< makeEnv scope abstractToConcreteScope :: ToConcrete a c => ScopeInfo -> a -> TCM c abstractToConcreteScope scope a = runReaderT (toConcrete a) =<< makeEnv scope abstractToConcreteCtx :: ToConcrete a c => Precedence -> a -> TCM c abstractToConcreteCtx ctx x = runAbsToCon $ withPrecedence ctx (toConcrete x) abstractToConcrete_ :: ToConcrete a c => a -> TCM c abstractToConcrete_ = runAbsToCon . toConcrete abstractToConcreteHiding :: (LensHiding i, ToConcrete a c) => i -> a -> TCM c abstractToConcreteHiding i = runAbsToCon . toConcreteHiding i -- Dealing with names ----------------------------------------------------- -- | Names in abstract syntax are fully qualified, but the concrete syntax -- requires non-qualified names in places. In theory (if all scopes are -- correct), we should get a non-qualified name when translating back to a -- concrete name, but I suspect the scope isn't always perfect. In these -- cases we just throw away the qualified part. It's just for pretty printing -- anyway... unsafeQNameToName :: C.QName -> C.Name unsafeQNameToName = C.unqualify lookupQName :: AllowAmbiguousNames -> A.QName -> AbsToCon C.QName lookupQName ambCon x | Just s <- getGeneralizedFieldName x = return (C.QName $ C.Name noRange C.InScope $ C.stringNameParts s) lookupQName ambCon x = do ys <- inverseScopeLookupName' ambCon x <$> asks currentScope lift $ reportSLn "scope.inverse" 100 $ "inverse looking up abstract name " ++ prettyShow x ++ " yields " ++ prettyShow ys loop ys where -- Found concrete name: check that it is not shadowed by a local loop (qy@Qual{} : _ ) = return qy -- local names cannot be qualified loop (qy@(C.QName y) : ys) = lookupNameInScope y >>= \case Just x' | x' /= qnameName x -> loop ys _ -> return qy -- Found no concrete name: make up a new one loop [] = case qnameToConcrete x of qy@Qual{} -> return $ setNotInScope qy qy@C.QName{} -> C.QName <$> chooseName (qnameName x) lookupModule :: A.ModuleName -> AbsToCon C.QName lookupModule (A.MName []) = return $ C.QName $ C.Name noRange InScope [Id "-1"] -- Andreas, 2016-10-10 it can happen that we have an empty module name -- for instance when we query the current module inside the -- frontmatter or module telescope of the top level module. -- In this case, we print it as an invalid module name. -- (Should only affect debug printing.) lookupModule x = do scope <- asks currentScope case inverseScopeLookupModule x scope of (y : _) -> return y [] -> return $ mnameToConcrete x -- this is what happens for names that are not in scope (private names) -- | Is this concrete name currently in use by a particular abstract -- name in the current scope? lookupNameInScope :: C.Name -> AbsToCon (Maybe A.Name) lookupNameInScope y = fmap localVar . lookup y . scopeLocals <$> asks currentScope -- | Have we already committed to a specific concrete name for this -- abstract name? If yes, return the concrete name(s). hasConcreteNames :: (MonadTCState m) => A.Name -> m [C.Name] hasConcreteNames x = Map.findWithDefault [] x <$> useTC stConcreteNames -- | Commit to a specific concrete name for printing the given -- abstract name. If the abstract name already has associated --- concrete name(s), the new name is only used when all previous --- names are shadowed. Precondition: the abstract name should be in -- scope. pickConcreteName :: (MonadTCState m) => A.Name -> C.Name -> m () pickConcreteName x y = modifyTCLens stConcreteNames $ flip Map.alter x $ \case Nothing -> Just $ [y] (Just ys) -> Just $ ys ++ [y] -- | For the given abstract name, return the names that could shadow it: -- 1. first set: names for which we have already picked a -- concrete name (so we should definitely avoid these names) -- 2. second set: flexible names that we would like to keep free if -- possible (we can try to avoid them, but it's not required) shadowingNames :: (MonadTCState m) => A.Name -> m (Set C.Name, Set C.Name) shadowingNames x = do shadows <- Map.findWithDefault [] x <$> useTC stShadowingNames ys <- concat <$> forM shadows hasConcreteNames let zs = map nameConcrete shadows return (Set.fromList ys , Set.fromList zs) toConcreteName :: A.Name -> AbsToCon C.Name toConcreteName x | y <- nameConcrete x , isNoName y = return y toConcreteName x = (Map.findWithDefault [] x <$> useTC stConcreteNames) >>= loop where -- case: we already have picked some name(s) for x loop (y:ys) = ifM (isGoodName x y) (return y) (loop ys) -- case: we haven't picked a concrete name yet, or all previously -- picked names are shadowed, so we pick a new name now loop [] = do y <- chooseName x pickConcreteName x y return y -- Is 'y' a good concrete name for abstract name 'x'? isGoodName :: A.Name -> C.Name -> AbsToCon Bool isGoodName x y = do zs <- Set.toList <$> asks takenVarNames allM zs $ \z -> if x == z then return True else do czs <- hasConcreteNames z return $ all (/= y) czs -- | Choose a new unshadowed name for the given abstract name chooseName :: A.Name -> AbsToCon C.Name chooseName x = lookupNameInScope (nameConcrete x) >>= \case -- If the name is currently in scope, we do not rename it Just x' | x == x' -> do reportSLn "toConcrete.bindName" 80 $ "name " ++ C.nameToRawName (nameConcrete x) ++ " already in scope, so not renaming" return $ nameConcrete x -- Otherwise we pick a name that does not shadow other names _ -> do taken <- takenConcreteNames toAvoid <- do (mustAvoid , tryToAvoid) <- shadowingNames x let tryToAvoid' = Set.filter ((== InScope) . isInScope) tryToAvoid return $ case isInScope x of -- If in scope, we only rename when the name is already taken -- in the future InScope -> mustAvoid -- If not in scope, we also rename to avoid renaming in-scope -- variables in the future. C.NotInScope -> mustAvoid `Set.union` tryToAvoid' let shouldAvoid = (`Set.member` (taken `Set.union` toAvoid)) y = firstNonTakenName shouldAvoid $ nameConcrete x reportSLn "toConcrete.bindName" 80 $ render $ vcat [ "picking concrete name for:" <+> text (C.nameToRawName $ nameConcrete x) , "names already taken: " <+> prettyList_ (map C.nameToRawName $ Set.toList taken) , "names to avoid: " <+> prettyList_ (map C.nameToRawName $ Set.toList toAvoid) , "concrete name chosen: " <+> text (C.nameToRawName y) ] return y where takenConcreteNames :: AbsToCon (Set C.Name) takenConcreteNames = do xs <- asks takenDefNames ys0 <- asks takenVarNames reportSLn "toConcrete.bindName" 90 $ render $ "abstract names of local vars: " <+> prettyList_ (map (C.nameToRawName . nameConcrete) $ Set.toList ys0) ys <- Set.fromList . concat <$> mapM hasConcreteNames (Set.toList ys0) return $ xs `Set.union` ys -- | Add a abstract name to the scope and produce an available concrete version of it. bindName :: A.Name -> (C.Name -> AbsToCon a) -> AbsToCon a bindName x ret = do y <- toConcreteName x reportSLn "toConcrete.bindName" 30 $ "adding " ++ (C.nameToRawName $ nameConcrete x) ++ " to the scope under concrete name " ++ C.nameToRawName y local (addBinding y x) $ ret y -- | Like 'bindName', but do not care whether name is already taken. bindName' :: A.Name -> AbsToCon a -> AbsToCon a bindName' x ret = do reportSLn "toConcrete.bindName" 30 $ "adding " ++ (C.nameToRawName $ nameConcrete x) ++ " to the scope with forced name" pickConcreteName x y applyUnless (isNoName y) (local $ addBinding y x) ret where y = nameConcrete x -- Dealing with precedences ----------------------------------------------- -- | General bracketing function. bracket' :: (e -> e) -- ^ the bracketing function -> (PrecedenceStack -> Bool) -- ^ Should we bracket things -- which have the given -- precedence? -> e -> AbsToCon e bracket' paren needParen e = do p <- currentPrecedence return $ if needParen p then paren e else e -- | Expression bracketing bracket :: (PrecedenceStack -> Bool) -> AbsToCon C.Expr -> AbsToCon C.Expr bracket par m = do e <- m bracket' (Paren (getRange e)) par e -- | Pattern bracketing bracketP_ :: (PrecedenceStack -> Bool) -> AbsToCon C.Pattern -> AbsToCon C.Pattern bracketP_ par m = do e <- m bracket' (ParenP (getRange e)) par e {- UNUSED -- | Pattern bracketing bracketP :: (PrecedenceStack -> Bool) -> (C.Pattern -> AbsToCon a) -> ((C.Pattern -> AbsToCon a) -> AbsToCon a) -> AbsToCon a bracketP par ret m = m $ \p -> do p <- bracket' (ParenP $ getRange p) par p ret p -} -- | Applications where the argument is a lambda without parentheses need -- parens more often than other applications. isLambda :: NamedArg A.Expr -> Bool isLambda e | notVisible e = False isLambda e = case unScope $ namedArg e of A.Lam{} -> True A.AbsurdLam{} -> True A.ExtendedLam{} -> True _ -> False -- Dealing with infix declarations ---------------------------------------- -- | If a name is defined with a fixity that differs from the default, we have -- to generate a fixity declaration for that name. withInfixDecl :: DefInfo -> C.Name -> AbsToCon [C.Declaration] -> AbsToCon [C.Declaration] withInfixDecl i x m = do ds <- m return $ fixDecl ++ synDecl ++ ds where fixDecl = [C.Infix (theFixity $ defFixity i) [x] | theFixity (defFixity i) /= noFixity] synDecl = [C.Syntax x (theNotation (defFixity i))] {- UNUSED withInfixDecls :: [(DefInfo, C.Name)] -> AbsToCon [C.Declaration] -> AbsToCon [C.Declaration] withInfixDecls = foldr (.) id . map (uncurry withInfixDecl) -} -- Dealing with private definitions --------------------------------------- -- | Add @abstract@, @private@, @instance@ modifiers. withAbstractPrivate :: DefInfo -> AbsToCon [C.Declaration] -> AbsToCon [C.Declaration] withAbstractPrivate i m = priv (defAccess i) . abst (A.defAbstract i) . addInstanceB (A.defInstance i == InstanceDef) <$> m where priv (PrivateAccess UserWritten) ds = [ C.Private (getRange ds) UserWritten ds ] priv _ ds = ds abst AbstractDef ds = [ C.Abstract (getRange ds) ds ] abst ConcreteDef ds = ds addInstanceB :: Bool -> [C.Declaration] -> [C.Declaration] addInstanceB True ds = [ C.InstanceB (getRange ds) ds ] addInstanceB False ds = ds -- The To Concrete Class -------------------------------------------------- class ToConcrete a c | a -> c where toConcrete :: a -> AbsToCon c bindToConcrete :: a -> (c -> AbsToCon b) -> AbsToCon b -- Christian Sattler, 2017-08-05: -- These default implementations are not valid semantically (at least -- the second one). Perhaps they (it) should be removed. toConcrete x = bindToConcrete x return bindToConcrete x ret = ret =<< toConcrete x -- | Translate something in a context of the given precedence. toConcreteCtx :: ToConcrete a c => Precedence -> a -> AbsToCon c toConcreteCtx p x = withPrecedence p $ toConcrete x -- | Translate something in a context of the given precedence. bindToConcreteCtx :: ToConcrete a c => Precedence -> a -> (c -> AbsToCon b) -> AbsToCon b bindToConcreteCtx p x ret = withPrecedence p $ bindToConcrete x ret -- | Translate something in the top context. toConcreteTop :: ToConcrete a c => a -> AbsToCon c toConcreteTop = toConcreteCtx TopCtx -- | Translate something in the top context. bindToConcreteTop :: ToConcrete a c => a -> (c -> AbsToCon b) -> AbsToCon b bindToConcreteTop = bindToConcreteCtx TopCtx -- | Translate something in a context indicated by 'Hiding' info. toConcreteHiding :: (LensHiding h, ToConcrete a c) => h -> a -> AbsToCon c toConcreteHiding h = case getHiding h of NotHidden -> toConcrete Hidden -> toConcreteTop Instance{} -> toConcreteTop -- | Translate something in a context indicated by 'Hiding' info. bindToConcreteHiding :: (LensHiding h, ToConcrete a c) => h -> a -> (c -> AbsToCon b) -> AbsToCon b bindToConcreteHiding h = case getHiding h of NotHidden -> bindToConcrete Hidden -> bindToConcreteTop Instance{} -> bindToConcreteTop -- General instances ------------------------------------------------------ instance ToConcrete a c => ToConcrete [a] [c] where toConcrete = mapM toConcrete -- Andreas, 2017-04-11, Issue #2543 -- The naive `thread'ing does not work as we have to undo -- changes to the Precedence. -- bindToConcrete = thread bindToConcrete bindToConcrete [] ret = ret [] bindToConcrete (a:as) ret = do p <- currentPrecedence -- save precedence bindToConcrete a $ \ c -> withPrecedence' p $ -- reset precedence bindToConcrete as $ \ cs -> ret (c : cs) instance (ToConcrete a1 c1, ToConcrete a2 c2) => ToConcrete (Either a1 a2) (Either c1 c2) where toConcrete = traverseEither toConcrete toConcrete bindToConcrete (Left x) ret = bindToConcrete x $ \x -> ret (Left x) bindToConcrete (Right y) ret = bindToConcrete y $ \y -> ret (Right y) instance (ToConcrete a1 c1, ToConcrete a2 c2) => ToConcrete (a1,a2) (c1,c2) where toConcrete (x,y) = liftM2 (,) (toConcrete x) (toConcrete y) bindToConcrete (x,y) ret = bindToConcrete x $ \x -> bindToConcrete y $ \y -> ret (x,y) instance (ToConcrete a1 c1, ToConcrete a2 c2, ToConcrete a3 c3) => ToConcrete (a1,a2,a3) (c1,c2,c3) where toConcrete (x,y,z) = reorder <$> toConcrete (x,(y,z)) where reorder (x,(y,z)) = (x,y,z) bindToConcrete (x,y,z) ret = bindToConcrete (x,(y,z)) $ ret . reorder where reorder (x,(y,z)) = (x,y,z) instance ToConcrete a c => ToConcrete (Arg a) (Arg c) where toConcrete (Arg i a) = Arg i <$> toConcreteHiding i a bindToConcrete (Arg info x) ret = bindToConcreteHiding info x $ ret . Arg info instance ToConcrete a c => ToConcrete (WithHiding a) (WithHiding c) where toConcrete (WithHiding h a) = WithHiding h <$> toConcreteHiding h a bindToConcrete (WithHiding h a) ret = bindToConcreteHiding h a $ \ a -> ret $ WithHiding h a instance ToConcrete a c => ToConcrete (Named name a) (Named name c) where toConcrete (Named n x) = Named n <$> toConcrete x bindToConcrete (Named n x) ret = bindToConcrete x $ ret . Named n -- Names ------------------------------------------------------------------ instance ToConcrete A.Name C.Name where toConcrete = toConcreteName bindToConcrete x = bindName x instance ToConcrete BindName C.BoundName where toConcrete = fmap C.mkBoundName_ . toConcreteName . unBind bindToConcrete x = bindName (unBind x) . (. C.mkBoundName_) instance ToConcrete A.QName C.QName where toConcrete = lookupQName AmbiguousConProjs instance ToConcrete A.ModuleName C.QName where toConcrete = lookupModule instance ToConcrete AbstractName C.QName where toConcrete = toConcrete . anameName -- | Assumes name is not 'UnknownName'. instance ToConcrete ResolvedName C.QName where toConcrete = \case VarName x _ -> C.QName <$> toConcrete x DefinedName _ x -> toConcrete x FieldName xs -> toConcrete (headNe xs) ConstructorName xs -> toConcrete (headNe xs) PatternSynResName xs -> toConcrete (headNe xs) UnknownName -> __IMPOSSIBLE__ -- Expression instance ---------------------------------------------------- instance ToConcrete A.Expr C.Expr where toConcrete (Var x) = Ident . C.QName <$> toConcrete x toConcrete (Def x) = Ident <$> toConcrete x toConcrete (Proj ProjPrefix p) = Ident <$> toConcrete (headAmbQ p) toConcrete (Proj _ p) = C.Dot noRange . Ident <$> toConcrete (headAmbQ p) toConcrete (A.Macro x) = Ident <$> toConcrete x toConcrete e@(Con c) = tryToRecoverPatternSyn e $ Ident <$> toConcrete (headAmbQ c) -- for names we have to use the name from the info, since the abstract -- name has been resolved to a fully qualified name (except for -- variables) toConcrete e@(A.Lit (LitQName r x)) = tryToRecoverPatternSyn e $ do x <- lookupQName AmbiguousNothing x bracket appBrackets $ return $ C.App r (C.Quote r) (defaultNamedArg $ C.Ident x) toConcrete e@(A.Lit l) = tryToRecoverPatternSyn e $ return $ C.Lit l -- Andreas, 2014-05-17 We print question marks with their -- interaction id, in case @metaNumber /= Nothing@ -- Ulf, 2017-09-20 ... or @preserveIIds == True@. toConcrete (A.QuestionMark i ii) = do preserve <- asks preserveIIds return $ C.QuestionMark (getRange i) $ interactionId ii <$ guard (preserve || isJust (metaNumber i)) toConcrete (A.Underscore i) = return $ C.Underscore (getRange i) $ prettyShow . NamedMeta (metaNameSuggestion i) . MetaId . metaId <$> metaNumber i toConcrete (A.Dot i e) = C.Dot (getRange i) <$> toConcrete e toConcrete e@(A.App i e1 e2) = do is <- isBuiltinFun -- Special printing of desugared overloaded literals: -- fromNat 4 --> 4 -- fromNeg 4 --> -4 -- fromString "foo" --> "foo" -- Only when the corresponding conversion function is in scope and was -- inserted by the system. case (getHead e1, namedArg e2) of (Just (HdDef q), l@A.Lit{}) | any (is q) [builtinFromNat, builtinFromString], visible e2, getOrigin i == Inserted -> toConcrete l (Just (HdDef q), A.Lit (LitNat r n)) | q `is` builtinFromNeg, visible e2, getOrigin i == Inserted -> toConcrete (A.Lit (LitNat r (-n))) _ -> tryToRecoverPatternSyn e $ tryToRecoverOpApp e $ tryToRecoverNatural e -- or fallback to App $ bracket (appBrackets' $ preferParenless (appParens i) && isLambda e2) $ do e1' <- toConcreteCtx FunctionCtx e1 e2' <- toConcreteCtx (ArgumentCtx $ appParens i) e2 return $ C.App (getRange i) e1' e2' toConcrete (A.WithApp i e es) = bracket withAppBrackets $ do e <- toConcreteCtx WithFunCtx e es <- mapM (toConcreteCtx WithArgCtx) es return $ C.WithApp (getRange i) e es toConcrete (A.AbsurdLam i h) = bracket lamBrackets $ return $ C.AbsurdLam (getRange i) h toConcrete e@(A.Lam i _ _) = tryToRecoverOpApp e -- recover sections $ bracket lamBrackets $ case lamView e of (bs, e) -> bindToConcrete (map makeDomainFree bs) $ \ bs -> do e <- toConcreteTop e return $ C.Lam (getRange i) bs e where lamView (A.Lam _ b@(A.DomainFree _) e) = case lamView e of ([], e) -> ([b], e) (bs@(A.DomainFree _ : _), e) -> (b:bs, e) _ -> ([b], e) lamView (A.Lam _ b@(A.DomainFull _) e) = case lamView e of ([], e) -> ([b], e) (bs@(A.DomainFull _ : _), e) -> (b:bs, e) _ -> ([b], e) lamView e = ([], e) toConcrete (A.ExtendedLam i di qname cs) = bracket lamBrackets $ do decls <- concat <$> toConcrete cs let namedPat np = case getHiding np of NotHidden -> namedArg np Hidden -> C.HiddenP noRange (unArg np) Instance{} -> C.InstanceP noRange (unArg np) -- we know all lhs are of the form `.extlam p1 p2 ... pn`, -- with the name .extlam leftmost. It is our mission to remove it. let removeApp (C.RawAppP r (_:es)) = return $ C.RawAppP r es removeApp (C.AppP (C.IdentP _) np) = return $ namedPat np removeApp (C.AppP p np) = do p <- removeApp p return $ C.AppP p np -- Andreas, 2018-06-18, issue #3136 -- Empty pattern list also allowed in extended lambda, -- thus, we might face the unapplied .extendedlambda identifier. removeApp x@C.IdentP{} = return $ C.RawAppP (getRange x) [] removeApp p = do lift $ reportSLn "extendedlambda" 50 $ "abstractToConcrete removeApp p = " ++ show p return p -- __IMPOSSIBLE__ -- Andreas, this is actually not impossible, my strictification exposed this sleeping bug let decl2clause (C.FunClause lhs rhs wh ca) = do let p = lhsOriginalPattern lhs lift $ reportSLn "extendedlambda" 50 $ "abstractToConcrete extended lambda pattern p = " ++ show p p' <- removeApp p lift $ reportSLn "extendedlambda" 50 $ "abstractToConcrete extended lambda pattern p' = " ++ show p' return $ LamClause lhs{ lhsOriginalPattern = p' } rhs wh ca decl2clause _ = __IMPOSSIBLE__ C.ExtendedLam (getRange i) <$> mapM decl2clause decls toConcrete (A.Pi _ [] e) = toConcrete e toConcrete t@(A.Pi i _ _) = case piTel t of (tel, e) -> bracket piBrackets $ bindToConcrete tel $ \ tel' -> do e' <- toConcreteTop e return $ C.Pi tel' e' where piTel (A.Pi _ tel e) = (tel ++) -*- id $ piTel e piTel e = ([], e) toConcrete (A.Generalized _ e) = C.Generalized <$> toConcrete e toConcrete (A.Fun i a b) = bracket piBrackets $ do a' <- toConcreteCtx (if irr then DotPatternCtx else FunctionSpaceDomainCtx) a b' <- toConcreteTop b return $ C.Fun (getRange i) (defaultArg $ addRel a' $ mkArg a') b' -- Andreas, 2018-06-14, issue #2513 -- TODO: print attributes where irr = getRelevance a `elem` [Irrelevant, NonStrict] addRel a e = case getRelevance a of Irrelevant -> addDot a e NonStrict -> addDot a (addDot a e) _ -> e addDot a e = C.Dot (getRange a) e mkArg (Arg info e) = case getHiding info of Hidden -> HiddenArg (getRange e) (unnamed e) Instance{} -> InstanceArg (getRange e) (unnamed e) NotHidden -> e toConcrete (A.Set i 0) = return $ C.Set (getRange i) toConcrete (A.Set i n) = return $ C.SetN (getRange i) n toConcrete (A.Prop i 0) = return $ C.Prop (getRange i) toConcrete (A.Prop i n) = return $ C.PropN (getRange i) n toConcrete (A.Let i ds e) = bracket lamBrackets $ bindToConcrete ds $ \ds' -> do e' <- toConcreteTop e return $ C.Let (getRange i) (concat ds') (Just e') toConcrete (A.Rec i fs) = bracket appBrackets $ do C.Rec (getRange i) . map (fmap (\x -> ModuleAssignment x [] defaultImportDir)) <$> toConcreteTop fs toConcrete (A.RecUpdate i e fs) = bracket appBrackets $ do C.RecUpdate (getRange i) <$> toConcrete e <*> toConcreteTop fs toConcrete (A.ETel tel) = C.ETel <$> toConcrete tel toConcrete (A.ScopedExpr _ e) = toConcrete e toConcrete (A.QuoteGoal i x e) = bracket lamBrackets $ bindToConcrete x $ \ x' -> do e' <- toConcrete e return $ C.QuoteGoal (getRange i) x' e' toConcrete (A.QuoteContext i) = return $ C.QuoteContext (getRange i) toConcrete (A.Quote i) = return $ C.Quote (getRange i) toConcrete (A.QuoteTerm i) = return $ C.QuoteTerm (getRange i) toConcrete (A.Unquote i) = return $ C.Unquote (getRange i) toConcrete (A.Tactic i e xs ys) = do e' <- toConcrete e xs' <- toConcrete xs ys' <- toConcrete ys let r = getRange i rawtac = foldl (C.App r) e' xs' return $ C.Tactic (getRange i) rawtac (map namedArg ys') -- Andreas, 2012-04-02: TODO! print DontCare as irrAxiom -- Andreas, 2010-10-05 print irrelevant things as ordinary things toConcrete (A.DontCare e) = C.Dot r . C.Paren r <$> toConcrete e where r = getRange e toConcrete (A.PatternSyn n) = C.Ident <$> toConcrete (headAmbQ n) makeDomainFree :: A.LamBinding -> A.LamBinding makeDomainFree b@(A.DomainFull (A.TBind _ [x] t)) = case unScope t of A.Underscore A.MetaInfo{metaNumber = Nothing} -> A.DomainFree x _ -> b makeDomainFree b = b -- Christian Sattler, 2017-08-05, fixing #2669 -- Both methods of ToConcrete (FieldAssignment' a) (FieldAssignment' c) need -- to be implemented, each in terms of the corresponding one of ToConcrete a c. -- This mirrors the instance ToConcrete (Arg a) (Arg c). -- The default implementations of ToConcrete are not valid semantically. instance ToConcrete a c => ToConcrete (FieldAssignment' a) (FieldAssignment' c) where toConcrete = traverse toConcrete bindToConcrete (FieldAssignment name a) ret = bindToConcrete a $ ret . FieldAssignment name -- Binder instances ------------------------------------------------------- -- If there is no label we set it to the bound name, to make renaming the bound -- name safe. forceNameIfHidden :: NamedArg A.BindName -> NamedArg A.BindName forceNameIfHidden x | isJust $ nameOf $ unArg x = x | visible x = x | otherwise = x <&> \ y -> y { nameOf = Just name } where name = Ranged (getRange x) $ C.nameToRawName $ nameConcrete $ unBind $ namedArg x instance ToConcrete A.LamBinding C.LamBinding where bindToConcrete (A.DomainFree x) ret = bindToConcrete (forceNameIfHidden x) $ ret . C.DomainFree bindToConcrete (A.DomainFull b) ret = bindToConcrete b $ ret . C.DomainFull instance ToConcrete A.TypedBinding C.TypedBinding where bindToConcrete (A.TBind r xs e) ret = bindToConcrete (map forceNameIfHidden xs) $ \ xs -> do e <- toConcreteTop e ret $ C.TBind r xs e bindToConcrete (A.TLet r lbs) ret = bindToConcrete lbs $ \ ds -> do ret $ C.TLet r $ concat ds instance ToConcrete LetBinding [C.Declaration] where bindToConcrete (LetBind i info x t e) ret = bindToConcrete x $ \ x -> do (t, (e, [], [], [])) <- toConcrete (t, A.RHS e Nothing) ret $ addInstanceB (isInstance info) $ [ C.TypeSig info (C.boundName x) t , C.FunClause (C.LHS (C.IdentP $ C.QName $ C.boundName x) [] []) e C.NoWhere False ] -- TODO: bind variables bindToConcrete (LetPatBind i p e) ret = do p <- toConcrete p e <- toConcrete e ret [ C.FunClause (C.LHS p [] []) (C.RHS e) NoWhere False ] bindToConcrete (LetApply i x modapp _ _) ret = do x' <- unqualify <$> toConcrete x modapp <- toConcrete modapp let r = getRange modapp open = fromMaybe DontOpen $ minfoOpenShort i dir = fromMaybe defaultImportDir{ importDirRange = r } $ minfoDirective i -- This is no use since toAbstract LetDefs is in localToAbstract. local (openModule' x dir id) $ ret [ C.ModuleMacro (getRange i) x' modapp open dir ] bindToConcrete (LetOpen i x _) ret = do x' <- toConcrete x let dir = fromMaybe defaultImportDir $ minfoDirective i local (openModule' x dir restrictPrivate) $ ret [ C.Open (getRange i) x' dir ] bindToConcrete (LetDeclaredVariable _) ret = -- Note that the range of the declaration site is dropped. ret [] instance ToConcrete A.WhereDeclarations WhereClause where bindToConcrete (A.WhereDecls _ []) ret = ret C.NoWhere bindToConcrete (A.WhereDecls (Just am) [A.Section _ _ _ ds]) ret = do ds' <- declsToConcrete ds cm <- unqualify <$> lookupModule am -- Andreas, 2016-07-08 I put PublicAccess in the following SomeWhere -- Should not really matter for printing... let wh' = (if isNoName cm then AnyWhere else SomeWhere cm PublicAccess) $ ds' local (openModule' am defaultImportDir id) $ ret wh' bindToConcrete (A.WhereDecls _ ds) ret = ret . AnyWhere =<< declsToConcrete ds mergeSigAndDef :: [C.Declaration] -> [C.Declaration] mergeSigAndDef (C.RecordSig _ x bs e : C.RecordDef r y ind eta c _ fs : ds) | x == y = C.Record r y ind eta c bs e fs : mergeSigAndDef ds mergeSigAndDef (C.DataSig _ _ x bs e : C.DataDef r i y _ cs : ds) | x == y = C.Data r i y bs e cs : mergeSigAndDef ds mergeSigAndDef (d : ds) = d : mergeSigAndDef ds mergeSigAndDef [] = [] openModule' :: A.ModuleName -> C.ImportDirective -> (Scope -> Scope) -> Env -> Env openModule' x dir restrict env = env{currentScope = sInfo{scopeModules = mods'}} where sInfo = currentScope env amod = scopeCurrent sInfo mods = scopeModules sInfo news = setScopeAccess PrivateNS $ applyImportDirective dir $ maybe emptyScope restrict $ Map.lookup x mods mods' = Map.update (Just . (`mergeScope` news)) amod mods -- Declaration instances -------------------------------------------------- declsToConcrete :: [A.Declaration] -> AbsToCon [C.Declaration] declsToConcrete ds = mergeSigAndDef . concat <$> toConcrete ds instance ToConcrete A.RHS (C.RHS, [C.Expr], [C.Expr], [C.Declaration]) where toConcrete (A.RHS e (Just c)) = return (C.RHS c, [], [], []) toConcrete (A.RHS e Nothing) = do e <- toConcrete e return (C.RHS e, [], [], []) toConcrete A.AbsurdRHS = return (C.AbsurdRHS, [], [], []) toConcrete (A.WithRHS _ es cs) = do es <- toConcrete es cs <- noTakenNames $ concat <$> toConcrete cs return (C.AbsurdRHS, [], es, cs) toConcrete (A.RewriteRHS xeqs _spats rhs wh) = do wh <- declsToConcrete (A.whereDecls wh) (rhs, eqs', es, whs) <- toConcrete rhs unless (null eqs') __IMPOSSIBLE__ eqs <- toConcrete $ map snd xeqs return (rhs, eqs, es, wh ++ whs) instance ToConcrete (Maybe A.QName) (Maybe C.Name) where toConcrete Nothing = return Nothing toConcrete (Just x) = do x' <- toConcrete (qnameName x) return $ Just x' instance ToConcrete (Constr A.Constructor) C.Declaration where toConcrete (Constr (A.ScopedDecl scope [d])) = withScope scope $ toConcrete (Constr d) toConcrete (Constr (A.Axiom _ i info Nothing x t)) = do x' <- unsafeQNameToName <$> toConcrete x t' <- toConcreteTop t return $ C.TypeSig info x' t' toConcrete (Constr (A.Axiom _ _ _ (Just _) _ _)) = __IMPOSSIBLE__ toConcrete (Constr d) = head <$> toConcrete d instance ToConcrete a C.LHS => ToConcrete (A.Clause' a) [C.Declaration] where toConcrete (A.Clause lhs _ rhs wh catchall) = bindToConcrete lhs $ \case C.LHS p _ _ -> do bindToConcrete wh $ \ wh' -> do (rhs', eqs, with, wcs) <- toConcreteTop rhs return $ FunClause (C.LHS p eqs with) rhs' wh' catchall : wcs instance ToConcrete A.ModuleApplication C.ModuleApplication where toConcrete (A.SectionApp tel y es) = do y <- toConcreteCtx FunctionCtx y bindToConcrete tel $ \ tel -> do es <- toConcreteCtx argumentCtx_ es let r = fuseRange y es return $ C.SectionApp r tel (foldl (C.App r) (C.Ident y) es) toConcrete (A.RecordModuleInstance recm) = do recm <- toConcrete recm return $ C.RecordModuleInstance (getRange recm) recm instance ToConcrete A.Declaration [C.Declaration] where toConcrete (ScopedDecl scope ds) = withScope scope (declsToConcrete ds) toConcrete (A.Axiom _ i info mp x t) = do x' <- unsafeQNameToName <$> toConcrete x withAbstractPrivate i $ withInfixDecl i x' $ do t' <- toConcreteTop t return $ (case mp of Nothing -> [] Just occs -> [C.Pragma (PolarityPragma noRange x' occs)]) ++ [C.Postulate (getRange i) [C.TypeSig info x' t']] toConcrete (A.Generalize s i j x t) = do x' <- unsafeQNameToName <$> toConcrete x withAbstractPrivate i $ withInfixDecl i x' $ do t' <- toConcreteTop t return [C.Generalize (getRange i) [C.TypeSig j x' $ C.Generalized t']] toConcrete (A.Field i x t) = do x' <- unsafeQNameToName <$> toConcrete x withAbstractPrivate i $ withInfixDecl i x' $ do t' <- toConcreteTop t return [C.Field (A.defInstance i) x' t'] toConcrete (A.Primitive i x t) = do x' <- unsafeQNameToName <$> toConcrete x withAbstractPrivate i $ withInfixDecl i x' $ do t' <- toConcreteTop t return [C.Primitive (getRange i) [C.TypeSig defaultArgInfo x' t']] -- Primitives are always relevant. toConcrete (A.FunDef i _ _ cs) = withAbstractPrivate i $ concat <$> toConcrete cs toConcrete (A.DataSig i x bs t) = withAbstractPrivate i $ bindToConcrete (A.generalizeTel bs) $ \ tel' -> do x' <- unsafeQNameToName <$> toConcrete x t' <- toConcreteTop t return [ C.DataSig (getRange i) Inductive x' (map C.DomainFull tel') t' ] toConcrete (A.DataDef i x uc bs cs) = withAbstractPrivate i $ bindToConcrete (map makeDomainFree $ dataDefParams bs) $ \ tel' -> do (x',cs') <- (unsafeQNameToName -*- id) <$> toConcrete (x, map Constr cs) return [ C.DataDef (getRange i) Inductive x' tel' cs' ] toConcrete (A.RecSig i x bs t) = withAbstractPrivate i $ bindToConcrete (A.generalizeTel bs) $ \ tel' -> do x' <- unsafeQNameToName <$> toConcrete x t' <- toConcreteTop t return [ C.RecordSig (getRange i) x' (map C.DomainFull tel') t' ] toConcrete (A.RecDef i x uc ind eta c bs t cs) = withAbstractPrivate i $ bindToConcrete (map makeDomainFree $ dataDefParams bs) $ \ tel' -> do (x',cs') <- (unsafeQNameToName -*- id) <$> toConcrete (x, map Constr cs) return [ C.RecordDef (getRange i) x' ind eta Nothing tel' cs' ] toConcrete (A.Mutual i ds) = declsToConcrete ds toConcrete (A.Section i x (A.GeneralizeTel _ tel) ds) = do x <- toConcrete x bindToConcrete tel $ \ tel -> do ds <- declsToConcrete ds return [ C.Module (getRange i) x tel ds ] toConcrete (A.Apply i x modapp _ _) = do x <- unsafeQNameToName <$> toConcrete x modapp <- toConcrete modapp let r = getRange modapp open = fromMaybe DontOpen $ minfoOpenShort i dir = fromMaybe defaultImportDir{ importDirRange = r } $ minfoDirective i return [ C.ModuleMacro (getRange i) x modapp open dir ] toConcrete (A.Import i x _) = do x <- toConcrete x let open = fromMaybe DontOpen $ minfoOpenShort i dir = fromMaybe defaultImportDir $ minfoDirective i return [ C.Import (getRange i) x Nothing open dir] toConcrete (A.Pragma i p) = do p <- toConcrete $ RangeAndPragma (getRange i) p return [C.Pragma p] toConcrete (A.Open i x _) = do x <- toConcrete x return [C.Open (getRange i) x defaultImportDir] toConcrete (A.PatternSynDef x xs p) = do C.QName x <- toConcrete x bindToConcrete xs $ \xs -> (:[]) . C.PatternSyn (getRange x) x xs <$> dontFoldPatternSynonyms (toConcrete (vacuous p :: A.Pattern)) toConcrete (A.UnquoteDecl _ i xs e) = do let unqual (C.QName x) = return x unqual _ = __IMPOSSIBLE__ xs <- mapM (unqual <=< toConcrete) xs (:[]) . C.UnquoteDecl (getRange i) xs <$> toConcrete e toConcrete (A.UnquoteDef i xs e) = do let unqual (C.QName x) = return x unqual _ = __IMPOSSIBLE__ xs <- mapM (unqual <=< toConcrete) xs (:[]) . C.UnquoteDef (getRange i) xs <$> toConcrete e data RangeAndPragma = RangeAndPragma Range A.Pragma instance ToConcrete RangeAndPragma C.Pragma where toConcrete (RangeAndPragma r p) = case p of A.OptionsPragma xs -> return $ C.OptionsPragma r xs A.BuiltinPragma b x -> C.BuiltinPragma r b <$> toConcrete x A.BuiltinNoDefPragma b x -> C.BuiltinPragma r b <$> toConcrete x A.RewritePragma x -> C.RewritePragma r . singleton <$> toConcrete x A.CompilePragma b x s -> do x <- toConcrete x return $ C.CompilePragma r b x s A.StaticPragma x -> C.StaticPragma r <$> toConcrete x A.InjectivePragma x -> C.InjectivePragma r <$> toConcrete x A.InlinePragma b x -> C.InlinePragma r b <$> toConcrete x A.EtaPragma x -> C.EtaPragma r <$> toConcrete x A.DisplayPragma f ps rhs -> C.DisplayPragma r <$> toConcrete (A.DefP (PatRange noRange) (unambiguous f) ps) <*> toConcrete rhs -- Left hand sides -------------------------------------------------------- instance ToConcrete A.SpineLHS C.LHS where bindToConcrete lhs = bindToConcrete (A.spineToLhs lhs :: A.LHS) instance ToConcrete A.LHS C.LHS where bindToConcrete (A.LHS i lhscore) ret = do bindToConcreteCtx TopCtx lhscore $ \ lhs -> ret $ C.LHS lhs [] [] instance ToConcrete A.LHSCore C.Pattern where bindToConcrete = bindToConcrete . lhsCoreToPattern appBracketsArgs :: [arg] -> PrecedenceStack -> Bool appBracketsArgs [] _ = False appBracketsArgs (_:_) ctx = appBrackets ctx -- Auxiliary wrappers for processing the bindings in patterns in the right order. newtype UserPattern a = UserPattern a newtype SplitPattern a = SplitPattern a newtype BindingPattern = BindingPat A.Pattern newtype FreshenName = FreshenName BindName instance ToConcrete FreshenName A.Name where bindToConcrete (FreshenName (BindName x)) ret = bindToConcrete x $ \ y -> ret x { nameConcrete = y } -- Pass 1: (Issue #2729) -- Takes care of binding the originally user-written pattern variables, but doesn't actually -- translate anything to Concrete. instance ToConcrete (UserPattern A.Pattern) A.Pattern where bindToConcrete (UserPattern p) ret = do reportSLn "toConcrete.pat" 100 $ "binding pattern (pass 1)" ++ show p case p of A.VarP bx -> do let x = unBind bx case isInScope x of InScope -> bindName' x $ ret $ A.VarP bx C.NotInScope -> bindName x $ \y -> ret $ A.VarP $ BindName $ x { nameConcrete = y } A.WildP{} -> ret p A.ProjP{} -> ret p A.AbsurdP{} -> ret p A.LitP{} -> ret p A.DotP{} -> ret p A.EqualP{} -> ret p -- Andreas, 2017-09-03, issue #2729: -- Do not go into patterns generated by case-split here! -- They are treated in a second pass. A.ConP i c args | patOrigin i == ConOSplit -> ret p | otherwise -> bindToConcrete (map UserPattern args) $ ret . A.ConP i c A.DefP i f args -> bindToConcrete (map UserPattern args) $ ret . A.DefP i f A.PatternSynP i f args -> bindToConcrete (map UserPattern args) $ ret . A.PatternSynP i f A.RecP i args -> bindToConcrete ((map . fmap) UserPattern args) $ ret . A.RecP i A.AsP i x p -> bindName' (unBind x) $ bindToConcrete (UserPattern p) $ \ p -> ret (A.AsP i x p) A.WithP i p -> bindToConcrete (UserPattern p) $ ret . A.WithP i instance ToConcrete (UserPattern (NamedArg A.Pattern)) (NamedArg A.Pattern) where bindToConcrete (UserPattern np) ret = case getOrigin np of CaseSplit -> ret np _ -> bindToConcrete (fmap (fmap UserPattern) np) ret -- Pass 2a: locate case-split pattern. Don't bind anything! instance ToConcrete (SplitPattern A.Pattern) A.Pattern where bindToConcrete (SplitPattern p) ret = do reportSLn "toConcrete.pat" 100 $ "binding pattern (pass 2a)" ++ show p case p of A.VarP x -> ret p A.WildP{} -> ret p A.ProjP{} -> ret p A.AbsurdP{} -> ret p A.LitP{} -> ret p A.DotP{} -> ret p A.EqualP{} -> ret p -- Andreas, 2017-09-03, issue #2729: -- For patterns generated by case-split here, switch to freshening & binding. A.ConP i c args | patOrigin i == ConOSplit -> bindToConcrete ((map . fmap . fmap) BindingPat args) $ ret . A.ConP i c | otherwise -> bindToConcrete (map SplitPattern args) $ ret . A.ConP i c A.DefP i f args -> bindToConcrete (map SplitPattern args) $ ret . A.DefP i f A.PatternSynP i f args -> bindToConcrete (map SplitPattern args) $ ret . A.PatternSynP i f A.RecP i args -> bindToConcrete ((map . fmap) SplitPattern args) $ ret . A.RecP i A.AsP i x p -> bindToConcrete (SplitPattern p) $ \ p -> ret (A.AsP i x p) A.WithP i p -> bindToConcrete (SplitPattern p) $ ret . A.WithP i instance ToConcrete (SplitPattern (NamedArg A.Pattern)) (NamedArg A.Pattern) where bindToConcrete (SplitPattern np) ret = case getOrigin np of CaseSplit -> bindToConcrete (fmap (fmap BindingPat ) np) ret _ -> bindToConcrete (fmap (fmap SplitPattern) np) ret -- Pass 2b: -- Takes care of freshening and binding pattern variables introduced by case split. -- Still does not translate anything to Concrete. instance ToConcrete BindingPattern A.Pattern where bindToConcrete (BindingPat p) ret = do reportSLn "toConcrete.pat" 100 $ "binding pattern (pass 2b)" ++ show p case p of A.VarP x -> bindToConcrete (FreshenName x) $ ret . A.VarP . BindName A.WildP{} -> ret p A.ProjP{} -> ret p A.AbsurdP{} -> ret p A.LitP{} -> ret p A.DotP{} -> ret p A.EqualP{} -> ret p A.ConP i c args -> bindToConcrete ((map . fmap . fmap) BindingPat args) $ ret . A.ConP i c A.DefP i f args -> bindToConcrete ((map . fmap . fmap) BindingPat args) $ ret . A.DefP i f A.PatternSynP i f args -> bindToConcrete ((map . fmap . fmap) BindingPat args) $ ret . A.PatternSynP i f A.RecP i args -> bindToConcrete ((map . fmap) BindingPat args) $ ret . A.RecP i A.AsP i x p -> bindToConcrete (FreshenName x) $ \ x -> bindToConcrete (BindingPat p) $ \ p -> ret (A.AsP i (BindName x) p) A.WithP i p -> bindToConcrete (BindingPat p) $ ret . A.WithP i instance ToConcrete A.Pattern C.Pattern where bindToConcrete p ret = do prec <- currentPrecedence bindToConcrete (UserPattern p) $ \ p -> do bindToConcrete (SplitPattern p) $ \ p -> do ret =<< do withPrecedence' prec $ toConcrete p toConcrete p = case p of A.VarP x -> C.IdentP . C.QName . C.boundName <$> toConcrete x A.WildP i -> return $ C.WildP (getRange i) A.ConP i c args -> tryOp (headAmbQ c) (A.ConP i c) args A.ProjP i ProjPrefix p -> C.IdentP <$> toConcrete (headAmbQ p) A.ProjP i _ p -> C.DotP noRange . C.Ident <$> toConcrete (headAmbQ p) A.DefP i x args -> tryOp (headAmbQ x) (A.DefP i x) args A.AsP i x p -> do (x, p) <- toConcreteCtx argumentCtx_ (x, p) return $ C.AsP (getRange i) (C.boundName x) p A.AbsurdP i -> return $ C.AbsurdP (getRange i) A.LitP (LitQName r x) -> do x <- lookupQName AmbiguousNothing x bracketP_ appBrackets $ return $ C.AppP (C.QuoteP r) (defaultNamedArg (C.IdentP x)) A.LitP l -> return $ C.LitP l -- Andreas, 2018-06-19, issue #3130 -- Print .p as .(p) if p is a projection -- to avoid confusion with projection pattern. A.DotP i e@A.Proj{} -> C.DotP r . C.Paren r <$> toConcreteCtx TopCtx e where r = getRange i -- gallais, 2019-02-12, issue #3491 -- Print p as .(p) if p is a variable but there is a projection of the -- same name in scope. A.DotP i e@(A.Var v) -> do let r = getRange i -- Erase @v@ to a concrete name and resolve it back to check whether -- we have a conflicting field name. cn <- toConcreteName v liftTCM (resolveName' [FldName] Nothing (C.QName cn)) >>= \case -- If we do then we print .(v) rather than .v FieldName{} -> do reportSLn "print.dotted" 50 $ "Wrapping ambiguous name " ++ show (nameConcrete v) C.DotP r . C.Paren r <$> toConcrete (A.Var v) _ -> printDotDefault i e A.DotP i e -> printDotDefault i e A.EqualP i es -> do C.EqualP (getRange i) <$> toConcrete es A.PatternSynP i n args -> tryOp (headAmbQ n) (A.PatternSynP i n) args A.RecP i as -> C.RecP (getRange i) <$> mapM (traverse toConcrete) as A.WithP i p -> C.WithP (getRange i) <$> toConcreteCtx WithArgCtx p where printDotDefault :: PatInfo -> A.Expr -> AbsToCon C.Pattern printDotDefault i e = do c <- toConcreteCtx DotPatternCtx e let r = getRange i case c of -- Andreas, 2016-02-04 print ._ pattern as _ pattern, -- following the fusing of WildP and ImplicitP. C.Underscore{} -> return $ C.WildP r _ -> return $ C.DotP r c tryOp :: A.QName -> (A.Patterns -> A.Pattern) -> A.Patterns -> AbsToCon C.Pattern tryOp x f args = do -- Andreas, 2016-02-04, Issue #1792 -- To prevent failing of tryToRecoverOpAppP for overapplied operators, -- we take off the exceeding arguments first -- and apply them pointwise with C.AppP later. let (args1, args2) = splitAt (numHoles x) args let funCtx = if null args2 then id else withPrecedence FunctionCtx tryToRecoverPatternSynP (f args) $ funCtx (tryToRecoverOpAppP $ f args1) >>= \case Just c -> applyTo args2 c Nothing -> applyTo args . C.IdentP =<< toConcrete x -- Note: applyTo [] c = return c applyTo args c = bracketP_ (appBracketsArgs args) $ do foldl C.AppP c <$> toConcreteCtx argumentCtx_ args -- Helpers for recovering natural number literals tryToRecoverNatural :: A.Expr -> AbsToCon C.Expr -> AbsToCon C.Expr tryToRecoverNatural e def = do is <- isBuiltinFun caseMaybe (recoverNatural is e) def $ return . C.Lit . LitNat noRange recoverNatural :: (A.QName -> String -> Bool) -> A.Expr -> Maybe Integer recoverNatural is e = explore (`is` builtinZero) (`is` builtinSuc) 0 e where explore :: (A.QName -> Bool) -> (A.QName -> Bool) -> Integer -> A.Expr -> Maybe Integer explore isZero isSuc k (A.App _ (A.Con c) t) | Just f <- getUnambiguous c, isSuc f = (explore isZero isSuc $! k + 1) (namedArg t) explore isZero isSuc k (A.Con c) | Just x <- getUnambiguous c, isZero x = Just k explore isZero isSuc k (A.Lit (LitNat _ l)) = Just (k + l) explore _ _ _ _ = Nothing -- Helpers for recovering C.OpApp ------------------------------------------ data Hd = HdVar A.Name | HdCon A.QName | HdDef A.QName | HdSyn A.QName data MaybeSection a = YesSection | NoSection a deriving (Eq, Show, Functor, Foldable, Traversable) fromNoSection :: a -> MaybeSection a -> a fromNoSection fallback = \case YesSection -> fallback NoSection x -> x instance HasRange a => HasRange (MaybeSection a) where getRange = \case YesSection -> noRange NoSection a -> getRange a getHead :: A.Expr -> Maybe Hd getHead (Var x) = Just (HdVar x) getHead (Def f) = Just (HdDef f) getHead (Proj o f) = Just (HdDef $ headAmbQ f) getHead (Con c) = Just (HdCon $ headAmbQ c) getHead (A.PatternSyn n) = Just (HdSyn $ headAmbQ n) getHead _ = Nothing cOpApp :: Range -> C.QName -> A.Name -> [MaybeSection C.Expr] -> C.Expr cOpApp r x n es = C.OpApp r x (Set.singleton n) (map (defaultNamedArg . placeholder) eps) where x0 = C.unqualify x positions | isPrefix x0 = [ Middle | _ <- drop 1 es ] ++ [End] | isPostfix x0 = [Beginning] ++ [ Middle | _ <- drop 1 es ] | isInfix x0 = [Beginning] ++ [ Middle | _ <- drop 2 es ] ++ [End] | otherwise = [ Middle | _ <- es ] eps = zip es positions placeholder (YesSection , pos ) = Placeholder pos placeholder (NoSection e, _pos) = noPlaceholder (Ordinary e) tryToRecoverOpApp :: A.Expr -> AbsToCon C.Expr -> AbsToCon C.Expr tryToRecoverOpApp e def = fromMaybeM def $ recoverOpApp bracket (isLambda . defaultNamedArg) cOpApp view e where view :: A.Expr -> Maybe (Hd, [NamedArg (MaybeSection (AppInfo, A.Expr))]) view e -- Do we have a series of inserted lambdas? | Just xs@(_:_) <- traverse insertedName bs = (,) <$> getHead hd <*> sectionArgs (map unBind xs) args where LamView bs body = A.lamView e Application hd args = A.appView' body -- Only inserted domain-free visible lambdas come from sections. insertedName (A.DomainFree x) | getOrigin x == Inserted && visible x = Just $ namedArg x insertedName _ = Nothing -- Build section arguments. Need to check that: -- lambda bound variables appear in the right order and only as -- top-level arguments. sectionArgs :: [A.Name] -> [NamedArg (AppInfo, A.Expr)] -> Maybe [NamedArg (MaybeSection (AppInfo, A.Expr))] sectionArgs xs = go xs where noXs = getAll . foldExpr (\ case A.Var x -> All (notElem x xs) _ -> All True) . snd . namedArg go [] [] = return [] go (y : ys) (arg : args) | visible arg , A.Var y' <- snd $ namedArg arg , y == y' = (fmap (YesSection <$) arg :) <$> go ys args go ys (arg : args) | visible arg, noXs arg = ((fmap . fmap) NoSection arg :) <$> go ys args go _ _ = Nothing view e = (, (map . fmap . fmap) NoSection args) <$> getHead hd where Application hd args = A.appView' e tryToRecoverOpAppP :: A.Pattern -> AbsToCon (Maybe C.Pattern) tryToRecoverOpAppP p = do res <- recoverOpApp bracketP_ (const False) opApp view p lift $ reportSLn "print.op" 90 $ unlines [ "tryToRecoverOpApp" , "in: " ++ show p , "out: " ++ show res ] return res where opApp r x n ps = C.OpAppP r x (Set.singleton n) $ map (defaultNamedArg . fromNoSection __IMPOSSIBLE__) ps -- `view` does not generate any `Nothing`s appInfo = defaultAppInfo_ view :: A.Pattern -> Maybe (Hd, [NamedArg (MaybeSection (AppInfo, A.Pattern))]) view p = case p of ConP _ cs ps -> Just (HdCon (headAmbQ cs), (map . fmap . fmap) (NoSection . (appInfo,)) ps) DefP _ fs ps -> Just (HdDef (headAmbQ fs), (map . fmap . fmap) (NoSection . (appInfo,)) ps) PatternSynP _ ns ps -> Just (HdSyn (headAmbQ ns), (map . fmap . fmap) (NoSection . (appInfo,)) ps) _ -> Nothing -- ProjP _ _ d -> Just (HdDef (headAmbQ d), []) -- ? Andreas, 2016-04-21 recoverOpApp :: forall a c . (ToConcrete a c, HasRange c) => ((PrecedenceStack -> Bool) -> AbsToCon c -> AbsToCon c) -> (a -> Bool) -- ^ Check for lambdas -> (Range -> C.QName -> A.Name -> [MaybeSection c] -> c) -> (a -> Maybe (Hd, [NamedArg (MaybeSection (AppInfo, a))])) -> a -> AbsToCon (Maybe c) recoverOpApp bracket isLam opApp view e = case view e of Nothing -> mDefault Just (hd, args) | all visible args -> do let args' = map namedArg args case hd of HdVar n | isNoName n -> mDefault | otherwise -> doQNameHelper (Left n) args' HdDef qn | isExtendedLambdaName qn -> mDefault | otherwise -> doQNameHelper (Right qn) args' -- HdDef qn -> doQNameHelper (Right qn) args' HdCon qn -> doQNameHelper (Right qn) args' HdSyn qn -> doQNameHelper (Right qn) args' | otherwise -> mDefault where mDefault = return Nothing skipParens :: MaybeSection (AppInfo, a) -> Bool skipParens = \case YesSection -> False NoSection (i, e) -> isLam e && preferParenless (appParens i) doQNameHelper :: Either A.Name A.QName -> [MaybeSection (AppInfo, a)] -> AbsToCon (Maybe c) doQNameHelper n args = do x <- either (C.QName <.> toConcrete) toConcrete n let n' = either id A.qnameName n doQName (theFixity $ nameFixity n') x n' args (C.nameParts $ C.unqualify x) doQName :: Fixity -> C.QName -> A.Name -> [MaybeSection (AppInfo, a)] -> [NamePart] -> AbsToCon (Maybe c) -- fall-back (wrong number of arguments or no holes) doQName _ x _ es xs | null es = mDefault | length es /= numHoles x = mDefault -- binary case doQName fixity x n as xs | Hole <- head xs , Hole <- last xs = do let a1 = head as an = last as as' = case as of as@(_ : _ : _) -> init $ tail as _ -> __IMPOSSIBLE__ Just <$> do bracket (opBrackets' (skipParens an) fixity) $ do e1 <- traverse (toConcreteCtx (LeftOperandCtx fixity) . snd) a1 es <- (mapM . traverse) (toConcreteCtx InsideOperandCtx . snd) as' en <- traverse (uncurry $ toConcreteCtx . RightOperandCtx fixity . appParens) an return $ opApp (getRange (e1, en)) x n ([e1] ++ es ++ [en]) -- prefix doQName fixity x n as xs | Hole <- last xs = do let an = last as as' = case as of as@(_ : _) -> init as _ -> __IMPOSSIBLE__ Just <$> do bracket (opBrackets' (skipParens an) fixity) $ do es <- (mapM . traverse) (toConcreteCtx InsideOperandCtx . snd) as' en <- traverse (\ (i, e) -> toConcreteCtx (RightOperandCtx fixity $ appParens i) e) an return $ opApp (getRange (n, en)) x n (es ++ [en]) -- postfix doQName fixity x n as xs | Hole <- head xs = do let a1 = head as as' = tail as e1 <- traverse (toConcreteCtx (LeftOperandCtx fixity) . snd) a1 es <- (mapM . traverse) (toConcreteCtx InsideOperandCtx . snd) as' Just <$> do bracket (opBrackets fixity) $ return $ opApp (getRange (e1, n)) x n ([e1] ++ es) -- roundfix doQName _ x n as xs = do es <- (mapM . traverse) (toConcreteCtx InsideOperandCtx . snd) as Just <$> do bracket roundFixBrackets $ return $ opApp (getRange x) x n es -- Recovering pattern synonyms -------------------------------------------- -- | Recover pattern synonyms for expressions. tryToRecoverPatternSyn :: A.Expr -> AbsToCon C.Expr -> AbsToCon C.Expr tryToRecoverPatternSyn e fallback | userWritten e = fallback | litOrCon e = recoverPatternSyn apply matchPatternSyn e fallback | otherwise = fallback where userWritten (A.App info _ _) = getOrigin info == UserWritten userWritten _ = False -- this means we always use pattern synonyms for nullary constructors -- Only literals or constructors can head pattern synonym definitions litOrCon e = case A.appView e of Application Con{} _ -> True Application A.Lit{} _ -> True _ -> False apply c args = A.unAppView $ Application (A.PatternSyn $ unambiguous c) args -- | Recover pattern synonyms in patterns. tryToRecoverPatternSynP :: A.Pattern -> AbsToCon C.Pattern -> AbsToCon C.Pattern tryToRecoverPatternSynP = recoverPatternSyn apply matchPatternSynP where apply c args = PatternSynP patNoRange (unambiguous c) args -- | General pattern synonym recovery parameterised over expression type recoverPatternSyn :: ToConcrete a c => (A.QName -> [NamedArg a] -> a) -> -- applySyn (PatternSynDefn -> a -> Maybe [Arg a]) -> -- match a -> AbsToCon c -> AbsToCon c recoverPatternSyn applySyn match e fallback = do doFold <- asks foldPatternSynonyms if not doFold then fallback else do psyns <- lift getAllPatternSyns scope <- lift getScope let isConP ConP{} = True -- #2828: only fold pattern synonyms with isConP _ = False -- constructor rhs cands = [ (q, args, score rhs) | (q, psyndef@(_, rhs)) <- reverse $ Map.toList psyns, isConP rhs, Just args <- [match psyndef e], isNameInScope q scope ] cmp (_, _, x) (_, _, y) = flip compare x y case sortBy cmp cands of (q, args, _) : _ -> toConcrete $ applySyn q $ (map . fmap) unnamed args [] -> fallback where -- Heuristic to pick the best pattern synonym: the one that folds the most -- constructors. score :: Pattern' Void -> Int score = getSum . foldAPattern con where con ConP{} = 1 con _ = 0 -- Some instances that are related to interaction with users ----------- instance ToConcrete InteractionId C.Expr where toConcrete (InteractionId i) = return $ C.QuestionMark noRange (Just i) instance ToConcrete NamedMeta C.Expr where toConcrete i = do return $ C.Underscore noRange (Just $ prettyShow i) Agda-2.6.0.1/src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs0000644000000000000000000032254213466402171023152 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} {-| Translation from "Agda.Syntax.Concrete" to "Agda.Syntax.Abstract". Involves scope analysis, figuring out infix operator precedences and tidying up definitions. -} module Agda.Syntax.Translation.ConcreteToAbstract ( ToAbstract(..), localToAbstract , concreteToAbstract_ , concreteToAbstract , NewModuleQName(..) , OldName(..) , TopLevel(..) , TopLevelInfo(..) , topLevelModuleName , AbstractRHS , NewModuleName, OldModuleName , NewName, OldQName , LeftHandSide, RightHandSide , PatName, APatName ) where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), mapM, null ) #else import Prelude hiding ( mapM, null ) #endif import Control.Applicative import Control.Arrow (second) import Control.Monad.Reader hiding (mapM) import Data.Foldable (Foldable, traverse_) import Data.Traversable (mapM, traverse) import Data.List ((\\), nub, foldl') import Data.Set (Set) import Data.Map (Map) import qualified Data.List as List import qualified Data.Set as Set import qualified Data.Map as Map import Data.Maybe import Data.Void import Agda.Syntax.Concrete as C hiding (topLevelModuleName) import Agda.Syntax.Concrete.Generic import Agda.Syntax.Concrete.Operators import Agda.Syntax.Concrete.Pattern import Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern ( patternVars, checkPatternLinearity ) import Agda.Syntax.Abstract.Pretty import qualified Agda.Syntax.Internal as I import Agda.Syntax.Position import Agda.Syntax.Literal import Agda.Syntax.Common import Agda.Syntax.Info import Agda.Syntax.Concrete.Definitions as C import Agda.Syntax.Fixity import Agda.Syntax.Concrete.Fixity (DoWarn(..)) import Agda.Syntax.Notation import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.Syntax.Translation.AbstractToConcrete (ToConcrete) import Agda.Syntax.DoNotation import Agda.Syntax.IdiomBrackets import Agda.TypeChecking.Monad.Base hiding (ModuleInfo, MetaInfo) import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Monad.Trace (traceCall, setCurrentRange) import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.MetaVars (registerInteractionPoint) import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.Env (insideDotPattern, isInsideDotPattern, getCurrentPath) import Agda.TypeChecking.Rules.Builtin (isUntypedBuiltin, bindUntypedBuiltin, builtinKindOfName) import Agda.TypeChecking.Patterns.Abstract (expandPatternSynonyms) import Agda.TypeChecking.Pretty hiding (pretty, prettyA) import Agda.TypeChecking.Warnings import Agda.Interaction.FindFile (checkModuleName) -- import Agda.Interaction.Imports -- for type-checking in ghci import {-# SOURCE #-} Agda.Interaction.Imports (scopeCheckImport) import Agda.Interaction.Options import qualified Agda.Interaction.Options.Lenses as Lens import Agda.Interaction.Options.Warnings import Agda.Utils.AssocList (AssocList) import qualified Agda.Utils.AssocList as AssocList import Agda.Utils.Either import Agda.Utils.Except ( MonadError(catchError, throwError) ) import Agda.Utils.FileName import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.NonemptyList import Agda.Utils.Null import qualified Agda.Utils.Pretty as P import Agda.Utils.Pretty (render, Pretty, pretty, prettyShow) import Agda.Utils.Tuple import Agda.Interaction.FindFile ( rootNameModule ) #include "undefined.h" import Agda.Utils.Impossible import Agda.ImpossibleTest (impossibleTest) {-------------------------------------------------------------------------- Exceptions --------------------------------------------------------------------------} -- notAModuleExpr e = typeError $ NotAModuleExpr e notAnExpression :: C.Expr -> ScopeM A.Expr notAnExpression e = typeError $ NotAnExpression e nothingAppliedToHiddenArg :: C.Expr -> ScopeM A.Expr nothingAppliedToHiddenArg e = typeError $ NothingAppliedToHiddenArg e nothingAppliedToInstanceArg :: C.Expr -> ScopeM A.Expr nothingAppliedToInstanceArg e = typeError $ NothingAppliedToInstanceArg e notAValidLetBinding :: NiceDeclaration -> ScopeM a notAValidLetBinding d = typeError $ NotAValidLetBinding d {-------------------------------------------------------------------------- Helpers --------------------------------------------------------------------------} annotateDecl :: ScopeM A.Declaration -> ScopeM A.Declaration annotateDecl m = annotateDecls $ (:[]) <$> m annotateDecls :: ScopeM [A.Declaration] -> ScopeM A.Declaration annotateDecls m = do ds <- m s <- getScope return $ ScopedDecl s ds annotateExpr :: ScopeM A.Expr -> ScopeM A.Expr annotateExpr m = do e <- m s <- getScope return $ ScopedExpr s e -- | Make sure that there are no dot patterns (called on pattern synonyms). noDotorEqPattern :: String -> A.Pattern' e -> ScopeM (A.Pattern' Void) noDotorEqPattern err = dot where dot :: A.Pattern' e -> ScopeM (A.Pattern' Void) dot p = case p of A.VarP x -> pure $ A.VarP x A.ConP i c args -> A.ConP i c <$> (traverse $ traverse $ traverse dot) args A.ProjP i o d -> pure $ A.ProjP i o d A.WildP i -> pure $ A.WildP i A.AsP i x p -> A.AsP i x <$> dot p A.DotP{} -> genericError err A.EqualP{} -> genericError err -- Andrea: so we also disallow = patterns, reasonable? A.AbsurdP i -> pure $ A.AbsurdP i A.LitP l -> pure $ A.LitP l A.DefP i f args -> A.DefP i f <$> (traverse $ traverse $ traverse dot) args A.PatternSynP i c args -> A.PatternSynP i c <$> (traverse $ traverse $ traverse dot) args A.RecP i fs -> A.RecP i <$> (traverse $ traverse dot) fs A.WithP i p -> A.WithP i <$> dot p -- | Make sure that there are no dot patterns (WAS: called on pattern synonyms). noDotPattern :: String -> A.Pattern' e -> ScopeM (A.Pattern' Void) noDotPattern err = traverse $ const $ genericError err newtype RecordConstructorType = RecordConstructorType [C.Declaration] instance ToAbstract RecordConstructorType A.Expr where toAbstract (RecordConstructorType ds) = recordConstructorType ds -- | Compute the type of the record constructor (with bogus target type) recordConstructorType :: [C.Declaration] -> ScopeM A.Expr recordConstructorType decls = -- Nicify all declarations since there might be fixity declarations after -- the the last field. Use NoWarn to silence fixity warnings. We'll get -- them again when scope checking the declarations to build the record -- module. niceDecls NoWarn decls $ buildType . takeFields where takeFields = List.dropWhileEnd notField notField NiceField{} = False notField _ = True buildType :: [C.NiceDeclaration] -> ScopeM A.Expr buildType ds = do tel <- mapM makeBinding ds -- TODO: Telescope instead of Expr in abstract RecDef return $ A.Pi (ExprRange (getRange ds)) tel (A.Set exprNoRange 0) makeBinding :: C.NiceDeclaration -> ScopeM A.TypedBinding makeBinding d = do let failure = typeError $ NotValidBeforeField d r = getRange d info = ExprRange r mkLet d = A.TLet r <$> toAbstract (LetDef d) traceCall (SetRange r) $ case d of C.NiceField r pr ab inst x a -> do fx <- getConcreteFixity x let bv = unnamed (C.mkBoundName x fx) <$ a tel <- toAbstract $ C.TBind r [bv] (unArg a) return tel -- Public open is allowed and will take effect when scope checking as -- proper declarations. C.NiceOpen r m dir -> do mkLet $ C.NiceOpen r m dir{ publicOpen = False } C.NiceModuleMacro r p x modapp open dir -> do mkLet $ C.NiceModuleMacro r p x modapp open dir{ publicOpen = False } -- Do some rudimentary matching here to get NotValidBeforeField instead -- of NotAValidLetDecl. C.NiceMutual _ _ _ [ C.FunSig _ _ _ _instanc macro _info _ _ _ , C.FunDef _ _ abstract _ _ _ [ C.Clause _top _catchall (C.LHS _p [] []) (C.RHS _rhs) NoWhere [] ] ] | abstract /= AbstractDef && macro /= MacroDef -> do mkLet d C.NiceMutual{} -> failure -- TODO: some of these cases might be __IMPOSSIBLE__ C.Axiom{} -> failure C.PrimitiveFunction{} -> failure C.NiceModule{} -> failure C.NiceImport{} -> failure C.NicePragma{} -> failure C.NiceRecSig{} -> failure C.NiceDataSig{} -> failure C.NiceFunClause{} -> failure C.FunSig{} -> failure -- Note: these are bundled with FunDef in NiceMutual C.FunDef{} -> failure C.NiceDataDef{} -> failure C.NiceRecDef{} -> failure C.NicePatternSyn{} -> failure C.NiceGeneralize{} -> failure C.NiceUnquoteDecl{} -> failure C.NiceUnquoteDef{} -> failure checkModuleApplication :: C.ModuleApplication -> ModuleName -> C.Name -> C.ImportDirective -> ScopeM (A.ModuleApplication, ScopeCopyInfo, A.ImportDirective) checkModuleApplication (C.SectionApp _ tel e) m0 x dir' = do reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checking ModuleApplication " ++ prettyShow x ] -- For the following, set the current module to be m0. withCurrentModule m0 $ do -- Check that expression @e@ is of the form @m args@. (m, args) <- parseModuleApplication e -- Scope check the telescope (introduces bindings!). tel' <- toAbstract tel -- Scope check the old module name and the module args. m1 <- toAbstract $ OldModuleName m args' <- toAbstractCtx (ArgumentCtx PreferParen) args -- Drop constructors (OnlyQualified) if there are arguments. The record constructor -- isn't properly in the record module, so copying it will lead to badness. let noRecConstr | null args = id | otherwise = removeOnlyQualified -- Copy the scope associated with m and take the parts actually imported. (adir, s) <- applyImportDirectiveM (C.QName x) dir' =<< getNamedScope m1 (s', copyInfo) <- copyScope m m0 (noRecConstr s) -- Set the current scope to @s'@ modifyCurrentScope $ const s' printScope "mod.inst" 20 "copied source module" reportSDoc "scope.mod.inst" 30 $ return $ pretty copyInfo let amodapp = A.SectionApp tel' m1 args' reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checked ModuleApplication " ++ prettyShow x ] reportSDoc "scope.decl" 70 $ vcat $ [ nest 2 $ prettyA amodapp ] return (amodapp, copyInfo, adir) checkModuleApplication (C.RecordModuleInstance _ recN) m0 x dir' = withCurrentModule m0 $ do m1 <- toAbstract $ OldModuleName recN s <- getNamedScope m1 (adir, s) <- applyImportDirectiveM recN dir' s (s', copyInfo) <- copyScope recN m0 (removeOnlyQualified s) modifyCurrentScope $ const s' printScope "mod.inst" 20 "copied record module" return (A.RecordModuleInstance m1, copyInfo, adir) -- | @checkModuleMacro mkApply range access concreteName modapp open dir@ -- -- Preserves local variables. checkModuleMacro :: (Pretty c, ToConcrete a c) => (ModuleInfo -> ModuleName -> A.ModuleApplication -> ScopeCopyInfo -> A.ImportDirective -> a) -> OpenKind -> Range -> Access -> C.Name -> C.ModuleApplication -> OpenShortHand -> C.ImportDirective -> ScopeM [a] checkModuleMacro apply kind r p x modapp open dir = do reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checking ModuleMacro " ++ prettyShow x ] notPublicWithoutOpen open dir m0 <- toAbstract (NewModuleName x) reportSDoc "scope.decl" 90 $ "NewModuleName: m0 =" <+> prettyA m0 printScope "mod.inst" 20 "module macro" -- If we're opening a /named/ module, the import directive is -- applied to the "open", otherwise to the module itself. However, -- "public" is always applied to the "open". let (moduleDir, openDir) = case (open, isNoName x) of (DoOpen, False) -> (defaultImportDir, dir) (DoOpen, True) -> ( dir { publicOpen = False } , defaultImportDir { publicOpen = publicOpen dir } ) (DontOpen, _) -> (dir, defaultImportDir) -- Restore the locals after module application has been checked. (modapp', copyInfo, adir') <- withLocalVars $ checkModuleApplication modapp m0 x moduleDir printScope "mod.inst.app" 20 "checkModuleMacro, after checkModuleApplication" reportSDoc "scope.decl" 90 $ "after mod app: trying to print m0 ..." reportSDoc "scope.decl" 90 $ "after mod app: m0 =" <+> prettyA m0 bindModule p x m0 reportSDoc "scope.decl" 90 $ "after bindMod: m0 =" <+> prettyA m0 printScope "mod.inst.copy.after" 20 "after copying" -- Open the module if DoOpen. -- Andreas, 2014-09-02 openModule_ might shadow some locals! adir <- case open of DontOpen -> return adir' DoOpen -> openModule_ kind (C.QName x) openDir printScope "mod.inst" 20 $ show open reportSDoc "scope.decl" 90 $ "after open : m0 =" <+> prettyA m0 stripNoNames printScope "mod.inst" 10 $ "after stripping" reportSDoc "scope.decl" 90 $ "after stripNo: m0 =" <+> prettyA m0 let m = m0 `withRangesOf` [x] adecls = [ apply info m modapp' copyInfo adir ] reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checked ModuleMacro " ++ prettyShow x ] reportSLn "scope.decl" 90 $ "info = " ++ show info reportSLn "scope.decl" 90 $ "m = " ++ prettyShow m reportSLn "scope.decl" 90 $ "modapp' = " ++ show modapp' reportSDoc "scope.decl" 90 $ return $ pretty copyInfo reportSDoc "scope.decl" 70 $ vcat $ map (nest 2 . prettyA) adecls return adecls where info = ModuleInfo { minfoRange = r , minfoAsName = Nothing , minfoAsTo = renamingRange dir , minfoOpenShort = Just open , minfoDirective = Just dir } -- | The @public@ keyword must only be used together with @open@. notPublicWithoutOpen :: OpenShortHand -> C.ImportDirective -> ScopeM () notPublicWithoutOpen DoOpen dir = return () notPublicWithoutOpen DontOpen dir = when (publicOpen dir) $ genericError "The public keyword must only be used together with the open keyword" -- | Computes the range of all the \"to\" keywords used in a renaming -- directive. renamingRange :: C.ImportDirective -> Range renamingRange = getRange . map renToRange . impRenaming -- | Scope check a 'NiceOpen'. checkOpen :: Range -> C.QName -> C.ImportDirective -- ^ Arguments of 'NiceOpen' -> ScopeM (ModuleInfo, A.ModuleName, A.ImportDirective) -- ^ Arguments of 'A.Open' checkOpen r x dir = do reportSDoc "scope.decl" 70 $ do cm <- getCurrentModule vcat $ [ text "scope checking NiceOpen " <> return (pretty x) , text " getCurrentModule = " <> prettyA cm , text $ " getCurrentModule (raw) = " ++ show cm , text $ " C.ImportDirective = " ++ prettyShow dir ] -- Andreas, 2017-01-01, issue #2377: warn about useless `public` when (publicOpen dir) $ do whenM ((A.noModuleName ==) <$> getCurrentModule) $ do warning $ UselessPublic m <- toAbstract (OldModuleName x) printScope "open" 20 $ "opening " ++ prettyShow x adir <- openModule_ TopOpenModule x dir printScope "open" 20 $ "result:" let minfo = ModuleInfo { minfoRange = r , minfoAsName = Nothing , minfoAsTo = renamingRange dir , minfoOpenShort = Nothing , minfoDirective = Just dir } let adecls = [A.Open minfo m adir] reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checked NiceOpen " ++ prettyShow x ] ++ map (nest 2 . prettyA) adecls return (minfo, m, adir) {-------------------------------------------------------------------------- Translation --------------------------------------------------------------------------} concreteToAbstract_ :: ToAbstract c a => c -> ScopeM a concreteToAbstract_ = toAbstract concreteToAbstract :: ToAbstract c a => ScopeInfo -> c -> ScopeM a concreteToAbstract scope x = withScope_ scope (toAbstract x) -- | Things that can be translated to abstract syntax are instances of this -- class. class ToAbstract concrete abstract | concrete -> abstract where toAbstract :: concrete -> ScopeM abstract -- | This function should be used instead of 'toAbstract' for things that need -- to keep track of precedences to make sure that we don't forget about it. toAbstractCtx :: ToAbstract concrete abstract => Precedence -> concrete -> ScopeM abstract toAbstractCtx ctx c = withContextPrecedence ctx $ toAbstract c toAbstractTopCtx :: ToAbstract c a => c -> ScopeM a toAbstractTopCtx = toAbstractCtx TopCtx toAbstractHiding :: (LensHiding h, ToAbstract c a) => h -> c -> ScopeM a toAbstractHiding h | visible h = toAbstract -- don't change precedence if visible toAbstractHiding _ = toAbstractCtx TopCtx setContextCPS :: Precedence -> (a -> ScopeM b) -> ((a -> ScopeM b) -> ScopeM b) -> ScopeM b setContextCPS p ret f = do old <- scopePrecedence <$> getScope withContextPrecedence p $ f $ \ x -> setContextPrecedence old >> ret x localToAbstractCtx :: ToAbstract concrete abstract => Precedence -> concrete -> (abstract -> ScopeM a) -> ScopeM a localToAbstractCtx ctx c ret = setContextCPS ctx ret (localToAbstract c) -- | This operation does not affect the scope, i.e. the original scope -- is restored upon completion. localToAbstract :: ToAbstract c a => c -> (a -> ScopeM b) -> ScopeM b localToAbstract x ret = fst <$> localToAbstract' x ret -- | Like 'localToAbstract' but returns the scope after the completion of the -- second argument. localToAbstract' :: ToAbstract c a => c -> (a -> ScopeM b) -> ScopeM (b, ScopeInfo) localToAbstract' x ret = do scope <- getScope withScope scope $ ret =<< toAbstract x instance (ToAbstract c1 a1, ToAbstract c2 a2) => ToAbstract (c1,c2) (a1,a2) where toAbstract (x,y) = (,) <$> toAbstract x <*> toAbstract y instance (ToAbstract c1 a1, ToAbstract c2 a2, ToAbstract c3 a3) => ToAbstract (c1,c2,c3) (a1,a2,a3) where toAbstract (x,y,z) = flatten <$> toAbstract (x,(y,z)) where flatten (x,(y,z)) = (x,y,z) instance {-# OVERLAPPABLE #-} ToAbstract c a => ToAbstract [c] [a] where toAbstract = mapM toAbstract instance (ToAbstract c1 a1, ToAbstract c2 a2) => ToAbstract (Either c1 c2) (Either a1 a2) where toAbstract = traverseEither toAbstract toAbstract instance ToAbstract c a => ToAbstract (Maybe c) (Maybe a) where toAbstract = traverse toAbstract -- Names ------------------------------------------------------------------ data NewName a = NewName { newBinder :: Binder -- what kind of binder? , newName :: a } data OldQName = OldQName C.QName (Maybe (Set A.Name)) -- ^ If a set is given, then the first name must correspond to one -- of the names in the set. newtype OldName a = OldName a -- | Wrapper to resolve a name to a 'ResolvedName' (rather than an 'A.Expr'). data ResolveQName = ResolveQName C.QName data PatName = PatName C.QName (Maybe (Set A.Name)) -- ^ If a set is given, then the first name must correspond to one -- of the names in the set. instance ToAbstract (NewName C.Name) A.Name where toAbstract (NewName b x) = do y <- freshAbstractName_ x bindVariable b x y return y instance ToAbstract (NewName C.BoundName) A.BindName where toAbstract (NewName b BName{ boundName = x, bnameFixity = fx }) = do y <- freshAbstractName fx x bindVariable b x y return $ A.BindName y instance ToAbstract OldQName A.Expr where toAbstract (OldQName x ns) = do qx <- resolveName' allKindsOfNames ns x reportSLn "scope.name" 10 $ "resolved " ++ prettyShow x ++ ": " ++ prettyShow qx case qx of VarName x' _ -> return $ A.Var x' DefinedName _ d -> do -- In case we find a defined name, we start by checking whether there's -- a warning attached to it reportSDoc "scope.warning" 50 $ text $ "Checking usage of " ++ prettyShow d mstr <- Map.lookup (anameName d) <$> getUserWarnings forM_ mstr (warning . UserWarning) -- then we take note of generalized names used case anameKind d of GeneralizeName -> do gvs <- useTC stGeneralizedVars case gvs of -- Subtle: Use (left-biased) union instead of insert to keep the old name if -- already present. This way we can sort by source location when generalizing -- (Issue 3354). Just s -> stGeneralizedVars `setTCLens` Just (s `Set.union` Set.singleton (anameName d)) Nothing -> typeError $ GeneralizeNotSupportedHere $ anameName d DisallowedGeneralizeName -> do typeError . GenericDocError =<< text "Cannot use generalized variable from let-opened module:" <+> prettyTCM (anameName d) _ -> return () -- and then we return the name return $ nameExpr d FieldName ds -> return $ A.Proj ProjPrefix $ AmbQ (fmap anameName ds) ConstructorName ds -> return $ A.Con $ AmbQ (fmap anameName ds) UnknownName -> notInScope x PatternSynResName ds -> return $ A.PatternSyn $ AmbQ (fmap anameName ds) instance ToAbstract ResolveQName ResolvedName where toAbstract (ResolveQName x) = resolveName x >>= \case UnknownName -> notInScope x q -> return q data APatName = VarPatName A.Name | ConPatName (NonemptyList AbstractName) | PatternSynPatName (NonemptyList AbstractName) instance ToAbstract PatName APatName where toAbstract (PatName x ns) = do reportSLn "scope.pat" 10 $ "checking pattern name: " ++ prettyShow x rx <- resolveName' [ConName, PatternSynName] ns x -- Andreas, 2013-03-21 ignore conflicting names which cannot -- be meant since we are in a pattern case (rx, x) of (VarName y _, C.QName x) -> bindPatVar x (FieldName d, C.QName x) -> bindPatVar x (DefinedName _ d, C.QName x) | DefName == anameKind d -> bindPatVar x (UnknownName, C.QName x) -> bindPatVar x (ConstructorName ds, _) -> patCon ds (PatternSynResName d, _) -> patSyn d _ -> genericError $ "Cannot pattern match on non-constructor " ++ prettyShow x where bindPatVar = VarPatName <.> bindPatternVariable patCon ds = do reportSLn "scope.pat" 10 $ "it was a con: " ++ prettyShow (fmap anameName ds) return $ ConPatName ds patSyn ds = do reportSLn "scope.pat" 10 $ "it was a pat syn: " ++ prettyShow (fmap anameName ds) return $ PatternSynPatName ds -- | Translate and possibly bind a pattern variable -- (which could have been bound before due to non-linearity). bindPatternVariable :: C.Name -> ScopeM A.Name bindPatternVariable x = do reportSLn "scope.pat" 10 $ "it was a var: " ++ prettyShow x y <- (AssocList.lookup x <$> getVarsToBind) >>= \case Just (LocalVar y _ _) -> return $ setRange (getRange x) y Nothing -> freshAbstractName_ x addVarToBind x $ LocalVar y PatternBound [] return y class ToQName a where toQName :: a -> C.QName instance ToQName C.Name where toQName = C.QName instance ToQName C.QName where toQName = id -- Should be a defined name. instance (Show a, ToQName a) => ToAbstract (OldName a) A.QName where toAbstract (OldName x) = do rx <- resolveName (toQName x) case rx of DefinedName _ d -> return $ anameName d -- We can get the cases below for DISPLAY pragmas ConstructorName ds -> return $ anameName (headNe ds) -- We'll throw out this one, so it doesn't matter which one we pick FieldName ds -> return $ anameName (headNe ds) PatternSynResName ds -> return $ anameName (headNe ds) VarName x _ -> genericError $ "Not a defined name: " ++ prettyShow x UnknownName -> notInScope (toQName x) newtype NewModuleName = NewModuleName C.Name newtype NewModuleQName = NewModuleQName C.QName newtype OldModuleName = OldModuleName C.QName freshQModule :: A.ModuleName -> C.Name -> ScopeM A.ModuleName freshQModule m x = A.qualifyM m . mnameFromList . (:[]) <$> freshAbstractName_ x checkForModuleClash :: C.Name -> ScopeM () checkForModuleClash x = do ms <- scopeLookup (C.QName x) <$> getScope unless (null ms) $ do reportSLn "scope.clash" 20 $ "clashing modules ms = " ++ prettyShow ms reportSLn "scope.clash" 60 $ "clashing modules ms = " ++ show ms setCurrentRange x $ typeError $ ShadowedModule x $ map ((`withRangeOf` x) . amodName) ms instance ToAbstract NewModuleName A.ModuleName where toAbstract (NewModuleName x) = do checkForModuleClash x m <- getCurrentModule y <- freshQModule m x createModule Nothing y return y instance ToAbstract NewModuleQName A.ModuleName where toAbstract (NewModuleQName m) = toAbs noModuleName m where toAbs m (C.QName x) = do y <- freshQModule m x createModule Nothing y return y toAbs m (C.Qual x q) = do m' <- freshQModule m x toAbs m' q instance ToAbstract OldModuleName A.ModuleName where toAbstract (OldModuleName q) = setCurrentRange q $ do amodName <$> resolveModule q -- Expressions ------------------------------------------------------------ -- | Peel off 'C.HiddenArg' and represent it as an 'NamedArg'. mkNamedArg :: C.Expr -> NamedArg C.Expr mkNamedArg (C.HiddenArg _ e) = Arg (hide defaultArgInfo) e mkNamedArg (C.InstanceArg _ e) = Arg (makeInstance defaultArgInfo) e mkNamedArg e = Arg defaultArgInfo $ unnamed e -- | Peel off 'C.HiddenArg' and represent it as an 'Arg', throwing away any name. mkArg' :: ArgInfo -> C.Expr -> Arg C.Expr mkArg' info (C.HiddenArg _ e) = Arg (hide info) $ namedThing e mkArg' info (C.InstanceArg _ e) = Arg (makeInstance info) $ namedThing e mkArg' info e = Arg (setHiding NotHidden info) e -- | By default, arguments are @Relevant@. mkArg :: C.Expr -> Arg C.Expr mkArg e = mkArg' defaultArgInfo e inferParenPreference :: C.Expr -> ParenPreference inferParenPreference C.Paren{} = PreferParen inferParenPreference _ = PreferParenless -- | Parse a possibly dotted C.Expr as A.Expr. Bool = True if dotted. toAbstractDot :: Precedence -> C.Expr -> ScopeM (A.Expr, Bool) toAbstractDot prec e = do reportSLn "scope.irrelevance" 100 $ "toAbstractDot: " ++ (render $ pretty e) traceCall (ScopeCheckExpr e) $ case e of C.Dot _ e -> do e <- toAbstractCtx prec e return (e, True) C.RawApp r es -> do e <- parseApplication es toAbstractDot prec e C.Paren _ e -> toAbstractDot TopCtx e e -> do e <- toAbstractCtx prec e return (e, False) -- | Translate concrete expression under at least one binder into nested -- lambda abstraction in abstract syntax. toAbstractLam :: Range -> [C.LamBinding] -> C.Expr -> Precedence -> ScopeM A.Expr toAbstractLam r bs e ctx = do -- Translate the binders localToAbstract (map (C.DomainFull . makeDomainFull) bs) $ \ bs -> do -- Translate the body e <- toAbstractCtx ctx e -- We have at least one binder. Get first @b@ and rest @bs@. caseList bs __IMPOSSIBLE__ $ \ b bs -> do return $ A.Lam (ExprRange r) b $ foldr mkLam e bs where mkLam b e = A.Lam (ExprRange $ fuseRange b e) b e -- | Scope check extended lambda expression. scopeCheckExtendedLam :: Range -> [C.LamClause] -> ScopeM A.Expr scopeCheckExtendedLam r cs = do whenM isInsideDotPattern $ genericError "Extended lambdas are not allowed in dot patterns" -- Find an unused name for the extended lambda definition. cname <- nextlamname r 0 extendedLambdaName name <- freshAbstractName_ cname reportSLn "scope.extendedLambda" 10 $ "new extended lambda name: " ++ prettyShow name verboseS "scope.extendedLambda" 60 $ do forM_ cs $ \ c -> do reportSLn "scope.extendedLambda" 60 $ "extended lambda lhs: " ++ show (C.lamLHS c) qname <- qualifyName_ name bindName (PrivateAccess Inserted) DefName cname qname -- Compose a function definition and scope check it. a <- aModeToDef <$> asksTC envAbstractMode let insertApp :: C.Pattern -> ScopeM C.Pattern insertApp (C.RawAppP r es) = return $ C.RawAppP r $ IdentP (C.QName cname) : es insertApp (C.AppP p1 p2) = return $ (IdentP (C.QName cname) `C.AppP` defaultNamedArg p1) `C.AppP` p2 -- Case occurs in issue #2785 insertApp p = return $ C.RawAppP r $ IdentP (C.QName cname) : [p] -- Issue #2807: C.ParenP also possible where r = getRange p -- Andreas, 2017-10-17 issue #2807: do not raise IMPOSSSIBLE here -- since we are actually not sure what is possible and what not. -- insertApp (C.IdentP q ) = return $ C.RawAppP r $ IdentP (C.QName cname) : [C.IdentP q] -- where r = getRange q -- insertApp p = do -- reportSLn "impossible" 10 $ "scopeCheckExtendedLam: unexpected pattern: " ++ -- case p of -- C.QuoteP{} -> "QuoteP" -- C.OpAppP{} -> "OpAppP" -- C.HiddenP{} -> "HiddenP" -- C.InstanceP{} -> "InstanceP" -- C.ParenP{} -> "ParenP" -- C.WildP{} -> "WildP" -- C.AbsurdP{} -> "AbsurdP" -- C.AsP{} -> "AsP" -- C.DotP{} -> "DotP" -- C.LitP{} -> "LitP" -- C.RecP{} -> "RecP" -- _ -> __IMPOSSIBLE__ -- __IMPOSSIBLE__ d <- C.FunDef r [] a NotInstanceDef __IMPOSSIBLE__ cname <$> do forM cs $ \ (LamClause lhs rhs wh ca) -> do -- wh == NoWhere, see parser for more info lhs' <- mapLhsOriginalPatternM insertApp lhs return $ C.Clause cname ca lhs' rhs wh [] scdef <- toAbstract d -- Create the abstract syntax for the extended lambda. case scdef of A.ScopedDecl si [A.FunDef di qname' NotDelayed cs] -> do setScope si -- This turns into an A.ScopedExpr si $ A.ExtendedLam... return $ A.ExtendedLam (ExprRange r) di qname' cs _ -> __IMPOSSIBLE__ where -- Get a concrete name that is not yet in scope. nextlamname :: Range -> Int -> String -> ScopeM C.Name nextlamname r i s = do let cname = C.Name r C.NotInScope [Id $ stringToRawName $ s ++ show i] rn <- resolveName $ C.QName cname case rn of UnknownName -> return cname _ -> nextlamname r (i+1) s instance ToAbstract C.Expr A.Expr where toAbstract e = traceCall (ScopeCheckExpr e) $ annotateExpr $ case e of -- Names Ident x -> toAbstract (OldQName x Nothing) -- Literals C.Lit l -> case l of LitNat r n -> do let builtin | n < 0 = Just <$> primFromNeg -- negative literals are only allowed if FROMNEG is defined | otherwise = ensureInScope =<< getBuiltin' builtinFromNat l' = LitNat r (abs n) info = defaultAppInfo r conv <- builtin case conv of Just (I.Def q _) -> return $ A.App info (A.Def q) $ defaultNamedArg (A.Lit l') _ -> return $ A.Lit l LitString r s -> do conv <- ensureInScope =<< getBuiltin' builtinFromString let info = defaultAppInfo r case conv of Just (I.Def q _) -> return $ A.App info (A.Def q) $ defaultNamedArg (A.Lit l) _ -> return $ A.Lit l _ -> return $ A.Lit l where ensureInScope :: Maybe I.Term -> ScopeM (Maybe I.Term) ensureInScope v@(Just (I.Def q _)) = ifM (isNameInScope q <$> getScope) (return v) (return Nothing) ensureInScope _ = return Nothing -- Meta variables C.QuestionMark r n -> do scope <- getScope -- Andreas, 2014-04-06 create interaction point. ii <- registerInteractionPoint True r n let info = MetaInfo { metaRange = r , metaScope = scope , metaNumber = Nothing , metaNameSuggestion = "" } return $ A.QuestionMark info ii C.Underscore r n -> do scope <- getScope return $ A.Underscore $ MetaInfo { metaRange = r , metaScope = scope , metaNumber = maybe Nothing __IMPOSSIBLE__ n , metaNameSuggestion = fromMaybe "" n } -- Raw application C.RawApp r es -> do e <- parseApplication es toAbstract e -- Application C.App r e1 e2 -> do let parenPref = inferParenPreference (namedArg e2) info = (defaultAppInfo r) { appOrigin = UserWritten, appParens = parenPref } e1 <- toAbstractCtx FunctionCtx e1 e2 <- toAbstractCtx (ArgumentCtx parenPref) e2 return $ A.App info e1 e2 -- Operator application C.OpApp r op ns es -> toAbstractOpApp op ns es -- With application C.WithApp r e es -> do e <- toAbstractCtx WithFunCtx e es <- mapM (toAbstractCtx WithArgCtx) es return $ A.WithApp (ExprRange r) e es -- Misplaced hidden argument C.HiddenArg _ _ -> nothingAppliedToHiddenArg e C.InstanceArg _ _ -> nothingAppliedToInstanceArg e -- Lambda C.AbsurdLam r h -> return $ A.AbsurdLam (ExprRange r) h C.Lam r bs e -> toAbstractLam r bs e TopCtx -- Extended Lambda C.ExtendedLam r cs -> scopeCheckExtendedLam r cs -- Relevant and irrelevant non-dependent function type C.Fun r (Arg info1 e1) e2 -> do Arg info (e0, dotted) <- traverse (toAbstractDot FunctionSpaceDomainCtx) $ mkArg' info1 e1 let e1 = Arg ((if dotted then setRelevance Irrelevant else id) info) e0 e2 <- toAbstractCtx TopCtx e2 return $ A.Fun (ExprRange r) e1 e2 -- Dependent function type e0@(C.Pi tel e) -> localToAbstract tel $ \tel -> do e <- toAbstractCtx TopCtx e let info = ExprRange (getRange e0) return $ A.Pi info tel e -- Sorts C.Set _ -> return $ A.Set (ExprRange $ getRange e) 0 C.SetN _ n -> return $ A.Set (ExprRange $ getRange e) n C.Prop _ -> return $ A.Prop (ExprRange $ getRange e) 0 C.PropN _ n -> return $ A.Prop (ExprRange $ getRange e) n -- Let e0@(C.Let _ ds (Just e)) -> ifM isInsideDotPattern (genericError $ "Let-expressions are not allowed in dot patterns") $ localToAbstract (LetDefs ds) $ \ds' -> do e <- toAbstractCtx TopCtx e let info = ExprRange (getRange e0) return $ A.Let info ds' e C.Let _ _ Nothing -> genericError "Missing body in let-expression" -- Record construction C.Rec r fs -> do fs' <- toAbstractCtx TopCtx fs let ds' = [ d | Right (_, ds) <- fs', d <- ds ] fs'' = map (mapRight fst) fs' i = ExprRange r return $ A.mkLet i ds' (A.Rec i fs'') -- Record update C.RecUpdate r e fs -> do A.RecUpdate (ExprRange r) <$> toAbstract e <*> toAbstractCtx TopCtx fs -- Parenthesis C.Paren _ e -> toAbstractCtx TopCtx e -- Idiom brackets C.IdiomBrackets r e -> toAbstractCtx TopCtx =<< parseIdiomBrackets r e -- Do notation C.DoBlock r ss -> toAbstractCtx TopCtx =<< desugarDoNotation r ss -- Post-fix projections C.Dot r e -> A.Dot (ExprRange r) <$> toAbstract e -- Pattern things C.As _ _ _ -> notAnExpression e C.Absurd _ -> notAnExpression e -- Impossible things C.ETel _ -> __IMPOSSIBLE__ C.Equal{} -> genericError "Parse error: unexpected '='" C.Ellipsis _ -> genericError "Parse error: unexpected '...'" -- Quoting C.QuoteGoal _ x e -> do x' <- toAbstract (NewName LetBound x) e' <- toAbstract e return $ A.QuoteGoal (ExprRange $ getRange e) x' e' C.QuoteContext r -> return $ A.QuoteContext (ExprRange r) C.Quote r -> return $ A.Quote (ExprRange r) C.QuoteTerm r -> return $ A.QuoteTerm (ExprRange r) C.Unquote r -> return $ A.Unquote (ExprRange r) C.Tactic r e es -> do let AppView e' args = appView e e' : es <- toAbstract (e' : es) args <- toAbstract args return $ A.Tactic (ExprRange r) e' args (map defaultNamedArg es) -- DontCare C.DontCare e -> A.DontCare <$> toAbstract e -- forall-generalize C.Generalized e -> do (s, e) <- collectGeneralizables $ toAbstract e pure $ A.generalized s e instance ToAbstract C.ModuleAssignment (A.ModuleName, [A.LetBinding]) where toAbstract (C.ModuleAssignment m es i) | null es && isDefaultImportDir i = (, []) <$> toAbstract (OldModuleName m) | otherwise = do x <- C.NoName (getRange m) <$> fresh r <- checkModuleMacro LetApply LetOpenModule (getRange (m, es, i)) PublicAccess x (C.SectionApp (getRange (m , es)) [] (RawApp (fuseRange m es) (Ident m : es))) DontOpen i case r of (LetApply _ m' _ _ _ : _) -> return (m', r) _ -> __IMPOSSIBLE__ instance ToAbstract c a => ToAbstract (FieldAssignment' c) (FieldAssignment' a) where toAbstract = traverse toAbstract instance ToAbstract C.LamBinding A.LamBinding where toAbstract (C.DomainFree x) = A.DomainFree <$> toAbstract ((fmap . fmap) (NewName LambdaBound) x) toAbstract (C.DomainFull tb) = A.DomainFull <$> toAbstract tb makeDomainFull :: C.LamBinding -> C.TypedBinding makeDomainFull (C.DomainFull b) = b makeDomainFull (C.DomainFree x) = C.TBind r [x] $ C.Underscore r Nothing where r = getRange x instance ToAbstract C.TypedBinding A.TypedBinding where toAbstract (C.TBind r xs t) = do t' <- toAbstractCtx TopCtx t xs' <- toAbstract $ (map . fmap . fmap) (NewName LambdaBound) xs return $ A.TBind r xs' t' toAbstract (C.TLet r ds) = A.TLet r <$> toAbstract (LetDefs ds) -- | Scope check a module (top level function). -- scopeCheckNiceModule :: Range -> Access -> C.Name -> C.Telescope -> ScopeM [A.Declaration] -> ScopeM [A.Declaration] scopeCheckNiceModule r p name tel checkDs | telHasOpenStmsOrModuleMacros tel = do -- Andreas, 2013-12-10: -- If the module telescope contains open statements -- or module macros (Issue 1299), -- add an extra anonymous module around the current one. -- Otherwise, the open statements would create -- identifiers in the parent scope of the current module. -- But open statements in the module telescope should -- only affect the current module! scopeCheckNiceModule noRange p noName_ [] $ scopeCheckNiceModule_ | otherwise = do scopeCheckNiceModule_ where -- The actual workhorse: scopeCheckNiceModule_ = do -- Check whether we are dealing with an anonymous module. -- This corresponds to a Coq/LEGO section. (name, p', open) <- do if isNoName name then do (i :: NameId) <- fresh return (C.NoName (getRange name) i, PrivateAccess Inserted, True) else return (name, p, False) -- Check and bind the module, using the supplied check for its contents. aname <- toAbstract (NewModuleName name) ds <- snd <$> do scopeCheckModule r (C.QName name) aname tel checkDs bindModule p' name aname -- If the module was anonymous open it public -- unless it's private, in which case we just open it (#2099) when open $ void $ -- We can discard the returned default A.ImportDirective. openModule_ TopOpenModule (C.QName name) $ defaultImportDir { publicOpen = p == PublicAccess } return ds -- | Check whether a telescope has open declarations or module macros. telHasOpenStmsOrModuleMacros :: C.Telescope -> Bool telHasOpenStmsOrModuleMacros = any yesBind where yesBind C.TBind{} = False yesBind (C.TLet _ ds) = any yes ds yes C.ModuleMacro{} = True yes C.Open{} = True yes C.Import{} = True -- not __IMPOSSIBLE__, see Issue #1718 -- However, it does not matter what we return here, as this will -- become an error later: "Not a valid let-declaration". -- (Andreas, 2015-11-17) yes (C.Mutual _ ds) = any yes ds yes (C.Abstract _ ds) = any yes ds yes (C.Private _ _ ds) = any yes ds yes _ = False {- UNUSED telHasLetStms :: C.Telescope -> Bool telHasLetStms = any isLetBind where isLetBind C.TBind{} = False isLetBind C.TLet{} = True -} -- | We for now disallow let-bindings in @data@ and @record@ telescopes. -- This due "nested datatypes"; there is no easy interpretation of -- @ -- data D (A : Set) (open M A) (b : B) : Set where -- c : D (A × A) b → D A b -- @ -- where @B@ is brought in scope by @open M A@. class EnsureNoLetStms a where ensureNoLetStms :: a -> ScopeM () {- From ghc 7.2, there is LANGUAGE DefaultSignatures default ensureNoLetStms :: Foldable t => t a -> ScopeM () ensureNoLetStms = traverse_ ensureNoLetStms -} instance EnsureNoLetStms C.TypedBinding where ensureNoLetStms tb = case tb of C.TLet{} -> typeError $ IllegalLetInTelescope tb C.TBind{} -> return () instance EnsureNoLetStms a => EnsureNoLetStms (LamBinding' a) where ensureNoLetStms = traverse_ ensureNoLetStms instance EnsureNoLetStms a => EnsureNoLetStms [a] where ensureNoLetStms = traverse_ ensureNoLetStms -- | Returns the scope inside the checked module. scopeCheckModule :: Range -> C.QName -- ^ The concrete name of the module. -> A.ModuleName -- ^ The abstract name of the module. -> C.Telescope -- ^ The module telescope. -> ScopeM [A.Declaration] -- ^ The code for checking the module contents. -> ScopeM (ScopeInfo, [A.Declaration]) scopeCheckModule r x qm tel checkDs = do printScope "module" 20 $ "checking module " ++ prettyShow x -- Andreas, 2013-12-10: Telescope does not live in the new module -- but its parent, so check it before entering the new module. -- This is important for Nicolas Pouillard's open parametrized modules -- statements inside telescopes. res <- withLocalVars $ do tel <- toAbstract (GenTel tel) withCurrentModule qm $ do -- pushScope m -- qm <- getCurrentModule printScope "module" 20 $ "inside module " ++ prettyShow x ds <- checkDs scope <- getScope return (scope, [ A.Section info (qm `withRangesOfQ` x) tel ds ]) -- Binding is done by the caller printScope "module" 20 $ "after module " ++ prettyShow x return res where info = ModuleInfo r noRange Nothing Nothing Nothing -- | Temporary data type to scope check a file. data TopLevel a = TopLevel { topLevelPath :: AbsolutePath -- ^ The file path from which we loaded this module. , topLevelExpectedName :: C.TopLevelModuleName -- ^ The expected module name -- (coming from the import statement that triggered scope checking this file). , topLevelTheThing :: a -- ^ The file content. } data TopLevelInfo = TopLevelInfo { topLevelDecls :: [A.Declaration] , topLevelScope :: ScopeInfo -- ^ as seen from inside the module } -- | The top-level module name. topLevelModuleName :: TopLevelInfo -> A.ModuleName topLevelModuleName = scopeCurrent . topLevelScope -- | Top-level declarations are always -- @ -- (import|open)* -- a bunch of possibly opened imports -- module ThisModule ... -- the top-level module of this file -- @ instance ToAbstract (TopLevel [C.Declaration]) TopLevelInfo where toAbstract (TopLevel file expectedMName ds) = -- A file is a bunch of preliminary decls (imports etc.) -- plus a single module decl. case C.spanAllowedBeforeModule ds of -- If there are declarations after the top-level module -- we have to report a parse error here. (_, C.Module{} : d : _) -> traceCall (SetRange $ getRange d) $ genericError $ "No declarations allowed after top-level module." -- Otherwise, proceed. (outsideDecls, [ C.Module r m0 tel insideDecls ]) -> do -- If the module name is _ compute the name from the file path m <- if isNoName m0 then do -- Andreas, 2017-07-28, issue #1077 -- Check if the insideDecls end in a single module which has the same -- name as the file. In this case, it is highly likely that the user -- put some non-allowed declarations before the top-level module in error. -- Andreas, 2017-10-19, issue #2808 -- Widen this check to: -- If the first module of the insideDecls has the same name as the file, -- report an error. case flip span insideDecls $ \case { C.Module{} -> False; _ -> True } of (ds0, (C.Module _ m1 _ _ : _)) | C.toTopLevelModuleName m1 == expectedMName -- If the anonymous module comes from the user, -- the range cannot be the beginningOfFile. -- That is the range if the parser inserted the anon. module. , r == beginningOfFile (getRange insideDecls) -> do traceCall (SetRange $ getRange ds0) $ genericError "Illegal declaration(s) before top-level module" -- Otherwise, reconstruct the top-level module name _ -> return $ C.QName $ C.Name (getRange m0) C.InScope [Id $ stringToRawName $ rootNameModule file] -- Andreas, 2017-05-17, issue #2574, keep name as jump target! -- Andreas, 2016-07-12, ALTERNATIVE: -- -- We assign an anonymous file module the name expected from -- -- its import. For flat file structures, this is the same. -- -- For hierarchical file structures, this reverses the behavior: -- -- Loading the file by itself will fail, but it can be imported. -- -- The previous behavior is: it can be loaded by itself, but not -- -- be imported -- then return $ C.fromTopLevelModuleName expectedMName else do -- Andreas, 2014-03-28 Issue 1078 -- We need to check the module name against the file name here. -- Otherwise one could sneak in a lie and confuse the scope -- checker. checkModuleName (C.toTopLevelModuleName m0) file $ Just expectedMName return m0 setTopLevelModule m am <- toAbstract (NewModuleQName m) -- Scope check the declarations outside outsideDecls <- toAbstract outsideDecls (insideScope, insideDecls) <- scopeCheckModule r m am tel $ toAbstract insideDecls let scope = mapScopeInfo (restrictLocalPrivate am) insideScope setScope scope return $ TopLevelInfo (outsideDecls ++ insideDecls) scope -- We already inserted the missing top-level module, see -- 'Agda.Syntax.Parser.Parser.figureOutTopLevelModule', -- thus, this case is impossible: _ -> __IMPOSSIBLE__ -- | runs Syntax.Concrete.Definitions.niceDeclarations on main module niceDecls :: DoWarn -> [C.Declaration] -> ([NiceDeclaration] -> ScopeM a) -> ScopeM a niceDecls warn ds ret = setCurrentRange ds $ computeFixitiesAndPolarities warn ds $ do fixs <- scopeFixities <$> getScope -- We need to pass the fixities to the nicifier for clause grouping let (result, warns') = runNice $ niceDeclarations fixs ds -- COMPILED pragmas are not allowed in safe mode unless we are in a builtin module. -- So we start by filtering out all the PragmaCompiled warnings if one of these two -- conditions is not met. isSafe <- Lens.getSafeMode <$> pragmaOptions isBuiltin <- Lens.isBuiltinModule . filePath =<< getCurrentPath let warns = if isSafe && not isBuiltin then warns' else filter notOnlyInSafeMode warns' unless (null warns) $ do -- If there are some warnings and the --safe flag is set, -- we check that none of the NiceWarnings are fatal when isSafe $ do let isUnsafe w = declarationWarningName w `elem` [ PragmaNoTerminationCheck_ , PragmaCompiled_ , MissingDefinitions_ ] let (errs, ws) = List.partition isUnsafe warns -- If some of them are, we fail unless (null errs) $ do warnings $ NicifierIssue <$> ws tcerrs <- mapM warning_ $ NicifierIssue <$> errs setCurrentRange errs $ typeError $ NonFatalErrors tcerrs -- Otherwise we simply record the warnings warnings $ NicifierIssue <$> warns case result of Left e -> throwError $ Exception (getRange e) $ pretty e Right ds -> ret ds where notOnlyInSafeMode = (PragmaCompiled_ /=) . declarationWarningName instance {-# OVERLAPPING #-} ToAbstract [C.Declaration] [A.Declaration] where toAbstract ds = do -- When --safe is active the termination checker (Issue 586) and -- positivity checker (Issue 1614) may not be switched off, and -- polarities may not be assigned. ds <- ifM (Lens.getSafeMode <$> commandLineOptions) (mapM (noNoTermCheck >=> noNoPositivityCheck >=> noPolarity >=> noNoUniverseCheck) ds) (return ds) niceDecls DoWarn ds toAbstract where -- ASR (31 December 2015). We don't pattern-match on -- @NoTerminationCheck@ because the @NO_TERMINATION_CHECK@ pragma -- was removed. See Issue 1763. noNoTermCheck :: C.Declaration -> TCM C.Declaration noNoTermCheck d@(C.Pragma (C.TerminationCheckPragma r NonTerminating)) = d <$ (setCurrentRange d $ warning SafeFlagNonTerminating) noNoTermCheck d@(C.Pragma (C.TerminationCheckPragma r Terminating)) = d <$ (setCurrentRange d $ warning SafeFlagTerminating) noNoTermCheck d = return d noNoPositivityCheck :: C.Declaration -> TCM C.Declaration noNoPositivityCheck d@(C.Pragma (C.NoPositivityCheckPragma _)) = d <$ (setCurrentRange d $ warning SafeFlagNoPositivityCheck) noNoPositivityCheck d = return d noPolarity :: C.Declaration -> TCM C.Declaration noPolarity d@(C.Pragma C.PolarityPragma{}) = d <$ (setCurrentRange d $ warning SafeFlagPolarity) noPolarity d = return d noNoUniverseCheck :: C.Declaration -> TCM C.Declaration noNoUniverseCheck d@(C.Pragma (C.NoUniverseCheckPragma _)) = d <$ (setCurrentRange d $ warning SafeFlagNoUniverseCheck) noNoUniverseCheck d = return d newtype LetDefs = LetDefs [C.Declaration] newtype LetDef = LetDef NiceDeclaration instance ToAbstract LetDefs [A.LetBinding] where toAbstract (LetDefs ds) = concat <$> (niceDecls DoWarn ds $ toAbstract . map LetDef) instance ToAbstract LetDef [A.LetBinding] where toAbstract (LetDef d) = case d of NiceMutual _ _ _ d@[C.FunSig _ _ _ instanc macro info _ x t, C.FunDef _ _ abstract _ _ _ [cl]] -> do when (abstract == AbstractDef) $ do genericError $ "abstract not allowed in let expressions" when (macro == MacroDef) $ do genericError $ "Macros cannot be defined in a let expression." t <- toAbstract t -- We bind the name here to make sure it's in scope for the LHS (#917). -- It's unbound for the RHS in letToAbstract. fx <- getConcreteFixity x x <- A.unBind <$> toAbstract (NewName LetBound $ mkBoundName x fx) (x', e) <- letToAbstract cl -- If InstanceDef set info to Instance let info' | instanc == InstanceDef = makeInstance info | otherwise = info -- There are sometimes two instances of the -- let-bound variable, one declaration and one -- definition. The first list element below is -- used to highlight the declared instance in the -- right way (see Issue 1618). return [ A.LetDeclaredVariable (A.BindName (setRange (getRange x') x)) , A.LetBind (LetRange $ getRange d) info' (A.BindName x) t e ] -- irrefutable let binding, like (x , y) = rhs NiceFunClause r PublicAccess ConcreteDef termCheck catchall d@(C.FunClause lhs@(C.LHS p [] []) (C.RHS rhs) NoWhere ca) -> do mp <- setCurrentRange p $ (Right <$> parsePattern p) `catchError` (return . Left) case mp of Right p -> do rhs <- toAbstract rhs p <- toAbstract p checkPatternLinearity p $ \ys -> typeError $ RepeatedVariablesInPattern ys bindVarsToBind p <- toAbstract p return [ A.LetPatBind (LetRange r) p rhs ] -- It's not a record pattern, so it should be a prefix left-hand side Left err -> case definedName p of Nothing -> throwError err Just x -> toAbstract $ LetDef $ NiceMutual r termCheck True [ C.FunSig r PublicAccess ConcreteDef NotInstanceDef NotMacroDef defaultArgInfo termCheck x (C.Underscore (getRange x) Nothing) , C.FunDef r __IMPOSSIBLE__ ConcreteDef NotInstanceDef __IMPOSSIBLE__ __IMPOSSIBLE__ [C.Clause x (ca || catchall) lhs (C.RHS rhs) NoWhere []] ] where definedName (C.IdentP (C.QName x)) = Just x definedName C.IdentP{} = Nothing definedName (C.RawAppP _ (p : _)) = definedName p definedName (C.ParenP _ p) = definedName p definedName C.WildP{} = Nothing -- for instance let _ + x = x in ... (not allowed) definedName C.AbsurdP{} = Nothing definedName C.AsP{} = Nothing definedName C.DotP{} = Nothing definedName C.EqualP{} = Nothing definedName C.LitP{} = Nothing definedName C.RecP{} = Nothing definedName C.QuoteP{} = Nothing definedName C.HiddenP{} = Nothing -- Not impossible, see issue #2291 definedName C.InstanceP{} = Nothing definedName C.WithP{} = Nothing definedName C.RawAppP{} = __IMPOSSIBLE__ definedName C.AppP{} = __IMPOSSIBLE__ definedName C.OpAppP{} = __IMPOSSIBLE__ definedName C.EllipsisP{} = __IMPOSSIBLE__ -- You can't open public in a let NiceOpen r x dirs -> do when (publicOpen dirs) $ warning UselessPublic m <- toAbstract (OldModuleName x) adir <- openModule_ LetOpenModule x dirs let minfo = ModuleInfo { minfoRange = r , minfoAsName = Nothing , minfoAsTo = renamingRange dirs , minfoOpenShort = Nothing , minfoDirective = Just dirs } return [A.LetOpen minfo m adir] NiceModuleMacro r p x modapp open dir -> do when (publicOpen dir) $ warning UselessPublic -- Andreas, 2014-10-09, Issue 1299: module macros in lets need -- to be private checkModuleMacro LetApply LetOpenModule r (PrivateAccess Inserted) x modapp open dir _ -> notAValidLetBinding d where letToAbstract (C.Clause top catchall clhs@(C.LHS p [] []) (C.RHS rhs) NoWhere []) = do {- p <- parseLHS top p localToAbstract (snd $ lhsArgs p) $ \args -> -} (x, args) <- do res <- setCurrentRange p $ parseLHS (C.QName top) p case res of C.LHSHead x args -> return (x, args) C.LHSProj{} -> genericError $ "copatterns not allowed in let bindings" C.LHSWith{} -> genericError $ "with-patterns not allowed in let bindings" e <- localToAbstract args $ \args -> do bindVarsToBind -- Make sure to unbind the function name in the RHS, since lets are non-recursive. rhs <- unbindVariable top $ toAbstract rhs foldM lambda rhs (reverse args) -- just reverse because these DomainFree return (x, e) letToAbstract _ = notAValidLetBinding d -- Named patterns not allowed in let definitions lambda e (Arg info (Named Nothing (A.VarP x))) = return $ A.Lam i (A.DomainFree $ unnamedArg info x) e where i = ExprRange (fuseRange x e) lambda e (Arg info (Named Nothing (A.WildP i))) = do x <- freshNoName (getRange i) return $ A.Lam i' (A.DomainFree $ unnamedArg info $ A.BindName x) e where i' = ExprRange (fuseRange i e) lambda _ _ = notAValidLetBinding d newtype Blind a = Blind { unBlind :: a } instance ToAbstract (Blind a) (Blind a) where toAbstract = return -- The only reason why we return a list is that open declarations disappears. -- For every other declaration we get a singleton list. instance ToAbstract NiceDeclaration A.Declaration where toAbstract d = annotateDecls $ traceSLn "scope.decl.trace" 50 (unlines [ "scope checking declaration" , " " ++ prettyShow d ]) $ traceCall (ScopeCheckDeclaration d) $ -- Andreas, 2015-10-05, Issue 1677: -- We record in the environment whether we are scope checking an -- abstract definition. This way, we can propagate this attribute -- the extended lambdas. caseMaybe (niceHasAbstract d) id (\ a -> localTC $ \ e -> e { envAbstractMode = aDefToMode a }) $ case d of -- Axiom (actual postulate) C.Axiom r p a i rel x t -> do -- check that we do not postulate in --safe mode, unless it is a -- builtin module with safe postulates whenM ((return . Lens.getSafeMode =<< commandLineOptions) `and2M` (not <$> (Lens.isBuiltinModuleWithSafePostulates . filePath =<< getCurrentPath))) (warning $ SafeFlagPostulate x) -- check the postulate toAbstractNiceAxiom A.NoFunSig NotMacroDef d C.NiceGeneralize r p i x t -> do reportSLn "scope.decl" 10 $ "found nice generalize: " ++ prettyShow x t_ <- toAbstractCtx TopCtx t let (s, t) = unGeneralized t_ reportSLn "scope.decl" 50 $ "generalizations: " ++ show (Set.toList s, t) f <- getConcreteFixity x y <- freshAbstractQName f x bindName p GeneralizeName x y return [A.Generalize s (mkDefInfoInstance x f p ConcreteDef NotInstanceDef NotMacroDef r) i y t] -- Fields C.NiceField r p a i x t -> do unless (p == PublicAccess) $ genericError "Record fields can not be private" -- Interaction points for record fields have already been introduced -- when checking the type of the record constructor. -- To avoid introducing interaction points (IP) twice, we turn -- all question marks to underscores. (See issue 1138.) let maskIP (C.QuestionMark r _) = C.Underscore r Nothing maskIP e = e t' <- toAbstractCtx TopCtx $ mapExpr maskIP t f <- getConcreteFixity x y <- freshAbstractQName f x -- Andreas, 2018-06-09 issue #2170 -- We want dependent irrelevance without irrelevant projections, -- thus, do not disable irrelevant projections via the scope checker. -- irrProj <- optIrrelevantProjections <$> pragmaOptions -- unless (isIrrelevant t && not irrProj) $ -- -- Andreas, 2010-09-24: irrelevant fields are not in scope -- -- this ensures that projections out of irrelevant fields cannot occur -- -- Ulf: unless you turn on --irrelevant-projections do bindName p FldName x y return [ A.Field (mkDefInfoInstance x f p a i NotMacroDef r) y t' ] -- Primitive function PrimitiveFunction r p a x t -> do t' <- toAbstractCtx TopCtx t f <- getConcreteFixity x y <- freshAbstractQName f x bindName p DefName x y return [ A.Primitive (mkDefInfo x f p a r) y t' ] -- Definitions (possibly mutual) NiceMutual r termCheck pc ds -> do ds' <- toAbstract ds -- We only termination check blocks that do not have a measure. return [ A.Mutual (MutualInfo termCheck pc r) ds' ] C.NiceRecSig r p a _pc _uc x ls t -> do ensureNoLetStms ls withLocalVars $ do -- Minor hack: record types don't have indices so we include t when -- computing generalised parameters, but in the type checker any named -- generalizable arguments in the sort should be bound variables. (ls', _) <- toAbstract (GenTelAndType (map makeDomainFull ls) t) t' <- toAbstract t f <- getConcreteFixity x x' <- freshAbstractQName f x bindName' p DefName (GeneralizedVarsMetadata $ generalizeTelVars ls') x x' return [ A.RecSig (mkDefInfo x f p a r) x' ls' t' ] C.NiceDataSig r p a _pc _uc x ls t -> withLocalVars $ do reportSLn "scope.data.sig" 20 ("checking DataSig for " ++ prettyShow x) ensureNoLetStms ls withLocalVars $ do ls' <- toAbstract $ GenTel $ map makeDomainFull ls t' <- toAbstract $ C.Generalized t f <- getConcreteFixity x x' <- freshAbstractQName f x bindName' p DefName (GeneralizedVarsMetadata $ generalizeTelVars ls') x x' return [ A.DataSig (mkDefInfo x f p a r) x' ls' t' ] -- Type signatures C.FunSig r p a i m rel tc x t -> toAbstractNiceAxiom A.FunSig m (C.Axiom r p a i rel x t) -- Function definitions C.FunDef r ds a i tc x cs -> do printLocals 10 $ "checking def " ++ prettyShow x (x',cs) <- toAbstract (OldName x,cs) -- Andreas, 2017-12-04 the name must reside in the current module unlessM ((A.qnameModule x' ==) <$> getCurrentModule) $ __IMPOSSIBLE__ let delayed = NotDelayed -- (delayed, cs) <- translateCopatternClauses cs -- TODO f <- getConcreteFixity x return [ A.FunDef (mkDefInfoInstance x f PublicAccess a i NotMacroDef r) x' delayed cs ] -- Uncategorized function clauses C.NiceFunClause r acc abs termCheck catchall (C.FunClause lhs rhs wcls ca) -> genericError $ "Missing type signature for left hand side " ++ prettyShow lhs C.NiceFunClause{} -> __IMPOSSIBLE__ -- Data definitions C.NiceDataDef r o a _ uc x pars cons -> withLocalVars $ do reportSLn "scope.data.def" 20 ("checking " ++ show o ++ " DataDef for " ++ prettyShow x) (p, ax) <- resolveName (C.QName x) >>= \case DefinedName p ax -> do livesInCurrentModule ax -- Andreas, 2017-12-04, issue #2862 return (p, ax) _ -> genericError $ "Missing type signature for data definition " ++ prettyShow x ensureNoLetStms pars withLocalVars $ do gvars <- bindGeneralizablesIfInserted o ax -- Check for duplicate constructors do cs <- mapM conName cons let dups = nub $ cs \\ nub cs bad = filter (`elem` dups) cs unless (distinct cs) $ setCurrentRange bad $ typeError $ DuplicateConstructors dups pars <- toAbstract pars let x' = anameName ax -- Create the module for the qualified constructors checkForModuleClash x -- disallow shadowing previously defined modules let m = mnameFromList $ qnameToList x' createModule (Just IsData) m bindModule p x m -- make it a proper module cons <- toAbstract (map (ConstrDecl NoRec m a p) cons) printScope "data" 20 $ "Checked data " ++ prettyShow x f <- getConcreteFixity x return [ A.DataDef (mkDefInfo x f PublicAccess a r) x' uc (DataDefParams gvars pars) cons ] where conName (C.Axiom _ _ _ _ _ c _) = return c conName d = errorNotConstrDecl d -- Record definitions (mucho interesting) C.NiceRecDef r o a _ uc x ind eta cm pars fields -> do reportSLn "scope.rec.def" 20 ("checking " ++ show o ++ " RecDef for " ++ prettyShow x) (p, ax) <- resolveName (C.QName x) >>= \case DefinedName p ax -> do livesInCurrentModule ax -- Andreas, 2017-12-04, issue #2862 return (p, ax) _ -> genericError $ "Missing type signature for record definition " ++ prettyShow x ensureNoLetStms pars withLocalVars $ do gvars <- bindGeneralizablesIfInserted o ax -- Check that the generated module doesn't clash with a previously -- defined module checkForModuleClash x pars <- toAbstract pars let x' = anameName ax -- We scope check the fields a first time when putting together -- the type of the constructor. contel <- localToAbstract (RecordConstructorType fields) return m0 <- getCurrentModule let m = A.qualifyM m0 $ mnameFromList [ last $ qnameToList x' ] printScope "rec" 15 "before record" createModule (Just IsRecord) m -- We scope check the fields a second time, as actual fields. afields <- withCurrentModule m $ do afields <- toAbstract fields printScope "rec" 15 "checked fields" return afields -- Andreas, 2017-07-13 issue #2642 disallow duplicate fields -- Check for duplicate fields. (See "Check for duplicate constructors") do let fs = forMaybe fields $ \case C.Field _ f _ -> Just f _ -> Nothing let dups = nub $ fs \\ nub fs bad = filter (`elem` dups) fs unless (distinct fs) $ setCurrentRange bad $ typeError $ DuplicateFields dups bindModule p x m cm' <- mapM (\(c, _) -> bindConstructorName m c a p YesRec) cm let inst = caseMaybe cm NotInstanceDef snd printScope "rec" 15 "record complete" f <- getConcreteFixity x let params = DataDefParams gvars pars return [ A.RecDef (mkDefInfoInstance x f PublicAccess a inst NotMacroDef r) x' uc ind eta cm' params contel afields ] NiceModule r p a x@(C.QName name) tel ds -> do reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checking NiceModule " ++ prettyShow x ] adecls <- traceCall (ScopeCheckDeclaration $ NiceModule r p a x tel []) $ do scopeCheckNiceModule r p name tel $ toAbstract ds reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checked NiceModule " ++ prettyShow x ] ++ map (nest 2 . prettyA) adecls return adecls NiceModule _ _ _ m@C.Qual{} _ _ -> genericError $ "Local modules cannot have qualified names" NiceModuleMacro r p x modapp open dir -> do reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checking NiceModuleMacro " ++ prettyShow x ] adecls <- checkModuleMacro Apply TopOpenModule r p x modapp open dir reportSDoc "scope.decl" 70 $ vcat $ [ text $ "scope checked NiceModuleMacro " ++ prettyShow x ] ++ map (nest 2 . prettyA) adecls return adecls NiceOpen r x dir -> do (minfo, m, adir) <- checkOpen r x dir return [A.Open minfo m adir] NicePragma r p -> do ps <- toAbstract p return $ map (A.Pragma r) ps NiceImport r x as open dir -> setCurrentRange r $ do notPublicWithoutOpen open dir -- Andreas, 2018-11-03, issue #3364, parse expression in as-clause as Name. let illformedAs s = traceCall (SetRange $ getRange as) $ do -- If @as@ is followed by something that is not a simple name, -- throw a warning and discard the as-clause. Nothing <$ warning (IllformedAsClause s) as <- case as of -- Ok if no as-clause or it (already) contains a Name. Nothing -> return Nothing Just (AsName (Right asName) r) -> return $ Just $ AsName asName r Just (AsName (Left (C.Ident (C.QName asName))) r) -> return $ Just $ AsName asName r Just (AsName (Left (C.Ident C.Qual{})) r) -> illformedAs "; a qualified name is not allowed here" Just (AsName (Left C.Underscore{}) r) -> illformedAs "; an underscore is not allowed here" Just (AsName (Left e) r) -> illformedAs "" -- First scope check the imported module and return its name and -- interface. This is done with that module as the top-level module. -- This is quite subtle. We rely on the fact that when setting the -- top-level module and generating a fresh module name, the generated -- name will be exactly the same as the name generated when checking -- the imported module. (m, i) <- withCurrentModule noModuleName $ withTopLevelModule x $ do m <- toAbstract $ NewModuleQName x printScope "import" 10 "before import:" (m, i) <- scopeCheckImport m printScope "import" 10 $ "scope checked import: " ++ show i -- We don't want the top scope of the imported module (things happening -- before the module declaration) return (m, Map.delete noModuleName i) -- Merge the imported scopes with the current scopes modifyScopes $ \ ms -> Map.unionWith mergeScope (Map.delete m ms) i -- Bind the desired module name to the right abstract name. case as of Nothing -> bindQModule (PrivateAccess Inserted) x m Just y -> bindModule (PrivateAccess Inserted) (asName y) m printScope "import" 10 "merged imported sig:" -- Open if specified, otherwise apply import directives let (name, theAsSymbol, theAsName) = case as of Nothing -> (x, noRange, Nothing) Just a -> (C.QName (asName a), asRange a, Just (asName a)) adir <- case open of DoOpen -> do (_minfo, _m, adir) <- checkOpen r name dir return adir -- If not opening, import directives are applied to the original scope. DontOpen -> modifyNamedScopeM m $ applyImportDirectiveM x dir let minfo = ModuleInfo { minfoRange = r , minfoAsName = theAsName , minfoAsTo = getRange (theAsSymbol, renamingRange dir) , minfoOpenShort = Just open , minfoDirective = Just dir } return [ A.Import minfo m adir ] NiceUnquoteDecl r p a i tc xs e -> do fxs <- mapM getConcreteFixity xs ys <- zipWithM freshAbstractQName fxs xs zipWithM_ (bindName p QuotableName) xs ys e <- toAbstract e zipWithM_ (rebindName p DefName) xs ys let mi = MutualInfo tc True r return [ A.Mutual mi [A.UnquoteDecl mi [ mkDefInfoInstance x fx p a i NotMacroDef r | (fx, x) <- zip fxs xs ] ys e] ] NiceUnquoteDef r p a tc xs e -> do fxs <- mapM getConcreteFixity xs ys <- mapM (toAbstract . OldName) xs zipWithM_ (rebindName p QuotableName) xs ys e <- toAbstract e zipWithM_ (rebindName p DefName) xs ys return [ A.UnquoteDef [ mkDefInfo x fx PublicAccess a r | (fx, x) <- zip fxs xs ] ys e ] NicePatternSyn r n as p -> do reportSLn "scope.pat" 10 $ "found nice pattern syn: " ++ prettyShow n (as, p) <- withLocalVars $ do p <- toAbstract =<< parsePatternSyn p checkPatternLinearity p $ \ys -> typeError $ RepeatedVariablesInPattern ys bindVarsToBind let err = "Dot or equality patterns are not allowed in pattern synonyms. Maybe use '_' instead." p <- noDotorEqPattern err p as <- (traverse . mapM) (unVarName <=< resolveName . C.QName) as unlessNull (patternVars p \\ map unArg as) $ \ xs -> do typeError . GenericDocError =<< do "Unbound variables in pattern synonym: " <+> sep (map prettyA xs) return (as, p) y <- freshAbstractQName' n bindName PublicAccess PatternSynName n y -- Expanding pattern synonyms already at definition makes it easier to -- fold them back when printing (issue #2762). ep <- expandPatternSynonyms p modifyPatternSyns (Map.insert y (as, ep)) return [A.PatternSynDef y as p] -- only for highlighting, so use unexpanded version where unVarName (VarName a _) = return a unVarName _ = typeError $ UnusedVariableInPatternSynonym where -- checking postulate or type sig. without checking safe flag toAbstractNiceAxiom funSig isMacro (C.Axiom r p a i info x t) = do t' <- toAbstractCtx TopCtx t f <- getConcreteFixity x mp <- getConcretePolarity x y <- freshAbstractQName f x let kind | isMacro == MacroDef = MacroName | otherwise = DefName bindName p kind x y return [ A.Axiom funSig (mkDefInfoInstance x f p a i isMacro r) info mp y t' ] toAbstractNiceAxiom _ _ _ = __IMPOSSIBLE__ unGeneralized :: A.Expr -> (Set.Set I.QName, A.Expr) unGeneralized (A.Generalized s t) = (s, t) unGeneralized (A.ScopedExpr si e) = A.ScopedExpr si <$> unGeneralized e unGeneralized t = (mempty, t) collectGeneralizables :: ScopeM a -> ScopeM (Set I.QName, a) collectGeneralizables m = bracket_ open close $ do a <- m s <- useTC stGeneralizedVars case s of Nothing -> __IMPOSSIBLE__ Just s -> return (s, a) where open = do gvs <- useTC stGeneralizedVars stGeneralizedVars `setTCLens` Just mempty pure gvs close = (stGeneralizedVars `setTCLens`) createBoundNamesForGeneralizables :: Set I.QName -> ScopeM (Map I.QName I.Name) createBoundNamesForGeneralizables vs = flip Map.traverseWithKey (Map.fromSet (const ()) vs) $ \ q _ -> do let x = nameConcrete $ qnameName q fx = nameFixity $ qnameName q freshAbstractName fx x collectAndBindGeneralizables :: ScopeM a -> ScopeM (Map I.QName I.Name, a) collectAndBindGeneralizables m = do (s, res) <- collectGeneralizables m -- We should bind the named generalizable variables as fresh variables binds <- createBoundNamesForGeneralizables s bindGeneralizables binds return (binds, res) bindGeneralizables :: Map A.QName A.Name -> ScopeM () bindGeneralizables vars = forM_ (Map.toList vars) $ \ (q, y) -> bindVariable LambdaBound (nameConcrete $ qnameName q) y -- | Bind generalizable variables if data or record decl was split by the system -- (origin == Inserted) bindGeneralizablesIfInserted :: Origin -> AbstractName -> ScopeM (Set A.Name) bindGeneralizablesIfInserted Inserted y = bound <$ bindGeneralizables gvars where gvars = case anameMetadata y of GeneralizedVarsMetadata gvars -> gvars NoMetadata -> Map.empty bound = Set.fromList (Map.elems gvars) bindGeneralizablesIfInserted UserWritten _ = return Set.empty bindGeneralizablesIfInserted _ _ = __IMPOSSIBLE__ newtype GenTel = GenTel C.Telescope data GenTelAndType = GenTelAndType C.Telescope C.Expr instance ToAbstract GenTel A.GeneralizeTelescope where toAbstract (GenTel tel) = uncurry A.GeneralizeTel <$> collectAndBindGeneralizables (toAbstract tel) instance ToAbstract GenTelAndType (A.GeneralizeTelescope, A.Expr) where toAbstract (GenTelAndType tel t) = do (binds, (tel, t)) <- collectAndBindGeneralizables $ (,) <$> toAbstract tel <*> toAbstract t return (A.GeneralizeTel binds tel, t) -- | Make sure definition is in same module as signature. class LivesInCurrentModule a where livesInCurrentModule :: a -> ScopeM () instance LivesInCurrentModule AbstractName where livesInCurrentModule = livesInCurrentModule . anameName instance LivesInCurrentModule A.QName where livesInCurrentModule x = do m <- getCurrentModule reportSLn "scope.data.def" 30 $ unlines [ " A.QName of data type: " ++ show x , " current module: " ++ show m ] unless (A.qnameModule x == m) $ genericError $ "Definition in different module than its type signature" data IsRecordCon = YesRec | NoRec data ConstrDecl = ConstrDecl IsRecordCon A.ModuleName IsAbstract Access C.NiceDeclaration bindConstructorName :: ModuleName -> C.Name -> IsAbstract -> Access -> IsRecordCon -> ScopeM A.QName bindConstructorName m x a p record = do f <- getConcreteFixity x -- The abstract name is the qualified one y <- withCurrentModule m $ freshAbstractQName f x -- Bind it twice, once unqualified and once qualified bindName p' ConName x y withCurrentModule m $ bindName p'' ConName x y return y where -- An abstract constructor is private (abstract constructor means -- abstract datatype, so the constructor should not be exported). p' = case a of AbstractDef -> PrivateAccess Inserted _ -> p p'' = case (a, record) of (AbstractDef, _) -> PrivateAccess Inserted (_, YesRec) -> OnlyQualified -- record constructors aren't really in the record module _ -> PublicAccess instance ToAbstract ConstrDecl A.Declaration where toAbstract (ConstrDecl record m a p d) = do case d of C.Axiom r p1 a1 i info x t -> do -- rel==Relevant -- unless (p1 == p) __IMPOSSIBLE__ -- This invariant is currently violated by test/Succeed/Issue282.agda unless (a1 == a) __IMPOSSIBLE__ t' <- toAbstractCtx TopCtx t -- The abstract name is the qualified one -- Bind it twice, once unqualified and once qualified f <- getConcreteFixity x y <- bindConstructorName m x a p record printScope "con" 15 "bound constructor" return $ A.Axiom NoFunSig (mkDefInfoInstance x f p a i NotMacroDef r) info Nothing y t' _ -> errorNotConstrDecl d errorNotConstrDecl :: C.NiceDeclaration -> ScopeM a errorNotConstrDecl d = typeError . GenericDocError $ "Illegal declaration in data type definition " P.$$ P.nest 2 (P.vcat $ map pretty (notSoNiceDeclarations d)) instance ToAbstract C.Pragma [A.Pragma] where toAbstract (C.ImpossiblePragma _) = impossibleTest toAbstract (C.OptionsPragma _ opts) = return [ A.OptionsPragma opts ] toAbstract (C.RewritePragma _ []) = [] <$ warning EmptyRewritePragma toAbstract (C.RewritePragma _ xs) = concat <$> do forM xs $ \ x -> do e <- toAbstract $ OldQName x Nothing case e of A.Def x -> return [ A.RewritePragma x ] A.Proj _ p | Just x <- getUnambiguous p -> return [ A.RewritePragma x ] A.Proj _ x -> genericError $ "REWRITE used on ambiguous name " ++ prettyShow x A.Con c | Just x <- getUnambiguous c -> return [ A.RewritePragma x ] A.Con x -> genericError $ "REWRITE used on ambiguous name " ++ prettyShow x A.Var x -> genericError $ "REWRITE used on parameter " ++ prettyShow x ++ " instead of on a defined symbol" _ -> __IMPOSSIBLE__ toAbstract (C.ForeignPragma _ b s) = [] <$ addForeignCode b s toAbstract (C.CompilePragma _ b x s) = do e <- toAbstract $ OldQName x Nothing let err what = genericError $ "Cannot COMPILE " ++ what ++ " " ++ prettyShow x y <- case e of A.Def x -> return x A.Proj _ p | Just x <- getUnambiguous p -> return x A.Proj _ x -> err "ambiguous projection" A.Con c | Just x <- getUnambiguous c -> return x A.Con x -> err "ambiguous constructor" A.PatternSyn{} -> err "pattern synonym" A.Var{} -> err "local variable" _ -> __IMPOSSIBLE__ return [ A.CompilePragma b y s ] toAbstract (C.StaticPragma _ x) = do e <- toAbstract $ OldQName x Nothing y <- case e of A.Def x -> return x A.Proj _ p | Just x <- getUnambiguous p -> return x A.Proj _ x -> genericError $ "STATIC used on ambiguous name " ++ prettyShow x _ -> genericError "Target of STATIC pragma should be a function" return [ A.StaticPragma y ] toAbstract (C.InjectivePragma _ x) = do e <- toAbstract $ OldQName x Nothing y <- case e of A.Def x -> return x A.Proj _ p | Just x <- getUnambiguous p -> return x A.Proj _ x -> genericError $ "INJECTIVE used on ambiguous name " ++ prettyShow x _ -> genericError "Target of INJECTIVE pragma should be a defined symbol" return [ A.InjectivePragma y ] toAbstract (C.InlinePragma _ b x) = do e <- toAbstract $ OldQName x Nothing let sINLINE = if b then "INLINE" else "NOINLINE" y <- case e of A.Def x -> return x A.Proj _ p | Just x <- getUnambiguous p -> return x A.Proj _ x -> genericError $ sINLINE ++ " used on ambiguous name " ++ prettyShow x _ -> genericError $ "Target of " ++ sINLINE ++ " pragma should be a function" return [ A.InlinePragma b y ] toAbstract (C.BuiltinPragma _ b q) | isUntypedBuiltin b = do bindUntypedBuiltin b =<< toAbstract (ResolveQName q) return [] toAbstract (C.BuiltinPragma _ b q) = do -- Andreas, 2015-02-14 -- Some builtins cannot be given a valid Agda type, -- thus, they do not come with accompanying postulate or definition. if b `elem` builtinsNoDef then do case q of C.QName x -> do -- The name shouldn't exist yet. If it does, we raise a warning -- and drop the existing definition. unlessM ((UnknownName ==) <$> resolveName q) $ do genericWarning $ P.text $ "BUILTIN " ++ b ++ " declares an identifier " ++ "(no longer expects an already defined identifier)" modifyCurrentScope $ removeNameFromScope PublicNS x -- We then happily bind the name y <- freshAbstractQName' x kind <- fromMaybe __IMPOSSIBLE__ <$> builtinKindOfName b bindName PublicAccess kind x y return [ A.BuiltinNoDefPragma b y ] _ -> genericError $ "Pragma BUILTIN " ++ b ++ ": expected unqualified identifier, " ++ "but found " ++ prettyShow q else do q <- toAbstract $ ResolveQName q return [ A.BuiltinPragma b q ] toAbstract (C.EtaPragma _ x) = do e <- toAbstract $ OldQName x Nothing case e of A.Def x -> return [ A.EtaPragma x ] _ -> do e <- showA e genericError $ "Pragma ETA: expected identifier, " ++ "but found expression " ++ e toAbstract (C.DisplayPragma _ lhs rhs) = withLocalVars $ do let err = genericError "DISPLAY pragma left-hand side must have form 'f e1 .. en'" getHead (C.IdentP x) = return x getHead (C.RawAppP _ (p : _)) = getHead p getHead _ = err top <- getHead lhs (isPatSyn, hd) <- do qx <- resolveName' allKindsOfNames Nothing top case qx of VarName x' _ -> return . (False,) $ A.qnameFromList [x'] DefinedName _ d -> return . (False,) $ anameName d FieldName (d :! []) -> return . (False,) $ anameName d FieldName ds -> genericError $ "Ambiguous projection " ++ prettyShow top ++ ": " ++ prettyShow (fmap anameName ds) ConstructorName (d :! []) -> return . (False,) $ anameName d ConstructorName ds -> genericError $ "Ambiguous constructor " ++ prettyShow top ++ ": " ++ prettyShow (fmap anameName ds) UnknownName -> notInScope top PatternSynResName (d :! []) -> return . (True,) $ anameName d PatternSynResName ds -> genericError $ "Ambiguous pattern synonym" ++ prettyShow top ++ ": " ++ prettyShow (fmap anameName ds) lhs <- toAbstract $ LeftHandSide top lhs ps <- case lhs of A.LHS _ (A.LHSHead _ ps) -> return ps _ -> err -- Andreas, 2016-08-08, issue #2132 -- Remove pattern synonyms on lhs (hd, ps) <- do let mkP | isPatSyn = A.PatternSynP (PatRange $ getRange lhs) (unambiguous hd) | otherwise = A.DefP (PatRange $ getRange lhs) (unambiguous hd) p <- expandPatternSynonyms $ mkP ps case p of A.DefP _ f ps | Just hd <- getUnambiguous f -> return (hd, ps) A.ConP _ c ps | Just hd <- getUnambiguous c -> return (hd, ps) A.PatternSynP{} -> __IMPOSSIBLE__ _ -> err rhs <- toAbstract rhs return [A.DisplayPragma hd ps rhs] toAbstract (C.WarningOnUsage _ oqn str) = do qn <- toAbstract $ OldName oqn stLocalUserWarnings `modifyTCLens` Map.insert qn str pure [] -- Termination checking pragmes are handled by the nicifier toAbstract C.TerminationCheckPragma{} = __IMPOSSIBLE__ toAbstract C.CatchallPragma{} = __IMPOSSIBLE__ -- No positivity checking pragmas are handled by the nicifier. toAbstract C.NoPositivityCheckPragma{} = __IMPOSSIBLE__ -- Polarity pragmas are handled by the niceifier. toAbstract C.PolarityPragma{} = __IMPOSSIBLE__ -- No universe checking pragmas are handled by the niceifier. toAbstract C.NoUniverseCheckPragma{} = __IMPOSSIBLE__ instance ToAbstract C.Clause A.Clause where toAbstract (C.Clause top catchall lhs@(C.LHS p eqs with) rhs wh wcs) = withLocalVars $ do -- Jesper, 2018-12-10, #3095: pattern variables bound outside the -- module are locally treated as module parameters modifyScope_ $ updateScopeLocals $ map $ second patternToModuleBound -- Andreas, 2012-02-14: need to reset local vars before checking subclauses vars <- getLocalVars let wcs' = for wcs $ \ c -> setLocalVars vars $> c lhs' <- toAbstract $ LeftHandSide (C.QName top) p printLocals 10 "after lhs:" let (whname, whds) = case wh of NoWhere -> (Nothing, []) -- Andreas, 2016-07-17 issues #2081 and #2101 -- where-declarations are automatically private. -- This allows their type signature to be checked InAbstractMode. AnyWhere ds -> (Nothing, [C.Private noRange Inserted ds]) -- Named where-modules do not default to private. SomeWhere m a ds -> (Just (m, a), ds) let isTerminationPragma :: C.Declaration -> Bool isTerminationPragma (C.Private _ _ ds) = any isTerminationPragma ds isTerminationPragma (C.Pragma (TerminationCheckPragma _ _)) = True isTerminationPragma _ = False if not (null eqs) then do rhs <- toAbstract =<< toAbstractCtx TopCtx (RightHandSide eqs with wcs' rhs whds) return $ A.Clause lhs' [] rhs A.noWhereDecls catchall else do -- ASR (16 November 2015) Issue 1137: We ban termination -- pragmas inside `where` clause. when (any isTerminationPragma whds) $ genericError "Termination pragmas are not allowed inside where clauses" -- the right hand side is checked inside the module of the local definitions (rhs, ds) <- whereToAbstract (getRange wh) whname whds $ toAbstractCtx TopCtx (RightHandSide eqs with wcs' rhs []) rhs <- toAbstract rhs -- #2897: we need to restrict named where modules in refined contexts, -- so remember whether it was named here return $ A.Clause lhs' [] rhs ds catchall whereToAbstract :: Range -> Maybe (C.Name, Access) -> [C.Declaration] -> ScopeM a -> ScopeM (a, A.WhereDeclarations) whereToAbstract _ whname [] inner = (, A.noWhereDecls) <$> inner whereToAbstract r whname whds inner = do -- Create a fresh concrete name if there isn't (a proper) one. (m, acc) <- do case whname of Just (m, acc) | not (isNoName m) -> return (m, acc) _ -> fresh <&> \ x -> (C.NoName (getRange whname) x, PrivateAccess Inserted) -- unnamed where's are private let tel = [] old <- getCurrentModule am <- toAbstract (NewModuleName m) (scope, ds) <- scopeCheckModule r (C.QName m) am tel $ toAbstract whds setScope scope x <- inner setCurrentModule old bindModule acc m am -- Issue 848: if the module was anonymous (module _ where) open it public let anonymousSomeWhere = maybe False (isNoName . fst) whname when anonymousSomeWhere $ void $ -- We can ignore the returned default A.ImportDirective. openModule_ TopOpenModule (C.QName m) $ defaultImportDir { publicOpen = True } return (x, A.WhereDecls (am <$ whname) ds) data RightHandSide = RightHandSide { rhsRewriteEqn :: [C.RewriteEqn] -- ^ @rewrite e@ (many) , rhsWithExpr :: [C.WithExpr] -- ^ @with e@ (many) , rhsSubclauses :: [ScopeM C.Clause] -- ^ the subclauses spawned by a with (monadic because we need to reset the local vars before checking these clauses) , rhs :: C.RHS , rhsWhereDecls :: [C.Declaration] } data AbstractRHS = AbsurdRHS' | WithRHS' [A.Expr] [ScopeM C.Clause] -- ^ The with clauses haven't been translated yet | RHS' A.Expr C.Expr | RewriteRHS' [A.Expr] AbstractRHS A.WhereDeclarations qualifyName_ :: A.Name -> ScopeM A.QName qualifyName_ x = do m <- getCurrentModule return $ A.qualify m x withFunctionName :: String -> ScopeM A.QName withFunctionName s = do NameId i _ <- fresh qualifyName_ =<< freshName_ (s ++ show i) instance ToAbstract AbstractRHS A.RHS where toAbstract AbsurdRHS' = return A.AbsurdRHS toAbstract (RHS' e c) = return $ A.RHS e $ Just c toAbstract (RewriteRHS' eqs rhs wh) = do auxs <- replicateM (length eqs) $ withFunctionName "rewrite-" rhs <- toAbstract rhs return $ RewriteRHS (zip auxs eqs) [] rhs wh toAbstract (WithRHS' es cs) = do aux <- withFunctionName "with-" A.WithRHS aux es <$> do toAbstract =<< sequence cs instance ToAbstract RightHandSide AbstractRHS where toAbstract (RightHandSide eqs@(_:_) es cs rhs wh) = do eqs <- toAbstractCtx TopCtx eqs -- TODO: remember named where (rhs, ds) <- whereToAbstract (getRange wh) Nothing wh $ toAbstract (RightHandSide [] es cs rhs []) return $ RewriteRHS' eqs rhs ds toAbstract (RightHandSide [] [] (_ : _) _ _) = __IMPOSSIBLE__ toAbstract (RightHandSide [] (_ : _) _ (C.RHS _) _) = typeError $ BothWithAndRHS toAbstract (RightHandSide [] [] [] rhs []) = toAbstract rhs toAbstract (RightHandSide [] es cs C.AbsurdRHS []) = do es <- toAbstractCtx TopCtx es return $ WithRHS' es cs -- TODO: some of these might be possible toAbstract (RightHandSide [] (_ : _) _ C.AbsurdRHS (_ : _)) = __IMPOSSIBLE__ toAbstract (RightHandSide [] [] [] (C.RHS _) (_ : _)) = __IMPOSSIBLE__ toAbstract (RightHandSide [] [] [] C.AbsurdRHS (_ : _)) = __IMPOSSIBLE__ instance ToAbstract C.RHS AbstractRHS where toAbstract C.AbsurdRHS = return $ AbsurdRHS' toAbstract (C.RHS e) = RHS' <$> toAbstract e <*> pure e data LeftHandSide = LeftHandSide C.QName C.Pattern instance ToAbstract LeftHandSide A.LHS where toAbstract (LeftHandSide top lhs) = traceCall (ScopeCheckLHS top lhs) $ do lhscore <- parseLHS top lhs reportSLn "scope.lhs" 5 $ "parsed lhs: " ++ show lhscore printLocals 10 "before lhs:" -- error if copattern parsed but --no-copatterns option unlessM (optCopatterns <$> pragmaOptions) $ when (hasCopatterns lhscore) $ typeError $ NeedOptionCopatterns -- scope check patterns except for dot patterns lhscore <- toAbstract lhscore bindVarsToBind reportSLn "scope.lhs" 5 $ "parsed lhs patterns: " ++ show lhscore printLocals 10 "checked pattern:" -- scope check dot patterns lhscore <- toAbstract lhscore reportSLn "scope.lhs" 5 $ "parsed lhs dot patterns: " ++ show lhscore printLocals 10 "checked dots:" return $ A.LHS (LHSRange $ getRange lhs) lhscore -- Merges adjacent EqualP patterns into one: typecheking expects only one pattern for each domain in the telescope. mergeEqualPs :: [NamedArg (Pattern' e)] -> [NamedArg (Pattern' e)] mergeEqualPs = go Nothing where go acc (Arg i (Named n (A.EqualP r es)) : ps) = go (fmap (fmap (++es)) acc `mplus` Just ((i,n,r),es)) ps go Nothing [] = [] go Nothing (p : ps) = p : go Nothing ps go (Just ((i,n,r),es)) ps = Arg i (Named n (A.EqualP r es)) : case ps of (p : ps) -> p : go Nothing ps [] -> [] -- does not check pattern linearity instance ToAbstract C.LHSCore (A.LHSCore' C.Expr) where toAbstract (C.LHSHead x ps) = do x <- withLocalVars $ do setLocalVars [] toAbstract (OldName x) A.LHSHead x . mergeEqualPs <$> toAbstract ps toAbstract (C.LHSProj d ps1 l ps2) = do unless (null ps1) $ typeError $ GenericDocError $ "Ill-formed projection pattern" P.<+> P.pretty (foldl C.AppP (C.IdentP d) ps1) qx <- resolveName d ds <- case qx of FieldName ds -> return $ fmap anameName ds UnknownName -> notInScope d _ -> genericError $ "head of copattern needs to be a field identifier, but " ++ prettyShow d ++ " isn't one" A.LHSProj (AmbQ ds) <$> toAbstract l <*> (mergeEqualPs <$> toAbstract ps2) toAbstract (C.LHSWith core wps ps) = do liftA3 A.LHSWith (toAbstract core) (toAbstract wps) (toAbstract ps) instance ToAbstract c a => ToAbstract (WithHiding c) (WithHiding a) where toAbstract (WithHiding h a) = WithHiding h <$> toAbstractHiding h a instance ToAbstract c a => ToAbstract (Arg c) (Arg a) where toAbstract (Arg info e) = Arg info <$> toAbstractHiding info e instance ToAbstract c a => ToAbstract (Named name c) (Named name a) where toAbstract (Named n e) = Named n <$> toAbstract e {- DOES NOT WORK ANYMORE with pattern synonyms instance ToAbstract c a => ToAbstract (A.LHSCore' c) (A.LHSCore' a) where toAbstract = mapM toAbstract -} instance ToAbstract (A.LHSCore' C.Expr) (A.LHSCore' A.Expr) where toAbstract (A.LHSHead f ps) = A.LHSHead f <$> mapM toAbstract ps toAbstract (A.LHSProj d lhscore ps) = A.LHSProj d <$> mapM toAbstract lhscore <*> mapM toAbstract ps toAbstract (A.LHSWith core wps ps) = liftA3 A.LHSWith (toAbstract core) (toAbstract wps) (toAbstract ps) -- Patterns are done in two phases. First everything but the dot patterns, and -- then the dot patterns. This is because dot patterns can refer to variables -- bound anywhere in the pattern. instance ToAbstract (A.Pattern' C.Expr) (A.Pattern' A.Expr) where toAbstract = traverse $ insideDotPattern . toAbstractCtx DotPatternCtx -- Issue #3033 resolvePatternIdentifier :: Range -> C.QName -> Maybe (Set A.Name) -> ScopeM (A.Pattern' C.Expr) resolvePatternIdentifier r x ns = do reportSLn "scope.pat" 60 $ "resolvePatternIdentifier " ++ show x ++ " at source position " ++ show r px <- toAbstract (PatName x ns) case px of VarPatName y -> do reportSLn "scope.pat" 60 $ " resolved to VarPatName " ++ show y ++ " with range " ++ show (getRange y) return $ VarP $ A.BindName y ConPatName ds -> return $ ConP (ConPatInfo ConOCon (PatRange r) ConPatEager) (AmbQ $ fmap anameName ds) [] PatternSynPatName ds -> return $ PatternSynP (PatRange r) (AmbQ $ fmap anameName ds) [] -- | Apply an abstract syntax pattern head to pattern arguments. -- -- Fails with 'InvalidPattern' if head is not a constructor pattern -- (or similar) that can accept arguments. -- applyAPattern :: C.Pattern -- ^ The application pattern in concrete syntax. -> A.Pattern' C.Expr -- ^ Head of application. -> NAPs C.Expr -- ^ Arguments of application. -> ScopeM (A.Pattern' C.Expr) applyAPattern p0 p ps = do setRange (getRange p0) <$> do case p of A.ConP i x as -> return $ A.ConP i x (as ++ ps) A.DefP i x as -> return $ A.DefP i x (as ++ ps) A.PatternSynP i x as -> return $ A.PatternSynP i x (as ++ ps) -- Dotted constructors are turned into "lazy" constructor patterns. A.DotP i (Ident x) -> resolveName x >>= \case ConstructorName ds -> do let cpi = ConPatInfo ConOCon i ConPatLazy c = AmbQ (fmap anameName ds) return $ A.ConP cpi c ps _ -> failure A.DotP{} -> failure A.VarP{} -> failure A.ProjP{} -> failure A.WildP{} -> failure A.AsP{} -> failure A.AbsurdP{} -> failure A.LitP{} -> failure A.RecP{} -> failure A.EqualP{} -> failure A.WithP{} -> failure where failure = typeError $ InvalidPattern p0 instance ToAbstract C.Pattern (A.Pattern' C.Expr) where toAbstract (C.IdentP x) = resolvePatternIdentifier (getRange x) x Nothing toAbstract (AppP (QuoteP _) p) | IdentP x <- namedArg p, visible p = do e <- toAbstract (OldQName x Nothing) let quoted (A.Def x) = return x quoted (A.Macro x) = return x quoted (A.Proj _ p) | Just x <- getUnambiguous p = return x | otherwise = genericError $ "quote: Ambigous name: " ++ prettyShow (unAmbQ p) quoted (A.Con c) | Just x <- getUnambiguous c = return x | otherwise = genericError $ "quote: Ambigous name: " ++ prettyShow (unAmbQ c) quoted (A.ScopedExpr _ e) = quoted e quoted _ = genericError $ "quote: not a defined name" A.LitP . LitQName (getRange x) <$> quoted e toAbstract (QuoteP r) = genericError "quote must be applied to an identifier" toAbstract p0@(AppP p q) = do reportSLn "scope.pat" 50 $ "distributeDots before = " ++ show p p <- distributeDots p reportSLn "scope.pat" 50 $ "distributeDots after = " ++ show p (p', q') <- toAbstract (p, q) applyAPattern p0 p' [q'] where distributeDots :: C.Pattern -> ScopeM C.Pattern distributeDots p@(C.DotP r e) = distributeDotsExpr r e distributeDots p = return p distributeDotsExpr :: Range -> C.Expr -> ScopeM C.Pattern distributeDotsExpr r e = parseRawApp e >>= \case C.App r e a -> AppP <$> distributeDotsExpr r e <*> (traverse . traverse) (distributeDotsExpr r) a OpApp r q ns as -> case (traverse . traverse . traverse) fromNoPlaceholder as of Just as -> OpAppP r q ns <$> (traverse . traverse . traverse) (distributeDotsExpr r) as Nothing -> return $ C.DotP r e Paren r e -> ParenP r <$> distributeDotsExpr r e _ -> return $ C.DotP r e fromNoPlaceholder :: MaybePlaceholder (OpApp a) -> Maybe a fromNoPlaceholder (NoPlaceholder _ (Ordinary e)) = Just e fromNoPlaceholder _ = Nothing parseRawApp :: C.Expr -> ScopeM C.Expr parseRawApp (RawApp r es) = parseApplication es parseRawApp e = return e toAbstract p0@(OpAppP r op ns ps) = do reportSLn "scope.pat" 60 $ "ConcreteToAbstract.toAbstract OpAppP{}: " ++ show p0 p <- resolvePatternIdentifier (getRange op) op (Just ns) ps <- toAbstract ps applyAPattern p0 p ps -- Removed when parsing toAbstract (HiddenP _ _) = __IMPOSSIBLE__ toAbstract (InstanceP _ _) = __IMPOSSIBLE__ toAbstract (RawAppP _ _) = __IMPOSSIBLE__ toAbstract (EllipsisP _) = __IMPOSSIBLE__ toAbstract p@(C.WildP r) = return $ A.WildP (PatRange r) -- Andreas, 2015-05-28 futile attempt to fix issue 819: repeated variable on lhs "_" -- toAbstract p@(C.WildP r) = A.VarP <$> freshName r "_" toAbstract (C.ParenP _ p) = toAbstract p toAbstract (C.LitP l) = return $ A.LitP l toAbstract p0@(C.AsP r x p) = do -- Andreas, 2018-06-30, issue #3147: as-variables can be non-linear a priori! -- x <- toAbstract (NewName PatternBound x) x <- bindPatternVariable x p <- toAbstract p return $ A.AsP (PatRange r) (A.BindName x) p toAbstract p0@(C.EqualP r es) = return $ A.EqualP (PatRange r) es -- We have to do dot patterns at the end since they can -- refer to the variables bound by the other patterns. toAbstract p0@(C.DotP r e) = do let fallback = return $ A.DotP (PatRange r) e case e of C.Ident x -> resolveName x >>= \case -- Andreas, 2018-06-19, #3130 -- We interpret .x as postfix projection if x is a field name in scope FieldName xs -> return $ A.ProjP (PatRange r) ProjPostfix $ AmbQ $ fmap anameName xs _ -> fallback _ -> fallback toAbstract p0@(C.AbsurdP r) = return $ A.AbsurdP (PatRange r) toAbstract (C.RecP r fs) = A.RecP (PatRange r) <$> mapM (traverse toAbstract) fs toAbstract (C.WithP r p) = A.WithP (PatRange r) <$> toAbstract p -- | An argument @OpApp C.Expr@ to an operator can have binders, -- in case the operator is some @syntax@-notation. -- For these binders, we have to create lambda-abstractions. toAbstractOpArg :: Precedence -> OpApp C.Expr -> ScopeM A.Expr toAbstractOpArg ctx (Ordinary e) = toAbstractCtx ctx e toAbstractOpArg ctx (SyntaxBindingLambda r bs e) = toAbstractLam r bs e ctx -- | Turn an operator application into abstract syntax. Make sure to -- record the right precedences for the various arguments. toAbstractOpApp :: C.QName -> Set A.Name -> [NamedArg (MaybePlaceholder (OpApp C.Expr))] -> ScopeM A.Expr toAbstractOpApp op ns es = do -- Replace placeholders with bound variables. (binders, es) <- replacePlaceholders es -- Get the notation for the operator. nota <- getNotation op ns let parts = notation nota -- We can throw away the @BindingHoles@, since binders -- have been preprocessed into @OpApp C.Expr@. let nonBindingParts = filter (not . isBindingHole) parts -- We should be left with as many holes as we have been given args @es@. -- If not, crash. unless (length (filter isAHole nonBindingParts) == length es) __IMPOSSIBLE__ -- Translate operator and its arguments (each in the right context). op <- toAbstract (OldQName op (Just ns)) es <- left (notaFixity nota) nonBindingParts es -- Prepend the generated section binders (if any). let body = foldl' app op es return $ foldr (A.Lam (ExprRange (getRange body))) body binders where -- Build an application in the abstract syntax, with correct Range. app e (pref, arg) = A.App info e arg where info = (defaultAppInfo r) { appOrigin = getOrigin arg , appParens = pref } r = fuseRange e arg inferParenPref :: NamedArg (Either A.Expr (OpApp C.Expr)) -> ParenPreference inferParenPref e = case namedArg e of Right (Ordinary e) -> inferParenPreference e Left{} -> PreferParenless -- variable inserted by section expansion Right{} -> PreferParenless -- syntax lambda -- Translate an argument. Returns the paren preference for the argument, so -- we can build the correct info for the A.App node. toAbsOpArg :: Precedence -> NamedArg (Either A.Expr (OpApp C.Expr)) -> ScopeM (ParenPreference, NamedArg A.Expr) toAbsOpArg cxt e = (pref,) <$> (traverse . traverse) (either return (toAbstractOpArg cxt)) e where pref = inferParenPref e -- The hole left to the first @IdPart@ is filled with an expression in @LeftOperandCtx@. left f (IdPart _ : xs) es = inside f xs es left f (_ : xs) (e : es) = do e <- toAbsOpArg (LeftOperandCtx f) e es <- inside f xs es return (e : es) left f (_ : _) [] = __IMPOSSIBLE__ left f [] _ = __IMPOSSIBLE__ -- The holes in between the @IdPart@s is filled with an expression in @InsideOperandCtx@. inside f [x] es = right f x es inside f (IdPart _ : xs) es = inside f xs es inside f (_ : xs) (e : es) = do e <- toAbsOpArg InsideOperandCtx e es <- inside f xs es return (e : es) inside _ (_ : _) [] = __IMPOSSIBLE__ inside _ [] _ = __IMPOSSIBLE__ -- The hole right of the last @IdPart@ is filled with an expression in @RightOperandCtx@. right _ (IdPart _) [] = return [] right f _ [e] = do let pref = inferParenPref e e <- toAbsOpArg (RightOperandCtx f pref) e return [e] right _ _ _ = __IMPOSSIBLE__ replacePlaceholders :: [NamedArg (MaybePlaceholder (OpApp e))] -> ScopeM ([A.LamBinding], [NamedArg (Either A.Expr (OpApp e))]) replacePlaceholders [] = return ([], []) replacePlaceholders (a : as) = case namedArg a of NoPlaceholder _ x -> mapSnd (set (Right x) a :) <$> replacePlaceholders as Placeholder _ -> do x <- freshName noRange "section" let i = setOrigin Inserted $ argInfo a (ls, ns) <- replacePlaceholders as return ( A.DomainFree (unnamedArg i $ A.BindName x) : ls , set (Left (Var x)) a : ns ) where set :: a -> NamedArg b -> NamedArg a set x arg = fmap (fmap (const x)) arg {-------------------------------------------------------------------------- Things we parse but are not part of the Agda file syntax --------------------------------------------------------------------------} -- | Content of interaction hole. instance ToAbstract C.HoleContent A.HoleContent where toAbstract = mapM toAbstract Agda-2.6.0.1/src/full/Agda/Syntax/Translation/InternalToAbstract.hs0000644000000000000000000015403113466402171023160 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE TypeFamilies #-} -- for type equality ~ {-# LANGUAGE UndecidableInstances #-} {-| Translating from internal syntax to abstract syntax. Enables nice pretty printing of internal syntax. TODO - numbers on metas - fake dependent functions to independent functions - meta parameters - shadowing -} module Agda.Syntax.Translation.InternalToAbstract ( Reify(..) , NamedClause(..) , reifyPatterns ) where import Prelude hiding (mapM_, mapM, null) import Control.Arrow ((&&&)) import Control.Monad.State hiding (mapM_, mapM) import Control.Monad.Reader hiding (mapM_, mapM) import Data.Foldable (Foldable, foldMap) import qualified Data.List as List import qualified Data.Map as Map import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup, (<>) ) import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable (Traversable, traverse, mapM) import qualified Data.Traversable as Trav import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Fixity import qualified Agda.Syntax.Concrete.Name as C import Agda.Syntax.Concrete (FieldAssignment'(..), exprFieldA) import Agda.Syntax.Info as Info import Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern import Agda.Syntax.Abstract.Pretty import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern as I import Agda.Syntax.Scope.Base (isNameInScope, inverseScopeLookupName) import Agda.TypeChecking.Monad import Agda.TypeChecking.Monad.Builtin import Agda.TypeChecking.Reduce import {-# SOURCE #-} Agda.TypeChecking.Records import Agda.TypeChecking.CompiledClause (CompiledClauses'(Fail)) import Agda.TypeChecking.DisplayForm import Agda.TypeChecking.Level import {-# SOURCE #-} Agda.TypeChecking.Datatypes import Agda.TypeChecking.Free import Agda.TypeChecking.Substitute import Agda.TypeChecking.Telescope import Agda.TypeChecking.DropArgs import Agda.Interaction.Options ( optPostfixProjections ) import Agda.Utils.Either import Agda.Utils.Except ( MonadError(catchError) ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import Agda.Utils.Permutation import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Singleton import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- Composition of reified applications ------------------------------------ -- | Drops hidden arguments unless --show-implicit. napps :: Expr -> [NamedArg Expr] -> TCM Expr napps e = nelims e . map I.Apply -- | Drops hidden arguments unless --show-implicit. apps :: Expr -> [Arg Expr] -> TCM Expr apps e = elims e . map I.Apply -- Composition of reified eliminations ------------------------------------ -- | Drops hidden arguments unless --show-implicit. nelims :: Expr -> [I.Elim' (Named_ Expr)] -> TCM Expr nelims e [] = return e nelims e (I.IApply x y r : es) = nelims (A.App defaultAppInfo_ e $ defaultArg r) es nelims e (I.Apply arg : es) = do arg <- reify arg -- This replaces the arg by _ if irrelevant dontShowImp <- not <$> showImplicitArguments let hd | notVisible arg && dontShowImp = e | otherwise = A.App defaultAppInfo_ e arg nelims hd es nelims e (I.Proj ProjPrefix d : es) = nelimsProjPrefix e d es nelims e (I.Proj o d : es) | isSelf e = nelims (A.Proj ProjPrefix $ unambiguous d) es | otherwise = nelims (A.App defaultAppInfo_ e (defaultNamedArg $ A.Proj o $ unambiguous d)) es nelimsProjPrefix :: Expr -> QName -> [I.Elim' (Named_ Expr)] -> TCM Expr nelimsProjPrefix e d es = nelims (A.App defaultAppInfo_ (A.Proj ProjPrefix $ unambiguous d) $ defaultNamedArg e) es -- | If we are referencing the record from inside the record definition, we don't insert an -- | A.App isSelf :: Expr -> Bool isSelf = \case A.Var n -> nameIsRecordName n _ -> False -- | Drops hidden arguments unless --show-implicit. elims :: Expr -> [I.Elim' Expr] -> TCM Expr elims e = nelims e . map (fmap unnamed) -- Omitting information --------------------------------------------------- noExprInfo :: ExprInfo noExprInfo = ExprRange noRange -- Conditional reification to omit terms that are not shown -------------- reifyWhenE :: Reify i Expr => Bool -> i -> TCM Expr reifyWhenE True i = reify i reifyWhenE False t = return underscore -- Reification ------------------------------------------------------------ class Reify i a | i -> a where reify :: i -> TCM a -- @reifyWhen False@ should produce an 'underscore'. -- This function serves to reify hidden/irrelevant things. reifyWhen :: Bool -> i -> TCM a reifyWhen _ = reify instance Reify Name Name where reify = return instance Reify Expr Expr where reifyWhen = reifyWhenE reify = return instance Reify MetaId Expr where reifyWhen = reifyWhenE reify x@(MetaId n) = liftTCM $ do b <- asksTC envPrintMetasBare mi <- mvInfo <$> lookupMeta x let mi' = Info.MetaInfo { metaRange = getRange $ miClosRange mi , metaScope = clScope $ miClosRange mi , metaNumber = if b then Nothing else Just x , metaNameSuggestion = if b then "" else miNameSuggestion mi } underscore = return $ A.Underscore mi' -- If we are printing a term that will be pasted into the user -- source, we turn all unsolved (non-interaction) metas into -- interaction points isInteractionMeta x >>= \case Nothing | b -> do ii <- registerInteractionPoint False noRange Nothing connectInteractionPoint ii x return $ A.QuestionMark mi' ii Just ii | b -> underscore Nothing -> underscore Just ii -> return $ A.QuestionMark mi' ii -- Does not print with-applications correctly: -- instance Reify DisplayTerm Expr where -- reifyWhen = reifyWhenE -- reify d = reifyTerm False $ dtermToTerm d instance Reify DisplayTerm Expr where reifyWhen = reifyWhenE reify d = case d of DTerm v -> reifyTerm False v DDot v -> reify v DCon c ci vs -> apps (A.Con (unambiguous (conName c))) =<< reify vs DDef f es -> elims (A.Def f) =<< reify es DWithApp u us es0 -> do (e, es) <- reify (u, us) elims (if null es then e else A.WithApp noExprInfo e es) =<< reify es0 -- | @reifyDisplayForm f vs fallback@ -- tries to rewrite @f vs@ with a display form for @f@. -- If successful, reifies the resulting display term, -- otherwise, does @fallback@. reifyDisplayForm :: QName -> I.Elims -> TCM A.Expr -> TCM A.Expr reifyDisplayForm f es fallback = do ifNotM displayFormsEnabled fallback $ {- else -} do caseMaybeM (liftTCM $ displayForm f es) fallback reify -- | @reifyDisplayFormP@ tries to recursively -- rewrite a lhs with a display form. -- -- Note: we are not necessarily in the empty context upon entry! reifyDisplayFormP :: QName -- ^ LHS head symbol -> A.Patterns -- ^ Patterns to be taken into account to find display form. -> A.Patterns -- ^ Remaining trailing patterns ("with patterns"). -> TCM (QName, A.Patterns) -- ^ New head symbol and new patterns. reifyDisplayFormP f ps wps = do let fallback = return (f, ps ++ wps) ifNotM displayFormsEnabled fallback $ {- else -} do -- Try to rewrite @f 0 1 2 ... |ps|-1@ to a dt. -- Andreas, 2014-06-11 Issue 1177: -- I thought we need to add the placeholders for ps to the context, -- because otherwise displayForm will not raise the display term -- and we will have variable clashes. -- But apparently, it has no influence... -- Ulf, can you add an explanation? md <- liftTCM $ -- addContext (replicate (length ps) "x") $ displayForm f $ zipWith (\ p i -> I.Apply $ p $> I.var i) ps [0..] reportSLn "reify.display" 60 $ "display form of " ++ prettyShow f ++ " " ++ show ps ++ " " ++ show wps ++ ":\n " ++ show md case md of Just d | okDisplayForm d -> do -- In the display term @d@, @var i@ should be a placeholder -- for the @i@th pattern of @ps@. -- Andreas, 2014-06-11: -- Are we sure that @d@ did not use @var i@ otherwise? (f', ps', wps') <- displayLHS ps d reportSDoc "reify.display" 70 $ do doc <- prettyA $ SpineLHS empty f' (ps' ++ wps' ++ wps) return $ vcat [ "rewritten lhs to" , " lhs' = " <+> doc ] reifyDisplayFormP f' ps' (wps' ++ wps) _ -> do reportSLn "reify.display" 70 $ "display form absent or not valid as lhs" fallback where -- Andreas, 2015-05-03: Ulf, please comment on what -- is the idea behind okDisplayForm. -- Ulf, 2016-04-15: okDisplayForm should return True if the display form -- can serve as a valid left-hand side. That means checking that it is a -- defined name applied to valid lhs eliminators (projections or -- applications to constructor patterns). okDisplayForm :: DisplayTerm -> Bool okDisplayForm (DWithApp d ds es) = okDisplayForm d && all okDisplayTerm ds && all okToDropE es -- Andreas, 2016-05-03, issue #1950. -- We might drop trailing hidden trivial (=variable) patterns. okDisplayForm (DTerm (I.Def f vs)) = all okElim vs okDisplayForm (DDef f es) = all okDElim es okDisplayForm DDot{} = False okDisplayForm DCon{} = False okDisplayForm DTerm{} = False okDisplayTerm :: DisplayTerm -> Bool okDisplayTerm (DTerm v) = okTerm v okDisplayTerm DDot{} = True okDisplayTerm DCon{} = True okDisplayTerm DDef{} = False okDisplayTerm _ = False okDElim :: Elim' DisplayTerm -> Bool okDElim (I.IApply x y r) = okDisplayTerm r okDElim (I.Apply v) = okDisplayTerm $ unArg v okDElim I.Proj{} = True okToDropE :: Elim' Term -> Bool okToDropE (I.Apply v) = okToDrop v okToDropE I.Proj{} = False okToDropE (I.IApply x y r) = False okToDrop :: Arg I.Term -> Bool okToDrop arg = notVisible arg && case unArg arg of I.Var _ [] -> True I.DontCare{} -> True -- no matching on irrelevant things. __IMPOSSIBLE__ anyway? I.Level{} -> True -- no matching on levels. __IMPOSSIBLE__ anyway? _ -> False okArg :: Arg I.Term -> Bool okArg = okTerm . unArg okElim :: Elim' I.Term -> Bool okElim (I.IApply x y r) = okTerm r okElim (I.Apply a) = okArg a okElim (I.Proj{}) = True okTerm :: I.Term -> Bool okTerm (I.Var _ []) = True okTerm (I.Con c ci vs) = all okElim vs okTerm (I.Def x []) = isNoName $ qnameToConcrete x -- Handling wildcards in display forms okTerm _ = False -- Flatten a dt into (parentName, parentElims, withArgs). flattenWith :: DisplayTerm -> (QName, [I.Elim' DisplayTerm], [I.Elim' DisplayTerm]) flattenWith (DWithApp d ds1 es2) = let (f, es, ds0) = flattenWith d in (f, es, ds0 ++ map (I.Apply . defaultArg) ds1 ++ map (fmap DTerm) es2) flattenWith (DDef f es) = (f, es, []) -- .^ hacky, but we should only hit this when printing debug info flattenWith (DTerm (I.Def f es)) = (f, map (fmap DTerm) es, []) flattenWith _ = __IMPOSSIBLE__ displayLHS :: A.Patterns -- ^ Patterns to substituted into display term. -> DisplayTerm -- ^ Display term. -> TCM (QName, A.Patterns, A.Patterns) -- ^ New head, patterns, with-patterns. displayLHS ps d = do let (f, vs, es) = flattenWith d ps <- mapM elimToPat vs wps <- mapM (updateNamedArg (A.WithP empty) <.> elimToPat) es return (f, ps, wps) where argToPat :: Arg DisplayTerm -> TCM (NamedArg A.Pattern) argToPat arg = traverse termToPat arg elimToPat :: I.Elim' DisplayTerm -> TCM (NamedArg A.Pattern) elimToPat (I.IApply _ _ r) = argToPat (Arg defaultArgInfo r) elimToPat (I.Apply arg) = argToPat arg elimToPat (I.Proj o d) = return $ defaultNamedArg $ A.ProjP patNoRange o $ unambiguous d -- | Substitute variables in display term by patterns. termToPat :: DisplayTerm -> TCM (Named_ A.Pattern) -- Main action HERE: termToPat (DTerm (I.Var n [])) = return $ unArg $ fromMaybe __IMPOSSIBLE__ $ ps !!! n termToPat (DCon c ci vs) = fmap unnamed <$> tryRecPFromConP =<< do A.ConP (ConPatInfo ci patNoRange ConPatEager) (unambiguous (conName c)) <$> mapM argToPat vs termToPat (DTerm (I.Con c ci vs)) = fmap unnamed <$> tryRecPFromConP =<< do A.ConP (ConPatInfo ci patNoRange ConPatEager) (unambiguous (conName c)) <$> mapM (elimToPat . fmap DTerm) vs termToPat (DTerm (I.Def _ [])) = return $ unnamed $ A.WildP patNoRange termToPat (DDef _ []) = return $ unnamed $ A.WildP patNoRange termToPat (DTerm (I.Lit l)) = return $ unnamed $ A.LitP l termToPat (DDot v) = unnamed . A.DotP patNoRange <$> termToExpr v termToPat v = unnamed . A.DotP patNoRange <$> reify v len = length ps argsToExpr :: I.Args -> TCM [Arg A.Expr] argsToExpr = mapM (traverse termToExpr) -- TODO: restructure this to avoid having to repeat the code for reify termToExpr :: Term -> TCM A.Expr termToExpr v = do reportSLn "reify.display" 60 $ "termToExpr " ++ show v -- After unSpine, a Proj elimination is __IMPOSSIBLE__! case unSpine v of I.Con c ci es -> do let vs = fromMaybe __IMPOSSIBLE__ $ mapM isApplyElim es apps (A.Con (unambiguous (conName c))) =<< argsToExpr vs I.Def f es -> do let vs = fromMaybe __IMPOSSIBLE__ $ mapM isApplyElim es apps (A.Def f) =<< argsToExpr vs I.Var n es -> do let vs = fromMaybe __IMPOSSIBLE__ $ mapM isApplyElim es -- Andreas, 2014-06-11 Issue 1177 -- due to β-normalization in substitution, -- even the pattern variables @n < len@ can be -- applied to some args @vs@. e <- if n < len then return $ A.patternToExpr $ namedArg $ indexWithDefault __IMPOSSIBLE__ ps n else reify (I.var (n - len)) apps e =<< argsToExpr vs _ -> return underscore instance Reify Literal Expr where reifyWhen = reifyWhenE reify l = return (A.Lit l) instance Reify Term Expr where reifyWhen = reifyWhenE reify v = reifyTerm True v reifyPathPConstAsPath :: QName -> Elims -> TCM (QName, Elims) reifyPathPConstAsPath x es@[I.Apply l, I.Apply t, I.Apply lhs, I.Apply rhs] = do reportSLn "reify.def" 100 $ "reifying def path " ++ show (x,es) mpath <- getBuiltinName' builtinPath mpathp <- getBuiltinName' builtinPathP let fallback = return (x,es) case (,) <$> mpath <*> mpathp of Just (path,pathp) | x == pathp -> do let a = case unArg t of I.Lam _ (NoAbs _ b) -> Just b I.Lam _ (Abs _ b) | not $ 0 `freeIn` b -> Just (strengthen __IMPOSSIBLE__ b) _ -> Nothing case a of Just a -> return (path, [I.Apply l, I.Apply (setHiding Hidden $ defaultArg a), I.Apply lhs, I.Apply rhs]) Nothing -> fallback _ -> fallback reifyPathPConstAsPath x es = return (x,es) reifyTerm :: Bool -> Term -> TCM Expr reifyTerm expandAnonDefs0 v0 = do -- Jesper 2018-11-02: If 'PrintMetasBare', drop all meta eliminations. metasBare <- asksTC envPrintMetasBare v <- instantiate v0 >>= \case I.MetaV x _ | metasBare -> return $ I.MetaV x [] v -> return v -- Ulf 2014-07-10: Don't expand anonymous when display forms are disabled -- (i.e. when we don't care about nice printing) expandAnonDefs <- return expandAnonDefs0 `and2M` displayFormsEnabled -- Andreas, 2016-07-21 if --postfix-projections -- then we print system-generated projections as postfix, else prefix. havePfp <- optPostfixProjections <$> pragmaOptions let pred = if havePfp then (== ProjPrefix) else (/= ProjPostfix) case unSpine' pred v of -- Hack to print generalized field projections with nicer names. Should -- only show up in errors. Check the spined form! _ | I.Var n (I.Proj _ p : es) <- v, Just name <- getGeneralizedFieldName p -> do let fakeName = (qnameName p) { nameConcrete = C.Name noRange C.InScope [C.Id name] } -- TODO: infix names!? elims (A.Var fakeName) =<< reify es I.Var n es -> do x <- liftTCM $ nameOfBV n `catchError` \_ -> freshName_ ("@" ++ show n) elims (A.Var x) =<< reify es I.Def x es -> do reportSLn "reify.def" 100 $ "reifying def " ++ prettyShow x (x,es) <- reifyPathPConstAsPath x es reifyDisplayForm x es $ reifyDef expandAnonDefs x es I.Con c ci vs -> do let x = conName c isR <- isGeneratedRecordConstructor x case isR || ci == ConORec of True -> do showImp <- showImplicitArguments let keep (a, v) = showImp || visible a r <- getConstructorData x xs <- getRecordFieldNames r vs <- map unArg <$> reify (fromMaybe __IMPOSSIBLE__ $ allApplyElims vs) return $ A.Rec noExprInfo $ map (Left . uncurry FieldAssignment . mapFst unArg) $ filter keep $ zip xs vs False -> reifyDisplayForm x vs $ do def <- getConstInfo x let Constructor{conPars = np} = theDef def -- if we are the the module that defines constructor x -- then we have to drop at least the n module parameters n <- getDefFreeVars x -- the number of parameters is greater (if the data decl has -- extra parameters) or equal (if not) to n when (n > np) __IMPOSSIBLE__ let h = A.Con (unambiguous x) if null vs then return h else do es <- reify (map (fromMaybe __IMPOSSIBLE__ . isApplyElim) vs) -- Andreas, 2012-04-20: do not reify parameter arguments of constructor -- if the first regular constructor argument is hidden -- we turn it into a named argument, in order to avoid confusion -- with the parameter arguments which can be supplied in abstract syntax -- -- Andreas, 2012-09-17: this does not remove all sources of confusion, -- since parameters could have the same name as regular arguments -- (see for example the parameter {i} to Data.Star.Star, which is also -- the first argument to the cons). -- @data Star {i}{I : Set i} ... where cons : {i : I} ...@ if np == 0 then apps h es else do -- Get name of first argument from type of constructor. -- Here, we need the reducing version of @telView@ -- because target of constructor could be a definition -- expanding into a function type. See test/succeed/NameFirstIfHidden.agda. TelV tel _ <- telView (defType def) let (pars, rest) = splitAt np $ telToList tel case rest of -- Andreas, 2012-09-18 -- If the first regular constructor argument is hidden, -- we keep the parameters to avoid confusion. (Dom {domInfo = info} : _) | notVisible info -> do let us = for (drop n pars) $ \ (Dom {domInfo = ai}) -> -- setRelevance Relevant $ hideOrKeepInstance $ Arg ai underscore apps h $ us ++ es -- Note: unless --show-implicit, @apps@ will drop @us@. -- otherwise, we drop all parameters _ -> apps h es -- I.Lam info b | isAbsurdBody b -> return $ A. AbsurdLam noExprInfo $ getHiding info I.Lam info b -> do (x,e) <- reify b return $ A.Lam exprNoRange (DomainFree $ unnamedArg info $ BindName x) e -- Andreas, 2011-04-07 we do not need relevance information at internal Lambda I.Lit l -> reify l I.Level l -> reify l I.Pi a b -> case b of NoAbs _ b' | visible a -> uncurry (A.Fun $ noExprInfo) <$> reify (a, b') -- Andreas, 2013-11-11 Hidden/Instance I.Pi must be A.Pi -- since (a) the syntax {A} -> B or {{A}} -> B is not legal -- and (b) the name of the binder might matter. -- See issue 951 (a) and 952 (b). | otherwise -> mkPi b =<< reify a b -> mkPi b =<< do ifM (domainFree a (absBody b)) {- then -} (pure $ Arg (domInfo a) underscore) {- else -} (reify a) where mkPi b (Arg info a') = do (x, b) <- reify b return $ A.Pi noExprInfo [TBind noRange [Arg info $ Named (domName a) $ BindName x] a'] b -- We can omit the domain type if it doesn't have any free variables -- and it's mentioned in the target type. domainFree a b = do df <- asksTC envPrintDomainFreePi return $ and [df, freeIn 0 b, closed a] I.Sort s -> reify s I.MetaV x es -> do x' <- reify x es' <- reify es mv <- lookupMeta x (msub1,meta_tel,msub2) <- do local_chkpt <- viewTC eCurrentCheckpoint (chkpt, tel, msub2) <- enterClosure (getMetaInfo mv) $ \ _ -> (,,) <$> viewTC eCurrentCheckpoint <*> getContextTelescope <*> viewTC (eCheckpoints . key local_chkpt) (,,) <$> viewTC (eCheckpoints . key chkpt) <*> pure tel <*> pure msub2 let addNames [] es = map (fmap unnamed) es addNames _ [] = [] addNames xs (I.Proj{} : _) = __IMPOSSIBLE__ addNames xs (I.IApply x y r : es) = -- Needs to be I.Apply so it can have an Origin field. addNames xs (I.Apply (defaultArg r) : es) addNames (x:xs) (I.Apply arg : es) = I.Apply (Named (Just x) <$> (setOrigin Substitution arg)) : addNames xs es p = mvPermutation mv applyPerm p vs = permute (takeP (size vs) p) vs names = map unranged $ p `applyPerm` teleNames meta_tel named_es' = addNames names es' dropIdentitySubs sub_local2G sub_tel2G = let args_G = applySubst sub_tel2G $ p `applyPerm` (teleArgs meta_tel :: [Arg Term]) es_G = sub_local2G `applySubst` es sameVar x (I.Apply y) = isJust xv && xv == deBruijnView (unArg y) where xv = deBruijnView $ unArg x sameVar _ _ = False dropArg = take (size names) $ zipWith sameVar args_G es_G doDrop (b : xs) (e : es) = (if b then id else (e :)) $ doDrop xs es doDrop [] es = es doDrop _ [] = [] in doDrop dropArg $ named_es' simpl_named_es' | Just sub_mtel2local <- msub1 = dropIdentitySubs IdS sub_mtel2local | Just sub_local2mtel <- msub2 = dropIdentitySubs sub_local2mtel IdS | otherwise = named_es' nelims x' simpl_named_es' I.DontCare v -> A.DontCare <$> reifyTerm expandAnonDefs v I.Dummy s -> return $ A.Lit $ LitString noRange s where -- Andreas, 2012-10-20 expand a copy if not in scope -- to improve error messages. -- Don't do this if we have just expanded into a display form, -- otherwise we loop! reifyDef :: Bool -> QName -> I.Elims -> TCM Expr reifyDef True x es = ifM (not . null . inverseScopeLookupName x <$> getScope) (reifyDef' x es) $ do r <- reduceDefCopy x es case r of YesReduction _ v -> do reportSLn "reify.anon" 60 $ unlines [ "reduction on defined ident. in anonymous module" , "x = " ++ prettyShow x , "v = " ++ show v ] reify v NoReduction () -> do reportSLn "reify.anon" 60 $ unlines [ "no reduction on defined ident. in anonymous module" , "x = " ++ prettyShow x , "es = " ++ show es ] reifyDef' x es reifyDef _ x es = reifyDef' x es reifyDef' :: QName -> I.Elims -> TCM Expr reifyDef' x es = do reportSLn "reify.def" 60 $ "reifying call to " ++ prettyShow x -- We should drop this many arguments from the local context. n <- getDefFreeVars x reportSLn "reify.def" 70 $ "freeVars for " ++ prettyShow x ++ " = " ++ show n -- If the definition is not (yet) in the signature, -- we just do the obvious. let fallback _ = elims (A.Def x) =<< reify (drop n es) caseEitherM (getConstInfo' x) fallback $ \ defn -> do let def = theDef defn -- Check if we have an absurd lambda. case def of Function{ funCompiled = Just Fail, funClauses = [cl] } | isAbsurdLambdaName x -> do -- get hiding info from last pattern, which should be () let h = getHiding $ last $ namedClausePats cl n = length (namedClausePats cl) - 1 -- drop all args before the absurd one absLam = A.AbsurdLam exprNoRange h if | n > length es -> do -- We don't have all arguments before the absurd one! let name (I.VarP _ x) = patVarNameToString $ dbPatVarName x name _ = __IMPOSSIBLE__ -- only variables before absurd pattern vars = map (getArgInfo &&& name . namedArg) $ drop (length es) $ init $ namedClausePats cl lam (i, s) = do x <- freshName_ s return $ A.Lam exprNoRange (A.DomainFree $ unnamedArg i $ A.BindName x) foldr ($) absLam <$> mapM lam vars | otherwise -> elims absLam =<< reify (drop n es) -- Otherwise (no absurd lambda): _ -> do -- Andrea(s), 2016-07-06 -- Extended lambdas are not considered to be projection like, -- as they are mutually recursive with their parent. -- Thus we do not have to consider padding them. -- Check whether we have an extended lambda and display forms are on. df <- displayFormsEnabled -- #3004: give up if we have to print a pattern lambda inside its own body! alreadyPrinting <- viewTC ePrintingPatternLambdas extLam <- case def of Function{ funExtLam = Just{}, funProjection = Just{} } -> __IMPOSSIBLE__ Function{ funExtLam = Just (ExtLamInfo m sys) } -> Just . (,sys) . size <$> lookupSection m _ -> return Nothing case extLam of Just (pars, sys) | df, notElem x alreadyPrinting -> locallyTC ePrintingPatternLambdas (x :) $ reifyExtLam x pars sys (defClauses defn) es -- Otherwise (ordinary function call): _ -> do (pad, nes :: [Elim' (Named_ Term)]) <- case def of Function{ funProjection = Just Projection{ projIndex = np } } | np > 0 -> do reportSLn "reify.def" 70 $ " def. is a projection with projIndex = " ++ show np -- This is tricky: -- * getDefFreeVars x tells us how many arguments -- are part of the local context -- * some of those arguments might have been dropped -- due to projection likeness -- * when showImplicits is on we'd like to see the dropped -- projection arguments TelV tel _ <- telViewUpTo np (defType defn) let (as, rest) = splitAt (np - 1) $ telToList tel dom = fromMaybe __IMPOSSIBLE__ $ headMaybe rest -- These are the dropped projection arguments scope <- getScope let underscore = A.Underscore $ Info.emptyMetaInfo { metaScope = scope } let pad = for as $ \ (Dom{domInfo = ai, unDom = (x, _)}) -> Arg ai $ Named (Just $ unranged x) underscore -- Now pad' ++ es' = drop n (pad ++ es) let pad' = drop n pad es' = drop (max 0 (n - size pad)) es -- Andreas, 2012-04-21: get rid of hidden underscores {_} and {{_}} -- Keep non-hidden arguments of the padding. -- -- Andreas, 2016-12-20, issue #2348: -- Let @padTail@ be the list of arguments of the padding -- (*) after the last visible argument of the padding, and -- (*) with the same visibility as the first regular argument. -- If @padTail@ is not empty, we need to -- print the first regular argument with name. -- We further have to print all elements of @padTail@ -- which have the same name and visibility of the -- first regular argument. showImp <- showImplicitArguments -- Get the visible arguments of the padding and the rest -- after the last visible argument. let (padVisNamed, padRest) = filterAndRest visible pad' -- Remove the names from the visible arguments. let padVis = map (fmap (unnamed . namedThing)) padVisNamed -- Keep only the rest with the same visibility of @dom@... let padTail = filter (sameHiding dom) padRest -- ... and even the same name. let padSame = filter ((Just (fst (unDom dom)) ==) . fmap rangedThing . nameOf . unArg) padTail return $ if null padTail || not showImp then (padVis , map (fmap unnamed) es') else (padVis ++ padSame, nameFirstIfHidden dom es') -- If it is not a projection(-like) function, we need no padding. _ -> return ([], map (fmap unnamed) $ drop n es) reportSLn "reify.def" 70 $ unlines [ " pad = " ++ show pad , " nes = " ++ show nes ] let hd0 | isProperProjection def = A.Proj ProjPrefix $ AmbQ $ singleton x | otherwise = A.Def x let hd = List.foldl' (A.App defaultAppInfo_) hd0 pad nelims hd =<< reify nes -- Andreas, 2016-07-06 Issue #2047 -- With parameter refinement, the "parameter" patterns of an extended -- lambda can now be different from variable patterns. If we just drop -- them (plus the associated arguments to the extended lambda), we produce -- something -- * that violates internal invariants. In particular, the permutation -- dbPatPerm from the patterns to the telescope can no longer be -- computed. (And in fact, dropping from the start of the telescope is -- just plainly unsound then.) -- * prints the wrong thing (old fix for #2047) -- What we do now, is more sound, although not entirely satisfying: -- When the "parameter" patterns of an external lambdas are not variable -- patterns, we fall back to printing the internal function created for the -- extended lambda, instead trying to construct the nice syntax. reifyExtLam :: QName -> Int -> Maybe System -> [I.Clause] -> I.Elims -> TCM Expr reifyExtLam x npars msys cls es = do reportSLn "reify.def" 10 $ "reifying extended lambda " ++ prettyShow x reportSLn "reify.def" 50 $ render $ nest 2 $ vcat [ "npars =" <+> pretty npars , "es =" <+> fsep (map (prettyPrec 10) es) , "def =" <+> vcat (map pretty cls) ] -- As extended lambda clauses live in the top level, we add the whole -- section telescope to the number of parameters. let (pares, rest) = splitAt npars es let pars = fromMaybe __IMPOSSIBLE__ $ allApplyElims pares -- Since we applying the clauses to the parameters, -- we do not need to drop their initial "parameter" patterns -- (this is taken care of by @apply@). cls <- caseMaybe msys (mapM (reify . NamedClause x False . (`apply` pars)) cls) (reify . QNamed x . (`apply` pars)) let cx = nameConcrete $ qnameName x dInfo = mkDefInfo cx noFixity' PublicAccess ConcreteDef (getRange x) elims (A.ExtendedLam exprNoRange dInfo x cls) =<< reify rest -- | @nameFirstIfHidden (x:a) ({e} es) = {x = e} es@ nameFirstIfHidden :: Dom (ArgName, t) -> [Elim' a] -> [Elim' (Named_ a)] nameFirstIfHidden dom (I.Apply (Arg info e) : es) | notVisible info = I.Apply (Arg info (Named (Just $ unranged $ fst $ unDom dom) e)) : map (fmap unnamed) es nameFirstIfHidden _ es = map (fmap unnamed) es instance Reify i a => Reify (Named n i) (Named n a) where reify = traverse reify reifyWhen b = traverse (reifyWhen b) -- | Skip reification of implicit and irrelevant args if option is off. instance (Reify i a) => Reify (Arg i) (Arg a) where reify (Arg info i) = Arg info <$> (flip reifyWhen i =<< condition) where condition = (return (argInfoHiding info /= Hidden) `or2M` showImplicitArguments) `and2M` (return (getRelevance info /= Irrelevant) `or2M` showIrrelevantArguments) reifyWhen b i = traverse (reifyWhen b) i -- instance Reify Elim Expr where -- reifyWhen = reifyWhenE -- reify e = case e of -- I.IApply x y r -> appl "iapply" <$> reify (defaultArg r :: Arg Term) -- I.Apply v -> appl "apply" <$> reify v -- I.Proj f -> appl "proj" <$> reify ((defaultArg $ I.Def f []) :: Arg Term) -- where -- appl :: String -> Arg Expr -> Expr -- appl s v = A.App exprInfo (A.Lit (LitString noRange s)) $ fmap unnamed v data NamedClause = NamedClause QName Bool I.Clause -- ^ Also tracks whether module parameters should be dropped from the patterns. -- The Monoid instance for Data.Map doesn't require that the values are a -- monoid. newtype MonoidMap k v = MonoidMap { unMonoidMap :: Map.Map k v } instance (Ord k, Monoid v) => Semigroup (MonoidMap k v) where MonoidMap m1 <> MonoidMap m2 = MonoidMap (Map.unionWith mappend m1 m2) instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where mempty = MonoidMap Map.empty mappend = (<>) -- | Removes implicit arguments that are not needed, that is, that don't bind -- any variables that are actually used and doesn't do pattern matching. -- Doesn't strip any arguments that were written explicitly by the user. stripImplicits :: A.Patterns -> A.Patterns -> TCM A.Patterns stripImplicits params ps = do -- if --show-implicit we don't need the names ifM showImplicitArguments (return $ map (unnamed . namedThing <$>) ps) $ do reportSLn "reify.implicit" 30 $ unlines [ "stripping implicits" , " ps = " ++ show ps ] let ps' = blankDots $ strip ps reportSLn "reify.implicit" 30 $ unlines [ " ps' = " ++ show ps' ] return ps' where -- Replace variables in dot patterns by an underscore _ if they are hidden -- in the pattern. This is slightly nicer than making the implicts explicit. blankDots ps = blank (varsBoundIn $ params ++ ps) ps strip ps = stripArgs True ps where stripArgs _ [] = [] stripArgs fixedPos (a : as) -- A hidden non-UserWritten variable is removed if not needed for -- correct position of the following hidden arguments. | canStrip a = if all canStrip $ takeWhile isUnnamedHidden as then stripArgs False as else goWild -- Other arguments are kept. | otherwise = stripName fixedPos (stripArg a) : stripArgs True as where a' = setNamedArg a $ A.WildP $ Info.PatRange $ getRange a goWild = stripName fixedPos a' : stripArgs True as stripName True = fmap (unnamed . namedThing) stripName False = id -- TODO: vars appearing in EqualPs shouldn't be stripped. canStrip a = and [ notVisible a , getOrigin a `notElem` [ UserWritten , CaseSplit ] , varOrDot (namedArg a) ] isUnnamedHidden x = notVisible x && nameOf (unArg x) == Nothing && isNothing (isProjP x) stripArg a = fmap (fmap stripPat) a stripPat p = case p of A.VarP _ -> p A.ConP i c ps -> A.ConP i c $ stripArgs True ps A.ProjP{} -> p A.DefP _ _ _ -> p A.DotP _ e -> p A.WildP _ -> p A.AbsurdP _ -> p A.LitP _ -> p A.AsP i x p -> A.AsP i x $ stripPat p A.PatternSynP _ _ _ -> __IMPOSSIBLE__ -- p A.RecP i fs -> A.RecP i $ map (fmap stripPat) fs -- TODO Andreas: is this right? A.EqualP{} -> p -- EqualP cannot be blanked. A.WithP i p -> A.WithP i $ stripPat p -- TODO #2822: right? varOrDot A.VarP{} = True varOrDot A.WildP{} = True varOrDot A.DotP{} = True varOrDot (A.ConP cpi _ ps) | patOrigin cpi == ConOSystem = all varOrDot $ map namedArg ps varOrDot _ = False -- | @blank bound e@ replaces all variables in expression @e@ that are not in @bound@ by -- an underscore @_@. It is used for printing dot patterns: we don't want to -- make implicit variables explicit, so we blank them out in the dot patterns -- instead (this is fine since dot patterns can be inferred anyway). class BlankVars a where blank :: Set Name -> a -> a default blank :: (Functor f, BlankVars b, f b ~ a) => Set Name -> a -> a blank = fmap . blank instance BlankVars a => BlankVars (Arg a) where instance BlankVars a => BlankVars (Named s a) where instance BlankVars a => BlankVars [a] where -- instance BlankVars a => BlankVars (A.Pattern' a) where -- see case EqualP ! instance BlankVars a => BlankVars (FieldAssignment' a) where instance (BlankVars a, BlankVars b) => BlankVars (a, b) where blank bound (x, y) = (blank bound x, blank bound y) instance (BlankVars a, BlankVars b) => BlankVars (Either a b) where blank bound (Left x) = Left $ blank bound x blank bound (Right y) = Right $ blank bound y instance BlankVars A.ProblemEq where blank bound = id instance BlankVars A.Clause where blank bound (A.Clause lhs strippedPats rhs (A.WhereDecls _ []) ca) = let bound' = varsBoundIn lhs `Set.union` bound in A.Clause (blank bound' lhs) (blank bound' strippedPats) (blank bound' rhs) noWhereDecls ca blank bound (A.Clause lhs strippedPats rhs _ ca) = __IMPOSSIBLE__ instance BlankVars A.LHS where blank bound (A.LHS i core) = A.LHS i $ blank bound core instance BlankVars A.LHSCore where blank bound (A.LHSHead f ps) = A.LHSHead f $ blank bound ps blank bound (A.LHSProj p b ps) = uncurry (A.LHSProj p) $ blank bound (b, ps) blank bound (A.LHSWith h wps ps) = uncurry (uncurry A.LHSWith) $ blank bound ((h, wps), ps) instance BlankVars A.Pattern where blank bound p = case p of A.VarP _ -> p -- do not blank pattern vars A.ConP c i ps -> A.ConP c i $ blank bound ps A.ProjP{} -> p A.DefP i f ps -> A.DefP i f $ blank bound ps A.DotP i e -> A.DotP i $ blank bound e A.WildP _ -> p A.AbsurdP _ -> p A.LitP _ -> p A.AsP i n p -> A.AsP i n $ blank bound p A.PatternSynP _ _ _ -> __IMPOSSIBLE__ A.RecP i fs -> A.RecP i $ blank bound fs A.EqualP{} -> p A.WithP i p -> A.WithP i (blank bound p) instance BlankVars A.Expr where blank bound e = case e of A.ScopedExpr i e -> A.ScopedExpr i $ blank bound e A.Var x -> if x `Set.member` bound then e else A.Underscore emptyMetaInfo -- Here is the action! A.Def _ -> e A.Proj{} -> e A.Con _ -> e A.Lit _ -> e A.QuestionMark{} -> e A.Underscore _ -> e A.Dot i e -> A.Dot i $ blank bound e A.App i e1 e2 -> uncurry (A.App i) $ blank bound (e1, e2) A.WithApp i e es -> uncurry (A.WithApp i) $ blank bound (e, es) A.Lam i b e -> let bound' = varsBoundIn b `Set.union` bound in A.Lam i (blank bound b) (blank bound' e) A.AbsurdLam _ _ -> e A.ExtendedLam i d f cs -> A.ExtendedLam i d f $ blank bound cs A.Pi i tel e -> let bound' = varsBoundIn tel `Set.union` bound in uncurry (A.Pi i) $ blank bound' (tel, e) A.Generalized {} -> __IMPOSSIBLE__ A.Fun i a b -> uncurry (A.Fun i) $ blank bound (a, b) A.Set _ _ -> e A.Prop _ _ -> e A.Let _ _ _ -> __IMPOSSIBLE__ A.Rec i es -> A.Rec i $ blank bound es A.RecUpdate i e es -> uncurry (A.RecUpdate i) $ blank bound (e, es) A.ETel _ -> __IMPOSSIBLE__ A.QuoteGoal {} -> __IMPOSSIBLE__ A.QuoteContext {} -> __IMPOSSIBLE__ A.Quote {} -> __IMPOSSIBLE__ A.QuoteTerm {} -> __IMPOSSIBLE__ A.Unquote {} -> __IMPOSSIBLE__ A.Tactic {} -> __IMPOSSIBLE__ A.DontCare v -> A.DontCare $ blank bound v A.PatternSyn {} -> e A.Macro {} -> e instance BlankVars A.ModuleName where blank bound = id instance BlankVars RHS where blank bound (RHS e mc) = RHS (blank bound e) mc blank bound AbsurdRHS = AbsurdRHS blank bound (WithRHS _ es clauses) = __IMPOSSIBLE__ -- NZ blank bound (RewriteRHS xes spats rhs _) = __IMPOSSIBLE__ -- NZ instance BlankVars A.LamBinding where blank bound b@A.DomainFree{} = b blank bound (A.DomainFull bs) = A.DomainFull $ blank bound bs instance BlankVars TypedBinding where blank bound (TBind r n e) = TBind r n $ blank bound e blank bound (TLet _ _) = __IMPOSSIBLE__ -- Since the internal syntax has no let bindings left -- | Collect the binders in some abstract syntax lhs. class Binder a where varsBoundIn :: a -> Set Name default varsBoundIn :: (Foldable f, Binder b, f b ~ a) => a -> Set Name varsBoundIn = foldMap varsBoundIn instance Binder A.LHS where varsBoundIn (A.LHS _ core) = varsBoundIn core instance Binder A.LHSCore where varsBoundIn (A.LHSHead _ ps) = varsBoundIn ps varsBoundIn (A.LHSProj _ b ps) = varsBoundIn (b, ps) varsBoundIn (A.LHSWith h wps ps) = varsBoundIn ((h, wps), ps) instance Binder A.Pattern where varsBoundIn = foldAPattern $ \case A.VarP x -> varsBoundIn x A.AsP _ x _ -> empty -- Not x because of #2414 (?) A.ConP _ _ _ -> empty A.ProjP{} -> empty A.DefP _ _ _ -> empty A.WildP{} -> empty A.DotP{} -> empty A.AbsurdP{} -> empty A.LitP{} -> empty A.PatternSynP _ _ _ -> empty A.RecP _ _ -> empty A.EqualP{} -> empty A.WithP _ _ -> empty instance Binder A.LamBinding where varsBoundIn (A.DomainFree x) = varsBoundIn x varsBoundIn (A.DomainFull b) = varsBoundIn b instance Binder TypedBinding where varsBoundIn (TBind _ xs _) = varsBoundIn xs varsBoundIn (TLet _ bs) = varsBoundIn bs instance Binder BindName where varsBoundIn x = singleton (unBind x) instance Binder LetBinding where varsBoundIn (LetBind _ _ x _ _) = varsBoundIn x varsBoundIn (LetPatBind _ p _) = varsBoundIn p varsBoundIn LetApply{} = empty varsBoundIn LetOpen{} = empty varsBoundIn LetDeclaredVariable{} = empty instance Binder a => Binder (FieldAssignment' a) where instance Binder a => Binder (Arg a) where instance Binder a => Binder (Named x a) where instance Binder a => Binder [a] where instance (Binder a, Binder b) => Binder (a, b) where varsBoundIn (x, y) = varsBoundIn x `Set.union` varsBoundIn y -- | Assumes that pattern variables have been added to the context already. -- Picks pattern variable names from context. reifyPatterns :: MonadTCM tcm => [NamedArg I.DeBruijnPattern] -> tcm [NamedArg A.Pattern] reifyPatterns = mapM $ (stripNameFromExplicit . stripHidingFromPostfixProj) <.> traverse (traverse reifyPat) where stripNameFromExplicit :: NamedArg p -> NamedArg p stripNameFromExplicit a | visible a = fmap (unnamed . namedThing) a | otherwise = a stripHidingFromPostfixProj :: IsProjP p => NamedArg p -> NamedArg p stripHidingFromPostfixProj a = case isProjP a of Just (o, _) | o /= ProjPrefix -> setHiding NotHidden a _ -> a reifyPat :: MonadTCM tcm => I.DeBruijnPattern -> tcm A.Pattern reifyPat p = do liftTCM $ reportSLn "reify.pat" 80 $ "reifying pattern " ++ show p case p of I.VarP PatODot x -> reifyDotP $ var $ dbPatVarIndex x I.VarP PatOWild _ -> return $ A.WildP patNoRange I.VarP PatOAbsurd _ -> return $ A.AbsurdP patNoRange I.VarP _ x -> reifyVarP x I.DotP PatOWild _ -> return $ A.WildP patNoRange I.DotP PatOAbsurd _ -> return $ A.AbsurdP patNoRange -- If Agda turned a user variable @x@ into @.x@, print it back as @x@. I.DotP (PatOVar x) v@(I.Var i []) -> do x' <- nameOfBV i if nameConcrete x == nameConcrete x' then return $ A.VarP $ BindName x' else reifyDotP v I.DotP o v -> reifyDotP v I.LitP l -> return $ A.LitP l I.ProjP o d -> return $ A.ProjP patNoRange o $ unambiguous d I.ConP c cpi ps -> case conPRecord cpi of Just PatOWild -> return $ A.WildP patNoRange Just PatOAbsurd -> return $ A.AbsurdP patNoRange _ -> reifyConP c cpi ps I.DefP o f ps -> case o of PatOWild -> return $ A.WildP patNoRange PatOAbsurd -> return $ A.AbsurdP patNoRange _ -> A.DefP patNoRange (unambiguous f) <$> reifyPatterns ps I.IApplyP PatODot _ _ x -> reifyDotP $ var $ dbPatVarIndex x I.IApplyP PatOWild _ _ x -> return $ A.WildP patNoRange I.IApplyP PatOAbsurd _ _ x -> return $ A.AbsurdP patNoRange I.IApplyP _ _ _ x -> reifyVarP x reifyVarP :: MonadTCM tcm => DBPatVar -> tcm A.Pattern reifyVarP x = do n <- liftTCM $ nameOfBV $ dbPatVarIndex x case dbPatVarName x of "_" -> return $ A.VarP $ BindName n -- Andreas, 2017-09-03: TODO for #2580 -- Patterns @VarP "()"@ should have been replaced by @AbsurdP@, but the -- case splitter still produces them. y -> if prettyShow (nameConcrete n) == "()" then return $ A.VarP (BindName n) else -- Andreas, 2017-09-03, issue #2729 -- Restore original pattern name. AbstractToConcrete picks unique names. return $ A.VarP $ BindName n { nameConcrete = C.Name noRange C.InScope [ C.Id y ] } reifyDotP :: MonadTCM tcm => Term -> tcm A.Pattern reifyDotP v = do t <- liftTCM $ reify v return $ A.DotP patNoRange t reifyConP :: MonadTCM tcm => ConHead -> ConPatternInfo -> [NamedArg DeBruijnPattern] -> tcm A.Pattern reifyConP c cpi ps = do tryRecPFromConP =<< do A.ConP ci (unambiguous (conName c)) <$> reifyPatterns ps where ci = ConPatInfo origin patNoRange ConPatEager origin = fromConPatternInfo cpi -- | If the record constructor is generated or the user wrote a record pattern, -- turn constructor pattern into record pattern. -- Otherwise, keep constructor pattern. tryRecPFromConP :: MonadTCM tcm => A.Pattern -> tcm A.Pattern tryRecPFromConP p = do let fallback = return p case p of A.ConP ci c ps -> do caseMaybeM (liftTCM $ isRecordConstructor $ headAmbQ c) fallback $ \ (r, def) -> do -- If the record constructor is generated or the user wrote a record pattern, -- print record pattern. -- Otherwise, print constructor pattern. if recNamedCon def && patOrigin ci /= ConORec then fallback else do fs <- liftTCM $ getRecordFieldNames r unless (length fs == length ps) __IMPOSSIBLE__ return $ A.RecP patNoRange $ zipWith mkFA fs ps where mkFA ax nap = FieldAssignment (unArg ax) (namedArg nap) _ -> __IMPOSSIBLE__ instance Reify (QNamed I.Clause) A.Clause where reify (QNamed f cl) = reify (NamedClause f True cl) instance Reify NamedClause A.Clause where reify (NamedClause f toDrop cl) = addContext (clauseTel cl) $ do reportSLn "reify.clause" 60 $ "reifying NamedClause" ++ "\n f = " ++ prettyShow f ++ "\n toDrop = " ++ show toDrop ++ "\n cl = " ++ show cl ps <- reifyPatterns $ namedClausePats cl lhs <- uncurry (SpineLHS empty) <$> reifyDisplayFormP f ps [] -- Unless @toDrop@ we have already dropped the module patterns from the clauses -- (e.g. for extended lambdas). We still get here with toDrop = True and -- pattern lambdas when doing make-case, so take care to drop the right -- number of parameters. (params , lhs) <- if not toDrop then return ([] , lhs) else do nfv <- (size <.> lookupSection =<< getDefModule f) `catchError` \_ -> return 0 return $ splitParams nfv lhs lhs <- stripImps params lhs reportSLn "reify.clause" 60 $ "reifying NamedClause, lhs = " ++ show lhs rhs <- caseMaybe (clauseBody cl) (return AbsurdRHS) $ \ e -> do RHS <$> reify e <*> pure Nothing reportSLn "reify.clause" 60 $ "reifying NamedClause, rhs = " ++ show rhs let result = A.Clause (spineToLhs lhs) [] rhs A.noWhereDecls (I.clauseCatchall cl) reportSLn "reify.clause" 60 $ "reified NamedClause, result = " ++ show result return result where splitParams n (SpineLHS i f ps) = let (params , pats) = splitAt n ps in (params , SpineLHS i f pats) stripImps :: [NamedArg A.Pattern] -> SpineLHS -> TCM SpineLHS stripImps params (SpineLHS i f ps) = SpineLHS i f <$> stripImplicits params ps instance Reify (QNamed System) [A.Clause] where reify (QNamed f (System tel sys)) = addContext tel $ do reportSLn "reify.system" 40 $ unlines $ show tel : map show sys unview <- intervalUnview' forM sys $ \ (alpha,u) -> do rhs <- RHS <$> reify u <*> pure Nothing ep <- fmap (A.EqualP patNoRange) . forM alpha $ \ (phi,b) -> do let d True = unview IOne d False = unview IZero reify (phi, d b) ps <- reifyPatterns $ teleNamedArgs tel ps <- stripImplicits [] $ ps ++ [defaultNamedArg ep] let lhs = SpineLHS (LHSRange noRange) f ps result = A.Clause (spineToLhs lhs) [] rhs A.noWhereDecls False return result instance Reify Type Expr where reifyWhen = reifyWhenE reify (I.El _ t) = reify t instance Reify Sort Expr where reifyWhen = reifyWhenE reify s = do s <- instantiateFull s case s of I.Type (I.Max []) -> return $ A.Set noExprInfo 0 I.Type (I.Max [I.ClosedLevel n]) -> return $ A.Set noExprInfo n I.Type a -> do a <- reify a return $ A.App defaultAppInfo_ (A.Set noExprInfo 0) (defaultNamedArg a) I.Prop (I.Max []) -> return $ A.Prop noExprInfo 0 I.Prop (I.Max [I.ClosedLevel n]) -> return $ A.Prop noExprInfo n I.Prop a -> do a <- reify a return $ A.App defaultAppInfo_ (A.Prop noExprInfo 0) (defaultNamedArg a) I.Inf -> do I.Def inf [] <- primSetOmega return $ A.Def inf I.SizeUniv -> do I.Def sizeU [] <- primSizeUniv return $ A.Def sizeU I.PiSort s1 s2 -> do pis <- freshName_ ("piSort" :: String) -- TODO: hack (e1,e2) <- reify (s1, I.Lam defaultArgInfo $ fmap Sort s2) let app x y = A.App defaultAppInfo_ x (defaultNamedArg y) return $ A.Var pis `app` e1 `app` e2 I.UnivSort s -> do univs <- freshName_ ("univSort" :: String) -- TODO: hack e <- reify s return $ A.App defaultAppInfo_ (A.Var univs) $ defaultNamedArg e I.MetaS x es -> reify $ I.MetaV x es I.DefS d es -> reify $ I.Def d es I.DummyS s -> return $ A.Lit $ LitString noRange s instance Reify Level Expr where reifyWhen = reifyWhenE reify l = ifM haveLevels (reify =<< reallyUnLevelView l) $ {-else-} do -- Andreas, 2017-09-18, issue #2754 -- While type checking the level builtins, they are not -- available for debug printing. Thus, print some garbage instead. A.Var <$> freshName_ (".#Lacking_Level_Builtins#" :: String) instance (Free i, Reify i a) => Reify (Abs i) (Name, a) where reify (NoAbs x v) = (,) <$> freshName_ x <*> reify v reify (Abs s v) = do -- If the bound variable is free in the body, then the name "_" is -- replaced by "z". s <- return $ if isUnderscore s && 0 `freeIn` v then "z" else s x <- freshName_ s e <- addContext x -- type doesn't matter $ reify v return (x,e) instance Reify I.Telescope A.Telescope where reify EmptyTel = return [] reify (ExtendTel arg tel) = do Arg info e <- reify arg (x, bs) <- reify tel let r = getRange e name = domName arg return $ TBind r [Arg info $ Named name $ BindName x] e : bs instance Reify i a => Reify (Dom i) (Arg a) where reify (Dom{domInfo = info, unDom = i}) = Arg info <$> reify i instance Reify i a => Reify (I.Elim' i) (I.Elim' a) where reify = traverse reify reifyWhen b = traverse (reifyWhen b) instance Reify i a => Reify [i] [a] where reify = traverse reify reifyWhen b = traverse (reifyWhen b) instance (Reify i1 a1, Reify i2 a2) => Reify (i1,i2) (a1,a2) where reify (x,y) = (,) <$> reify x <*> reify y instance (Reify i1 a1, Reify i2 a2, Reify i3 a3) => Reify (i1,i2,i3) (a1,a2,a3) where reify (x,y,z) = (,,) <$> reify x <*> reify y <*> reify z instance (Reify i1 a1, Reify i2 a2, Reify i3 a3, Reify i4 a4) => Reify (i1,i2,i3,i4) (a1,a2,a3,a4) where reify (x,y,z,w) = (,,,) <$> reify x <*> reify y <*> reify z <*> reify w Agda-2.6.0.1/src/full/Agda/Syntax/Translation/ReflectedToAbstract.hs0000644000000000000000000001510113466402171023273 0ustar0000000000000000{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fwarn-missing-signatures #-} module Agda.Syntax.Translation.ReflectedToAbstract where import Control.Monad.Reader import Data.Traversable as Trav hiding (mapM) import Agda.Syntax.Fixity import Agda.Syntax.Literal import Agda.Syntax.Position import Agda.Syntax.Info import Agda.Syntax.Common import Agda.Syntax.Abstract as A hiding (Apply) import Agda.Syntax.Abstract.Pattern import Agda.Syntax.Reflected as R import Agda.TypeChecking.Monad as M hiding (MetaInfo) import Agda.Syntax.Scope.Monad (getCurrentModule) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.List import Agda.Utils.Functor import Agda.Utils.Size type Names = [Name] type WithNames a = ReaderT Names TCM a -- Note: we only need the TCM for fresh names -- | Adds a new unique name to the current context. withName :: String -> (Name -> WithNames a) -> WithNames a withName s f = do name <- freshName_ s ctx <- asks $ map nameConcrete let name' = head $ filter (notTaken ctx) $ iterate nextName name local (name:) $ f name' where notTaken xs x = isNoName x || nameConcrete x `notElem` xs -- | Returns the name of the variable with the given de Bruijn index. askName :: Int -> WithNames (Maybe Name) askName i = reader (!!! i) class ToAbstract r a | r -> a where toAbstract :: r -> WithNames a -- | Translate reflected syntax to abstract, using the names from the current typechecking context. toAbstract_ :: ToAbstract r a => r -> TCM a toAbstract_ = withShowAllArguments . toAbstractWithoutImplicit -- | Drop implicit arguments unless --show-implicit is on. toAbstractWithoutImplicit :: ToAbstract r a => r -> TCM a toAbstractWithoutImplicit x = runReaderT (toAbstract x) =<< getContextNames instance ToAbstract r a => ToAbstract (Named name r) (Named name a) where toAbstract = traverse toAbstract instance ToAbstract r a => ToAbstract (Arg r) (NamedArg a) where toAbstract (Arg i x) = Arg i <$> toAbstract (unnamed x) instance ToAbstract [Arg Term] [NamedArg Expr] where toAbstract = traverse toAbstract instance ToAbstract r Expr => ToAbstract (Dom r, Name) (A.TypedBinding) where toAbstract (Dom{domInfo = i,unDom = x}, name) = do dom <- toAbstract x return $ TBind noRange [unnamedArg i $ BindName name] dom instance ToAbstract (Expr, Elim) Expr where toAbstract (f, Apply arg) = do arg <- toAbstract arg showImp <- lift showImplicitArguments return $ if showImp || visible arg then App (setOrigin Reflected defaultAppInfo_) f arg else f instance ToAbstract (Expr, Elims) Expr where toAbstract (f, elims) = foldM (curry toAbstract) f elims instance ToAbstract r a => ToAbstract (R.Abs r) (a, Name) where toAbstract (Abs s x) = withName s' $ \name -> (,) <$> toAbstract x <*> return name where s' = if (isNoName s) then "z" else s -- TODO: only do this when var is free instance ToAbstract Literal Expr where toAbstract l = return (A.Lit l) instance ToAbstract Term Expr where toAbstract t = case t of R.Var i es -> do mname <- askName i case mname of Nothing -> do cxt <- lift $ getContextTelescope names <- asks $ drop (size cxt) . reverse lift $ withShowAllArguments' False $ typeError $ DeBruijnIndexOutOfScope i cxt names Just name -> toAbstract (A.Var name, es) R.Con c es -> toAbstract (A.Con (unambiguous $ killRange c), es) R.Def f es -> do af <- lift $ mkDef (killRange f) toAbstract (af, es) R.Lam h t -> do (e, name) <- toAbstract t let info = setHiding h $ setOrigin Reflected defaultArgInfo return $ A.Lam exprNoRange (DomainFree $ unnamedArg info $ BindName name) e R.ExtLam cs es -> do name <- freshName_ extendedLambdaName m <- lift $ getCurrentModule let qname = qualify m name cname = nameConcrete name defInfo = mkDefInfo cname noFixity' PublicAccess ConcreteDef noRange cs <- toAbstract $ map (QNamed qname) cs toAbstract (A.ExtendedLam exprNoRange defInfo qname cs, es) R.Pi a b -> do (b, name) <- toAbstract b a <- toAbstract (a, name) return $ A.Pi exprNoRange [a] b R.Sort s -> toAbstract s R.Lit l -> toAbstract l R.Meta x es -> toAbstract (A.Underscore info, es) where info = emptyMetaInfo{ metaNumber = Just x } R.Unknown -> return $ Underscore emptyMetaInfo mkDef :: QName -> TCM A.Expr mkDef f = ifM (isMacro . theDef <$> getConstInfo f) (return $ A.Macro f) (return $ A.Def f) mkSet :: Expr -> Expr mkSet e = App (setOrigin Reflected defaultAppInfo_) (A.Set exprNoRange 0) $ defaultNamedArg e instance ToAbstract Sort Expr where toAbstract (SetS x) = mkSet <$> toAbstract x toAbstract (LitS x) = return $ A.Set exprNoRange x toAbstract UnknownS = return $ mkSet $ Underscore emptyMetaInfo instance ToAbstract R.Pattern (Names, A.Pattern) where toAbstract pat = case pat of R.ConP c args -> do (names, args) <- toAbstractPats args return (names, A.ConP (ConPatInfo ConOCon patNoRange ConPatEager) (unambiguous $ killRange c) args) R.DotP -> return ([], A.WildP patNoRange) R.VarP s | isNoName s -> withName "z" $ \ name -> return ([name], A.VarP $ BindName name) -- Ulf, 2016-08-09: Also bind noNames (#2129). This to make the -- behaviour consistent with lambda and pi. -- return ([], A.WildP patNoRange) R.VarP s -> withName s $ \ name -> return ([name], A.VarP $ BindName name) R.LitP l -> return ([], A.LitP l) R.AbsurdP -> return ([], A.AbsurdP patNoRange) R.ProjP d -> return ([], A.ProjP patNoRange ProjSystem $ unambiguous $ killRange d) toAbstractPats :: [Arg R.Pattern] -> WithNames (Names, [NamedArg A.Pattern]) toAbstractPats pats = case pats of [] -> return ([], []) p:ps -> do (names, p) <- (distributeF . fmap distributeF) <$> toAbstract p (namess, ps) <- local (names++) $ toAbstractPats ps return (namess++names, p:ps) instance ToAbstract (QNamed R.Clause) A.Clause where toAbstract (QNamed name (R.Clause pats rhs)) = do (names, pats) <- toAbstractPats pats rhs <- local (names++) $ toAbstract rhs let lhs = spineToLhs $ SpineLHS (LHSRange noRange) name pats return $ A.Clause lhs [] (RHS rhs Nothing) noWhereDecls False toAbstract (QNamed name (R.AbsurdClause pats)) = do (_, pats) <- toAbstractPats pats let lhs = spineToLhs $ SpineLHS (LHSRange noRange) name pats return $ A.Clause lhs [] AbsurdRHS noWhereDecls False instance ToAbstract [QNamed R.Clause] [A.Clause] where toAbstract = traverse toAbstract Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/0000755000000000000000000000000013466402171016321 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Pretty.hs0000644000000000000000000006362713466402171020162 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE CPP #-} {-| Pretty printer for the concrete syntax. -} module Agda.Syntax.Concrete.Pretty where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Data.IORef import Data.Functor import Data.Maybe import qualified Data.Strict.Maybe as Strict import Agda.Syntax.Common import Agda.Syntax.Concrete import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Position import Agda.TypeChecking.Positivity.Occurrence import Agda.Interaction.Options.IORefs (UnicodeOrAscii(..), unicodeOrAscii) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.String #include "undefined.h" import Agda.Utils.Impossible import qualified System.IO.Unsafe as UNSAFE (unsafePerformIO) -- Andreas, 2017-10-02, TODO: restore Show to its original purpose -- deriving instance Show Expr deriving instance (Show a) => Show (OpApp a) deriving instance Show Declaration deriving instance Show Pattern deriving instance Show TypedBinding deriving instance Show LamBinding deriving instance Show ModuleAssignment deriving instance (Show a, Show b) => Show (ImportDirective' a b) deriving instance (Show a, Show b) => Show (Using' a b) deriving instance (Show a, Show b) => Show (Renaming' a b) deriving instance Show Pragma deriving instance Show RHS deriving instance Show LHS deriving instance Show LHSCore deriving instance Show LamClause deriving instance Show WhereClause deriving instance Show ModuleApplication deriving instance Show DoStmt -- instance Show Expr where show = show . pretty -- instance Show Declaration where show = show . pretty -- instance Show Pattern where show = show . pretty -- instance Show TypedBinding where show = show . pretty -- instance Show LamBinding where show = show . pretty -- instance (Pretty a, Pretty b) => Show (ImportDirective' a b) -- where show = show . pretty -- instance Show Pragma where show = show . pretty -- instance Show RHS where show = show . pretty -- instance Show LHS where show = show . pretty -- instance Show LHSCore where show = show . pretty -- instance Show WhereClause where show = show . pretty -- instance Show ModuleApplication where show = show . pretty -- | Picking the appropriate set of special characters depending on -- whether we are allowed to use unicode or have to limit ourselves -- to ascii. data SpecialCharacters = SpecialCharacters { _dbraces :: Doc -> Doc , _lambda :: Doc , _arrow :: Doc , _forallQ :: Doc } {-# NOINLINE specialCharacters #-} specialCharacters :: SpecialCharacters specialCharacters = let opt = UNSAFE.unsafePerformIO (readIORef unicodeOrAscii) in case opt of UnicodeOk -> SpecialCharacters { _dbraces = (("\x2983 " <>) . (<> " \x2984")) , _lambda = "\x03bb" , _arrow = "\x2192" , _forallQ = "\x2200" } AsciiOnly -> SpecialCharacters { _dbraces = braces . braces' , _lambda = "\\" , _arrow = "->" , _forallQ = "forall" } braces' :: Doc -> Doc braces' d = ifNull (render d) (braces d) {-else-} $ \ s -> braces (spaceIfDash (head s) <> d <> spaceIfDash (last s)) -- Add space to avoid starting a comment (Ulf, 2010-09-13, #269) -- Andreas, 2018-07-21, #3161: Also avoid ending a comment where spaceIfDash '-' = " " spaceIfDash _ = empty -- double braces... dbraces :: Doc -> Doc dbraces = _dbraces specialCharacters -- forall quantifier forallQ :: Doc forallQ = _forallQ specialCharacters -- Lays out a list of documents [d₁, d₂, …] in the following way: -- @ -- { d₁ -- ; d₂ -- ⋮ -- } -- @ -- If the list is empty, then the notation @{}@ is used. bracesAndSemicolons :: [Doc] -> Doc bracesAndSemicolons [] = "{}" bracesAndSemicolons (d : ds) = sep (["{" <+> d] ++ map (";" <+>) ds ++ ["}"]) arrow, lambda :: Doc arrow = _arrow specialCharacters lambda = _lambda specialCharacters -- | @prettyHiding info visible doc@ puts the correct braces -- around @doc@ according to info @info@ and returns -- @visible doc@ if the we deal with a visible thing. prettyHiding :: LensHiding a => a -> (Doc -> Doc) -> Doc -> Doc prettyHiding a parens = case getHiding a of Hidden -> braces' Instance{} -> dbraces NotHidden -> parens prettyRelevance :: LensRelevance a => a -> Doc -> Doc prettyRelevance a d = if render d == "_" then d else pretty (getRelevance a) <> d instance (Pretty a, Pretty b) => Pretty (a, b) where pretty (a, b) = parens $ pretty a <> comma <+> pretty b instance Pretty (ThingWithFixity Name) where pretty (ThingWithFixity n _) = pretty n instance Pretty a => Pretty (WithHiding a) where pretty w = prettyHiding w id $ pretty $ dget w instance Pretty Relevance where pretty Relevant = empty pretty Irrelevant = "." pretty NonStrict = ".." instance Pretty (OpApp Expr) where pretty (Ordinary e) = pretty e pretty (SyntaxBindingLambda r bs e) = pretty (Lam r bs e) instance Pretty a => Pretty (MaybePlaceholder a) where pretty Placeholder{} = "_" pretty (NoPlaceholder _ e) = pretty e instance Pretty Expr where pretty e = case e of Ident x -> pretty x Lit l -> pretty l QuestionMark _ n -> "?" <> maybe empty (text . show) n Underscore _ n -> maybe underscore text n -- Underscore _ n -> underscore <> maybe empty (text . show) n App _ _ _ -> case appView e of AppView e1 args -> fsep $ pretty e1 : map pretty args -- sep [ pretty e1 -- , nest 2 $ fsep $ map pretty args -- ] RawApp _ es -> fsep $ map pretty es OpApp _ q _ es -> fsep $ prettyOpApp q es WithApp _ e es -> fsep $ pretty e : map (("|" <+>) . pretty) es HiddenArg _ e -> braces' $ pretty e InstanceArg _ e -> dbraces $ pretty e Lam _ bs (AbsurdLam _ h) -> lambda <+> fsep (map pretty bs) <+> absurd h Lam _ bs e -> sep [ lambda <+> fsep (map pretty bs) <+> arrow , nest 2 $ pretty e ] AbsurdLam _ h -> lambda <+> absurd h ExtendedLam _ pes -> lambda <+> bracesAndSemicolons (map pretty pes) Fun _ e1 e2 -> sep [ pretty e1 <+> arrow , pretty e2 ] Pi tel e -> sep [ pretty (Tel $ smashTel tel) <+> arrow , pretty e ] Set _ -> "Set" Prop _ -> "Prop" SetN _ n -> "Set" <> text (showIndex n) PropN _ n -> "Prop" <> text (showIndex n) Let _ ds me -> sep [ "let" <+> vcat (map pretty ds) , maybe empty (\ e -> "in" <+> pretty e) me ] Paren _ e -> parens $ pretty e IdiomBrackets _ e -> "(|" <+> pretty e <+> "|)" DoBlock _ ss -> "do" <+> vcat (map pretty ss) As _ x e -> pretty x <> "@" <> pretty e Dot _ e -> "." <> pretty e Absurd _ -> "()" Rec _ xs -> sep ["record", bracesAndSemicolons (map pretty xs)] RecUpdate _ e xs -> sep ["record" <+> pretty e, bracesAndSemicolons (map pretty xs)] ETel [] -> "()" ETel tel -> fsep $ map pretty tel QuoteGoal _ x e -> sep ["quoteGoal" <+> pretty x <+> "in", nest 2 $ pretty e] QuoteContext _ -> "quoteContext" Quote _ -> "quote" QuoteTerm _ -> "quoteTerm" Unquote _ -> "unquote" Tactic _ t es -> sep [ "tactic" <+> pretty t , fsep [ "|" <+> pretty e | e <- es ] ] -- Andreas, 2011-10-03 print irrelevant things as .(e) DontCare e -> "." <> parens (pretty e) Equal _ a b -> pretty a <+> "=" <+> pretty b Ellipsis _ -> "..." Generalized e -> pretty e where absurd NotHidden = "()" absurd Instance{} = "{{}}" absurd Hidden = "{}" instance (Pretty a, Pretty b) => Pretty (Either a b) where pretty = either pretty pretty instance Pretty a => Pretty (FieldAssignment' a) where pretty (FieldAssignment x e) = sep [ pretty x <+> "=" , nest 2 $ pretty e ] instance Pretty ModuleAssignment where pretty (ModuleAssignment m es i) = (fsep $ pretty m : map pretty es) <+> pretty i instance Pretty LamClause where pretty (LamClause lhs rhs wh _) = sep [ pretty lhs , nest 2 $ pretty' rhs ] $$ nest 2 (pretty wh) where pretty' (RHS e) = arrow <+> pretty e pretty' AbsurdRHS = empty instance Pretty BoundName where pretty BName{ boundName = x } = pretty x data NamedBinding = NamedBinding { withHiding :: Bool , namedBinding :: NamedArg BoundName } getLabel :: NamedArg a -> Maybe String getLabel = fmap rangedThing . nameOf . unArg isLabeled :: NamedArg BoundName -> Bool isLabeled x | visible x = False -- Ignore labels on visible arguments | Just l <- getLabel x = l /= nameToRawName (boundName $ namedArg x) | otherwise = False instance Pretty NamedBinding where pretty (NamedBinding withH x) = prH $ if | isLabeled x -> text (fromMaybe __IMPOSSIBLE__ $ getLabel x) <+> "=" <+> pretty (namedArg x) | otherwise -> pretty (namedArg x) where prH | withH = prettyRelevance x . prettyHiding x id | otherwise = id instance Pretty LamBinding where pretty (DomainFree x) = pretty (NamedBinding True x) pretty (DomainFull b) = pretty b instance Pretty TypedBinding where pretty (TLet _ ds) = parens $ "let" <+> vcat (map pretty ds) pretty (TBind _ xs (Underscore _ Nothing)) = fsep (map (pretty . NamedBinding True) xs) pretty (TBind _ xs e) = fsep [ prettyRelevance y $ prettyHiding y parens $ sep [ fsep (map (pretty . NamedBinding False) ys) , ":" <+> pretty e ] | ys@(y : _) <- groupBinds xs ] where groupBinds [] = [] groupBinds (x : xs) | isLabeled x = [x] : groupBinds xs | otherwise = (x : ys) : groupBinds zs where (ys, zs) = span (same x) xs same x y = getArgInfo x == getArgInfo y && not (isLabeled y) newtype Tel = Tel Telescope instance Pretty Tel where pretty (Tel tel) | any isMeta tel = forallQ <+> fsep (map pretty tel) | otherwise = fsep (map pretty tel) where isMeta (TBind _ _ (Underscore _ Nothing)) = True isMeta _ = False smashTel :: Telescope -> Telescope smashTel (TBind r xs e : TBind _ ys e' : tel) | show e == show e' = smashTel (TBind r (xs ++ ys) e : tel) smashTel (b : tel) = b : smashTel tel smashTel [] = [] instance Pretty RHS where pretty (RHS e) = "=" <+> pretty e pretty AbsurdRHS = empty instance Pretty WhereClause where pretty NoWhere = empty pretty (AnyWhere [Module _ x [] ds]) | isNoName (unqualify x) = vcat [ "where", nest 2 (vcat $ map pretty ds) ] pretty (AnyWhere ds) = vcat [ "where", nest 2 (vcat $ map pretty ds) ] pretty (SomeWhere m a ds) = vcat [ hsep $ applyWhen (a == PrivateAccess UserWritten) ("private" :) [ "module", pretty m, "where" ] , nest 2 (vcat $ map pretty ds) ] instance Pretty LHS where pretty lhs = case lhs of LHS p eqs es -> pr (pretty p) eqs es where pr d eqs es = sep [ d , nest 2 $ pThing "rewrite" eqs , nest 2 $ pThing "with" es ] pThing thing [] = empty pThing thing (e : es) = fsep $ (text thing <+> pretty e) : map (("|" <+>) . pretty) es instance Pretty LHSCore where pretty (LHSHead f ps) = sep $ pretty f : map (parens . pretty) ps pretty (LHSProj d ps lhscore ps') = sep $ pretty d : map (parens . pretty) ps ++ parens (pretty lhscore) : map (parens . pretty) ps' pretty (LHSWith h wps ps) = if null ps then doc else sep $ parens doc : map (parens . pretty) ps where doc = sep $ pretty h : map (("|" <+>) . pretty) wps instance Pretty ModuleApplication where pretty (SectionApp _ bs e) = fsep (map pretty bs) <+> "=" <+> pretty e pretty (RecordModuleInstance _ rec) = "=" <+> pretty rec <+> "{{...}}" instance Pretty DoStmt where pretty (DoBind _ p e cs) = ((pretty p <+> "←") pretty e) prCs cs where prCs [] = empty prCs cs = "where" vcat (map pretty cs) pretty (DoThen e) = pretty e pretty (DoLet _ ds) = "let" <+> vcat (map pretty ds) instance Pretty Declaration where prettyList = vcat . map pretty pretty d = case d of TypeSig i x e -> sep [ prettyRelevance i $ pretty x <+> ":" , nest 2 $ pretty e ] Field inst x (Arg i e) -> sep [ "field" , nest 2 $ mkInst inst $ mkOverlap i $ prettyRelevance i $ prettyHiding i id $ pretty $ TypeSig (setRelevance Relevant i) x e ] where mkInst InstanceDef d = sep [ "instance", nest 2 d ] mkInst NotInstanceDef d = d mkOverlap i d | isOverlappable i = "overlap" <+> d | otherwise = d FunClause lhs rhs wh _ -> sep [ pretty lhs , nest 2 $ pretty rhs ] $$ nest 2 (pretty wh) DataSig _ ind x tel e -> sep [ hsep [ "data" , pretty x , fcat (map pretty tel) ] , nest 2 $ hsep [ ":" , pretty e ] ] Data _ ind x tel e cs -> sep [ hsep [ "data" , pretty x , fcat (map pretty tel) ] , nest 2 $ hsep [ ":" , pretty e , "where" ] ] $$ nest 2 (vcat $ map pretty cs) DataDef _ ind x tel cs -> sep [ hsep [ "data" , pretty x , fcat (map pretty tel) ] , nest 2 $ "where" ] $$ nest 2 (vcat $ map pretty cs) RecordSig _ x tel e -> sep [ hsep [ "record" , pretty x , fcat (map pretty tel) ] , nest 2 $ hsep [ ":" , pretty e ] ] Record _ x ind eta con tel e cs -> pRecord x ind eta con tel (Just e) cs RecordDef _ x ind eta con tel cs -> pRecord x ind eta con tel Nothing cs Infix f xs -> pretty f <+> (fsep $ punctuate comma $ map pretty xs) Syntax n xs -> "syntax" <+> pretty n <+> "..." PatternSyn _ n as p -> "pattern" <+> pretty n <+> fsep (map pretty as) <+> "=" <+> pretty p Mutual _ ds -> namedBlock "mutual" ds Abstract _ ds -> namedBlock "abstract" ds Private _ _ ds -> namedBlock "private" ds InstanceB _ ds -> namedBlock "instance" ds Macro _ ds -> namedBlock "macro" ds Postulate _ ds -> namedBlock "postulate" ds Primitive _ ds -> namedBlock "primitive" ds Generalize _ ds -> namedBlock "variable" ds Module _ x tel ds -> hsep [ "module" , pretty x , fcat (map pretty tel) , "where" ] $$ nest 2 (vcat $ map pretty ds) ModuleMacro _ x (SectionApp _ [] e) DoOpen i | isNoName x -> sep [ pretty DoOpen , nest 2 $ pretty e , nest 4 $ pretty i ] ModuleMacro _ x (SectionApp _ tel e) open i -> sep [ pretty open <+> "module" <+> pretty x <+> fcat (map pretty tel) , nest 2 $ "=" <+> pretty e <+> pretty i ] ModuleMacro _ x (RecordModuleInstance _ rec) open i -> sep [ pretty open <+> "module" <+> pretty x , nest 2 $ "=" <+> pretty rec <+> "{{...}}" ] Open _ x i -> hsep [ "open", pretty x, pretty i ] Import _ x rn open i -> hsep [ pretty open, "import", pretty x, as rn, pretty i ] where as Nothing = empty as (Just x) = "as" <+> pretty (asName x) UnquoteDecl _ xs t -> sep [ "unquoteDecl" <+> fsep (map pretty xs) <+> "=", nest 2 $ pretty t ] UnquoteDef _ xs t -> sep [ "unquoteDef" <+> fsep (map pretty xs) <+> "=", nest 2 $ pretty t ] Pragma pr -> sep [ "{-#" <+> pretty pr, "#-}" ] where namedBlock s ds = sep [ text s , nest 2 $ vcat $ map pretty ds ] pRecord :: Name -> Maybe (Ranged Induction) -> Maybe HasEta -> Maybe (Name, IsInstance) -> [LamBinding] -> Maybe Expr -> [Declaration] -> Doc pRecord x ind eta con tel me cs = sep [ hsep [ "record" , pretty x , fcat (map pretty tel) ] , nest 2 $ pType me ] $$ nest 2 (vcat $ pInd ++ pEta ++ pCon ++ map pretty cs) where pType (Just e) = hsep [ ":" , pretty e , "where" ] pType Nothing = "where" pInd = maybeToList $ text . show . rangedThing <$> ind pEta = maybeToList $ eta <&> \case YesEta -> "eta-equality" NoEta -> "no-eta-equality" pCon = maybeToList $ ("constructor" <+>) . pretty <$> fst <$> con instance Pretty OpenShortHand where pretty DoOpen = "open" pretty DontOpen = empty instance Pretty Pragma where pretty (OptionsPragma _ opts) = fsep $ map text $ "OPTIONS" : opts pretty (BuiltinPragma _ b x) = hsep [ "BUILTIN", text b, pretty x ] pretty (RewritePragma _ xs) = hsep [ "REWRITE", hsep $ map pretty xs ] pretty (CompilePragma _ b x e) = hsep [ "COMPILE", text b, pretty x, text e ] pretty (ForeignPragma _ b s) = vcat $ text ("FOREIGN " ++ b) : map text (lines s) pretty (StaticPragma _ i) = hsep $ ["STATIC", pretty i] pretty (InjectivePragma _ i) = hsep $ ["INJECTIVE", pretty i] pretty (InlinePragma _ True i) = hsep $ ["INLINE", pretty i] pretty (InlinePragma _ False i) = hsep $ ["NOINLINE", pretty i] pretty (ImpossiblePragma _) = hsep $ ["IMPOSSIBLE"] pretty (EtaPragma _ x) = hsep $ ["ETA", pretty x] pretty (TerminationCheckPragma _ tc) = case tc of TerminationCheck -> __IMPOSSIBLE__ NoTerminationCheck -> "NO_TERMINATION_CHECK" NonTerminating -> "NON_TERMINATING" Terminating -> "TERMINATING" TerminationMeasure _ x -> hsep $ ["MEASURE", pretty x] pretty (WarningOnUsage _ nm str) = hsep [ "WARNING_ON_USAGE", pretty nm, text str ] pretty (CatchallPragma _) = "CATCHALL" pretty (DisplayPragma _ lhs rhs) = "DISPLAY" <+> sep [ pretty lhs <+> "=", nest 2 $ pretty rhs ] pretty (NoPositivityCheckPragma _) = "NO_POSITIVITY_CHECK" pretty (PolarityPragma _ q occs) = hsep ("POLARITY" : pretty q : map pretty occs) pretty (NoUniverseCheckPragma _) = "NO_UNIVERSE_CHECK" instance Pretty Fixity where pretty (Fixity _ Unrelated _) = __IMPOSSIBLE__ pretty (Fixity _ (Related n) ass) = s <+> text (show n) where s = case ass of LeftAssoc -> "infixl" RightAssoc -> "infixr" NonAssoc -> "infix" instance Pretty GenPart where pretty (IdPart x) = text $ rangedThing x pretty BindHole{} = underscore pretty NormalHole{} = underscore pretty WildHole{} = underscore prettyList = hcat . map pretty instance Pretty Fixity' where pretty (Fixity' fix nota _) | nota == noNotation = pretty fix | otherwise = "syntax" <+> pretty nota -- Andreas 2010-09-21: do not print relevance in general, only in function types! -- Andreas 2010-09-24: and in record fields instance Pretty a => Pretty (Arg a) where prettyPrec p (Arg ai e) = prettyHiding ai localParens $ prettyPrec p' e where p' | visible ai = p | otherwise = 0 localParens | getOrigin ai == Substitution = parens | otherwise = id instance Pretty a => Pretty (Dom a) where pretty = pretty . argFromDom instance Pretty e => Pretty (Named_ e) where prettyPrec p (Named Nothing e) = prettyPrec p e prettyPrec p (Named (Just s) e) = mparens (p > 0) $ sep [ text (rawNameToString $ rangedThing s) <+> "=", pretty e ] instance Pretty Pattern where prettyList = fsep . map pretty pretty = \case IdentP x -> pretty x AppP p1 p2 -> sep [ pretty p1, nest 2 $ pretty p2 ] RawAppP _ ps -> fsep $ map pretty ps OpAppP _ q _ ps -> fsep $ prettyOpApp q (fmap (fmap (fmap (NoPlaceholder Strict.Nothing))) ps) HiddenP _ p -> braces' $ pretty p InstanceP _ p -> dbraces $ pretty p ParenP _ p -> parens $ pretty p WildP _ -> underscore AsP _ x p -> pretty x <> "@" <> pretty p DotP _ p -> "." <> pretty p AbsurdP _ -> "()" LitP l -> pretty l QuoteP _ -> "quote" RecP _ fs -> sep [ "record", bracesAndSemicolons (map pretty fs) ] EqualP _ es -> sep $ [ parens (sep [pretty e1, "=", pretty e2]) | (e1,e2) <- es ] EllipsisP _ -> "..." WithP _ p -> "|" <+> pretty p prettyOpApp :: forall a . Pretty a => QName -> [NamedArg (MaybePlaceholder a)] -> [Doc] prettyOpApp q es = merge [] $ prOp ms xs es where -- ms: the module part of the name. ms = init (qnameParts q) -- xs: the concrete name (alternation of @Id@ and @Hole@) xs = case unqualify q of Name _ _ xs -> xs NoName{} -> __IMPOSSIBLE__ prOp :: [Name] -> [NamePart] -> [NamedArg (MaybePlaceholder a)] -> [(Doc, Maybe PositionInName)] prOp ms (Hole : xs) (e : es) = case namedArg e of Placeholder p -> (qual ms $ pretty e, Just p) : prOp [] xs es NoPlaceholder{} -> (pretty e, Nothing) : prOp ms xs es -- Module qualifier needs to go on section holes (#3072) prOp _ (Hole : _) [] = __IMPOSSIBLE__ prOp ms (Id x : xs) es = ( qual ms $ pretty $ Name noRange InScope $ [Id x] , Nothing ) : prOp [] xs es -- Qualify the name part with the module. -- We then clear @ms@ such that the following name parts will not be qualified. prOp _ [] es = map (\e -> (pretty e, Nothing)) es qual ms doc = hcat $ punctuate "." $ map pretty ms ++ [doc] -- Section underscores should be printed without surrounding -- whitespace. This function takes care of that. merge :: [Doc] -> [(Doc, Maybe PositionInName)] -> [Doc] merge before [] = reverse before merge before ((d, Nothing) : after) = merge (d : before) after merge before ((d, Just Beginning) : after) = mergeRight before d after merge before ((d, Just End) : after) = case mergeLeft d before of (d, bs) -> merge (d : bs) after merge before ((d, Just Middle) : after) = case mergeLeft d before of (d, bs) -> mergeRight bs d after mergeRight before d after = reverse before ++ case merge [] after of [] -> [d] a : as -> (d <> a) : as mergeLeft d before = case before of [] -> (d, []) b : bs -> (b <> d, bs) instance (Pretty a, Pretty b) => Pretty (ImportDirective' a b) where pretty i = sep [ public (publicOpen i) , pretty $ using i , prettyHiding $ hiding i , rename $ impRenaming i ] where public True = "public" public False = empty prettyHiding [] = empty prettyHiding xs = "hiding" <+> parens (fsep $ punctuate ";" $ map pretty xs) rename [] = empty rename xs = hsep [ "renaming" , parens $ fsep $ punctuate ";" $ map pr xs ] pr r = hsep [ pretty (renFrom r), "to", pretty (renTo r) ] instance (Pretty a, Pretty b) => Pretty (Using' a b) where pretty UseEverything = empty pretty (Using xs) = "using" <+> parens (fsep $ punctuate ";" $ map pretty xs) instance (Pretty a, Pretty b) => Pretty (ImportedName' a b) where pretty (ImportedName x) = pretty x pretty (ImportedModule x) = "module" <+> pretty x Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Fixity.hs0000644000000000000000000002310513466402171020132 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Collecting fixity declarations (and polarity pragmas) for concrete -- declarations. module Agda.Syntax.Concrete.Fixity ( Fixities, Polarities, MonadFixityError(..) , DoWarn(..) , fixitiesAndPolarities ) where import Prelude hiding (null) import Control.Monad import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Semigroup import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Concrete import Agda.Syntax.Builtin (builtinsNoDef) import Agda.TypeChecking.Positivity.Occurrence (Occurrence) import Agda.Utils.Functor import Agda.Utils.Null import Agda.Utils.Impossible #include "undefined.h" type Fixities = Map Name Fixity' type Polarities = Map Name [Occurrence] class Monad m => MonadFixityError m where throwMultipleFixityDecls :: [(Name, [Fixity'])] -> m a throwMultiplePolarityPragmas :: [Name] -> m a warnUnknownNamesInFixityDecl :: [Name] -> m () warnUnknownNamesInPolarityPragmas :: [Name] -> m () warnUnknownFixityInMixfixDecl :: [Name] -> m () warnPolarityPragmasButNotPostulates :: [Name] -> m () -- | Add more fixities. Throw an exception for multiple fixity declarations. -- OR: Disjoint union of fixity maps. Throws exception if not disjoint. plusFixities :: MonadFixityError m => Fixities -> Fixities -> m Fixities plusFixities m1 m2 -- If maps are not disjoint, report conflicts as exception. | not (null isect) = throwMultipleFixityDecls isect -- Otherwise, do the union. | otherwise = return $ Map.unionWithKey mergeFixites m1 m2 where -- Merge two fixities, assuming there is no conflict mergeFixites name (Fixity' f1 s1 r1) (Fixity' f2 s2 r2) = Fixity' f s $ fuseRange r1 r2 where f | f1 == noFixity = f2 | f2 == noFixity = f1 | otherwise = __IMPOSSIBLE__ s | s1 == noNotation = s2 | s2 == noNotation = s1 | otherwise = __IMPOSSIBLE__ -- Compute a list of conflicts in a format suitable for error reporting. isect = [ (x, map (Map.findWithDefault __IMPOSSIBLE__ x) [m1,m2]) | (x, False) <- Map.assocs $ Map.intersectionWith compatible m1 m2 ] -- Check for no conflict. compatible (Fixity' f1 s1 _) (Fixity' f2 s2 _) = (f1 == noFixity || f2 == noFixity ) && (s1 == noNotation || s2 == noNotation) -- | While 'Fixities' and Polarities are not semigroups under disjoint -- union (which might fail), we get a semigroup instance for the -- monadic @m (Fixities, Polarities)@ which propagates the first -- error. newtype MonadicFixPol m = MonadicFixPol { runMonadicFixPol :: m (Fixities, Polarities) } returnFix :: Monad m => Fixities -> MonadicFixPol m returnFix fx = MonadicFixPol $ return (fx, Map.empty) returnPol :: Monad m => Polarities -> MonadicFixPol m returnPol pol = MonadicFixPol $ return (Map.empty, pol) instance MonadFixityError m => Semigroup (MonadicFixPol m) where c1 <> c2 = MonadicFixPol $ do (f1, p1) <- runMonadicFixPol c1 (f2, p2) <- runMonadicFixPol c2 f <- plusFixities f1 f2 p <- mergePolarities p1 p2 return (f, p) where mergePolarities p1 p2 | Set.null i = return (Map.union p1 p2) | otherwise = throwMultiplePolarityPragmas (Set.toList i) where i = Set.intersection (Map.keysSet p1) (Map.keysSet p2) instance MonadFixityError m => Monoid (MonadicFixPol m) where mempty = MonadicFixPol $ return (Map.empty, Map.empty) mappend = (<>) data DoWarn = NoWarn | DoWarn deriving (Eq, Show) -- | Get the fixities and polarity pragmas from the current block. -- Doesn't go inside modules and where blocks. -- The reason for this is that these declarations have to appear at the same -- level (or possibly outside an abstract or mutual block) as their target -- declaration. fixitiesAndPolarities :: MonadFixityError m => DoWarn -> [Declaration] -> m (Fixities, Polarities) fixitiesAndPolarities doWarn ds = do (fixs, pols) <- runMonadicFixPol $ fixitiesAndPolarities' ds let DeclaredNames declared postulates privateNames = foldMap declaredNames ds let publicNames = declared Set.\\ privateNames -- If we have names in fixity declarations which are not defined in the -- appropriate scope, raise a warning and delete them from fixs. fixs <- ifNull (Map.keysSet fixs Set.\\ declared) (return fixs) $ \ unknownFixs -> do when (doWarn == DoWarn) $ warnUnknownNamesInFixityDecl $ Set.toList unknownFixs -- Note: Data.Map.restrictKeys requires containers >= 0.5.8.2 -- return $ Map.restrictKeys fixs declared return $ Map.filterWithKey (\ k _ -> Set.member k declared) fixs -- Same for undefined names in polarity declarations. pols <- ifNull (Map.keysSet pols Set.\\ declared) (return pols) $ \ unknownPols -> do when (doWarn == DoWarn) $ warnUnknownNamesInPolarityPragmas $ Set.toList unknownPols -- Note: Data.Map.restrictKeys requires containers >= 0.5.8.2 -- return $ Map.restrictKeys polarities declared return $ Map.filterWithKey (\ k _ -> Set.member k declared) pols -- If we have public mixfix identifiers without a corresponding fixity -- declaration, we raise a warning ifNull (Set.filter isOpenMixfix publicNames Set.\\ Map.keysSet fixs) (return ()) $ when (doWarn == DoWarn) . warnUnknownFixityInMixfixDecl . Set.toList -- Check that every polarity pragma is used for a postulate. ifNull (Map.keysSet pols Set.\\ postulates) (return ()) $ when (doWarn == DoWarn) . warnPolarityPragmasButNotPostulates . Set.toList return (fixs, pols) fixitiesAndPolarities' :: MonadFixityError m => [Declaration] -> MonadicFixPol m fixitiesAndPolarities' = foldMap $ \ d -> case d of -- These declarations define polarities: Pragma (PolarityPragma _ x occs) -> returnPol $ Map.singleton x occs -- These declarations define fixities: Syntax x syn -> returnFix $ Map.singleton x (Fixity' noFixity syn $ getRange x) Infix f xs -> returnFix $ Map.fromList $ for xs $ \ x -> (x, Fixity' f noNotation $ getRange x) -- We look into these blocks: Mutual _ ds' -> fixitiesAndPolarities' ds' Abstract _ ds' -> fixitiesAndPolarities' ds' Private _ _ ds' -> fixitiesAndPolarities' ds' InstanceB _ ds' -> fixitiesAndPolarities' ds' Macro _ ds' -> fixitiesAndPolarities' ds' -- All other declarations are ignored. -- We expand these boring cases to trigger a revisit -- in case the @Declaration@ type is extended in the future. TypeSig {} -> mempty Generalize {} -> mempty Field {} -> mempty FunClause {} -> mempty DataSig {} -> mempty DataDef {} -> mempty Data {} -> mempty RecordSig {} -> mempty RecordDef {} -> mempty Record {} -> mempty PatternSyn {} -> mempty Postulate {} -> mempty Primitive {} -> mempty Open {} -> mempty Import {} -> mempty ModuleMacro {} -> mempty Module {} -> mempty UnquoteDecl {} -> mempty UnquoteDef {} -> mempty Pragma {} -> mempty data DeclaredNames = DeclaredNames { allNames, postulates, privateNames :: Set Name } instance Semigroup DeclaredNames where DeclaredNames xs ps as <> DeclaredNames ys qs bs = DeclaredNames (xs <> ys) (ps <> qs) (as <> bs) instance Monoid DeclaredNames where mempty = DeclaredNames Set.empty Set.empty Set.empty mappend = (<>) allPostulates :: DeclaredNames -> DeclaredNames allPostulates (DeclaredNames xs ps as) = DeclaredNames xs (xs <> ps) as allPrivateNames :: DeclaredNames -> DeclaredNames allPrivateNames (DeclaredNames xs ps as) = DeclaredNames xs ps (xs <> as) declaresNames :: [Name] -> DeclaredNames declaresNames xs = DeclaredNames (Set.fromList xs) Set.empty Set.empty declaresName :: Name -> DeclaredNames declaresName x = declaresNames [x] -- | Compute the names defined in a declaration. We stay in the current scope, -- i.e., do not go into modules. declaredNames :: Declaration -> DeclaredNames declaredNames d = case d of TypeSig _ x _ -> declaresName x Field _ x _ -> declaresName x FunClause (LHS p [] []) _ _ _ | IdentP (QName x) <- removeSingletonRawAppP p -> declaresName x FunClause{} -> mempty DataSig _ _ x _ _ -> declaresName x DataDef _ _ _ _ cs -> foldMap declaredNames cs Data _ _ x _ _ cs -> declaresName x <> foldMap declaredNames cs RecordSig _ x _ _ -> declaresName x RecordDef _ x _ _ c _ _ -> declaresNames $ foldMap (:[]) (fst <$> c) Record _ x _ _ c _ _ _ -> declaresNames $ x : foldMap (:[]) (fst <$> c) Infix _ _ -> mempty Syntax _ _ -> mempty PatternSyn _ x _ _ -> declaresName x Mutual _ ds -> foldMap declaredNames ds Abstract _ ds -> foldMap declaredNames ds Private _ _ ds -> allPrivateNames $ foldMap declaredNames ds InstanceB _ ds -> foldMap declaredNames ds Macro _ ds -> foldMap declaredNames ds Postulate _ ds -> allPostulates $ foldMap declaredNames ds Primitive _ ds -> foldMap declaredNames ds Generalize _ ds -> foldMap declaredNames ds Open{} -> mempty Import{} -> mempty ModuleMacro{} -> mempty Module{} -> mempty UnquoteDecl _ xs _ -> declaresNames xs UnquoteDef{} -> mempty -- BUILTIN pragmas which do not require an accompanying definition declare -- the (unqualified) name they mention. Pragma (BuiltinPragma _ b (QName x)) | b `elem` builtinsNoDef -> declaresName x Pragma{} -> mempty Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Operators.hs0000644000000000000000000007634013466402171020645 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-| The parser doesn't know about operators and parses everything as normal function application. This module contains the functions that parses the operators properly. For a stand-alone implementation of this see @src\/prototyping\/mixfix\/old@. It also contains the function that puts parenthesis back given the precedence of the context. -} module Agda.Syntax.Concrete.Operators ( parseApplication , parseModuleApplication , parseLHS , parsePattern , parsePatternSyn ) where import Control.Applicative ( Alternative((<|>)), liftA2 ) import Control.Arrow ((***), (&&&), first, second) import Control.DeepSeq import Control.Monad import Data.Either (partitionEithers) import qualified Data.Foldable as Fold import Data.Function import qualified Data.List as List import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Traversable (traverse) import qualified Data.Traversable as Trav import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Common import Agda.Syntax.Concrete hiding (appView) import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Operators.Parser import Agda.Syntax.Concrete.Operators.Parser.Monad hiding (parse) import Agda.Syntax.Concrete.Pattern import qualified Agda.Syntax.Abstract.Name as A import Agda.Syntax.Position import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Scope.Base import Agda.Syntax.Scope.Monad import Agda.TypeChecking.Monad.Base (typeError, TypeError(..), LHSOrPatSyn(..)) import qualified Agda.TypeChecking.Monad.Benchmark as Bench import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.State (getScope) import Agda.TypeChecking.Monad.Options import Agda.Utils.Either import Agda.Utils.Pretty import Agda.Utils.List import Agda.Utils.Trie (Trie) import qualified Agda.Utils.Trie as Trie #include "undefined.h" import Agda.Utils.Impossible --------------------------------------------------------------------------- -- * Billing --------------------------------------------------------------------------- -- | Bills the operator parser. billToParser :: ExprKind -> ScopeM a -> ScopeM a billToParser k = Bench.billTo [ Bench.Parsing , case k of IsExpr -> Bench.OperatorsExpr IsPattern -> Bench.OperatorsPattern ] --------------------------------------------------------------------------- -- * Building the parser --------------------------------------------------------------------------- type FlatScope = Map QName [AbstractName] -- | Compute all defined names in scope and their fixities/notations. -- Note that overloaded names (constructors) can have several -- fixities/notations. Then we 'mergeNotations'. (See issue 1194.) getDefinedNames :: [KindOfName] -> FlatScope -> [[NewNotation]] getDefinedNames kinds names = [ mergeNotations $ map (\d -> namesToNotation x (A.qnameName $ anameName d)) ds | (x, ds) <- Map.toList names , any ((`elem` kinds) . anameKind) ds , not (null ds) -- Andreas, 2013-03-21 see Issue 822 -- Names can have different kinds, i.e., 'defined' and 'constructor'. -- We need to consider all names that have *any* matching kind, -- not only those whose first appearing kind is matching. ] -- | Compute all names (first component) and operators/notations -- (second component) in scope. localNames :: FlatScope -> ScopeM ([QName], [NewNotation]) localNames flat = do let defs = getDefinedNames allKindsOfNames flat locals <- nubOn fst . notShadowedLocals <$> getLocalVars -- Note: Debug printout aligned with the one in buildParsers. reportSLn "scope.operators" 50 $ unlines [ "flat = " ++ show flat , "defs = " ++ show defs , "locals= " ++ show locals ] let localNots = map localOp locals localNames = Set.fromList $ map notaName localNots otherNots = filter (\n -> not (Set.member (notaName n) localNames)) (concat defs) return $ second (map useDefaultFixity) $ split $ localNots ++ otherNots where localOp (x, y) = namesToNotation (QName x) y split ops = partitionEithers $ concatMap opOrNot ops opOrNot n = Left (notaName n) : if null (notation n) then [] else [Right n] -- | Data structure filled in by @buildParsers@. -- The top-level parser @pTop@ is of primary interest, -- but @pArgs@ is used to convert module application -- from concrete to abstract syntax. data Parsers e = Parsers { pTop :: Parser e e , pApp :: Parser e e , pArgs :: Parser e [NamedArg e] , pNonfix :: Parser e e , pAtom :: Parser e e } data ExprKind = IsPattern | IsExpr deriving (Eq, Show) -- | Builds a parser for operator applications from all the operators -- and function symbols in scope. -- -- When parsing a pattern we do not use bound names. The effect is -- that unqualified operator parts (that are not constructor parts) -- can be used as atomic names in the pattern (so they can be -- rebound). See @test/succeed/OpBind.agda@ for an example. -- -- When parsing a pattern we also disallow the use of sections, mainly -- because there is little need for sections in patterns. Note that -- sections are parsed by splitting up names into multiple tokens -- (@_+_@ is replaced by @_@, @+@ and @_@), and if we were to support -- sections in patterns, then we would have to accept certain such -- sequences of tokens as single pattern variables. -- -- The list of names must include every name part in the -- expression/pattern to be parsed (excluding name parts inside things -- like parenthesised subexpressions that are treated as atoms). The -- list is used to optimise the parser. For instance, a given notation -- is only included in the generated grammar if all of the notation's -- name parts are present in the list of names. -- -- The returned list contains all operators/notations/sections that -- were used to generate the grammar. buildParsers :: forall e. IsExpr e => Range -> FlatScope -> ExprKind -> [QName] -> ScopeM (ParseSections, [NotationSection], Parsers e) buildParsers r flat kind exprNames = do (names, ops) <- localNames flat let -- All names. namesInExpr :: Set QName namesInExpr = Set.fromList exprNames partListsInExpr' = map (nameParts . unqualify) $ Set.toList namesInExpr partListTrie f = foldr (\ps -> Trie.union (Trie.everyPrefix ps ())) Trie.empty (f partListsInExpr') -- All names. partListsInExpr :: Trie NamePart () partListsInExpr = partListTrie id -- All names, with the name parts in reverse order. reversedPartListsInExpr :: Trie NamePart () reversedPartListsInExpr = partListTrie (map reverse) -- Every regular name part (not holes etc.). partsInExpr :: Set RawName partsInExpr = Set.fromList [ s | Id s <- concat partListsInExpr' ] -- Are all name parts present in the expression? partsPresent n = [ Set.member p partsInExpr | p <- stringParts (notation n) ] addHole True p = [Hole, Id p] addHole False p = [Id p] -- Is the first identifier part present in n present in the -- expression, without any preceding name parts, except for a -- leading underscore iff withHole is True? firstPartPresent withHole n = Trie.member (addHole withHole p) partListsInExpr where p = case n of NormalHole{} : IdPart p : _ -> rangedThing p IdPart p : _ -> rangedThing p _ -> __IMPOSSIBLE__ -- Is the last identifier part present in n present in the -- expression, without any succeeding name parts, except for a -- trailing underscore iff withHole is True? lastPartPresent withHole n = Trie.member (addHole withHole p) reversedPartListsInExpr where p = case reverse n of NormalHole{} : IdPart p : _ -> rangedThing p IdPart p : _ -> rangedThing p _ -> __IMPOSSIBLE__ -- | Are the initial and final identifier parts present with -- the right mix of leading and trailing underscores? correctUnderscores :: Bool -> Bool -> Notation -> Bool correctUnderscores withInitialHole withFinalHole n = firstPartPresent withInitialHole n && lastPartPresent withFinalHole n -- Should be used with operators (not sections) and notations -- coming from syntax declarations. filterCorrectUnderscoresOp :: [NewNotation] -> [NotationSection] filterCorrectUnderscoresOp ns = [ noSection n | n <- ns , if notaIsOperator n then correctUnderscores False False (notation n) else all (\s -> Trie.member [Id s] partListsInExpr) (stringParts $ notation n) ] -- Should be used with sections. correctUnderscoresSect :: NotationKind -> Notation -> Bool correctUnderscoresSect k n = case (k, notationKind n) of (PrefixNotation, InfixNotation) -> correctUnderscores True False n (PostfixNotation, InfixNotation) -> correctUnderscores False True n (NonfixNotation, InfixNotation) -> correctUnderscores True True n (NonfixNotation, PrefixNotation) -> correctUnderscores False True n (NonfixNotation, PostfixNotation) -> correctUnderscores True False n _ -> __IMPOSSIBLE__ -- If "or" is replaced by "and" in conParts/allParts below, -- then the misspelled operator application "if x thenn x else -- x" can be parsed as "if" applied to five arguments, -- resulting in a confusing error message claiming that "if" -- is not in scope. (non, fix) = List.partition nonfix (filter (and . partsPresent) ops) cons = getDefinedNames [ConName, FldName, PatternSynName] flat conNames = Set.fromList $ filter (flip Set.member namesInExpr) $ map (notaName . head) cons conParts = Set.fromList $ concatMap notationNames $ filter (or . partsPresent) $ concat cons allNames = Set.fromList $ filter (flip Set.member namesInExpr) names allParts = Set.union conParts (Set.fromList $ concatMap notationNames $ filter (or . partsPresent) ops) isAtom x | kind == IsPattern && not (isQualified x) = not (Set.member x conParts) || Set.member x conNames | otherwise = not (Set.member x allParts) || Set.member x allNames -- If string is a part of notation, it cannot be used as an identifier, -- unless it is also used as an identifier. See issue 307. parseSections = case kind of IsPattern -> DoNotParseSections IsExpr -> ParseSections let nonClosedSections l ns = case parseSections of DoNotParseSections -> [] ParseSections -> [ NotationSection n k (Just l) True | n <- ns , isinfix n && notaIsOperator n , k <- [PrefixNotation, PostfixNotation] , correctUnderscoresSect k (notation n) ] unrelatedOperators :: [NotationSection] unrelatedOperators = filterCorrectUnderscoresOp unrelated ++ nonClosedSections Unrelated unrelated where unrelated = filter ((== Unrelated) . level) fix nonWithSections :: [NotationSection] nonWithSections = map (\s -> s { sectLevel = Nothing }) (filterCorrectUnderscoresOp non) ++ case parseSections of DoNotParseSections -> [] ParseSections -> [ NotationSection n NonfixNotation Nothing True | n <- fix , notaIsOperator n , correctUnderscoresSect NonfixNotation (notation n) ] -- The triples have the form (level, operators). The lowest -- level comes first. relatedOperators :: [(Integer, [NotationSection])] relatedOperators = map (\((l, ns) : rest) -> (l, ns ++ concat (map snd rest))) . List.groupBy ((==) `on` fst) . List.sortBy (compare `on` fst) . mapMaybe (\n -> case level n of Unrelated -> Nothing r@(Related l) -> Just (l, filterCorrectUnderscoresOp [n] ++ nonClosedSections r [n])) $ fix everything :: [NotationSection] everything = concatMap snd relatedOperators ++ unrelatedOperators ++ nonWithSections reportSLn "scope.operators" 50 $ unlines [ "unrelatedOperators = " ++ show unrelatedOperators , "nonWithSections = " ++ show nonWithSections , "relatedOperators = " ++ show relatedOperators ] let g = Data.Function.fix $ \p -> Parsers { pTop = memoise TopK $ Fold.asum $ foldr ($) (pApp p) (map (\(l, ns) higher -> mkP (Right l) parseSections (pTop p) ns higher True) relatedOperators) : map (\(k, n) -> mkP (Left k) parseSections (pTop p) [n] (pApp p) False) (zip [0..] unrelatedOperators) , pApp = memoise AppK $ appP (pNonfix p) (pArgs p) , pArgs = argsP (pNonfix p) , pNonfix = memoise NonfixK $ Fold.asum $ pAtom p : flip map nonWithSections (\sect -> let n = sectNotation sect inner :: forall k. NK k -> Parser e (OperatorType k e) inner = opP parseSections (pTop p) n in case notationKind (notation n) of InfixNotation -> flip ($) <$> placeholder Beginning <*> inner In <*> placeholder End PrefixNotation -> inner Pre <*> placeholder End PostfixNotation -> flip ($) <$> placeholder Beginning <*> inner Post NonfixNotation -> inner Non NoNotation -> __IMPOSSIBLE__) , pAtom = atomP isAtom } reportSDoc "scope.grammar" 10 $ return $ "Operator grammar:" $$ nest 2 (grammar (pTop g)) return (parseSections, everything, g) where level :: NewNotation -> PrecedenceLevel level = fixityLevel . notaFixity nonfix, isinfix, isprefix, ispostfix :: NewNotation -> Bool nonfix = (== NonfixNotation) . notationKind . notation isinfix = (== InfixNotation) . notationKind . notation isprefix = (== PrefixNotation) . notationKind . notation ispostfix = (== PostfixNotation) . notationKind . notation isPrefix, isPostfix :: NotationSection -> Bool isPrefix = (== PrefixNotation) . sectKind isPostfix = (== PostfixNotation) . sectKind isInfix :: Associativity -> NotationSection -> Bool isInfix ass s = sectKind s == InfixNotation && fixityAssoc (notaFixity (sectNotation s)) == ass mkP :: Either Integer Integer -- ^ Memoisation key. -> ParseSections -> Parser e e -> [NotationSection] -> Parser e e -- ^ A parser for an expression of higher precedence. -> Bool -- ^ Include the \"expression of higher precedence\" -- parser as one of the choices? -> Parser e e mkP key parseSections p0 ops higher includeHigher = memoise (NodeK key) $ Fold.asum $ (if includeHigher then (higher :) else id) $ catMaybes [nonAssoc, preRights, postLefts] where choice :: forall k. NK k -> [NotationSection] -> Parser e (OperatorType k e) choice k = Fold.asum . map (\sect -> let n = sectNotation sect inner :: forall k. NK k -> Parser e (OperatorType k e) inner = opP parseSections p0 n in case k of In -> inner In Pre -> if isinfix n || ispostfix n then flip ($) <$> placeholder Beginning <*> inner In else inner Pre Post -> if isinfix n || isprefix n then flip <$> inner In <*> placeholder End else inner Post Non -> __IMPOSSIBLE__) nonAssoc :: Maybe (Parser e e) nonAssoc = case filter (isInfix NonAssoc) ops of [] -> Nothing ops -> Just $ (\x f y -> f (noPlaceholder x) (noPlaceholder y)) <$> higher <*> choice In ops <*> higher or p1 [] p2 [] = Nothing or p1 [] p2 ops2 = Just (p2 ops2) or p1 ops1 p2 [] = Just (p1 ops1) or p1 ops1 p2 ops2 = Just (p1 ops1 <|> p2 ops2) preRight :: Maybe (Parser e (MaybePlaceholder e -> e)) preRight = or (choice Pre) (filter isPrefix ops) (\ops -> flip ($) <$> (noPlaceholder <$> higher) <*> choice In ops) (filter (isInfix RightAssoc) ops) preRights :: Maybe (Parser e e) preRights = do preRight <- preRight return $ Data.Function.fix $ \preRights -> memoiseIfPrinting (PreRightsK key) $ preRight <*> (noPlaceholder <$> (preRights <|> higher)) postLeft :: Maybe (Parser e (MaybePlaceholder e -> e)) postLeft = or (choice Post) (filter isPostfix ops) (\ops -> flip <$> choice In ops <*> (noPlaceholder <$> higher)) (filter (isInfix LeftAssoc) ops) postLefts :: Maybe (Parser e e) postLefts = do postLeft <- postLeft return $ Data.Function.fix $ \postLefts -> memoise (PostLeftsK key) $ flip ($) <$> (noPlaceholder <$> (postLefts <|> higher)) <*> postLeft --------------------------------------------------------------------------- -- * Helpers for pattern and lhs parsing --------------------------------------------------------------------------- -- | View a pattern @p@ as a list @p0 .. pn@ where @p0@ is the identifier -- (in most cases a constructor). -- -- Pattern needs to be parsed already (operators resolved). patternAppView :: Pattern -> [NamedArg Pattern] patternAppView p = case p of AppP p arg -> patternAppView p ++ [arg] OpAppP _ x _ ps -> defaultNamedArg (IdentP x) : ps ParenP _ p -> patternAppView p RawAppP _ _ -> __IMPOSSIBLE__ _ -> [ defaultNamedArg p ] --------------------------------------------------------------------------- -- * Parse functions --------------------------------------------------------------------------- -- | Returns the list of possible parses. parsePat :: (ParseSections, Parser Pattern Pattern) -> Pattern -> [Pattern] parsePat prs p = case p of AppP p (Arg info q) -> fullParen' <$> (AppP <$> parsePat prs p <*> (Arg info <$> traverse (parsePat prs) q)) RawAppP _ ps -> fullParen' <$> (parsePat prs =<< parse prs ps) OpAppP r d ns ps -> fullParen' . OpAppP r d ns <$> (mapM . traverse . traverse) (parsePat prs) ps HiddenP _ _ -> fail "bad hidden argument" InstanceP _ _ -> fail "bad instance argument" AsP r x p -> AsP r x <$> parsePat prs p DotP r e -> return $ DotP r e ParenP r p -> fullParen' <$> parsePat prs p WildP _ -> return p AbsurdP _ -> return p LitP _ -> return p QuoteP _ -> return p IdentP _ -> return p RecP r fs -> RecP r <$> mapM (traverse (parsePat prs)) fs EqualP{} -> return p -- Andrea: cargo culted from DotP EllipsisP _ -> fail "bad ellipsis" WithP r p -> WithP r <$> parsePat prs p {- Implement parsing of copattern left hand sides, e.g. record Tree (A : Set) : Set where field label : A child : Bool -> Tree A -- corecursive function defined by copattern matching alternate : {A : Set}(a b : A) -> Tree A -- shallow copatterns label (alternate a b) = a child (alternate a b) True = alternate b a -- deep copatterns: label (child (alternate a b) False) = b child (child (alternate a b) False) True = alternate a b child (child (alternate a b) False) False = alternate a b Delivers an infinite tree a b b a a a a b b b b b b b b ... Each lhs is a pattern tree with a distinct path of destructors ("child", "label") from the root to the defined symbol ("alternate"). All branches besides this distinct path are patterns. Syntax.Concrete.LHSCore represents a lhs - the destructor path - the side patterns - the defined function symbol - the applied patterns -} type ParseLHS = Either Pattern (QName, LHSCore) -- | The returned list contains all operators/notations/sections that -- were used to generate the grammar. parseLHS' :: LHSOrPatSyn -> Maybe QName -> Pattern -> ScopeM (ParseLHS, [NotationSection]) parseLHS' IsLHS (Just qn) (RawAppP _ [WildP{}]) = return (Right (qn, LHSHead qn []), []) parseLHS' lhsOrPatSyn top p = do let names = patternQNames p ms = qualifierModules names flat <- flattenScope ms <$> getScope (parseSections, ops, parsers) <- buildParsers (getRange p) flat IsPattern names let patP = (parseSections, pTop parsers) let cons = getNames [ConName, PatternSynName] flat let flds = getNames [FldName] flat case [ res | let result = parsePat patP p , p' <- foldr seq () result `seq` result , res <- validPattern (PatternCheckConfig top cons flds) p' ] of [(p,lhs)] -> do reportSDoc "scope.operators" 50 $ return $ "Parsed lhs:" <+> pretty lhs return (lhs, ops) [] -> typeError $ OperatorInformation ops $ NoParseForLHS lhsOrPatSyn p rs -> typeError $ OperatorInformation ops $ AmbiguousParseForLHS lhsOrPatSyn p $ map (fullParen . fst) rs where getNames kinds flat = map (notaName . head) $ getDefinedNames kinds flat -- validPattern returns an empty or singleton list (morally a Maybe) validPattern :: PatternCheckConfig -> Pattern -> [(Pattern, ParseLHS)] validPattern conf p = case (classifyPattern conf p, top) of (Just r@(Left _), Nothing) -> [(p, r)] -- expect pattern (Just r@(Right _), Just{}) -> [(p, r)] -- expect lhs _ -> [] -- | Name sets for classifying a pattern. data PatternCheckConfig = PatternCheckConfig { topName :: Maybe QName -- ^ name of defined symbol , conNames :: [QName] -- ^ valid constructor names , fldNames :: [QName] -- ^ valid field names } -- | Returns zero or one classified patterns. classifyPattern :: PatternCheckConfig -> Pattern -> Maybe ParseLHS classifyPattern conf p = case patternAppView p of -- case @f ps@ Arg _ (Named _ (IdentP x)) : ps | Just x == topName conf -> do guard $ all validPat ps return $ Right (x, lhsCoreAddSpine (LHSHead x []) ps) -- case @d ps@ Arg _ (Named _ (IdentP x)) : ps | x `elem` fldNames conf -> do -- ps0 :: [NamedArg ParseLHS] ps0 <- mapM classPat ps let (ps1, rest) = span (isLeft . namedArg) ps0 (p2, ps3) <- uncons rest -- when (null rest): no field pattern or def pattern found guard $ all (isLeft . namedArg) ps3 let (f, lhs) = fromR p2 (ps', _:ps'') = splitAt (length ps1) ps return $ Right (f, lhsCoreAddSpine (LHSProj x ps' lhs []) ps'') -- case: ordinary pattern _ -> do guard $ validConPattern (conNames conf) p return $ Left p where -- allNames = conNames conf ++ fldNames conf validPat = validConPattern (conNames conf) . namedArg classPat :: NamedArg Pattern -> Maybe (NamedArg ParseLHS) classPat = Trav.mapM (Trav.mapM (classifyPattern conf)) fromR :: NamedArg (Either a (b, c)) -> (b, NamedArg c) fromR (Arg info (Named n (Right (b, c)))) = (b, Arg info (Named n c)) fromR (Arg info (Named n (Left a ))) = __IMPOSSIBLE__ -- | Parses a left-hand side, and makes sure that it defined the expected name. parseLHS :: QName -> Pattern -> ScopeM LHSCore parseLHS top p = billToParser IsPattern $ do (res, ops) <- parseLHS' IsLHS (Just top) p case res of Right (f, lhs) -> return lhs _ -> typeError $ OperatorInformation ops $ NoParseForLHS IsLHS p -- | Parses a pattern. parsePattern :: Pattern -> ScopeM Pattern parsePattern = parsePatternOrSyn IsLHS parsePatternSyn :: Pattern -> ScopeM Pattern parsePatternSyn = parsePatternOrSyn IsPatSyn parsePatternOrSyn :: LHSOrPatSyn -> Pattern -> ScopeM Pattern parsePatternOrSyn lhsOrPatSyn p = billToParser IsPattern $ do (res, ops) <- parseLHS' lhsOrPatSyn Nothing p case res of Left p -> return p _ -> typeError $ OperatorInformation ops $ NoParseForLHS lhsOrPatSyn p -- | Helper function for 'parseLHS' and 'parsePattern'. validConPattern :: [QName] -> Pattern -> Bool validConPattern cons p = case appView p of [WithP _ p] -> validConPattern cons p [_] -> True IdentP x : ps -> elem x cons && all (validConPattern cons) ps [QuoteP _, _] -> True DotP _ e : ps -> all (validConPattern cons) ps _ -> False -- Andreas, 2012-06-04: I do not know why the following line was -- the catch-all case. It seems that the new catch-all works also -- and is more logical. -- ps -> all (validConPattern cons) ps -- | Helper function for 'parseLHS' and 'parsePattern'. appView :: Pattern -> [Pattern] appView p = case p of AppP p a -> appView p ++ [namedArg a] OpAppP _ op _ ps -> IdentP op : map namedArg ps ParenP _ p -> appView p RawAppP _ _ -> __IMPOSSIBLE__ HiddenP _ _ -> __IMPOSSIBLE__ InstanceP _ _ -> __IMPOSSIBLE__ _ -> [p] -- | Return all qualifiers occuring in a list of 'QName's. -- Each qualifier is returned as a list of names, e.g. -- for @Data.Nat._+_@ we return the list @[Data,Nat]@. qualifierModules :: [QName] -> [[Name]] qualifierModules qs = List.nub $ filter (not . null) $ map (init . qnameParts) qs -- | Parse a list of expressions into an application. parseApplication :: [Expr] -> ScopeM Expr parseApplication [e] = return e parseApplication es = billToParser IsExpr $ do -- Build the parser let names = [ q | Ident q <- es ] ms = qualifierModules names flat <- flattenScope ms <$> getScope (parseSections, ops, p) <- buildParsers (getRange es) flat IsExpr names -- Parse let result = parse (parseSections, pTop p) es case foldr seq () result `seq` result of [e] -> do reportSDoc "scope.operators" 50 $ return $ "Parsed an operator application:" <+> pretty e return e [] -> typeError $ OperatorInformation ops $ NoParseForApplication es es' -> typeError $ OperatorInformation ops $ AmbiguousParseForApplication es $ map fullParen es' parseModuleIdentifier :: Expr -> ScopeM QName parseModuleIdentifier (Ident m) = return m parseModuleIdentifier e = typeError $ NotAModuleExpr e parseRawModuleApplication :: [Expr] -> ScopeM (QName, [NamedArg Expr]) parseRawModuleApplication es = billToParser IsExpr $ do let e : es_args = es m <- parseModuleIdentifier e -- Build the arguments parser let names = [ q | Ident q <- es_args ] ms = qualifierModules names flat <- flattenScope ms <$> getScope (parseSections, ops, p) <- buildParsers (getRange es_args) flat IsExpr names -- Parse -- TODO: not sure about forcing case {-force $-} parse (parseSections, pArgs p) es_args of [as] -> return (m, as) [] -> typeError $ OperatorInformation ops $ NoParseForApplication es ass -> do let f = fullParen . foldl (App noRange) (Ident m) typeError $ OperatorInformation ops $ AmbiguousParseForApplication es $ map f ass -- | Parse an expression into a module application -- (an identifier plus a list of arguments). parseModuleApplication :: Expr -> ScopeM (QName, [NamedArg Expr]) parseModuleApplication (RawApp _ es) = parseRawModuleApplication es parseModuleApplication (App r e1 e2) = do -- TODO: do we need this case? (m, args) <- parseModuleApplication e1 return (m, args ++ [e2]) parseModuleApplication e = do m <- parseModuleIdentifier e return (m, []) --------------------------------------------------------------------------- -- * Inserting parenthesis --------------------------------------------------------------------------- fullParen :: IsExpr e => e -> e fullParen e = case exprView $ fullParen' e of ParenV e -> e e' -> unExprView e' fullParen' :: IsExpr e => e -> e fullParen' e = case exprView e of LocalV _ -> e WildV _ -> e OtherV _ -> e HiddenArgV _ -> e InstanceArgV _ -> e ParenV _ -> e AppV e1 (Arg info e2) -> par $ unExprView $ AppV (fullParen' e1) (Arg info e2') where e2' = case argInfoHiding info of Hidden -> e2 Instance{} -> e2 NotHidden -> fullParen' <$> e2 OpAppV x ns es -> par $ unExprView $ OpAppV x ns $ (map . fmap . fmap . fmap . fmap) fullParen' es LamV bs e -> par $ unExprView $ LamV bs (fullParen e) where par = unExprView . ParenV Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Attribute.hs0000644000000000000000000000756513466402171020635 0ustar0000000000000000{-# LANGUAGE TupleSections #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ConstraintKinds #-} -- | Attributes: concrete syntax for ArgInfo, esp. modalities. module Agda.Syntax.Concrete.Attribute where import Control.Arrow (second) import Control.Monad (foldM) import Data.List (foldl') import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Agda.Syntax.Common import Agda.Syntax.Concrete.Name -- import Agda.Utils.Functor -- | An attribute is a modifier for `ArgInfo`. data Attribute = RelevanceAttribute Relevance | QuantityAttribute Quantity deriving (Eq, Ord, Show) -- | (Conjunctive constraint.) type LensAttribute a = (LensRelevance a, LensQuantity a) -- | Modifiers for 'Relevance'. relevanceAttributeTable :: [(String, Relevance)] relevanceAttributeTable = concat [ map (, Irrelevant) [ "irr", "irrelevant" ] , map (, NonStrict) [ "shirr", "shape-irrelevant" ] , map (, Relevant) [ "relevant" ] ] -- | Modifiers for 'Quantity'. quantityAttributeTable :: [(String, Quantity)] quantityAttributeTable = concat [ map (, Quantity0) [ "0", "erased" ] -- , "static", "compile-time" ] , map (, Quantityω) [ "ω", "plenty" ] -- , "dynamic", "runtime", "unrestricted", "abundant" ] -- , map (, Quantity1) [ "1", "linear" ] -- , map (, Quantity01) [ "01", "affine" ] ] -- | Concrete syntax for all attributes. attributesMap :: Map String Attribute attributesMap = Map.fromList $ concat [ map (second RelevanceAttribute) relevanceAttributeTable , map (second QuantityAttribute) quantityAttributeTable ] -- | Parsing a string into an attribute. stringToAttribute :: String -> Maybe Attribute stringToAttribute = (`Map.lookup` attributesMap) -- | Setting an attribute (in e.g. an 'Arg'). Overwrites previous value. setAttribute :: (LensAttribute a) => Attribute -> a -> a setAttribute = \case RelevanceAttribute r -> setRelevance r QuantityAttribute q -> setQuantity q -- | Setting some attributes in left-to-right order. -- Blindly overwrites previous settings. setAttributes :: (LensAttribute a) => [Attribute] -> a -> a setAttributes attrs arg = foldl' (flip setAttribute) arg attrs --------------------------------------------------------------------------- -- * Applying attributes only if they have not been set already. -- No overwriting. --------------------------------------------------------------------------- -- | Setting 'Relevance' if unset. setPristineRelevance :: (LensRelevance a) => Relevance -> a -> Maybe a setPristineRelevance r a | getRelevance a == defaultRelevance = Just $ setRelevance r a | otherwise = Nothing -- | Setting 'Quantity' if unset. setPristineQuantity :: (LensQuantity a) => Quantity -> a -> Maybe a setPristineQuantity q a | getQuantity a == defaultQuantity = Just $ setQuantity q a | otherwise = Nothing -- | Setting an unset attribute (to e.g. an 'Arg'). setPristineAttribute :: (LensAttribute a) => Attribute -> a -> Maybe a setPristineAttribute = \case RelevanceAttribute r -> setPristineRelevance r QuantityAttribute q -> setPristineQuantity q -- | Setting a list of unset attributes. setPristineAttributes :: (LensAttribute a) => [Attribute] -> a -> Maybe a setPristineAttributes attrs arg = foldM (flip setPristineAttribute) arg attrs --------------------------------------------------------------------------- -- * Filtering attributes --------------------------------------------------------------------------- isRelevanceAttribute :: Attribute -> Maybe Relevance isRelevanceAttribute = \case RelevanceAttribute q -> Just q _ -> Nothing isQuantityAttribute :: Attribute -> Maybe Quantity isQuantityAttribute = \case QuantityAttribute q -> Just q _ -> Nothing relevanceAttributes :: [Attribute] -> [Attribute] relevanceAttributes = filter $ isJust . isRelevanceAttribute quantityAttributes :: [Attribute] -> [Attribute] quantityAttributes = filter $ isJust . isQuantityAttribute Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Definitions.hs0000644000000000000000000023467713466402171021153 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Preprocess 'Agda.Syntax.Concrete.Declaration's, producing 'NiceDeclaration's. -- -- * Attach fixity and syntax declarations to the definition they refer to. -- -- * Distribute the following attributes to the individual definitions: -- @abstract@, -- @instance@, -- @postulate@, -- @primitive@, -- @private@, -- termination pragmas. -- -- * Gather the function clauses belonging to one function definition. -- -- * Expand ellipsis @...@ in function clauses following @with@. -- -- * Infer mutual blocks. -- A block starts when a lone signature is encountered, and ends when -- all lone signatures have seen their definition. -- -- * Report basic well-formedness error, -- when one of the above transformation fails. -- When possible, errors should be deferred to the scope checking phase -- (ConcreteToAbstract), where we are in the TCM and can produce more -- informative error messages. module Agda.Syntax.Concrete.Definitions ( NiceDeclaration(..) , NiceConstructor, NiceTypeSignature , Clause(..) , DeclarationException(..) , DeclarationWarning(..) , Nice, runNice , niceDeclarations , notSoNiceDeclarations , niceHasAbstract , Measure , declarationWarningName ) where import Prelude hiding (null) import Control.Arrow ((&&&), (***), first, second) import Control.Applicative hiding (empty) import Control.Monad.Except import Control.Monad.State import Data.Either ( partitionEithers ) import Data.Function ( on ) import qualified Data.Map as Map import Data.Map (Map) import Data.Maybe import Data.Monoid ( Monoid, mempty, mappend ) import Data.Semigroup ( Semigroup, (<>) ) import qualified Data.List as List import qualified Data.Set as Set import Data.Traversable (Traversable, traverse) import qualified Data.Traversable as Trav import Data.Data (Data) import Agda.Syntax.Concrete import Agda.Syntax.Concrete.Pattern import Agda.Syntax.Common hiding (TerminationCheck()) import qualified Agda.Syntax.Common as Common import Agda.Syntax.Position import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Concrete.Fixity import Agda.Interaction.Options.Warnings import Agda.Utils.AffineHole import Agda.Utils.Except ( MonadError(throwError,catchError) ) import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List (caseList, headMaybe, isSublistOf) import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null import qualified Agda.Utils.Pretty as Pretty import Agda.Utils.Pretty hiding ((<>)) import Agda.Utils.Singleton import Agda.Utils.Three import Agda.Utils.Tuple import Agda.Utils.Update #include "undefined.h" import Agda.Utils.Impossible {-------------------------------------------------------------------------- Types --------------------------------------------------------------------------} {-| The nice declarations. No fixity declarations and function definitions are contained in a single constructor instead of spread out between type signatures and clauses. The @private@, @postulate@, @abstract@ and @instance@ modifiers have been distributed to the individual declarations. Observe the order of components: Range Fixity' Access IsAbstract IsInstance TerminationCheck PositivityCheck further attributes (Q)Name content (Expr, Declaration ...) -} data NiceDeclaration = Axiom Range Access IsAbstract IsInstance ArgInfo Name Expr -- ^ 'IsAbstract' argument: We record whether a declaration was made in an @abstract@ block. -- -- 'ArgInfo' argument: Axioms and functions can be declared irrelevant. -- ('Hiding' should be 'NotHidden'.) | NiceField Range Access IsAbstract IsInstance Name (Arg Expr) | PrimitiveFunction Range Access IsAbstract Name Expr | NiceMutual Range TerminationCheck PositivityCheck [NiceDeclaration] | NiceModule Range Access IsAbstract QName Telescope [Declaration] | NiceModuleMacro Range Access Name ModuleApplication OpenShortHand ImportDirective | NiceOpen Range QName ImportDirective | NiceImport Range QName (Maybe AsName) OpenShortHand ImportDirective | NicePragma Range Pragma | NiceRecSig Range Access IsAbstract PositivityCheck UniverseCheck Name [LamBinding] Expr | NiceDataSig Range Access IsAbstract PositivityCheck UniverseCheck Name [LamBinding] Expr | NiceFunClause Range Access IsAbstract TerminationCheck Catchall Declaration -- ^ An uncategorized function clause, could be a function clause -- without type signature or a pattern lhs (e.g. for irrefutable let). -- The 'Declaration' is the actual 'FunClause'. | FunSig Range Access IsAbstract IsInstance IsMacro ArgInfo TerminationCheck Name Expr | FunDef Range [Declaration] IsAbstract IsInstance TerminationCheck Name [Clause] -- ^ Block of function clauses (we have seen the type signature before). -- The 'Declaration's are the original declarations that were processed -- into this 'FunDef' and are only used in 'notSoNiceDeclaration'. -- Andreas, 2017-01-01: Because of issue #2372, we add 'IsInstance' here. -- An alias should know that it is an instance. | NiceDataDef Range Origin IsAbstract PositivityCheck UniverseCheck Name [LamBinding] [NiceConstructor] | NiceRecDef Range Origin IsAbstract PositivityCheck UniverseCheck Name (Maybe (Ranged Induction)) (Maybe HasEta) (Maybe (Name, IsInstance)) [LamBinding] [Declaration] | NicePatternSyn Range Name [Arg Name] Pattern | NiceGeneralize Range Access ArgInfo Name Expr | NiceUnquoteDecl Range Access IsAbstract IsInstance TerminationCheck [Name] Expr | NiceUnquoteDef Range Access IsAbstract TerminationCheck [Name] Expr deriving (Data, Show) type TerminationCheck = Common.TerminationCheck Measure -- | Termination measure is, for now, a variable name. type Measure = Name type Catchall = Bool -- | Only 'Axiom's. type NiceConstructor = NiceTypeSignature -- | Only 'Axiom's. type NiceTypeSignature = NiceDeclaration -- | One clause in a function definition. There is no guarantee that the 'LHS' -- actually declares the 'Name'. We will have to check that later. data Clause = Clause Name Catchall LHS RHS WhereClause [Clause] deriving (Data, Show) -- | The exception type. data DeclarationException = MultipleEllipses Pattern | InvalidName Name | DuplicateDefinition Name | MissingWithClauses Name LHS | WrongDefinition Name DataRecOrFun DataRecOrFun | Codata Range | DeclarationPanic String | WrongContentBlock KindOfBlock Range | AmbiguousFunClauses LHS [Name] -- ^ in a mutual block, a clause could belong to any of the @[Name]@ type signatures | InvalidMeasureMutual Range -- ^ In a mutual block, all or none need a MEASURE pragma. -- Range is of mutual block. | UnquoteDefRequiresSignature [Name] | BadMacroDef NiceDeclaration deriving (Data, Show) -- | Non-fatal errors encountered in the Nicifier data DeclarationWarning = EmptyAbstract Range -- ^ Empty @abstract@ block. | EmptyInstance Range -- ^ Empty @instance@ block | EmptyMacro Range -- ^ Empty @macro@ block. | EmptyMutual Range -- ^ Empty @mutual@ block. | EmptyPostulate Range -- ^ Empty @postulate@ block. | EmptyPrivate Range -- ^ Empty @private@ block. | EmptyGeneralize Range -- ^ Empty @variable@ block. | EmptyPrimitive Range -- ^ Empty @primitive@ block. | InvalidCatchallPragma Range -- ^ A {-\# CATCHALL \#-} pragma -- that does not precede a function clause. | InvalidNoPositivityCheckPragma Range -- ^ A {-\# NO_POSITIVITY_CHECK \#-} pragma -- that does not apply to any data or record type. | InvalidNoUniverseCheckPragma Range -- ^ A {-\# NO_UNIVERSE_CHECK \#-} pragma -- that does not apply to a data or record type. | InvalidTerminationCheckPragma Range -- ^ A {-\# TERMINATING \#-} and {-\# NON_TERMINATING \#-} pragma -- that does not apply to any function. | MissingDefinitions [Name] | NotAllowedInMutual Range String | PolarityPragmasButNotPostulates [Name] | PragmaNoTerminationCheck Range -- ^ Pragma @{-\# NO_TERMINATION_CHECK \#-}@ has been replaced -- by @{-\# TERMINATING \#-}@ and @{-\# NON_TERMINATING \#-}@. | PragmaCompiled Range -- ^ @COMPILE@ pragmas are not allowed in safe mode | UnknownFixityInMixfixDecl [Name] | UnknownNamesInFixityDecl [Name] | UnknownNamesInPolarityPragmas [Name] | UselessAbstract Range | UselessInstance Range | UselessPrivate Range deriving (Data, Show) declarationWarningName :: DeclarationWarning -> WarningName declarationWarningName dw = case dw of EmptyAbstract{} -> EmptyAbstract_ EmptyInstance{} -> EmptyInstance_ EmptyMacro{} -> EmptyMacro_ EmptyMutual{} -> EmptyMutual_ EmptyPrivate{} -> EmptyPrivate_ EmptyPostulate{} -> EmptyPostulate_ EmptyGeneralize{} -> EmptyGeneralize_ EmptyPrimitive{} -> EmptyPrimitive_ InvalidCatchallPragma{} -> InvalidCatchallPragma_ InvalidNoPositivityCheckPragma{} -> InvalidNoPositivityCheckPragma_ InvalidNoUniverseCheckPragma{} -> InvalidNoUniverseCheckPragma_ InvalidTerminationCheckPragma{} -> InvalidTerminationCheckPragma_ MissingDefinitions{} -> MissingDefinitions_ NotAllowedInMutual{} -> NotAllowedInMutual_ PolarityPragmasButNotPostulates{} -> PolarityPragmasButNotPostulates_ PragmaNoTerminationCheck{} -> PragmaNoTerminationCheck_ PragmaCompiled{} -> PragmaCompiled_ UnknownFixityInMixfixDecl{} -> UnknownFixityInMixfixDecl_ UnknownNamesInFixityDecl{} -> UnknownNamesInFixityDecl_ UnknownNamesInPolarityPragmas{} -> UnknownNamesInPolarityPragmas_ UselessAbstract{} -> UselessAbstract_ UselessInstance{} -> UselessInstance_ UselessPrivate{} -> UselessPrivate_ -- | Several declarations expect only type signatures as sub-declarations. These are: data KindOfBlock = PostulateBlock -- ^ @postulate@ | PrimitiveBlock -- ^ @primitive@. Ensured by parser. | InstanceBlock -- ^ @instance@. Actually, here all kinds of sub-declarations are allowed a priori. | FieldBlock -- ^ @field@. Ensured by parser. | DataBlock -- ^ @data ... where@. Here we got a bad error message for Agda-2.5 (Issue 1698). deriving (Data, Eq, Ord, Show) instance HasRange DeclarationException where getRange (MultipleEllipses d) = getRange d getRange (InvalidName x) = getRange x getRange (DuplicateDefinition x) = getRange x getRange (MissingWithClauses x lhs) = getRange lhs getRange (WrongDefinition x k k') = getRange x getRange (AmbiguousFunClauses lhs xs) = getRange lhs getRange (Codata r) = r getRange (DeclarationPanic _) = noRange getRange (WrongContentBlock _ r) = r getRange (InvalidMeasureMutual r) = r getRange (UnquoteDefRequiresSignature x) = getRange x getRange (BadMacroDef d) = getRange d instance HasRange DeclarationWarning where getRange (UnknownNamesInFixityDecl xs) = getRange . head $ xs getRange (UnknownFixityInMixfixDecl xs) = getRange . head $ xs getRange (UnknownNamesInPolarityPragmas xs) = getRange . head $ xs getRange (PolarityPragmasButNotPostulates xs) = getRange . head $ xs getRange (MissingDefinitions xs) = getRange . head $ xs getRange (UselessPrivate r) = r getRange (NotAllowedInMutual r x) = r getRange (UselessAbstract r) = r getRange (UselessInstance r) = r getRange (EmptyMutual r) = r getRange (EmptyAbstract r) = r getRange (EmptyPrivate r) = r getRange (EmptyInstance r) = r getRange (EmptyMacro r) = r getRange (EmptyPostulate r) = r getRange (EmptyGeneralize r) = r getRange (EmptyPrimitive r) = r getRange (InvalidTerminationCheckPragma r) = r getRange (InvalidNoPositivityCheckPragma r) = r getRange (InvalidCatchallPragma r) = r getRange (InvalidNoUniverseCheckPragma r) = r getRange (PragmaNoTerminationCheck r) = r getRange (PragmaCompiled r) = r instance HasRange NiceDeclaration where getRange (Axiom r _ _ _ _ _ _) = r getRange (NiceField r _ _ _ _ _) = r getRange (NiceMutual r _ _ _) = r getRange (NiceModule r _ _ _ _ _ ) = r getRange (NiceModuleMacro r _ _ _ _ _) = r getRange (NiceOpen r _ _) = r getRange (NiceImport r _ _ _ _) = r getRange (NicePragma r _) = r getRange (PrimitiveFunction r _ _ _ _) = r getRange (FunSig r _ _ _ _ _ _ _ _) = r getRange (FunDef r _ _ _ _ _ _) = r getRange (NiceDataDef r _ _ _ _ _ _ _) = r getRange (NiceRecDef r _ _ _ _ _ _ _ _ _ _) = r getRange (NiceRecSig r _ _ _ _ _ _ _) = r getRange (NiceDataSig r _ _ _ _ _ _ _) = r getRange (NicePatternSyn r _ _ _) = r getRange (NiceGeneralize r _ _ _ _) = r getRange (NiceFunClause r _ _ _ _ _) = r getRange (NiceUnquoteDecl r _ _ _ _ _ _) = r getRange (NiceUnquoteDef r _ _ _ _ _) = r instance Pretty NiceDeclaration where pretty = \case Axiom _ _ _ _ _ x _ -> text "postulate" <+> pretty x <+> colon <+> text "_" NiceField _ _ _ _ x _ -> text "field" <+> pretty x PrimitiveFunction _ _ _ x _ -> text "primitive" <+> pretty x NiceMutual{} -> text "mutual" NiceModule _ _ _ x _ _ -> text "module" <+> pretty x <+> text "where" NiceModuleMacro _ _ x _ _ _ -> text "module" <+> pretty x <+> text "= ..." NiceOpen _ x _ -> text "open" <+> pretty x NiceImport _ x _ _ _ -> text "import" <+> pretty x NicePragma{} -> text "{-# ... #-}" NiceRecSig _ _ _ _ _ x _ _ -> text "record" <+> pretty x NiceDataSig _ _ _ _ _ x _ _ -> text "data" <+> pretty x NiceFunClause{} -> text "" FunSig _ _ _ _ _ _ _ x _ -> pretty x <+> colon <+> text "_" FunDef _ _ _ _ _ x _ -> pretty x <+> text "= _" NiceDataDef _ _ _ _ _ x _ _ -> text "data" <+> pretty x <+> text "where" NiceRecDef _ _ _ _ _ x _ _ _ _ _ -> text "record" <+> pretty x <+> text "where" NicePatternSyn _ x _ _ -> text "pattern" <+> pretty x NiceGeneralize _ _ _ x _ -> text "variable" <+> pretty x NiceUnquoteDecl _ _ _ _ _ xs _ -> text "" NiceUnquoteDef _ _ _ _ xs _ -> text "" -- These error messages can (should) be terminated by a dot ".", -- there is no error context printed after them. instance Pretty DeclarationException where pretty (MultipleEllipses p) = fsep $ pwords "Multiple ellipses in left-hand side" ++ [pretty p] pretty (InvalidName x) = fsep $ pwords "Invalid name:" ++ [pretty x] pretty (DuplicateDefinition x) = fsep $ pwords "Duplicate definition of" ++ [pretty x] pretty (MissingWithClauses x lhs) = fsep $ pwords "Missing with-clauses for function" ++ [pretty x] pretty (WrongDefinition x k k') = fsep $ pretty x : pwords ("has been declared as a " ++ show k ++ ", but is being defined as a " ++ show k') pretty (AmbiguousFunClauses lhs xs) = sep [ fsep $ pwords "More than one matching type signature for left hand side " ++ [pretty lhs] ++ pwords "it could belong to any of:" , vcat $ map (pretty . PrintRange) xs ] pretty (WrongContentBlock b _) = fsep . pwords $ case b of PostulateBlock -> "A postulate block can only contain type signatures, possibly under keyword instance" DataBlock -> "A data definition can only contain type signatures, possibly under keyword instance" _ -> "Unexpected declaration" pretty (InvalidMeasureMutual _) = fsep $ pwords "In a mutual block, either all functions must have the same (or no) termination checking pragma." pretty (UnquoteDefRequiresSignature xs) = fsep $ pwords "Missing type signatures for unquoteDef" ++ map pretty xs pretty (BadMacroDef nd) = fsep $ [text $ declName nd] ++ pwords "are not allowed in macro blocks" pretty (Codata _) = text $ "The codata construction has been removed. " ++ "Use the INFINITY builtin instead." pretty (DeclarationPanic s) = text s instance Pretty DeclarationWarning where pretty (UnknownNamesInFixityDecl xs) = fsep $ pwords "The following names are not declared in the same scope as their syntax or fixity declaration (i.e., either not in scope at all, imported from another module, or declared in a super module):" ++ punctuate comma (map pretty xs) pretty (UnknownFixityInMixfixDecl xs) = fsep $ pwords "The following mixfix names do not have an associated fixity declaration:" ++ punctuate comma (map pretty xs) pretty (UnknownNamesInPolarityPragmas xs) = fsep $ pwords "The following names are not declared in the same scope as their polarity pragmas (they could for instance be out of scope, imported from another module, or declared in a super module):" ++ punctuate comma (map pretty xs) pretty (MissingDefinitions xs) = fsep $ pwords "The following names are declared but not accompanied by a definition:" ++ punctuate comma (map pretty xs) pretty (NotAllowedInMutual r nd) = fsep $ [text nd] ++ pwords "in mutual blocks are not supported. Suggestion: get rid of mutual block by manually ordering declarations" pretty (PolarityPragmasButNotPostulates xs) = fsep $ pwords "Polarity pragmas have been given for the following identifiers which are not postulates:" ++ punctuate comma (map pretty xs) pretty (UselessPrivate _) = fsep $ pwords "Using private here has no effect. Private applies only to declarations that introduce new identifiers into the module, like type signatures and data, record, and module declarations." pretty (UselessAbstract _) = fsep $ pwords "Using abstract here has no effect. Abstract applies to only definitions like data definitions, record type definitions and function clauses." pretty (UselessInstance _) = fsep $ pwords "Using instance here has no effect. Instance applies only to declarations that introduce new identifiers into the module, like type signatures and axioms." pretty (EmptyMutual _) = fsep $ pwords "Empty mutual block." pretty (EmptyAbstract _) = fsep $ pwords "Empty abstract block." pretty (EmptyPrivate _) = fsep $ pwords "Empty private block." pretty (EmptyInstance _) = fsep $ pwords "Empty instance block." pretty (EmptyMacro _) = fsep $ pwords "Empty macro block." pretty (EmptyPostulate _) = fsep $ pwords "Empty postulate block." pretty (EmptyGeneralize _) = fsep $ pwords "Empty variable block." pretty (EmptyPrimitive _) = fsep $ pwords "Empty primitive block." pretty (InvalidTerminationCheckPragma _) = fsep $ pwords "Termination checking pragmas can only precede a function definition or a mutual block (that contains a function definition)." pretty (InvalidNoPositivityCheckPragma _) = fsep $ pwords "NO_POSITIVITY_CHECKING pragmas can only precede a data/record definition or a mutual block (that contains a data/record definition)." pretty (InvalidCatchallPragma _) = fsep $ pwords "The CATCHALL pragma can only precede a function clause." pretty (InvalidNoUniverseCheckPragma _) = fsep $ pwords "NO_UNIVERSE_CHECKING pragmas can only precede a data/record definition." pretty (PragmaNoTerminationCheck _) = fsep $ pwords "Pragma {-# NO_TERMINATION_CHECK #-} has been removed. To skip the termination check, label your definitions either as {-# TERMINATING #-} or {-# NON_TERMINATING #-}." pretty (PragmaCompiled _) = fsep $ pwords "COMPILE pragma not allowed in safe mode." declName :: NiceDeclaration -> String declName Axiom{} = "Postulates" declName NiceField{} = "Fields" declName NiceMutual{} = "Mutual blocks" declName NiceModule{} = "Modules" declName NiceModuleMacro{} = "Modules" declName NiceOpen{} = "Open declarations" declName NiceImport{} = "Import statements" declName NicePragma{} = "Pragmas" declName PrimitiveFunction{} = "Primitive declarations" declName NicePatternSyn{} = "Pattern synonyms" declName NiceGeneralize{} = "Generalized variables" declName NiceUnquoteDecl{} = "Unquoted declarations" declName NiceUnquoteDef{} = "Unquoted definitions" declName NiceRecSig{} = "Records" declName NiceDataSig{} = "Data types" declName NiceFunClause{} = "Functions without a type signature" declName FunSig{} = "Type signatures" declName FunDef{} = "Function definitions" declName NiceRecDef{} = "Records" declName NiceDataDef{} = "Data types" {-------------------------------------------------------------------------- The niceifier --------------------------------------------------------------------------} data InMutual = InMutual -- ^ we are nicifying a mutual block | NotInMutual -- ^ we are nicifying decls not in a mutual block deriving (Eq, Show) -- | The kind of the forward declaration. data DataRecOrFun = DataName { kindPosCheck :: PositivityCheck , kindUniCheck :: UniverseCheck } -- ^ Name of a data type | RecName { kindPosCheck :: PositivityCheck , kindUniCheck :: UniverseCheck } -- ^ Name of a record type | FunName TerminationCheck -- ^ Name of a function. deriving Data -- Ignore pragmas when checking equality instance Eq DataRecOrFun where DataName{} == DataName{} = True RecName{} == RecName{} = True FunName{} == FunName{} = True _ == _ = False instance Show DataRecOrFun where show DataName{} = "data type" show RecName{} = "record type" show FunName{} = "function" isFunName :: DataRecOrFun -> Bool isFunName (FunName{}) = True isFunName _ = False sameKind :: DataRecOrFun -> DataRecOrFun -> Bool sameKind = (==) terminationCheck :: DataRecOrFun -> TerminationCheck terminationCheck (FunName tc) = tc terminationCheck _ = TerminationCheck positivityCheck :: DataRecOrFun -> PositivityCheck positivityCheck (DataName pc _) = pc positivityCheck (RecName pc _) = pc positivityCheck _ = True universeCheck :: DataRecOrFun -> UniverseCheck universeCheck (DataName _ uc) = uc universeCheck (RecName _ uc) = uc universeCheck _ = YesUniverseCheck -- | Check that declarations in a mutual block are consistently -- equipped with MEASURE pragmas, or whether there is a -- NO_TERMINATION_CHECK pragma. combineTermChecks :: Range -> [TerminationCheck] -> Nice TerminationCheck combineTermChecks r tcs = loop tcs where loop :: [TerminationCheck] -> Nice TerminationCheck loop [] = return TerminationCheck loop (tc : tcs) = do let failure r = throwError $ InvalidMeasureMutual r tc' <- loop tcs case (tc, tc') of (TerminationCheck , tc' ) -> return tc' (tc , TerminationCheck ) -> return tc (NonTerminating , NonTerminating ) -> return NonTerminating (NoTerminationCheck , NoTerminationCheck ) -> return NoTerminationCheck (NoTerminationCheck , Terminating ) -> return Terminating (Terminating , NoTerminationCheck ) -> return Terminating (Terminating , Terminating ) -> return Terminating (TerminationMeasure{} , TerminationMeasure{} ) -> return tc (TerminationMeasure r _, NoTerminationCheck ) -> failure r (TerminationMeasure r _, Terminating ) -> failure r (NoTerminationCheck , TerminationMeasure r _) -> failure r (Terminating , TerminationMeasure r _) -> failure r (TerminationMeasure r _, NonTerminating ) -> failure r (NonTerminating , TerminationMeasure r _) -> failure r (NoTerminationCheck , NonTerminating ) -> failure r (Terminating , NonTerminating ) -> failure r (NonTerminating , NoTerminationCheck ) -> failure r (NonTerminating , Terminating ) -> failure r -- | Nicifier monad. -- Preserve the state when throwing an exception. newtype Nice a = Nice { unNice :: ExceptT DeclarationException (State NiceEnv) a } deriving ( Functor, Applicative, Monad , MonadState NiceEnv, MonadError DeclarationException ) -- | Run a Nicifier computation, return result and warnings -- (in chronological order). runNice :: Nice a -> (Either DeclarationException a, NiceWarnings) runNice m = second (reverse . niceWarn) $ runExceptT (unNice m) `runState` initNiceEnv -- | Nicifier state. data NiceEnv = NiceEnv { _loneSigs :: LoneSigs -- ^ Lone type signatures that wait for their definition. , _termChk :: TerminationCheck -- ^ Termination checking pragma waiting for a definition. , _posChk :: PositivityCheck -- ^ Positivity checking pragma waiting for a definition. , _uniChk :: UniverseCheck -- ^ Universe checking pragma waiting for a data/rec signature or definition. , _catchall :: Catchall -- ^ Catchall pragma waiting for a function clause. , niceWarn :: NiceWarnings -- ^ Stack of warnings. Head is last warning. } type LoneSigs = Map Name DataRecOrFun type NiceWarnings = [DeclarationWarning] -- ^ Stack of warnings. Head is last warning. -- | Initial nicifier state. initNiceEnv :: NiceEnv initNiceEnv = NiceEnv { _loneSigs = empty , _termChk = TerminationCheck , _posChk = True , _uniChk = YesUniverseCheck , _catchall = False , niceWarn = [] } -- * Handling the lone signatures, stored to infer mutual blocks. -- | Lens for field '_loneSigs'. loneSigs :: Lens' LoneSigs NiceEnv loneSigs f e = f (_loneSigs e) <&> \ s -> e { _loneSigs = s } -- | Adding a lone signature to the state. addLoneSig :: Name -> DataRecOrFun -> Nice () addLoneSig x k = loneSigs %== \ s -> do let (mr, s') = Map.insertLookupWithKey (\ k new old -> new) x k s case mr of Nothing -> return s' Just{} -> throwError $ DuplicateDefinition x -- | Remove a lone signature from the state. removeLoneSig :: Name -> Nice () removeLoneSig x = loneSigs %= Map.delete x -- | Search for forward type signature. getSig :: Name -> Nice (Maybe DataRecOrFun) getSig x = Map.lookup x <$> use loneSigs -- | Check that no lone signatures are left in the state. noLoneSigs :: Nice Bool noLoneSigs = null <$> use loneSigs -- | Ensure that all forward declarations have been given a definition. checkLoneSigs :: Map Name DataRecOrFun -> Nice () checkLoneSigs xs = do loneSigs .= Map.empty unless (Map.null xs) (niceWarning $ MissingDefinitions $ Map.keys xs) -- | Lens for field '_termChk'. terminationCheckPragma :: Lens' TerminationCheck NiceEnv terminationCheckPragma f e = f (_termChk e) <&> \ s -> e { _termChk = s } withTerminationCheckPragma :: TerminationCheck -> Nice a -> Nice a withTerminationCheckPragma tc f = do tc_old <- use terminationCheckPragma terminationCheckPragma .= tc result <- f terminationCheckPragma .= tc_old return result -- | Lens for field '_posChk'. positivityCheckPragma :: Lens' PositivityCheck NiceEnv positivityCheckPragma f e = f (_posChk e) <&> \ s -> e { _posChk = s } withPositivityCheckPragma :: PositivityCheck -> Nice a -> Nice a withPositivityCheckPragma pc f = do pc_old <- use positivityCheckPragma positivityCheckPragma .= pc result <- f positivityCheckPragma .= pc_old return result -- | Lens for field '_uniChk'. universeCheckPragma :: Lens' UniverseCheck NiceEnv universeCheckPragma f e = f (_uniChk e) <&> \ s -> e { _uniChk = s } withUniverseCheckPragma :: UniverseCheck -> Nice a -> Nice a withUniverseCheckPragma uc f = do uc_old <- use universeCheckPragma universeCheckPragma .= uc result <- f universeCheckPragma .= uc_old return result -- | Get universe check pragma from a data/rec signature. -- Defaults to 'YesUniverseCheck'. getUniverseCheckFromSig :: Name -> Nice UniverseCheck getUniverseCheckFromSig x = maybe YesUniverseCheck universeCheck <$> getSig x -- | Lens for field '_catchall'. catchallPragma :: Lens' Catchall NiceEnv catchallPragma f e = f (_catchall e) <&> \ s -> e { _catchall = s } -- | Get current catchall pragma, and reset it for the next clause. popCatchallPragma :: Nice Catchall popCatchallPragma = do ca <- use catchallPragma catchallPragma .= False return ca withCatchallPragma :: Catchall -> Nice a -> Nice a withCatchallPragma ca f = do ca_old <- use catchallPragma catchallPragma .= ca result <- f catchallPragma .= ca_old return result -- | Add a new warning. niceWarning :: DeclarationWarning -> Nice () niceWarning w = modify $ \ st -> st { niceWarn = w : niceWarn st } data DeclKind = LoneSig DataRecOrFun Name | LoneDefs DataRecOrFun [Name] | OtherDecl deriving (Eq, Show) declKind :: NiceDeclaration -> DeclKind declKind (FunSig _ _ _ _ _ _ tc x _) = LoneSig (FunName tc) x declKind (NiceRecSig _ _ _ pc uc x pars _) = LoneSig (RecName pc uc) x declKind (NiceDataSig _ _ _ pc uc x pars _) = LoneSig (DataName pc uc) x declKind (FunDef r _ abs ins tc x _) = LoneDefs (FunName tc) [x] declKind (NiceDataDef _ _ _ pc uc x pars _) = LoneDefs (DataName pc uc) [x] declKind (NiceRecDef _ _ _ pc uc x _ _ _ pars _)= LoneDefs (RecName pc uc) [x] declKind (NiceUnquoteDef _ _ _ tc xs _) = LoneDefs (FunName tc) xs declKind Axiom{} = OtherDecl declKind NiceField{} = OtherDecl declKind PrimitiveFunction{} = OtherDecl declKind NiceMutual{} = OtherDecl declKind NiceModule{} = OtherDecl declKind NiceModuleMacro{} = OtherDecl declKind NiceOpen{} = OtherDecl declKind NiceImport{} = OtherDecl declKind NicePragma{} = OtherDecl declKind NiceFunClause{} = OtherDecl declKind NicePatternSyn{} = OtherDecl declKind NiceGeneralize{} = OtherDecl declKind NiceUnquoteDecl{} = OtherDecl -- | Replace (Data/Rec/Fun)Sigs with Axioms for postulated names -- The first argument is a list of axioms only. replaceSigs :: Map Name DataRecOrFun -- ^ Lone signatures to be turned into Axioms -> [NiceDeclaration] -- ^ Declarations containing them -> [NiceDeclaration] -- ^ In the output, everything should be defined replaceSigs ps = if Map.null ps then id else \case [] -> __IMPOSSIBLE__ (d:ds) -> case replaceable d of -- If declaration d of x is mentioned in the map of lone signatures then replace -- it with an axiom Just (x, axiom) | (Just{}, ps') <- Map.updateLookupWithKey (\ _ _ -> Nothing) x ps -> axiom : replaceSigs ps' ds _ -> d : replaceSigs ps ds where -- A @replaceable@ declaration is a signature. It has a name and we can make an -- @Axiom@ out of it. replaceable :: NiceDeclaration -> Maybe (Name, NiceDeclaration) replaceable = \case FunSig r acc abst inst _ argi _ x e -> Just (x, Axiom r acc abst inst argi x e) NiceRecSig r acc abst _ _ x pars t -> let e = Generalized $ makePi (lamBindingsToTelescope r pars) t in Just (x, Axiom r acc abst NotInstanceDef defaultArgInfo x e) NiceDataSig r acc abst _ _ x pars t -> let e = Generalized $ makePi (lamBindingsToTelescope r pars) t in Just (x, Axiom r acc abst NotInstanceDef defaultArgInfo x e) _ -> Nothing -- | Main. Fixities (or more precisely syntax declarations) are needed when -- grouping function clauses. niceDeclarations :: Fixities -> [Declaration] -> Nice [NiceDeclaration] niceDeclarations fixs ds = do -- Run the nicifier in an initial environment. But keep the warnings. st <- get put $ initNiceEnv { niceWarn = niceWarn st } nds <- nice ds -- Check that every signature got its definition. ps <- use loneSigs checkLoneSigs ps -- We postulate the missing ones and insert them in place of the corresponding @FunSig@ let ds = replaceSigs ps nds -- Note that loneSigs is ensured to be empty. -- (Important, since inferMutualBlocks also uses loneSigs state). res <- inferMutualBlocks ds -- Restore the old state, but keep the warnings. warns <- gets niceWarn put $ st { niceWarn = warns } return res where inferMutualBlocks :: [NiceDeclaration] -> Nice [NiceDeclaration] inferMutualBlocks [] = return [] inferMutualBlocks (d : ds) = case declKind d of OtherDecl -> (d :) <$> inferMutualBlocks ds LoneDefs{} -> (d :) <$> inferMutualBlocks ds -- Andreas, 2017-10-09, issue #2576: report error in ConcreteToAbstract LoneSig k x -> do addLoneSig x k let tcpc = (pure . terminationCheck) &&& (pure . positivityCheck) $ k ((tcs, pcs), (nds0, ds1)) <- untilAllDefined tcpc ds -- If we still have lone signatures without any accompanying definition, -- we postulate the definition and substitute the axiom for the lone signature ps <- use loneSigs checkLoneSigs ps let ds0 = replaceSigs ps (d : nds0) -- NB: don't forget the LoneSig the block started with! -- We then keep processing the rest of the block tc <- combineTermChecks (getRange d) tcs (NiceMutual (getRange ds0) tc (and pcs) ds0 :) <$> inferMutualBlocks ds1 where untilAllDefined :: ([TerminationCheck], [PositivityCheck]) -> [NiceDeclaration] -> Nice (([TerminationCheck], [PositivityCheck]), ([NiceDeclaration], [NiceDeclaration])) untilAllDefined tcpc@(tc, pc) ds = do done <- noLoneSigs if done then return (tcpc, ([], ds)) else case ds of [] -> return (tcpc, ([], ds)) d : ds -> case declKind d of LoneSig k x -> do addLoneSig x k let tcpc' = (terminationCheck k : tc, positivityCheck k : pc) cons d (untilAllDefined tcpc' ds) LoneDefs k xs -> do mapM_ removeLoneSig xs let tcpc' = (terminationCheck k : tc, positivityCheck k : pc) cons d (untilAllDefined tcpc' ds) OtherDecl -> cons d (untilAllDefined tcpc ds) where -- ASR (26 December 2015): Type annotated version of the @cons@ function. -- cons d = fmap $ -- (id :: (([TerminationCheck], [PositivityCheck]) -> ([TerminationCheck], [PositivityCheck]))) -- *** (d :) -- *** (id :: [NiceDeclaration] -> [NiceDeclaration]) cons d = fmap (id *** (d :) *** id) notMeasure TerminationMeasure{} = False notMeasure _ = True nice :: [Declaration] -> Nice [NiceDeclaration] nice [] = return [] nice ds = do (xs , ys) <- nice1 ds (xs ++) <$> nice ys nice1 :: [Declaration] -> Nice ([NiceDeclaration], [Declaration]) nice1 [] = return ([], []) -- Andreas, 2017-09-16, issue #2759: no longer __IMPOSSIBLE__ nice1 (d:ds) = do let justWarning w = do niceWarning w; nice1 ds case d of (TypeSig info x t) -> do termCheck <- use terminationCheckPragma let r = getRange d -- register x as lone type signature, to recognize clauses later addLoneSig x $ FunName termCheck return ([FunSig r PublicAccess ConcreteDef NotInstanceDef NotMacroDef info termCheck x t] , ds) Generalize r [] -> justWarning $ EmptyGeneralize r Generalize r sigs -> do gs <- forM sigs $ \case sig@(TypeSig info x t) -> do return $ NiceGeneralize (getRange sig) PublicAccess info x t _ -> __IMPOSSIBLE__ return (gs, ds) (FunClause lhs _ _ _) -> do termCheck <- use terminationCheckPragma catchall <- popCatchallPragma xs <- map fst . filter (isFunName . snd) . Map.toList <$> use loneSigs -- for each type signature 'x' waiting for clauses, we try -- if we have some clauses for 'x' case [ (x, (fits, rest)) | x <- xs , let (fits, rest) = -- Anonymous declarations only have 1 clause each! if isNoName x then ([d], ds) else span (couldBeFunClauseOf (Map.lookup x fixs) x) (d : ds) , not (null fits) ] of -- case: clauses match none of the sigs [] -> case lhs of -- Subcase: The lhs is single identifier (potentially anonymous). -- Treat it as a function clause without a type signature. LHS p [] [] | Just x <- isSingleIdentifierP p -> do d <- mkFunDef defaultArgInfo termCheck x Nothing [d] -- fun def without type signature is relevant return (d , ds) -- Subcase: The lhs is a proper pattern. -- This could be a let-pattern binding. Pass it on. -- A missing type signature error might be raise in ConcreteToAbstract _ -> do return ([NiceFunClause (getRange d) PublicAccess ConcreteDef termCheck catchall d] , ds) -- case: clauses match exactly one of the sigs [(x,(fits,rest))] -> do removeLoneSig x ds <- expandEllipsis fits cs <- mkClauses x ds False return ([FunDef (getRange fits) fits ConcreteDef NotInstanceDef termCheck x cs] , rest) -- case: clauses match more than one sigs (ambiguity) l -> throwError $ AmbiguousFunClauses lhs $ reverse $ map fst l -- "ambiguous function clause; cannot assign it uniquely to one type signature" Field{} -> (,ds) <$> niceAxioms FieldBlock [ d ] DataSig r CoInductive _ _ _ -> throwError (Codata r) Data r CoInductive _ _ _ _ -> throwError (Codata r) DataDef r CoInductive _ _ _ -> throwError (Codata r) DataSig r Inductive x tel t -> do pc <- use positivityCheckPragma uc <- use universeCheckPragma addLoneSig x $ DataName pc uc (,) <$> dataOrRec pc uc NiceDataDef NiceDataSig (niceAxioms DataBlock) r x (Just (tel, t)) Nothing <*> return ds Data r Inductive x tel t cs -> do pc <- use positivityCheckPragma -- Andreas, 2018-10-27, issue #3327 -- Propagate {-# NO_UNIVERSE_CHECK #-} pragma from signature to definition. -- Universe check is performed if both the current value of -- 'universeCheckPragma' AND the one from the signature say so. uc <- use universeCheckPragma uc <- if uc == NoUniverseCheck then return uc else getUniverseCheckFromSig x mt <- defaultTypeSig (DataName pc uc) x (Just t) (,) <$> dataOrRec pc uc NiceDataDef NiceDataSig (niceAxioms DataBlock) r x ((tel,) <$> mt) (Just (tel, cs)) <*> return ds DataDef r Inductive x tel cs -> do pc <- use positivityCheckPragma -- Andreas, 2018-10-27, issue #3327 -- Propagate {-# NO_UNIVERSE_CHECK #-} pragma from signature to definition. -- Universe check is performed if both the current value of -- 'universeCheckPragma' AND the one from the signature say so. uc <- use universeCheckPragma uc <- if uc == NoUniverseCheck then return uc else getUniverseCheckFromSig x mt <- defaultTypeSig (DataName pc uc) x Nothing (,) <$> dataOrRec pc uc NiceDataDef NiceDataSig (niceAxioms DataBlock) r x ((tel,) <$> mt) (Just (tel, cs)) <*> return ds RecordSig r x tel t -> do pc <- use positivityCheckPragma uc <- use universeCheckPragma addLoneSig x $ RecName pc uc return ([NiceRecSig r PublicAccess ConcreteDef pc uc x tel t] , ds) Record r x i e c tel t cs -> do pc <- use positivityCheckPragma -- Andreas, 2018-10-27, issue #3327 -- Propagate {-# NO_UNIVERSE_CHECK #-} pragma from signature to definition. -- Universe check is performed if both the current value of -- 'universeCheckPragma' AND the one from the signature say so. uc <- use universeCheckPragma uc <- if uc == NoUniverseCheck then return uc else getUniverseCheckFromSig x mt <- defaultTypeSig (RecName pc uc) x (Just t) (,) <$> dataOrRec pc uc (\ r o a pc uc x tel cs -> NiceRecDef r o a pc uc x i e c tel cs) NiceRecSig return r x ((tel,) <$> mt) (Just (tel, cs)) <*> return ds RecordDef r x i e c tel cs -> do pc <- use positivityCheckPragma -- Andreas, 2018-10-27, issue #3327 -- Propagate {-# NO_UNIVERSE_CHECK #-} pragma from signature to definition. -- Universe check is performed if both the current value of -- 'universeCheckPragma' AND the one from the signature say so. uc <- use universeCheckPragma uc <- if uc == NoUniverseCheck then return uc else getUniverseCheckFromSig x mt <- defaultTypeSig (RecName pc uc) x Nothing (,) <$> dataOrRec pc uc (\ r o a pc uc x tel cs -> NiceRecDef r o a pc uc x i e c tel cs) NiceRecSig return r x ((tel,) <$> mt) (Just (tel, cs)) <*> return ds Mutual r [] -> justWarning $ EmptyMutual r Mutual r ds' -> (,ds) <$> (singleton <$> (mkOldMutual r =<< nice ds')) Abstract r [] -> justWarning $ EmptyAbstract r Abstract r ds' -> (,ds) <$> (abstractBlock r =<< nice ds') Private r UserWritten [] -> justWarning $ EmptyPrivate r Private r o ds' -> (,ds) <$> (privateBlock r o =<< nice ds') InstanceB r [] -> justWarning $ EmptyInstance r InstanceB r ds' -> (,ds) <$> (instanceBlock r =<< nice ds') Macro r [] -> justWarning $ EmptyMacro r Macro r ds' -> (,ds) <$> (macroBlock r =<< nice ds') Postulate r [] -> justWarning $ EmptyPostulate r Postulate _ ds' -> (,ds) <$> niceAxioms PostulateBlock ds' Primitive r [] -> justWarning $ EmptyPrimitive r Primitive _ ds' -> (,ds) <$> (map toPrim <$> niceAxioms PrimitiveBlock ds') Module r x tel ds' -> return $ ([NiceModule r PublicAccess ConcreteDef x tel ds'] , ds) ModuleMacro r x modapp op is -> return $ ([NiceModuleMacro r PublicAccess x modapp op is] , ds) -- Fixity and syntax declarations and polarity pragmas have -- already been processed. Infix _ _ -> return ([], ds) Syntax _ _ -> return ([], ds) PatternSyn r n as p -> do return ([NicePatternSyn r n as p] , ds) Open r x is -> return ([NiceOpen r x is] , ds) Import r x as op is -> return ([NiceImport r x as op is] , ds) UnquoteDecl r xs e -> do tc <- use terminationCheckPragma return ([NiceUnquoteDecl r PublicAccess ConcreteDef NotInstanceDef tc xs e] , ds) UnquoteDef r xs e -> do sigs <- map fst . filter (isFunName . snd) . Map.toList <$> use loneSigs let missing = filter (`notElem` sigs) xs if null missing then do mapM_ removeLoneSig xs return ([NiceUnquoteDef r PublicAccess ConcreteDef TerminationCheck xs e] , ds) else throwError $ UnquoteDefRequiresSignature missing Pragma p -> nicePragma p ds nicePragma :: Pragma -> [Declaration] -> Nice ([NiceDeclaration], [Declaration]) nicePragma (TerminationCheckPragma r (TerminationMeasure _ x)) ds = if canHaveTerminationMeasure ds then withTerminationCheckPragma (TerminationMeasure r x) $ nice1 ds else do niceWarning $ InvalidTerminationCheckPragma r nice1 ds nicePragma (TerminationCheckPragma r NoTerminationCheck) ds = do -- This PRAGMA has been deprecated in favour of (NON_)TERMINATING -- We warn the user about it and then assume the function is NON_TERMINATING. niceWarning $ PragmaNoTerminationCheck r nicePragma (TerminationCheckPragma r NonTerminating) ds nicePragma (TerminationCheckPragma r tc) ds = if canHaveTerminationCheckPragma ds then withTerminationCheckPragma tc $ nice1 ds else do niceWarning $ InvalidTerminationCheckPragma r nice1 ds nicePragma (CatchallPragma r) ds = if canHaveCatchallPragma ds then withCatchallPragma True $ nice1 ds else do niceWarning $ InvalidCatchallPragma r nice1 ds nicePragma (NoPositivityCheckPragma r) ds = if canHaveNoPositivityCheckPragma ds then withPositivityCheckPragma False $ nice1 ds else do niceWarning $ InvalidNoPositivityCheckPragma r nice1 ds nicePragma (NoUniverseCheckPragma r) ds = if canHaveNoUniverseCheckPragma ds then withUniverseCheckPragma NoUniverseCheck $ nice1 ds else do niceWarning $ InvalidNoUniverseCheckPragma r nice1 ds nicePragma p@CompilePragma{} ds = do niceWarning $ PragmaCompiled (getRange p) return ([NicePragma (getRange p) p], ds) nicePragma (PolarityPragma{}) ds = return ([], ds) nicePragma (BuiltinPragma r str qn@(QName x)) ds = do return ([NicePragma r (BuiltinPragma r str qn)], ds) nicePragma p ds = return ([NicePragma (getRange p) p], ds) canHaveTerminationMeasure :: [Declaration] -> Bool canHaveTerminationMeasure [] = False canHaveTerminationMeasure (d:ds) = case d of TypeSig{} -> True (Pragma p) | isAttachedPragma p -> canHaveTerminationMeasure ds _ -> False canHaveTerminationCheckPragma :: [Declaration] -> Bool canHaveTerminationCheckPragma [] = False canHaveTerminationCheckPragma (d:ds) = case d of Mutual _ ds -> any (canHaveTerminationCheckPragma . singleton) ds TypeSig{} -> True FunClause{} -> True UnquoteDecl{} -> True (Pragma p) | isAttachedPragma p -> canHaveTerminationCheckPragma ds _ -> False canHaveCatchallPragma :: [Declaration] -> Bool canHaveCatchallPragma [] = False canHaveCatchallPragma (d:ds) = case d of FunClause{} -> True (Pragma p) | isAttachedPragma p -> canHaveCatchallPragma ds _ -> False canHaveNoPositivityCheckPragma :: [Declaration] -> Bool canHaveNoPositivityCheckPragma [] = False canHaveNoPositivityCheckPragma (d:ds) = case d of Mutual _ ds -> any (canHaveNoPositivityCheckPragma . singleton) ds Data _ Inductive _ _ _ _ -> True DataSig _ Inductive _ _ _ -> True DataDef _ Inductive _ _ _ -> True Record{} -> True RecordSig{} -> True RecordDef{} -> True Pragma p | isAttachedPragma p -> canHaveNoPositivityCheckPragma ds _ -> False canHaveNoUniverseCheckPragma :: [Declaration] -> Bool canHaveNoUniverseCheckPragma [] = False canHaveNoUniverseCheckPragma (d:ds) = case d of Data _ Inductive _ _ _ _ -> True DataSig _ Inductive _ _ _ -> True DataDef _ Inductive _ _ _ -> True Record{} -> True RecordSig{} -> True RecordDef{} -> True Pragma p | isAttachedPragma p -> canHaveNoPositivityCheckPragma ds _ -> False -- Pragma that attaches to the following declaration. isAttachedPragma :: Pragma -> Bool isAttachedPragma p = case p of TerminationCheckPragma{} -> True CatchallPragma{} -> True NoPositivityCheckPragma{} -> True NoUniverseCheckPragma{} -> True _ -> False -- We could add a default type signature here, but at the moment we can't -- infer the type of a record or datatype, so better to just fail here. defaultTypeSig :: DataRecOrFun -> Name -> Maybe Expr -> Nice (Maybe Expr) defaultTypeSig k x t@Just{} = return t defaultTypeSig k x Nothing = do caseMaybeM (getSig x) (return Nothing) $ \ k' -> do unless (sameKind k k') $ throwError $ WrongDefinition x k' k Nothing <$ removeLoneSig x dataOrRec :: forall a decl . PositivityCheck -> UniverseCheck -> (Range -> Origin -> IsAbstract -> PositivityCheck -> UniverseCheck -> Name -> [LamBinding] -> [decl] -> NiceDeclaration) -- ^ Construct definition. -> (Range -> Access -> IsAbstract -> PositivityCheck -> UniverseCheck -> Name -> [LamBinding] -> Expr -> NiceDeclaration) -- ^ Construct signature. -> ([a] -> Nice [decl]) -- ^ Constructor checking. -> Range -> Name -- ^ Data/record type name. -> Maybe ([LamBinding], Expr) -- ^ Parameters and type. If not @Nothing@ a signature is created. -> Maybe ([LamBinding], [a]) -- ^ Parameters and constructors. If not @Nothing@, a definition body is created. -> Nice [NiceDeclaration] dataOrRec pc uc mkDef mkSig niceD r x mt mcs = do mds <- Trav.forM mcs $ \ (tel, cs) -> (tel,) <$> niceD cs -- We set origin to UserWritten if the user split the data/rec herself, -- and to Inserted if the she wrote a single declaration that we're -- splitting up here. We distinguish these because the scoping rules for -- generalizable variables differ in these cases. let o | isJust mt && isJust mcs = Inserted | otherwise = UserWritten return $ catMaybes $ [ mt <&> \ (tel, t) -> mkSig (fuseRange x t) PublicAccess ConcreteDef pc uc x tel t , mds <&> \ (tel, ds) -> mkDef r o ConcreteDef pc uc x (caseMaybe mt tel $ const $ concatMap dropTypeAndModality tel) ds -- If a type is given (mt /= Nothing), we have to delete the types in @tel@ -- for the data definition, lest we duplicate them. And also drop modalities (#1886). ] where -- | Drop type annotations and lets from bindings. dropTypeAndModality :: LamBinding -> [LamBinding] dropTypeAndModality (DomainFull (TBind _ xs _)) = map (DomainFree . setModality defaultModality) xs dropTypeAndModality (DomainFull TLet{}) = [] dropTypeAndModality (DomainFree x) = [DomainFree $ setModality defaultModality x] -- Translate axioms niceAxioms :: KindOfBlock -> [TypeSignatureOrInstanceBlock] -> Nice [NiceDeclaration] niceAxioms b ds = liftM List.concat $ mapM (niceAxiom b) ds niceAxiom :: KindOfBlock -> TypeSignatureOrInstanceBlock -> Nice [NiceDeclaration] niceAxiom b d = case d of TypeSig rel x t -> do return [ Axiom (getRange d) PublicAccess ConcreteDef NotInstanceDef rel x t ] Field i x argt | b == FieldBlock -> do return [ NiceField (getRange d) PublicAccess ConcreteDef i x argt ] InstanceB r decls -> do instanceBlock r =<< niceAxioms InstanceBlock decls Pragma p@(RewritePragma r _) -> do return [ NicePragma r p ] _ -> throwError $ WrongContentBlock b $ getRange d toPrim :: NiceDeclaration -> NiceDeclaration toPrim (Axiom r p a i rel x t) = PrimitiveFunction r p a x t toPrim _ = __IMPOSSIBLE__ -- Create a function definition. mkFunDef info termCheck x mt ds0 = do ds <- expandEllipsis ds0 cs <- mkClauses x ds False return [ FunSig (fuseRange x t) PublicAccess ConcreteDef NotInstanceDef NotMacroDef info termCheck x t , FunDef (getRange ds0) ds0 ConcreteDef NotInstanceDef termCheck x cs ] where t = case mt of Just t -> t Nothing -> underscore (getRange x) underscore r = Underscore r Nothing expandEllipsis :: [Declaration] -> Nice [Declaration] expandEllipsis [] = return [] expandEllipsis (d@(FunClause lhs@(LHS p _ _) _ _ _) : ds) | hasEllipsis p = (d :) <$> expandEllipsis ds | otherwise = (d :) <$> expand (killRange p) ds where expand :: Pattern -> [Declaration] -> Nice [Declaration] expand _ [] = return [] expand p (d : ds) = do case d of Pragma (CatchallPragma _) -> do (d :) <$> expand p ds FunClause (LHS p0 eqs es) rhs wh ca -> do case hasEllipsis' p0 of ManyHoles -> throwError $ MultipleEllipses p0 OneHole cxt -> do -- Replace the ellipsis by @p@. let p1 = cxt p let d' = FunClause (LHS p1 eqs es) rhs wh ca -- If we have with-expressions (es /= []) then the following -- ellipses also get the additional patterns in p0. (d' :) <$> expand (if null es then p else killRange p1) ds ZeroHoles _ -> do -- We can have ellipses after a fun clause without. -- They refer to the last clause that introduced new with-expressions. -- Same here: If we have new with-expressions, the next ellipses will -- refer to us. -- Andreas, Jesper, 2017-05-13, issue #2578 -- Need to update the range also on the next with-patterns. (d :) <$> expand (if null es then p else killRange p0) ds _ -> __IMPOSSIBLE__ expandEllipsis _ = __IMPOSSIBLE__ -- Turn function clauses into nice function clauses. mkClauses :: Name -> [Declaration] -> Catchall -> Nice [Clause] mkClauses _ [] _ = return [] mkClauses x (Pragma (CatchallPragma r) : cs) True = do niceWarning $ InvalidCatchallPragma r mkClauses x cs True mkClauses x (Pragma (CatchallPragma r) : cs) False = do when (null cs) $ niceWarning $ InvalidCatchallPragma r mkClauses x cs True mkClauses x (FunClause lhs rhs wh ca : cs) catchall | null (lhsWithExpr lhs) || hasEllipsis lhs = (Clause x (ca || catchall) lhs rhs wh [] :) <$> mkClauses x cs False -- Will result in an error later. mkClauses x (FunClause lhs rhs wh ca : cs) catchall = do when (null withClauses) $ throwError $ MissingWithClauses x lhs wcs <- mkClauses x withClauses False (Clause x (ca || catchall) lhs rhs wh wcs :) <$> mkClauses x cs' False where (withClauses, cs') = subClauses cs -- A clause is a subclause if the number of with-patterns is -- greater or equal to the current number of with-patterns plus the -- number of with arguments. numWith = numberOfWithPatterns p + length es where LHS p _ es = lhs subClauses :: [Declaration] -> ([Declaration],[Declaration]) subClauses (c@(FunClause (LHS p0 _ _) _ _ _) : cs) | isEllipsis p0 || numberOfWithPatterns p0 >= numWith = mapFst (c:) (subClauses cs) | otherwise = ([], c:cs) subClauses (c@(Pragma (CatchallPragma r)) : cs) = case subClauses cs of ([], cs') -> ([], c:cs') (cs, cs') -> (c:cs, cs') subClauses [] = ([],[]) subClauses _ = __IMPOSSIBLE__ mkClauses _ _ _ = __IMPOSSIBLE__ -- for finding clauses for a type sig in mutual blocks couldBeFunClauseOf :: Maybe Fixity' -> Name -> Declaration -> Bool couldBeFunClauseOf mFixity x (Pragma (CatchallPragma{})) = True couldBeFunClauseOf mFixity x (FunClause (LHS p _ _) _ _ _) = hasEllipsis p || let pns = patternNames p xStrings = nameStringParts x patStrings = concatMap nameStringParts pns in -- trace ("x = " ++ prettyShow x) $ -- trace ("pns = " ++ show pns) $ -- trace ("xStrings = " ++ show xStrings) $ -- trace ("patStrings = " ++ show patStrings) $ -- trace ("mFixity = " ++ show mFixity) $ case (headMaybe pns, mFixity) of -- first identifier in the patterns is the fun.symbol? (Just y, _) | x == y -> True -- trace ("couldBe since y = " ++ prettyShow y) $ True -- are the parts of x contained in p _ | xStrings `isSublistOf` patStrings -> True -- trace ("couldBe since isSublistOf") $ True -- looking for a mixfix fun.symb (_, Just fix) -> -- also matches in case of a postfix let notStrings = stringParts (theNotation fix) in -- trace ("notStrings = " ++ show notStrings) $ -- trace ("patStrings = " ++ show patStrings) $ (not $ null notStrings) && (notStrings `isSublistOf` patStrings) -- not a notation, not first id: give up _ -> False -- trace ("couldBe not (case default)") $ False couldBeFunClauseOf _ _ _ = False -- trace ("couldBe not (fun default)") $ False -- | Turn an old-style mutual block into a new style mutual block -- by pushing the definitions to the end. mkOldMutual :: Range -- ^ Range of the whole @mutual@ block. -> [NiceDeclaration] -- ^ Declarations inside the block. -> Nice NiceDeclaration -- ^ Returns a 'NiceMutual'. mkOldMutual r ds' = do -- Postulate the missing definitions let ps = Map.fromList loneNames checkLoneSigs ps let ds = replaceSigs ps ds' -- -- Remove the declarations that aren't allowed in old style mutual blocks -- ds <- fmap catMaybes $ forM ds $ \ d -> let success = pure (Just d) in case d of -- -- Andreas, 2013-11-23 allow postulates in mutual blocks -- Axiom{} -> success -- -- Andreas, 2017-10-09, issue #2576, raise error about missing type signature -- -- in ConcreteToAbstract rather than here. -- NiceFunClause{} -> success -- -- Andreas, 2018-05-11, issue #3052, allow pat.syn.s in mutual blocks -- NicePatternSyn{} -> success -- -- Otherwise, only categorized signatures and definitions are allowed: -- -- Data, Record, Fun -- _ -> if (declKind d /= OtherDecl) then success -- else Nothing <$ niceWarning (NotAllowedInMutual (getRange d) $ declName d) -- Sort the declarations in the mutual block. -- Declarations of names go to the top. (Includes module definitions.) -- Definitions of names go to the bottom. -- Some declarations are forbidden, as their positioning could confuse -- the user. (top, bottom, invalid) <- forEither3M ds $ \ d -> do let top = return (In1 d) bottom = return (In2 d) invalid s = In3 d <$ do niceWarning $ NotAllowedInMutual (getRange d) s case d of -- Andreas, 2013-11-23 allow postulates in mutual blocks Axiom{} -> top NiceField{} -> top PrimitiveFunction{} -> top -- Nested mutual blocks should have been flattened by now. NiceMutual{} -> __IMPOSSIBLE__ -- Andreas, 2018-10-29, issue #3246 -- We could allow modules (top), but this is potentially confusing. NiceModule{} -> invalid "Module definitions" NiceModuleMacro{} -> top NiceOpen{} -> top NiceImport{} -> top NiceRecSig{} -> top NiceDataSig{} -> top -- Andreas, 2017-10-09, issue #2576, raise error about missing type signature -- in ConcreteToAbstract rather than here. NiceFunClause{} -> bottom FunSig{} -> top FunDef{} -> bottom NiceDataDef{} -> bottom NiceRecDef{} -> bottom -- Andreas, 2018-05-11, issue #3052, allow pat.syn.s in mutual blocks -- Andreas, 2018-10-29: We shift pattern synonyms to the bottom -- since they might refer to constructors defined in a data types -- just above them. NicePatternSyn{} -> bottom NiceGeneralize{} -> top NiceUnquoteDecl{} -> top NiceUnquoteDef{} -> bottom NicePragma r pragma -> case pragma of OptionsPragma{} -> top -- error thrown in the type checker -- Some builtins require a definition, and they affect type checking -- Thus, we do not handle BUILTINs in mutual blocks (at least for now). BuiltinPragma{} -> invalid "BUILTIN pragmas" -- The REWRITE pragma behaves differently before or after the def. -- and affects type checking. Thus, we refuse it here. RewritePragma{} -> invalid "REWRITE pragmas" -- Compiler pragmas are not needed for type checking, thus, -- can go to the bottom. ForeignPragma{} -> bottom CompilePragma{} -> bottom StaticPragma{} -> bottom InlinePragma{} -> bottom ImpossiblePragma{} -> top -- error thrown in scope checker EtaPragma{} -> bottom -- needs record definition WarningOnUsage{} -> top InjectivePragma{} -> top -- only needs name, not definition DisplayPragma{} -> top -- only for printing -- The attached pragmas have already been handled at this point. CatchallPragma{} -> __IMPOSSIBLE__ TerminationCheckPragma{} -> __IMPOSSIBLE__ NoPositivityCheckPragma{} -> __IMPOSSIBLE__ PolarityPragma{} -> __IMPOSSIBLE__ NoUniverseCheckPragma{} -> __IMPOSSIBLE__ -- -- Pull type signatures to the top -- let (sigs, other) = List.partition isTypeSig ds -- -- Push definitions to the bottom -- let (other, defs) = flip List.partition ds $ \case -- FunDef{} -> False -- NiceDataDef{} -> False -- NiceRecDef{} -> False -- NiceFunClause{} -> False -- NicePatternSyn{} -> False -- NiceUnquoteDef{} -> False -- _ -> True -- Compute termination checking flag for mutual block tc0 <- use terminationCheckPragma let tcs = map termCheck ds tc <- combineTermChecks r (tc0:tcs) -- Compute positivity checking flag for mutual block pc0 <- use positivityCheckPragma let pc :: PositivityCheck pc = pc0 && all positivityCheckOldMutual ds return $ NiceMutual r tc pc $ top ++ bottom -- return $ NiceMutual r tc pc $ other ++ defs -- return $ NiceMutual r tc pc $ sigs ++ other where -- isTypeSig Axiom{} = True -- isTypeSig d | LoneSig{} <- declKind d = True -- isTypeSig _ = False sigNames = [ (x, k) | LoneSig k x <- map declKind ds' ] defNames = [ (x, k) | LoneDefs k xs <- map declKind ds', x <- xs ] -- compute the set difference with equality just on names loneNames = [ (x, k) | (x, k) <- sigNames, List.all ((x /=) . fst) defNames ] -- Andreas, 2013-02-28 (issue 804): -- do not termination check a mutual block if any of its -- inner declarations comes with a {-# NO_TERMINATION_CHECK #-} termCheck (FunSig _ _ _ _ _ _ tc _ _) = tc termCheck (FunDef _ _ _ _ tc _ _) = tc -- ASR (28 December 2015): Is this equation necessary? termCheck (NiceMutual _ tc _ _) = __IMPOSSIBLE__ termCheck (NiceUnquoteDecl _ _ _ _ tc _ _) = tc termCheck (NiceUnquoteDef _ _ _ tc _ _) = tc termCheck Axiom{} = TerminationCheck termCheck NiceField{} = TerminationCheck termCheck PrimitiveFunction{} = TerminationCheck termCheck NiceModule{} = TerminationCheck termCheck NiceModuleMacro{} = TerminationCheck termCheck NiceOpen{} = TerminationCheck termCheck NiceImport{} = TerminationCheck termCheck NicePragma{} = TerminationCheck termCheck NiceRecSig{} = TerminationCheck termCheck NiceDataSig{} = TerminationCheck termCheck NiceFunClause{} = TerminationCheck termCheck NiceDataDef{} = TerminationCheck termCheck NiceRecDef{} = TerminationCheck termCheck NicePatternSyn{} = TerminationCheck termCheck NiceGeneralize{} = TerminationCheck -- ASR (26 December 2015): Do not positivity check a mutual -- block if any of its inner declarations comes with a -- NO_POSITIVITY_CHECK pragma. See Issue 1614. positivityCheckOldMutual :: NiceDeclaration -> PositivityCheck positivityCheckOldMutual (NiceDataDef _ _ _ pc _ _ _ _) = pc positivityCheckOldMutual (NiceDataSig _ _ _ pc _ _ _ _) = pc positivityCheckOldMutual (NiceMutual _ _ pc _) = __IMPOSSIBLE__ positivityCheckOldMutual (NiceRecSig _ _ _ pc _ _ _ _) = pc positivityCheckOldMutual (NiceRecDef _ _ _ pc _ _ _ _ _ _ _)= pc positivityCheckOldMutual _ = True -- A mutual block cannot have a measure, -- but it can skip termination check. abstractBlock _ [] = return [] abstractBlock r ds = do let (ds', anyChange) = runChange $ mkAbstract ds inherited = r == noRange if anyChange then return ds' else do -- hack to avoid failing on inherited abstract blocks in where clauses unless inherited $ niceWarning $ UselessAbstract r return ds -- no change! privateBlock _ _ [] = return [] privateBlock r o ds = do let (ds', anyChange) = runChange $ mkPrivate o ds if anyChange then return ds' else do when (o == UserWritten) $ niceWarning $ UselessPrivate r return ds -- no change! instanceBlock _ [] = return [] instanceBlock r ds = do let (ds', anyChange) = runChange $ mapM mkInstance ds if anyChange then return ds' else do niceWarning $ UselessInstance r return ds -- no change! -- Make a declaration eligible for instance search. mkInstance :: Updater NiceDeclaration mkInstance d = case d of Axiom r p a i rel x e -> (\ i -> Axiom r p a i rel x e) <$> setInstance i FunSig r p a i m rel tc x e -> (\ i -> FunSig r p a i m rel tc x e) <$> setInstance i NiceUnquoteDecl r p a i tc x e -> (\ i -> NiceUnquoteDecl r p a i tc x e) <$> setInstance i NiceMutual r termCheck pc ds -> NiceMutual r termCheck pc <$> mapM mkInstance ds NiceFunClause{} -> return d FunDef r ds a i tc x cs -> (\ i -> FunDef r ds a i tc x cs) <$> setInstance i NiceField{} -> return d -- Field instance are handled by the parser PrimitiveFunction{} -> return d NiceUnquoteDef{} -> return d NiceRecSig{} -> return d NiceDataSig{} -> return d NiceModuleMacro{} -> return d NiceModule{} -> return d NicePragma{} -> return d NiceOpen{} -> return d NiceImport{} -> return d NiceDataDef{} -> return d NiceRecDef{} -> return d NicePatternSyn{} -> return d NiceGeneralize{} -> return d setInstance :: Updater IsInstance setInstance i = case i of InstanceDef -> return i _ -> dirty $ InstanceDef macroBlock r ds = mapM mkMacro ds mkMacro :: NiceDeclaration -> Nice NiceDeclaration mkMacro d = case d of FunSig r p a i _ rel tc x e -> return $ FunSig r p a i MacroDef rel tc x e FunDef{} -> return d _ -> throwError (BadMacroDef d) -- | Make a declaration abstract. -- -- Mark computation as 'dirty' if there was a declaration that could be made abstract. -- If no abstraction is taking place, we want to complain about 'UselessAbstract'. -- -- Alternatively, we could only flag 'dirty' if a non-abstract thing was abstracted. -- Then, nested @abstract@s would sometimes also be complained about. class MakeAbstract a where mkAbstract :: Updater a default mkAbstract :: (Traversable f, MakeAbstract a', a ~ f a') => Updater a mkAbstract = traverse mkAbstract instance MakeAbstract a => MakeAbstract [a] where -- Default definition kicks in here! -- But note that we still have to declare the instance! -- Leads to overlap with 'WhereClause': -- instance (Traversable f, MakeAbstract a) => MakeAbstract (f a) where -- mkAbstract = traverse mkAbstract instance MakeAbstract IsAbstract where mkAbstract a = case a of AbstractDef -> return a ConcreteDef -> dirty $ AbstractDef instance MakeAbstract NiceDeclaration where mkAbstract d = case d of NiceMutual r termCheck pc ds -> NiceMutual r termCheck pc <$> mkAbstract ds FunDef r ds a i tc x cs -> (\ a -> FunDef r ds a i tc x) <$> mkAbstract a <*> mkAbstract cs NiceDataDef r o a pc uc x ps cs -> (\ a -> NiceDataDef r o a pc uc x ps) <$> mkAbstract a <*> mkAbstract cs NiceRecDef r o a pc uc x i e c ps cs -> (\ a -> NiceRecDef r o a pc uc x i e c ps) <$> mkAbstract a <*> return cs NiceFunClause r p a termCheck catchall d -> (\ a -> NiceFunClause r p a termCheck catchall d) <$> mkAbstract a -- The following declarations have an @InAbstract@ field -- but are not really definitions, so we do count them into -- the declarations which can be made abstract -- (thus, do not notify progress with @dirty@). Axiom r p a i rel x e -> return $ Axiom r p AbstractDef i rel x e FunSig r p a i m rel tc x e -> return $ FunSig r p AbstractDef i m rel tc x e NiceRecSig r p a pc uc x ls t -> return $ NiceRecSig r p AbstractDef pc uc x ls t NiceDataSig r p a pc uc x ls t -> return $ NiceDataSig r p AbstractDef pc uc x ls t NiceField r p _ i x e -> return $ NiceField r p AbstractDef i x e PrimitiveFunction r p _ x e -> return $ PrimitiveFunction r p AbstractDef x e -- Andreas, 2016-07-17 it does have effect on unquoted defs. -- Need to set updater state to dirty! NiceUnquoteDecl r p _ i t x e -> dirty $ NiceUnquoteDecl r p AbstractDef i t x e NiceUnquoteDef r p _ t x e -> dirty $ NiceUnquoteDef r p AbstractDef t x e NiceModule{} -> return d NiceModuleMacro{} -> return d NicePragma{} -> return d NiceOpen{} -> return d NiceImport{} -> return d NicePatternSyn{} -> return d NiceGeneralize{} -> return d instance MakeAbstract Clause where mkAbstract (Clause x catchall lhs rhs wh with) = do Clause x catchall lhs rhs <$> mkAbstract wh <*> mkAbstract with -- | Contents of a @where@ clause are abstract if the parent is. instance MakeAbstract WhereClause where mkAbstract NoWhere = return $ NoWhere mkAbstract (AnyWhere ds) = dirty $ AnyWhere [Abstract noRange ds] mkAbstract (SomeWhere m a ds) = dirty $ SomeWhere m a [Abstract noRange ds] -- | Make a declaration private. -- -- Andreas, 2012-11-17: -- Mark computation as 'dirty' if there was a declaration that could be privatized. -- If no privatization is taking place, we want to complain about 'UselessPrivate'. -- -- Alternatively, we could only flag 'dirty' if a non-private thing was privatized. -- Then, nested @private@s would sometimes also be complained about. class MakePrivate a where mkPrivate :: Origin -> Updater a default mkPrivate :: (Traversable f, MakePrivate a', a ~ f a') => Origin -> Updater a mkPrivate o = traverse $ mkPrivate o instance MakePrivate a => MakePrivate [a] where -- Default definition kicks in here! -- But note that we still have to declare the instance! -- Leads to overlap with 'WhereClause': -- instance (Traversable f, MakePrivate a) => MakePrivate (f a) where -- mkPrivate = traverse mkPrivate instance MakePrivate Access where mkPrivate o p = case p of PrivateAccess{} -> return p -- OR? return $ PrivateAccess o _ -> dirty $ PrivateAccess o instance MakePrivate NiceDeclaration where mkPrivate o d = case d of Axiom r p a i rel x e -> (\ p -> Axiom r p a i rel x e) <$> mkPrivate o p NiceField r p a i x e -> (\ p -> NiceField r p a i x e) <$> mkPrivate o p PrimitiveFunction r p a x e -> (\ p -> PrimitiveFunction r p a x e) <$> mkPrivate o p NiceMutual r termCheck pc ds -> (\ p -> NiceMutual r termCheck pc p) <$> mkPrivate o ds NiceModule r p a x tel ds -> (\ p -> NiceModule r p a x tel ds) <$> mkPrivate o p NiceModuleMacro r p x ma op is -> (\ p -> NiceModuleMacro r p x ma op is) <$> mkPrivate o p FunSig r p a i m rel tc x e -> (\ p -> FunSig r p a i m rel tc x e) <$> mkPrivate o p NiceRecSig r p a pc uc x ls t -> (\ p -> NiceRecSig r p a pc uc x ls t) <$> mkPrivate o p NiceDataSig r p a pc uc x ls t -> (\ p -> NiceDataSig r p a pc uc x ls t) <$> mkPrivate o p NiceFunClause r p a termCheck catchall d -> (\ p -> NiceFunClause r p a termCheck catchall d) <$> mkPrivate o p NiceUnquoteDecl r p a i t x e -> (\ p -> NiceUnquoteDecl r p a i t x e) <$> mkPrivate o p NiceUnquoteDef r p a t x e -> (\ p -> NiceUnquoteDef r p a t x e) <$> mkPrivate o p NiceGeneralize r p i x t -> (\ p -> NiceGeneralize r p i x t) <$> mkPrivate o p NicePragma _ _ -> return $ d NiceOpen _ _ _ -> return $ d NiceImport _ _ _ _ _ -> return $ d -- Andreas, 2016-07-08, issue #2089 -- we need to propagate 'private' to the named where modules FunDef r ds a i tc x cls -> FunDef r ds a i tc x <$> mkPrivate o cls NiceDataDef{} -> return $ d NiceRecDef{} -> return $ d NicePatternSyn _ _ _ _ -> return $ d instance MakePrivate Clause where mkPrivate o (Clause x catchall lhs rhs wh with) = do Clause x catchall lhs rhs <$> mkPrivate o wh <*> mkPrivate o with instance MakePrivate WhereClause where mkPrivate o NoWhere = return $ NoWhere -- @where@-declarations are protected behind an anonymous module, -- thus, they are effectively private by default. mkPrivate o (AnyWhere ds) = return $ AnyWhere ds -- Andreas, 2016-07-08 -- A @where@-module is private if the parent function is private. -- The contents of this module are not private, unless declared so! -- Thus, we do not recurse into the @ds@ (could not anyway). mkPrivate o (SomeWhere m a ds) = mkPrivate o a <&> \ a' -> SomeWhere m a' ds -- The following function is (at the time of writing) only used three -- times: for building Lets, and for printing error messages. -- | (Approximately) convert a 'NiceDeclaration' back to a list of -- 'Declaration's. notSoNiceDeclarations :: NiceDeclaration -> [Declaration] notSoNiceDeclarations d = case d of Axiom _ _ _ i rel x e -> inst i [TypeSig rel x e] NiceField _ _ _ i x argt -> [Field i x argt] PrimitiveFunction r _ _ x e -> [Primitive r [TypeSig defaultArgInfo x e]] NiceMutual r _ _ ds -> [Mutual r $ concatMap notSoNiceDeclarations ds] NiceModule r _ _ x tel ds -> [Module r x tel ds] NiceModuleMacro r _ x ma o dir -> [ModuleMacro r x ma o dir] NiceOpen r x dir -> [Open r x dir] NiceImport r x as o dir -> [Import r x as o dir] NicePragma _ p -> [Pragma p] NiceRecSig r _ _ _ _ x bs e -> [RecordSig r x bs e] NiceDataSig r _ _ _ _ x bs e -> [DataSig r Inductive x bs e] NiceFunClause _ _ _ _ _ d -> [d] FunSig _ _ _ i _ rel tc x e -> inst i [TypeSig rel x e] FunDef _r ds _ _ _ _ _ -> ds NiceDataDef r _ _ _ _ x bs cs -> [DataDef r Inductive x bs $ concatMap notSoNiceDeclarations cs] NiceRecDef r _ _ _ _ x i e c bs ds -> [RecordDef r x i e c bs ds] NicePatternSyn r n as p -> [PatternSyn r n as p] NiceGeneralize r _ i n e -> [Generalize r [TypeSig i n e]] NiceUnquoteDecl r _ _ i _ x e -> inst i [UnquoteDecl r x e] NiceUnquoteDef r _ _ _ x e -> [UnquoteDef r x e] where inst InstanceDef ds = [InstanceB (getRange ds) ds] inst NotInstanceDef ds = ds -- | Has the 'NiceDeclaration' a field of type 'IsAbstract'? niceHasAbstract :: NiceDeclaration -> Maybe IsAbstract niceHasAbstract d = case d of Axiom{} -> Nothing NiceField _ _ a _ _ _ -> Just a PrimitiveFunction _ _ a _ _ -> Just a NiceMutual{} -> Nothing NiceModule _ _ a _ _ _ -> Just a NiceModuleMacro{} -> Nothing NiceOpen{} -> Nothing NiceImport{} -> Nothing NicePragma{} -> Nothing NiceRecSig{} -> Nothing NiceDataSig{} -> Nothing NiceFunClause _ _ a _ _ _ -> Just a FunSig{} -> Nothing FunDef _ _ a _ _ _ _ -> Just a NiceDataDef _ _ a _ _ _ _ _ -> Just a NiceRecDef _ _ a _ _ _ _ _ _ _ _ -> Just a NicePatternSyn{} -> Nothing NiceGeneralize{} -> Nothing NiceUnquoteDecl _ _ a _ _ _ _ -> Just a NiceUnquoteDef _ _ a _ _ _ -> Just a Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Generic.hs0000644000000000000000000002252413466402171020236 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | Generic traversal and reduce for concrete syntax, -- in the style of "Agda.Syntax.Internal.Generic". -- -- However, here we use the terminology of 'Data.Traversable'. module Agda.Syntax.Concrete.Generic where import Data.Traversable import Data.Monoid import Data.Foldable import Agda.Syntax.Common import Agda.Syntax.Concrete import Agda.Utils.Either #include "undefined.h" import Agda.Utils.Impossible -- | Generic traversals for concrete expressions. -- -- Note: does not go into patterns! class ExprLike a where mapExpr :: (Expr -> Expr) -> a -> a -- ^ This corresponds to 'map'. traverseExpr :: Monad m => (Expr -> m Expr) -> a -> m a -- ^ This corresponds to 'mapM'. foldExpr :: Monoid m => (Expr -> m) -> a -> m -- ^ This is a reduce. traverseExpr = __IMPOSSIBLE__ -- TODO: implement! foldExpr = __IMPOSSIBLE__ -- TODO: implement! -- * Instances for things that do not contain expressions. instance ExprLike Name where mapExpr f = id instance ExprLike QName where mapExpr f = id instance ExprLike Bool where mapExpr f = id -- * Instances for functors. instance ExprLike a => ExprLike (Named name a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike (Arg a) where -- TODO guilhem mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike [a] where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike (Maybe a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike (MaybePlaceholder a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance (ExprLike a, ExprLike b) => ExprLike (Either a b) where mapExpr f = mapEither (mapExpr f) (mapExpr f) traverseExpr f = traverseEither (traverseExpr f) (traverseExpr f) foldExpr f = either (foldExpr f) (foldExpr f) instance ExprLike a => ExprLike (TypedBinding' a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike (RHS' a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance ExprLike a => ExprLike (WhereClause' a) where mapExpr = fmap . mapExpr traverseExpr = traverse . traverseExpr foldExpr = foldMap . foldExpr instance (ExprLike a, ExprLike b) => ExprLike (a, b) where mapExpr f (x, y) = (mapExpr f x, mapExpr f y) traverseExpr f (x, y) = (,) <$> traverseExpr f x <*> traverseExpr f y foldExpr f (x, y) = foldExpr f x `mappend` foldExpr f y instance (ExprLike a, ExprLike b, ExprLike c) => ExprLike (a, b, c) where mapExpr f (x, y, z) = (mapExpr f x, mapExpr f y, mapExpr f z) traverseExpr f (x, y, z) = (,,) <$> traverseExpr f x <*> traverseExpr f y <*> traverseExpr f z foldExpr f (x, y, z) = foldExpr f x `mappend` foldExpr f y `mappend` foldExpr f z instance (ExprLike a, ExprLike b, ExprLike c, ExprLike d) => ExprLike (a, b, c, d) where mapExpr f (x, y, z, w) = (mapExpr f x, mapExpr f y, mapExpr f z, mapExpr f w) traverseExpr f (x, y, z, w) = (,,,) <$> traverseExpr f x <*> traverseExpr f y <*> traverseExpr f z <*> traverseExpr f w foldExpr f (x, y, z, w) = foldExpr f x `mappend` foldExpr f y `mappend` foldExpr f z `mappend` foldExpr f w -- * Interesting instances instance ExprLike Expr where mapExpr f e0 = case e0 of Ident{} -> f $ e0 Lit{} -> f $ e0 QuestionMark{} -> f $ e0 Underscore{} -> f $ e0 RawApp r es -> f $ RawApp r $ mapE es App r e es -> f $ App r (mapE e) $ mapE es OpApp r q ns es -> f $ OpApp r q ns $ mapE es WithApp r e es -> f $ WithApp r (mapE e) $ mapE es HiddenArg r e -> f $ HiddenArg r $ mapE e InstanceArg r e -> f $ InstanceArg r $ mapE e Lam r bs e -> f $ Lam r (mapE bs) $ mapE e AbsurdLam{} -> f $ e0 ExtendedLam r cs -> f $ ExtendedLam r $ mapE cs Fun r a b -> f $ Fun r (mapE <$> a) $ mapE b Pi tel e -> f $ Pi (mapE tel) $ mapE e Set{} -> f $ e0 Prop{} -> f $ e0 SetN{} -> f $ e0 PropN{} -> f $ e0 Rec r es -> f $ Rec r $ mapE es RecUpdate r e es -> f $ RecUpdate r (mapE e) $ mapE es Let r ds e -> f $ Let r (mapE ds) $ mapE e Paren r e -> f $ Paren r $ mapE e IdiomBrackets r e -> f $ IdiomBrackets r $ mapE e DoBlock r ss -> f $ DoBlock r $ mapE ss Absurd{} -> f $ e0 As r x e -> f $ As r x $ mapE e Dot r e -> f $ Dot r $ mapE e ETel tel -> f $ ETel $ mapE tel QuoteGoal r x e -> f $ QuoteGoal r x $ mapE e QuoteContext r -> f $ e0 Tactic r e es -> f $ Tactic r (mapE e) $ mapE es Quote{} -> f $ e0 QuoteTerm{} -> f $ e0 Unquote{} -> f $ e0 DontCare e -> f $ DontCare $ mapE e Equal{} -> f $ e0 Ellipsis{} -> f $ e0 Generalized e -> f $ Generalized $ mapE e where mapE e = mapExpr f e instance ExprLike FieldAssignment where mapExpr f (FieldAssignment x e) = FieldAssignment x (mapExpr f e) traverseExpr f (FieldAssignment x e) = (\e' -> FieldAssignment x e') <$> traverseExpr f e foldExpr f (FieldAssignment _ e) = foldExpr f e instance ExprLike ModuleAssignment where mapExpr f (ModuleAssignment m es i) = ModuleAssignment m (mapExpr f es) i traverseExpr f (ModuleAssignment m es i) = (\es' -> ModuleAssignment m es' i) <$> traverseExpr f es foldExpr f (ModuleAssignment m es i) = foldExpr f es instance ExprLike a => ExprLike (OpApp a) where mapExpr f e0 = case e0 of SyntaxBindingLambda r bs e -> SyntaxBindingLambda r (mapE bs) $ mapE e Ordinary e -> Ordinary $ mapE e where mapE e = mapExpr f e instance ExprLike LamBinding where mapExpr f e0 = case e0 of DomainFree{} -> e0 DomainFull bs -> DomainFull $ mapE bs where mapE e = mapExpr f e instance ExprLike LHS where mapExpr f e0 = case e0 of LHS ps res wes -> LHS ps (mapE res) $ mapE wes where mapE e = mapExpr f e instance ExprLike LamClause where mapExpr f (LamClause lhs rhs wh ca) = LamClause (mapExpr f lhs) (mapExpr f rhs) (mapExpr f wh) (mapExpr f ca) instance ExprLike DoStmt where mapExpr f (DoBind r p e cs) = DoBind r p (mapExpr f e) (mapExpr f cs) mapExpr f (DoThen e) = DoThen (mapExpr f e) mapExpr f (DoLet r ds) = DoLet r (mapExpr f ds) instance ExprLike ModuleApplication where mapExpr f e0 = case e0 of SectionApp r bs e -> SectionApp r (mapE bs) $ mapE e RecordModuleInstance{} -> e0 where mapE e = mapExpr f e instance ExprLike Declaration where mapExpr f e0 = case e0 of TypeSig ai x e -> TypeSig ai x $ mapE e Field i x e -> Field i x $ mapE e FunClause lhs rhs wh ca -> FunClause (mapE lhs) (mapE rhs) (mapE wh) (mapE ca) DataSig r ind x bs e -> DataSig r ind x (mapE bs) $ mapE e DataDef r ind n bs cs -> DataDef r ind n (mapE bs) $ mapE cs Data r ind n bs e cs -> Data r ind n (mapE bs) (mapE e) $ mapE cs RecordSig r ind bs e -> RecordSig r ind (mapE bs) $ mapE e RecordDef r n ind eta c tel ds -> RecordDef r n ind eta c (mapE tel) $ mapE ds Record r n ind eta c tel e ds -> Record r n ind eta c (mapE tel) (mapE e) $ mapE ds Infix{} -> e0 Syntax{} -> e0 PatternSyn{} -> e0 Mutual r ds -> Mutual r $ mapE ds Abstract r ds -> Abstract r $ mapE ds Private r o ds -> Private r o $ mapE ds InstanceB r ds -> InstanceB r $ mapE ds Macro r ds -> Macro r $ mapE ds Postulate r ds -> Postulate r $ mapE ds Primitive r ds -> Primitive r $ mapE ds Generalize r ds -> Generalize r $ mapE ds Open{} -> e0 Import{} -> e0 ModuleMacro r n es op dir -> ModuleMacro r n (mapE es) op dir Module r n tel ds -> Module r n (mapE tel) $ mapE ds UnquoteDecl r x e -> UnquoteDecl r x (mapE e) UnquoteDef r x e -> UnquoteDef r x (mapE e) Pragma{} -> e0 where mapE e = mapExpr f e {- Template instance ExprLike a where mapExpr f e0 = case e0 of where mapE e = mapExpr f e -} Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Pattern.hs0000644000000000000000000002703213466402171020276 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -- For type equality. -- | Tools for patterns in concrete syntax. module Agda.Syntax.Concrete.Pattern where import Control.Applicative ( liftA2 ) import Control.Monad.Identity import Data.Foldable (Foldable, foldMap) import Data.Traversable (Traversable, traverse) import Data.Monoid import Agda.Syntax.Common import Agda.Syntax.Concrete import Agda.Utils.AffineHole import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe -- | Check for ellipsis @...@. class IsEllipsis a where isEllipsis :: a -> Bool -- | Is the pattern just @...@? instance IsEllipsis Pattern where isEllipsis = \case EllipsisP{} -> True RawAppP _ [p] -> isEllipsis p ParenP _ p -> isEllipsis p _ -> False -- | Has the lhs an occurrence of the ellipsis @...@? class HasEllipsis a where hasEllipsis :: a -> Bool instance HasEllipsis Pattern where hasEllipsis p = case hasEllipsis' p of ZeroHoles _ -> False OneHole _ -> True ManyHoles -> True -- | Does the lhs contain an ellipsis? instance HasEllipsis LHS where hasEllipsis (LHS p _ _) = hasEllipsis p -- | Check for with-pattern @| p@. class IsWithP p where isWithP :: p -> Maybe p default isWithP :: (IsWithP q, Decoration f, f q ~ p) => p -> Maybe p isWithP = traverseF isWithP instance IsWithP Pattern where isWithP = \case WithP _ p -> Just p RawAppP _ [p] -> isWithP p ParenP _ p -> isWithP p _ -> Nothing instance IsWithP p => IsWithP (Arg p) where instance IsWithP p => IsWithP (Named n p) where -- * LHS manipulation (see also ''Agda.Syntax.Abstract.Pattern'') -- | The next patterns are ... -- -- (This view discards 'PatInfo'.) data LHSPatternView = LHSAppP [NamedArg Pattern] -- ^ Application patterns (non-empty list). | LHSWithP [Pattern] -- ^ With patterns (non-empty list). -- These patterns are not prefixed with 'WithP'. -- | Construct the 'LHSPatternView' of the given list (if not empty). -- -- Return the view and the remaining patterns. lhsPatternView :: [NamedArg Pattern] -> Maybe (LHSPatternView, [NamedArg Pattern]) lhsPatternView [] = Nothing lhsPatternView (p0 : ps) = case namedArg p0 of WithP _i p -> Just (LHSWithP (p : map namedArg ps1), ps2) where (ps1, ps2) = spanJust isWithP ps -- If the next pattern is an application pattern, collect more of these _ -> Just (LHSAppP (p0 : ps1), ps2) where (ps1, ps2) = span (isNothing . isWithP) ps -- | Add applicative patterns (non-projection / non-with patterns) to the right. lhsCoreApp :: LHSCore -> [NamedArg Pattern] -> LHSCore lhsCoreApp core ps = core { lhsPats = lhsPats core ++ ps } -- | Add with-patterns to the right. lhsCoreWith :: LHSCore -> [Pattern] -> LHSCore lhsCoreWith (LHSWith core wps []) wps' = LHSWith core (wps ++ wps') [] lhsCoreWith core wps' = LHSWith core wps' [] -- | Append patterns to 'LHSCore', separating with patterns from the rest. lhsCoreAddSpine :: LHSCore -> [NamedArg Pattern] -> LHSCore lhsCoreAddSpine core ps0 = -- Recurse on lhsPatternView until no patterns left. case lhsPatternView ps0 of Nothing -> core Just (LHSAppP ps , ps') -> lhsCoreApp core ps `lhsCoreAddSpine` ps' Just (LHSWithP wps, ps') -> lhsCoreWith core wps `lhsCoreAddSpine` ps' -- | Modify the 'Pattern' component in 'LHS'. mapLhsOriginalPattern :: (Pattern -> Pattern) -> LHS -> LHS mapLhsOriginalPattern f lhs@LHS{ lhsOriginalPattern = p } = lhs { lhsOriginalPattern = f p } -- | Effectfully modify the 'Pattern' component in 'LHS'. mapLhsOriginalPatternM :: (Functor m, Applicative m) => (Pattern -> m Pattern) -> LHS -> m LHS mapLhsOriginalPatternM f lhs@LHS{ lhsOriginalPattern = p } = f p <&> \ p' -> lhs { lhsOriginalPattern = p' } -- | Does the LHS contain projection patterns? hasCopatterns :: LHSCore -> Bool hasCopatterns = \case LHSHead{} -> False LHSProj{} -> True LHSWith h _ _ -> hasCopatterns h -- * Generic fold -- | Generic pattern traversal. -- -- See 'Agda.Syntax.Abstract.Pattern.APatternLike'. class CPatternLike p where -- | Fold pattern. foldrCPattern :: Monoid m => (Pattern -> m -> m) -- ^ Combine a pattern and the value computed from its subpatterns. -> p -> m default foldrCPattern :: (Monoid m, Foldable f, CPatternLike q, f q ~ p) => (Pattern -> m -> m) -> p -> m foldrCPattern = foldMap . foldrCPattern -- | Traverse pattern with option of post-traversal modification. traverseCPatternA :: (Applicative m, Functor m) => (Pattern -> m Pattern -> m Pattern) -- ^ Combine a pattern and the its recursively computed version. -> p -> m p default traverseCPatternA :: (Traversable f, CPatternLike q, f q ~ p, Applicative m, Functor m) => (Pattern -> m Pattern -> m Pattern) -> p -> m p traverseCPatternA = traverse . traverseCPatternA -- | Traverse pattern. traverseCPatternM :: Monad m => (Pattern -> m Pattern) -- ^ @pre@: Modification before recursion. -> (Pattern -> m Pattern) -- ^ @post@: Modification after recursion. -> p -> m p default traverseCPatternM :: (Traversable f, CPatternLike q, f q ~ p, Monad m) => (Pattern -> m Pattern) -> (Pattern -> m Pattern) -> p -> m p traverseCPatternM pre post = traverse $ traverseCPatternM pre post instance CPatternLike Pattern where foldrCPattern f p0 = f p0 $ case p0 of -- Recursive cases: AppP p ps -> foldrCPattern f (p, ps) RawAppP _ ps -> foldrCPattern f ps OpAppP _ _ _ ps -> foldrCPattern f ps HiddenP _ ps -> foldrCPattern f ps InstanceP _ ps -> foldrCPattern f ps ParenP _ p -> foldrCPattern f p AsP _ _ p -> foldrCPattern f p WithP _ p -> foldrCPattern f p RecP _ ps -> foldrCPattern f ps -- Nonrecursive cases: IdentP _ -> mempty WildP _ -> mempty DotP _ _ -> mempty AbsurdP _ -> mempty LitP _ -> mempty QuoteP _ -> mempty EqualP _ _ -> mempty EllipsisP _ -> mempty traverseCPatternA f p0 = f p0 $ case p0 of -- Recursive cases: AppP p ps -> liftA2 AppP (traverseCPatternA f p) (traverseCPatternA f ps) RawAppP r ps -> RawAppP r <$> traverseCPatternA f ps OpAppP r x xs ps -> OpAppP r x xs <$> traverseCPatternA f ps HiddenP r p -> HiddenP r <$> traverseCPatternA f p InstanceP r p -> InstanceP r <$> traverseCPatternA f p ParenP r p -> ParenP r <$> traverseCPatternA f p AsP r x p -> AsP r x <$> traverseCPatternA f p WithP r p -> WithP r <$> traverseCPatternA f p RecP r ps -> RecP r <$> traverseCPatternA f ps -- Nonrecursive cases: IdentP _ -> pure p0 WildP _ -> pure p0 DotP _ _ -> pure p0 AbsurdP _ -> pure p0 LitP _ -> pure p0 QuoteP _ -> pure p0 EqualP _ _ -> pure p0 EllipsisP _ -> pure p0 traverseCPatternM pre post = pre >=> recurse >=> post where recurse p0 = case p0 of -- Recursive cases: AppP p ps -> uncurry AppP <$> traverseCPatternM pre post (p, ps) RawAppP r ps -> RawAppP r <$> traverseCPatternM pre post ps OpAppP r x xs ps -> OpAppP r x xs <$> traverseCPatternM pre post ps HiddenP r p -> HiddenP r <$> traverseCPatternM pre post p InstanceP r p -> InstanceP r <$> traverseCPatternM pre post p ParenP r p -> ParenP r <$> traverseCPatternM pre post p AsP r x p -> AsP r x <$> traverseCPatternM pre post p WithP r p -> WithP r <$> traverseCPatternM pre post p RecP r ps -> RecP r <$> traverseCPatternM pre post ps -- Nonrecursive cases: IdentP _ -> return p0 WildP _ -> return p0 DotP _ _ -> return p0 AbsurdP _ -> return p0 LitP _ -> return p0 QuoteP _ -> return p0 EqualP _ _ -> return p0 EllipsisP _ -> return p0 instance (CPatternLike a, CPatternLike b) => CPatternLike (a,b) where foldrCPattern f (p, p') = foldrCPattern f p `mappend` foldrCPattern f p' traverseCPatternA f (p, p') = liftA2 (,) (traverseCPatternA f p) (traverseCPatternA f p') traverseCPatternM pre post (p, p') = liftA2 (,) (traverseCPatternM pre post p) (traverseCPatternM pre post p') instance CPatternLike p => CPatternLike (Arg p) where instance CPatternLike p => CPatternLike (Named n p) where instance CPatternLike p => CPatternLike [p] where instance CPatternLike p => CPatternLike (Maybe p) where instance CPatternLike p => CPatternLike (FieldAssignment' p) where -- | Compute a value from each subpattern and collect all values in a monoid. foldCPattern :: (CPatternLike p, Monoid m) => (Pattern -> m) -> p -> m foldCPattern f = foldrCPattern $ \ p m -> f p `mappend` m -- | Traverse pattern(s) with a modification before the recursive descent. preTraverseCPatternM :: (CPatternLike p, Monad m) => (Pattern -> m Pattern) -- ^ @pre@: Modification before recursion. -> p -> m p preTraverseCPatternM pre p = traverseCPatternM pre return p -- | Traverse pattern(s) with a modification after the recursive descent. postTraverseCPatternM :: (CPatternLike p, Monad m) => (Pattern -> m Pattern) -- ^ @post@: Modification after recursion. -> p -> m p postTraverseCPatternM post p = traverseCPatternM return post p -- | Map pattern(s) with a modification after the recursive descent. mapCPattern :: CPatternLike p => (Pattern -> Pattern) -> p -> p mapCPattern f = runIdentity . postTraverseCPatternM (Identity . f) -- * Specific folds. -- | Get all the identifiers in a pattern in left-to-right order. -- -- Implemented using difference lists. patternQNames :: CPatternLike p => p -> [QName] patternQNames p = foldCPattern f p `appEndo` [] where f :: Pattern -> Endo [QName] f = \case IdentP x -> Endo (x :) OpAppP _ x _ _ -> Endo (x :) AsP _ x _ -> mempty -- x must be a bound name, can't be a constructor! AppP _ _ -> mempty WithP _ _ -> mempty RawAppP _ _ -> mempty HiddenP _ _ -> mempty ParenP _ _ -> mempty WildP _ -> mempty AbsurdP _ -> mempty DotP _ _ -> mempty LitP _ -> mempty QuoteP _ -> mempty InstanceP _ _ -> mempty RecP _ _ -> mempty EqualP _ _ -> mempty EllipsisP _ -> mempty -- | Get all the identifiers in a pattern in left-to-right order. patternNames :: Pattern -> [Name] patternNames = map unqualify . patternQNames -- | Does the pattern contain a with-pattern? -- (Shortcutting.) hasWithPatterns :: CPatternLike p => p -> Bool hasWithPatterns = getAny . foldCPattern (Any . isWithPattern) -- | Is 'WithP'? isWithPattern :: Pattern -> Bool isWithPattern = \case WithP{} -> True _ -> False -- | Count the number of with-subpatterns in a pattern? numberOfWithPatterns :: CPatternLike p => p -> Int numberOfWithPatterns = getSum . foldCPattern (Sum . f) where f p = if isWithPattern p then 1 else 0 -- | Compute the context in which the ellipsis occurs, if at all. -- If there are several occurrences, this is an error. hasEllipsis' :: CPatternLike p => p -> AffineHole Pattern p hasEllipsis' = traverseCPatternA $ \ p mp -> case p of EllipsisP _ -> OneHole id _ -> mp Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Name.hs0000644000000000000000000003562113466402171017544 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| Names in the concrete syntax are just strings (or lists of strings for qualified names). -} module Agda.Syntax.Concrete.Name where #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) #endif import Control.DeepSeq import Data.ByteString.Char8 (ByteString) import Data.Function import qualified Data.List as List import Data.Data (Data) import Data.Maybe import GHC.Generics (Generic) import System.FilePath import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Utils.FileName import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.Pretty import Agda.Utils.Size import Agda.Utils.Suffix #include "undefined.h" import Agda.Utils.Impossible {-| A name is a non-empty list of alternating 'Id's and 'Hole's. A normal name is represented by a singleton list, and operators are represented by a list with 'Hole's where the arguments should go. For instance: @[Hole,Id "+",Hole]@ is infix addition. Equality and ordering on @Name@s are defined to ignore range so same names in different locations are equal. -} data Name = Name -- ^ A (mixfix) identifier. { nameRange :: Range , nameInScope :: NameInScope , nameNameParts :: [NamePart] } | NoName -- ^ @_@. { nameRange :: Range , nameId :: NameId } deriving Data -- | An open mixfix identifier is either prefix, infix, or suffix. -- That is to say: at least one of its extremities is a @Hole@ isOpenMixfix :: Name -> Bool isOpenMixfix n = case n of Name _ _ (x : xs@(_:_)) -> x == Hole || last xs == Hole _ -> False instance Underscore Name where underscore = NoName noRange __IMPOSSIBLE__ isUnderscore NoName{} = True isUnderscore (Name {nameNameParts = [Id x]}) = isUnderscore x isUnderscore _ = False -- | Mixfix identifiers are composed of words and holes, -- e.g. @_+_@ or @if_then_else_@ or @[_/_]@. data NamePart = Hole -- ^ @_@ part. | Id RawName -- ^ Identifier part. deriving (Data, Generic) -- | Define equality on @Name@ to ignore range so same names in different -- locations are equal. -- -- Is there a reason not to do this? -Jeff -- -- No. But there are tons of reasons to do it. For instance, when using -- names as keys in maps you really don't want to have to get the range -- right to be able to do a lookup. -Ulf instance Eq Name where Name _ _ xs == Name _ _ ys = xs == ys NoName _ i == NoName _ j = i == j _ == _ = False instance Ord Name where compare (Name _ _ xs) (Name _ _ ys) = compare xs ys compare (NoName _ i) (NoName _ j) = compare i j compare (NoName {}) (Name {}) = LT compare (Name {}) (NoName {}) = GT instance Eq NamePart where Hole == Hole = True Id s1 == Id s2 = s1 == s2 _ == _ = False instance Ord NamePart where compare Hole Hole = EQ compare Hole (Id {}) = LT compare (Id {}) Hole = GT compare (Id s1) (Id s2) = compare s1 s2 -- | @QName@ is a list of namespaces and the name of the constant. -- For the moment assumes namespaces are just @Name@s and not -- explicitly applied modules. -- Also assumes namespaces are generative by just using derived -- equality. We will have to define an equality instance to -- non-generative namespaces (as well as having some sort of -- lookup table for namespace names). data QName = Qual Name QName -- ^ @A.rest@. | QName Name -- ^ @x@. deriving (Data, Eq, Ord) instance Underscore QName where underscore = QName underscore isUnderscore (QName x) = isUnderscore x isUnderscore Qual{} = False -- | Top-level module names. Used in connection with the file system. -- -- Invariant: The list must not be empty. data TopLevelModuleName = TopLevelModuleName { moduleNameRange :: Range , moduleNameParts :: [String] } deriving (Show, Data) instance Eq TopLevelModuleName where (==) = (==) `on` moduleNameParts instance Ord TopLevelModuleName where compare = compare `on` moduleNameParts instance Sized TopLevelModuleName where size = size . moduleNameParts ------------------------------------------------------------------------ -- * Operations on 'Name' and 'NamePart' ------------------------------------------------------------------------ nameToRawName :: Name -> RawName nameToRawName = prettyShow nameParts :: Name -> [NamePart] nameParts (Name _ _ ps) = ps nameParts (NoName _ _) = [Id "_"] -- To not return an empty list nameStringParts :: Name -> [RawName] nameStringParts n = [ s | Id s <- nameParts n ] -- | Parse a string to parts of a concrete name. -- -- Note: @stringNameParts "_" == [Id "_"] == nameParts NoName{}@ stringNameParts :: String -> [NamePart] stringNameParts "_" = [Id "_"] -- NoName stringNameParts s = loop s where loop "" = [] loop ('_':s) = Hole : loop s loop s | (x, s') <- break (== '_') s = Id (stringToRawName x) : loop s' -- | Number of holes in a 'Name' (i.e., arity of a mixfix-operator). class NumHoles a where numHoles :: a -> Int instance NumHoles [NamePart] where numHoles = length . filter (== Hole) instance NumHoles Name where numHoles NoName{} = 0 numHoles (Name { nameNameParts = parts }) = numHoles parts instance NumHoles QName where numHoles (QName x) = numHoles x numHoles (Qual _ x) = numHoles x -- | Is the name an operator? isOperator :: Name -> Bool isOperator (NoName {}) = False isOperator (Name _ _ ps) = length ps > 1 isHole :: NamePart -> Bool isHole Hole = True isHole _ = False isPrefix, isPostfix, isInfix, isNonfix :: Name -> Bool isPrefix x = not (isHole (head xs)) && isHole (last xs) where xs = nameParts x isPostfix x = isHole (head xs) && not (isHole (last xs)) where xs = nameParts x isInfix x = isHole (head xs) && isHole (last xs) where xs = nameParts x isNonfix x = not (isHole (head xs)) && not (isHole (last xs)) where xs = nameParts x ------------------------------------------------------------------------ -- * Keeping track of which names are (not) in scope ------------------------------------------------------------------------ data NameInScope = InScope | NotInScope deriving (Eq, Show, Data) class LensInScope a where lensInScope :: Lens' NameInScope a isInScope :: a -> NameInScope isInScope x = x ^. lensInScope mapInScope :: (NameInScope -> NameInScope) -> a -> a mapInScope = over lensInScope setInScope :: a -> a setInScope = mapInScope $ const InScope setNotInScope :: a -> a setNotInScope = mapInScope $ const NotInScope instance LensInScope NameInScope where lensInScope = id instance LensInScope Name where lensInScope f = \case n@Name{ nameInScope = nis } -> (\nis' -> n { nameInScope = nis' }) <$> f nis n@NoName{} -> const n <$> f InScope instance LensInScope QName where lensInScope f = \case Qual x xs -> (`Qual` xs) <$> lensInScope f x QName x -> QName <$> lensInScope f x ------------------------------------------------------------------------ -- * Generating fresh names ------------------------------------------------------------------------ nextStr :: String -> String nextStr s = case suffixView s of (s0, suf) -> addSuffix s0 (nextSuffix suf) -- | Get the next version of the concrete name. For instance, -- @nextName "x" = "x₁"@. The name must not be a 'NoName'. nextName :: Name -> Name nextName NoName{} = __IMPOSSIBLE__ nextName x@Name{ nameNameParts = ps } = x { nameInScope = NotInScope, nameNameParts = nextSuf ps } where nextSuf [Id s] = [Id $ nextStr s] nextSuf [Id s, Hole] = [Id $ nextStr s, Hole] nextSuf (p : ps) = p : nextSuf ps nextSuf [] = __IMPOSSIBLE__ -- | Get the first version of the concrete name that does not satisfy -- the given predicate. firstNonTakenName :: (Name -> Bool) -> Name -> Name firstNonTakenName taken x = if taken x then firstNonTakenName taken (nextName x) else x -- | Get a raw version of the name with all suffixes removed. For -- instance, @nameRoot "x₁₂₃" = "x"@. The name must not be a -- 'NoName'. nameRoot :: Name -> RawName nameRoot NoName{} = __IMPOSSIBLE__ nameRoot x@Name{ nameNameParts = ps } = nameToRawName $ x{ nameNameParts = root ps } where root [Id s] = [Id $ strRoot s] root [Id s, Hole] = [Id $ strRoot s , Hole] root (p : ps) = p : root ps root [] = __IMPOSSIBLE__ strRoot = fst . suffixView sameRoot :: Name -> Name -> Bool sameRoot = (==) `on` nameRoot ------------------------------------------------------------------------ -- * Operations on qualified names ------------------------------------------------------------------------ -- | @qualify A.B x == A.B.x@ qualify :: QName -> Name -> QName qualify (QName m) x = Qual m (QName x) qualify (Qual m m') x = Qual m $ qualify m' x -- | @unqualify A.B.x == x@ -- -- The range is preserved. unqualify :: QName -> Name unqualify q = unqualify' q `withRangeOf` q where unqualify' (QName x) = x unqualify' (Qual _ x) = unqualify' x -- | @qnameParts A.B.x = [A, B, x]@ qnameParts :: QName -> [Name] qnameParts (Qual x q) = x : qnameParts q qnameParts (QName x) = [x] -- | Is the name qualified? isQualified :: QName -> Bool isQualified Qual{} = True isQualified QName{} = False ------------------------------------------------------------------------ -- * Operations on 'TopLevelModuleName' ------------------------------------------------------------------------ -- | Turns a qualified name into a 'TopLevelModuleName'. The qualified -- name is assumed to represent a top-level module name. toTopLevelModuleName :: QName -> TopLevelModuleName toTopLevelModuleName q = TopLevelModuleName (getRange q) $ map prettyShow $ qnameParts q -- UNUSED -- -- | Turns a top level module into a qualified name with 'noRange'. -- fromTopLevelModuleName :: TopLevelModuleName -> QName -- fromTopLevelModuleName (TopLevelModuleName _ []) = __IMPOSSIBLE__ -- fromTopLevelModuleName (TopLevelModuleName _ (x:xs)) = loop x xs -- where -- loop x [] = QName (mk x) -- loop x (y : ys) = Qual (mk x) $ loop y ys -- mk :: String -> Name -- mk x = Name noRange [Id x] -- | Turns a top-level module name into a file name with the given -- suffix. moduleNameToFileName :: TopLevelModuleName -> String -> FilePath moduleNameToFileName (TopLevelModuleName _ []) ext = __IMPOSSIBLE__ moduleNameToFileName (TopLevelModuleName _ ms) ext = joinPath (init ms) last ms <.> ext -- | Finds the current project's \"root\" directory, given a project -- file and the corresponding top-level module name. -- -- Example: If the module \"A.B.C\" is located in the file -- \"/foo/A/B/C.agda\", then the root is \"/foo/\". -- -- Precondition: The module name must be well-formed. projectRoot :: AbsolutePath -> TopLevelModuleName -> AbsolutePath projectRoot file (TopLevelModuleName _ m) = mkAbsolute $ foldr (.) id (replicate (length m - 1) takeDirectory) $ takeDirectory $ filePath file ------------------------------------------------------------------------ -- * No name stuff ------------------------------------------------------------------------ -- | @noName_ = 'noName' 'noRange'@ noName_ :: Name noName_ = noName noRange noName :: Range -> Name noName r = NoName r (NameId 0 0) -- | Check whether a name is the empty name "_". class IsNoName a where isNoName :: a -> Bool instance IsNoName String where isNoName = isUnderscore instance IsNoName ByteString where isNoName = isUnderscore instance IsNoName Name where isNoName (NoName _ _) = True isNoName (Name _ _ [Hole]) = True -- TODO: Track down where these come from isNoName (Name _ _ []) = True isNoName (Name _ _ [Id x]) = isNoName x isNoName _ = False instance IsNoName QName where isNoName (QName x) = isNoName x isNoName Qual{} = False -- M.A._ does not qualify as empty name -- no instance for TopLevelModuleName ------------------------------------------------------------------------ -- * Showing names ------------------------------------------------------------------------ -- deriving instance Show Name -- deriving instance Show NamePart -- deriving instance Show QName -- TODO: 'Show' should output Haskell-parseable representations. -- The following instances are deprecated, and Pretty should be used -- instead. Later, simply derive Show for these types: instance Show Name where show = prettyShow instance Show NamePart where show = prettyShow instance Show QName where show = prettyShow ------------------------------------------------------------------------ -- * Printing names ------------------------------------------------------------------------ instance Pretty Name where pretty (Name _ _ xs) = hcat $ map pretty xs pretty (NoName _ _) = "_" instance Pretty NamePart where pretty Hole = "_" pretty (Id s) = text $ rawNameToString s instance Pretty QName where pretty (Qual m x) | isUnderscore m = pretty x -- don't print anonymous modules | otherwise = pretty m <> "." <> pretty x pretty (QName x) = pretty x instance Pretty TopLevelModuleName where pretty (TopLevelModuleName _ ms) = text $ List.intercalate "." ms ------------------------------------------------------------------------ -- * Range instances ------------------------------------------------------------------------ instance HasRange Name where getRange (Name r _ ps) = r getRange (NoName r _) = r instance HasRange QName where getRange (QName x) = getRange x getRange (Qual n x) = fuseRange n x instance HasRange TopLevelModuleName where getRange = moduleNameRange instance SetRange Name where setRange r (Name _ nis ps) = Name r nis ps setRange r (NoName _ i) = NoName r i instance SetRange QName where setRange r (QName x) = QName (setRange r x) setRange r (Qual n x) = Qual (setRange r n) (setRange r x) instance SetRange TopLevelModuleName where setRange r (TopLevelModuleName _ x) = TopLevelModuleName r x instance KillRange QName where killRange (QName x) = QName $ killRange x killRange (Qual n x) = killRange n `Qual` killRange x instance KillRange Name where killRange (Name r nis ps) = Name (killRange r) nis ps killRange (NoName r i) = NoName (killRange r) i instance KillRange TopLevelModuleName where killRange (TopLevelModuleName _ x) = TopLevelModuleName noRange x ------------------------------------------------------------------------ -- * NFData instances ------------------------------------------------------------------------ -- | Ranges are not forced. instance NFData NameInScope where rnf InScope = () rnf NotInScope = () instance NFData Name where rnf (Name _ nis ns) = rnf nis `seq` rnf ns rnf (NoName _ n) = rnf n instance NFData NamePart where rnf Hole = () rnf (Id s) = rnf s instance NFData QName where rnf (Qual a b) = rnf a `seq` rnf b rnf (QName a) = rnf a Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Operators/0000755000000000000000000000000013466402171020277 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Operators/Parser.hs0000644000000000000000000003127713466402171022101 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} module Agda.Syntax.Concrete.Operators.Parser where import Control.Applicative ( Alternative((<|>), many) ) import Data.Either import Data.Hashable import Data.Maybe import qualified Data.Strict.Maybe as Strict import Data.Set (Set) import Agda.Syntax.Position import qualified Agda.Syntax.Abstract.Name as A import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Concrete import Agda.Syntax.Concrete.Operators.Parser.Monad hiding (parse) import qualified Agda.Syntax.Concrete.Operators.Parser.Monad as P import Agda.Utils.Pretty import Agda.Utils.List ( spanEnd ) #include "undefined.h" import Agda.Utils.Impossible placeholder :: PositionInName -> Parser e (MaybePlaceholder e) placeholder p = doc (text ("_" ++ show p)) $ sat $ \t -> case t of Placeholder p' | p' == p -> True _ -> False maybePlaceholder :: Maybe PositionInName -> Parser e e -> Parser e (MaybePlaceholder e) maybePlaceholder mp p = case mp of Nothing -> p' Just h -> placeholder h <|> p' where p' = noPlaceholder <$> p satNoPlaceholder :: (e -> Maybe a) -> Parser e a satNoPlaceholder p = sat' $ \tok -> case tok of NoPlaceholder _ e -> p e Placeholder _ -> Nothing data ExprView e = LocalV QName | WildV e | OtherV e | AppV e (NamedArg e) | OpAppV QName (Set A.Name) [NamedArg (MaybePlaceholder (OpApp e))] -- ^ The 'QName' is possibly ambiguous, but it must correspond -- to one of the names in the set. | HiddenArgV (Named_ e) | InstanceArgV (Named_ e) | LamV [LamBinding] e | ParenV e -- deriving (Show) class HasRange e => IsExpr e where exprView :: e -> ExprView e unExprView :: ExprView e -> e instance IsExpr e => HasRange (ExprView e) where getRange = getRange . unExprView instance IsExpr Expr where exprView e = case e of Ident x -> LocalV x App _ e1 e2 -> AppV e1 e2 OpApp r d ns es -> OpAppV d ns es HiddenArg _ e -> HiddenArgV e InstanceArg _ e -> InstanceArgV e Paren _ e -> ParenV e Lam _ bs e -> LamV bs e Underscore{} -> WildV e _ -> OtherV e unExprView e = case e of LocalV x -> Ident x AppV e1 e2 -> App (fuseRange e1 e2) e1 e2 OpAppV d ns es -> OpApp (fuseRange d es) d ns es HiddenArgV e -> HiddenArg (getRange e) e InstanceArgV e -> InstanceArg (getRange e) e ParenV e -> Paren (getRange e) e LamV bs e -> Lam (fuseRange bs e) bs e WildV e -> e OtherV e -> e instance IsExpr Pattern where exprView e = case e of IdentP x -> LocalV x AppP e1 e2 -> AppV e1 e2 OpAppP r d ns es -> OpAppV d ns ((map . fmap . fmap) (noPlaceholder . Ordinary) es) HiddenP _ e -> HiddenArgV e InstanceP _ e -> InstanceArgV e ParenP _ e -> ParenV e WildP{} -> WildV e _ -> OtherV e unExprView e = case e of LocalV x -> IdentP x AppV e1 e2 -> AppP e1 e2 OpAppV d ns es -> let ess :: [NamedArg Pattern] ess = (map . fmap . fmap) (\x -> case x of Placeholder{} -> __IMPOSSIBLE__ NoPlaceholder _ x -> fromOrdinary __IMPOSSIBLE__ x) es in OpAppP (fuseRange d ess) d ns ess HiddenArgV e -> HiddenP (getRange e) e InstanceArgV e -> InstanceP (getRange e) e ParenV e -> ParenP (getRange e) e LamV _ _ -> __IMPOSSIBLE__ WildV e -> e OtherV e -> e -- | Should sections be parsed? data ParseSections = ParseSections | DoNotParseSections deriving (Eq, Show) -- | Runs a parser. If sections should be parsed, then identifiers -- with at least two name parts are split up into multiple tokens, -- using 'PositionInName' to record the tokens' original positions -- within their respective identifiers. parse :: IsExpr e => (ParseSections, Parser e a) -> [e] -> [a] parse (DoNotParseSections, p) es = P.parse p (map noPlaceholder es) parse (ParseSections, p) es = P.parse p (concat $ map splitExpr es) where splitExpr :: IsExpr e => e -> [MaybePlaceholder e] splitExpr e = case exprView e of LocalV n -> splitName n _ -> noSplit where noSplit = [noPlaceholder e] splitName n = case last ns of Name r nis ps@(_ : _ : _) -> splitParts r nis (init ns) Beginning ps _ -> noSplit where ns = qnameParts n -- Note that the same range is used for every name part. This is -- not entirely correct, but will hopefully not lead to any -- problems. -- Note also that the module qualifier, if any, is only applied -- to the first name part. splitParts _ _ _ _ [] = __IMPOSSIBLE__ splitParts _ _ _ _ (Hole : []) = [Placeholder End] splitParts r nis m _ (Id s : []) = [part r nis m End s] splitParts r nis m w (Hole : ps) = Placeholder w : splitParts r nis m Middle ps splitParts r nis m w (Id s : ps) = part r nis m w s : splitParts r nis [] Middle ps part r nis m w s = NoPlaceholder (Strict.Just w) (unExprView $ LocalV $ foldr Qual (QName (Name r nis [Id s])) m) --------------------------------------------------------------------------- -- * Parser combinators --------------------------------------------------------------------------- ---------------------------- -- Specific combinators -- | Parse a specific identifier as a NamePart partP :: IsExpr e => [Name] -> RawName -> Parser e Range partP ms s = doc (text (show str)) $ satNoPlaceholder isLocal where str = prettyShow $ foldr Qual (QName $ Name noRange InScope [Id s]) ms isLocal e = case exprView e of LocalV y | str == prettyShow y -> Just $ getRange y _ -> Nothing -- | Parses a split-up, unqualified name consisting of at least two -- name parts. -- -- The parser does not check that underscores and other name parts -- alternate. The range of the resulting name is the range of the -- first name part that is not an underscore. atLeastTwoParts :: IsExpr e => Parser e Name atLeastTwoParts = (\p1 ps p2 -> let all = p1 : ps ++ [p2] in case mapMaybe fst all of (r,nis) : _ -> Name r nis (map snd all) [] -> __IMPOSSIBLE__) <$> part Beginning <*> many (part Middle) <*> part End where part pos = sat' $ \tok -> case tok of Placeholder pos' | pos == pos' -> Just ( Nothing , Hole ) NoPlaceholder (Strict.Just pos') e | pos == pos' -> case exprView e of LocalV (QName (Name r nis [Id s])) -> Just (Just (r,nis), Id s) _ -> Nothing _ -> Nothing -- | Either a wildcard (@_@), or an unqualified name (possibly -- containing multiple name parts). wildOrUnqualifiedName :: IsExpr e => Parser e (Maybe Name) wildOrUnqualifiedName = (Nothing <$ partP [] "_") <|> (satNoPlaceholder $ \e -> case exprView e of LocalV (QName n) -> Just (Just n) WildV _ -> Just Nothing _ -> Nothing) <|> Just <$> atLeastTwoParts -- | Used to define the return type of 'opP'. type family OperatorType (k :: NotationKind) (e :: *) :: * type instance OperatorType 'InfixNotation e = MaybePlaceholder e -> MaybePlaceholder e -> e type instance OperatorType 'PrefixNotation e = MaybePlaceholder e -> e type instance OperatorType 'PostfixNotation e = MaybePlaceholder e -> e type instance OperatorType 'NonfixNotation e = e -- | A singleton type for 'NotationKind' (except for the constructor -- 'NoNotation'). data NK (k :: NotationKind) :: * where In :: NK 'InfixNotation Pre :: NK 'PrefixNotation Post :: NK 'PostfixNotation Non :: NK 'NonfixNotation -- | Parse the \"operator part\" of the given notation. -- -- Normal holes (but not binders) at the beginning and end are -- ignored. -- -- If the notation does not contain any binders, then a section -- notation is allowed. opP :: forall e k. IsExpr e => ParseSections -> Parser e e -> NewNotation -> NK k -> Parser e (OperatorType k e) opP parseSections p (NewNotation q names _ syn isOp) kind = flip fmap (worker (init $ qnameParts q) withoutExternalHoles) $ \(range, hs) -> let (normal, binders) = partitionEithers hs lastHole = maximum $ mapMaybe holeTarget syn app :: ([(MaybePlaceholder e, NamedArg (Ranged Int))] -> [(MaybePlaceholder e, NamedArg (Ranged Int))]) -> e app f = -- If we have an operator and there is exactly one -- placeholder for every hole, then we only return -- the operator. if isOp && noPlaceholders args == lastHole + 1 then -- Note that the information in the set "names" is thrown -- away here. unExprView (LocalV q') else unExprView (OpAppV q' names args) where args = map (findExprFor (f normal) binders) [0..lastHole] q' = setRange range q in case kind of In -> \x y -> app (\es -> (x, leadingHole) : es ++ [(y, trailingHole)]) Pre -> \ y -> app (\es -> es ++ [(y, trailingHole)]) Post -> \x -> app (\es -> (x, leadingHole) : es) Non -> app (\es -> es) where (leadingHoles, syn1) = span isNormalHole syn (withoutExternalHoles, trailingHoles) = spanEnd isNormalHole syn1 leadingHole = case leadingHoles of [NormalHole _ h] -> h _ -> __IMPOSSIBLE__ trailingHole = case trailingHoles of [NormalHole _ h] -> h _ -> __IMPOSSIBLE__ worker :: [Name] -> Notation -> Parser e (Range, [Either (MaybePlaceholder e, NamedArg (Ranged Int)) (LamBinding, Ranged Int)]) worker ms [] = pure (noRange, []) worker ms (IdPart x : xs) = (\r1 (r2, es) -> (fuseRanges r1 r2, es)) <$> partP ms (rangedThing x) <*> worker [] xs -- Only the first part is qualified. worker ms (NormalHole _ h : xs) = (\e (r, es) -> (r, Left (e, h) : es)) <$> maybePlaceholder (if isOp && parseSections == ParseSections then Just Middle else Nothing) p <*> worker ms xs worker ms (WildHole h : xs) = (\(r, es) -> (r, Right (mkBinding h $ Name noRange InScope [Hole]) : es)) <$> worker ms xs worker ms (BindHole _ h : xs) = do (\e (r, es) -> let x = case e of Just name -> name Nothing -> Name noRange InScope [Hole] in (r, Right (mkBinding h x) : es)) -- Andreas, 2011-04-07 put just 'Relevant' here, is this -- correct? <$> wildOrUnqualifiedName <*> worker ms xs mkBinding h x = (DomainFree $ defaultNamedArg $ mkBoundName_ x, h) set x arg = fmap (fmap (const x)) arg findExprFor :: [(MaybePlaceholder e, NamedArg (Ranged Int))] -> [(LamBinding, Ranged Int)] -> Int -> NamedArg (MaybePlaceholder (OpApp e)) findExprFor normalHoles binders n = case [ h | h@(_, m) <- normalHoles, rangedThing (namedArg m) == n ] of [(Placeholder p, arg)] -> set (Placeholder p) arg [(NoPlaceholder _ e, arg)] -> case [b | (b, m) <- binders, rangedThing m == n] of [] -> set (noPlaceholder (Ordinary e)) arg -- no variable to bind bs -> set (noPlaceholder (SyntaxBindingLambda (fuseRange bs e) bs e)) arg _ -> __IMPOSSIBLE__ noPlaceholders :: [NamedArg (MaybePlaceholder (OpApp e))] -> Int noPlaceholders = sum . map (isPlaceholder . namedArg) where isPlaceholder NoPlaceholder{} = 0 isPlaceholder Placeholder{} = 1 argsP :: IsExpr e => Parser e e -> Parser e [NamedArg e] argsP p = many (mkArg <$> p) where mkArg e = case exprView e of HiddenArgV e -> hide (defaultArg e) InstanceArgV e -> makeInstance (defaultArg e) _ -> defaultArg (unnamed e) appP :: IsExpr e => Parser e e -> Parser e [NamedArg e] -> Parser e e appP p pa = foldl app <$> p <*> pa where app e = unExprView . AppV e atomP :: IsExpr e => (QName -> Bool) -> Parser e e atomP p = doc "" $ satNoPlaceholder $ \e -> case exprView e of LocalV x | not (p x) -> Nothing _ -> Just e Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Operators/Parser/0000755000000000000000000000000013466402171021533 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Concrete/Operators/Parser/Monad.hs0000644000000000000000000000463613466402171023136 0ustar0000000000000000------------------------------------------------------------------------ -- | The parser monad used by the operator parser ------------------------------------------------------------------------ {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Rank2Types #-} module Agda.Syntax.Concrete.Operators.Parser.Monad ( MemoKey(..) , Parser , parse , sat' , sat , doc , memoise , memoiseIfPrinting , grammar ) where import Data.Hashable import GHC.Generics (Generic) import Text.PrettyPrint.HughesPJ import Agda.Syntax.Common import qualified Agda.Utils.Parser.MemoisedCPS as Parser -- | Memoisation keys. data MemoKey = NodeK (Either Integer Integer) | PostLeftsK (Either Integer Integer) | PreRightsK (Either Integer Integer) | TopK | AppK | NonfixK deriving (Eq, Show, Generic) instance Hashable MemoKey -- | The parser monad. type Parser tok a = #ifdef DEBUG Parser.ParserWithGrammar #else Parser.Parser #endif MemoKey tok (MaybePlaceholder tok) a -- | Runs the parser. parse :: forall tok a. Parser tok a -> [MaybePlaceholder tok] -> [a] parse = Parser.parse -- | Parses a token satisfying the given predicate. The computed value -- is returned. sat' :: (MaybePlaceholder tok -> Maybe a) -> Parser tok a sat' = Parser.sat' -- | Parses a token satisfying the given predicate. sat :: (MaybePlaceholder tok -> Bool) -> Parser tok (MaybePlaceholder tok) sat = Parser.sat -- | Uses the given document as the printed representation of the -- given parser. The document's precedence is taken to be 'atomP'. doc :: Doc -> Parser tok a -> Parser tok a doc = Parser.doc -- | Memoises the given parser. -- -- Every memoised parser must be annotated with a /unique/ key. -- (Parametrised parsers must use distinct keys for distinct inputs.) memoise :: MemoKey -> Parser tok tok -> Parser tok tok memoise = Parser.memoise -- | Memoises the given parser, but only if printing, not if parsing. -- -- Every memoised parser must be annotated with a /unique/ key. -- (Parametrised parsers must use distinct keys for distinct inputs.) memoiseIfPrinting :: MemoKey -> Parser tok tok -> Parser tok tok memoiseIfPrinting = Parser.memoiseIfPrinting -- | Tries to print the parser, or returns 'empty', depending on the -- implementation. This function might not terminate. grammar :: Parser tok a -> Doc grammar = Parser.grammar Agda-2.6.0.1/src/full/Agda/Syntax/Scope/0000755000000000000000000000000013466402171015630 5ustar0000000000000000Agda-2.6.0.1/src/full/Agda/Syntax/Scope/Base.hs0000644000000000000000000012212113466402171017035 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-| This module defines the notion of a scope and operations on scopes. -} module Agda.Syntax.Scope.Base where #if MIN_VERSION_base(4,11,0) import Prelude hiding ( (<>), null ) #else import Prelude hiding ( null ) #endif import Control.Arrow (first, second, (***)) import Control.Applicative hiding (empty) import Control.DeepSeq import Control.Monad import Data.Either (partitionEithers) import Data.Function import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe import qualified Data.Semigroup as Sgrp import Data.Data (Data) import Agda.Benchmarking import Agda.Syntax.Position import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Abstract.Name as A import Agda.Syntax.Concrete.Name as C import qualified Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Fixity as C import Agda.Utils.AssocList (AssocList) import qualified Agda.Utils.AssocList as AssocList import Agda.Utils.Functor import Agda.Utils.Lens import Agda.Utils.List import Agda.Utils.NonemptyList import Agda.Utils.Null import Agda.Utils.Pretty import Agda.Utils.Singleton import qualified Agda.Utils.Map as Map #include "undefined.h" import Agda.Utils.Impossible -- * Scope representation -- | A scope is a named collection of names partitioned into public and private -- names. data Scope = Scope { scopeName :: A.ModuleName , scopeParents :: [A.ModuleName] , scopeNameSpaces :: ScopeNameSpaces , scopeImports :: Map C.QName A.ModuleName , scopeDatatypeModule :: Maybe DataOrRecord } deriving (Data, Eq, Show) -- | See 'Agda.Syntax.Common.Access'. data NameSpaceId = PrivateNS -- ^ Things not exported by this module. | PublicNS -- ^ Things defined and exported by this module. | ImportedNS -- ^ Things from open public, exported by this module. | OnlyQualifiedNS -- ^ Visible (as qualified) from outside, -- but not exported when opening the module. -- Used for qualified constructors. deriving (Data, Eq, Bounded, Enum, Show) type ScopeNameSpaces = [(NameSpaceId, NameSpace)] localNameSpace :: Access -> NameSpaceId localNameSpace PublicAccess = PublicNS localNameSpace PrivateAccess{} = PrivateNS localNameSpace OnlyQualified = OnlyQualifiedNS nameSpaceAccess :: NameSpaceId -> Access nameSpaceAccess PrivateNS = PrivateAccess Inserted nameSpaceAccess _ = PublicAccess -- | Get a 'NameSpace' from 'Scope'. scopeNameSpace :: NameSpaceId -> Scope -> NameSpace scopeNameSpace ns = fromMaybe __IMPOSSIBLE__ . lookup ns . scopeNameSpaces -- | A lens for 'scopeNameSpaces' updateScopeNameSpaces :: (ScopeNameSpaces -> ScopeNameSpaces) -> Scope -> Scope updateScopeNameSpaces f s = s { scopeNameSpaces = f (scopeNameSpaces s) } -- | ``Monadic'' lens (Functor sufficient). updateScopeNameSpacesM :: (Functor m) => (ScopeNameSpaces -> m ScopeNameSpaces) -> Scope -> m Scope updateScopeNameSpacesM f s = for (f $ scopeNameSpaces s) $ \ x -> s { scopeNameSpaces = x } -- | The complete information about the scope at a particular program point -- includes the scope stack, the local variables, and the context precedence. data ScopeInfo = ScopeInfo { scopeCurrent :: A.ModuleName , scopeModules :: Map A.ModuleName Scope , scopeVarsToBind :: LocalVars , scopeLocals :: LocalVars , scopePrecedence :: PrecedenceStack , scopeInverseName :: NameMap , scopeInverseModule :: ModuleMap , scopeInScope :: InScopeSet , scopeFixities :: C.Fixities -- ^ Maps concrete names to fixities , scopePolarities :: C.Polarities -- ^ Maps concrete names to polarities } deriving (Data, Show) type NameMap = Map A.QName (NonemptyList C.QName) type ModuleMap = Map A.ModuleName [C.QName] -- type ModuleMap = Map A.ModuleName (NonemptyList C.QName) instance Eq ScopeInfo where ScopeInfo c1 m1 v1 l1 p1 _ _ _ _ _ == ScopeInfo c2 m2 v2 l2 p2 _ _ _ _ _ = c1 == c2 && m1 == m2 && v1 == v2 && l1 == l2 && p1 == p2 -- | Local variables. type LocalVars = AssocList C.Name LocalVar -- | For each bound variable, we want to know whether it was bound by a -- λ, Π, module telescope, pattern, or @let@. data Binder = LambdaBound -- ^ @λ@ (currently also used for @Π@ and module parameters) | PatternBound -- ^ @f ... =@ | LetBound -- ^ @let ... in@ deriving (Data, Show, Eq) -- | A local variable can be shadowed by an import. -- In case of reference to a shadowed variable, we want to report -- a scope error. data LocalVar = LocalVar { localVar :: A.Name -- ^ Unique ID of local variable. , localBinder :: Binder -- ^ Kind of binder used to introduce the variable (@λ@, @let@, ...). , localShadowedBy :: [AbstractName] -- ^ If this list is not empty, the local variable is -- shadowed by one or more imports. } deriving (Data, Show) instance Eq LocalVar where (==) = (==) `on` localVar instance Ord LocalVar where compare = compare `on` localVar -- | We show shadowed variables as prefixed by a ".", as not in scope. instance Pretty LocalVar where pretty (LocalVar x _ []) = pretty x pretty (LocalVar x _ xs) = "." <> pretty x -- | Shadow a local name by a non-empty list of imports. shadowLocal :: [AbstractName] -> LocalVar -> LocalVar shadowLocal [] _ = __IMPOSSIBLE__ shadowLocal ys (LocalVar x b zs) = LocalVar x b (ys ++ zs) -- | Treat patternBound variable as a module parameter patternToModuleBound :: LocalVar -> LocalVar patternToModuleBound x | localBinder x == PatternBound = x { localBinder = LambdaBound } | otherwise = x -- | Project name of unshadowed local variable. notShadowedLocal :: LocalVar -> Maybe A.Name notShadowedLocal (LocalVar x _ []) = Just x notShadowedLocal _ = Nothing -- | Get all locals that are not shadowed __by imports__. notShadowedLocals :: LocalVars -> AssocList C.Name A.Name notShadowedLocals = mapMaybe $ \ (c,x) -> (c,) <$> notShadowedLocal x -- | Lens for 'scopeVarsToBind'. updateVarsToBind :: (LocalVars -> LocalVars) -> ScopeInfo -> ScopeInfo updateVarsToBind f sc = sc { scopeVarsToBind = f (scopeVarsToBind sc) } setVarsToBind :: LocalVars -> ScopeInfo -> ScopeInfo setVarsToBind vars = updateVarsToBind (const vars) -- | Lens for 'scopeLocals'. updateScopeLocals :: (LocalVars -> LocalVars) -> ScopeInfo -> ScopeInfo updateScopeLocals f sc = sc { scopeLocals = f (scopeLocals sc) } setScopeLocals :: LocalVars -> ScopeInfo -> ScopeInfo setScopeLocals vars = updateScopeLocals (const vars) mapScopeInfo :: (Scope -> Scope) -> ScopeInfo -> ScopeInfo mapScopeInfo f i = i{ scopeModules = f <$> scopeModules i } ------------------------------------------------------------------------ -- * Name spaces -- -- Map concrete names to lists of abstract names. ------------------------------------------------------------------------ -- | A @NameSpace@ contains the mappings from concrete names that the user can -- write to the abstract fully qualified names that the type checker wants to -- read. data NameSpace = NameSpace { nsNames :: NamesInScope -- ^ Maps concrete names to a list of abstract names. , nsModules :: ModulesInScope -- ^ Maps concrete module names to a list of abstract module names. , nsInScope :: InScopeSet } deriving (Data, Eq, Show) type ThingsInScope a = Map C.Name [a] type NamesInScope = ThingsInScope AbstractName type ModulesInScope = ThingsInScope AbstractModule type InScopeSet = Set A.QName -- | Set of types consisting of exactly 'AbstractName' and 'AbstractModule'. -- -- A GADT just for some dependent-types trickery. data InScopeTag a where NameTag :: InScopeTag AbstractName ModuleTag :: InScopeTag AbstractModule -- | Type class for some dependent-types trickery. class Eq a => InScope a where inScopeTag :: InScopeTag a instance InScope AbstractName where inScopeTag = NameTag instance InScope AbstractModule where inScopeTag = ModuleTag -- | @inNameSpace@ selects either the name map or the module name map from -- a 'NameSpace'. What is selected is determined by result type -- (using the dependent-type trickery). inNameSpace :: forall a. InScope a => NameSpace -> ThingsInScope a inNameSpace = case inScopeTag :: InScopeTag a of NameTag -> nsNames ModuleTag -> nsModules ------------------------------------------------------------------------ -- * Decorated names -- -- - What kind of name? (defined, constructor...) -- - Where does the name come from? (to explain to user) ------------------------------------------------------------------------ -- | For the sake of parsing left-hand sides, we distinguish -- constructor and record field names from defined names. data KindOfName = ConName -- ^ Constructor name. | FldName -- ^ Record field name. | DefName -- ^ Ordinary defined name. | PatternSynName -- ^ Name of a pattern synonym. | GeneralizeName -- ^ Name to be generalized | DisallowedGeneralizeName -- ^ Generalizable variable from a let open | MacroName -- ^ Name of a macro | QuotableName -- ^ A name that can only be quoted. deriving (Eq, Show, Data, Enum, Bounded) -- | A list containing all name kinds. allKindsOfNames :: [KindOfName] allKindsOfNames = [minBound..maxBound] -- | Where does a name come from? -- -- This information is solely for reporting to the user, -- see 'Agda.Interaction.InteractionTop.whyInScope'. data WhyInScope = Defined -- ^ Defined in this module. | Opened C.QName WhyInScope -- ^ Imported from another module. | Applied C.QName WhyInScope -- ^ Imported by a module application. deriving (Data, Show) -- | A decoration of 'Agda.Syntax.Abstract.Name.QName'. data AbstractName = AbsName { anameName :: A.QName -- ^ The resolved qualified name. , anameKind :: KindOfName -- ^ The kind (definition, constructor, record field etc.). , anameLineage :: WhyInScope -- ^ Explanation where this name came from. , anameMetadata :: NameMetadata -- ^ Additional information needed during scope checking. Currently used -- for generalized data/record params. } deriving (Data, Show) data NameMetadata = NoMetadata | GeneralizedVarsMetadata (Map A.QName A.Name) deriving (Data, Show) -- | A decoration of abstract syntax module names. data AbstractModule = AbsModule { amodName :: A.ModuleName -- ^ The resolved module name. , amodLineage :: WhyInScope -- ^ Explanation where this name came from. } deriving (Data, Show) instance Eq AbstractName where (==) = (==) `on` anameName instance Ord AbstractName where compare = compare `on` anameName -- | Van Laarhoven lens on 'anameName'. lensAnameName :: Functor m => (A.QName -> m A.QName) -> AbstractName -> m AbstractName lensAnameName f am = f (anameName am) <&> \ m -> am { anameName = m } instance Eq AbstractModule where (==) = (==) `on` amodName instance Ord AbstractModule where compare = compare `on` amodName -- | Van Laarhoven lens on 'amodName'. lensAmodName :: Functor m => (A.ModuleName -> m A.ModuleName) -> AbstractModule -> m AbstractModule lensAmodName f am = f (amodName am) <&> \ m -> am { amodName = m } data ResolvedName = -- | Local variable bound by λ, Π, module telescope, pattern, @let@. VarName { resolvedVar :: A.Name , resolvedBinder :: Binder -- ^ What kind of binder? } | -- | Function, data/record type, postulate. DefinedName Access AbstractName -- ^ 'anameKind' can be 'DefName', 'MacroName', 'QuotableName'. | -- | Record field name. Needs to be distinguished to parse copatterns. FieldName (NonemptyList AbstractName) -- ^ @('FldName' ==) . 'anameKind'@ for all names. | -- | Data or record constructor name. ConstructorName (NonemptyList AbstractName) -- ^ @('ConName' ==) . 'anameKind'@ for all names. | -- | Name of pattern synonym. PatternSynResName (NonemptyList AbstractName) -- ^ @('PatternSynName' ==) . 'anameKind'@ for all names. | -- | Unbound name. UnknownName deriving (Data, Show, Eq) instance Pretty ResolvedName where pretty = \case VarName x _ -> "variable" <+> pretty x DefinedName a x -> pretty a <+> pretty x FieldName xs -> "field" <+> pretty xs ConstructorName xs -> "constructor" <+> pretty xs PatternSynResName x -> "pattern" <+> pretty x UnknownName -> "" -- * Operations on name and module maps. mergeNames :: Eq a => ThingsInScope a -> ThingsInScope a -> ThingsInScope a mergeNames = Map.unionWith List.union ------------------------------------------------------------------------ -- * Operations on name spaces ------------------------------------------------------------------------ -- | The empty name space. emptyNameSpace :: NameSpace emptyNameSpace = NameSpace Map.empty Map.empty Set.empty -- | Map functions over the names and modules in a name space. mapNameSpace :: (NamesInScope -> NamesInScope ) -> (ModulesInScope -> ModulesInScope) -> (InScopeSet -> InScopeSet ) -> NameSpace -> NameSpace mapNameSpace fd fm fs ns = ns { nsNames = fd $ nsNames ns , nsModules = fm $ nsModules ns , nsInScope = fs $ nsInScope ns } -- | Zip together two name spaces. zipNameSpace :: (NamesInScope -> NamesInScope -> NamesInScope ) -> (ModulesInScope -> ModulesInScope -> ModulesInScope) -> (InScopeSet -> InScopeSet -> InScopeSet ) -> NameSpace -> NameSpace -> NameSpace zipNameSpace fd fm fs ns1 ns2 = ns1 { nsNames = nsNames ns1 `fd` nsNames ns2 , nsModules = nsModules ns1 `fm` nsModules ns2 , nsInScope = nsInScope ns1 `fs` nsInScope ns2 } -- | Map monadic function over a namespace. mapNameSpaceM :: Applicative m => (NamesInScope -> m NamesInScope ) -> (ModulesInScope -> m ModulesInScope) -> (InScopeSet -> m InScopeSet ) -> NameSpace -> m NameSpace mapNameSpaceM fd fm fs ns = update ns <$> fd (nsNames ns) <*> fm (nsModules ns) <*> fs (nsInScope ns) where update ns ds ms is = ns { nsNames = ds, nsModules = ms, nsInScope = is } ------------------------------------------------------------------------ -- * General operations on scopes ------------------------------------------------------------------------ -- | The empty scope. emptyScope :: Scope emptyScope = Scope { scopeName = noModuleName , scopeParents = [] , scopeNameSpaces = [ (nsid, emptyNameSpace) | nsid <- [minBound..maxBound] ] , scopeImports = Map.empty , scopeDatatypeModule = Nothing } -- | The empty scope info. emptyScopeInfo :: ScopeInfo emptyScopeInfo = ScopeInfo { scopeCurrent = noModuleName , scopeModules = Map.singleton noModuleName emptyScope , scopeVarsToBind = [] , scopeLocals = [] , scopePrecedence = [] , scopeInverseName = Map.empty , scopeInverseModule = Map.empty , scopeInScope = Set.empty , scopeFixities = Map.empty , scopePolarities = Map.empty } -- | Map functions over the names and modules in a scope. mapScope :: (NameSpaceId -> NamesInScope -> NamesInScope ) -> (NameSpaceId -> ModulesInScope -> ModulesInScope) -> (NameSpaceId -> InScopeSet -> InScopeSet ) -> Scope -> Scope mapScope fd fm fs = updateScopeNameSpaces $ AssocList.mapWithKey mapNS where mapNS acc = mapNameSpace (fd acc) (fm acc) (fs acc) -- | Same as 'mapScope' but applies the same function to all name spaces. mapScope_ :: (NamesInScope -> NamesInScope ) -> (ModulesInScope -> ModulesInScope) -> (InScopeSet -> InScopeSet ) -> Scope -> Scope mapScope_ fd fm fs = mapScope (const fd) (const fm) (const fs) -- | Same as 'mapScope' but applies the function only on the given name space. mapScope' :: NameSpaceId -> (NamesInScope -> NamesInScope ) -> (ModulesInScope -> ModulesInScope) -> (InScopeSet -> InScopeSet ) -> Scope -> Scope mapScope' i fd fm fs = mapScope (\ j -> if i == j then fd else id) (\ j -> if i == j then fm else id) (\ j -> if i == j then fs else id) -- | Map monadic functions over the names and modules in a scope. mapScopeM :: Applicative m => (NameSpaceId -> NamesInScope -> m NamesInScope ) -> (NameSpaceId -> ModulesInScope -> m ModulesInScope) -> (NameSpaceId -> InScopeSet -> m InScopeSet ) -> Scope -> m Scope mapScopeM fd fm fs = updateScopeNameSpacesM $ AssocList.mapWithKeyM mapNS where mapNS acc = mapNameSpaceM (fd acc) (fm acc) (fs acc) -- | Same as 'mapScopeM' but applies the same function to both the public and -- private name spaces. mapScopeM_ :: Applicative m => (NamesInScope -> m NamesInScope ) -> (ModulesInScope -> m ModulesInScope) -> (InScopeSet -> m InScopeSet ) -> Scope -> m Scope mapScopeM_ fd fm fs = mapScopeM (const fd) (const fm) (const fs) -- | Zip together two scopes. The resulting scope has the same name as the -- first scope. zipScope :: (NameSpaceId -> NamesInScope -> NamesInScope -> NamesInScope ) -> (NameSpaceId -> ModulesInScope -> ModulesInScope -> ModulesInScope) -> (NameSpaceId -> InScopeSet -> InScopeSet -> InScopeSet ) -> Scope -> Scope -> Scope zipScope fd fm fs s1 s2 = s1 { scopeNameSpaces = [ (nsid, zipNS nsid ns1 ns2) | ((nsid, ns1), (nsid', ns2)) <- fromMaybe __IMPOSSIBLE__ $ zipWith' (,) (scopeNameSpaces s1) (scopeNameSpaces s2) , assert (nsid == nsid') ] , scopeImports = (Map.union `on` scopeImports) s1 s2 } where assert True = True assert False = __IMPOSSIBLE__ zipNS acc = zipNameSpace (fd acc) (fm acc) (fs acc) -- | Same as 'zipScope' but applies the same function to both the public and -- private name spaces. zipScope_ :: (NamesInScope -> NamesInScope -> NamesInScope ) -> (ModulesInScope -> ModulesInScope -> ModulesInScope) -> (InScopeSet -> InScopeSet -> InScopeSet ) -> Scope -> Scope -> Scope zipScope_ fd fm fs = zipScope (const fd) (const fm) (const fs) -- | Recompute the inScope sets of a scope. recomputeInScopeSets :: Scope -> Scope recomputeInScopeSets = updateScopeNameSpaces (map $ second recomputeInScope) where recomputeInScope ns = ns { nsInScope = Set.unions $ map (Set.fromList . map anameName) $ Map.elems $ nsNames ns } -- | Filter a scope keeping only concrete names matching the predicates. -- The first predicate is applied to the names and the second to the modules. filterScope :: (C.Name -> Bool) -> (C.Name -> Bool) -> Scope -> Scope filterScope pd pm = recomputeInScopeSets . mapScope_ (Map.filterKeys pd) (Map.filterKeys pm) id -- We don't have enough information in the in scope set to do an -- incremental update here, so just recompute it from the name map. -- | Return all names in a scope. allNamesInScope :: InScope a => Scope -> ThingsInScope a allNamesInScope = namesInScope [minBound..maxBound] allNamesInScope' :: InScope a => Scope -> ThingsInScope (a, Access) allNamesInScope' s = foldr1 mergeNames [ map (, nameSpaceAccess ns) <$> namesInScope [ns] s | ns <- [minBound..maxBound] ] -- | Returns the scope's non-private names. exportedNamesInScope :: InScope a => Scope -> ThingsInScope a exportedNamesInScope = namesInScope [PublicNS, ImportedNS, OnlyQualifiedNS] namesInScope :: InScope a => [NameSpaceId] -> Scope -> ThingsInScope a namesInScope ids s = foldr1 mergeNames [ inNameSpace (scopeNameSpace nsid s) | nsid <- ids ] allThingsInScope :: Scope -> NameSpace allThingsInScope = thingsInScope [minBound..maxBound] thingsInScope :: [NameSpaceId] -> Scope -> NameSpace thingsInScope fs s = NameSpace { nsNames = namesInScope fs s , nsModules = namesInScope fs s , nsInScope = Set.unions [ nsInScope $ scopeNameSpace nsid s | nsid <- fs ] } -- | Merge two scopes. The result has the name of the first scope. mergeScope :: Scope -> Scope -> Scope mergeScope = zipScope_ mergeNames mergeNames Set.union -- | Merge a non-empty list of scopes. The result has the name of the first -- scope in the list. mergeScopes :: [Scope] -> Scope mergeScopes [] = __IMPOSSIBLE__ mergeScopes ss = foldr1 mergeScope ss -- * Specific operations on scopes -- | Move all names in a scope to the given name space (except never move from -- Imported to Public). setScopeAccess :: NameSpaceId -> Scope -> Scope setScopeAccess a s = (`updateScopeNameSpaces` s) $ AssocList.mapWithKey $ const . ns where zero = emptyNameSpace one = allThingsInScope s imp = thingsInScope [ImportedNS] s noimp = thingsInScope [PublicNS, PrivateNS, OnlyQualifiedNS] s ns b = case (a, b) of (PublicNS, PublicNS) -> noimp (PublicNS, ImportedNS) -> imp _ | a == b -> one | otherwise -> zero -- | Update a particular name space. setNameSpace :: NameSpaceId -> NameSpace -> Scope -> Scope setNameSpace nsid ns = modifyNameSpace nsid $ const ns -- | Modify a particular name space. modifyNameSpace :: NameSpaceId -> (NameSpace -> NameSpace) -> Scope -> Scope modifyNameSpace nsid f = updateScopeNameSpaces $ AssocList.updateAt nsid f -- | Add names to a scope. addNamesToScope :: NameSpaceId -> C.Name -> [AbstractName] -> Scope -> Scope addNamesToScope acc x ys s = mergeScope s s1 where s1 = setScopeAccess acc $ setNameSpace PublicNS ns emptyScope ns = emptyNameSpace { nsNames = Map.singleton x ys , nsInScope = Set.fromList (map anameName ys) } -- | Add a name to a scope. addNameToScope :: NameSpaceId -> C.Name -> AbstractName -> Scope -> Scope addNameToScope acc x y s = addNamesToScope acc x [y] s -- | Remove a name from a scope. Caution: does not update the nsInScope set. -- This is only used by rebindName and in that case we add the name right -- back (but with a different kind). removeNameFromScope :: NameSpaceId -> C.Name -> Scope -> Scope removeNameFromScope ns x s = mapScope remove (const id) (const id) s where remove ns' | ns' /= ns = id | otherwise = Map.delete x -- | Add a module to a scope. addModuleToScope :: NameSpaceId -> C.Name -> AbstractModule -> Scope -> Scope addModuleToScope acc x m s = mergeScope s s1 where s1 = setScopeAccess acc $ setNameSpace PublicNS ns emptyScope ns = emptyNameSpace { nsModules = Map.singleton x [m] } -- When we get here we cannot have both using and hiding type UsingOrHiding = Either C.Using [C.ImportedName] usingOrHiding :: C.ImportDirective -> UsingOrHiding usingOrHiding i = case (using i, hiding i) of (UseEverything, xs) -> Right xs (u, []) -> Left u _ -> __IMPOSSIBLE__ -- | Apply an 'ImportDirective' to a scope. applyImportDirective :: C.ImportDirective -> Scope -> Scope applyImportDirective dir s = mergeScope usedOrHidden renamed where usedOrHidden = useOrHide (hideLHS (impRenaming dir) $ usingOrHiding dir) s renamed = rename (impRenaming dir) $ useOrHide useRenamedThings s useRenamedThings = Left $ Using $ map renFrom $ impRenaming dir hideLHS :: [C.Renaming] -> UsingOrHiding -> UsingOrHiding hideLHS _ i@(Left _) = i hideLHS ren (Right xs) = Right $ xs ++ map renFrom ren useOrHide :: UsingOrHiding -> Scope -> Scope useOrHide (Right xs) s = filterNames notElem notElem xs s useOrHide (Left (Using xs)) s = filterNames elem elem xs s useOrHide _ _ = __IMPOSSIBLE__ filterNames :: (C.Name -> [C.Name] -> Bool) -> (C.Name -> [C.Name] -> Bool) -> [C.ImportedName] -> Scope -> Scope filterNames pd pm xs = filterScope (`pd` ds) (`pm` ms) where ds = [ x | ImportedName x <- xs ] ms = [ m | ImportedModule m <- xs ] -- Renaming rename :: [C.Renaming] -> Scope -> Scope rename rho = mapScope_ (Map.mapKeys $ ren drho) (Map.mapKeys $ ren mrho) id where (drho, mrho) = partitionEithers $ for rho $ \case Renaming (ImportedName x) (ImportedName y) _ -> Left (x,y) Renaming (ImportedModule x) (ImportedModule y) _ -> Right (x,y) _ -> __IMPOSSIBLE__ ren r x = fromMaybe x $ lookup x r -- | Rename the abstract names in a scope. renameCanonicalNames :: Map A.QName A.QName -> Map A.ModuleName A.ModuleName -> Scope -> Scope renameCanonicalNames renD renM = mapScope_ renameD renameM (Set.map newName) where newName x = Map.findWithDefault x x renD newMod x = Map.findWithDefault x x renM renameD = Map.map $ map $ over lensAnameName newName renameM = Map.map $ map $ over lensAmodName newMod -- | Remove private name space of a scope. -- -- Should be a right identity for 'exportedNamesInScope'. -- @exportedNamesInScope . restrictPrivate == exportedNamesInScope@. restrictPrivate :: Scope -> Scope restrictPrivate s = setNameSpace PrivateNS emptyNameSpace $ s { scopeImports = Map.empty } -- | Remove private things from the given module from a scope. restrictLocalPrivate :: ModuleName -> Scope -> Scope restrictLocalPrivate m = mapScope' PrivateNS (Map.mapMaybe rName) (Map.mapMaybe rMod) (Set.filter (not . (`isInModule` m))) where check p x = x <$ guard (p x) rName as = check (not . null) $ filter (not . (`isInModule` m) . anameName) as rMod as = check (not . null) $ filter (not . (`isSubModuleOf` m) . amodName) as -- | Remove names that can only be used qualified (when opening a scope) removeOnlyQualified :: Scope -> Scope removeOnlyQualified s = setNameSpace OnlyQualifiedNS emptyNameSpace s -- | Disallow using generalized variables from the scope disallowGeneralizedVars :: Scope -> Scope disallowGeneralizedVars = mapScope_ ((fmap . map) disallow) id id where disallow a = a { anameKind = disallowGen (anameKind a) } disallowGen GeneralizeName = DisallowedGeneralizeName disallowGen k = k -- | Add an explanation to why things are in scope. inScopeBecause :: (WhyInScope -> WhyInScope) -> Scope -> Scope inScopeBecause f = mapScope_ mapName mapMod id where mapName = fmap . map $ \a -> a { anameLineage = f $ anameLineage a } mapMod = fmap . map $ \a -> a { amodLineage = f $ amodLineage a } -- | Get the public parts of the public modules of a scope publicModules :: ScopeInfo -> Map A.ModuleName Scope publicModules scope = Map.filterWithKey (\ m _ -> reachable m) allMods where -- Get all modules in the ScopeInfo. allMods = Map.map restrictPrivate $ scopeModules scope root = scopeCurrent scope modules s = map amodName $ concat $ Map.elems $ allNamesInScope s chase m = m : concatMap chase ms where ms = maybe __IMPOSSIBLE__ modules $ Map.lookup m allMods reachable = (`elem` chase root) publicNames :: ScopeInfo -> Set AbstractName publicNames scope = Set.fromList $ concat $ Map.elems $ exportedNamesInScope $ mergeScopes $ Map.elems $ publicModules scope everythingInScope :: ScopeInfo -> NameSpace everythingInScope scope = allThingsInScope $ mergeScopes $ (s0 :) $ map look $ scopeParents s0 where look m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope s0 = look $ scopeCurrent scope everythingInScopeQualified :: ScopeInfo -> NameSpace everythingInScopeQualified scope = allThingsInScope $ mergeScopes $ chase Set.empty scopes where s0 = look $ scopeCurrent scope scopes = s0 : map look (scopeParents s0) look m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope lookP = restrictPrivate . look -- We start with the current module and all its parents and look through -- all their imports and submodules. chase seen [] = [] chase seen (s : ss) | Set.member name seen = chase seen ss | otherwise = s : chase (Set.insert name seen) (imports ++ submods ++ ss) where name = scopeName s imports = map lookP $ Map.elems $ scopeImports s submods = map (lookP . amodName) $ concat $ Map.elems $ allNamesInScope s -- | Compute a flattened scope. Only include unqualified names or names -- qualified by modules in the first argument. flattenScope :: [[C.Name]] -> ScopeInfo -> Map C.QName [AbstractName] flattenScope ms scope = Map.unionWith (++) (build ms allNamesInScope root) imported where current = moduleScope $ scopeCurrent scope root = mergeScopes $ current : map moduleScope (scopeParents current) imported = Map.unionsWith (++) [ qual c (build ms' exportedNamesInScope $ moduleScope a) | (c, a) <- Map.toList $ scopeImports root , let -- get the suffixes of c in ms ms' = mapMaybe (List.stripPrefix $ C.qnameParts c) ms , not $ null ms' ] qual c = Map.mapKeys (q c) where q (C.QName x) = C.Qual x q (C.Qual m x) = C.Qual m . q x build :: [[C.Name]] -> (forall a. InScope a => Scope -> ThingsInScope a) -> Scope -> Map C.QName [AbstractName] build ms getNames s = Map.unionsWith (++) $ (Map.mapKeysMonotonic C.QName $ getNames s) : [ Map.mapKeysMonotonic (\ y -> C.Qual x y) $ build ms' exportedNamesInScope $ moduleScope m | (x, mods) <- Map.toList (getNames s) , let ms' = [ tl | hd:tl <- ms, hd == x ] , not $ null ms' , AbsModule m _ <- mods ] moduleScope :: A.ModuleName -> Scope moduleScope m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope -- | Get all concrete names in scope. Includes bound variables. concreteNamesInScope :: ScopeInfo -> Set C.QName concreteNamesInScope scope = Set.unions [ build allNamesInScope root, imported, locals ] where current = moduleScope $ scopeCurrent scope root = mergeScopes $ current : map moduleScope (scopeParents current) locals = Set.fromList [ C.QName x | (x, _) <- scopeLocals scope ] imported = Set.unions [ qual c (build exportedNamesInScope $ moduleScope a) | (c, a) <- Map.toList $ scopeImports root ] qual c = Set.map (q c) where q (C.QName x) = C.Qual x q (C.Qual m x) = C.Qual m . q x build :: (forall a. InScope a => Scope -> ThingsInScope a) -> Scope -> Set C.QName build getNames s = Set.unions $ (Set.fromList $ map C.QName $ Map.keys (getNames s :: ThingsInScope AbstractName)) : [ Set.mapMonotonic (\ y -> C.Qual x y) $ build exportedNamesInScope $ moduleScope m | (x, mods) <- Map.toList (getNames s) , prettyShow x /= "_" , AbsModule m _ <- mods ] moduleScope :: A.ModuleName -> Scope moduleScope m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope -- | Look up a name in the scope scopeLookup :: InScope a => C.QName -> ScopeInfo -> [a] scopeLookup q scope = map fst $ scopeLookup' q scope scopeLookup' :: forall a. InScope a => C.QName -> ScopeInfo -> [(a, Access)] scopeLookup' q scope = List.nubBy ((==) `on` fst) $ findName q root ++ maybeToList topImports ++ imports where -- 1. Finding a name in the current scope and its parents. moduleScope :: A.ModuleName -> Scope moduleScope m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope current :: Scope current = moduleScope $ scopeCurrent scope root :: Scope root = mergeScopes $ current : map moduleScope (scopeParents current) -- | Find a concrete, possibly qualified name in scope @s@. findName :: forall a. InScope a => C.QName -> Scope -> [(a, Access)] findName q0 s = case q0 of C.QName x -> lookupName x s C.Qual x q -> do let -- | Get the modules named @x@ in scope @s@. mods :: [A.ModuleName] mods = amodName . fst <$> lookupName x s -- | Get the definitions named @x@ in scope @s@ and interpret them as modules. -- Andreas, 2013-05-01: Issue 836 debates this feature: -- Qualified constructors are qualified by their datatype rather than a module defs :: [A.ModuleName] defs = mnameFromList . qnameToList . anameName . fst <$> lookupName x s -- Andreas, 2013-05-01: Issue 836 complains about the feature -- that constructors can also be qualified by their datatype -- and projections by their record type. This feature is off -- if we just consider the modules: m <- mods -- The feature is on if we consider also the data and record types: -- trace ("mods ++ defs = " ++ show (mods ++ defs)) $ do -- m <- nub $ mods ++ defs -- record types will appear both as a mod and a def -- Get the scope of module m, if any, and remove its private definitions. let ss = Map.lookup m $ scopeModules scope ss' = restrictPrivate <$> ss -- trace ("ss = " ++ show ss ) $ do -- trace ("ss' = " ++ show ss') $ do s' <- maybeToList ss' findName q s' where lookupName :: forall a. InScope a => C.Name -> Scope -> [(a, Access)] lookupName x s = fromMaybe [] $ Map.lookup x $ allNamesInScope' s -- 2. Finding a name in the top imports. topImports :: Maybe (a, Access) topImports = case (inScopeTag :: InScopeTag a) of NameTag -> Nothing ModuleTag -> first (`AbsModule` Defined) <$> imported q imported :: C.QName -> Maybe (A.ModuleName, Access) imported q = fmap (,PublicAccess) $ Map.lookup q $ scopeImports root -- 3. Finding a name in the imports belonging to an initial part of the qualifier. imports :: [(a, Access)] imports = do (m, x) <- splitName q m <- maybeToList $ fst <$> imported m findName x $ restrictPrivate $ moduleScope m -- return all possible splittings, e.g. -- splitName X.Y.Z = [(X, Y.Z), (X.Y, Z)] splitName :: C.QName -> [(C.QName, C.QName)] splitName (C.QName x) = [] splitName (C.Qual x q) = (C.QName x, q) : [ (C.Qual x m, r) | (m, r) <- splitName q ] -- * Inverse look-up data AllowAmbiguousNames = AmbiguousAnything -- ^ Used for instance arguments to check whether a name is in scope, -- but we do not care whether is is ambiguous | AmbiguousConProjs -- ^ Ambiguous constructors, projections, or pattern synonyms. | AmbiguousNothing deriving (Eq) isNameInScope :: A.QName -> ScopeInfo -> Bool isNameInScope q scope = billToPure [ Scoping, InverseScopeLookup ] $ Set.member q (scopeInScope scope) -- | Find the concrete names that map (uniquely) to a given abstract name. -- Sort by length, shortest first. inverseScopeLookup :: Either A.ModuleName A.QName -> ScopeInfo -> [C.QName] inverseScopeLookup = inverseScopeLookup' AmbiguousConProjs inverseScopeLookup' :: AllowAmbiguousNames -> Either A.ModuleName A.QName -> ScopeInfo -> [C.QName] inverseScopeLookup' amb name scope = billToPure [ Scoping , InverseScopeLookup ] $ case name of Left m -> best $ filter unambiguousModule $ findModule m Right q -> best $ filter unambiguousName $ findName q where findName x = maybe [] toList $ Map.lookup x (scopeInverseName scope) findModule x = fromMaybe [] $ Map.lookup x (scopeInverseModule scope) len :: C.QName -> Int len (C.QName _) = 1 len (C.Qual _ x) = 1 + len x best :: [C.QName] -> [C.QName] best = List.sortBy (compare `on` len) unique :: forall a . [a] -> Bool unique [] = __IMPOSSIBLE__ unique [_] = True unique (_:_:_) = False unambiguousModule q = amb == AmbiguousAnything || unique (scopeLookup q scope :: [AbstractModule]) unambiguousName q = amb == AmbiguousAnything || unique xs || amb == AmbiguousConProjs && or [ all ((kind ==) . anameKind) xs | kind <- [ConName, FldName, PatternSynName] ] where xs = scopeLookup q scope recomputeInverseScopeMaps :: ScopeInfo -> ScopeInfo recomputeInverseScopeMaps scope = billToPure [ Scoping , InverseScopeLookup ] $ scope { scopeInverseName = nameMap , scopeInverseModule = Map.fromList [ (x, findModule x) | x <- Map.keys moduleMap ++ Map.keys importMap ] , scopeInScope = nsInScope $ everythingInScopeQualified scope } where this = scopeCurrent scope current = this : scopeParents (moduleScope this) scopes = [ (m, restrict m s) | (m, s) <- Map.toList (scopeModules scope) ] moduleScope :: A.ModuleName -> Scope moduleScope m = fromMaybe __IMPOSSIBLE__ $ Map.lookup m $ scopeModules scope restrict m s | m `elem` current = s | otherwise = restrictPrivate s internalName :: C.QName -> Bool internalName C.QName{} = False internalName (C.Qual m n) = intern m || internalName n where -- Recognize fresh names created Parser.y intern (C.Name _ _ [ C.Id ('.' : '#' : _) ]) = True intern _ = False findName :: Ord a => Map a [(A.ModuleName, C.Name)] -> a -> [C.QName] findName table q = do (m, x) <- fromMaybe [] $ Map.lookup q table if m `elem` current then return (C.QName x) else do y <- findModule m let z = C.qualify y x guard $ not $ internalName z return z findModule :: A.ModuleName -> [C.QName] findModule q = findName moduleMap q ++ fromMaybe [] (Map.lookup q importMap) importMap = Map.fromListWith (++) $ do (m, s) <- scopes (x, y) <- Map.toList $ scopeImports s return (y, singleton x) moduleMap = Map.fromListWith (++) $ do (m, s) <- scopes (x, ms) <- Map.toList (allNamesInScope s) q <- amodName <$> ms return (q, singleton (m, x)) nameMap :: NameMap nameMap = Map.fromListWith (Sgrp.<>) $ do (m, s) <- scopes (x, ms) <- Map.toList (allNamesInScope s) q <- anameName <$> ms if elem m current then return (q, singleton (C.QName x)) else do y <- findModule m let z = C.qualify y x guard $ not $ internalName z return (q, singleton z) -- | Find the concrete names that map (uniquely) to a given abstract qualified name. -- Sort by length, shortest first. inverseScopeLookupName :: A.QName -> ScopeInfo -> [C.QName] inverseScopeLookupName x = inverseScopeLookup (Right x) inverseScopeLookupName' :: AllowAmbiguousNames -> A.QName -> ScopeInfo -> [C.QName] inverseScopeLookupName' ambCon x = inverseScopeLookup' ambCon (Right x) -- | Find the concrete names that map (uniquely) to a given abstract module name. -- Sort by length, shortest first. inverseScopeLookupModule :: A.ModuleName -> ScopeInfo -> [C.QName] inverseScopeLookupModule x = inverseScopeLookup (Left x) ------------------------------------------------------------------------ -- * (Debug) printing ------------------------------------------------------------------------ instance Pretty AbstractName where pretty = pretty . anameName instance Pretty AbstractModule where pretty = pretty . amodName instance Pretty NameSpaceId where pretty = text . \case PublicNS -> "public" PrivateNS -> "private" ImportedNS -> "imported" OnlyQualifiedNS -> "only-qualified" instance Pretty NameSpace where pretty = vcat . prettyNameSpace prettyNameSpace :: NameSpace -> [Doc] prettyNameSpace (NameSpace names mods _) = blockOfLines "names" (map pr $ Map.toList names) ++ blockOfLines "modules" (map pr $ Map.toList mods) where pr :: (Pretty a, Pretty b) => (a,b) -> Doc pr (x, y) = pretty x <+> "-->" <+> pretty y instance Pretty Scope where pretty (scope@Scope{ scopeName = name, scopeParents = parents, scopeImports = imps }) = vcat $ [ "scope" <+> pretty name ] ++ ind ( concat [ blockOfLines (pretty nsid) $ prettyNameSpace $ scopeNameSpace nsid scope | nsid <- [minBound..maxBound] ] ++ blockOfLines "imports" (case Map.keys imps of [] -> []; ks -> [ prettyList ks ]) ) where ind = map $ nest 2 -- | Add first string only if list is non-empty. blockOfLines :: Doc -> [Doc] -> [Doc] blockOfLines _ [] = [] blockOfLines hd ss = hd : map (nest 2) ss instance Pretty ScopeInfo where pretty (ScopeInfo this mods toBind locals ctx _ _ _ _ _) = vcat $ [ "ScopeInfo" , " current = " <> pretty this ] ++ (if null toBind then [] else [ " toBind = " <> pretty locals ]) ++ (if null locals then [] else [ " locals = " <> pretty locals ]) ++ [ " context = " <> pretty ctx , " modules" ] ++ map (nest 4) (List.filter (not . null) $ map pretty $ Map.elems mods) ------------------------------------------------------------------------ -- * Boring instances ------------------------------------------------------------------------ instance KillRange ScopeInfo where killRange m = m instance HasRange AbstractName where getRange = getRange . anameName instance SetRange AbstractName where setRange r x = x { anameName = setRange r $ anameName x } Agda-2.6.0.1/src/full/Agda/Syntax/Scope/Monad.hs0000644000000000000000000007732413466402171017237 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation #-} {-| The scope monad with operations. -} module Agda.Syntax.Scope.Monad where import Prelude hiding (mapM, any, all) import Control.Arrow (first, second, (***), (&&&)) import Control.Monad hiding (mapM, forM) import Control.Monad.Writer hiding (mapM, forM) import Control.Monad.State hiding (mapM, forM) import Data.Either ( partitionEithers ) import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Data.Foldable (any, all) import Data.Traversable hiding (for) import Agda.Syntax.Common import Agda.Syntax.Position import Agda.Syntax.Fixity import Agda.Syntax.Abstract.Name as A import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract (ScopeCopyInfo(..), initCopyInfo) import Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Fixity import Agda.Syntax.Concrete.Definitions (DeclarationWarning(..)) -- TODO: move the relevant warnings out of there import Agda.Syntax.Scope.Base import Agda.TypeChecking.Monad.Base import Agda.TypeChecking.Monad.Debug import Agda.TypeChecking.Monad.Options import Agda.TypeChecking.Monad.State import Agda.TypeChecking.Monad.Trace ( setCurrentRange ) import Agda.TypeChecking.Positivity.Occurrence (Occurrence) import Agda.TypeChecking.Warnings ( warning ) import qualified Agda.Utils.AssocList as AssocList import Agda.Utils.Function import Agda.Utils.Functor import Agda.Utils.List import Agda.Utils.Maybe import Agda.Utils.Monad import Agda.Utils.Null (unlessNull) import Agda.Utils.NonemptyList import Agda.Utils.Pretty import Agda.Utils.Size import Agda.Utils.Tuple #include "undefined.h" import Agda.Utils.Impossible -- * The scope checking monad -- | To simplify interaction between scope checking and type checking (in -- particular when chasing imports), we use the same monad. type ScopeM = TCM -- * Errors isDatatypeModule :: A.ModuleName -> ScopeM (Maybe DataOrRecord) isDatatypeModule m = do scopeDatatypeModule . Map.findWithDefault __IMPOSSIBLE__ m . scopeModules <$> getScope -- Debugging printLocals :: Int -> String -> ScopeM () printLocals v s = verboseS "scope.top" v $ do locals <- getLocalVars reportSLn "scope.top" v $ s ++ " " ++ prettyShow locals -- * General operations getCurrentModule :: ScopeM A.ModuleName getCurrentModule = setRange noRange . scopeCurrent <$> getScope setCurrentModule :: A.ModuleName -> ScopeM () setCurrentModule m = modifyScope $ \s -> s { scopeCurrent = m } withCurrentModule :: A.ModuleName -> ScopeM a -> ScopeM a withCurrentModule new action = do old <- getCurrentModule setCurrentModule new x <- action setCurrentModule old return x withCurrentModule' :: (MonadTrans t, Monad (t ScopeM)) => A.ModuleName -> t ScopeM a -> t ScopeM a withCurrentModule' new action = do old <- lift getCurrentModule lift $ setCurrentModule new x <- action lift $ setCurrentModule old return x getNamedScope :: A.ModuleName -> ScopeM Scope getNamedScope m = do scope <- getScope case Map.lookup m (scopeModules scope) of Just s -> return s Nothing -> do reportSLn "" 0 $ "ERROR: In scope\n" ++ prettyShow scope ++ "\nNO SUCH SCOPE " ++ prettyShow m __IMPOSSIBLE__ getCurrentScope :: ScopeM Scope getCurrentScope = getNamedScope =<< getCurrentModule -- | Create a new module with an empty scope. -- (@Just@ if it is a datatype or record module.) createModule :: Maybe DataOrRecord -> A.ModuleName -> ScopeM () createModule b m = do reportSLn "scope.createModule" 10 $ "createModule " ++ prettyShow m s <- getCurrentScope let parents = scopeName s : scopeParents s sm = emptyScope { scopeName = m , scopeParents = parents , scopeDatatypeModule = b } -- Andreas, 2015-07-02: internal error if module is not new. -- Ulf, 2016-02-15: It's not new if multiple imports (#1770). modifyScopes $ Map.insertWith const m sm -- | Apply a function to the scope map. modifyScopes :: (Map A.ModuleName Scope -> Map A.ModuleName Scope) -> ScopeM () modifyScopes f = modifyScope $ \s -> s { scopeModules = f $ scopeModules s } -- | Apply a function to the given scope. modifyNamedScope :: A.ModuleName -> (Scope -> Scope) -> ScopeM () modifyNamedScope m f = modifyScopes $ Map.adjust f m setNamedScope :: A.ModuleName -> Scope -> ScopeM () setNamedScope m s = modifyNamedScope m $ const s -- | Apply a monadic function to the top scope. modifyNamedScopeM :: A.ModuleName -> (Scope -> ScopeM (a, Scope)) -> ScopeM a modifyNamedScopeM m f = do (a, s) <- f =<< getNamedScope m setNamedScope m s return a -- | Apply a function to the current scope. modifyCurrentScope :: (Scope -> Scope) -> ScopeM () modifyCurrentScope f = getCurrentModule >>= (`modifyNamedScope` f) modifyCurrentScopeM :: (Scope -> ScopeM (a, Scope)) -> ScopeM a modifyCurrentScopeM f = getCurrentModule >>= (`modifyNamedScopeM` f) -- | Apply a function to the public or private name space. modifyCurrentNameSpace :: NameSpaceId -> (NameSpace -> NameSpace) -> ScopeM () modifyCurrentNameSpace acc f = modifyCurrentScope $ updateScopeNameSpaces $ AssocList.updateAt acc f pushContextPrecedence :: Precedence -> ScopeM PrecedenceStack pushContextPrecedence p = do old <- scopePrecedence <$> getScope modifyScope_ $ \ s -> s { scopePrecedence = pushPrecedence p $ scopePrecedence s } return old setContextPrecedence :: PrecedenceStack -> ScopeM () setContextPrecedence ps = modifyScope_ $ \ s -> s { scopePrecedence = ps } withContextPrecedence :: Precedence -> ScopeM a -> ScopeM a withContextPrecedence p = bracket_ (pushContextPrecedence p) setContextPrecedence getLocalVars :: ScopeM LocalVars getLocalVars = scopeLocals <$> getScope modifyLocalVars :: (LocalVars -> LocalVars) -> ScopeM () modifyLocalVars = modifyScope_ . updateScopeLocals setLocalVars :: LocalVars -> ScopeM () setLocalVars vars = modifyLocalVars $ const vars -- | Run a computation without changing the local variables. withLocalVars :: ScopeM a -> ScopeM a withLocalVars = bracket_ getLocalVars setLocalVars getVarsToBind :: ScopeM LocalVars getVarsToBind = scopeVarsToBind <$> getScope addVarToBind :: C.Name -> LocalVar -> ScopeM () addVarToBind x y = modifyScope_ $ updateVarsToBind $ AssocList.insert x y -- | After collecting some variable names in the scopeVarsToBind, -- bind them all simultaneously. bindVarsToBind :: ScopeM () bindVarsToBind = do vars <- getVarsToBind modifyLocalVars (vars++) printLocals 10 "bound variables:" modifyScope_ $ setVarsToBind [] -- * Names -- | Create a fresh abstract name from a concrete name. -- -- This function is used when we translate a concrete name -- in a binder. The 'Range' of the concrete name is -- saved as the 'nameBindingSite' of the abstract name. freshAbstractName :: Fixity' -> C.Name -> ScopeM A.Name freshAbstractName fx x = do i <- fresh return $ A.Name { nameId = i , nameConcrete = x , nameBindingSite = getRange x , nameFixity = fx , nameIsRecordName = False } -- | @freshAbstractName_ = freshAbstractName noFixity'@ freshAbstractName_ :: C.Name -> ScopeM A.Name freshAbstractName_ = freshAbstractName noFixity' -- | Create a fresh abstract qualified name. freshAbstractQName :: Fixity' -> C.Name -> ScopeM A.QName freshAbstractQName fx x = do y <- freshAbstractName fx x m <- getCurrentModule return $ A.qualify m y freshAbstractQName' :: C.Name -> ScopeM A.QName freshAbstractQName' x = do fx <- getConcreteFixity x freshAbstractQName fx x -- * Resolving names -- | Look up the abstract name referred to by a given concrete name. resolveName :: C.QName -> ScopeM ResolvedName resolveName = resolveName' allKindsOfNames Nothing -- | Look up the abstract name corresponding to a concrete name of -- a certain kind and/or from a given set of names. -- Sometimes we know already that we are dealing with a constructor -- or pattern synonym (e.g. when we have parsed a pattern). -- Then, we can ignore conflicting definitions of that name -- of a different kind. (See issue 822.) resolveName' :: [KindOfName] -> Maybe (Set A.Name) -> C.QName -> ScopeM ResolvedName resolveName' kinds names x = do scope <- getScope let vars = AssocList.mapKeysMonotonic C.QName $ scopeLocals scope retVar y = return . VarName y{ nameConcrete = unqualify x } aName = A.qnameName . anameName case lookup x vars of -- Case: we have a local variable x. Just (LocalVar y b []) -> retVar y b -- Case: ... but is (perhaps) shadowed by some imports. Just (LocalVar y b ys) -> case names of Nothing -> shadowed ys Just ns -> case filter (\ y -> aName y `Set.member` ns) ys of [] -> retVar y b ys -> shadowed ys where shadowed ys = typeError $ AmbiguousName x $ A.qualify_ y :! map anameName ys -- Case: we do not have a local variable x. Nothing -> do -- Consider only names of one of the given kinds let filtKind = filter $ \ y -> anameKind (fst y) `elem` kinds -- Consider only names in the given set of names filtName = filter $ \ y -> maybe True (Set.member (aName (fst y))) names caseListNe (filtKind $ filtName $ scopeLookup' x scope) (return UnknownName) $ \ case ds | all ((ConName ==) . anameKind . fst) ds -> return $ ConstructorName $ fmap (upd . fst) ds ds | all ((FldName ==) . anameKind . fst) ds -> return $ FieldName $ fmap (upd . fst) ds ds | all ((PatternSynName ==) . anameKind . fst) ds -> return $ PatternSynResName $ fmap (upd . fst) ds (d, a) :! [] -> return $ DefinedName a $ upd d ds -> typeError $ AmbiguousName x (fmap (anameName . fst) ds) where upd d = updateConcreteName d $ unqualify x updateConcreteName :: AbstractName -> C.Name -> AbstractName updateConcreteName d@(AbsName { anameName = A.QName qm qn }) x = d { anameName = A.QName (setRange (getRange x) qm) (qn { nameConcrete = x }) } -- | Look up a module in the scope. resolveModule :: C.QName -> ScopeM AbstractModule resolveModule x = do ms <- scopeLookup x <$> getScope caseListNe ms (typeError $ NoSuchModule x) $ \ case AbsModule m why :! [] -> return $ AbsModule (m `withRangeOf` x) why ms -> typeError $ AmbiguousModule x (fmap amodName ms) -- | Get the fixity of a not yet bound name. getConcreteFixity :: C.Name -> ScopeM Fixity' getConcreteFixity x = Map.findWithDefault noFixity' x . scopeFixities <$> getScope -- | Get the polarities of a not yet bound name. getConcretePolarity :: C.Name -> ScopeM (Maybe [Occurrence]) getConcretePolarity x = Map.lookup x . scopePolarities <$> getScope instance MonadFixityError ScopeM where throwMultipleFixityDecls xs = case xs of (x, _) : _ -> setCurrentRange (getRange x) $ typeError $ MultipleFixityDecls xs [] -> __IMPOSSIBLE__ throwMultiplePolarityPragmas xs = case xs of x : _ -> setCurrentRange (getRange x) $ typeError $ MultiplePolarityPragmas xs [] -> __IMPOSSIBLE__ warnUnknownNamesInFixityDecl = warning . NicifierIssue . UnknownNamesInFixityDecl warnUnknownNamesInPolarityPragmas = warning . NicifierIssue . UnknownNamesInPolarityPragmas warnUnknownFixityInMixfixDecl = warning . NicifierIssue . UnknownFixityInMixfixDecl warnPolarityPragmasButNotPostulates = warning . NicifierIssue . PolarityPragmasButNotPostulates -- | Collect the fixity/syntax declarations and polarity pragmas from the list -- of declarations and store them in the scope. computeFixitiesAndPolarities :: DoWarn -> [C.Declaration] -> ScopeM a -> ScopeM a computeFixitiesAndPolarities warn ds ret = do (fixs0, pols0) <- (scopeFixities &&& scopePolarities) <$> getScope (fixs, pols) <- fixitiesAndPolarities warn ds modifyScope $ \ s -> s { scopeFixities = fixs, scopePolarities = pols } x <- ret modifyScope $ \ s -> s { scopeFixities = fixs0, scopePolarities = pols0 } return x -- | Get the notation of a name. The name is assumed to be in scope. getNotation :: C.QName -> Set A.Name -- ^ The name must correspond to one of the names in this set. -> ScopeM NewNotation getNotation x ns = do r <- resolveName' allKindsOfNames (Just ns) x case r of VarName y _ -> return $ namesToNotation x y DefinedName _ d -> return $ notation d FieldName ds -> return $ oneNotation ds ConstructorName ds -> return $ oneNotation ds PatternSynResName n -> return $ oneNotation n UnknownName -> __IMPOSSIBLE__ where notation = namesToNotation x . qnameName . anameName oneNotation ds = case mergeNotations $ map notation $ toList ds of [n] -> n _ -> __IMPOSSIBLE__ -- * Binding names -- | Bind a variable. bindVariable :: Binder -- ^ @λ@, @Π@, @let@, ...? -> C.Name -- ^ Concrete name. -> A.Name -- ^ Abstract name. -> ScopeM () bindVariable b x y = modifyLocalVars $ AssocList.insert x $ LocalVar y b [] -- | Temporarily unbind a variable. Used for non-recursive lets. unbindVariable :: C.Name -> ScopeM a -> ScopeM a unbindVariable x = bracket_ (getLocalVars <* modifyLocalVars (AssocList.delete x)) (modifyLocalVars . const) -- | Bind a defined name. Must not shadow anything. bindName :: Access -> KindOfName -> C.Name -> A.QName -> ScopeM () bindName acc kind x y = bindName' acc kind NoMetadata x y bindName' :: Access -> KindOfName -> NameMetadata -> C.Name -> A.QName -> ScopeM () bindName' acc kind meta x y = do when (isNoName x) $ modifyScopes $ Map.map $ removeNameFromScope PrivateNS x r <- resolveName (C.QName x) ys <- case r of -- Binding an anonymous declaration always succeeds. -- In case it's not the first one, we simply remove the one that came before _ | isNoName x -> success DefinedName _ d -> clash $ anameName d VarName z _ -> clash $ A.qualify (mnameFromList []) z FieldName ds -> ambiguous FldName ds ConstructorName ds -> ambiguous ConName ds PatternSynResName n -> ambiguous PatternSynName n UnknownName -> success let ns = if isNoName x then PrivateNS else localNameSpace acc modifyCurrentScope $ addNamesToScope ns x ys where success = return [ AbsName y kind Defined meta ] clash = typeError . ClashingDefinition (C.QName x) ambiguous k ds = if kind == k && all ((== k) . anameKind) ds then success else clash $ anameName (headNe ds) -- | Rebind a name. Use with care! -- Ulf, 2014-06-29: Currently used to rebind the name defined by an -- unquoteDecl, which is a 'QuotableName' in the body, but a 'DefinedName' -- later on. rebindName :: Access -> KindOfName -> C.Name -> A.QName -> ScopeM () rebindName acc kind x y = do modifyCurrentScope $ removeNameFromScope (localNameSpace acc) x bindName acc kind x y -- | Bind a module name. bindModule :: Access -> C.Name -> A.ModuleName -> ScopeM () bindModule acc x m = modifyCurrentScope $ addModuleToScope (localNameSpace acc) x (AbsModule m Defined) -- | Bind a qualified module name. Adds it to the imports field of the scope. bindQModule :: Access -> C.QName -> A.ModuleName -> ScopeM () bindQModule acc q m = modifyCurrentScope $ \s -> s { scopeImports = Map.insert q m (scopeImports s) } -- * Module manipulation operations -- | Clear the scope of any no names. stripNoNames :: ScopeM () stripNoNames = modifyScopes $ Map.map $ mapScope_ stripN stripN id where stripN = Map.filterWithKey $ const . not . isNoName type WSM = StateT ScopeMemo ScopeM data ScopeMemo = ScopeMemo { memoNames :: A.Ren A.QName , memoModules :: [(ModuleName, (ModuleName, Bool))] -- ^ Bool: did we copy recursively? We need to track this because we don't -- copy recursively when creating new modules for reexported functions -- (issue1985), but we might need to copy recursively later. } memoToScopeInfo :: ScopeMemo -> ScopeCopyInfo memoToScopeInfo (ScopeMemo names mods) = ScopeCopyInfo { renNames = names , renModules = [ (x, y) | (x, (y, _)) <- mods ] } -- | Create a new scope with the given name from an old scope. Renames -- public names in the old scope to match the new name and returns the -- renamings. copyScope :: C.QName -> A.ModuleName -> Scope -> ScopeM (Scope, ScopeCopyInfo) copyScope oldc new0 s = (inScopeBecause (Applied oldc) *** memoToScopeInfo) <$> runStateT (copy new0 s) (ScopeMemo [] []) where copy :: A.ModuleName -> Scope -> WSM Scope copy new s = do lift $ reportSLn "scope.copy" 20 $ "Copying scope " ++ prettyShow old ++ " to " ++ prettyShow new lift $ reportSLn "scope.copy" 50 $ prettyShow s s0 <- lift $ getNamedScope new -- Delete private names, then copy names and modules. Recompute inScope -- set rather than trying to copy it. s' <- recomputeInScopeSets <$> mapScopeM_ copyD copyM return (setNameSpace PrivateNS emptyNameSpace s) -- Fix name and parent. return $ s' { scopeName = scopeName s0 , scopeParents = scopeParents s0 } where rnew = getRange new new' = killRange new newL = A.mnameToList new' old = scopeName s copyD :: NamesInScope -> WSM NamesInScope copyD = traverse $ mapM $ onName renName copyM :: ModulesInScope -> WSM ModulesInScope copyM = traverse $ mapM $ lensAmodName renMod onName :: (A.QName -> WSM A.QName) -> AbstractName -> WSM AbstractName onName f d = case anameKind d of PatternSynName -> return d -- Pattern synonyms are simply aliased, not renamed _ -> lensAnameName f d -- Adding to memo structure. addName x y = modify $ \ i -> i { memoNames = (x, y) : memoNames i } addMod x y rec = modify $ \ i -> i { memoModules = (x, (y, rec)) : filter ((/= x) . fst) (memoModules i) } -- Querying the memo structure. findName x = lookup x <$> gets memoNames findMod x = lookup x <$> gets memoModules refresh :: A.Name -> WSM A.Name refresh x = do i <- lift fresh return $ x { A.nameId = i } -- Change a binding M.x -> old.M'.y to M.x -> new.M'.y renName :: A.QName -> WSM A.QName renName x = do -- Issue 1985: For re-exported names we can't use new' as the -- module, since it has the wrong telescope. Example: -- -- module M1 (A : Set) where -- module M2 (B : Set) where -- postulate X : Set -- module M3 (C : Set) where -- module M4 (D E : Set) where -- open M2 public -- -- module M = M1.M3 A C -- -- Here we can't copy M1.M2.X to M.M4.X since we need -- X : (B : Set) → Set, but M.M4 has telescope (D E : Set). Thus, we -- would break the invariant that all functions in a module share the -- module telescope. Instead we copy M1.M2.X to M.M2.X for a fresh -- module M2 that gets the right telescope. m <- case x `isInModule` old of True -> return new' False -> renMod' False (qnameModule x) -- Don't copy recursively here, we only know that the -- current name x should be copied. -- Generate a fresh name for the target. -- Andreas, 2015-08-11 Issue 1619: -- Names copied by a module macro should get the module macro's -- range as declaration range -- (maybe rather the one of the open statement). -- For now, we just set their range -- to the new module name's one, which fixes issue 1619. y <- setRange rnew . A.qualify m <$> refresh (qnameName x) lift $ reportSLn "scope.copy" 50 $ " Copying " ++ prettyShow x ++ " to " ++ prettyShow y addName x y return y -- Change a binding M.x -> old.M'.y to M.x -> new.M'.y renMod :: A.ModuleName -> WSM A.ModuleName renMod = renMod' True renMod' rec x = do -- Andreas, issue 1607: -- If we have already copied this module, return the copy. z <- findMod x case z of Just (y, False) | rec -> y <$ copyRec x y Just (y, _) -> return y Nothing -> do -- Ulf (issue 1985): If copying a reexported module we put it at the -- top-level, to make sure we don't mess up the invariant that all -- (abstract) names M.f share the argument telescope of M. let newM | x `isSubModuleOf` old = newL | otherwise = mnameToList new0 y <- do -- Andreas, Jesper, 2015-07-02: Issue 1597 -- Don't blindly drop a prefix of length of the old qualifier. -- If things are imported by open public they do not have the old qualifier -- as prefix. Those need just to be linked, not copied. -- return $ A.mnameFromList $ (newL ++) $ drop (size old) $ A.mnameToList x -- caseMaybe (stripPrefix (A.mnameToList old) (A.mnameToList x)) (return x) $ \ suffix -> do -- return $ A.mnameFromList $ newL ++ suffix -- Ulf, 2016-02-22: #1726 -- We still need to copy modules from 'open public'. Same as in renName. y <- refresh (last $ A.mnameToList x) return $ A.mnameFromList $ newM ++ [y] -- Andreas, Jesper, 2015-07-02: Issue 1597 -- Don't copy a module over itself, it will just be emptied of its contents. if (x == y) then return x else do lift $ reportSLn "scope.copy" 50 $ " Copying module " ++ prettyShow x ++ " to " ++ prettyShow y addMod x y rec lift $ createModule Nothing y -- We need to copy the contents of included modules recursively (only when 'rec') when rec $ copyRec x y return y where copyRec x y = do s0 <- lift $ getNamedScope x s <- withCurrentModule' y $ copy y s0 lift $ modifyNamedScope y (const s) -- | Apply an import directive and check that all the names mentioned actually -- exist. applyImportDirectiveM :: C.QName -> C.ImportDirective -> Scope -> ScopeM (A.ImportDirective, Scope) applyImportDirectiveM m (ImportDirective rng usn' hdn' ren' public) scope = do -- We start by checking that all of the names talked about in the import -- directive do exist. If some do not then we remove them and raise a warning. let (missingExports, namesA) = checkExist $ fromUsing usn' ++ hdn' ++ map renFrom ren' unless (null missingExports) $ setCurrentRange rng $ do reportSLn "scope.import.apply" 20 $ "non existing names: " ++ prettyShow missingExports warning $ ModuleDoesntExport m missingExports -- We can now define a cleaned-up version of the input let usn = fromUsing usn' List.\\ missingExports let hdn = hdn' List.\\ missingExports let ren = filter (\ r -> renFrom r `notElem` missingExports) ren' let dir = (\ u -> ImportDirective rng u hdn ren public) $ case usn' of { Using{} -> Using usn; _ -> UseEverything } -- As well as convenient shorthands for defined names and names brought into scope let names = map renFrom ren ++ hdn ++ usn let definedNames = map renTo ren let targetNames = usn ++ definedNames let extraModules = [ x | ImportedName x <- names , let mx = ImportedModule x , notElem mx missingExports , notElem mx names ] dir' = addExtraModules extraModules dir dir' <- sanityCheck dir' names -- Check for duplicate imports in a single import directive. -- @dup@ : To be imported names that are mentioned more than once. let dup = targetNames List.\\ List.nub targetNames unless (null dup) $ typeError $ DuplicateImports m dup -- Apply the import directive. let scope' = applyImportDirective dir' scope -- Look up the defined names in the new scope. let namesInScope' = (allNamesInScope scope' :: ThingsInScope AbstractName) let modulesInScope' = (allNamesInScope scope' :: ThingsInScope AbstractModule) let look x = headWithDefault __IMPOSSIBLE__ . Map.findWithDefault __IMPOSSIBLE__ x -- We set the ranges to the ranges of the concrete names in order to get -- highlighting for the names in the import directive. let definedA = for definedNames $ \case ImportedName x -> ImportedName . (x,) . setRange (getRange x) . anameName $ look x namesInScope' ImportedModule x -> ImportedModule . (x,) . setRange (getRange x) . amodName $ look x modulesInScope' let adir = mapImportDir namesA definedA dir return (adir, scope') -- TODO Issue 1714: adir where -- | Names in the @using@ directive fromUsing :: Using' a b -> [ImportedName' a b] fromUsing u = case u of Using xs -> xs UseEverything -> [] sanityCheck dir names = case (using dir, hiding dir) of (Using xs, ys) -> do let uselessHiding = [ x | x@ImportedName{} <- ys ] ++ [ x | x@(ImportedModule y) <- ys, ImportedName y `notElem` names ] unless (null uselessHiding) $ typeError $ GenericError $ "Hiding " ++ List.intercalate ", " (map prettyShow uselessHiding) ++ " has no effect" return dir{ hiding = [] } _ -> return dir addExtraModules :: [C.Name] -> C.ImportDirective -> C.ImportDirective addExtraModules extra dir = dir{ using = case using dir of Using xs -> Using $ concatMap addExtra xs UseEverything -> UseEverything , hiding = concatMap addExtra (hiding dir) , impRenaming = concatMap extraRenaming (impRenaming dir) } where addExtra f@(ImportedName y) | elem y extra = [f, ImportedModule y] addExtra m = [m] extraRenaming r@(Renaming from to rng) = case (from, to) of (ImportedName y, ImportedName z) | elem y extra -> [r, Renaming (ImportedModule y) (ImportedModule z) rng] _ -> [r] -- | Names and modules (abstract) in scope before the import. namesInScope = (allNamesInScope scope :: ThingsInScope AbstractName) modulesInScope = (allNamesInScope scope :: ThingsInScope AbstractModule) -- | AST versions of the concrete names passed as an argument. -- We get back a pair consisting of a list of missing exports first, -- and a list of successful imports second. checkExist :: [ImportedName] -> ([ImportedName], [ImportedName' (C.Name, A.QName) (C.Name, A.ModuleName)]) checkExist xs = partitionEithers $ for xs $ \ name -> case name of ImportedName x -> ImportedName . (x,) . setRange (getRange x) . anameName <$> resolve name x namesInScope ImportedModule x -> ImportedModule . (x,) . setRange (getRange x) . amodName <$> resolve name x modulesInScope where resolve :: Ord a => err -> a -> Map a [b] -> Either err b resolve err x m = maybe (Left err) (Right . head) $ Map.lookup x m -- | A finite map for @ImportedName@s. lookupImportedName :: (Eq a, Eq b) => ImportedName' a b -> [ImportedName' (a,c) (b,d)] -> ImportedName' c d lookupImportedName (ImportedName x) = loop where loop [] = __IMPOSSIBLE__ loop (ImportedName (y,z) : _) | x == y = ImportedName z loop (_ : ns) = loop ns lookupImportedName (ImportedModule x) = loop where loop [] = __IMPOSSIBLE__ loop (ImportedModule (y,z) : _) | x == y = ImportedModule z loop (_ : ns) = loop ns -- | Translation of @ImportDirective@. mapImportDir :: (Eq n1, Eq m1) => [ImportedName' (n1,n2) (m1,m2)] -- ^ Translation of imported names. -> [ImportedName' (n1,n2) (m1,m2)] -- ^ Translation of names defined by this import. -> ImportDirective' n1 m1 -> ImportDirective' n2 m2 mapImportDir src tgt (ImportDirective r u h ren open) = ImportDirective r (mapUsing src u) (map (`lookupImportedName` src) h) (map (mapRenaming src tgt) ren) open -- | Translation of @Using or Hiding@. mapUsing :: (Eq n1, Eq m1) => [ImportedName' (n1,n2) (m1,m2)] -- ^ Translation of names in @using@ or @hiding@ list. -> Using' n1 m1 -> Using' n2 m2 mapUsing src UseEverything = UseEverything mapUsing src (Using xs) = Using $ map (`lookupImportedName` src) xs -- | Translation of @Renaming@. mapRenaming :: (Eq n1, Eq m1) => [ImportedName' (n1,n2) (m1,m2)] -- ^ Translation of 'renFrom' names and module names. -> [ImportedName' (n1,n2) (m1,m2)] -- ^ Translation of 'rento' names and module names. -> Renaming' n1 m1 -- ^ Renaming before translation (1). -> Renaming' n2 m2 -- ^ Renaming after translation (2). mapRenaming src tgt (Renaming from to r) = Renaming (lookupImportedName from src) (lookupImportedName to tgt) r data OpenKind = LetOpenModule | TopOpenModule noGeneralizedVarsIfLetOpen :: OpenKind -> Scope -> Scope noGeneralizedVarsIfLetOpen TopOpenModule = id noGeneralizedVarsIfLetOpen LetOpenModule = disallowGeneralizedVars -- | Open a module. openModule_ :: OpenKind -> C.QName -> C.ImportDirective -> ScopeM A.ImportDirective openModule_ kind cm dir = do current <- getCurrentModule m <- amodName <$> resolveModule cm let acc | not (publicOpen dir) = PrivateNS | m `isSubModuleOf` current = PublicNS | otherwise = ImportedNS -- Get the scope exported by module to be opened. (adir, s') <- applyImportDirectiveM cm dir . inScopeBecause (Opened cm) . noGeneralizedVarsIfLetOpen kind . removeOnlyQualified . restrictPrivate =<< getNamedScope m let s = setScopeAccess acc s' let ns = scopeNameSpace acc s modifyCurrentScope (`mergeScope` s) -- Andreas, 2018-06-03, issue #3057: -- If we simply check for ambiguous exported identifiers _after_ -- importing the new identifiers into the current scope, we also -- catch the case of importing an ambiguous identifier. checkForClashes -- Importing names might shadow existing locals. verboseS "scope.locals" 10 $ do locals <- mapMaybe (\ (c,x) -> c <$ notShadowedLocal x) <$> getLocalVars let newdefs = Map.keys $ nsNames ns shadowed = List.intersect locals newdefs reportSLn "scope.locals" 10 $ "opening module shadows the following locals vars: " ++ prettyShow shadowed -- Andreas, 2014-09-03, issue 1266: shadow local variables by imported defs. modifyLocalVars $ AssocList.mapWithKey $ \ c x -> case Map.lookup c $ nsNames ns of Nothing -> x Just ys -> shadowLocal ys x return adir where -- Only checks for clashes that would lead to the same -- name being exported twice from the module. checkForClashes = when (publicOpen dir) $ do exported <- allThingsInScope . restrictPrivate <$> (getNamedScope =<< getCurrentModule) -- Get all exported concrete names that are mapped to at least 2 abstract names let defClashes = filter (\ (_c, as) -> length as >= 2) $ Map.toList $ nsNames exported modClashes = filter (\ (_c, as) -> length as >= 2) $ Map.toList $ nsModules exported -- No ambiguity if concrete identifier is only mapped to -- constructor names or only to projection names. defClash (_, qs) = not $ all (== ConName) ks || all (==FldName) ks where ks = map anameKind qs -- We report the first clashing exported identifier. unlessNull (filter (\ x -> defClash x) defClashes) $ \ ((x, q:_) : _) -> typeError $ ClashingDefinition (C.QName x) $ anameName q unlessNull modClashes $ \ ((_, ms) : _) -> do caseMaybe (last2 ms) __IMPOSSIBLE__ $ \ (m0, m1) -> do typeError $ ClashingModule (amodName m0) (amodName m1) Agda-2.6.0.1/doc/0000755000000000000000000000000013466402171011451 5ustar0000000000000000Agda-2.6.0.1/doc/user-manual.pdf0000644000000000000000000325057013466402171014411 0ustar0000000000000000%PDF-1.5 % 1 0 obj << /Length 843 /Filter /FlateDecode >> stream xmUMo0WxNWH Z&T~3ڮzy87?nkNehܤ=77U\;?:׺v==onU;O^uu#½O ۍ=٘a?kLy6F/7}̽][H<Sicݾk^90jYVH^v}0<rL ͯ_/CkBnyWTHkuqö{s\녚"p]ϞќKյ u/A )`JbD>`2$`TY'`(ZqBJŌ )Ǩ%553<,(hlwB60aG+LgıcW c rn q9Mܗ8% CMq.5ShrAI皎\Sȩ ]8 `Y7ь1Oyezl,d mYĸSSJf-1i:C&e c4R$D& &+übLaj by+bYBg YJYYr֟bx(rGT̛`F+٭L ,C9?d+͊11ӊĊ׊T_~+Cg!o!_??/?㫄Y ?^B\jUP{xᇻL^U}9pQq0O}c}3tȢ}Ə!VOu˷ endstream endobj 6 0 obj << /Type /ObjStm /N 100 /First 833 /Length 1478 /Filter /FlateDecode >> stream xڭXrE}WcRE 0 _KNTX%vzNxVHyjwtRDaPR%Jbx mPAz^h-,~ @{pp#0ۈNK7tF'LJCmq8v~pe#GD8h X;^'x/H%<I"p; \lҤ+XQtxVi`^t``iB uH#"axP em`_7$W+Hp QDO/Rg,!5npCB!k%q|d- 'Y)oG.NdW@exʒG\e;/hll j]6j%c :ZNn9~F|Ir HQX 8YS,@a(@Q Ba#@Dp8 t1R2 $0{ Axq&^ŋf5^0aNҳۧU@MVi`h@Ågi0^\r|guɒ?iVے6 ,NڌҒoZ iXsnݲ%~L.9kir-1vW Qc6ݦ'4aʨor&~^6[>aLyʬ>MԂ4|&C.Wɂaz<`6JNIU>6)mkW[k"!QBFr>$!]zrUHYUS;bs.Iˌף䤔{j)եoy\'g\`xAknAg[ h+" %WĭSp>[h]vFMrB@$dجֵ+%McE#8U:sJ:wȷMB|7llOCuwkVҾN:6'_fyNrMw7ՙBb%CYv-E>܏dP~Ύ̖֩rۧtD=?Oj3O>flhlZ;E><;K20B:YT:Kr+&Yr}i42_3 endstream endobj 253 0 obj << /Length 586 /Filter /FlateDecode >> stream xmTˎ0+$$0  a#A%߯jD岻fc;Z̫MfG} q]/ޭmޯo⣩0Z^x]fkn{E+{*ʧypg6;5PVpH8$hmڢ*߄zR:")󨺠3qXysO'H)-"}[˺s 3 4{pYdrK+ a }ѫW{ Fvm7344AGc ڤ_86 endstream endobj 255 0 obj << /Length 235 /Filter /FlateDecode >> stream xڵ=KASށgfK)Ե );A޹AV?aM(lw0ߧ\H< m1΂8)2W:%AP8B`ڮ$ӦLW]YGE4٢Kt9Y~ڿJ 5SL<)mY˜I%@BYP3l&y2\]1c endstream endobj 262 0 obj << /Length 19 /Filter /FlateDecode >> stream x3PHW0Pp2Ac( endstream endobj 304 0 obj << /Length 1326 /Filter /FlateDecode >> stream xKs6UXo{ BCw;@/uz]ݙ lmCæ!FGQ v}KcT> 1 #'>SAi٩aMPCFz0jVƩ.`/؁wK"5ht4YC;gZjT3eŐb]JPgFd0ȗ =ʼ_,+j{WBgO揶m)H~B/U&u\Tozʵ\1?LgodiEd9~z~Np&x'jDIq̦)Y۱aҙpb乬:72ֿ'"bŹdxܗy)D +,the\Uηp̻a-b#_*3CFs &'@JxPyZ&tGrC$?tAr*zEQ373Ɠ-xjȳƭ/sa7Il~y-wg٤{C9ˆ!i4n,n [ .{tTJέM"ier&Hsr-rO@|) )?`QqgMdp̥[џ.sZeV8HiB}.rZ12)le?𭏏KМU.71ŇI;hF_R4ğ _[Voc]E LM~7|:/W.Qsx"f eO0--]Y)cWĄM1 2Wҟ !FGU> stream xs@+poZ=l6a Q_hhmr }&? }©"Zp18/ 8'εӮdr-xqw= :P);zο1w[Nl%ckaj ,gz+ ړ,G7dY2j׋Uಞ}NgTG*TYY=alх.N"u: ȜBǀQDYԐXmJ b ׃.l3x+qq+7p endstream endobj 344 0 obj << /Length 1083 /Filter /FlateDecode >> stream xڭVKs6WVr&B"Hf\'6mLB`=]+orjE: cĤG$˴(dZE0_/n $85&(ZmF(݊dnW[]݀}p(UPƆoq 9T؂:OpA_RMsDo546mn\hGkFY C붩4 ;5asmpJ%'4y6wf)m%u:[7r?,pKbljb[ 8G$NǬ{8 r} \ǻZ{Mz!l*-Y&dC͖'(@"7? θ LYH#`Ի endstream endobj 207 0 obj << /Type /ObjStm /N 100 /First 890 /Length 2626 /Filter /FlateDecode >> stream xڽZ]o[}ׯcCNnf@I lAX[2lnJ7/{=g786 4ޔ&l2Dz'C0ĸ=ɣe B&la'hɞF<*Hx`$jK;AYL% !|`%K%'1: c2  L!2G+ dك"޾d:TUe#f!F7or{(ovuGvf_w^v ėO߷|1QYL|׏qmqYgf6kx/' .{ccCumIék#wmW׮>yuc|`s-ݗ~A"Xa<=ǷGΔ?Ͼμ7WGl-.gfڜ]Tpl~y8;Xpz<ؾ|eōqcpz v?w:-x[]LgP5S 4lSkrfZچ^nx冗^nxᕆW^ixᕆW^ixᕆ' O4U}XF&-AUdS (H(E3ּ 㝪,r.UAV8R;WzDƻU%,>c誇IngpߓnռHW}AW'XPW~>JXhK*2ޱzbZjݡ$jvE]E;VXSH#{Ħ^AAw[20ޱ bS>ud_EI,brw ؂%xU`L[NmB(Vz?^Ю;$~nVuʩ޵Znmnmim /4B /4B /4<Z2#D E=oJSFŵ"#LA_@,ay^(2Qϫa&UdZY1i%H 2~M$.%w&r̵J@k"& w_\5@΢)PB]E/%Dr"FGm$g;!;4|BL*lv^IX4H|R2tx<6(\$V֓cKG2[x\kr6vU脥>iYj?.+Bj({ }zzGf%5 tE0T/==;ppYIa[=|X5h}"fgs$EHXb -6SGih DŽ$$W^Wp@Kf[=]ՍdB?Nnmwޏ&tq ۴RK%R)jTlY;F|ӨDEJXL"7hb@q?۫=̟20_ɷףͷ/`}2_|=\lO/5%Z«,rϱvdOgűq,o_he_O:?70?OnP(N endstream endobj 351 0 obj << /Length 214 /Filter /FlateDecode >> stream xڍOO!|9BbaQ&ƨ@\tq&<=x޼܉(.o<mc Mj>.}zW!x}N\/ ĥS貊@h< b!hB8SX,ԜW"GIj `\`Ly6ׯc?akT3,g|-+=uX0M endstream endobj 369 0 obj << /Length 2450 /Filter /FlateDecode >> stream xڭYKs6W*-E$kMUv$hvvf_M;Gw\f|;N^N\}w*H'q4v}q^?8qxy8iz8|/zy{Q"M0 ?v˯k$(Vc?p bnu~Wal07Jg\9QkEe~DI|=׉<ƛcbkd*{8U<%0ĭxۊC}ȮǞ5h4Q8#vqo ˖x]xlF:+zeC tK]Ux0ANE0ehE3X;v%&Q#LtvjD՗N&ޘ'X4 l\H#|{ "m4X>f({1<6[n-9YiQܻWiк6M. -v@I򲧇ObCtOXŰΑ5lcf;M`K޷8^< K.һotjQ f=I !)Hd>ss,v`8/erha56|HřmEnд1ȾnW8jV}^_mD泖x"YU4UXz&i7%pB9㛎(0lx{dYjQaXU ! FN\#6`gu}V3/AC%n:aP͗*,XSH}^1eEQ" ci{éZKCMw hVa0^ԃ06rvA:1Ӛo [_9'B='ΡFfaIݍ%=Q;-pܦ-\ { ,m>Ԏbh@#Ze(0KHWBE{̹x6(Vh|$1id RH1ZkkpB5Aq5 k6QP 4,<ʝ˞6מaQyYQ]$F 7l!vж Q@%;$(iDMI_.Ds01k(|>-$ҕԅ V$,X[{d%=6>s!G_2H{~kFKyd^ "^0|r~%@s8txW-sԔ JL#J7&Kr.1`b^K\|^z@,HB^8J`H&c!(\xĖ-,x{*8sP 6yC, -fWӱʷMrskx8ڎs_Q}y`;1a喍[@xPT#&ũTNpxн)}TӚ!$$f`4E )Q]wxCTyk`YBt`.ܲWF> stream xَ}b6x[}RK1K^'l?r;8xn!X`,68|uWW\=BUƲXƫU"WNfq~k62I?tEKL|}4gxST ,f7_^+G Ԛ%Zx]Ҵ-ʺo1/tHםH^Pf_VGܝ`-ᰍcsKan0͵Ji7u^8>8s,ecz[ĹqWkIJĢ%Z?|ssֱp3ղx}vw G&)"tRIJ$@"2]WC^/Ɖ^ z;iR8 4 XFG܌oWӚ}m;V)xRS Z"P鏭q[ ,=arzl;}ր?v}Qpv5ZYX}ݚzWlEov&D,‹rĈq8ɗZ43ue?\ (I]sZtAb z/"a <1~ykUD#i7"]/03Y0G;"JY28ً:K95ΠpC莕3E@Qp/%ْa n_-ĽS"D>ũFD6,,Yȁe쓈4 !A)t*x]D)DMp5b2CF<ɛcXĹ#cJ edEiîw; r%2 8䱤E)ԥ eȖ2r:WXdS/O%)A`S ʬ}s>ׅVO];dc/ѬU'$Lz b97͍>$ϠŠ&?KJe,ҳH؛05K4[s mOs{4p{-gTL).2J(>)tFML(D'?2Kp:_KQÚ`F%u2-<\|K+X}:gphAE]1fu%mrw9Ƒ{R]+ 5]ނ4 <:vTr\Pf[p!hg]CLz}h}CWhC:m_sЌGgMjuмi%zW-Ψ5O}W՗͐JJ??ؿ7 BEdrUbx FT+U[[@8+〆iE# sL"nSHZ^?syc<P{#E_?x?3W P9,ʢq;g6`חq:&1ę,COcqxfKR 9%&G(" ȈA:z@NI( Oq@L/1Iux6DD+*h[Z-.FQ>#Bp;|!Q@6;uΑ\hRC|ӺЁ#k4zBp]ԖtDx-{8W4wTZK>\J7q_8zˍstqs~OjɁQ6X> "otmD sN**,I.]?̟%սjӘ@`m^5I->/. g]!9MW梚ql[wDL;:pݙY3M~Zr4zsP"#7`C<"VIh&&6qaǽM -Iz}AmX|Q:NO|ۖ7M_J,Xyfb7I&_L7quʾDsm qm:oʴ NFA,Tߠ60 ֔Ni֫`Pځ)lu}ӺնCwѧ?ΦwD1%F;nH'R&J5?KM\| `!zb9}e)`]L,-Fsigِg~$GF5 x}ֽ 80YSFIu7(FpqFX{ Ҫg6qf`$Uk~v˟-fNI_R]϶{-k#-'PkC_5p"E0˔a-Gkhj`(iWnnMumGUcÞ/*  Lug~o)xQ Js/!ܙC(!SR_}~Ֆ >FNr ! endstream endobj 405 0 obj << /Length 2615 /Filter /FlateDecode >> stream xZێ}߯ @ zsK؈~rzfq1/l9}JA lTթRoQ_>^] 4q8"qxq Ǎin}'V6Z3 KҼpJ?]+Ǽc4էߩAO%"M;=QgWJ2Gl$sQEŌ*b#ozw7䇔~̎G%k+,HI5~Acn+j=Yn,Yn$YLR7PfHW?@ޑlmwy-Sy!ekXaJ}ݗʶ6Cftbmu3cSКj,]^ɁKFYHi)6+};ώC"$9deGF)/ek{ceqdM!p .Hĸ;ڿ1 Pn6 KA ׎rmYMaQ2Ձ$Jc\ #iMCQGTD*͝Sw9,5[ 2sYaYB$0Mal'!n˽<ՙejs5s/uÌvЯ@M*QA3U|5E|zs:vV[ ;kqWVMꟺJgX(`^KPp&ix|y(KlX |>vP#JO^/T_d1G|PwhVNKpl оd 1E4$\G{:o%&k̥e[Ĝ FĹ I݂(&{b ;)p'+c0 wjV5vVHպx D#@ 6< +߼M&<h:毚2Fp\+=&SGX$R># ?nsQ(zw|4*˶5q]k€m]u}2/ fYQ7pBv{:$(7iݷӐ:bTWf^OU?TbiGIEc*YxeA*\>( a8d#NWۦ><'P%b-g4b_}1c]tȕ~L1 NLYo]p*wVt=U #nL5$q\`ˆ4W, Hp5Z]=?i]ϵbZb.eM:QcֽL2ItV1K4{4ŌP1*~ |ks_8ʻ#oej*xqjyL2pkJ Rȶ3#/S^ 0" =􅘹 p 2]lۂ&R?&%EZ(T˜bUUcm]xX (EXLst50NhVHpJqH T٠IDiac3ZNj(#<\Jzrs V~IE2be0XsЮ!egӬͳv HwMul.KRΑߋ`([$`zSh ;;ٔw,Vp'lNu].Fnh^op(; gʠiȿf,Ms$E іJ)IxyRH ˸eC3 "I`3hU"JgFQ@SӋMz4`:oW>IN,1s`v72h/fIχEw[?Y[rOY;oMLɬQsd?93&KY6b=uҔCɄ3֠ ULeJ0T \6wh*Q[Ԓ} jW&֖fӳ4I(W ep O'x׫ p@pK ) ,/tGRX"SA%"u8 #ƴ+/ endstream endobj 423 0 obj << /Length 1391 /Filter /FlateDecode >> stream xXKs6WḦ́0^ܚ&$uf\[`8H8] %JcYrьx,vvA7{Qc$ݢPDXRm֕m}RŔU+qsjm_`::8y73A.-pHB,'BGD0#t׍Z"!#xzl)閘`C+lհ}@Dl++.V}gSxߧ4WeEdV7WZ dC |3+Sx2KY1w6!0z >Lwk4xek«tVԍs,Cx2նu5mI\eٽ R%m^dʶrॺ,h$mL>8=TWӶK۩t02 (`&q [v:έv̙sIg9f}BJLz7ֻ/<%1ߔA(um?"Kz7U4YYǜ~,7HvNĵh-4 x[yiprg= Vc|SsN0껙HD%<(8CvB 8G,BHʑqh!)!Rpy&"1cvPCӑٗ5/"\)iE``4a7EZʜhm'Ψq,^hb'nRqP[X;b(ax5"< KbRMq=_$_ܹ5]!2oR1Mo> 0w`t2_UC>YH7۾({yM@.L]8] Pw ɘw0KFϦJH^ endstream endobj 437 0 obj << /Length 2585 /Filter /FlateDecode >> stream xڵZ[o~ׯ`]x1rb$"wVb%7$גsRU `IgΜ9\o'NVo,6BIE"&"8XKEF}Z.iا 3A*my`$$~8y}v z҂DAeۓO“ػֳcǓW ,gԫS4 ́~o~sWo`m |& K.[3Rm̵T]]4f4Bem^nVښioܝx&9r`)aq7+Moe窙j@}kRA>c)4;ۙ!z퓘P-77L`hsGJ$ L8U8_v.T ae{%aQ4vwh$vU13)Qw6%v=oD");xq͐" I@,0"ߛl 53Arq(F7xgtw׹.VsHWBۣyy1ESͮj_gjޠ[|b[4ZCZm0Uq(%#*oZU|3VBJeob`0< lZz9K t*)]:7ßH%ĐQ}%g.U&B6Y*3҇➯Gj ywi{ W$Mh vKBdl MPX Ɲ7&/QQ73uSfCF >3f\DHfYj=%:U|4=+DwiWMӣ2@Cf. lxg&)+^M7kj2;412 k N7 P]p*&'fn YPT$n<2u~OxNx|fLN#@ aExPɠшa 5]* !jV53њov~1T,$|Y[ն#-mZ} 386txM;'#':SX %KR"Ny؈\foL"wo]ځLޒ]k:,H̺?Kbܓ:ј::Jfj3֞PM͙kTIԃ7D^cE}[:aZR4u :3n{?̊}_7Y]xxn87@w yܳGMzT\̇P(W!v:0'\xp|'g\@>< xe\ #ʗ13Ntl*tWN0F K0Y,խ:~/Fwcp#_|jU:0[jDT;^f@0}˺kٝ'aD@6Ġ*m;y^>K;}u7$x01շO #W7mۦ>$ͷNkkWy6AwduNs7'HCII((d2jAdQm?=($9 (!ލ],¿#HtЅYa9(6X ~:*:30" #K,#ztH endstream endobj 456 0 obj << /Length 3056 /Filter /FlateDecode >> stream xڭZ6_jW撴E6{致@NIvZg+"9<~34_V|ۛ_hBUY_h}H_-[/M])✥YA^"^`"W<&,WٰX\jzʻ%Q*LIJ[X9cqtՙdβ,l=kG)Ke*2{'S5FԖNo޳mZg[|(5`h).%`,ujcy#i^g[c(1.'C?XPcgTqG y#X~F lpYD9_p> H &=?Kj% TTяg%q HEŌD8^~oZ3/ % F.|Zom(+Ǧ/Ib?w>?V<2aY%~-'ORY%95Jӷ?c3LO+NcV~N,onSfȱY?po䔆 K*l}FGbHr1J![Q5458 +ϛ |&r!JD}bsluTTM #Z` ܶ=˃vuA#n18ʋ͖To.Dv##?q,9Ed!ǮN1 <%X&Btk,*+|0"&NsTn7L>lֿmV:V"\,fAK0#tQ$C{mH x>o]*h  j}7gĬ Qgv? ܶJN%Z7MeT"r%"so:OfE$"oCjiƠ :|3hU MMh< ҭd`zB1ݧ@x@{_x8^>\Ih&]pnwz;l{ޗ%nb9 HҧY/伦Ëb ySgX\1i`K犙A]{tyIS9(Sbƣnl،z$KGK \:{2Iu |YhXS{XۋT~]5~('> x˂l\70}kKe)]$H^,sQznRPS)yf\G-5 VY<ļDen=Ӂ<4'(޿r68^w[>PiAJ"e+y .O ;.TK)yNTRoM4@9: + b0tvÒYGkARSAAe4Fl0hxn*y+hAc3[lҁ)1^֯ajݸLS)dNy^:\\i7Ua/EN[o8]R ?!C>XΝ㠥ϊTҘN-Ve> stream x[k_/)Q8)n8a@[0fYIVR4R3z]1Q9#yxyy﹗\kP,:%L(pʠۀ2"h5"$W"nƁuYCZ{C֡  t# $RlhhX6ha\xc/o$>P+p9@`(٥ƐQ9. ! Sbw3bNs$LY$&@QC%6!E3)TЗ\DPIxI%q&%5 alV$q@sD&Ԣa#+f5p+#n(37b5cEIJ:73XpJ:u" `H9yơ]Q*E68ecJDxf%p&YkF%f>=V cjp4jZyL-A5(ZS\ 1jX*-Zúufm!S:M|C:p*A:xv9(a 1 =T[6zK`9|;}3]hwoLZU}y9_n+{lk$(5FBZt"/, 3IVK[iALЖxNM3T EtBO"~Hdz $LiXQiTr-P;Xrv3AIvXf \\w" ꓐ{A`AwC.[2,+"dfO>|ĩ:Sycбpzq`m i##0sgZ0J6ջ?-baF Yno01T@WcǓatMҪgerLnX׳^d\u ,,#nv^=kFY;q@lft$I!1 f cD S Sy%%%)2oce17\Mnw9JҘ, 2%3:acJtR/zmr(œd8Lf,m9%xUA-!XP{xm:K3{3J!7f" ,Φrެ{Choz 0s4{Wp>ܬڦk{8cl0`tpsF 4Ey;3PnlLl m?v\VuuBæNLxD%Kb=x뒞i$^g,k{]FHoM7.wz~Vq>R;qpeaa& hX,Pi4Fw3o.xlpqKg^edfR='N]n\a1 *QuRAA{wO!1ґLNA8GnOqag;vV2Ãc" ~7}d ׮>^nI7i>Ip27Wﱶѻ*8vY]d XYQs>)؂قXI1y\&^2Pgf>,cjs7_4B5@Xp}M3 -ZnlZmD[]mii\֭Dooջo O-{fx[l/gtxw;;yaE(;H#|۝4XwfGcݙ)i)ST<ےY˝deƔvA^2GjvZzǾy/J`JaZujv#" 'Jxq-X};VYt^({EIKjlV5WlY'gY;if}xfB.I^3~psIsX\^rdy )Lԕf{R\+ I62;2*yȔ9Xwaَ43'<dO ;oޱkParϐnn[Lƹߋ(//oQ5ayFϛ1;8XwɅr9iOYy9PLAu7X?&F-Ö O3ZG> stream xڭَ}b9"EKk$=fyyh= z0nY6woO7_&sXě&Hb7Mn ;OjN[sY>TS!\7no~>ooGn%9 tWU0N-7n~Vo sM`3}}˷/5 fױ?n7mo[?r^<y8#z4ګ{UG-|h[U4zjJ~ba[ܝxY92YaG=\\u#fnY @9E^='wA7͂c4c7!{Di:!x1}`Ugts(dVu]1A]|pC)FYPԋ0T>?n0xexqIDgaF 3lDP3ǧuxF̍c1 @ @ϼ Yz\k F:ʭX15 5 LA(~깉.! ZU64_ k J$}MU)u+9~D|5'v{3ɋ?8C} +!7 CT7aYԧEA I3ӵF@׍60$C-,;ߍlz ¦,6`{ߏPdD#5"r}Z=rA,Ʃ֥DQXB^;2+js9CJI~M~&d1r7Ҙ#upF3?En(sW#ESh /Ř:LxkO)1DE6$,$ƹC&8ag9lX!1 p#Wo6wwҘ14]}SvA1r.aъf5!Pw;A! !LSb·^hxh~wV7ҀCktz AEplYP:dx_]5 ܠ KyQVM4ֹ!o[ײ0fԲ2X1,8m|tfGnDcNG,!` ac8RZ]C+'%n2V/$r6@-r:(rLݎZ\gruOt]U`;sM"|hrE$XuPdLQ+MM|\ FȐdRНB~[H߯(DRf@83*:W; JjL ց!X [`Ϳ u\"j:;g_,}Ag/k>.o |Ԙ$#Ⱊ Mlm=,#?XgxY@Ɓc D  " [ Limu {䋰GI X+ qF'd┅\R-yzu%ٰjȺ7`/*jm#1A)yt| [)vUB1wOq: ul`i.P(&ƇܨprW FPiL)5JB<նp\*r8d ̊DkB:ʡ)=GzT53Tk8P\{4J!CYo*t95N r"@ t=%gV1Ϲ3c].,jQs| 2csU,;YPWYbfcɶNBxfn:,M7Nԇ^a7-0[/&ezql$#vY2,Iw  tMIL.~bȕ`#hWʲyXHuF^a/FP%Fp"NB_U|tqx FZU6p<[/Š \&{[S?91)uuʈc2t=SvVZ|gh==,# z`& ڢ:7-Z[d-(-2B?PݢFVm`tL@-VbmwC @t(yOcNHn7inE2ʻݯ]Tſm3 uKČ27Mߑ- D?0:J_M"'ir7  'ug ΏChܓ{3cz:?n!|&Jn[K`(Km} p%9k endstream endobj 501 0 obj << /Length 1985 /Filter /FlateDecode >> stream xY[w6~R(&;Mlٓ"!Ei;QEnb7yA ff_g? 'CYLbgr$a,pѝ :Hkt3bT0BP|g~^vA`t?qϾS@kGA:j s}3ߨ?-}D@Ίa("vgG~Hib^˪]nN%,px$E#b¬D~Egr^ UWmk)ea8g*a;=b3h\s3{*L&Q`'x c %AjGO}#vÚɥ@HPt- rli ]]fi> L6MǝrWzr.iOcMKoܛ\z'ۉ>J\xȅm#Df^D [հ!vKjcXIst1!7 (z/&qeM;鶬*Z9iA))Jp紅Rq8 ]o,o1JD=Yl` đ U{McvA1B^l tL_15z( b3B~ ^aF1‘ D$VGB\M)Z+\20 q @!bbJoe*tFV[iV3Nm1$LDHt\D =h>T+ A)a>J^Kt`y{@&> Oy8AYzzRdqlmu5S!wgFw*v=*އ|"ڨgrg&Hm-EFkıU 02M9y#Q$Xrx}q09UزUl\ZK[hDɫ^u +#e/yJg#'Vs7%[[]57neobh;C0 ]3v[b t5V*xpdɤPkR?v5 06łM3ŦܖZ|mzT2|@kUF_ʤDf)>w* KlRuUWiJVMԨZ׬ITo ;YvkJȦTV>|c ͇zT;= jF\E{}+zʇzd#V'P..N= (Blk>WlW?G517X %NRo9 ƙmNPQ%e̷Fhi65v+OVui:ieI?v3IT ߍ5;}k/5WTlUuc ek, '.xM=uCmRK8^0 f`B'L3$H =K[RȥB4j]@$5WURp ]>SK#ҊV H>$?Fh`D.lu =-F-C_|,Gˏlj@-Ƨ-7^{u/3]coLzoL(%drz 3KM|ߖEK0ġ|vOsb[>?O[ϝ7]k+/*y.6-+hnKǤ/OsR՗ Y2i>zπÕs4F!")#7$c@Be7Ao]ڶ/3c}=E endstream endobj 534 0 obj << /Length 2030 /Filter /FlateDecode >> stream xYmo6_!UJԛEdbw #іHGI_ɲluZw({ϥ2+k;X8s -wEl|0NKU#5ΕfT]8o!x{v8̆!6vF} 1“xrC͌OgHu۝90U,5;ó! EJ3X̫4"a`dyg`}rlX^no_#Z]"Em5 g+N<-VʐW:;ヴ!U7LJ;%u18&-3&kB`ʶg1>)sI3P&gu4ω#۶M;Iʊطh7YcP9~ z$8%UCJMQQ7>g=j9A$e{&3N6BJm+`{MVR.bɞo T0w^߇mgg5{U@~LJp"i1î]udÞ]g(ݞux jG툧- c lۚx#Y } |d+` Kq@Yԥr;4C>;. hۙ뺒rȱiKBd+,n^mS$3L@zǕׁO&RhA[Dޕ%R ̕K.TX%ٺHGg> |)/jl~dUHH.VX9_;HF$m6d͇GIO]4c}2=#2jfB[VC蚴^+2z纯+liAv;`? }ilY=HF8#לo`j_2]MX5*%xzb0Up ~HN.))삐G*n?ATVņ<ɜw]چsUeۏٳv7='|7ܵQg=ot'Uerʝ/.('-;58KĭOę1;U{2M=unQau+UHHPxz%V< eBCeb"_I&`=-+-my&Yu& ʢU.RyCe^uL3q]'M(alZoEǞk9ߎocٶ=}ǑbBR3/Qsx.z5qݶ3 endstream endobj 539 0 obj << /Length 339 /Filter /FlateDecode >> stream xڝ1o0w1$c[$$B"n(%A1-2T<}/gFdPB2L\ m]8,: io05 5G.E9f%`µBZ 3X|P9} eŒ=2> stream xڽɒF>_AUAUV&U֙Ρ-2}HdgrWqoq w?n<'Xz,Toνyi- w7_KY{xA*X /J%<r/, "K΂[JR!j7tQXT;E,I"/۟^?Wnju 2؊3jr&#*^wo@4bqtSLL s!am#issY]QWW=JX ⼜|agz!ൡ^7&W;!koλ!CQ7t+Y?foNtNeD#j=A=2ۙ#QM!XCyCe%kӶ 0VipRGk O Ȗ0@/ugZG~^NUwic>3ϳz;D{P7$;2zKym{uh< \zy8{<)vhBm 4jSp+[lw55۲FNG(a6t׃h ZVP鑐;SMk(/ D b]Tz9Q;"zc9/C[˾F ՚WK"yo_?V-ګf9$ Tq D>HNut_ U,̡9KQ~]_qkc|hx@F!xDn+uBFX'' H\PT!G/[kIL]yöe>@8hGq@gYx1p~]dp|7o؜0N`Z їf" vlg5**];)b"K/I%{;}u͟ÐfU8ՠ>?oL_D5e> ӕB]ӳ)sΐf yev&[2:NgW# Wa,+ 4n[0ZiX9"6&%,9p]|,Z[mô)T4N=m74:TX^^kv>ou†)t{cL xē$4i Bo۶w@$37vmbƽ A4v1汔%i+<ŵA2qNVKXNѺR@ $ɀZ@caOCqR1ߤL\WOSNx)JA_sǹX 0 #0_ W"6K:KOb78罅u#nk07-MQC-k0n!o^l itq^z:߯A(<4 4y_!S(H& # endstream endobj 551 0 obj << /Length 2684 /Filter /FlateDecode >> stream xkoɼH[5TW\Ex†ec,5:m)c8sޯ9`'?|˙HP]xzG;[zgo.ܧ2M s.vY8MVIMˆ?g'_Ol=b@s$듏co x(Sk+OE9`bn:W;aBً/0{(M̦Ґ!?Ґ4;~ޡ5[?GßW-p\lNV:kU*PE@9;ApDI 4k]̭EK{.Xcq͒h4]Ucڶti+c${}=QMsS_-spD=/VQ {/@U 4OFq{,r7`E kD; ?aڕK?yRy:ݎjQآtqFr}B&9QEaD= E>|B#:H[*=(Q}BOB )oq9igLoݪڽS3,`QygY.tTk zh^6C}_liOe#T;t-.;u"QZ7+#}7;"#C! GW7#Uzn 05> B'7No%s\iy區=)m?Ix(Bҿ;o ZIGq(~|=^-6],_@H`$ $QH A `̈ (=Qo4]9 h T5XBlk2`mN}$Vj8%5+UEWH6EM2.<3kr[5B%lX*Yw7IEFAQBբ< {" S; ĵE;KHp:q\lER#DDH-Hcp-KPYwMk+W aF,Ζ] 6U|Nlgeg[#"U<7D+mZ3d&!L1Uk*N+Vdu)ree4X IWI#J"z답! ̕ δŅ|vV %̰bl$e5UIﴞ\8+vyY!p*fI;~ɷV-U^ʬ k-*U ,ݚk,J-ku~kj^_%Y\\%/@ pPMbe"yi`]5C, r5cA|\^㡛N!qQ &ҕ%F]VQ-]E8ʱ+*!k"*"a.~\iʢ㲺SDҰ,/5F eֵ k׸̕v+x:xwX,v3{F`C0:ۇ֯-K*_|yf?bp1.C1JJ/Ug!p]_tiC(UۡtOԦpx:U*)ѭYZM Za"ZIELESgI6Cy݌R&tfޚIU =|WUp FjW ٙF#7%H]jT7m?֔0 ui^nmhO2?γ8ЉHOimT%vi{h2!aa=`Xi7, ͱSN/L m$^ww1mvW't d8DQPN$D<$?ݚHҢ) B$l&D#7W&",VWI場8H4E4W^+%jZPQ,NZZ9M?jN(xO ޚ1$"g`!b 2|7CFMܗȊ䖉5!MTV,ҕ-̗~[aSRb8 4T|76qbibe!^q5OM]m$|r & BNxˮ> stream xZo6_Ke T>]=袷C}Pl9VW\Il~He9qlv8) 7qt觋_]zYTR]-#$RGkS]-E6Kv_͌x]^Y$ˆǫ.#) 9RXE?p#X[;jq᷌} y]}ƻ7V Q01Rp"IBcզ-6|\ /jZ:Q,]{8&ט )T)4›~0#NETD>$+a "]4ҰuU) f^I n2O}_CL!)Rmi~;, }dGnz囕1FWAϻå(\uB!DX.q?] u,-\hOiBt̙pg]Ο$gh} `CJyK+z%z> a`s110aFJѹj\:ǞZ;m4yŦLw9D&ߴY[T`U;*Œ"I ,aCTP*er"RDnͺ{~m4B_roB:jAF0`$%c^o*ͮ:i o߸Ǽ! A<>6SY0 t|`\ e-nB{}>Hn*yhwcr}2&i8I$?"ՈA9|&7lz6L5!%#eV[Dt'D=%!1ۀzCҘ4:q9Fo?x0nYQP>^@qvi+63H9,'?uI6%J!on56Ӓ޸=e#<Ǚ<5m^BSBM! ;+|:6 `[Xf3O"mfa/g[e;&;Q6aAb aM8X elƞ~CGkA=ass}NOo3wp`Ĭ9CB8UsMI?{c P+Kml|YBAZM/fg#A6uQq C屰`TB#!F s@ܸ:@D r(hT ~ .>E<5BR3?|࿭?{ZB)ug/MV4|"p P?v ݅QwN>c:\9h /z'^W{S&$O_a{{|y2B룱_j{DBJ`I\8A=c,"R &,m0es!hB͗oio^HvYrer ԃͶ_ɳQvOevne1w7QJ:g jAg1[|hbA)2> =q"8nEz׹W^Y&˪^ /bkVѾcxW#jj qD_M]a O$/D6^'b)hH7juؠ1->pb.L9v7aX]z[\ҵ T,Իj:|[f2L{΄ B)a0L#BhwSK=A_9 l{|>F@g#`{|}=1֨ endstream endobj 587 0 obj << /Length 1680 /Filter /FlateDecode >> stream xYKHWH 2p;c?fjǎ'B0h\~VW}Jmc|핒^HDz‹UT*u}zqߴ_ZuޛPG/?,^_ kp{Y%AW[,Oտtn2kcuՙ -X,_ E{u늺2{Յ5:+F;}o>4SS07Ea)NƋ"*Ӟ36σ0Q<(0# HTX_KF"m6D65ۜ`!K&6 ,EZjPdg/agTRU |}[uӚnLV`D:n9 FW`zC߼ӜfuC2 L$׭[qh=ahPYHiE+  S>vԴ`C$vshL h@` dq-AWp#Yh8MGxn=ހ蒧C6Z3C=߰DBX`KUPЍ#7d;2wvNmkgiX79o@lʿ㉵XFk *4ְOZ ViX1!.0CSMӓ-OUt7`ŝV&FwJ?m%c}BăeYS};pb[whvd b">=)>=ldpG@Û"88Hzbfut+PCV M"Κ,ɟƭ _|VTdTCc8ѳrޙ 8I:$GwrК_4si5fViŷ5VʥdI$OHW/ZPUyU  )] 8_+!ponbc>x`@d| sNwpOC)1lpwRG/V2E/Gl]{T yb٣uϬͥcC5l CxV uU~'WBe{t-̌G VMEBou5$DT{?67UfXsV endstream endobj 461 0 obj << /Type /ObjStm /N 100 /First 915 /Length 3440 /Filter /FlateDecode >> stream x[ko_A@м@ƀM ڥ$FK)e{\&H[3wܹs_seLDfL̤s""ʜgyo,ʘhcme&{L&49oͤUaNz3hV2=`8Fs)3\J=::!SV0:z2D̬oLFd :b2m0i0W+7(5!b0"M4V;\f{XO+6lAaaX)uJ+ 8-Z/u3 o8g\Аy4:12ym$:2&l{,1Y,@rYVa%Y V,@c@,$ ŗ 4PdQA n)v{!D ,˴}R8^H4ށM)' aD$tR5V{: QԣExb!  M<GsJo*p@ iq43XGa."go} IEa-ቫ F9tf=~|]?Xn?y,pP[-_Y,bt2 CLj4Mҁ&U.ӧ `֕Պ?uuuw?ajy>ok z<(yW-YY:]gEe5/&WFZ.LTz[5PfhI{ ) Av+ccwbuV"!??йQ ~xq8(4N `6 Sb?ZuêԠ'_.!=@5Il`z15o@nٛã{ 1/0mZOCŮv0ëy?gî:\5P h1+yuRSR׭Cv"I'5Kn}$KsL_tt!dЍ' Bk=L'Йзx LndDKYl6*/ʚt\/h8ILy|vAY㥱&xiFZ@c;'B*?.~ `!zF'blr.ܤ 0 6CX.7S0_.GևH=xARTwV?Ʊon!Yb m!Y(R+SRdUMx&1|l>W^7,1 ASfFIv~N2om3/˲+/ Fǫ/Rq2e Hq $5 ).392eѴ-~q]秵뻪)!䌂a bi>XjIڃ_Us1"$";h ErEj:pB_߬}+vX%֓oyuZT}ʗų|e\ŕ0;Xp "yÙ`~PO]}^-Z{g^!0 1ĐBp5lZٟ]_cþ&' CSg8o Sm*{s{Ce~FI8y&Z*Vk<6m0"TPXQ\JWGJ9kg aop8:З1^5e:;Z-n`hR IjϤңy]]R ^ 7(h=|Hً @ x򔂃͎ZJl4x1Gҩ3_ XDx1~ZbF9?zvE`c`86ᦌ)"رA~qAMXlBKWwC+EjSP+UjujMjSP*]j=DO%z*SJT=DO%z*b`7,R+W/X}9?Vț9o%Zor/DZY=EDЊ1B !h'-Vr8&b5?b; LwZ4ge522oJ *eڬ7 ,|6+ׁ%7 {'<.aWК#|뢪+WXt;,{* (%Ku JCa rGiT(͛6+(r%"]WT]Ayȝ1(\ CS qX{Zo_kr(,e q{_l-`NJ+!%',Z_ ٲɞҳiXMڌ~hJu^2F .b@^8?"ɗuE>;G(RWJ xނK0,"ePvW`=-ِ3n dZaɊ?x67r7Y>RاCUɮQQ0*҆!Z&Dk6OBӊa~na1;/֥\_*~vXi]HP($I$K#޽5vNbFP&5QBbQ7o}n!޻b%όjQʐ]}.wexQhaRZ9XD-~|Q.gW :_[=XyC>n7uyvU5E_1R;TPb il;F\樨 ޡ)BN"zeR(8"4A&)>$$-wŜt$_ZUTgM\{w)= >BnQm!z(EOP|dH=Q7/۶R ]s,1{>bh3qU7d|(TەEY}dO8uewAhRQG ?Sgy4;Y85kzG${_%bBes >Onŧ;̥TmSMM56dTmSMM5ϧ=%I>^L! ^HB̔5RH"CM%c{\dC 2S7eA,< endstream endobj 636 0 obj << /Length 2458 /Filter /FlateDecode >> stream xZKsFW`+JJىS^"K';J(n忧)J")۵n#rr~u΢%jXX( EW<=XMk]ֿ:\ǥuZk@D?~;y}uD18f˓hEDEv2R?{^DUdf$QAlO0,v'c"jT`N{9Kt5r vŃ{ ؝<-XFSp gӅU?Zί߾z{:e\BBƌ > MvjH׵s޾d"pn[::-d8JT;f1W܆7޽F[GOW9݌_b@B ݉i}JZbCJG::35LEinJ @S "~{,|Za@nK%ƧH Թqwr.mÁֻȇ!4|IkƳ5' aul|ƵE}2[?(+ӈ' uyU}O߾k7߀$Ot7Yz<YSVVU F_N)+AN0dekeHw @$ߝxEiЃ$,7-óٝqr`UzUEdڒf-TBd- !+==J"]; :Xm; VWΊ!dj" CoeZ;;?zH̋*=/) 7G XEAIdo} 1xnL-8o\!H\Dy{'/_mCö_˿ġԘ[)5 jDjx2[Ml8WW峹zF`'jɣ>d'OsbhTsKD"6ܧ8c܃IS5j9wah%PE9E9L B-"]ӡ uֶ*>S7]aMrWPfDKÖvX:E3t˴q8;$y zn.;׮JG ^I;yoc+ g7ےK*Md1Fp4,r* ٨:x4 Qg]e:;9Կ{ uV<$Ȼ@Hq~{/?TzUip~MXWkŷfP`6r~l߻#UPNH;zAEdhv̾&"N[璮VU4n_ٍ?}hR[t]cN)ʜz)xeqYݴwo+8_n~lr> stream x[[s۶~' vM:8I"Le1E%t߻jJ\a bO{/'{߽f!ϥ5[Z <̬ۚg3LAKodʏi r_/M9Kә y~2mkjmҥX+z\q){i%Br,eyEy~ov`KEz)-(r= ( $qy\X̶+ 9e^.uSKAE),2P.T[I qݙddM{Jɒz+we˷퍆S_Wɐ9[6:+ӵ`׍ @z?vB<86(}~yx.HtWS-T%CG ٢G%'`ӯMXJvQ(L1LquEiOЩoz=:<></o_LstAȍ OEk3W$'ggX/ ;71wM7Qlwp`zw<1iK''w| -ݜ tA>eÛܟldmAvՇv fE-lSr,7C #)V8]7QDJ BuG?,eQࢸlˣPZL:v,0)y0;[ endstream endobj 651 0 obj << /Length 2663 /Filter /FlateDecode >> stream x[oF_C_$\pN4Eb}H@IMT"u$U#8~rmIAI.3Y&ׯ8 2h~1%)ت ; A)4 +)'A"٠Y0 ^/`%da#ͣXxMx6$:7X:")>2Cȕo+Î6yF~j.U!/j,8[&8aJb pF {b-uWfn 3`F6O%=6҈AZ//cYK[4?("@x&?c{Í)_F?YF<8X~h2Bcs6ФPljU_QѪGCx=pኍa]߼|es2hA:qX)|lw< jU[VyQ>owv36/~A1vA7 ѼH7x@{ l3.X1(u5kR\W#|pAԐܻ>`plzg7PyƍJ K0F$5K5g&k f䧖:d!υ8ԒeSuh\'xDaEHd[,mIfn2J}fo:Ax:plX!y)Hi!CN}btai )@2"Ģf&YmL^ba6l pVJ7!8-l v5$^+cB`o>m;LtMA!_79i`kt/ %qV-vc{<_/wi/u:rXf}\UEs`|r8K>.O~TĂ_m~HNK:zd/GDr};?vSp(?m3k_wIh6(x1pN.$2Y~bzk;0h endstream endobj 662 0 obj << /Length 2290 /Filter /FlateDecode >> stream x\[o8~ϯbHj>tA&z:@DXEËԶt"s'عu71)w&sGPG0:qv03_Q/L0<4/(#ri3Sa ,OؙA/F/G=a\5v> [5+"%F.N X|,{VF0®0+sEBky4DZ]Eޓ}GAi} \@.Sn&\ |;YUI+k׆A bL-5 TIߑYt'`w8,w}+|x""JFK߻N>l]H$ E8R#c."RJp 1meCFadҀq[Ki7aAMZ&3|;*qaZY?_O찶B.E}BGu# !~P=e5]yQA5L< _@֑mڠs7!-cr\!,zRO}kGkBRe,a C! h-\k˫ya45b!upBjos:޸1# Q# >0(%􎗒g.zbm-4ʼ5-ʭحf5-1*od.I T_'BEaR3q4W Mc]8"Ci)VŅi Y1QdKn_l&\E"+6d4ʣ4LI\Q.B ohT.hZԷw*6(jLfG)kLxi:ĎM*4Т>4S^kEQ%Y&ZTZj308]~n =VQ2&6O36)~BI&u2ifAm_" yæfȗ&M3Cqu[IV/pa8Qep(Mȱa 0ȊOBx@&z{{^ ,bd{ޯ ؈J6$m=iN~Qy6ދMAjY߶N {ky| ̿|r]efCgnv5JNz_p>|r?3ux ")751~]:şe˓` df>̢iٛ|1{=e ~н  StA!JNaMS)dîD`GO#w7NUrh^cK T7H@DؠJ<hxTBiUW"ֶ[E23=޾WbOkRL"UW6ʼzGs,F3S^.t摪( bVqOU"ɹģԾtN*[{zie˺`z/,M񚪊3] =&yڦjZM-QAWяU!b/]DɥW仈t@U3^U,IJoXk]@N^#*M%uFQ5jEVO9$ jwpGH}L!VhTÈbC0&]Uv]Spl][NxHz?sŪ?8Tv6ƾ#"*rBx#r;FT'JYqQЬ硺{lK9V<:SI(tjP\7En"CdXH9AA\SjxԆ4Hu~'G$Tz+S}?^֟=`izn] ̥E5BQLLY3\}tޱ9>`x͙1_~chv;*ʃ:,-cL=*pi,v_+E_~\8*k[V1ۑ_ܰMQ2 2|އ6K&O(Hu/NrCIE77q"*:.C(0#PX{Ӂ4) G(ݍsw_a+*Fo߬|矬X(FQ>z{,75\u"Uܖ:Q A+~acnNɴ[Aa" endstream endobj 671 0 obj << /Length 2447 /Filter /FlateDecode >> stream x[o8~_þ8KR$ErI/m+#'BeɕbOˎm9i+2% g>q>~3s`wuR g2s\O 3c1:;ftz'GgAj~w3pDEaD?M~;:}9"0vQ0͐=g:?;Uy,;LH?rs8;}uBm1Lf"Bg"* 7c2q=K͘P~܏>Y$KMX]"  5j!;f'Gƍ͠a)ƳHذuZ,2^k"jUnviOHU; Gܾ8jB"IhSMRFN68srpD&ĹIy<^ɺ o]]XX<\uA1+Sd/AN|&󅟆Yg e9TS<8)OqwQK_@:YHyMzA(Ds^a!o5 A.HCPu~j" A(I" ][Ay@GL& W, =!aSQ$ۦwMet0$CF<#) ;)R̓el&rWN}lFP1! j@d @jd0A "*f`Df@/f)*h;CoelssU)\HJ?^^\OzXነn)6N9p*$NZ#z+mV)'&)fsF*}gW;X!ҭ̧ [P)k( >Fj|#涷LN޵.\}٦||`BؘxPXDO)r@t<֘#W:FY81u|b'Bи 曝|h}Ym5!!69q:0sqܷK˶y6\֯ԗ,1E~D3p},؊[#cp֝ls yp/ƙ/.'͇B_1>khva< C{{}U%[2E䵯o( u*~RC.vvCs(UԪIQ-rr'P~!J!2O~K\[zl R>2OxdԞ܌ev<1oQP"3Hy.?zJ ƠY؎΃(K[E&nV,HUKe]@ꚰ,,Giȃ;d$E͈S}Fa$<$ ?`њܜHff~BP<ϗbJ13Q#1z,Hѹ#+]sjؘ+$\y_"-@c "SfkgbmKCV, \Xn`^Փӛ .&}3hYj[c֟YC[t[`=Uqߣ.1.ney[\ԉ Uf (όGQ5`NmOizQTr延 ~0him5"{w[6Q1h^`ESWֲpR5ɫUjJrjt,o1 un o?^_"*k(&ެ"CjWL7f ^RFUbh/ګ T!ל=xۛշKZ\KGl\BGN|D,IN+ j#I8z k s\YދMi̅v9CV\Qpˠ,"#$- 7%-.K }﫾#6BftQi&`ohd05-ϒt$V#4#E)\ As3$-m}F*xGjWv=SPЯTv8I.f׶/1Hvnsxݸ m;tB~8_}n/NŃ^'vl? K?c ޾K-*WFb+\`K"(bdw !UK:PSc++@KoV?ʰob"\J"R]ӍN()e JJYvҀSx endstream endobj 682 0 obj << /Length 2551 /Filter /FlateDecode >> stream x[ݏ6߿BE_lf-*o5IS安pHBkkdɕ.7O޵$Zp8RعvW9$|qBc||<^uC~<%xLû ,07I> Caucg 81O97EåylYz혋w'$Fgp#IoXEa Ul6 TL>.-u)MZEoKkCX#Lu;w04pV0}J  *"O3nyWJs,Z@ܕDYalp&wƹ`5֔WEdvAY\X`OMT0+)}wtL'ʮ/$*WΌ0lAUɮ98]&7d7HvLTm"Elѓ5"J!LH U`uӺ{$4]xK]#:и[_E&qoOm{F&s }u՝ׁH4ȶIKV<1~E=-|6:E0O d^UQ[bG{P<PjՓfFJRti;5%CJxCxZrb"SY%i غ8e:~)?mn{ .$S341"'“D'3tBryh-$TwHX;O>6 MvF*/b?ߥ0m rfZk%6r%}U:o G"E+Ѡ&Tk7Lk$F廍30F Rf QDp{GYعXAuXPZ-3ؽ ؊2*z <TC(Cѡ05 2T {f+Pq$hLu%32/m m*ŶDskmgj1[f 1Q9ի)0~v  -wP2z<$ad.6"r=Զ=N!{\2}YMըнyfK ̃n5;.Ň77o͍U9smZ_?d[CQC֗pr?l|s0Т] 3<9ɦdR' zDAdgt/_r8d ?z<u8q˫$PC8ƒlakMYui v_OFUdf=/i(~ݠE1AX6vaninDkE 4VҎ:ĩ8`{eڑ5EH h|~74G^u,~:s0ˏN[eTܱqp69#6pX) [Z\[/ٯ1O? *LMV|j`*ഃ bE4;&C|&'gNk/ =P@6(]ףax{Hpme0ۋʅ4p¢CenAaQɸzfΖ0aYTK.1w ?8; [uSF ǰ&X읿6J=Qrh=@0%O^.L3TG[j am";A@3WL<.8BHf߭\nVr*]|oHHiUe%";sID!t{K1`[Uxus,4[SLޭww?uBYV&̫{Jl0 JFZ K?w[Rr@a򹳰Ç}>T-9>n+&p/VnS8;փ [w'+P6?VxjՀD)u(E`]޶;a}o|sGBϭ4`;LDT| GfDLg'Ajěj XrZrĎQPhq l V QJJ[ 32fp˂$Y٧ɪt{*UU^jկ4/]gN& qDBŒ+M̝zO&ޢ$tW˽mʽyr8}ԅ&SC]ߗuC}e6`є)?ĥ/Qxr(^?){*ѝsB{rQ"FNtl:=';9,yegA=U9:euuH1+YioìI{i} L>sޯ@gp)Tۼ!KN.z}kȹ$(^_Asp endstream endobj 690 0 obj << /Length 2823 /Filter /FlateDecode >> stream x[[oF~/2Ma>$ H],6) Zl鐔og.%Rᙙs;Cc'.NyΙ@R],x/*ِg9Dn$kI/jY ]IqٛS &Ɖma\3\둄(%),MKW%Z4߈)[gC4.XmD g()FV}*DNv|#_zS"aߙ| xpv8wwNH]jU@}ACh dJY4_* /hJUp9}a|%@_>`}G#Jt@p6YjW;!^U Zz"d2MTAc# ?ެhns[oj}mFCX]RB}A= oxsL;8Dڿsxvq+.w# Uqe48<#+1I&m4`0`:.!_Ty[QG/2:F!ࢡ{{"ܮ,Wг x,]"L!#r'.ث!)wLy^&"-,ث1fÃ:-%.P-*,ڸc x>{ uu oOڛuq2@6߬2(cHtۊi?_©I.7~ĦߋC]GᛍSM z;ѣWr?V%j:( *0Lf\1KB!^D* y2P!([P3$Q73 > =!RTet .&m]\\UZ0 r^5gv4v2dϋ(Q{'ouwu)H%=l= xBG5$I(SKm#w! E1Ez˼PFX:۵/XXz0<06VzޢՔShX_jaTlJKEݗ?)$꾦Rqp-n hLedi09&K 0t#.c.StufJdm7yˊ.2]$d}8*7V<]Eŵ{F >E:KmߢYqlf m3%Ԕ&[>j| qGC.nCdsxLr9f@X 844ב̥ͯ`.˃E7ѕyp9 Oלu>|~g@Z NwZK\؟3DKIZeȵNA12d D(쪧AvO (pNoO9lhKAI>`E~ռ)RpܱҮ6Rک@_CWİD )%w;1Jj$miLS9QDG=T z"< ts뻶Gz4PCצN18rcҩujA9u1o+r(5[B>0$D yŏ=)s$,* lQHTIyaG,<7Ȟ UdxbLėc=ꨂA+6R4[,ݩ"ƫ4+|*vlH|_ZӚ̮ Υ-mS{`\wH3(Y-+w-zS{*N,G%,ϗYI@)|2]nj n*v^.e\NDѩЬze,PxF@j/ T󪢇*oXS?¨C_#ion.ocd A)Gs2 u :c-mǴKlDٿ^8iz韇թya=;>=ﯴoy:v7z-P,[vvvt)QGМ\"tGd=^[,,4ʽVxA65\*d#Q:yV-Þ8V:ZFc! endstream endobj 610 0 obj << /Type /ObjStm /N 100 /First 889 /Length 2241 /Filter /FlateDecode >> stream xڽZn}:٬ BXkCI`^ Y#ib j }N])!r_HrlRȖ)j+ZZkrIJՂ+"P@\,EA9byZii1nM \)H@YF[-\c$\3 7 [ B|p#4 8YMHB7$isCFб9zhn =,gCsK2= 4=ױ9zncs2T_!$MI} *X  c5m3>dxU2dM7hIoX&`EJ/opzʣQ#%nXRgL zo|!\?#mC VOh c YT}[:Ka̰l掟ƹcne[n,*X+֜|, Ub@P ڠz k0 og 76q`jnC+>hs>Kl09;[gNjosw/߆_i| EIqtQQr؛a2 ڞ,ϢD* 3֙J|uE$C%*n9j0:9DOQǪM0yz0Vc+fău\lƦ9VFnt0ez0"s$Oce3uz0d!=``K6$ ZCiz4Xd$%&, Z'јDBs&8˂i0Y02fu97MĊ BUue> kjKH $)R,ԅf0,0 .E RS뮜@a)p ]Yd*I'܊fH,3Χ ž7} jyLBM$.w k00Li趓2;ތC_??W?דA<\>̿^G'  3E/6<_np~wsOCPB˽r[PF<,STZ̩K4#$r({D t^6ZÂ.QxiEu;Jlk|mt"SR:]XUF'yQ׵PI*P(=jKu>&*˳HUiA}sbx<@< wacƴ#-+#.db5ތ8:#ϷyXþ-܂7rc\aT?r,}elߩ3'-HC%TW/`SRq.X 5r:%s`+{:cFAs&ҷCr7L(.l-pCД@r]3m•|'ݝn(⬔.=K7#u;>%A.ɷ}nr͕הܷ;rw,@WUޫ(mBV!*onZsRǪ]!P&q+dJ^Í*xT}1(&@3LyΑ[sN}V#wOع!#^?T2F_q~w.j9ts}AVV'~)}JE'PcHD!?m%}|{l0*qI0n1U7` s~0S˲YL|[¨w۳x7w:M/,%>+r9mM7׭ڤ P@O (AEAm#_rWU#QKg2h>̈́QdA'v2.ɸ&Z?d;RnI*\&d@WM[sl&0l['/['/L\ď*q7|Rǯ>瘞z 8&`X {O\[4PB0=̈́' Nh+444Ss۸p9eǰ{:ɨNϑ]RcGD JBlr3NSwiV ~t->7jt;jFIXOOA}4 ұи3A"6 g{dQuNlS endstream endobj 700 0 obj << /Length 2204 /Filter /FlateDecode >> stream x[[o~b_$}8mmhMFmRT4*ɶH &9"Ϝq{{:y;9ysƙ@RMUztR{Kw G>$Yd_U3d?xxF֑d0Rafthƹb(P#Lzi݁6ImXʊ ȬB:4NR3$"QC7gSH~) ],^"P}tm55&]^ XǪHѺ `Cdgέ(|A0߇2xe#1c ]Z!Qs-Grd 0 l:mBM.0uL1(c2M${ȳ n#FM'BeLѯe/3v,1)}{s~19t76oк1 !2y>g 2oӓh9LBx%1^H.ڳ4^YliL( uLMŸ8~pV*3 )P@I;3)#]2/G$#Qa}L⶙(jL/ O}?%$¼?<C,O.:< ؞418% ϰΝUm߶.&v8J.P9x-Xª_h% |F \7 T]B!ϕ ؿi^^8F~@ܳ6bz Ԟbv@Ji˳-NI((SXnmz;<;<#,_  8a NT"wvM:o }"rvq:y^-;;ŻBU. ;P~F ` ̖~[C uIBZ\&%H $^"4tP˃^%JߨӼLb ij֓ 42( mB:m`a4J8 t!;uu\nClvkZOCl8EɮE `P g͡L@*|sL1AVaqO )JIo)WPCng zKD Y,.ìkFRPtb:K Sj;8GڕSp @OK*C,+d )il_Ӈx_W轪1%Й81W-_sMF1/&ru][6 o (թfJpH/jaP6Pn *GǬ4!X)]uhtuo?*>3c擎if endstream endobj 713 0 obj << /Length 2675 /Filter /FlateDecode >> stream xkoF~kwEK+pZZD(Q8>%ے4EٙyG~:>5gFZR]#$RGLjk]Ϣd<*6G<$ٹ_4IP$Fdg8#H(HaMgo 0b:S>g8Z"bD%oIeC!H A-yv{fSED94'z;a̴Leo?xDVJmR#LC)0\1U4Qa90li5 -]Y(

{6'W<%IWB@ ֳ݁Yw?r$u@p>0Lֶ/eu7ZHuVL7zx㗰^>4 GB/Sΰ}9Y Ǝl,v.$6p 7HM k#qc'ͯrfȴBN˾ubi͛l̛!(Nb}h5cyvPIʎ,UU*~J lV _0Kuϣ* !7l`$YZ>xLl~/pN:E@UvDrj BTBOC~'tCjSȘ}(H:J9,&{12? Q> w88ݸt1E~<7yv)=ܭX e`F%vz٫^p) v@PŽL 1J?]m]9@Gi[qD"F-m=F9 TLnJU>Mc%QMJL ][*3gNw zlYVUh`qQ* 4]nGHu ZR\t;覩Ow@sVwTMu",=߿32] 1O)Dt;13<+d9L|`D$mW&Vc{o$3߿#k`i]]+sHC0a/MWYw3yn1]v]M99BR \$~&^tl"ۖ3ԙ>D2Ɗ> x|fITUjTtVL"ek}k6VU%x'oODu luN0F"]E%E0'^lY ?f6Vܫ]&em_*Lv܅&ߔ~_laܼ?EL 6n݁YCn7li3Hn.!]˸ gb-m(θOkȆr.sia+0{]Dp;3g_{;?#'T=uL|o{rf918v<|Իd1kAsmhy6 x[TȽjfbGe_[Q8dyc,ә)9:M8_ٙꆞ1` @rRl endstream endobj 719 0 obj << /Length 2714 /Filter /FlateDecode >> stream x[mo6_E |TmѢBD#IzHZ"Kޤ"@$pHjG}'c#CAnKDn^no do`o__Pt?y)hqvu-=Zѧ!`TK?^G>a˙EY˕0 r &I@q !kHAb:1be<`\?5 Bԫ& r:DA n#քeA$0C!ȷ, BvkїTY)[s%pT %J>D:Q ߴ?;%"O8V 1?fzTSLbEMWeBSYI"ׂ+;1-t-kGWZ;3.` w2^,YUmabp{)t,g ,,~= [NxX(?xCBz/ս^NFgT~z3v0;+v!2l B"Amfd,1ks,:+ވ+rY. v s]UýL03'S.CdX2I#Rf=6<pM"9T! q٦DN>fnB(eS΢okd/?N6;dA6,6y^Օ#D2Ko< k]A5(0 nUpW}qdBu$ Q %"TWվm7+'g@{0V>ғwV'ڣf'ĈXv"q@|6o%'f6xк4藏/qϏSͳ?6 43|PىA1`2Yi3H YQ%vع&J)HV3|й5 6G5ѻՌ77@ r2]Mfe;}kSGX% xz(t̮:B7C0+nc<]y[Tu^sko; *mJVlٛ JMdls<^D;!(il, +2kja}l>/*i-~]cY16!aji/ %uWx f " E)R /fkG=fd=l'y6mx>{}bل7<uثjUREYZL@t 8S$xoXnվf']Y(lbz[ ?ߠza9yo}Kh]J CRJhdԻ=Sa 2goi2G2YK0*Ep)5 pARVmjDS.> stream x\oM}|Asz&n" Zl#ɥ(Y"i'm!\fvix⇫_sE(]=( xxļnvy IsgU}$$."aD~o 9 p-w>`o?{(U[_.goX?QR@E&R " F>!ZXeJVu]̩}dUaZ^"M<ZMo#! Lf09FQ[j LAUć@>ɐj#BSKmPJjeb:n߿$)AD"r9!J155)jNK*j吓֬N =V4)jyΡe# m'1XqكK'&{ 7E"jLIu|%1hPOضS1Itܺdt!"o6(9뎮wQxQ0E|rя:{䒤HS"5nbvlu}/yꋛݸ jl#$ .Mp `}"Bc(푐LAgBJ@ĩY/SvI8I¥Mumv P]t,DL~ n2[)6#%iY+%]L X{DӀV h4-\<#z;g_4PϨoWS#.J'fj$ RB yk¢]Cw:﷉5ʳIy8zQ a(H% Q QPzr$7j,͉}%ĥ3\AEftαI\,79t"؉a5bn ft ,Ā׃C5j>I-})C3"C47]hI݇-"A<`5ނ=8ب; p*L>(}|qy`"O[[  F4o_\|(m 8A Ӏ i%*Oo=SB`@'r 4% PT§gaH-|׹*Xg)&\u8'g˗.> N kwT)uEnHIDF?8κ (.Hy7#9b}oL`(&mxCt 'L$I%8gaR tqd>Qۜ2D`E 1~X";#lSeoI$)B~'*/@2Yꇫ̎fnJKDeKMyZTL۸p{_$˳TF.!)~ M2\<螅f~oy,) ِ'U<)싲z:Z9:QwS[;X+ S۽9mNAl2nHuC3lRζLz?=ǐS{\tl1z k;4W1WO-XO) A#;`έE]7/زm  ƅ7`CV3 o .̬pKeA5kЄ'My*^7y\9J(Ql~O81ZAF_b38R6,ݵ!&IpS(طs[J9ީ j&]nO7 h=8]v-׿̖& 9&$B$]&EGCTfJtnJA=vO] ume跣{ArCNZ %ێJBb)]otUw6/2l> l4ߙ=18sMsvjf4߻ke99+sX6/^bJV׏O!uZ1{΁3Cj4 Ï9ň>a> stream x\ݏ۸߿B}8M)@rC[) - %$w7-w(R([>"@)rf83p$yꇛq(Tz7+OQOqy7K2SGK\<ۅLhydH"盟~T#fhVbs3 |>\ [2q[v癛?տ H gP)$0 H"Nvxҍf5.-]&-hø ROcB3۹b@Q*"o<UKQX'KܖV3χܮ $|~=`6QRte? sSa Xk!YMi6#4UąmJv[*a߼Fn$۟/8 D2n'w5;#qf&pZ`ACh0%( n3$(];R7r_9ӢX_[Ŏ5f5M[ϕÔ9-{>DE\NòF/OyJсc{-v)]վATKzNՎIF.SH ;%=ǘ= T_ϜGHm7 ƅ d*tsoj,8 / --\[F4f.5$[[첼)N}((8\%&N)յ-Z4unD-'vZ Yq9W{r(p9d_nh8#uL] Z[Ӷ$ iy2$b)9*YZczyo?y9,EL E ݪҚ0XVa_T](N): , ao?ը[p \T1C9b]%zj극`Iȱv[#BFCWyL~ ˘4"AD Se&揻d&.Jqjr<<{fpΟAǷȴ.OĶ~-8YE\֮\1?tiNqCG9y0c-&J:'NsWDGk@ O3KwJs봏a CN^i N$3sʼ B *_] 1ӼcO.#-Gm/ιoOHtU^Zenai=//p_MmTߖ\m)<7!%ovz 1IR&3*X3qlEo-.0N3`[ch"|u*g۔=lVO%7,1mE^ }d~oo lP3B `)18Z/bAEM~u}b3jsW,if˗"̇'sv.{X1 p1, " B!_I+X%@6U0cj$H- +4c>K"u!3\AM X9QHaWuDa22$}mi VɢwԂ6SjήSV9ڄ>ΖQ:x-7<. q|xtl#``+6J'kq/KDmK+0Dtxyt#i|2HA*8dPeJcIEE$|D:&=)J!A}-/61]Far E,TzDŮ@T endstream endobj 737 0 obj << /Length 2056 /Filter /FlateDecode >> stream x[ݏ4߿"5?cݭhG8mviu5qx u=Caܚ6ĵ#F7bb 4(%< fk&"*Q[ڎ_CQeRהIJJjY+^޹aVH} 0( &5-`&X| 6% t0Zǵ*TQ0jptcrcR\X Ω='|33viXAhg껴Ul;pp5hauqA.haR忠S'_Re3O.Q#F4&!{ha'q j=ȍ: Ѓ%s.5\j' Ǭ>5rsLDLRj>/0B@Pf*wR{];]ݘ3ϳ:5ܾE8W {Toș6;}#$u ^o{}M0w*Q}Z!*AB%P,8ygPyӪEfh(Er{O[w^to0zjvq޻}6b/$΁LbCO&Æ8'6'fO22@'cAa/$ >bdZS#=$1hi]oCmjppHDfIz“|b{g53x@_ZKX>>s\oG'YQtu)n:k?S0&=e[>:Ͱp<`d4@)gKظSzLOUDM,ʳ=7wPDZjHъ8d,.jIZ Srqi E<=,+|@/z; b 1%/׋.ya=ZzR,.ΐa)(ĸZXXp&0cbmlYzpo }O20~Ue`1FJP/ lx]m?9l?s 7P廴2-o7?z0]2 o80n;]gڍk=~.4ںhH+xRwzWڌCH,:O(Yję*GLj./P}̅W6+|,P;[ǩm 4w9.ʖ~fe],1ڏ]iܶO.&F=!ok =K7C΋`~ևlY} Cu+#竮PKu?>)VG-Q|j4ڶǺ!}Gh@M[Ξu!a RODÊN2fϽelje~rh͚ $v.',1ȣ$ ,>K(tyx9+Irs࠷MT@70ym 4KwaP@ȀUB_/eV\8^g?h٤~,K8G$x@IXi1XY!툋|O,@lI =ws`f$zR endstream endobj 741 0 obj << /Length 1922 /Filter /FlateDecode >> stream xZ_oD0oڇx8  q\gR8z׎u؉C*z<3;;3;*7g_ F28_G,8_og<*ѥ!϶S;ZuEaD濞wgDX)8XwF,ۚ:2:3lQ[%<7z71BP,mfF0Lٙ1ĝoC&*]k,6Op4k`[aּ/liէ筶EayQr6URIe$#0Ap-;N*jmuȐFREkZ~y}*1!}c7qxx>ˠ!q\'ZYme~"FdG٦v?r7n>!S}~+]>G,=ƻNϴv&klbJcԾ.~W~ךF*= uSڤ (yû 'rL݈ `(ގ]ͮ4u ȱۃ}RjPr ATNz('ږ|L)$¶psX Eappڅ(lOVsI R>:Vdv|~F(@-"'l{l.{@4v Vhdvh(ྫ}6;zɟ<-L^rﯴμX;ESfI!)ՌFSJS_IkӴ_~l@E3 {adLeS)Gۤh[eVIZdս6muV=3ݏtUd޼0.C(d$P &vw}:#2(#hӀżO5E,sgl]j;n_͎kB0Pvvܶ c,hd5q ;dӈo܋P< i#Ck w`Tҟ٢%KN  k9AOQ',d XB7G ĈF z^wc}5A()dsFnYW_)xSk/b=ys^M8y$ICVҖUij L 6'_N: )&'ax!aݗIN\cߛ ~HG(P̓&.t=:ގ9V`3g/EȎCGuþ.]J)d>ns), U0w:-(O֯MvmCE~B](%l3;UtW޵8*]e6__ > stream x[m6B %(4M{)z랯iQYr%97)Y_v-y7C`MQpyf`/&WϿ,PHI*"`DA# &r4FMJ5@D&\\vE`< l}'̡#l7}] \kiA+ٍ,~(Fvt[CT!U`ciE azrܢlQ)!$%V_f{*Q)[NkbNS;*Ct^ΟNI㷺h)uc7 *>;5Q(_i\Mc:o'H(qxc$amk\ЙR%TUcq~7dnDȶ V"N)5wAת9'<&di\8?El~>_ X!_wY!0P%ȷ؀_lS=\IT@ )" T_z^)!H-%#ڤ@`;3Dh PC !<C}="êV+8lT"ѕa%דAPɈ\hڔ$ FS*QnbmJGtdI^1qwJ6Iᚤ =ff| Qqk{+s?Nչ~~W`A_ǜћd'2~c[IHכؑij?VI[wgֹ["(`,uwxs|EzAE7uSLu WI%#̫ f,RY$_;XV  t*'(jqEK:q;O\toL⾕N\$8EBx %!@mݟQVG#C)[UDNSZ7!~D Hjb54q>1N3D#B0ĩiwN,*iۘPP~c޿@̸wc@iw !n[D3?tnԒ-@E#+7`VWmkGp~DC"rɆr"k!'܏SP[qGWVOcOi 6(gͼcOީӯ){\ \DKys}Tv{%lerb(Ʒ:m-C%lonM58"ѫ ["5&z^.41qw[X~- `A  `dbvlZ=mz!Ȩ;xPEEO3zjX~cqʫI 뽞jc^>LCV0<7ܰ:k*a2<ʛݝ zB!d§v WG(rfEV?,"rbYqa|yMV՞ѝ`+|{)B_K$Z= s]Er[VήNL>{&)v}GkÂlCE|i}g[6pAs lﰴ#cv?/H1'<_MI |z}>(첽JC׿=e|uD}k=Z||,SNr$DJV|bb60d=I;Oc[BWlc-:VIA :B{78orYamR>mJ !;_s〔@6%P$* V3GKݎ ,$ ]~q klC-߮h]&d:nK}qZݗe6˴ݝ|ؘ{mjٰN^^-kY1<7˛De^>,o2Zl.uyUpj 0g&Q !ǰFLg vq{.=Z §,5cyЂ ;s !ǤnC*vr&*VWߪ4\cwnCpD'@ sQzQz_2)B"Ev,5 ]y endstream endobj 761 0 obj << /Length 3034 /Filter /FlateDecode >> stream xZs3Pp<OsU;vj'΀ĉD,JVݽË-LF3{._|{立+_-2\\]/"Z\eދ].W2]S]Z.NiuFӃd!L,ſ.lYģpȀ݂3ċ[3boܲͻzo7!͒ <~ B!?o˓΀ˀ{uuޱKx7yuj,%iBG8[,(ԙ&+ XّG xQ)p;`>L!Cc{w"q>ކ'n,V:cBXA(# ,~VxN} .>B~#l S87xwM37Sg,CǿLYLsc(!Հ#>>j4k7u &-[zn5ucm^qsmVgf/`ԶSSF;9é3;ژB}A;Kq_!q5K!H \ FAΖ@&nXNhB:Q6%Ci@q%ISpL!i_66{E{$A#ЅjUfz)Sˬ!zp>sTk!=1v_૪aOMI/iSK{`_J&M^K@<"B[&~a'n0 y4qϷ{bLnjQymEbRLcLN L$h:TmuDxG3o3WJaHW~u*38|,L|RNK9lg6u[Ǜ{E@<`1\|ΎLr -iU!'LAԟ Im蠱a]4%d{Rx%(y؃t-Yר6vpXoz!Ӳ9^dh`N뮽%A* {:fׇfUMg_fs2}q[(*~k m}.i,T~'YArC!Y󄅈w Qr jXz'(NӁJVVjF|@A$9S3;Y2dZ,z :9_ zqUXyWc$v>PHh2^}CwYI?+Tϛ&ccIVw)61=|3VXv^.$Y6UCC-% @Yln/mtں^-seReYv̞r.2sr>I$C%԰AVoX 9bUͲ#zBǶgz=v|?Xuys#;?w HETCΟnsKGK_'@y{7YoTL۔OlcŔ:EN|S&`qZ '[馰۷y^6I(zBE<8Kw@z1Ȫ m8Pƞ+fK(fVn)^?#@G^d1ÌoZiQ l|ʋv[{Л9hB\CNFk'6l",zB0D!8!?=SA 2s3 B,rHZpL7$v_[:͞lLPmUR>)Qnw,R o0ϙ~h4Ln-By dw䧎H"뇭j xx8XϹɰz6okogu nQj@_ ^< ã%Dp7!7>|, 48f Y\B4uq3 8dLʁ&?z#W0ӟ&'md7sfֈr^*؀ Σӏ=~ ' v ф):.@/Z徯25kغUaiRڧ'7_Lp+f!Вay%xPj5³E%LᾑtzBTp@^C֛ڬirW@۷쐝b(AM`0}}9~ߌ$WTky}$w^ߘ@$,3Au[uG-`4Ԉ>f3N.aQUc4L)Nk>Ѱe+al_O_`\ ƌg:=s1f1z߮4g(ɴYvMS>Q) u jpڅL‘a9`rrKHz>du9&9L90|F3_ v9e3[ڌI&־ͨzc7|Ym?%w+BhI姣6Iΐ(s(+e-־1PSZ9mpNKX=yj,^jRq6ϩ-a7v@qB؋}1:GQp<|f$!a4K+.ى>(\Z0.a kJUtςRE^wЍIuwyYAR>S1}^U3r\c7[ӂ6Tuam{ &R_g K1Yj`` uЦES^ImUȋ>Z`X}KmKmi[Zk >T뙺[(Yp&:3}1n%.4i6w'ظ;_3{/fKè"/ђzغ"*-)i;Y"E?L66_'R endstream endobj 776 0 obj << /Length 3385 /Filter /FlateDecode >> stream x]o6=B} *)=E{kӧ~,[ڒ+MoJ,'l DM 3|I̻O.><^'QyW7#?]ͼFt< b5~UuZ9mGl~3Ⳬ.8<tyƠAE;=j酑pm>TDW[߶O py8=g>Y< O0H@ ӝ3XܴUvfsry yLW$}6r`:YVyc\S=7\dx ͵.5ͨQ\ ,D,0\~Yz<*廬6B+=H|!;G&YmIPc=h*,ax'b|4ݬ \&!W~Bob<1+uf*ڮdqG,sUZW .jpGy3AHUVu^kǓK*OC' aC 54B·=[N˪֫Y˪ž8nP$}Aw=MB0,P9 KFlׅ5[Ӝ8UFm,4_ui ڱMcǢMy<j;+f.Y>F 6

!Ց cFC|b ?;zLc9Ϣg@"PӒq<Ӱ?a*^y7pm:to21R `QH[*5!g(çC#h[<T"ЕQ kp6%]?̇8W x] Ba fu @#rD2e=ja`Ųa:ZCd2OkZ6ؐ=ob_Y{wwq,BHN)³B 5A7! GR2\(%:-l=txgЦ"`}A2Ʉ?GǦ3)6Pn4+4uVeYanZ03Z.&z3+o(BfRKb]48_M/gRjyu s1GE@:)Gs1MLr&HiNMgĊ vcp+jSC 24h*1к-4uOh\Zf,),op0Œw ' re򥡔ԲY۬@!17X$\<8P~0ՙA bad7A]# wģdպ=6G™pc"PpXqCĜD⿱e-I3}А?l͎_ Tf#p)Rz= qNTSV$vO#i푧Cvwۂ=iPˮq~$0y8ʕ`&t"6f*#6fbkDoCFc{T[%#N3 m붿e;{ {PqD.3HF9 FszZh$ NB@=gVϝ({߾8wr}4q nPc8pAFٴ^<CfDƓ,im<xB\,J֌6eSm/}!Kg> stream x]s۸_{9sRtJ.W)0Ocf X,0f(MJ- a(0E˵9@kJi9DI`9_4Z&W39ԈxM$G\!9ͼa,0n0ơ¼hr2+;"H /{|s}X}Dോuz"/yudZpP_O&߼wR)1굦b8#U Xgp^4C/YƇIe~O^M NS`s1ԔV\RsY3IH4vWh3Fj`eZAwY8H\E{6G8#/- .ch*;pl]Zb$a.,kslO(mlbfBDg2KG #*YOKZ^CsY&X] ( 棸KG2eQ*'zn A)‡ܼ`!.&N}qP}!a+q;g,*Dh_yfY} `\ew;c*<[j~&j׾S/يM֟>"B.ۦf3̡U]hؕѺHM]ʓ{m&'QgsLALчS |-?hiz=%~!6ŧ泺<&<0m(4Lg(EujE<yn=HsUx; ~yk9 7fEO`p5ntHX:vܮ6,ȗ,Z;֖LGi)rAy5rj?4X[ga< SX^jqW?ڵ(ELo`O\`41\:_= q] # :(i߭Z `$ 24mgP+I2|>9ġn-Y}zDZ?kQ\yVAγγpŁ5{(sP Glߴf~软nWWE]nf'm?"=Y ܣ/]BlS+WদbMNfE"BXK\9Cf[p[-dA$.ИΫ =  k\̃X"M!*Gt X&HjN-.ţaC.ub22[>[z1Ч"yN'K F(V;̶$(wJTS,IMI޾oWKK9ښ;8Z^&xM UٸugRcIVpkK.¼@lRy+&kY~@2:P2T ]E=AQ ,,|B ʣ "9P=QJP!D#π7>a^iH xY"CX"ZU+!fHy*Cx=BWȫ~2{@rچMOr-qpg.6;\&O227gMw6*' #5t-d+ oY4,PahJ(*ugiMXTAmz̛2tcXœHkue]`P`ƖMҩVK;nhήK2%to%72GVJe,Sh˩OT[.%+('3C}16Q$ɴGd![TB5dȺ2*Y<2]&Qu){>#n}FJN-dK?\Џ2̈bnJ9vDkB]\U[5yv^6+ͷ9zh?t=}|U76>5s|!E2 g$AšzG6Q,,"1&˄6USu:-vѩ5&5I5ԭ@cnqʈQq֒J}䑢խMU;83/ s d!'(+Å\!S4i|3dVh3}j޼*HӨU-k+P)$ncB͋m m)[@ {IxwmatLf95UhnzJ-WOj345 C &/FS>^v,*uKN i˷$0 &:^P!HiRm &c.K[; n DeQÅ!X,P ÅF-V2& f<1oGxJG5Zѭ`dxRlRP۠ Jbio+ElCbKf=2]UƖy2ZVqzqD9 91@~F뜎6@߸Ò S]g# kA sl*60_uE/x6tFiʶ9ukad> evU)wr+{d%\ c3.MDs2ufBɑBΔ=@2R8 5oj1 O$\tpy>14{Ha7d늯ٳx WOr`rk+J%Zi:D5٘+n;̪]\a>pA@Q~Ѝ+0﹵SB5SPS1zWYsI[7:| -ypHe<4e endstream endobj 790 0 obj << /Length 3889 /Filter /FlateDecode >> stream x]F=f4 =\8\.MqmmZ[r%o?rH}Z?hCR&7oٷ}RHDFzj+tO/'?LYW3eRPqv%6^=w*˄n0oߞIϛINg?Mf ?;7j=u5ߟy]\'̯^.@`kO$C18;ρ8pf\PwW/% Ў o+ytZ_CO~ 97Ezρqz=-B%AJ0cPoWMͣ p:oԷ.#?0ߟΧE5rq؏4F@ۏc6Pr>m L0ZNf@( _*@ {lR$׫c6iأO];Qk\{+Nm>";}la<~ gM//2p;6.}rsUO<_(X_Ρy< 7 |:c>?VVZW1vdNãul`}A>DS֞0zNχb!!(0h!;0 cq0bݥaWΫ\"7O$P].XMo2pImJ{y5e -pzb `G%{]6JxU.9flTF#zzx"L0W#XHeE`CXDB)Pt.Gส"jq^ Zp+.x!t^}3:]ck.q~(7mbr߯$7eHH8@ %*FTVK B8«*k0s=]`60 V ]s<=HdioKL^ޏBq蘒&Ł3E$£௕CQDbW)1 {hv3"VkЯ8;AB7E4x iFLXk})ï5LŪS-dB(o$aڟD5\ FD}GOg.֞:C[rhm ~zLj%HK.rQ{oѓ*Iz;mU]V\d$k5l6{SoPlհQQFBMRmآTآ#iSޫU'h2k%:yr{`nyE__ͤ1{КvYi ,#,*0~c6_^o@E˄52},b h;=_pT! :S-=kOmp.%ϝp/g۲1^ͼ#@0|OV #< lIpu~ 9(Ե0QWOqe&F0}U$ɯ\%X[PҀU+eG(Rת5!gdؐvpd`7ZFNp-$.Plq =n6bB3*軹M[c]{`P/5sc[Hcڶ}-h gK=(%kDK=]cJsízXSgcܣ 1Ar_z/!ԽHEsr~N gh=K>h#xNcTh3@~p9%֐X tEgB9eA^ҽhފo~r!5B\aXVհ=& M;fzMK] 6Ǝw+ <^Z((C9tmvM^m\5;B58Ó9uw]Qn^œOSH"rn:܅1wj˪99ں $\Q~s_7xç!Vm^cjQ3#u?\Ș Ѷ;c4dʛ)~[gǴػvCRSZ!堖jUԺJsSH [xdKD3PZ+Z`-Q P ގ,fޠgo0LZ> stream x\[s~ׯ`JT/NO4LD<خ"!)IIg/ H,Y3&-Ϟ={vw?뗜BJ*G#EGlt>]͢)U_y٧Մ&Zپ%^Q/I9'NTGĊHa5.O^q ѵ)qb?OSeW# S7MU &$R{ U0b eܕSiDD<4o~q(K^s i "ߥ5fʘV֢\ 7P/xhjȴo:TFJhe[WH,5Z^ ;zu*1{7!"jkַA'F|r>ZѮߏNI 08P@^GO Uٌodwcw=G|hlb*Q o&Ww1t1E[(Tsf񥇌28?g5 yGSmzHz(-@8S4\K曋v1}&+i/?WPz4 &9"=l=C5ZhQRq"oFTXW!Ccv$AmeUlӢ|_j j 04_nFCo_c&;# ) |1M/i x'verg{d`Ѝ523%_HYʆ͹樭~c+|y/2FS搻ڡjѿ3#Dj#^h+jPHl람qg:A]F7SBM?=xC* vPUH/qV#ٵ"r؍Vbu|n3۰5] ,§Ffmj0SIobkhl \ W,~1]%E,٢6f=XWULAP T)d0ι|wSpV)}hsa*[r. G$gZ)-?q 0 $ĖF++"vZL8ȩV>@A5+n Ng>II&E/.-5٤!骥M".= 3ل%uX!v6Bl֕>`Rsd5훐P9!"! f}|Iؓɛ>Ei򴺋SX%~;g{}ʼnK?rQxo:CF ѻOܙNGS,@]SfPѪI_.z%'ǰ5(%^xU(1< ݵ${w1ć 71=g| / &͈r䪅ΐ XQj(>Iȗ&\Yn9\ 2"LM0uR}@~4K.- iܲpi\hqi8GI3T@$|iܕ%|i@qt 3$k8&6ez59%SWqs47vs[A?aHZ/̋R.E佑*n~b~H\?];] hV{,dhق"z[С1 {ttLGn3:~FY}ztWkO 'rE$p0g'DVH5Qo{ t8tN)zFՋEj;4Wp}߶11N.ܴazsF`fn2\Niq0F,ܭ7$H*{m@m:3a͍#B0K1,1 AYL8X.:yfO1 _D{VgC\:tuO 4C=ϓ ϒe͆"3B:OP0 bAcP69NiҾ!&)=@ m9rq]zvح鴬lD[Ma& HWNԝN_ma`H›t\_jVnX.}: .uQYRqBC8 EP?Gvn쓫H>jo+kM˙&AYC5l@j" aTv޷S{s0Ssgؒp7Zs-\ oϊEb'v+y1, Mʉԁ/do%]6 ~ӼL_rKwi8zI} rb[)=Z]m"m10˙ C endstream endobj 801 0 obj << /Length 3531 /Filter /FlateDecode >> stream xko6{~6paIh{[maŖc啥M>Ld'mwd g7+;ikKxD5`[s9p}$k4/,(Z H`iyO}Sa, !"Aݶ `C1 aX2Px5P* ٚb.%Z0+82@< ]Iglj)dž27}n 7o0Û6YTR,j>FH6"Cyhn 2E4-/xnZa^78K?R>іA_dxMfe2NG<WxN*`ٴCGL:Wʆ736!i_И0xD(hX'~(CUJ$~r3Qh(Ss58 ގ0-d}/A`zaC1ozGRV |"V &WMs0$JieDbs0@O ۄ V XqIs.pUZpaBn´AIW{kG D2 Bw;ʹ4O&YHu5 (Rk_ۑAhr”kkX% a-wd_]=]W/pHRhYXVYdvQpdXg~C 7ʎi;0WyhmQM)SȌE))r$ڵp[ryE%veMHrլ1SkT^'tOc$xw&| 8煂[>p6*bb)Pn_}'@?}rkp/d?Ӣ9Ō_p`*/,ra7kY`XٱyOb+\!8{% , R(x͝{s#DcԢՕ7K{ߪo(uj n8ZDCs Yȣ>lȼ0s7񅏿d\>>׃]#g5/} GR9cUTPP ˉWOغ9AkЃLRoh|T/wu(c([;bΫ#V=} *If6Lbsa*&zb$p+}Y\ yii ._ǚk<47X&`FΦ'}t2:z}9}ܻ2B)"qs쾹G:Z}ݭ0\ mw&97kް#(loC 5DI_3+_V5Y;Q8U Dp܆81HItQ ϗmUFJ4a:21]^*9*LZ|.mI(E:tMP䆤1y? ~2 ʢ& :ɩк Wda|TƼ<O7OQ$R@ g#:^ǹӱ/A Ho"OY+ݑ3o6D<δ2PYWlΨ{$׸o'c+Cr*G|feoZ9&h7Ps_)jC595ew5R "a)AXR,u\׍QSP\^&(kt>F!n>'W>VxOHtZd{LxGppӽ5qߴxv]O!(KX?f{x7/ת|8ga810l2 8B>aV&*' *i|՜3*j~Dj(D K{pOƢ]y؅HaO@եpQ<}ہ1hfoʅpBg4<5?*жuO's@ Wf(bUďdoSLhMu,sKgⷪѵIqgLշBwV7Ϊ욓mjz_\ Jǃ]?vH(h헻֪6wb~ƶ96K_ZMݣJoβ:k,B"hi*1N8jix\ BFEA7I`/${ $84.|.1$JuQ4BUn/|y3p1+W:yhR4ˉi/7{6Ns`OÃG'M<Ս-uWd`̙h*nSK>pٍ.qa$غfo؍[9͹9y*ھ6aPCB,P~J1n$Q&iN YcC|}mvptHJW#Uv?OY>Foߗc=~U~݉#u'>F!uY'?P_a']`;̢XE?c+AT6wz%[ۄ}OH^~2eIsQ^Ϗ͆=\8brDâgOSAr9j(c-@Ir׼PuY.v~> stream xZmoF_no3[zp.{(]MBeɐ^sĔ,"@g2dɞL(&ƥ)MHdW6aGFޛx}0C+CN' 3 %&ogw1]6vlHba :1TďdLx F#kG„DhxNKq#`d 2VPK@g0QI&Mm%!xLh IoXbFhbX ?|! E1 Xe3D|%Ȉщ1`KhČPuzkHpv&E5rĭ\_&IpưE&UP>n609bʂ\ 0LXj0 Q9UAv? R|q@n1'0CIQaV!#/CDva*:G#6EDgM_Lӝ ٥4bxmA!S"ǀBIN ŰgQ@)/%p4@XGe7::Uyk_-VM&F?M,` ё{=.ё^oGЀ'[v`:vYuX~–faޛWMca>kMe3^Bf6Uomɠb\8üW jm?`z&/U So IuQX^xMvܨ:;[Ql~%݇՛{j;9BIN $Z3v> ا`lj Bm5" ;U-Cf.=S:egVϜT#È@`ABb=(B{O 928KB-Q8hHVOb5A ZG4P6H[UkQYls ߋTrL ira.H k>dآh||MJ})VJyHf5px9?1CE4pH)ʨB;ЗЗ.\IӹS.\àosXJ7Pc/Tj޳Jt= ʈ8!8$* =ċq<-/{n)DsQX=P> stream xko6{~C?4noޡM?mB[ٴ>d=,;8I5ÙxѷW7nN>흃q`F>[ZҷT?N>h1P󖌗b76A*,e`^| *0f7d%\߷ @5#YģZ3Dȝ&:6 oȄ1 %~Y!@¯Kg2(/7718`iڞa&.UۢV3朲=#K3asknڃ)Wuh!mA:yMwn`2j`} + +w3ة4eHq~n1A-j;hʂ l SoM4(݃_w> tc(Nʨq%19uuZ*V~|>8!8ARz\E C,rr sk[UfI>µ`ȇCq Dlq49t|vw]EpojȽCW+n0L"tt!!'3)}aaC~gr\ƤCv =(OvM P#6# :[ی̣!,r{3s.nb'0YJA{(f7>IEi'Z^zfKg"|*%4-JdʆQa+JWS< RW\)5۹[vO3Q".G]DEF[3ށ #\66fƫUPݥCGӘpMc 21@*i=Biۥ4𣕑_= Œї%w$!\?cJ#[QB__֓;sWݛ(ӏ,4%1/J;wFS5SQ} |{CyG:7\M zj*;ГLjUWs)]Šߥ>1A/#B-d#J6#B: $oK6kHuo"H\N[ 2oY2䋖Z+jfw jA4d;in c)6kآ 7g8pC`lN;M[˺^KҨok@V( {c25ҩ'ȷTn> aZ;^oTs6Ozm*8T7nJ&DFFc6f*/2<mhFa:x;cZ[ t]:mĆBTӥ7R1 ɘ 8$h̆_ |'-R1+R#exwID]·fL/$w _@qg)Y,{ö〱G1vyC*1%~Cxpߗw2]-tT808iVSJvI> stream x\o6_{\~UES@n}-EVbmmK+ɗ~Hևؒ"@$p8rf~C;v~ݍ a@wϕs;s>N8 ԓQf~ VO[S>ZDAˆ\~ՏW_xHÞ.>`|6yE!KZK iגU4WP'՘S[,UD^mZ IpR \maпah_A6R0 .([_\݅;ml'qb.IMjRx(>bkZc4;nq,H=x25|hS4p=}#ISLlr׉M >ɋ|+6诠` Nwc=v-`'a7rR:GF`7}5[zoj@\^lIX |kد=wkkJ1L!Pr_uf>9Nv]>UX3vXSj iZm]zbx#܏選G6^5E ne!D"O[*CIt2wNY]ӊt2mɳ%JnEԂ= w!$XtKBH !q&3PN a +T:sSdVroMQr6Uu"[Ẽk7He|]*Aݝv 9E2}'TP oy_.{}q]FjhC "%d?6O)>0Sã*٪yl8OIDtWF-EdҺPd^ TE-J&yxU7&T^Tr>q.+Jp|ЕYOt}ASGm߶=tOmAA[u;4p  Ck& 1 >b UGVGb]Wn jѝV?~a9"Ņl0TqaU4ɊܔA,"<40Ơl:˛!2Hd[ IfSCPh(tپ$MrN/fUZ[)UPY>%~5 {+/ݺS&ETK&_[Q'("& T3>91nI endstream endobj 827 0 obj << /Length 2995 /Filter /FlateDecode >> stream xko8{~Mb)J}w^~jb˱ZYrh,e% p8zϳ-Vpk .@Zc>'/`?i' 7|G|*hdye ȵv6,YN1xm3.)!'0y9M#%c B ksM=]bd^d-\c[NZG2 "tb DƑ.p^56!}2(5Qh .&A*."v\Zt5gJS4uLlC^PwqO_A?8N `ftV!PMQ_@ 2.xp|nk9]u1!3nͅ~*z {]!qÿJuŻ7;5hwxnz36`>_"|+P"$OϹerr`5aS#]2ҽM!!-Cn`yq9D;rɥZܣ |T۶M M%~7"8 (rnŜ p[NYɕ m_wOm#8͑][3*Q3-QD|<$@m {DC6D[8\8-1N-1דGj5qLl^0Wء|HEb1\oP#R]W*_颚iSUD΅* W yz*Ri:}UuͰz>,鼺a2-(â+=YWaԳrHJ(xz(ˁؚPPS<Sj]}MځQZz aP7MUeGlɺCR-Kxt>* ʕ̫*ѯRu\l$7qNt o"4QiVVYPC#NU'Op+Mz-c ,,Q ,THt0%mEMk?ky:j Ty#>Ԋ1@ ž=[Eۂq-'}^=O[ g"i!MR 7D:!n6yNPR0 2H/;NΓjrW국KwzR[W5G:y,!1JOiXl K)eUfҖK :&dnæ?9Du_Q9Z?@mdP~>p4v۵0;2v]7L TTr@G1&cm;BqZ5{R‡GޗBmːÏ/(Fðf_MY8? Eo|տ(mȮg endstream endobj 837 0 obj << /Length 2896 /Filter /FlateDecode >> stream xZo8B6pfHmt?\W(6h#KI~3Rd'M Ԉ΋ߐ/N{8s:w0`91/vәqt1KF**ǂ$ ީL%ƙ~ˁ#PkeUZS [&:=Q*+cD;'؏S+e1.֟VDI"bN"/jxd=Iu{3K~ƁULx8?QÐ罽 VzR}:=T>U>gRا*H/[0bIieGoj\6YRoɭw,}K9 +z,Qϥ>۸bokk-UQh$3~+| LB:8+c$J|G_ {+^ٌu1XF0Ů舙:l)EtÊ0NYɖYA6|2S+T^4O<]|Lw=ʻ٢{.<2DD}H.ڹ =(z$x޷ANHa跰s.Ɛn`6`?zdPgQ4&f8]ȳ`"Ƌsk!TTc۱Gʌꤴl23,k^dYc'8`;56CQя,߼==ykд9Kvqi5u0`Q=;Q7>+ ݛ1\\̷$Дf#RbZ&ZpYn7'(7& $%9#<(JH/(M6*A:dLV4sF`-~C2UDR8:jS[$GvHUYFM#r2NjjaT/ ]2=ni6}r< mAPBJ2J(W ym4=`m V@d؏Y ;Tlo WFTjJ?D")&q 쯱nXy\c;xفjYa[PS ^ |"`z@}\ڮgMOym A4HK" QZ$Ж$-s&2 քNΊ6Le&o*pۋn{iLJyS%dl`$n.lÁ5[1A 9yQ{Lm-4I2XV6D:|ޝvV?E4h@O)*K z\BAuK!̢>{O{{;3*e'[w9PxҘh]h?.FGŹ1S ӯ}Dyќi( }=5B++j5v.~5@<7F`c"0 RORGmr㈏t5UQ`J5ڴ+(_]X+UD*Um}4ޝ GA^z>aS!]IsoL +cb&1Uk^u68Hڣ>Jc@-5!5#7$7^lz͒g=]aq^C5:,"f6 Jw6LBŲzaC0@K/ ?,[ՌXMTZn؅*4Cf5c@1u؇šK/?kҬNC. ]ƳU]5 Z=mmbs8%@Ovu);Ƥ :}4w@ r'K.6B}EITa~p/]5$֬6;kmht|R$)[6in Km8ưLucM cRlK֖F?sEH;-`Knr%:fZAX{mMr?+ bV8#Ң $GRXf; ׆C5Ȁ^a g^481M!`Ƚvr0*MHY g)!=mC'`IdىQTs͞┞d$6n~Ε=;r東6zqw; RB6[=×+ڱ:>i΄o6nΫa$B/へ9]8uk>pxEY$FugS` WEUݝz30F[Wn뻞!J0חphN^ sXrN?O罪}Iн6r~CN,#Z|<40fjy}8缑p]+ ۍ{˓jaʮ{=1җ?dߊ/oU;OД=W46ܻm}薴ʭms3]=,uN1?3U! |9c-vlo'ND@}]\?LLw2??ʧ!~GtiSB9(.MA W>δr/(fBo\>7r7Âga1oW2!:g2R:e1F h֬ endstream endobj 843 0 obj << /Length 2454 /Filter /FlateDecode >> stream xkoH{O%ȲI|ȵ 2[ڴ8\9NƯ$-R,P$Fa?I@sN.})aČp:MKn~O QD "IBE\xw&W$R:MW%,M$7#¥APa#MMh+HkHJM ּ kNDK菌QrG,=fJn9*DYb|umk'1<}{jxg͟8Hn·z% ~#/ bP _W &iKK0‘0"}8-}F"Œ&< _hbGѣWpvA<#1x{ j"LtW}2íg<)Xf1{* K )Y4ids$!ev%~yAP-y|չ]>yNYy<,4Ld=)9]o҅8r'c`6SG`̲`6%_1ki,]֠1im: 5 ;V4ulgm46zo6 TI8/T `yxA^i1G:ViaQZa-&:ys=o^2GiTa[_ ;f mnO7ol_pmK}ds]gdw й8tC5 ~%nSs50'+=* 8+U`xIAw*;smD(f&ّ, *T.5⤊=܂j^PD)JžFp[5\C=\=8,ZD3a&]NS䰗7<=_&vK;{% I*%`\ ї.D+؜ "}k!i 5@'b`(䫛/8R gVsCBy4 BNli,UV긺h<.FE,[1~dkj4AxwWpY"I^~'[QXkӋՈ cn&="]'xz]7K<_%J.*"%(QC[n,-qk=YaO*b_nҞ4晹yʲ^^A[A--] QQ$T@ʌP+nmnVzMU&`Q J@ (<_%`Qzi,?(E:= S-:DV_Ԍ;RA{PF3̭7LCO`zpi !q?efAČnWor1u{rV˽uWs2)4* V Hâ 1Fk"&Ⓐ SQIa#uDX@6O gy.<&Γ:n[Cq-Zl)[sna Qyg~+]0 !h,סf0 endstream endobj 847 0 obj << /Length 2873 /Filter /FlateDecode >> stream x]s}dIBp7>߼ks9}inM9g㦙N'$cl@`'t&,귫O4^\ O~$af o fİkñ;3휾]s/@cn@`q ׉ɟ'+C^cZhقmv O_Ma/Go=2#,||uml2DA^,?#o'|!B'I?+.#>ޑD\2xc@3qåN+@N'a +aQsq T?䪒rqTA8gIL*?x}韄xg2O*o@"'{t䗬o".3gշ`DccJ_[`UU,c2\B&!'ˏ**fq`=ESaw/ҫLojR&:Tjr<|ԥO/Ȗ)-}ZdE\~Uo)EkpsVZ[i޹~mi9NZ-!vJ O=LܔXuPl>޴m>AMY[$,/MKU1ч~Ibtcb9z1 y](TŃ1>F\+QRu67thLBtg#J]Ww[-0)apSx^aQ71`+ pmE;^9ɡС2|h%çꭞ͚##.P݉5Q-)zp F2|;/޵lh@Pbݘ\MցJ5uuhUA`M) H6@Ά=k=J,upnvFCel0˰-‘}q8T#籧+c1RqWKr?Qôz)vۉM^ΩEyᇹq}ґ>bز=!I8yG4ŠDW;0{Uw+ǒ=6ls;atBMfy`~VJXfXѦ(Ey `#K"T&yxYm  E(RŅ0P Jiiȏ1`j*Y)jpºkC.^0`C$\0;\YN@Q9@jer*7 wGlmWs>%1oG[s'ٗ/qS<_R)9807$l\Kb(QأyV"%rJ$YuT$"2:Q<$!u-NTv:BO?Z 5q`Hxe1q'M\vR_R!n: Q.4f:o[%)jZmMY9(FKv !'T┙:3)2V|޶Dd҆bAbί݇Q #>7PQ]ө1ʹńt'i.45!>૩0.4vϷ5 H“YT~h¡S&,˷ە^ ;m7i튒. ?wA|֒br,nZ#{~=Y>զ~PEJA&@Z]A*hx詠^kn荶ٙ֏ԏyCILg깞wj%g}CF wYaŒBjy>Orm$D(0JS*qtCç6@TvNFGh/4uz4RR+%V[*5hWaD2mr+W1K^FtM&m!Iˮԭm`40)e4Clkzi%^t;6[ͧC(ѭeͽpB!P.MpZRܻ7t؏`h]3{tEU 5ی8>K#F<|ᛴ*tc!ND>ĩ(9 Q%rvD8# Wb`tu<C4*x4iXӱ/pσ̗ ,;%GJNymx {/>gŤޟf|cr0c>}n;ӱA1.991[Qс91BssbtV/<&~1#&bQw)- p9Xl^ f:`wY-i%]N&-!xJ\;-C1W4a2XHY䵞R썵bD5yՙ3 ~_y7+Y?A&O{YxaF76#Lψ#alF)؄6[H"m69V5۰&6Dgܛpٲ1sR`A̦c0 3_NPA)kQ0+ۑ)ڐ9p2wm.xA(n>C,I8KطQY endstream endobj 851 0 obj << /Length 2369 /Filter /FlateDecode >> stream x\[۶~_@.@4[$84yHBk#qJdwJw @֦3ͅ#aί7/7n9s|K*R>scC8?OpoL,ޅ0X$ˆ? ܼT!i\:͇O#{*jpߩoS|xkK b;.HR,#xY/1p)p.Mfŧy}B!R,asn0R|:b,\+0v5]<{qa4t`ɛM@^ GȻr;|yJãȕDӻ1Om0 +X$G[oqr?Ykr 2W%9A7rrHNX:%? bn 0ĪUL+O#YIϓw> $ Fj~N.Yܗ#5Cl1w{l7LVnkز-G"R{HYcM6@9Ahs `}m ;}`̮f_ե[`@|ĔטT(-/4a%'^ Q}"M[ a-.s < isk`n0͢|V^ʕK}{E4/Y{sÞ@y80!/"a}SalrHa@}_7-t<;mdđzDZ*F_Tls+J[+Fm^F?-1QzM]FuYȂB:HPp?Pq./fzο-#wU |sKE[-@PmĢouCT_vQ_:nO5ݻ+U\/y!: %FAUeP]Y_Ž(]d' .I#.E爎 Ŀ>SqlELY !]'F#ONLV,dk˲4J?b,(9 Zv:oRvw;] f ]jƘrw WxhI^߂SROpm/d*dݐ#Ag޾K*n;U69Ki9-jiz QJ(m,^\Y{Ij@!͗@> stream x[YoF~`(9 w_fZm8NoJHxX0f&=콿wy! %͝ǔDJpOy7kuK_EۻF`m.mu"?(#xŏ7^{SHsVۋ=XxO2ͳ޳7'fhPagY{`$ xe5p)g[{ *I+\Kt+v ñތt&.CB$B'۹btQPxyj! LAVD?r]#PZEJIحjXs-@wA0g3*CM\PzChHOC$HXD-F<*Bo [ۡ-M2!i>,Wm,k0pDzM&-`"ϝj}[֐` $f6$H<*Yr c\\i4 #T/*~C~Xȁ B*q~o$-[R}!.&}&b;{-~kpIdiKd/E}T2*c͐J1[ס(TYwHwf(g;B2;<f/; ֧QtiEcBEyhvXCQ𗸴:T .etH$"[BXb9 zj(==ywGUoKIca7tjsmf"Sag&dnlEOlɀJ^" c0Is Cr9G}FĖ͜Ш ͆8ƾXe%@'@\vbOX<)( Z@ w7˴EK^N($qI`7`/n`c# I',bI u/cq c$00`6#A~XnUfya%}v[dOB  K55vy"Orr! #<5^V^:${pAtLoP*n,j:f-tVif%cntO1+gCk2;2HPM:@O϶}l5`l?LNwǓaA;7p\H,1^>-*0>QN9As$ ):92:gfJ5.X4"nt: SK!0/qB=Evرeql{ FaG CjR9erYŢ<2xcxc $X Үm/8{}[cB*r!՟:VA$&=Fys5Qr6tBxU~8ݕf lSRD ijd _e,/F̐cP#kPXT@r_<Ƽ`cajj<0up__H!cuZ\iNl f8㜸WS 3;^[qt( ;QPUK57 A,s4*AuOy@nLM'#*8ulNh="5{?q|BAÎ, &@Y$vS{19BLz]O2%G055gt6Ef`*(h@UU< rSP ˚[]#[9U-n劉du1Ģ֛+~* ,`SgP(yoMbsJJw{Ql"=Aˀ*5u3=ݹ; * "+Qᘨ[z¸[)Ԡ7w8- l%8B :*% >:~1HX;cZ/7qz_>vk`U! o}tnu;MsX Om{o2HDmAaS7p*` Bp7x]>R9sbw\+ \}+[< q}l,/Z^0}/N.Jh,rNJG;ʃQl&ݪ;ig}-09C%m Õ? NUPALfeVQYݙ&$!cSIꞸshf;;Yr*.4DR΀6qmc@wCmVM p Bn‘u 9MI= Pp{1^ ܊O힘)l׫&1G"LBzW :T3gQ=Y*O珐%mbΝ9@V ؜T,_&- ܛ3?C3M#ٷz?R ~Z..眚r-ΝT nWOH`ۄhu"R0;e$->wq ǒbDNq+藜D`O+)P1ko5g;pkV Ш :/h60&=`~is}^bRcRG9 Cv쫣𤯎T H? DBh Rsjf!_y\b>{[[ endstream endobj 868 0 obj << /Length 2985 /Filter /FlateDecode >> stream x\[6~_E_l fy(tmMdA57y*I{x,MLl0Hs!m#}wgE J$Uhxx¢Yj|'TţYa~J1u|d^d,-3@Do?\ CX)ūp4"XGMůرg<7/ZMgfd L"1ӣvJTńEE]t6\W oy'Q 0( xVUMgݟJ' |bzk"nq^ HGy n02N $&%㌸2bQ}$ n~t&SݜB0G88& ̤[ pkjIr1!Kj|'`=`NzPgg_CWGu[sYg}v[_q]`] Knc>?mt{+:}+FOr r ˾EMNP.=CƐZ)ˬ dG dj*ﯳ" Bq8mIOH lcHOOpsov2cTbM =N5r 9()?C<`-'KvAƀi!pm!!8C$6$4+$`2 %tffCb~ $37,m <뛻۬l a.IHXDX0!*I΋Q>*,vkG 8;Y6 a&2ڻ6ߎM*:޴ MuN-=4c6g7qh'p@=,F N伟]ichjSRkLaM6*b%v!jJ5_ D_mF oPt0pl4t6[h.m"c(,lhA5ɨx˪XOU%)OKd;7uZuPp aUb16jwin:]=biT~*ހyif;/zEޙwQ۴x4_%* |ZdfAlvdQ7~Q];o;TQIp'$N#)۩cH?(XZWCJs`n[iLs왜Gs{ryQp59gz害۲VwY:vx\"QL後Nd+q봼M`XN`Zȧ9a G -_᰻02k6g+ [4FDەT sW;i>`hYk ++|+$ IהPx_EWd`Żcm?v 2f_\6yBeXmS'\p6_KM Ѫ}yk|.R8dU%Qopn2 Hffp*B5(/}?, Jt"YPt?4Xa!ѧx- ^uDt+ ڵwez"!g z#!4 SUM։mFHc7],VHP K:O7 "-~Y7x&?M`+#Y!WF["A  n e]ߨl^c^6嵵{mMiNr=uIgP'>ԏ O>NĽzVN 7X``w=m% a31'ʀaR iFZ̈NWd xx&--e}KSŘ'/W#u e>[hyާĆp  ;4t?';(:ϧ:ȑDg5g:,a0^d 8" >emR\ ,[n"!*ҪЛ3}=j$`}5[y{>wPA3 mf!͙Cћ2dʦ"ҫ>0bx3L:g]0\o2#ҮLDo|1nLt^MzRoi.[' Bon 'UV,r i6[3wGwkQuDu ;;\g2}fobTʣ'\^tA*)a3{ʠ> stream xYmo6_!`_dlfI`vM/Y~JAD,y,w)zqnZDR<=Gc΋1O}g~xG3G19sv3*cr&L0tW e#2<5y>5!v#(fH`Dg,'j0?g|1V=='Nu!T1&e *s6YXN2l$-U~Fj|%y )&S)PPVG1No@{W+/2}' ?Qʻ@/!go|߁t!"Jl*8vO)n#r:3fD y_UחaVM%QdxC!HrߪHèX*ί{rLq돎߽~# ywnbL$f|3K{sz6KپG1c&!8 ެTaq7[Vcֶ\X<=-l.#6Mt`7KnY-ߗ>_T2[U.}2LI*Z(  4n)σŃaB9;<^ii4МFi|GZ!R  5r\tG2I3N؃j2k<|ڲT˥ i>NzqM͕~)4ȠY]T!\aVXja$4RM$Y6CǼtϗb*I"p@ Em^`c>B=j+($CfyTtʹ,j6߆KUߥ}!,! 騡6n,1؍"_`$1@$KaoW૕GQG<שG}g&-;pC7(KCx}Ȗʌ)2 ,M6+{`m*븼R8m#9,L%|>aLSZGam2[/`xТ8*9"[ʿ"nrC3}_ڀkA1Xns7[549R6@Wͯton~%(UUY:oQDA uc- RXEUOBwLq @ B6.uڌ~AG B$%%!0$DW;ӗe[ | DM M<6Ju4T!RpJ.T=s P\Gxȅ8mB@[X\Ov_ߟvwBa&P)o:t*k!k_?`{ - X wYQF [+rѪӹ%уQCaXXZqj?OSFz!̀ ],5_Q/ cuԇv:p·yH6n]L2HD%jB |8X"h{5c:s"X o=v; %bJw x .XC endstream endobj 912 0 obj << /Length 2052 /Filter /FlateDecode >> stream xZo6_/60$%QRXӦIѦ[>u}`$*K$/>dQv#+!@DǻGZؙ:yu||sE2g~z^є!U\>~vm_ua|Ohv !n~aT [=0R/s&-%a]b2(DFd -%҄Wۡ8Y^v&pdMH |)Zҥ4狅tsˀ>#JI$M#>bP#xya BtY8eݮcЪ6NڰDd E ,Q%}"0jR>0\ˀ"Cݨ}_( )^!mIThI cШ5.Rٗ꺌Ψ'Rm]ߠ#Mچܼ?)D'XP_w<Ш`yrc@Px.{x+/ʪQp&Vn9xwLEH[HQ(ráv !(IW[oqc|Qu,Þu#DVޓI>S)΢HG(>P wֆ}K`ڳ{DhHA#PnPD`V#3 v{ǰ՝o &ӍQDVu".*evC$l& z@yJxԞ*7wpM<5 ߅ _;}eYJ6bL!h*۱8BFgv)#wg7 yA'a $kw C@eP&L4 *1=;aOΥ-ʪjk1k ľ\Ao7g3_Mށ8 @G`vMkkFo0\b*/҃u)fO)DFT`*{ jJ@..I$ij4R e+UMA24"qSVb&YP̳B A lQ7EH;EF\=%4W Tc<1ǥN3P[_mיɑ@+Q<_fy3ʊ%ѫZml=[805.gIQ .QU6:EJzeOq߃m( 9AHJj;Ӿne60ɣ. dzkkǂSfkX0{3 ^>>e_4WJ /KYp$L1LaUZi_P7([ endstream endobj 919 0 obj << /Length 2519 /Filter /FlateDecode >> stream xnF_E_(@Ǝ !-QRyk{BF]` Μ7_r(TzG)!f z&ScvsM(4ؾP$Fd짋w/)ӯ['#ޓٵ zJ"Rz`D(""-d]$L OC p8 ZZ4Dh7U$W )Ṹ$JxM(4&^>7,d/f82T(؉ R46$f Xeگknrھw2X5 -ln^:GQ%e::nڋʧ8K7u|Ө]cUTjdE\E59#4V"C jٵ+d֬]1)-YtZxJU.0&:7X5y\G5_:R(Xd*CxDõf{B\9ށԾ4Tldn±YmA}J z˾ӷA?/DN5 ]ڃ0uX‚rܗ|wQ!%؁IfC@o7sxw#ݻr@J:: ND8sLf|\zl}G!:m(#L}w}Bzj:OmCdeQ%92eA56Jzt$e IqFb{z؈*yHPt|RT&*Pcu@5X' iwļҨB݉+)}hp[8~W)%:CBBѝnE%ݥ y-ğܽo]WfsBh֬.N_ci-uT>FDMz72w3%6 i'7URؽs'8f՛::ݼCTC yJ m~Vg*MH ȸ^хA5f ~UO8L9A9CSL+V25qYGDل$XAhi]ɌSHdMղH9p('e=EGF:cAGU]6 7ldQ;ʡ:$be'/f"J2fgVzBq XG1fagi'?_biZtwCH;v@!;r,FEQ3`:~7vhf[y?Z nhQ'2wW A3e)xЬ8j|HWͧP ̈́PU7h蔹G>hO줹M1^?|0;knUJBa+e~(D7z1sf6 [(O$ tԿq̬/9K1Ҧd8a7jM endstream endobj 804 0 obj << /Type /ObjStm /N 100 /First 887 /Length 2246 /Filter /FlateDecode >> stream xZo7_r8S7Ew B"ԑIf%Zˎk9>C|p肫] tdYovSVCqXCuYqbՠrbGQـb]1HQHbv1fP21XT1v:j88F@q2Vgp)3ɱbrwG%[NT2x5aRJ`9j@v) pNT6$4%T4h@`bU@N:I Rɉ@F5<q(qA VL5cF@9^g2ȦGPlrd8\iT lү8"T^!M(xzQW2Uȼ+@KTk6aLc8Ƭjv@l9:źFF@d),&ëjԶۍv561hZPG(4Ҁ%^ f0t m@!G5hvhԼt* kL.E7%Ϯ./ߏ~n'Ow<ёkLY8\lt%ADz0l|q`b3D4.o&+5ɢy;_.vв9Y??Nm c)Ve!) ,¯}.,/&/WG2Q()yK?!_`Q,=wa۰Φ/'2|Dꥢg"5Fخ^Wtjs #urv1VOV̅se2>l5rFKiDR_/:,yp:Nw]j\gmG2atԑ}~,;Gy[>u${JQP 3 yνW{:9]>"yg hz$7HPC;xd8Jh<ܯỳ=Wӿ=>LH= \ Fom<ʀ҉(X &d(G[Ot4~z<^ApwC] Y)lBVzT ?GH蓅vnlŗm-h6CDE0T<+ʥr )< ge\l"dtrf?MbEJ)!"7c'g;uӎuܹ7P/KeGׁa@}ԍE)/ Ypv#S2ˇj#͛0}K**']9P9Iϋ;^ID?^TSڏ&e=~FkXזF)ݨ.QCKq^4H·;Uţ]?R>܄lkarUw+uG9?H[5RoDlt|wvp!ք_'FtޟZx_s3GM۹3 /Xۡo+z+mDJ:gXAVPiO7s4es\{5 Hy5Һ( g^pۺn dzq%wY\HLD #1z(7R.3Զ&w󕞿'&$_B!ω}ȑpxr#TdU(bh/r hPFKLּ O<9 ܒ@N&{^ľdENyr`Ӯj/rI0]j?72J/r10Y9G}Sk}b b_uKPK <o$BETP+^0(joQT}>郊m"i%/\_Ov$mʗ.v)FW-u>+SD{~k[7yxH=iBt<}םeOoErUo\+:Ƒ5{^1{I{Ce@4^sB[xӡ}^z8 g endstream endobj 926 0 obj << /Length 2705 /Filter /FlateDecode >> stream x[۸"1O$%J p.A^n臻Ckdɕl3AYއd[X`Ey!9׎9{qqk_:1Pŕ '#ҹX:?^/\:!)fsIi&uJ/)1>⧳Wg? s8Yb}oOd97Ut3ϨoյC7BIJ/Y%#% 9 %4M+˧bdaٔs(v"p[{>E^mjo-dT]RwF5uJ+[40V!ذRwԛ+Ag1s6SqY]9ZpE\19PLs,9+s?ͱ ŢksPqV}#O'ЙV2lq]w;5 GZ-{r8Gqp K #_~ۗT'U~k("wnezIXXpطy@P"<j(!@uF^fPѣxx}_q{W"ܧqtoqIt\J(כ,GgQ7;U͗H3jS(6GfPN#2%ɱvsH,q 4yWUFW6"v:a48ID1 +bT:Aǝb[RTӍKZvQHmeh|]õHi+X>EoYUZo,(*co3+3%iW5* tI(]LvcJԘA3gBdUUNju4ha3r%(~8hXvytP!)N;&C&:IУoQǮ;D3zoEeutABO`ߏ8l#b cX3>߿KUxaY  wsAS *lU=LB+>#NGkeLF7lBP#>?J\lœ @vW/ZwoX41цV1?' 2zSߏMz̐&q=!G dpU cw ?|wH}Gf9߇ԏaPvGtT !88 |b7&~|eq.sڬ%z8#Csa0-]D4(;Hȓz\%Ժ$oz!%T!M'* I~[m7H:-pg\`^lW&xJ?"B @ ~j<_{@tPn GOz4\0$ɴ1(r|i\%>z6[f" ;l5LCYnb>;1 qp%f [ 38&a)f±&-PͶ*] : ⴙ~ۧ:}4#,WO-SC`->fd%! ] )5tp:=2aptB5'Kq~˄47BfB!faB֦r9aAU|CA%mݘ"]YA<)c$\u6ҧ a#ㅻLAP+4 &`waU56Ua #)303)`ckh[N(fo:!w+9% 1h 2C̰D`l ϸKa :M M_?luR -M`maYhs[q4vk ݷ%7E< krYu7TX du L:괟ײ\?cDkN{~67AL" ŧX ړ3]5n 03k0{{C^8S9I{PUilHXBY,ZVW:ӧ;ut endstream endobj 932 0 obj << /Length 2583 /Filter /FlateDecode >> stream x[oFEP@o.56q/"%&**IE oI(9;1fv;{'?]3/DһX Q pxȼ4i8oF*` W,~P$Fd?O=XsO)/=X5TyoNqJҐU"aX1FDO`?YE?|\F:X}49Jj'̑/&O%{9fhBvٗsҚ#"LA*IyP(O܆^{09}Nt9!ئ\)V`%wS,CHy:]؁Vp1nRn,_nrqvH 1%TxwxHw($ #pj*ؽ:/YEr cNQ(6 'GGk%\ގ8ڲ @-W W•U4`F,Vx u[ҧH@0ۂŴmHғ;nc$;:iv-fYEe?p'pm{Jj_f$9jX&zOozklq짛pњ,Xh'f>B∀B*-4ʡP^T7% zVE1) U /U(}fY/4w`SPYrw%1<g+_Kdјa⿵kW{{{8Ch?g.$m} 4@ ǍWxr(VœTst$s̰e4ji&7"N}ub &s}RG,2ܖbU=M9,l"!{N  +ceHŠtKu/jRa䎞 h]'Uen?SW4]Yj҈.K/ kYl;0 ay޸,d:{_5ogQLte )Ry~n/#7>f<OρPwc'ʮsƹcjH*#;4-'PE-f!M Bn9tsrҖOlt3cq7gnE#pOCϨ`B &8(RRP@^gIQ-YRVNcC ZԁŃNU[PS"xq$߸#?otTt%=T珖a6]2H6~n$XKi2Dp1~Vcb-ءVMmf`]-[BRx&ݭ.mI؆!S D2ґGXLdYggDvU~M4BZW&+'"wo jB?s,Z,Gm*i:Gudzf{F/ &BB`qly>|2C"l7PnIxÌAix4pjrt30*QJo̙J]D* YV)[Z}Cu?1ncQg%-%--ԻX5(2 4+ w:mj)tLf2*X{U]br2X&,t531Ŗz&3tIdI6M<[f QhS<}#q?@I7Yy6{Fz2'-LY¹ |],`n#ye8/i endstream endobj 938 0 obj << /Length 2838 /Filter /FlateDecode >> stream x[[F~_&/7]q9Y{4Ja5!=Tpi4$]S5@ έOs;x7^ཾxqy+F! ˅''XXL˹w?')[) sKOpox'3\囋/0 ҈̱ZJs2[eUlgպPϓ,d*5?WVI> j sth6iVv|QRw-@KhMoӲ7u$ 뛪M-a7E[M `VM1F1›dBӄp?y?+MS?)|,Pxk?#dpę0F'1 >LgXD1b -`wiճsDA?L;)QE`ÐYO En=eTUԐOBqb9Ӭ?4 /<IFPv}- ׳Z{>C&9#Leu֔ "[2h{RV0%  T>/e!Ŗbwݎ`S 1s'Ĉؐ>լ#'^kڢޫ:c^Cd(ab`VHLV.p= .i?NvOG/CFZG؁qH'ܓbmyTT?\]/ gvB2C ~ W1-0MvF4oP7bpDxjkS~F˯?}i.޼7Vg*]jo|0Cxd=h&Ť[Z~d!͂td,d-r#ΧﮮV*~`0i>2+7e#,&w1v cf*~bܢ2KgRjOzI*`SgmL1hz!>RlImZ'qZTQ!"#˶ ۏ̓XMkw_]ƽalϒcY}1 \c)L>l BX.HK.i qQGA"@<^cbA4{Z|q8SAݮ'v}p9y`_!Y՘?AQ0PV \̠vJyEAB0ø*8|s- %U4.BڛP$4fZ(u,Q[؝LC8xȫ&+x_PS$OHy"X $)s^ ]ϷF޾zs>%$?u`luk(Z]*\``Yl֏VHі: U'C]}8_/Q~&f,nE9A:P,RCh9#Z߆&SPe2[Z9{\5dnwpr#edp~uҵ_kO6,/T1CJd)K d(C)3c-c $>g Zuy:s :kP̣<ݛkMye.$3ޥT[^.mi:2;/X Y 'gA#=^$8֛ mw|+ )a+4h!|l Տ .$ 627"QJ N)_>x8bp()9L~T9cv<&?c8 zL7y[7 6CK;DUK1 7=y B0.~ZaKTس{,RhK;tͦ})4 0)!H vLDye̫܀4syYzZ:UU.5fa̫TU_n$:`XU=z4uhfyQĵ7)x,`W6 tC@A51=l 饈#ġ Xg5)v,)%R OBBL䛒r)SKJLN9kE \枛U!8*1>I憪kϤR&~5Xۃ,-@3O=hd`|/M ҬnƊ}s1yG@ét 欄CrHk$(Bg/Jp{,jjLؼ]OIYh{qoƝiBcZzUR͖0zeI7幮  c?ES2mKY]:zHT]~e@]NuMfն 6MV$/۸z${Z'\-f s8/}fm)6z#*<2^;/'ct8iDAT=q3hڱp۱Ҵϕu\ݷ\o3m׶\/6Z&2Y"Gg_ ~$pZʜOdS՟5RURMm&> stream x[Y8~_y1Df36&=dPnedɑ%Im4U*H.W gA␆mE,^f|A#9jI9'xI]VdI#2^_}"0HQ Q ]]}Kh%2xнV%|\a+Xe2FE叔 ={-V?T̒:On̴4զXUnjuUնC{"eom(v-&_3q;7rZ$&C>8XŌ N6f4ZQ hEm Ҧ՜P:iN]y޴:-nʴͫrL@moܜd*/O^_XYfGKe j|2<>0<*BDⰑzәc1,S3%d..Ӕ*9^&mkC""qϛ&d ]ecL8MEfSH|lM#LH%F! ިvAd@#$cYp fV$"2*,D ^; dH `aDnZ; x[>E(]&cJԛܩlAhj^˶#wf>kGfcc2U]3ѭi WJ!eSf UMP~|C|ǐg[]S/'i&g=}MH xwKPTka*7P= :1N9BPm;5hF K>q }sjb!bIhcӬE%2m^&s`AN?~mR~mNYHgwYzP7emʪU^2 Otdk}zxmf8z7yD➤Jћ'uO_->qʆT!\pACZ9жjݚfUoإ :t x"ZUAx@8m$fNO;ټ <*jf2vjTY)YRU5bez͓VTT;`17JZuer 8AEߺjlǷ;dcqۉuU.MS۽Blߒ^ RLZS(2"1A>Mp̓Mm[~m]jD3|ƫ:ʰ/tRgɕ,y(ܠf:ڪDo).*t*[҅BE'S(9Q+4IsX0/1%Ayw"ot]5.`lB*A;gA @AEa:0\ ;&Ϫ1] ;*Gm/ IB Z\H:-Q aUGR\p::#D/>p(>}@vюJs=$}G4\g1? 򭷕[?BdKfNF%CSMkZzfš!쬙1,.Z3cT'.8Z1MmuɞBNy'!VsN]gk#:S#1u1I~3?Z39I^1<4'CshXC""vyZtk*q/+vu/OC.x nJh7kLمWʪfﺹ{?ƫ<kv1枛O9”|9wtNlsH:Y_1&Ɠ)"%!R i/#ؘ endstream endobj 952 0 obj << /Length 2872 /Filter /FlateDecode >> stream xk6 7y|mk.bӻNei++oEIaLpME)J2JhpxʢEvfMg4ԪO̊)MoTZ ߯,#bQs$޾0b :B˜G^ wG&đY1efTSO]^ؙҎʎٔg f2;,&kvV%1F1,gU8.mT ZwB-"eƓp W7}x#M} +R I汞 Ci"#&yTh 9#Pμq#Hw#R$qing2M=h!JW$0$A1i[$F4]03(NcW>M_v&0Te4gzٳLVБ8.wx,^h0C\oBD xF}v=:̉N=xG tYz8JҒlq%@Gڇ\-mV8]Rr(ymjNˢVEJaf@jM(_i Hi`I`F27cRn~5[3ijXMl֪h~#ĥX?'êU YD M$bAS cf#!BV#)XEJvޯַgggsz~-XOeeNcF%C}) \2-uSm捅m>=MC;c9-1Xz'ؕS89vqzE7qN>!")HZu#2baX0I r"ki׵K}uDuڥA2ѱaOLEz~ߔqixhgƴА$pou:.Vt0VZ>؅d F+<kkfi8Rx洭.>}/Q5ka}M 3vNYk&!BDOBռAå?BLx'7i gnS3f% No͘FۍF$m57bJI,n#}&D]zlSfA2p plr9]GW[Yn缔سh$0uʟG^ j4G}o2?3zqPDǗ)P޳VՍ,G/+0 _:Xֆ#p^~˞{\۲ǫ衶$&1b$I!Pf)|<‡#@ 5#d_[0$G>>- `VSXNpK-vr|> stream x\[~_!#k2W^ai4iM4RM Iew̅(YuALj89sn3Gw#<"8Wo~ƣ7ˆZx5vb,ٛW?h7-A0 g(]8F!A!WsEA?WQ<\\" ^R^U~2h޿讟zSbx7P CԏLǿ{ip#|xb|ፊ0ļe1y- 9Uy+9'(yaoZ4}qH'C^ OM2,dJI?РK1y /z%#j]m0}NKTؽnU) )8n0xRdV'Ir! zTh`+Cb&Y=2tRb82N ޥYioݳrN.Q*F :VGg}MY>gI }-_*v0:I A}"PhޣtтE>+dZ3wI #!@Np.(CQCƝ14At ҂*lU"G &V]d Yp[i*WY*Ѷ\ٛmmZ&vO&caʴK7Nm:gfMP637RUZJ.k YmaD 1.﹍$ޖr^h2e@RU]JvTDqjQut-Eej5`!!4 뵜Z7 5`wh]t`SˉAkmkIdx'DVVCL ?ݼV\0tٖ\ AӤ<-@# o8_#kSr"Yˁ`Jm4JřjKA(p qL-`t< `m:"h|3 q"SD bXK󶹵 %O=T.CdJvO؎kjFUݱAIxm./zĮ-ͫj=&O]nm4K QB}tx8P֛䱏6+B@g8[ 45Y X ~{q'LHw7Ppc%RT\@,ݮg*/*tĈc4A7 bat—XC'}e{0^4$C/<\I,VhPӳ8`^fhHQʅ,*)`={Hy1)|~ysbg "_NQx})~b]'H˲`}ogHsqCks97 4Q {h2C#BzNSp="Zz:eC,MkJIӤΤAu螁 6g>G~U.b%XFZu4Qkdckin,w0Ӄ^yO3U+',: Tmjδ1>^NY4cBDxd!" \rR8;. khIYfnlYGQ&(ɨIyvqR: #yԉ}^mBG&b\ cn'&e>)}: zsOq>0F0ʇ,,HH~xq&f.P\Lt3#zKfcw]4(@3r 4p#-oSӨ31ogvR7 mrUf=_3XhF~kWCnepoC0 0ȯ3l`x t5E*<&5]ΉˈUh\.! Bo"BgA7IPvQ/ȹ^>HW%_cʟ۳KzEד><I )T;v?܏Lw܇n vah28\1W mYޔOj-q=\U Bq?k*zw`ק^o)eZ -_ch qU.Q6:]e=Nɗy_;\:uϴH2UrIVsY][{7!㬷fH:gsgN(WI" Q8nU2h|ՙ>HQeSdp`%\{~Sl ^T)4p:IKM%/i?e: G48/]BG!"#-JU xV+DtN endstream endobj 974 0 obj << /Length 2581 /Filter /FlateDecode >> stream xkoFT}on]! Jm('RN|E>Iy"j;;; {~:gBJR]^y"w9׳h4A+k쯣;;:N($ˆ_|l=bAs޾ 0b*>Ys>SٿΰCDĈJWI?6_W`Y`)chv{;y'E3.#xG&/.`iuSb5G`?nx?؛xF֑H0"=Tzh{Wp6<,LʞTcȖ݆0}Zj:4t(A(oRnfz7dnk}a}k8v Dnֻ ƈ ) VpGCܶ>فG ^p7nC1&(KmwQDu0}OjADѿE#JL腩;$788ʎ8&+{ &T!Bw}9u%AŧW$>b9yc؍h#QH'Wߎk@OٝITP}l}ZE,@18 ri_Yinɓ?Thm({AųeI0dWȟU~v 7γp^7@I'u0 :VАws1.9)z~1p"3#4Z3;HGh[8ێl"%!X+}΋ظ 'rNd(fhZŀW&evf-t PcmZ/7vQi.^%փk6w[ъ5E=*Li<ylǽ j,f:;D\bBhMV 85rd%wOHv|[tZ|j_w#DfmE5Vd~EVB5릓kӆ6(E_0 B`o 1jfkoLGcuĈ#ƫ?F\w̸˓lDvK<\In]4lw)/ %n8G l-!5/_yVs Pn.uTY<- <|7e(YYh[nHYf<r%9$t'r|*| C8D5v# -GqP}F6Q+JWdȎ/ũMQ3[B 4Γ&c4L(9XG,ʣ}7[~GPqWy~FѢ]Ү3` Hӛ8odfJ1=ف"Ƭ8JIgr{T]C咴+4M.c4( U'h4|]ȕ7c{Qw[h?pAUmc=X6DVצ~x"A9ZtzǢ+FKgi&*wgwa]i\rD+q `',Q! pLYQ0h:V ևnop=ab|sf[4(=f1u`h+i4bbO0/R)RLTLQqen&uqǷ1Tz?/53Ot`d6^+h%[ ~VA=+MJAGd:LRm`~ 0,xeg-Z9(AhÅ/ot1ZnS~ D9!q8FYDp_+N4,KZvEp9[ @!T ^8A7@U29# u_R 2`<<Ӧjh0e[uZ,7F՛I6pPKVBVK0Oŏ> stream x[K6Pl`%)3H 3Lm[XYX$% ԔTU,"G]MőDRP]/8(,JXyiv'4IGcGY|P*eH y}~8"QB4C N/8FL'2b"k}n*HCVM`ĊQ)#SM1a"Zw k$I laJV {V%QV俫}p󼼭 NȄz7X)=Y ,Wker"t SWVs&'H 7 1B<)El [=C?;=Z'B?j 7_Qꇵ6bIa>QN= Jbfwl4G:[Z51S07$vn4 e@[sfxa>x,[T[6/ O*K,wl75ͰV-v| E)#5鲪rz㳬es5+4kx:͸ 7q{E{7ngVvzEjt#4SYsǢ!Ch2)C"#fHTDsH,@gIdF4AZE H']RIi&P3xtS٥u`DDbXSX_a_I k4GצM4MY-r\ C.*A?zylb 'ݩj+JدE[AX0ڇ!`r<҃H$\ti04" Xk7AirSl@)̧FxJ>ݟJD0;p\m m0jӈ,M>;l@˰u5 #Cl80;[s{}m/A[o$m>d H6Jj?GU)\8h3cqi€!.|JUwhl~"" Gu+O( 7| ["{ /2Dyc4g(Yɍ~{O!.KC}hBu`Ґ`EX}([ hM:/Uݿ8rK {D2 {~IwR8.! ʃZ`}Q`)Kqd(f gwf0ͷWkxb_CG bZ ~XXĨf( r^m>$ KL ޺3nAnt<3_\0nR_X8>?xGgird8@@7G';x%0J5(S{://t?Kh7TK~m3$ eXD{-7/B@@yl9i>RfwJ~Z ;=.oΗUnLU/`` C7;zTJmld{Anߙ'vRpPۖںr5tg 3y󇷭A/g鳡>2+(NQ&pխ|D<蓄;szf7VgP_CAuWa'Mw"lH KҰ_O92s;`qN'-^\ײOHOk|\}B:JAi19!H֟AK}} ¤nȽΔ+ڦIٻm-lhќKMCmֺCƏQb0~Q=UPOI=-5 5C E?PjKfyv3P1p5jJWKD:I``3B֡ endstream endobj 1001 0 obj << /Length 3121 /Filter /FlateDecode >> stream x\۸S@̐_ 9ᚢm$BlglwD=6-V4M 3oGD)Jỵi$HPhDwv 9FmYqKh_؎\ee?Ĉ#w?SX ,8"TFf"\s vl9'z4't4 N]wPl++eaY^x/o[l~Z2%lYyQ}6f×o`zRc <9_f^xjSYlΦg2].VsPE5}N Sf}Ati#Mf9p Ճ_2Ћ%-Dѓٚ'Yhr,R*6: {GoZzJd&`v`>YRiEd}:Trf*L*Lv̪V۵TtQ,?Hi.dZAt\ԓ d?˭1h `7jlѣfw -K  [0ZӆuB;(1?Y@D` uris0va Om]XQc#dE@@i⽔#'{b=Lس0V+UlB`rY k>lϽU1ɕ{*>j9La­W,YvԼ2+&s0G;.Dzl' mclz.hi_xaJd~c&0gN nq916SRRv9-*Y7 I,߿OיVk߆Ԃ-j^:K9_MB8# bzEsܠq\Qtdt ETY!m%dL`jc$t;`"+3j *瘣m6ɹՅ rh]_Xn 1oƨa2=C6"EM]N˘ =I+s={̠{^Sg%1bD j OK1259u:l+̤$xøI Xʫ,U`4yD'pbd'HVAjxGgwewߛأk-= (ƕ+֚\e>qM[у*7vb(e;{bdvkNEirOeVQU5576Jl ڋ[DiIpmVy @HGjI7' Idb8=@LH0Ƃ N- Zs5bMkYN,GkQ enX8yZn)M^YbLE^ԵvÞuQ٭~)eJL&M葼ԕyq" _zAc80ܜAqcNM&aEHR m'ûa*[y6?~8᛹VcqXYa}$tt#4Zž\_YHx Naa NO+|p󾺄/[H4jb ^Gq: UU1SuNr8*,Zq.zNB1a H)u6]U2~L.VybғC\+0_ARE:*ĶL N*8rD g<5WEf"6+w_h~SY[}8yՖ{O:TƝϡi1Dj&A%|[zJ.'mE=3ΟǮHT|h{#dyFPGrHk kCӲriӹ?֭\V:r.`îCU4*W4׹e .U ], B/q3]Vc!rVT?A…/HInZk |'(7AFEL3|,[!$-y~̊muSs~شP endstream endobj 1007 0 obj << /Length 2688 /Filter /FlateDecode >> stream xZYo~`/`u1oc' &3_f-l"a$d,K6!0`Rfuu_^?q$( i\m(v RlV-28gRjjDݶͶ岶[3$尶0MUq'q^ɝ4۲2ny5hcO 3DEXܩ> p7c)`YHDܽ+ŧqX0 6n_kbjHNG@7XDDZd`"kٶźbb26# 0Cpһtc rI}Zl:0;c$P0bnfG< \0;Q֯yP Q l~Ja d\qba!wQ'롁 D#C?a9_49oD=jJ> l$Aa@o~_tk>[xg(a*S*xDhd49ogȦ|0 (+&!w{/'/t3^ 9u"D 4&tmbI="q| A!C="@dpatidlN.(Ҁ2x3FG{2T؆ku< Ί8L:1G&(#GY ]?:LhF~` 8(#<H#?))̥r͛![OzHr? p\Ӣ1:eET @Ǝ]Vr!D\G\:7ڝ X qDF?2 Q$rfCH5 N< A^!SE%r:Ǟ |FF`3<`J=DGd 7'#shX&ςr&0{9(GnD]FV=X;CmU̴ H;-27rcdД鐨%g:2\|Ap Yq3xe6w 4d [<6G ,]Y mN)L"X܈oRmڍ=ߥE1ECw8g #,PnÞnW9) O#zFٮۭ-Wr-ץ&u W U|}P\>W1kDg6@!@R6`3-nԁ@ux3F f =Qn|bhʞm"\7YE߽]lv3-v'X|hulkC xClȄaϴdTӳivͽ9{Ŧ5ᡶI錞ۃG,j6~߬ fOHki:oHXm]ٳ{KBȐ,~4S\QJ;-MZr|+ww/w!xкl[ZJDpamqoYs ;֏rB"ᘨR(!1܇+y*񤅾UOٗT't}wgLm5$3cmc:y/ ;,;dqh Ђ: tJlV$Ll6> stream x[o6_i*R>^C wPHZ; 9$j?+m|Mq0`Ih8 3΍;?\ KB:W+'Nb%st޹7t6Q=-fw7i~Hk =#W?^xA+!Țy9Ż yPTk1\s痋^ZL` I[?=?p@o~CKy6ix'j%7;sʠ#}+ (DFD-?|VZ49-Hl ӌnZeu.4&h6U!̧3M$kdž4+ke?bZMVj\ 9jBQ;ܥxiGes+lH|\7i/埜RH-xŲ0|tci_ED^̙S gVͪǘ4j1'N v2mq!02i CЋޠ9{Ly7}I3yz y+:z9ل C!~(nV˶y6鉆R)BJYЛ'oM o5 RQRl '%F; N"`Ko. g3^|)Xj7t-u]YF~(h*/$IJKbXEܿf֟ N#6J>$ÕsP AqPVS}AK'JOɪ&􏔔Yx5[yw4n鴏^|~*aΔVi^'Sf>Fm~h0d\#} :,LJ~ϖS v\oa ] 9;XnQ9Ľpޏ^hr ڐ`%{$*)^odV )W6,hnenx+.5՛GhrTґAQy6G%.oΩc~? mQ/Z*enՙn!^v'ztaN:vYb>ԥ*e=qJ,Yk<')1d,T\vH!It%z꒩E{Yk+3f'm15_ zlLӁ֚k Ыɗ[ZH35 7iUQ4WoӅSvXȋh}a@\%z܄}:j8"X-[MocV+c|#twdJɡ1اbu<&K@qUQUVdؓecѨW벺VMIz̼=v]_͖3cO}[284LxdNB DȔyOz9_}.Q}NC/]cDKM*WY]a~UEA=D endstream endobj 1019 0 obj << /Length 2833 /Filter /FlateDecode >> stream x\[o~`J al%QQItHZ̅(&8F &59s9߹ޭx?_FEfP3/dz7 7vO$ߋ$7wx)H ~՟o^ah/ P|s_Hz{]k1!~UUP@Cf֩ yQq>ҿm-fs?. 82'"`0$4ȝ*g!LB(=,`'T%GW2.4nɧJf#O32+Z0V&C-v }A)Fbz!&hr(ǡ 㒝b 󚦢9%TZMʱ#A=\0f5?8#}Hj--𮄹#Ĥ-=VPɒQ\ ѥE00 AV4 89 bopu+fe\aWP8%]uxBn`ZG\C+mpb@]NEԅ]RvHt˻w_/ _V/y`|) BL]w%8xBN7Xd vMlH09y?tt\ޞ| *.<}:|olЩ!|T= 3O@'qފY5C%q2(eV%yCQt?"?y+(׬ 27;v:cԘ;_ W\4a<Z' ɔ+-nu}=$ 'Q $̳V;Ĝ>=!!9 .V~&ڜ;0 ;<) :~;;KLR>r l_}hS, :73cEǙ'͚~pȒ|<hEd.vSJ ;Ol5iLdަ%H0U'\cn*Vz˝n: =*gU:WC$mf*ԭ)/72l2rG:+AOnVz\}o-ܦ?0ALԁɾPCv}Ҩ[ ƃ Dg# Ѝ74C$>5wYp0;kI!Ppd܍ 7e#lJSd+xdzK?/y",P#_n@Mp>v542O9~*0D*D &F.+tN̯23q+U73}8c<և,}wT zG ;Rzg } 0{Ld켮liVb GaT)F{C>?C s=}#[3G*ǟ<UaGu2BytCi/ (no`k Pw }4&b~NnCsaS X2CD4.4xB8 8!w#êȞ՝> <Bïzz0mItnU"-;oK@79Wy֋Jի.OļF&ѡJ=k)Vpr-MȓzM-\lzWN1Yx.R@k90%o`Y!7;C}GIjpA9yx(٦R0H}F;7ո|)x;W.Hh`Ml],wksqErqikK 4sP'SX5}0rC~1s~c`4)_ &ˌ@")lVw*^*x>he%5j;:dc3slD< #_AQYUlU8&}P׹N+cdZE.gS endstream endobj 1033 0 obj << /Length 3024 /Filter /FlateDecode >> stream x\[6~_}R}C۠)ͱʒ#ə.5Lm )΅GL֓`ՋWW_~$B bf"DN^&N+5N_:wU:t/\KhUh gWW0 L#͐ d`'Q8&Bx&~ <}'[iA+ 4#13gH zrci=Q@y,?Y5/E4 AUpWFRv] ,<@Q+ЁѨ]CM7BL5ůz;5bg&Qo8tFcrm*}pY*Z楙\g]((yƊn΋vT #Ƀň 7 퀝; ho|>Kv=>]{jqឿcvP\:=Y.w?xVPAFtĜ`a?}J2%<כ1>=09ƓZoYfG HunxOo[><<2N:f=Ïd(lqlX@9#LzkaC0~ uOc`@j''NWq.ܯ(]IvZͽ{n a>վFNp"{4/ذ" {O`Mʏ]Q~\e5k0~DWZģIDB& zcE9֐|v‡MOz [NŹ37}xe:̽xvcg;ƪ=wq(<Vx!R&!^`~5}xdtzTXHXIJ[(F20'4f ,ԃd-&D;ë\maM tE$*?Zb{v:Re5g|5FnSYTBc+W=Ea uY> ͛,WI2@r s:>-՝+Cg_hTW5^7Wt(r -UZp&8)F6ƄvE~qƺۘK4A |ሆ:;8L .c"Cu)\\b&^` s8'9GsE?z[e:Ʃ>oh}83(({4jG~1@ #0X~tg9dg$tϳ WE 6T< ؜~)e9Uj>3Z&AQpEiШ",C$FEip0&PHXQy*}x4s.mq`XwV-7z7:607'7:3|B{T6˴ˍ3)v,-U+kQpFj"I6Da7tu@4P L+x;l r yiQWeE<[_Mً/;_҅ꤤ*ZiLzVTA(Ud#퓊z]++fR%.rxQOIa FD*SJqĠR pNPϞ?y PTfbg$!߅9 f#D Z[ex~o45CZ5a(U ]Fa?{! V% <1<@ Kb0Nя$h{5@SJ\9}"3 !Q*;WFֹBqIY evwп1Akexj/SDܑ|~f7[t6ɓ2z663GjkHۧ"OxU}=?>0}.vnzGXC"I]ptX_&( A'; q$Lz ܣel.X֐`xeh-X!ӟ\zd/tlm&7n*vq3_7G*Ygs@˜w_v <.7[Et+n@9dF+y[cJoRr?4\3S[ksCeE2}{<ô}2-*~<`Iw{ڞ $ɠEJYMy~,\'UQѼwHTϤf(l#=xL(-|\w{C?|*S܋% Z KOތ,B&H#msg+U>Vp2W[Q&}f8-; S˯`hl_$mjuވjCw$&+i79& P^ C12 Tř#`&\[ Z#L=on\> stream xڽZn}߯G+=]U}0 [Pb  I|L\p9;kq.DMlMwuթkRq)'G*Z: EkvصDrt)*}uBEx:"@%aP 35|SqA(N"RR`dGB̎X06md`70HXkTZhJ&~VuB؛fv`2!*si'Bsr͗Tل\] 1P٤(ÜS qc &R\,fSb1Ib`=b2ƺ^MCOL-D8% ШKRh[bRRm4Px쒩CM6b kV8v2C&- -03(\A@gĨB&IDjhaĆ@⊴gD[rfKeWڠlVDLĮ02W*\:t1LY`:3+ޅY)s3(nF}m٢{sgg{kMfpCdI#@Z-]&H H(/oW/ܹ~~u߹~2>%~\t?ܴݻzuin~=yb{XBx=뛛:oxYkauyyۦ_ϩ3BPI0|ru{ea75޻Zx{ᕉ;7؄ 0닣tlVf>Fǚ}ёTW7;hy]L I, f &De ,[z׈qIZQ f *>LȣZ|Qp#hX sx<#7^aAAM /T̍A~ 1 !}k5ϱl𩶑7[Sasm$qj mUgUVG #dd4#J{fbTEܑs:A\5UM4nd~nxvǥPMFMDKRy7i~n۬+ + 4ь9(MT3/殳&GBo4>DxW$V%*`G%$Q@az0YQCNwFmW V]Tԁ[y]"@K xEGj^m}˻_~[\zZrY^^_ojP,YVT|3O 3v3,է3xdQSɺ+uԡy=dGkѡN'4_&>ɨ Ldo']^>ʮi~i;H<֞b9%i'> (3~kxuM߀"PV$Dx^̪$>0)yvJ-/T+CLJJ{lj< ] Iq:ON QҬyN( LB?12ЈM?j^":3 q4x=G$4N(MY:w8!9DY:MӭBXE99m:嗪ʾ8Nv7S~ A|nÔy[o'0lay ޛ{ci XKS x)՚eرjč7H-K>4#T)&q ҳ!!xNʜ}[pLpaWXnA&AMcsFF H$5BlQ}?GV MO+ endstream endobj 1056 0 obj << /Length 3387 /Filter /FlateDecode >> stream xks64Wě\n&mk:}ܵ}I;ZmQBJM؁ .d:ZN更\%l)1:{7y(pa(̸80YPk!68=Y9:g+צbAJ`g-b}rD@(ǡ(Sxg+;$)lWټX17*vjO;TDϡ h wG| ݓbU$j9ɀC$ꐍp:_ۢa),\Yb2b ä0)VRH A /JT)7R0B _K V8lzr+ y t@!Q3ϔŨc"#\I̝6y˷(->7 WFv5djh@%t'O^9dn`4?O])hp%Peaа@lŰ&4E jG4%dJPΎWS+/fÄIK1NP쌳8;3Q&~r 1@]pZ[}AC3qXR{D0Wc4 `pwGK̩l~*{a~ v^aMsMTn 2n!TzcM!@HDYW Zظkl?JjrmgI!hI ܵvT9Vy+߉%e3ߎA򷻐l%V-LLX 0Ll./9v"ևOeW(3c7!E Ù25HG'4C9#J83#ȜQBtv H$~tJ6!"qa4/2jC L@Ƙv̒γMM% lγy#̒ -Ɓ v7S%u_׀/ lcL,.?InjЌw\D<{P~x̡AǷ>?n [Ŕ߯s%&_o~j' L CN") 3ޏGc`> E!GH!g,= tn[ܖMzS%[_;1Ef\\g55i@Dmfh_ެ:n֝]LZlYD\'ֽ'E)_kXY$NV(HldpN` t&ewgbF'^w-yߢz@ K쑌DjCXja,~Pd"n4 Zh<(""CVZͲߚqzfE4Fmp.glSYDd͓Mvz̙p}G~:ifα%uk$W:uM$E5-QfӍZpCL `rOجT܅}ll/PM.Zú/v`a-KOi2)5̂/]-40{-s`«4)ן؆gwt8Y$h,y?08Ъ=o@-4 ~q"KW l8pl=v=u<+ۆXʮ?b B摆qQ1]Ry`ԯYb+Įh`+v+Bcph*"("43U5 }γ$"B(e Ur*·҆Xa̤=1> UPfy(C*js}sgJWF5ƩZAqנѕ 9x]ݪmT*r Zb{q C}1dםެq\^ڸo(oU-m ?XbP2- #8ENcy,KLј"qxpxiL屳46SWQi$zsf_PoڇbzE~q0'pL18iFD7!"q+)P endstream endobj 1068 0 obj << /Length 2802 /Filter /FlateDecode >> stream x\mo_~ps&m^ ZZD(QɳC{g_HDŗ\.wgggfyppۋ\^΂Œ&hqx̂y.|u;O&S߅^JtRhwCD.T8 nh"Ż8CwF,VTo/udJ#`Y|La*eçEV;#Tg¿w:7zcdBqaBEYr.Z4_~tyˢLZe}+,+>J$3 nL Anً|^rW,%{l śoa#ΎaA"fL;#b&n`woaqv[Wq`%;.#;tN7,HH?H1<ȗy:wvN LJÏ K^loF)GLEQ5u_YU p+Y )BےZΜI !8CDQc@*`o"\hL@P17)^/)}ezmL֙bjqj7~~ɗFbZe_0ֆO/VXMc:b8`DK06éjS@8nˎhĬҽguZ6>(Q3Q4\bf@Ew"%%bDfػLDhN#:P0caXꋯΆlhΆlhdhfۙhqG;1j9D8>1P eZ,K ݹ^R[lOL0-2totgo=nf&vD: q l1zƹX:"B""* g-_SI=G(;\f/DE7ڽ9efVX\Urw76hd:,v6~.ۉɔ(|}Sf6y$׏n"Ƥ4ϭhnvfbG&XWټӺ#ݛ43<3< pTV7|Q2w z7 \{,ޜBGcCx+((l  K˫;XܤhDqepdjڵ%~:\1kw@ .#eӢ|( !]ua¥lݑOљMzIi鉟'e&̓nu6=7YiP>18oJl !1>^X]N)BBsJs1I-FKK'<%6X#R>7=3i,yH5K&0Nիqz:O?QӒ<-1)钲p12C?vc>%AHŸr,c~2ݡs:l`Th={4˓ab`fYJR5};*CP A9 ꜡fo_qPN0c.DĮ1> =NcI&ؓz/:4 Zn0]n5K) ,'tTrvÁ'.!x>qdQ|FAlg/EG MEP]ӔԕB˼fpw7 [WZl2V&ĖnZeY2zLS7j}jXackoH_}fe>R"`w=c 1\0~RC+P s/S+Pv9۰๻,>ao,iڞ:>o7J0S35L ">@6b֒+m><# l~pW *U \K2g̊jqڅ=|lX݈Lch̼趸c8zDaѩL/N0d,` EӋ!E> stream xkoFKAv\npqIZ\߇CD[DpH*a샏(Y'hj93;3;1n|ُo9 RIc vT4ߒp_ىt&Ej_(Fd׳7Wg $I,{La#ެZ<98vb[~S;i0G aBAb`\2dE*nj<8s0C?s 6G\YsDd9U>56j$_7Z *A88|bpg\k!;4/w44;9m5a9M[ҡMշb$ ,Ӄ4%b &K.0k\nRV2Ps?vH(Z͇*I81%Ht /c :l sqnaMKbfˢL;v_YQ+jR|WO:CGUG1viȿLc.*"XchF*$h-Jyik1v04")?))I P$Z"G='{Cl9#LX) Yи82;jC=</ZB&耓p9*Tњ~Z]3{/Eva1bnvp ^ 6w7ɼH+f$-Wa2Y!'g!^z-T1!}fw^z1[j+L7֠E(qOӇS$ T=ϱ{6='H[4ol' lܳX=!%V{ ;[:)zgϡw 9 ZskErJ}-WIV Uhڌwތl[;[t_[o Qb[mL\mA!38>%@P*9Rԕ ";nW#Ҫ$K`p\UÄJpiUN /0Ge_,YN-"_V7E:YU&d]^ ډirh lOBZ!=rQ^+:fZ6B_[@!(4L#O'FTGDף-kR&7@1F𗥃;sR!YXI8u8>qsK^Y-N]VWvblyk:V|LHkQxw} Y] o.!V8 SNfv\je[mL#8<}FA/(IՕѬNvL34$O1[>0h}_qY-w9]:~E4]4 X+SSU+lE 6Z1ATh7 )m$yQ-%CNb>E3A@vz65DobJW(\aIiӛ ´#P7>9V . 6Yr^n ÕQAwwD=Pĸl1%M|ZrmTsiD.M[^W<{1$8q{)"U禮"PJ_띋\mK>?J endstream endobj 1083 0 obj << /Length 3132 /Filter /FlateDecode >> stream x[ݏ߿B}3ODJ KK z>],kueɑ;}Ye&)E7Ñ9W7H0ܮ9?ە~n,gdK9ug8{+Lƕ:?rCa(סO7p]g9.yP/B͜oq6]st75I'{p%R=\&E^^Keե])>ž25.z cSFFkzq|0y9t0CJFNK%|)t $DWrqy'.D|QOM__ DyDh+#`|N -S=z /{ê..H\k Cgr.C  w ,(A@͂QPSefFz3ЄY$ny0%PR|y#>§$ݽ6+脕T h*.O2-ܠ#oq;F? [Og!8qy_3>L]XR3z nߢ$kQ:N\c_R`qh^B 8#-S/ͱv@gG TOXT{g}RO9Y הv6!7n3_xnPOq9ny]*|hb[QUIyXZ#[X(eR~ `6ݦ}i9#TY̌XY\U z#yQ0)ذ@tfqVXb5EonױS\7i& 7aźfd>kCi#u](CԬΌ&M gv8٤ skAP, }%']I]Yju)qthB>]=`fm'1ddgyޗj}R]S.ȣƳm Gp zAPqڟWëaڂX:jNژ1-@E,l4l+^ ú{OA¸S=9/;iC~fqY(x6<"UH,Kaޱ~"kl}*%5产:.IǠ^ pƂ!W?S@;7SKkhEW S*-gm'x8>G?I=DwzN$<-uad\[_{;qC6T|""68Qi^+ςRhS(!!bo*zC Nha y0q~YRψ4(^V{ wq]h:*a qVdȁt)T~i'83@NVmiw.'`5 Zŭ17,.‡Dؿ<%|2),L#"".8/$,&ɤ,w&s*sݰnී^O43s{F9 x'& >VI)^.*ڕſ lY-TZQ;g̀#rW=oVs%u6Ois?@ G|u9lb$ 1j)0Mˁ :mh~6pG،? 6ۛ$ id且>bڶ"wv+ѦNrU+Rhk1`X|ThT?"OUݞu@ K"JMڼm8z_ ^Ruh,0_gLl$ka͂G y2A+y.>%t0 >E 69oRE=ϕpB$B0XOF c \@$~^>|k 2L "I560z_}Wq)5Oz/J Hs87񮶟z{!f>F.M2_4 endstream endobj 1092 0 obj << /Length 3688 /Filter /FlateDecode >> stream xks64x|HzMu.ݗӡ%U"]JŃPeQϘH.ž\8ۋ/^,Q,^L $y0Bâ*/f,UaK9m~fިJJeP$Fdo/z{|8 :D`xVmyk":ъͳ:7on^bEb>#AďeUiU+Uomާt-ɵOlvq@Al:.bI;Cɀ(I`M+. S:)[숃U1CpX9vG[kn uԅK^ -8-)jhQZhu 4@:M4?~AҶ0SjhOvxW?W`Ծ Ӱ#X==9CG`yaa Q$Y7ŀ@(?e>4Mp1?vxjm }qPY3,#g Gnj(!^PbYc(EK ca_#0~@k # ',D͸8zj~}O:SO=rÉy )Lᯣ͖3̒ViR^ k1H f]H-v߫bަٵmHJ*=[|[k;z&-2D$@1Q2o NZ4B,rsga)gKp M *K.ib[oDR7=J |1'?b̒k4_0^);~kR O=-md KI[T^#ηr{5Ҩ?4Yrk^ܫis UmY a2\_nAڀ=?x L ô\1%y7urzDRYIS2QC,Rm,GI1&q2)fw8#N vM 5ǝ-X6dzQ @{~Գ(O KOUhz(>~1z//-qN[3g쌞 0j+h?lHl i#%/ xvb3I1;d%r6I9a舃3~:Ql 0 *&:>s@N t^ՅH$%4b=.  & JM^JGqb_u^4m:e*eR>оJ<])qy*#Q?Oe3FQ<$MZfqW !ﳵk/b7ȑƈl]V %ecRi#64s&g*Y=5εO˗5>({oݝFvZICѸE\܃ktۙon&ŵ,B%#CDtD Um>INlӍJҶ,CmR$YL'&I;8yHIGzw;0}1Z2eX#j9ԜEbh Apg:~$ڒqD@L\>6qA6 PR!Wt2gk *'lqLO(N)auL1(k Tog4#hIY[ʀYZʀR1CB{-bݔ}TBב~P-(GLq7 9ǣxx7:)<{7+*a3|?ž~gnlOŎOg&ڧ̎<_{)yv!qm򉀁)vKðc#Hl7LDrC<!6θxbicgRpKq1uܲy ,9edD(?>;u" C8ᾺV߃oz3\ }Юc]Vk ww;UlRehу"yxϒ0uUʽK>Rٚ//\ӪgOCצИ5e4iݝn2fee]yvgܝeCʧJX=2KF֔0ٓUɞ4ɜV@'ZM[8~t̓ꚩ;qCXeh(8ͧ^ռZd_5)0\).Ӷi*(cgz]JLrW|Ƥҿ1j"Dc0]e[8>TL$I3耣EQ;Dqyo+{d8HBF8mp8A-fmn@!v_a_fkvE:/(Uۦ1zzgx7H i˶ љV.5 *]&dl;S dJJ0ʮTQZ2zg[Yk4TS tjKЋP}*qwC]iKGDV,pSQgC)-] lX)m9*FF]E6nثt]ۘs,tיH`"st-8̃_d=D9xmWh듌Lue~ڷes!GTmxwNi%Wh#JUSv H5'8UWw=D#NuZt]Zbo&ҭpcindf7&{M&uZei׎655avrBg4(ZŨw4,4.:h)*1K/ J}'īvS;,&u]3'FIgQb\8z["T=1G,\nI85m\;j}=f̑bdƽk-<r3w7iNkOiOA,tS\6}:?S4 endstream endobj 1099 0 obj << /Length 3865 /Filter /FlateDecode >> stream xk6  $-ؒ+7RzlXK53 )9W߽0"u<{%zFi0{{ʮ:17yMW?e嵒C^ okFֱh:mF`~@״ԩpG:XFw- :;C2ͳ/Z%d*X@5y:pxr61 %8W8#H0Te%s1 v}}ڍix:2L&_'8$c_K`.msk+Uq4ϖ ZYPw9\kPbr&XD|8<`g [ht~xBYDJ,EQ7FM6׺9 91C]Z &Ϥ)c)NO\||@`o6yɾQۢJZTƫ5A;xg`; &?}|;ȇzymm֐oS& bu4$P֬I~Js3RtYJIǬp1 p<@# F\X(jy{%ޘND44PNr( k#&ᨓT·陎-j*u Y0hZϝIIcetAUW}TAn  { PCp b>-m{NID>Ħ(lZ]NMx=b3)5;lUo#6*"O3m9qʶ-AMboqd (4K{| &uΗi-URڼy6QCI2we"2'D"|(I W>M0ќ/"֞ջfձ]^aLԂGfe I(0I" j?h{MjG7ط2椐 -Ad~.57 VEUA}X4<ͮ9'Ϣ6 j ƲӠ6*X_'ߤ&3\< >BECy4_YNyA7o|~}cCTrD KF\ G%OmEV7LOOo@=BhںuZn-RW^ Z-+Gxd؍ J0` =s1Ps~"q,G=`/G :jflՐͱι9(UfMh5 +D>L^RxK['avXQ-y]YG^r qm=5h%Fq*uL İ8D0Y7{ EM}ES]CHB.Ƕ#CDmU& ҵ+0^AԀXjbtkNj6^|˖ ]Z_ڮߩ \nG-U)YAlum[QJ/qT e\^Ga>5x=9vazb}GI TYF{lI^bՉFͦ:v=em.;knT@z{hLmC~t'@Bb1>޵kڵ$x0/0"Dpb<,cEj+)΁Fh<t.g -  |~_-\Mr߰,!~d.IĝARp;pK75'eMMna=xImt*~UB sL.cTrZ"7riǑ)n[63.t 0vn2wzlVOJvz媉Ns4-H[Zb0g{D;rb/n4:0wE]H-Xf[3V{gEM Uk׵$>ìzq?Ψ]L (ũX(pT !~uO^RFO`pD Na pOò^󲛏R곚zzC %D2q#ҕ"z0笽`iZ;I!g)v= ƂL0 x##ߕ↓q yuK 5OL%xw^W5Sh1j٠;l./? n0괚}@*<)J\'Bn3p XC{@)^Ǐ*"h\ ^sXNP2 yr3+Oѡ(_QҮ0PsOC/%|QpV`k7s ɯC-cYlHlߺ= nav' o[e~p endstream endobj 1105 0 obj << /Length 2700 /Filter /FlateDecode >> stream x[o8_< \~*wufqm:+ɗɒ,;:{h (~ gș G8xpo~~YXR,(O&H\˜fΓ*WjJNzVEߗDpa8|]  /k7 As"AX ns#CmLWKՔ*'H&üfmz22-,[,&#aؙM)D@)ap׊VY!(!0LGΉ֮{P&;Qgtg8eDf齑ս.ryk6x\Wj\as"d0Tz1P=ӱ0CE$㱥[sS8P6BT`,@SXݞ50T{qi^6#أN<wȇu 3#nN |J{ T$1=$V~rYǮwW*WK4Z ,G_fŋ.*AAd~;~;ӆ4a_wլBж>pt !8CDQcX'U`(mdpq{3{nDaCR*oX$Ր(It @ q6h!tE #<7.h ) r@a謨#+ v3GX}t倬vFkNf֜;A(\0]o3748Rv;tvRKh }eYZuUve3Fm0=GGYCgY 4/O!Ble7 7 9?_a|H5rFw\$"/ή| 6VRÊI^8rοe{ D)̐&b2٠Z7 Efdblklг/i0—<5U2}{mi}҇ ?yQm}jwuЈ1jT#u!3 \Da O gIӄr億Bԑ*GoRV^jcE9"cV(uo{CQ(S:#QP>{'ʏ8nP>B/F&Ut271X;'0&4lQ^wwaSaӰ1jг|fexh+4rRc ٲrAn͋XѪճ1n]Z/J}]AdٱcVS"XgEֈSu:歾kmޘ1 ?(~2y5ѩ8>w6(!w.JH+ )-SZwDiي=gbLWpm/ xؚay`X}aBI4;f 8ccK-mq3Fm@4wkbPኟƱX$|,Ƃkck(6'f#APӳQ$rs܌uξ@E'޺\rSlA] S(}I3_cSg8 $LHa~Y!M Å *P{tȘ똒Mj6y+.bJkdgq5;<lxE@?n|.`nbL>I,L6S;f*,6dt5 ,L2֥v*j1(Ңt*Rsڹ.rJ`g&0aZ}Tov2K;An'v)5JZf1l :EePeO5W\cΜE?fw,?@VuŰh۴uF(ۯScG0kX&e:ugL,z 7wHGȇT%B'jPNW$cxTv{^2ƌQ{^\"yo vƜ3*$u٭Ū\wנl7׻KCT?!7nв&[Ѻi2) 8X?zzLoruʽrʚ*MGEkڠ:\Mέja~w \_7wE-\'N^h? {Qg2j 鷹7Ǡ*vIfۃu/v]Cb(my<˳c" I.ݥ@c|t+ѽRutd诛bH x썕:J}?V+jaݞG"1cԞeHq9\q9Ĥ *cVxʛͷRb =4p;GOZT} &R:U6> stream x[mo_tnH" $zq%" EWwMR$ݢs$gggf癙]67Wo>@"(^1 b .Yp=OiHdmVi>%xKWw*KAQ0"_+C8f`1u৫\a&4}4FkaH"L%A@W7Y쪴ZyZ="Tմdr[gyeHD=6;Iz.1 BFPV3՞lqc]ۼm*uYDL>L)Wm:qrκ> uq2!E& i'qͮjlp=>ӺW0? x5=ѴŔɽ%ngL_cG)ZF/EVf.+SB;Ӑp7P9> `L  kKz.!=`S확"U+8[2U-TK/eG5٬P+NS/쇢1w);jJI,b6@cG{ 2~伞.-z4Zj9}hz%Y4M9OY5t>'5n 4#*Q~9'$1x I{.;<ć/4^VC}BהE,zHlnex~a kGc'򩯈 jǬCtrkl-t%Z"I)G5 d0 VU)jPX 8uHS$% y<yC%Z5j~C'oMtĩ3TnyKZ* *Ovav Gp63CH$t?|\H?/O`2(NOF<{1 r!c, B,E ,mp낇̱ElLpxo`Pݨn=}Wd0u.!pJĊ Fh` IKdE봚U]wX֛Y_VwcvW:&[ٌrDbRS4fk 8VVQ*p]fXG^<dD#C9t2 #[OSVa^TI?`*%#o=EuKO{ S!Kh/|2%}=#D*k|ْ Eѣhou#u{];CNA0З%N LY[/_W/>%jp^+sQڹƒ|ל]oΊҳXTyŋ~k7<ܬvۧ* V}ϏЫٛwvh0vH#'5|A#r!)YmNɆpFЏhPH$@aSoTз C3Kezʜ%zlJl+n/ O2d u7!~`v~[̶̓Y ]j5)jۨzoh8L|QTVf|:?Xcs'2Td(jW*ە8ƎT|@ / P1/LBd#ȮdţS'Ytow7sUp[a; U~9 'Eœb8%.6\}^T^ց7 GH Znǃ@&V9ޢ @ L-UO"-W  Dg[BA?(e36 %.OiӤ5yWpa~. ٣ZOUٶ IQQ8j2Pf~I 7> stream x[v{fI/{% ֖wز#ɷ wЃ%]8`Ep8Ǐc8՟baHP.P $9 $SEap~\/J5g8<ūW&Y%qˆLկW $ I,ꇟpoHu*Wm| 4?豍ޞff!L$u?! D*AKsNÅ4Q@i b".g٦Ɠm\Iٗu\l3Ӭpy|g=wz,|&m\j9;3a^e}|HDdKݻqYzs =޾ m{\g!"Jlp`GUA Z*y{44shJ[Fݻvai a O<0%jRWnܷi5nJc4O|/lGq$f1XJf:AkD R}OC9qSN%v'CRr 먵\XZ(DE[0R1znBP(] _0 fD(-`3cw=7%bͫ#:"VQ~,fj^ύX35RS):ff||^w'J eɈgHwQ:'Oaz| vA|7s?xF$AJq坧o nw,e/\UCt(yL,d讈jZxh힛C.ʱM x1u"*;SjNZU & !!.xJcqM}Co+8fǽ.|5.P ;!(|+"оಥ!FUߜ<Qi'XIq{r\[ O@Xj9u8J'. ;Q%RYF "pB8 I"_⌃/s3gX@{}b6;Սbf/2051C:#\vF3`C:#>ABwKKia[:ss0jdZR k!x?j(}[9 !R, Ձ: i  Jg!o hH g@ )Ξ :N ARM\<.SݏA @mr2Msa]6\úq: cak=6O( ct#׮~bX[z`XXq(o0&w^ԭaz>A'8װu6kzKja5 6̯';)Ea腥"<.k|ŀq?1૙߾c(^_>%ЇuI Y78a"ʜ*!عM:&':.φ+m(tse O4&줡T3PA&/Y]k,_h 4c6/rJ+mV/`wtEnfWE2}QHEaTb|aY];jGel-z8rP6˶R x_,c )EUJUnL.3@`7f>0CO4F#^pP*bTx)gpB.^ԞrcHM:dƙu̢[-jhd]%.FxܝJodqˡ%crNǮy–]Qy1<|f#Y.\[rJ5LKfYVȠ ~YV3|Cxa7G:х`?>}nO,F$O$7j2!h`&8&2?6-* DwȅWC"uninT-C},R7c=?-Rv`8"!}D)%CXwIrF?`HoU 5zI&<MN6 D@7X`6kfs= O>N&n]ᇔ#_F:Pv֗AG;^,$;_'7wMViV[m87ۭ˴X>ϓ\ ӤtbWDIID"c,2~I%['cD|eR. j'T_ϗuT;O•̏JdCT*džǺXm+&$za{cE>@+XOIgp8p.!\'B KI٧B 8?~׆y;Amt?0q"Z7w endstream endobj 1126 0 obj << /Length 2624 /Filter /FlateDecode >> stream xkoF~8 vOn-r! zDYDe!n~DrBr;;;3; $U'( Ίndua遇i SvJȷNO*ap;j !ܧ.=2>ti@ҔS`#\VD[O2D z[҇fMh5@e6 !BU=o% (PF @]M>H7`(`twHNvw (C;d(J_T_hJ\l6-O 8${Ĺ6d]DdD,2TEZvihi̗>˚"U:`p|" PFG}"/6JVdV";e/[Hs2l.}ؿn;x/1n9/zc<;J>횏2Mv0FG38ng6:* ۺnb;fͯC l;NQA;-\MmX-c]P;z~V[nu!0A) R} T8->4N(0ovCuVU]c /WNPhZ#A&ڔf@~y&Lf;B_ɚބJfeԭs}a2gyLm$5<>^uY+(Ֆ-eH ^mBuu(F}ؼ~U -NS"Y@Њz2V0:-/Hw3jjgl$̋eeӣ(#/nЋ7 >=u .JxS_Oî4sc}>u~c4]$2a5Wj> stream xkoM}EAK)[E*$S,(Y$e;rvv3;=p[<Jz1%S\#3{? .Tٿ0ė϶AxFa"0"\xů)/ػ=Ŭǥk| \⊋i`~iV>„xB*D3q/P" %, AsEAX;$= dܐِs i)$+U~j` I#,L(\U`䬈S!Lϙқ dUAH@]IڡtT󕬨h(rH6 )xS|RS'Lhwgfw ԺS GaԀ,@]yH5eb\XV|C:LUChY#3/fS/)? FHo2*.? f 27J֙}l+& nSw(g'j;[u x,vmHNlhC"FWG[{2S_iBYs~[gh`ȫӀ"ȣbH)QY-&wYA6ZI ugDѓE3XWigQWYybR9!{WU3,+aR4xue DQrIcݒt}j :&J)VHӾ2فXCDq9S=Q:\Pp|:q`*Z\橦n+NƝ~fJVoC8@6(lYDFKɲ j'8&8ֺ d ;%*b."AYD}7Q"hJ9Qg{K !đI@#e$I4?>ιN DváSiݡӵQUq,u {"+|' j? Vݓv篪}~ծy6Rr'lN>q!Oʭ 4t4!uCăxi_wGX=1Tѹ/i6x]Dwro5wNhhcԈǫzp4}vfBf]#ޝ`,{^{!X6<(dKjtЄ]U̐)itN!,{34; Q\pĩveSy{Ii2m _2C)0;?@;QykHрia:)=jZ)p?8f endstream endobj 1136 0 obj << /Length 2267 /Filter /FlateDecode >> stream xZrF}W O l7Ukk6 2 hp%sq! ˥* ΜVyo9"I*ۥxxļۅѿY-뀪O_qvM7ldebP$FW?^P##7^}aĢл7!\7އ_aGsEXbD%oI}313 q"Ґ?1yG cUgqo>_'Eج(@k>~,|id4[ٟGȠR8K!N%KJ-u6DZ{WkcH^,Jm"ڵ+Z߶U|4%a0`V{H滢L\4Tʶgyao,ΠfIr[\֬]٣UnW5X ڳkn?Xy?h7-'(# x$dD;BkyE-B^U1ժ5GVO;-K~EJ<`Cneal ۀ#Z}Q7P6-$H+A?l\<70jiDET'µIɞ4qv@# t k m ق(ws7$7fNKt&pF"Sm'+E=7{DZVQ=Ϥeb1S$3N0Cp0q>m@|NXc>=48Q`v "sۭ"ǭkݾǵY%YRԁ2/ϼձH"XS)X1[I2b {[:{A @] #I0HNdNjtys d!D !4e#W TNaJ6Z\P%;0a=5KvH0ϋFa` Da&Txsa%"dbiׁ('Kbw!Jy^a9PG::*sSj ; g8`DABDZN? Hf[Qӱ`Ա9\kDg nIqꃿ|W?՝b[;P;`+}H:&$֧϶_XY,vE6Gsu$>wmilEAJ $)[`$o$#<:I+hcMg8&63sp}ii w{*vz{ѬpK?6[f ނG,0mN^$ ۳>htg0@IbJ+ڸE[pڵQѶa(c{ą]R?8VV3J7x:^ _#qEk[#pN?0 =gש-S U``Ll=GDkw{k4^&"R;fie N1f:,r{ʁs4-ζڍ{$d %ŶlcPYUKu9\%ď~jU=\M"_$uhzQS^b]]t?d)г]a䒺[M@()>HR"ZA;3($ר`;1ptCJa#!ݼʋc}8:nf&E:'SK={!C`:W߈h?&;-_6:ݙRPABBMƽG]W(b! P=D"959Po^H_<*"ȩ=#8g\r Z q;{ALpMAMr`9SJwun6O~"J}hYٸػr3E͜.ru·1\Z_?0)B0u('[9"F1v?T8D{ik,_:"Y endstream endobj 1142 0 obj << /Length 2462 /Filter /FlateDecode >> stream x]oݿ}p˽". rsr9DYIBR~Q$Edrfvg8zp_n#gFZRݭ#$RGkݭ*[$T񿚼vY 8>dĻ|gM(#xw7#) 9RXE͇8ZFLѓݵLw *IV`rdm ߲j nS;ֆ6{S4e͂{wQS,ivCʗ۬ȧ@ & ˪(We[<{]8<6aD%3jX8|'!H A ԄbQJ%u"!>$iyroa[-ǟ91tOK3ܸ]Xrׇn@6o|ADy_MSTecS8ۍ]➚~_mz_uVqPlVVӲh @HvJؔ )I=؄yt@<.8"҉[Ͻmm+?[P. 4V ÉBIMfhy|OvymaPTK $203G 58jU` u:Qځ`ZJ; w 'ܨ7sj>Q؉ADz$澾[8:֘CWŁ·AW2$pG K>z%:_~Ð!0{ gpqVVVYpuWg)$E^_h"6Hr|CFPr g(<7[ޛbz_M˼˧^ג4Sʱ%7W2$HԐސTeg*!t)@go1~%j@k?kh=7Eǚ7B  PG^?@* Y Y8Zt7BsB gR1K+=.?%C jBP`GLRD:ihdpvNchz{3< w%۲: LTAIY6s`` r&γr>X s._‡j4H !ի{ b;9Λ*dp  \5!-DX$weEgPu٘4nfjU*eY9q!)C{DC:8L`$tZOiNQY׫ëQ3(,|=A;FYYPMiB t*f݁aŭM6P\4]`0h{߿qerB60|ϙIT߼rNJB\qNR<)$3L\M!c^7987h}3&c\f9*tY(`5$Myp1ǯ^06gu;7qgQ(2:3@ ăsM{yx4Ղm 3e=E{0݄'Z_K_` XպvcQ<)ڱEŌ}VOȜ#yn' Մ jT|*l >8țBKCrNvSMPfvCbA(fCW,i2u [c9R20\63W&PJ T4T7Lޠv53ESosPڦX &:];] %]xƐ9t0Ҭ-cvTYgf:%[%6fTΌ]DI\yXbzHY~+wKggÍ r7㐣$Li< )8'h|퓉g&t7C;}3\t-^w_\7'S8B߀ƿ~Nss-f6 5?t~ endstream endobj 1150 0 obj << /Length 2390 /Filter /FlateDecode >> stream x[o_7;õhw-ޢPl:֖\nPC$K-;45 g~3qtǫ?\E1%2R4R\#f}pH36ɦOvqmV&)@DǛrs+Sx)G-#\EqlJa`lΘMRl]6ߦy?ahY6 ,7f "9&|o 51ZWf| ̋um!$;|[[L3$^ *-g5"}H}D9AL r,{%AX#Eh5xb_y>fXӘF XMO|6Ô ,nIVOfJZD{ҬL$|f{)yY Xg٥]2eL}ٸ٬y]=Nkԓ]D Z櫕_zYAFѶ8=dF|{3T|v0v۲|Gz|e0!%ٽob(V:y&ZŽ?$U'@s# ڒ< )%"6_'L`SHR;V*K̀QDU0czx &cĥTVͤZ#ZZ2 W0Z1+j &7xd5vYMqy ^Fߖ'!G"蛴zyL[sm0O A 1: $c.sgfcŴ=?|(e(ā(r>ԺɣQj*ɝ^.N+{xW,,=G21b}@zڌ?:T}i.}Q]59[JkK+<40p5$ ܡ94B5ڋLUQlH,/VQ! UJ\w> ]LswO*ÃfpھU^:OB5^BPԐ].E2pNd+2s89T'-Saj҆CLppa Up|^ .a#ݘV[SdɶG$t,OUu I~tWwQb)}5Бfܛln} ھV@6{Hg$۬$VUi]sRUכV:Ƈg`NR]joc l2u_nL ΞVznԻ?RBѿQ `BJNg *'O6G4^t&vU!h ?YUa endstream endobj 1051 0 obj << /Type /ObjStm /N 100 /First 976 /Length 2113 /Filter /FlateDecode >> stream xڽZQ~ׯc.gH!M0lhjl8tў$J.|gswpfo)䂣H1X؞Q]L j\R 4܄e1]joA썍Z$m [DŽ$kfdS21Ʒ!@RlHeF_m6 ű&qV胵`"8.P ɔ,Zu0f`.RCcld)$ds(zlshFXt62ւIShZiqlFXo5!DUV3lUDV薴iPKՌnwUSMr4KR.gkRJ7F9K%j_1Z-GqheJ Us6ٌNž$wNr9(;"N(cţEh ZmE}ocz殮\uYYf}~fu/[ .[2ouxDoӂ@OrdGqɞ%Mi 4M`I"KZy bui}cqP7PdEyλ' }딇NPݗ>E B&9Z+3B?Qe>_];3j@FX?JxQ}z,[Dt8]Ԏ@0*viPGwx %C$E /!D.$kP%qHFg\*r | (Op73)gZA~@AU E9 ,`6|ڐ<Ùof:t:xHAƾqAŀeΓ}2 .FxR $pPr]CAϕZt/\l9#[D ٲ#jP26I0ڵY&ˮvIRݑyM٫]`UzFlXON>1sh%AbdS_^CLH ZAr OW_ .SLyNPbew| 2VhNhoZ<'IY`LoE 9b4IÝ*pyΈCA2wSQ֪矹 M ǘ@2'~j bE:.H> stream x[o6)7gX/bmb4}JAK@dӤw(Җ(_bQj`FXfãCQwGo9K 2wtʷo`>^*Ɯw1 D 4>5d[adq8K7P5/j “O6EXRg¸?bkcy<|9tc 5XO<֑nSwB]a7Š:p#2~cv;;xZy;soƳ9';}_OίW;@#'FndHY^61X7>xw!qELKcУyRzqH{nss[M \\ *:quDu6$Rv[15.6'I:^f(0q.oX'[̹/}QMaG?(W.JdWۯ߳Yle'+|I* 0f?:6WEuIIiكI{ :*w䐆6c9CkkKdڌ'{\ x1 InQmQ6zguD {vvFh !I}r 2rȭ;[<4]iVe{#,(}R8=^kv050 5ZK/*ⴞTcx RH.DNYا?/`kBkxQ:4tZCA8/ucfvaCV0A' endstream endobj 1180 0 obj << /Length 2896 /Filter /FlateDecode >> stream x[m۸B'y"*ŵ5M6C!tV,9w^W:4W(.E<3i6Ӌ\^|D & Up 0&"6x6YH/^UtIdtqLGLRwE(a˟/ Kрhl (} k틩HLF yQ.+ζwmJ<)]Li[|Ƌ >טSń2H- "$t$REAil\ͦo] +?[=/@PJxT Yڥ]^ۙ)N!p2gDS u㓊9;_t/pBO` DCUH%3dr1${.x}2 % /*8M5Vz]umra.kٺC4Cj'X%Bf)2nb?gɭIwsHƨIa}1Ѻd1]Vf;|nM^A;(HkSPu׏}eHH58B? rwZgq*/~J mByg-@GszhƯMV,C^* J:sσ;rVSȁ3 Hݹ#aNRELv3)7<X\/CX; Q&m~u_YuTiq^䫱o6ͻu($ެIg+vIpW*Vݣi^C&k|WZwi;1|;YNtoP}̽!tK =auhv{t*[ )F&)}˲7q.T=&%??HgSDD{=J65r{K!I[vR~Ǝn8C [`5?ĀhU2f}jC`};=v{Q[S[.<^2L!E& >~"^.Vt> H=HFS3 ŲXV\ŋ?E/0.p V@HJm.Yq'$.mzFk 9%$b3yeI\Q:KK-,C:Y$KO"#Ң]j `rJ2o͵Qݥ{ͬ.vmhv I̒MrqR!b{<;4GH}5P,&K8-:̒é}pAl!̝H ,|ݖ>ujplQ7unabwccQ;MvvE^qB]"f X \”.fU-h;茻yiM^']8wS9+oψzV{2Lĺv}$W*X!sڰ!)d4G.*}l6WDB= n$BSHJT0o>tz ]~>l3ꏏ\.,ÇhpWu)Cm9c$mn~ bz*q3L-\dLÎH]|eq-lh@ "r|*? ?Hq+FD,@\El1(ƶIۺh |jq$y(Q&;׻~NYBȴkK6 iVD&my@l,1nJPBk|4;N[HOI-~mQWՔG&A #4+' Cj:M. jxϖ 9ARHu&b+.Aq#)lVMgc#Ï)XĎOA^{ t97VW!6$(2~XM54]H ROTWOmh'~hqNV]+ tIx4U]nBTj֫7FMy,!³Q̮d"G6m9(e"pQGAiR+P<μbp"W&VSZmܵ2s Q2D#-נKN˺AVl#b5> stream xڭmo8SAkIQva[;t+qJrohʦ?[[4?9q8wy8&pFIUqx 'Nn+vۜa&'jcU~;K\%i6 UEiڻwyb<2,gə3X*\K)XzicRv?U?Z ιC'悳3 BPmWլ<&Qs֤t&f\"DԪ瞴@2F,d * 5c#J)bI+ )o4a :'n]B gy[WWerICwhol+x(HḼp9TM{S7 yb:WzJLoNj؂$|x|杶vWkWUm5і^TMibxqJaݘF]9 *}@G@׌ UX̄i=ft5ϮNG(Q/' j︑ZȢ|v]OobrmhG϶C!p\Uj^!*h L|u6N˜>V~,64sXj1S3sY۩wmuYVUʡa&(ћ)o:Szc"3kA(N]7R}pn8NvrdQfnYU- *um%O̺׵8M]moSt5't lH)6Ӧ5վd &oB\tMb2·mW=h%W%}\IMezj&[]bQd3Of6 W{ L ӟ25[i@{٨Sݏ t8 Ȕfʇ:ГpYgj;ɦ;=AJ I]v8t/eN1? t֍`ƅ:'(Nn=) 4E= Pmmz ! c|THV5- Hzz֚˅XĔ<7.hm@ qwxFLpp Sz 4pq'ű^V>Ⱦ^/9jM2NM?ue猙%u7&'!<؅@ Ϲ#,j 5L.00H 4^!MYZJg{\&gU2U\^HYGـf ca0Cn7lfdF?zK$&$5;>d(%WrVP0\-ɷEq€6^ ABS=#*T 1Dϋ?[7do}޺Qq$Zժ *QYÑZ@M5*ɸM[X@f˺UBRR>_%IYL!JuZ/7$OojU1I݆O n-eynaZ(&6g_O`ATG&DchJZ7B v{A!=xaZ\C޷r'/zqm̆>E]~LF׊p:FԮDf3pvO\buU^77pһ9 !tL=u}-KaoO+ޚ.P*[y"2s}X N08aZjd(_BZ " +K͏E^r<^PId"cg'QِisF|MEa4u@KT\@Xׯ=ŇS$b;ÂXzei$ FnaEGDdjù`Șay( I0٤-C . ur`K%HdL~gQ^e ȁ."<* ?vijDiqYPC!rDKۧY8l |HSA-\z$$@e@.oqJKקًmD;x5pUᄋx;x5׫x8V$FnX0 +L "OK|Xi|M: 9~kZ`^I1\^+@J-.\4}z`6ėaD"(s_[^՛]^/"(5 }E WE=>xA5 "R WxA5 bo^ q PƊ8 s{y&zyz +"(5 pC4TeZZNCEB -\o. u[C 6viZ 8_2za: ."(5p}^\hCEOhzAŅ."()Mu:~E=,zx6p AS$`.:甤yCEoη#R l;0b(5K}E#TC|;1HXJ##TT;D3z$2vP<286u'f +)̈ 0CaJ1ZfN߽=R-3zR5(R 3\ 0#Tˌ@sf} bq!=_qW/3\4P!0Ż3b(5) =c( 2"() =(5p? #T@sd G"#(VBdg槖Ư8̩S({FjxẼT=c4 T=#ȴp}2x=g Ϗ)iAL%Ͻ}z8&2~/ðBOI)8zA:MJ )\?!Ԡ'4P!Բu#/ R--\*{{Lcl| ;FB~'? Q_xln2gA#, BoijI-Uįre=(*~Srt/> stream x]s۸ݿB{f"L禓5i>%K E*$w ˔mYyxb߻_\-g??˯Zd,e8\$r) 38,ϯ6zI15R`xc CbƙXy/gP,b={'_lۂ3vv)<۳qG& 3"m[Uc`lQ eo+[SY1\%Z,UM_76ZIu׀!E՘ KznEah}K8Л Yeܒ"%ݍr&Ip~m" uUQTKi[XDJEh ӠahO\8<9eR57LJ=!|>Q, YͮnM\8# OXw1-S_P+<煡S\;40+iԀnaR;߃/I+0,r,"2Vh7OghmICN r ZL8b`wX] ̀fg2$fai ژKt)z_O B4YkwʼnWIS&UOO.*Au6(&Qy.@0 ˔s|]aͩPLɩ%wԽW~~&p2W`)3d^eLW){ ݒHE,Xuz`O圩ʌi:> sT&`U)Ъ(­LY K]xYΨa_2:+ItҚ hb9:OaۘRT)[wn%:kAI!lp[m4 GFe=N~:v}'~MVE^Ul޺hB #M|ng#ABjŨ.3r/䖨u}C`; @wJ@wܬK )F7 n+b\ˮB쓼*2E/AZ[V(ngtMfD6Cn9H*&tmQ*o@BYȨj3ƅXX9#< ]zP,.^jZAwOl`# !o\-ZpK#X(*QXxi0S?pWߎ F!!H3ЉȀR,TvB&Hu5GU3ŊP,!bMX8lgOWF٤#B\JX 0yJdL9eLyqDN4'g7Vzț{lImͫ}9G{zC}B} {QL@F * veu͋$ѳlW!E׵djI`!R"RA3ֶ&T0vp>H$/~Q{ ~/X\QT^kl.uJ[KHE[$S|ykA"*Bgf6e{Nr&[sGf?*{#)S"Ȅ1πx_ Sj)CqeSePDaa)|܆%}6/0Do\;l/uCiQ/5V{pQΫҿ =Fu[7ϰlXA/|拋եƹ};}sU!ҮT3 ok;U uy@LYTE47ݗTfJh!BsE&2ǴE׮xU:?4m}aUo]H`f% @[^6..$ثoI M]:_l!7U%̊gq+z]}G]մsnOSm! u8p;%RECezJdİ XUs;e{J=Ơ".i/S~0@PX7=ܚ0Ph z̲=Caac8}(sw|uݗD}Óվ!H\wvDTD5GB["=Ҹŷόcf9!D:ҋܸH7fks 8S)fi_ZO'.NDdn ]UJ%,g,/iEcэ }in O=1c jq{%?U&X%&?/{졾U`PޙbD 3c:;Z^xah*NY3L,{șf%ONtȻcP3Dᘹ_'tT 1ڑh6HiN֎;vÞgzKn<ޒbI۟S&ʜZKqp*RC (\&-dCf{~ ūs.#@;zߋ*Hc)uyreSvKoKn$K endstream endobj 1223 0 obj << /Length 2646 /Filter /FlateDecode >> stream xnF]_ X`Iyv,`"{C,nsX3j4UuW5]g뫗7W%gst#E@Dȝ8{J`G .ԝQL\TE2F|:׫_n}EPG2-to>: 긄swm:yiiVE]ri|Wsg:';UQ33/G;>kljN>Eb\)mTUϛ[&'e2qDmҬ䙝0oPnIiּgwjmfi`kS&' B5l/!e'-L=:%監,A%QWvrkppfN~H\ ?r(PH\(g zѬ_"\8N 3 25AopI|/v׼ FC`wkU q% 3{- Ӱ57Vc y-O (> 7=Zjw@}BZChw9rgy7i0`96'k_=cH`'9숲,CUqU*1/aZbz,{ VQ+5C0EZa~1XL6Kq݂0:KUYZYJZ7Bаul(jɾy/ rcv  \PeQp^H{ݚKBzch2A0[GsZn6 V*+7RY O .Y243: g-'P$rTp>'%>SO" ƌmrH.~qB>Ơ[DEY9ǎZRmM*JV0azD&,$A,7j"mVOu 8*bKjpDG*7++X''Ռ6[֦.|k'4$4I֘_.w4i+g>[c~"#D?n޽=Z (B6̲UG: hbK.!qb\ PHEŀzhn+N w#6 ֳ6׈$tsMj?I ^jm Ķ̷< moS;*zZHCmdO2\vŀ7YU@^r.(M`[y,xZ|l~5dɻߣpV~o;ebl/TZj|HQuz懙TbT1L{BG}g!qyr]?L'ety܃]{Ji7%>Zzmvto*qbl@<}4 A iXsbyd#`LcA}t#58O!PvF>Nfv!\>?1SӥQڴ0wi"{gb} 3fskV&/^Ț.F$uF`:{m lv9C${N_ )(+рy51ErY?~1 /{X_ԦcC0f{ZF1p W'ag NKF.?!'V7ZEȉ/Ÿ''yȋ /<;p% /.oGB@GwUO ,72p>4oS- ?!l*r+YxqpgWB6W.-zxe2m [b%sןT!T5/I|P;}?d&ht@T}kO?`Pޱ^^7Ԫ(ֆ`րЍ endstream endobj 1231 0 obj << /Length 2842 /Filter /FlateDecode >> stream x\moF_C?D{Ws)Zu>%AKL\R ;—(Y$%9,jEPf%ilGY:".\v9 >ziZgab7riƛH.hղ k~c"Fǘ">IQ*F=6<r,.&d^=A=$x)r`?ŀ 8|:2a ?;tnW秅הG{^6x&Sd9hSv'1hq΃av13rhSd/\J2=EYԙ3!#J 8[ZQ2k#))j'z˦5a_kCG=HZ)E0.V83RMi􉇸o\`-yYzjli_)6F3gpڳÍvWB3_B ]ΎR7<}k͡ZSwІ%@V}A<1#{klx7I&!uVKe<=VɰС|Ӑl.=vZua{5lV "bJM,ia*UDV\S h#x}rxCĄ7JG'Wـ0Ϣ2HaukJϠx)2JtX' x}4gMΘ-utzTAr㣒T/J L`~i ]^0f&SSy_pĨ'}+U jQՁ!鋂އ(+ Ads!BDH8Rl4^V 15ȰqqR6ss7`\"h^_#a&1]DƴI,e,gZ䷻pL\Tn2t4n%G:Y^4_44ieՍdNi.[wŗ6ЇR.a u HѮI[.әᓪP[os45Mև ,krIuTh=TA&nWi WjjU Ǥ ujlkGKG J搷4=D(^*T7F̳ r0*<562,[@\_N'Ok8:`=Qeu1*/>jk5_ĥt~sS닥pq'r}wޯWKQ0hA0C9A]GESj|tozdE endstream endobj 1238 0 obj << /Length 2232 /Filter /FlateDecode >> stream x[[oF~/2M9ùHOiaPp+Z{Bh]H^͜9sGėA7n=x ۫SHq½/ F=A%*fޗ,<!GQf>)Gp\F(# |OO0{HS$|M'_~Tһ37>T4Nw>a8sߘt!gB/6(ę,j!x^ +.[ 1FU?9f>`O}i+cx` p8RBz,n@Jal;w%; ~#D:J C1sTl7ADT>HLpZCb[ѥy]L:㊹QLJ7@ \b7q4J*G>)< (k-ae &yqR ==S m$*zΧccE`v6sr{GV HifY`QG=ۜlo!1^3;FJ+ LzS͡1Ωvc 5n>jE{g1aq)#]MQ9UO/BcC݁`7N:dOHꔫ!͇l1n껫i7U͆I" Jaz]d5d60# 9|[K,kj7hh.v.46=LtiAiۃkCݬ! =xb+"҅eU[f~F(FtY<` I&*1-7F89X:)5o>-¥})RExZ:.wMC^{u@>|(c(=0{A>Zz+ Q=ӈHV`(>D ا.QEOo|X`fwM#?+Has.| T/z(a?`P %Q aЗ@nE Yi[O߂~^eY Ii-έa2]4t$r6`" 5 O)Y9U!5>aL$nCT#P"qT1ɽ i ,R#HDŽQ."6M+@.A4EEE0+r;*X\P nUEtU57qWy4s{vB1lg^5hgLnW xv$nSHU<-T(n*@l9"FF5Fi1a2U0%%P;&#hxI7װ"yԩH"CԢ3r܃A\kcWM UKpF8`Ab3igb]/Z;SN Bx$X9G2dpjBϙV`u_߰K\+[)GܔWfu['vmnºl?8aH' $y!4]0mh>[OQ`/Eٝ>әM AG lK͍&MnkjU~g>Ue_xy,ADHR 01hLAOlqЄX_pBva\e*T]8Pj' endstream endobj 1245 0 obj << /Length 2378 /Filter /FlateDecode >> stream x[~x'4)@^?9J;tt9_}ܥV%Jg00&g3qvWonL!U"f%J.W,do&͈2Z߫ c5ns]@_o?Wq9*q?\gcS2{O}x!8yl6GDKh[V[7߶`Y$c(dF+=?Snq6lb 7ڜ\|Xz\z@FdH1,,j1q'jMƒ7BE gJ(T!)eb2[9Ay+l|NԂĘY=>$cH~Ț e< @<s:D"VɆj\Y]e#[FsaX =3;vǕ& IH”ag#F!~O($d~͋\푇JP-K,ԈbDlDQdąQ 2]ɾGjvWWƈnfkwxVm\|!XF;0z֛ͅ{FfvCE_a {DOM.;aķPT`˯9RMmI]]ˆ".F X٘NK;\oTh0=Ld`Bȫ#4Ͻfyȝ1]]`o|2&w?W$3pǝ$DIP 0lII>/Z1p*[l zVbm,2sUˮѝ:KI$-28e8w1vxM!Qp: =H& 4 PQ[ c +#HJ(h"RI@- 0b WWR 5vkѐ5ƌ muAGD0@2ӉmQX767rܾ;ی&Ecܫ~=Byϛr<,<Oܯ2 V6^}t r$Z{ )P[Eݵ k}D0T3$CE׽=t 8*KG} c.(mf Κ)9dSEJom%~2zRpA" 0! |\W$r `XPn Å4p\qI`ࠣ! -T=!Mk_rQ];#%8LJv6G:2}b"cA.P&R+R;L󩥏u˿Tm[vlsܻlGAސl6N+R/bN.M*[=8t]c```S@d_Cʔ]ͺg@և]xW8/Cf\CmKCmz~85my>i0s%998V %E:bϐpϛI{#BP0 }#=U@xpT=)D=sw$ǝمEq/1![RmI_-lpZv:`vEJ $EKAK|d^:ǡ",٣˴;doA625E./=FA vNN HCо*٦D@gx+9p\ļ1b05%omAw/y TW{=؀|*Oab@:?_bdsquqJ' Uݺ K+"3>!`Fێ /+z9{;z2vnn.> stream x]6}~ZaN}P'1ةl}Ivb'$SaLIItr"=wkwi2zQ"wyt"y9sxObɮZ;Aóp~Ǽzv^:4c?cH"ON$=JIBi/6/Ԟ56u6QWۆ!fᘶt 48 &VB0QxLNXN9 PĉEI(bLl""C ~b;),<Fu(: H'a LѺdL <-o%X9@UIP%B|4<'!1ȺS%8d|Prqt #:czW \h:_GPD߄ Mb` wpe7Fu'o[ET5>,?H!@uك kS`XI =:Y*UͷO+Ҩb /:tY/,:`Eh)@pMnY%~$nc0`8yZj01-} ͠tEӭ$(!|:#HyU2ӳ)Ud.'yc}| IohJz_否)d CaUxm!<39kح7Lv=$ Ae vW|7uf]=ufn]`Όoי+T!ۊ( তϽ߶dXzq3gD `ۘ ::~сBêOcMf)xDxKEO o`@FIL[-!HE0A]ܟB0Q(!e]0`^E0cMII-D.+w-Yg dB瘧ꋼyF-.#?[ ]s-Ev5$l) ,(7 K'XXR-QX*xfeZTゾψK,ZO fϼ&2?U\I]ddL8m YX yT`bYYŚ>kcn rN6V5G9>kŕin/5bN?~Rt/"Bδ@"Q1{r endstream endobj 1258 0 obj << /Length 2490 /Filter /FlateDecode >> stream x[ݏ6߿BTY~ p"ťn^.b˶pHr7{ ɑaٻ7X9/r~ñih?JD$\w A( fb'<4I٘6^*DJ~wR4`$! 4A%"26Ю߯~&uEnz`Oepr헡 QhH-H9O d ^lZ DJ{v8mՄQgh7Mfv@ DS, &DRUТtL.OLTHꝅ'kjyoΕQG$vD"clZGy~^b:#4nA_AB9$*R5a}EL4\{Yx_C!v &R* zA.7+U-ј6&&ΰ A+VnN5[;hg$ӑ),%֡4 !v9hw|kH(MfE4 v vpBD.ѰlӠmtY]h , ,wcCG9EGWTmYw,\ExqagiPjs]&jM%3nr.:&24T00g&ʀy?6A .&3b |& Rg1&\3/ = *bV;gw]D$!Y>φɡ~=fPDb7\6-)hHIဌ@ =4[n6 2ShOXSQ{mUy?A]4W07͐k8agpD{yf+NW13'k0~!qN(01Aq1zS] l%ׂBB:-ViԀ>>K*U3vIMt4~0#)DA8ض'!YHWX\; rt۹Bl3z,8*Swi{mU3g`#|뢸>pV$7+@zS4HUi }1 s; cOTyH`̎"%bmх}UZO0Eyݞ @xF8DC -k[(vF%G,*m`}U&\;\ص)rpu-8VyX y;lLs_m | /vл_eo{x`/ywƺi g.p%lx]>4d̸QH|\k@ S@~11hS?=$oߒhT̶uwR= 3_̕.%6G3`;(=01C*/v!^ =p`?9=>?%3sm5n t]x#?C꾼)v;maMTn_漂w^]tGx]\DAxB'sUh4pdۮ a{W6*q]\f+~ȣnٯЭ:2.=>OKZaC> F݊maXOuD=f?Z]|<kI͖,%:FSrLpt]o4þ|˸!);"RtK,\KH9n@ WhfH;ڦiu:E'+z> stream xZQ ~_ǤE8p m p{HrkhQܝso9 E~$5BBd|J]k]EJணdcAͅ@bpUkq $U$\¥.iƾdm苦@, k9PeY)u1:LMS [s|?Nˁ:\+XOR&QnJj%џ [Sۖ@Heb P8(YLdn>3>vCC5 e7R7AO,b50j>J2Zː"$}BXr 5MkP7 $ ʬ.Ejp]RPGJ%`}],B F-2cͧ#8,g8@+3&8}1]OCkgrW%$37OR{*[` l׽kM KC|3 ̍"PNɟܬ)kEyɷMY\.w1w*-L߇jC? ?T468~{q7P'G)>ޞ_0=Ɠb}c< \[_dwq#H&~ؾz leZlכ;`؜_蓝LO6o.^m(旳nnTx1xzyNw" m5SD@ef=WmmnJl5=:?b;w ITԲ{8zKRӮmd{p0pQPn 8J9K7&5i~;콎5dCuE8yk&X_"Qu3ܣ)0ORhEh~+*=ll+", .u%y"kqaEtbVOg Z.W$jc,enf~stkfo.hlK6%풍vm@!Ư(2'^dV|&Cfk߆A@nEP 7b=T ^M8PP%dD)BX 0L.RO˅ClW,Hk\Jk^t"xZ@hP (.$U`v!sEt]tŜwx自a~z.C<~X(;0g=RD;h^?ǁ/\=yE|"J%TyQ5YX)NI p2J53O'2q*壤QVe/$nB`v\I&V.=׳=ϘU:4'-6?c,=囤r"(-PDGE&K͈ u\їf⃕E|vxnї>qTdtm(}r^W\^iS,K}jtɧG}QӓW|Ӵ9= n/^O~ؾxg篿^- 'G(pEa "5[tC߉q2k%Db d)*=pM -%Zs@>Շ$Tv{$!ˀ^"Yx1)LpC- `3,,0S~4[+rSP]'V /e qwO4˚f"p 4x}f]R;;SD{~^!kmjwvze*el|߭?X bE#p 6mSM5!muiT̓M@ʇvm(bXEnV(eNwX$IlFNߘ2厔YxRtzb*:/PYVL9c} uޑy{h endstream endobj 1264 0 obj << /Length 2850 /Filter /FlateDecode >> stream xk6 ݧ@IQr-R EpI,˻jdѣ %K]naMD߻|o//} š˭'uȴ <D,w-^\mJh&i*)_tI&^gE4,d>_/|{Zi_{ݯ=8>< /0Њ|̗۬M q 4.oȘ/jyyE?őʪA^7j0)7uU ]ʩ J1cҨ< 3)%?Ҫl i982mQ&謴YϘ_1ʯ+o(5YvMU&XG[J$FUQoH$cƑ D`ʖ~kT#-=bAv$w3C lh:㑊Ew 21ŷ 5Tgyԁf ^r_u'8VK)uJ@Y# F,nDLЁez0"s޺k%ٕIjG 8h0@/.[ fgF$>R|-!P :MQMgG}@0]c\ͼ`{l y* p;C?:?/;m '&7%0h0O{a6@7aG4XXC~ Xa7 %q!x".~[;sBqpďd5dݤѪ8 }c/pB*)"هt;mmqb>73^+&}kh ׀h<㻵 hw3p[#)X#[Ǡ ͖8IY H=@ncQ҂f2`e!*B{0k[]Р"`<<B|" [$;<@Z.YrQH\P6&!n&%8!gKՊ F0I3L$뼠 V4Yji[J-riM !I{|+y MbWA*_%74{Rc*:3E$% \ g^R$~K0#\oGͰ`n0x0jbPm s>@Nahr4ҀJ>\v߭`z(J01M_T}}^9j0XXEDW n̴ZA!jMduSN;e1ʎFDSo{Pvljh9I\TPFruAb!޾bP!fQ~Yd?8/@őjkJoypVP?'tQ݉;1?YmODX^X?uuQ0:ӇAqG{hs;B5qQcv G)r͵Ox~B_p&=JE |G> .tcĜJ[s{u #s=v̹WQTŷw]|[KQHl?> >z\s׌ψvA4M`Iwi[}9;tۖ;vR|ܛK;'zwOoC"f $ug[Pfc? Nt73}vf><4QD`ѠR jy9K2ɻOKնޘ\lM^> ``ڌͰk6ɛk-395-ʤhͦ*2^78[&e޲–(bK0EȀAҶxdǍEmnm_m96'R(,S+>5,.̭3z&k#n~_ e8I91||~^ n1ٕ&* x/.58RBDslڷu'c mP/19J$H";ʜZ0og4Qd~qi<{]TLbtY!OTiIϪA"Ŭf*<2g=Gڅ-192VtHd}|kX,}ixz[B8,H|Xr>h M#2c ƌ endstream endobj 1272 0 obj << /Length 2781 /Filter /FlateDecode >> stream x\o6_{5/Q.n+CBqd[,y%!IJ쵋Epidl|7opB*sǗpoh~ ,e FCŠwqGe7(B [|W E%vW>Rp(aܙV;G_W˦b6%Tf(/_/ P& }Ws*w}VU^,$uiAn&)Q\qV%QwN +o.3|oi\X{<~ m6L|=2sAkY pMYѪ6PwZFł氃p];|:`Qo_)YY= *_uc|dU^!Q*.2V,ZC17_,%i!(rlI7'-9%_* #g$ -u*t6I;lcU`*xiK,ڏYh1(y$MIfzj&) 7Z`o$e^m2SMDNϲyl#N8dc.J"seTP{)=O]bXc.#)bT e}ƟQZ>m#[gǏK`_QpK!/?ӏGsV9N+ABUhs@N}Qk0$Pt~~ ϗ5 0 >LŜli h@,.#(PRȱ/{ z|DC!cHAe2 [g[ }8r*u6B@:6.oƆZÌ`E(M' Zwz7BmWche[Pm<) A,|ghi΋JE_>@A^G@4p(CQ$`0|p_Ǘ[-?;|gGށAfLdp<ꝾʨSC / >bZYEյ~u_]\馆asOEaШ( EAfCB ¤DH&EHMa^ģ$ާ*UHL|`M<(f@q׭Mh2[5 ૛™rTF-$'Lzܡ^RbU;kƖ:oh]ic`> stream x]oݿB}.hf$른rmc܃+盛$m\/9>-u ( X#!9~I:kur;O;87w60/^qzʄTIIq>lg!ɒJF@B껛_$:1 H{¸Yn>:+BGsop͜뫿_k{Xu 4 SƒGtRKWڐdZ(Wq>.|ם]ﲴ|M*`ʹrgź(s-:eOm,$O$7lE\$˹ gk$夢iW_egtSLs9yX̌IhkM13-H X`4[8_ ,!.Au^hI/Me2 ..ŕ-4h`y-/+J$s t6qNvn6Lp[ B9-wH.)xLtt^dE{RUK0jJ%)g\6(l61[=0jXdd^>=ba*FաqkHkGi9=mOnPqbݭWJu \ caH)9[K7M|8bZ:E@gyO[W&=a륕S)29<% sS6 ߢlJ|~+!tsU¡Gyt=@Z弶  C}7㳺0nWo ^_*P!T WrfjMǸnA prN8TQ#Qz3q8RܻNS+I +¥hrA*,jᖼyn`ez-@~/?g2-_λQZ4f$pg 159a>Cxv.SFİ϶2U@﹂ MCݱsãJhc2zhl]FrZJBySMp 6Ah8Q])@(9ϺemJkd~jm*{ x\Nfd:Hk<$F@!CMD݋)R&P0bJ bO/)<#B묨2|)t{$9͛ EkZ5_HiKA~j\p&J7Q߭}[hE^iN-2v# =z(yś+n` ˽${1Q /1HɃn:?N9N 摩C?ۓk/U-:pPNe$a É$&f*9AS*ڭjmx*5%l`K(_nj X{sRB7L{T!;mD^:_ݶvh: 0律Do%}6]nwϤ˴n>z6f/1s29&8,qc_ )U(9&]x<8Nj0?+B endstream endobj 1283 0 obj << /Length 2471 /Filter /FlateDecode >> stream x[mo_~y|(q~ؽzݴ@[li[vʒo"YTl'dqI4=|8 ۫oHpʽR/# ]ٛJ^iYƅQfj2 4el(#rꇋ^]P#FBzG쭠#&"Vz>z.q-L?+6y=TbnGa(D!%jt 0h"xEar(zW)'Bs[[sE`7 >7 N*U^ 2#!lGX.,#uOoiN̅`p3#ڲ9x5!SK#\mןduDTj pw B`GQ6k~2sudEUGR#Gƣ4]EoγV2 2V[vGY/v".`{ofݵ#O( 'zs @^?9cSnmZRt,I}תPGj'cin²"!Ed  Ipl$T= F@|q&_rf! `TꦹٻM4] ic ۚU#Lڻ67J̪x/U]>E3 &ɚ$EilH&LKyaZTJlZBVj^q˳UmUƯ,8{HFq-潂x٪;X0ݥ:1 \%*E)XF s}TI3" =g7@xXW^`/Laa) AʠB-m]% f( ulz-efnIUř鼸3T.jÃIh*6J*tj`qh@k&N֒>5))͑%3?{#KDv'' IM`"ܨy)oMqzlw țI6'`m֢ MJ0:xr`7ѱc DC5ϕ`G[gKBT6.>&_L,IU9eaxu3LV/U42%O9x_\NautM +GsǦ4+#L`mϤ]`[]jGu4ѧsB"3(S90kFxE}&W N}en?- LRXg9Ac1g!* ;(:?G} {+T0F' S:6T'\8[2G67( ;L/ endstream endobj 1287 0 obj << /Length 2061 /Filter /FlateDecode >> stream xZ_4OZj?I [=mFIIc'MҴ&eRxWkͽWy0P_~Զ~1]~e;nud}H"ݏ7}C`=ϧ@#lss{sÈi=_m<.<޻npWIjZ#|0OMW/m; AܾڼGI}9cLx4S1z0?0v&},OYnߞ[b֎~le*4u]Ēf%l|0 9iA2DM3I݊yX͛p#ƕ7!;o8"GAZcj 6$tK$i%|Q! `EQu*)=v(Ga$w %Oƣ_ }9dc[wn}2(W9 ;6I} ii(ܼMuP8L11s^:u;?DY⡐IvYXȉ2Jn4+f%ɲh.1ejjuSp*~:tא`hJ0JpZHι@L6 ,qCv@voTmp )/?k?+=s_Ň"]Hmfjx<qy,BE"@EhưAt>pcaWǍ:hE?H^D#鈛05ܗIDA/1li)S VQc;k Ւ=;?Y6WF9L1B3 b`ˆg we< N:H+ADM2S"Ax*LAcjhޅ囷SWa:8oHPMIB4?g8z,g ZWҼ b)5zn{,p`gpI?%8XN]6=ipi<\ji\9S_Q,lǂ%j0lt]Pp@~*|VLv\O㙏d;4! ڙ-tf/ W J{_Ce.s5#{"RC 1yVZfWz`qY9?dYjqgs% u_F%}MɸuE0K*N<9Qs 9R"A'pCz3 Y<ER@$prʗj) endstream endobj 1292 0 obj << /Length 2293 /Filter /FlateDecode >> stream x[[o6~ϯPl`*Q;;t0`l9V\IvE(/.M\(>W7W߾,Q0 ".Yp; > Fr*)|H`7v]%JB~oW\`bIs(?\} `bEh27}RWga@^=^7Hߑx K>Β2/zfc;nQ a@1dykFا'oJZ`JAE&{j]"z5Y|2mmNX0ܱY•/30AQDDߠpϷ_ OT8݌CWCICKF^=·?IY/O+幞ZP}Gp4\ʹS>SK$@ƨc_6ayD$ĥMikU;[SsъwMUypJ@%t>k?$j+}Zu~r2(2 223aB&~vW7re5( ZvAύ|~{ dUW}^?aC޼jyQߜO=G{񕟐o^! zL^.}ceS,$?.jfMt)Cc9gTv.P=m E4Qe nn^LQl[.Hyx<0:N0!4e/rͤ{X1Ѐs_y!pZJ?`t[3dcjZDm<^7 endstream endobj 1297 0 obj << /Length 1778 /Filter /FlateDecode >> stream x[o6BC?&ov.q mQR%9vbn:0Gx9ƽF{'3[<ܽ8I8O$ˆ_u;ẇDXs(L:o`WFL\*'?::̌$Ax:B FEne Q~m(0)%CNo^e~~7.'aI2u9&qMԣ bBلk a`q18OrvQ5Y>.ƦӸh0fpaDfQ6s\[8UG,"͓4Wy炥Y#\Tm$ x-fL!&dm dur&"ek8+R9r<=i#B,trF1f?^$0)Ұ,QVf spD6ķY ,sZ p@tF),P|ɍDb-wz';pQz!p1؆G0 m¦sUm@YP٭mĨjw &ui? SFbqc8ƲQ\6:;I^'9^f**xIWGMiw,H¼e4)"`ΕsMyyJa^|)I6I̩ymyy|\uz+fpd rcʛCQVEsNռ'.':Cb蝞!ގ =C908aVBl83ZS3ғSWҫa٫^ G=R@z,K,_1=|;SC'Z!绾@1k/D]<`=w0@O= b v *Yz[ׂE$,V8*yb?7zTF(]q#YcDuzzzcN,oLO[bdƳlSa|(0M٨&T$Tezitpp֥-%D˯{H8TeKhl׿\jҺH;Û'ƭ.@TӇsx/5OCc58-*ۆG OyF ܮm9 1aQzN[$: ӈ.߼1̛*̥p. vO% G9w_Ɩaek !.xpnͷ"cJ"1u\QW#Z,q[ϗ$̞> stream xZP9ėDM iAQ\Bi[8=\IަC(ޥ`4$? g /n>y'F! /bzw jH&S ZVI1Mp+3Ҽw_7 tL\4 @mw7oEKdUDz2yYƍAAuba{h3i0G" ePĿ_K@Q+C>;#.x[9` (PtTOh2<ֶ1KF.n=l2= Ґvxlp< jˢ@;m uZ,͋4oIaX_eUDebPQtn`4Z RmmUS`H(Ӥhu2 Ֆm& qBe#4h ޝ8$oUDD쫙 K5϶XrE"c25$|#Vc M"xUo;WPD! ܽrhnyoty- 8d.l4h#\ #Сh8=(@@` gQ཯c@C<ɐ{`M.pɂLpN#]a0-&OvHDsK;dDGS+ ̯Ջ Dž3߂ÞM[h(sQS k*cd(%~wǁ30l+XG?ʁEpJxw P0<#?1|gI A(p,K"J(d`6`Os(vC{^_|KfgEJp6:+t @C8GA*?{J }u,;{|7 [6. qCRrA,8 Anrl_xᓉョ4[[q󓼲^'bE4ڳ CBvGkezYHd`I CǒF$qRgKF,:GOO6iu\]'6Q>ߋ 欱O?=)4iLƅRնR{Yrn˞ӿ{hx-7U zwC b^|2P88h>2:-H*[`J[-Jh ں:Yھy/H23bcJC&Fш((X-03aޟC+K @h8%ݽW" ļ AWd&UYXegIRnh|H`CHլH*7>ڼ9'*ESjBT$`:o`0ֲl9PWUIN`DrlW2NU<-L>59vٝ\;ZH k1SuaɦiK)9$:)VDhm).,^¦Js9o!d endstream endobj 1314 0 obj << /Length 1964 /Filter /FlateDecode >> stream xZo6B@%Rn&KC;8^mɓeŰ}LJdItIywޝFI<`.qb@@ǽ?$I,{#B̚x\p{~9NVleC\Fґg&p 18 )z\0/kyBa 8z=G.C兠e0G*VtQ|#(AQO0, >:^G >Bh ָ`:څOmJQ|6_m՗b$tSkmgPt3*z4]"U[߸7 gN4@ Ò " H$jb7*HZըh2lnu[ @?' 7 }p3<]ܹz._o+a峫}S5*{ ksB%lx`R00XW;J\XR]XwQT|SXbP@ ¤Uw7ɳt0ag8XĮ}h<8!Is{t2A<@mK:KrQ$-x`_7nE?MfY'6 Z`z]%Z7DXiiK)i^5rh{{Xdq} Ⱦ/(L $wzGf#BbPFVKJd8G{Νx" JkN`!O;;Dyto PJgETH-5b?PIP(nt IUbU`d[]3+]h 9?NC ,oKz5`ءʭneEW2f_W_0#9h瀨 ~k:G֍&1,/1!Y \S =q(٥",q?ufiq3FC{y;YÃZna@8PnHF IY5'CԡmlomӬsm*MMtV TIK[CeWFAcV4<qΥevO6W', Kd%ǧuˣBxn km!R4W.\UB(" Th)V!c"T7 iC]ZaX*W6ŭhdjI8tk)T~JjaaA TBл LX2o`!afU>(0V&4ݬ*IS JK(`+KJG7QXZbiiѪ=e-^ 6q{7Ujn}3ĶBWd;[d@?Ͳx6McUy}E1Oݓ^% %['DOh8j, jt}݃t`ONE4#cE-z[h9M[aYA~oGW7~Z4tڴ!AY1Qh7jӉMITvb} 'ئp3ZypH?ץQoEasWn(ʆssn6+y+*_5pa8;^-9C/Q W&X{6o8:]>+P΀&nCE 2A@ckH[>KأJwi3뜜|owO7>To.ocpvy~vy6KppJz箺' !G(x<أT] T6 endstream endobj 1326 0 obj << /Length 2158 /Filter /FlateDecode >> stream xZ[o~`чJ@d8TimARHYD%R8F~f/%ے( ;̷΍^q(T8S!sFwzG}AeR軟Opo; ,~H Hя'_'Ѣ9'~N ?:0pn[s3l`&\Ap'ak)U7Û}!^ .;37x3>ap߶5psd[Ĉ@)~~b?[gu5{R'UpYh拄/o.`kXx^1`))G!+ U"8a4[8+g|e;Kj,7O^$c~11]J0Et%&XN'cTAZJPykTIiGx ȾՏ PRF?d5!ӤhwOj)'ʭAy*}٘Z%ժk:f zm3gqbFtb kZ¸'=|6f6.Rl}o$E{tCN3!' @>h<4'Af5O6<_<'2Fr#lcr&%2+GF;kG&UNy>JKwW˵'Vqv@@Fof}W/WXJȫ\nQ qkV aY6Y9f .F`L0yRIX-:YH,Mfu_ *D>~#wۘL)hJ@:M~UgOZ6(!TjxGb;fre?%FZ.U _%Ӆe50e}_l  Hmx lڷ BQOFC&ۥRimC{4xK!0,<ۖm ܐ܃d4>A m~ an}~"f`ȇKaBLqorz5SO] ݇N:RLtӕG/5\E~lͦ$}hV`+ySL,NReEV$/,[-?xF"`א!>Df"*i^{];]v1Cg` }D}H$嗹,uI٦/Gխ1Iww+WD};MF90UjLg}>TN3d<w݌t'5,k,5І<442hQ%N3}l3Ꮧ/g}BHo4x~Atid#hL]`ds[yQ/n!Pc5ن&ITj"_,h qhЮ{β\s" qTU(k`*1{4>nQ'xѿؾsuPۻn iN&~Zp_n/Y6ۘ" !Dh`AlcEշ}LTP h [z8cꛈL}Hoo۠bav4N!6ci(Eg:nVs]ED}uQ$tDܫlZ endstream endobj 1333 0 obj << /Length 3008 /Filter /FlateDecode >> stream x\oFi?T} rMb$wM}~H hD*uSKQ/JN!E33{'8g^BIwq1_"_p!.&޻ӛI4Q?]Ĺ)J;3pOh$ˆ xu G<i|{ɻ_7WF, ;=kq{sly37Z Qc,=`$ 1BHe<.\\xH?I\ؑ&GkOs9.CA$T«q3`:$F>&kyTDJ`GjܑsJe(Q.FHb<$ BiFݧ,A@KR6Y9\=磙ºr£ !ĥ*JVaFȹ6hRV}QCK0ٞZ-Lەe#JPH5Z4Io~vYGx70/_^훧65w VZmW];hKAm)hyO/?{lF.c&ktQđ5캞%SȐ.2#ʤ0mM<)ڮuC mu>Nɸᚄ 8!B@r#C;B}H<ږL=)Q~{#%-=+ puUw#q)X|[K&ga= p$:m(_ɴ%Ydya,AVJJIdi4ޛA]<2 aH Fi̘g 袃cgY ^ZHj " mEpHop.2[U7FAWnabP{1,,Ebz D J4AAK% ap8# دՕhMf5 uL^2n}TG>[BwSZJqix2zk/; ,+Y1ӨX7LU[<-.(rb#;:N3]?zaIJX( 7Ug{;skx;QGp  .H40Ծ[R@?ya n1Z?lCei6 FWpd\,\|<>OKv)rk}]enBfHW)Z _|C5Y@} MvBlT=B/475Pqqχ$,j< ց -CY6Vߎ I|mD~T[u4&iO aU>{LfUwL5+5zWz*slSgM-w>eL ?mnPЁG}YcAw/ce_#X ?+ޚZEAm$&{Rv3V5e%^' a.C%z#jmh}l&ٖ{ Ҿo[zML)ncĩjW]oT*k׵"&欧 /ݺ},EtRVBœ~:^I$ |y iTwJ/v]]Z_աuHJ KAN_ւC~#*w_ V:@?c%DžԿΦ†_h endstream endobj 1340 0 obj << /Length 3092 /Filter /FlateDecode >> stream x\m۸B63| (Ң6d~ծjmG8E/e-ɛ+m3ÙM/ry5gA"Iepy(("*8yusOgTIf3^M lmxI'EaD.\p@,iV'\A#upg|n)IMfʲUb-k\eni-u/ z1]z._` HjSn{l"ţg7vnLjϫM\wze\8ޕ]Nqvs[sWoS"&I/+K2~kX,t0#A+BP$7].7 #Sx6.1PĜgl7'Dh#Kk=CL\[EM!S?$E3Gx#8g$r{e],1'bfbi\"$QTG|!j,Z/:<&}|I1&_ųX!LH $,2V۹^T̑a%5.|w>:paE30 B䥄ԩ#;UK~)$Ee~*܌1{-0zq&VLI)7T!J<vV(f#!{!s&q'ջE%<#"J,+[9 uɑ~Sߥ9RK5)QMBK Kb)˖fAʧ4 )Bt *]i QX@gTt:v!YJ qkspf=_j/ztȅ-r]%_mLGʁ-~j=1o;+3 6Ho]Ǿdž ܁g>@f&5[Q|}=:B Fk39tE,NDZGF5fWXN ?D!lO_5 "a80"A&R f8RJT !IYN@6 P\k7AKS3iW^q# Ю˅^6YrC5,IgS kۃ}d&k 6)6Tp͜tVQLE:\۸r >۳H9HJ(Gp+ Lp}n%1_Lj x"J|FVt 2+'E z'FXxE_vcF'ȳR,쓎^c-$*HE/ Q@`%qvm"~9fk~mVn(=:-n A~8MnC4:+{c H+ϗ7kz<jA|WCLHX֛uUqj8_裂@p}K0Ko],d:D7v!>6ՑJssOkX%W V8 -S5)LLprMVE~`ԘʲZ_OOݐ ،Cs|揍JwGls54UVTYjm .M[NJ J~t5-)DbИ!Ѵt,LѕJi>l!zotǨigw͓ wQ'#P lFʔ7Lh@HBWO:a !Pa̯i=T~8QPJ^qID6z=ZjJtQ{KIwvxQ+ηwPE '򠭡٩5.=1ARAvwtYc?uE8(qtRmMdm?咹}8bR" L%탔u^BݛKs^fٜY<<ٖ=yݦqV][>2/,0=Y=\)l{āG9\O$,9^mPP/2~y,f&+y4WCspPˌhH)_P(Y`ow#2/}[S *]̧ yy_pr29u?bG>pF$ :fKm`UAΧƃ <=9cAJ!cvu΁x}Q![j\Lr,V57vާCh85k6$/j& w')&,ϵd7߬WWFhWxZE^RY}tQ!W>Ed+X߿1 ainĎ x9UW'_ ;|{#*}(Omڪ{%4jf>xRP]H8Aykor!/;ُ5&$N[r2q~zhB޼KW䜅.s_Vgk]83 bޠjA Qn.tLhEuRGοu=3(_(-DR:yn.7 s6e:Y҆Y`5M endstream endobj 1359 0 obj << /Length 1997 /Filter /FlateDecode >> stream x[YoG~ׯb$@GdƈlILff(XO1'9x(v3]]]]}Շqr䇋o// #L.$R'k K.ɛ77t:JO["~N)Mz*^ەMK(#2}wūˋ?.( 9RX%7p]¥U/8"bD%s$I xUqI\X!UCTy%%y3y1xJ]mPM`_ܬieǔA7zۯ"jZjܖ=5?tf@\Y̳{r+n {gIlu}1CzsM s72$ld`N{ѼiTϬ-9B`>!Z#i'ZN3IZPy 7EYЂރTh1!&h N'ֱ˧fHW˲6vmͪ. ^UG(]y1ҽvBF,PN;cT6< +tej7?< t:q`.;V•m2X[e n t_@J]^w9d1|`x>?P ;kz1" „$2xb&x8.am21Ŵ l{N7b>:. \S3N|-B";?_#;|EK<׃[}Lo2`H^MkxqV_m5hiGB_clC{XD=1DaK0Z9º5Fv&}eu)~nKV ~Mr6 Zuڗs"n qav1l#mQ4g@$jޟn(p:J"c|9 4AG]5y96jrKOfho=r:# 'lN[}P&rM(/e7MPz f.Ӈ?^bȽTvN2^&Ih; 6(g=߹yϖ_oY1W{#av\aڞ}?xXy QPޓiϞ'yMKIub ԉ qXrC$qjeܢ>Pv~ r>ׅ-;{J a=)`\kα4 kNvn3PTyBuƌIjP=!'էݚ!#ES'cG)2jp& u ;5(T9+bs#GZ64iU"{ X ߂t)_`=xaқ5Qpa> Oz}If#iȚ ?^?I1Fq5&IqarIi;i3_IT>s$L.6; 8mw-_DMhbϯ"MhȈ1&ͩ>[W{f}wަK6f~JeƂ8XҮr]Uڑ8 T.0jK 4o2+#cW3D!z@ :j' Ր5 endstream endobj 1261 0 obj << /Type /ObjStm /N 100 /First 973 /Length 2053 /Filter /FlateDecode >> stream xZn}W =]ن `H2-314H p>z9^K`V0N eX%4R62-Nu )R&PbPY>WLի(}%׿뎿Xh+j2M a`˄Q s0IF!I3_3@{$\+>T/Ix1ƲW{-Q Ry! RbA`Nا&7Pu" ԍ{kGxŠOCI] v9Ƴ͹ L,-;a0>ba0},dk yTj"XM Cfr%dq Xt_Bɝ"#F {4%j^ Ey .]wUJ(\SP9YKbkjvbb0j(\ VK'Ftc')*0X#Im֟#%8m0Ķ| V,pg_}uD96Xe"!%K86 7k=~~n߽zaۗaxsCԛr/.}u6|en=?6p~r]t}"F& Bwx[uLHڬ%edx [Xb .wI g>=N9d3  g@` )7̈óBwQz2U14 77bS >;v_os6|}{]<2|7|sAy)EkF)zQ9UȽßo M%ζe*/DEHpw, @d\ֵ=dYq(>9 {NHY=$ߎDt, ՠ an/HΣy_ax>~x}//뛻;cje!,<7 h^8Em':Xls:%EnOϠHY3BUV Q̨.I9bdD1)[߄!ƢCMf4!݋dҖD2BA( rq=eF/NXJ<8 bmV~|sEx c cchchchcx=l5=P0*Fђͨ$AۢjZ&zH0W;!7GXcIB|}mF߬ g]N$EXFI>V+.Q۲%ei[!k(߶ J濣(1,;m66PegCCR2-FM#`cXy{1[S,In*m^_;[ia=),Ë<1=?#B^!I}5$^& U"Yġ[KEVK, f(-@ endstream endobj 1384 0 obj << /Length 2274 /Filter /FlateDecode >> stream xZ[6~_GX^uɦnhmpރP #^,eaUkSV75?z̔a.Ui*ƶmTkS0c?1ɚ „xBD`pD٠CI{ C!OZz+碞HE վ0?gqŰ!rؼ,];شc:Z]!X Zn9G5RőpMG-GoP|PT :s {<460E8^PйǛ,m9Pdb 9{֢Le+רdl")JFeZr 09OKV cjNx'T SE{qZ^cB3egGT(?=,S 1=1c|bobBػ/cĆDpug5BجPDAQPG҂ I B48XH*2.l")T+1 KSmrPDҾw[g@MoAiK܂A,8`Lq7xi6YWn*}jLiH,mQ-S*PHR?*qeMo0]AMnȕ &Z7 H^cluzG=1mdM"E@ 1DeoT=،z:͋S05,{1s$4'z`EƯ&%&UDwa,p#CD+G؁.IauwzW yx!zڐWKеlD"N]XHZ@CXV!8ҋ.VZ.J5a :`V"_F&9C(5Rr#gy8yP؞\EZZjM?v9Q'˝keM/qᗏ"cBātdoB;~!is *ϹLO>zMlH:? 8&z K#9L 9Lc3c,~BPxݻe;PlQK;0!hj_VC٠Mmo{1k0,i0JGaIr0M'C}jU! , $ -eub^ZweESa{:*Cjev(\|uD /^ 6{^Osd8*yPM* PA _Fé$S춛[:{ZvZ.:da6/R]O. ~Bj&jET.dn0}ciRݴsD$1-ﶩAԩ8q3#?U^ endstream endobj 1392 0 obj << /Length 2362 /Filter /FlateDecode >> stream x[Y~_< \W6رIƓî8"a"Z)w7R$uFڪ!8boa뛿|^£"D3O0XD[&T-Y:^;Rq A!(xo>OP͐›o>zHz[SkPs}l[l"(8^00 :s<ϳ*j"_ҦP3Ҽ.$^*hb];?AI0BL @y-gc -}U}W#O„L*% hC$s0t?Z7hK@_ɮ2/BGF˟n} 1BæD u5J!=n E PHkPbNmпɣꝮjl#صZC]y^$uLd^dcz\Gᅵ/cw#zbo)ADSwh ~[Kظan6 ( A S*|ouO.ڇŔ ;eU*3+)&/*=utd!]|aJWyJie}ĘUb?'Jfn3-@3:O*Qp6ؚ=yhk-S9%*3@"xh(vfŒ`h t?3'gd4 Z *hUuV}7WJX̣cY4+:8&fkޘFVb>w `!"텉P1$n"@h׳myF3x SCLj9Ada=qf>S9" ػwXx5o>f쭄lG>3Na) mvl<*sp,dw t=C#Zp?x i|?W!Ï޿.)$-5D6N:z@|V&\~4CQ;M|[|gǸˤp<}stX 8Ex#rR ’"IHu0#?:{vBE^pki)841LOj|&@H ^]:ÌAbMBa xd}$]-:4 UnV#35>cphh64ĐhdUR&2f4R~dG25O^t }OeVl +/M)흀"RSS0ERĬS/fwq+ 0#xS/Y:3-s2)h\/șcDgx):S„6RKB Eu4`z N7 25)])i;i(fT&3iZd=g [!\ 7i0H 1X\;c'!(ӌ1os/z aP0]^wpÇe&(<X(FQX~{@Ɇ3=@ ôh]^ALGD v8AFށnfVf> stream x]s۸ݿ}f"MNڛC%bK>wE%K|x$!po,}^zڋ1 8nW*/HUR߽K9g${nD&JB#= qAbB`c{є0 cf1],h*wi^"1͓<╲r4_f;pۄ&LI ֢ Z~0*(/`.$Tv0xgK(K?kZR"]M\a=]5tp&n̬ 7}gɸw&Jw_y ÀX.9 1kj/:l0B:e #ب̉ޜ۷8A<Ϳn(kZo&,\ʂ@׍\k)ůuuc#3pa#{`( ߚHW{;0`+-2QR&ˍol > } >"~?ĭpsAc qBX_b:TP lV_:€и"մ BYo166H2v07Y2PTg'|ug AH^z ~ACaAN&Nbyng{Eѵz|}3S/)|"'3z|ߛSsƆln Q9YucQݳ'o8P:KZ_'۳c:(`bdXc?iM-@'g}azeծ/AJ]sg,ؗ|,P+N[ߗ0 Btcb͔܋i&y=N%=޼m0wA'z|d} u0{l~Q`H: 7DbaS}d8!490eiG?W9\щP`̷.H;&mt8㰇¸+.:sKL_p}2!ղ-6OߞUE'K|YT{>)9[3ŢCt530GD/v@G n@77NvaEHޘjŭDuoE{;GY,vl/s!̝-2EFpWK>rJbF:z3wjLj4LQt>m2t~y/3~LT-"G4TPOc@l@&A/(Eqh,r]+(TW~ãMv~wSvDz̦_u2?*Y!xX]4 ݕ~,|Jso)t}/d!t?~g*c#S`iΔ^a92r%$iTގ9(v{䐣2{'SUf=\ t,^rAU-eŽf1H1=k6S[v84&P:/10R>)F,8X a7'ۇLmm?]wHPQܽh?;76i5KU,P_'~M;o@n >9`OvmCBfK]"Cn<^}>*h}rPI endstream endobj 1403 0 obj << /Length 2659 /Filter /FlateDecode >> stream xko6{~ 8|"~u]6iX6j˩$ovQCOI,^ hr83΋#\8ŋ R1eDI)\-4BNSܵdS'd+ڽP#׫/~z8 :B`x+sS2AKx7Wl˯׸`?q=ʱBSCJȀI$\KXsNE0AQu{.= $p9 pכv-*/^L+ŎWn4b]ofW0="8CB ivcuz7az̡1fyLaLʝ.N/[A";[kc0$#Ff;#A{v7($ Ng ҁ^X\)A ն>HI2PuPwOCcGƠmCW"RhA8k k;àcv ܶ{1i=1LjO_O 0gOn7EVڽL gi''0YZN)o<\77e]3׮fE[*!+=xr!Aw HxL!wI|h:l;"1-81hLzq+p'$jNa:zbp{ 6(̑BPH{mP%Qd-SZ5#g v1[ ԝE(/I29ɎQE|0`$˅@ dwyɵ}Vnx#d=nJe;fl2':yr/R>3/q?Rvk<[侽,uƵ/ط5M)lK{oW~bBy>L h|ibD?{Щ!G_HHMܥ./I feΛyg= tbu,(@ӐhrU:),LME]f͢%O6trGfN<P[]5-3+s[9B4g@ة~QK)ZtjSXj,g62lbs%*rC'^,aJ]7 4I H;fQH ͨFPpeHM6S efN^#lw}F\ iݤ^jR쒕 Y%..Aahl;ZZ/ЉW(NJR?]*R6?(^C] V6 -"it(f"-"#D캐mu1?\z1@j/p'ᘟ+ u0 QpB$X_Oòj!(:~#ĉ7ybP!UEITNKHFM~ VjG)$okk]#%2 ٞpwe/u=dStƨ{dv>s =>Y.[(}8\C  f1XpzLP]&a[`k[P.N>R 11=]GFďC/̹zb?uhg 㕡W*sa 4JM'̧b;/['և?n D_4-}OsHf&I{x OdrL;n}/6>ݙ&Zn_k!uwsb8 Ǩ=ۄSR-:Kf+bI]w{kJL5"$=ѐRHS@FG/uٽ"?UT1XqN=R S`}^r?7;N}e"\wyDQX>Kb0UsyrOQi Kod\GeG [ş\)NDa^X1Ksu|}px6~Ii$:O}X(16$g_R<4dnѮJE#@`0`X7?i|zS> stream x\ݏ6߿Bf1oQ!=.>%Bk!Hr64 ?iycz{5XK43ޭ/~'μJsxfv'W(WcG0yf ^EI摽H"_/~pA)K#tq͠W#(&Z F+[,4]r̀KG7YW,S1ܕbElxJEoIKp H.O-.>'1A5Y݀ț*% !av+x SrE/sژrI{4̋ YtJ ɑ>Ԙ//;ؑgHd֕jR fɫ [Q8[G)>J/RfAO(UUA ^qr*_Y;9uwb'Bf1p9ѨIQ ՀBA vm\kYiIb /vB;6&b`E4F_M2SUv`TXwbV>.msmKFp Fw8kTID(,W CY5ܶ[̣m %SSټ<C`K '\p YS#fjHJrC;CO4YsMs+GEb$Icw;BMF _6xԽWcGj:݀{R ӎR2kE:TWI@ ,Y(d{>[!,"W>]gZW{GA[{iF"Q=#^蜂g 7D8+'x.]yK3EZb2'",s'+Vb;r9_lo7H @ T*YX-4KTk-$wN .}$ڴn{3X~]vP|1w}T@EV$@V0<ma{3;M?yTVB˱u_ +F5B1#lj0E:,_lywܖϢU3uvm$u}o>U]r\wc В`Nf!PpUi>8HMSiUbZx7qݾ`Q<[FB CUR:*:~]Zڰ* |_BDVAoϯO L-T`{d ดeQ'q!P߾|{&ks:ԞH `pИRE pspNu>A>#uBwC\ʇO577`bD>R =>щ]~)+(#`(b;s 9`lr\W@Ӏv[,gt@~96P>AP!4* ;ڢ6gՎ'L^R"^D>]ۋֺ}ܬ"6pWMj e3i*uo qZ'1Q"Zܿgu>LwOeTC3ug{Ll˄Be1/8lfhPƒڦ&B1߲6HٻFM?ۧ@t(rehة%C&"sG?-dv]~NihcB|(rl~N77o t7l쵒ضv0qs7۠$JTJ?֒΁&]l~k)op`i7y;}e뒻B_U)xly*o]1Opy5x~||lFi  S endstream endobj 1411 0 obj << /Length 2379 /Filter /FlateDecode >> stream x[[o~ϯPXԅTy-bvͦ8{ӉPYr,9Ŷ /PKOEXp8͐έ^_uB4p|aG^:Ws<(rOD&J^K(aD_tvquvF`>Q !s<;vrQZ:^3qޟ;ÆW[:%EQ0Rxn;`MqsǓ:[ZL?yMnZ[CsGA~lBac.02qY g2oӪAYX[.>xpXG>.H`,ٟ!|zS3jnv>'_, -1](F梥DX$^]<۱b~%Ehz,Q9#4DΌ[4n[yY.K䆗|Rq"g<E=\z>dOsb> pӽ DA%"ɼMQoX?hhbePyc;EʹbOdiI盽Sz-ΌN G/v)1vBeϋR`W5##o9~`|I7 |Z>G.٥bĀtc`WoFMj_Cl<1 i!2* 1edy FϬ^!U!D lPa /=&|eFu$AC}T=\H|~T> {Zb+ܗ][-wc$>DxV?hc8o+%'UqWQ]KqB%]V\ u͵"#\{CUw?Q;nhWZ7YDSOTI1*Wy{c$כ(~_dDnӼ36%tLq%eTeQNMQEe6ߙHY*NJ1k~ fx%z\G=P $DS#(f,/kμ0IeWrORU6D vK!Q%24=ޙ7H"C՚c3UC}Kzi>_(LV֤)Y@S'H dVEwB|D\Z; & "N7HõП2. %/}BKeƩؔe ijty%rXLnE3W=R(onnV\Nj{v`:a9;O4]^tBN[g)7wP:)S$\nID4xO6dB?DyS#xѭ) t1Ծ; %֡?jϡl㈂Yv"sx}q ]qK5fT}ʄu'2y^ob@ )IQCӇTB<م5J0=g_$ $AZK۠^Ȟ: X{tB{*B{垿R6e$H3 w^-qhڈ{ROw寣!`T+K0 Ylpjow (#@զ( ,`U>Xե鮸),IQ3pbD @t2"ax=}gM']֋ԇ2+YPkJ%H,+IM_.: 8Fbh/Q;ag)Wl~xR7f#6X֏C71- ԈQvcqĻel qM ctoqsLyڨPUws< Bo˜~ endstream endobj 1418 0 obj << /Length 1744 /Filter /FlateDecode >> stream x[]s:}WN_`&֕dIF!tJh'x Ms;d I!fV#W`iW9DRPa.-Z.X_ͫ߰?&AAp}? EaDzjǽEj\Zq7l @ȑu=5{d>pLA*fj3;Tuq=i~eD?6WA]3h2Y0I2 P }cDLsbnI=[Cg,= RAxG(Ht'㊻2P :9Zjƃ8ADs'/~VrTQj9) }ܒ@8=jɢu<'$0".zWMCc3H8i(0~Ex#S2ׯMGJ D_0*$ ,é3A,-8.˚[F \ k I˃ f .t8؈CCDc~ *S<)sMKbąnԕ$b AZiJz&YӒ$`` HҵlKm/{cU#cku]67V^u$̰9#J :FoQ]*|=tIj̬--@NRNyd2;wa<(櫇$!0χ/elVϯ1;vy7Ghq75b7k޸=D! $pĝv9}]ҡDǝXy|u|;C9M˄7b9mLxC"Ħ c:tb[GLY޶[n Io Y.&*F&JKh-\NQ~( vۙSjl&8P nd>*y }EjuI%F `=RMO0{"6wLmXg ~0DĦ"?}Hp𰬱+IncFWqI2yq$rm *Zh1-26kXJ9)z{C/9a㿧"J/g!x3FH4F} GVB `wpQx܀E5@.!2na x -aUlV1}`kؔaO}~=L:)M>yx~0sJcOcM7o]SShΩjgiA}f"hRv޶{۫|[JRb }LV+Tf8ݦV~n?rH~/Vu8M*v7of~T>d0 /FbdkAt3?eĿ(I캾CrO}܋H$ݪI1\ٜ{U⩖o\t^4t 9ffB.$`t&|ԧϬ,6Ŋ'޶>( I6u:l{wٵ/Rskv|gxwLt[*Sؒ=9.r7 K:B:;;D`YF|訣PQZa\y3`Pka%bbvyŪ&2MX8PIiGW3_B@G?T2/?Eό endstream endobj 1425 0 obj << /Length 1882 /Filter /FlateDecode >> stream xn8_E_lfIoN)$+;yiJtEʖ#|,!sqf8a֧I#- sgR ə%k[޺&N:"6O[ݠH H{sSF`=lKR͐j_c-lױ~^BThӱ)=oQ^eJi sꫳdVFG @6ڱ=ªr)츹,,)VIbAV,x ؂hƗ;E |83RW ě$A4;= ,td+ fRIHFt,z|"x>}h]:S #P6u%*1 O8ޗ#w~R)?KCu=i-C(8q%r:D-ZMVxr+2鎆kC f=wq0Nr%s(^= KLͳ{4~o(\%)0~thv%޷]i'r{>;UmbCff4o8~hF#m̔&bC q.;8q7-##,l+1*sք y\h\mEjߖ7brfY/;Ck䇩 e)1',,'1%#FY9c* 0~̮VqUϱv=m|hyrbQso^΁㤝rdA4vN2aW\8e&0I]лU+4( ȾohMUDێnߟA֛`4j;;P@x=(qZ z.Wds}Yp$D$v,4G)HKǩF F;y}udujdL0n %¬$" qbN\8ӐDt:ވ8x0{yM?M9D8 rVc@)P $ ~?3#Zu(A鬪Ĝ1, peU} endstream endobj 1433 0 obj << /Length 2011 /Filter /FlateDecode >> stream x\o:޿"Ǐ؎WLKGj;VZpiiMB;G$C*ĉ?Ω3vcéG8;'9Z(hT&"AW[Г Ri0`QR]A٦=!wwGH@@<9WG89мKƎ}Rm?Ubo,zf@J\{}bǜD:7_YPQ~1Kz}J̛ z@Pf< jSV3 ޘ2_JVEg1͕JTs7AغY˔8.%+-*:_MlYuX?WM n .S6?ftV]r \w[Ȫa]W+yŒޯj Yَ+FQyrc+jpa!UُBE o9ϙe06/3cIF+ !G2vd jr?U~N2n0lSFjJH Q<5;Eg\"4ȯa(~>Legn L+lT[E@^}{amV~Hi7e-1\or">}o F1 4е>ow ^e ƣMitBQ 7 D|@Lý3i83QvèNV"1{`?YI @ĮR4w^]rM}7F 7\vjB̆a>…#:hgB,jCqNEs)8)~iCA8Z X<13gj q15(0NQ〢##& !_W.[S? i2'%ثl#x$+D0wA_ X[46p9$?Fm^enNd:&IW!hjd_¶H2!2@0/6\u/7\eIMy1mԚ[fDځNP+! 𫻩\+L0:WfB S{ ůUdءNr?鞞]>_.HN}"SknF;8 +@IjTTꈱ![J$2&V~̿]ƅ](+XŧnYʓO%;zGg.RhC^adFXt2<>kFsgQWO2W"әRZ[G8l"0nxZ-9;F)JB endstream endobj 1439 0 obj << /Length 2545 /Filter /FlateDecode >> stream x\o8_ž$@%)R7I,:MRN-˖ڒ\r5EIp8({}"4#rL ^z}gӻM:N>Ǔw''2IsAQ0"g9x#^H4C!߱7_BQ# /]%d0AU{zV"9`JJ Føٟ>iD%iR$Yjف3;L̀40(]I`woXoБ"B#,ruoic7"6Зh"DfD 7ۣjlʕ Ɛ+=zh:/t@@q:pEM]9Ys(uTIZ`6 >"\xe ~vr%/Ѿ@/`ѕ+M0AH';%TXZz WF " KgE>3)Od\5dUAScCDζGKĴ2Mgnp0+}4[s-Cn?TIF5[sͱB!``hb9X6\*7Wf߶*`):@}`ZӼ̪(a냥pkw5v _鲷:$ y]+:or$^U$>nSFyx̓ig4Ok&vtDpumҼԿ1ݏ݋W7W[Tgc:ȞknB(\ksz9dM^Cjwzu: nF5Kww޿c)ަ~ҿ_Z5i/7W4٢7S#yPY'+(8H)7e1"a#Ur4gۖNj| 4d;uKF#zgo]9|,YbSmU YGxiGe.NMc2q21WOI1V-~h@,pĽ3Od06;ܙcVltTt?ya-\Y?^ 8dgxSYďyw8!x'ˤCO Wf~d**MglU慹JI.J9}1E͵X0rorPȡ%%),cڃ0>E&AؤFOo*Q;0t{c9Y mGndi'BNp0u)1dtY"^^-QC_SNװA>m37H|)rw_jx)Do^Zш]p0U)~Aa«g^jSeWz|^[ƋI hnXkBVy/{};b7K;3gb7Ϧhmz ܄[H Bu-R .upq0`=,Se;6EwP 0Q!+#ql1 c;Q"hcs'nPİp5xp7G:|(hՔQD"f|l3"nl)LlT<q$6[9S>NZ FW~ԠYOVƎ9 x{e}g>RY?\mS Kk}֪X8C4/⣈雏@` (=*8A"U8?5* endstream endobj 1444 0 obj << /Length 2111 /Filter /FlateDecode >> stream x[[s6~ɳ1Kgvg7l/>$$aCHtq!A%Qhdf"9znk9^Ё9*⢒h ,onϗ؁22Y;`ges(2-  ~]'p"ҽѬrIE-X(ݢ`MmA220l4!)/{PuB+AFO;T[A0l2iF c R/ӆ}W,x,$> 6[KldjUe2@~vPEǤJ18=?EIC(?Λh?/P|XI 0p=L)?n `5(fghu,l`{ /e .ey9~_{IJSM~Tpp l\>)ԛnȏrJLCY_3[ 4&1X;]JSW QmYv1lC=7q}-Xn>{ܺn3L2e)]/?X'?6I1 YQ4 -3MRC=gٻ֭vaޝE9͘lD>Lse!WY (j%j[Vz*شŗg'dHGյΌ')KmYjS6Enz)leje8ù.XDӹC Ϳwlhe6}f^"ۉT~*t>1vҋ?5gmI;]ɬ/~ax"8G>2:oJߏc@t憏 g}[uNY\9f 8 LNE!+@oRZ?SGԌ߁4m 7}wvY54hWn6*yrܕ2WYT]H)=}^,Ho#тB!D3<-RI,5pM*rC R?LhJKiulHc:ūO\dF*mٽ=0::<&C⑳̑ktV F,<_)tO>swZ\G'y> stream x[moF_A_}~smlZUmt|$=U;  &w-"03,,%Y:?yc|35B4l"l -M`}u¬5":c4bفL$#7}DdI ue,9ۓdYDKJIדN~:rz.\KYcq^IQ YXV8 ]@{ +22%N6d'cO4* YkSݺAfpK؊'k7-$*BJ8vޭc t&&LZT!fQg!"kΟQ6%MY1ǣ>=ُ.ģ8x#:-ECYOFk|.]-ê&Q,DF qK &䊺^569 sGzI-};7d~?+`(['pb?T^AX{&I_ff, Zu.Q{Rd_ pw*ۊ&5ĥ) -4:DI)RudXF~ ^tPDj4_[H+:#*" \U"#NnEhQzC*0\~'kX(HHXBZs7.I)kEڧqטhn;nqoEof~1Q/ܜM mFfr4=9Rus\t|+B; %pvuXT.tܒqnfqɌ͝Tא[|$rJh TK}+wKb=! /:6s7q{+g9ŜTun rі:aвhzH 2d0Pj|p 3ҁ9/wI3{( JPײ? RύX<^Pdq sg/ %P(\q:g]LjPc(\&NOoRqš,ϊ0"Z^*\٪HoSsv أi )4XbޚO8Ѹq(P*Ga4liʙi! S{ 4`KbZtưHl݉-m1T_xVSd%@MxL#a[$N 9Nn^a>+p |`E*Ekh>t-ZGqbGG pYS,tAu{v֊#Za"a_OKI*ʿ?]Ϣz-._6e3KJJH V|ȡɪqH 5 )7*C5[xil誓}ޙSӁ>}-֏'d&4;?l2O4wWE&?=r4Z,拴7{֌3@\̇?gӑ=8넯dkOYLEOg¬WΆGVs2܅/_`{@J]:/UC@!$זAg |f~ ::0fgZ--f}vŘ+ڭ8znb*]Ig{@d( ݲx1~6S*df!gXm9nW@_Lp|!l4 -?Y+C*e)柼vdjЉ=DP %/V̧Ӊ-^MǍ-b7U7zDuoCbWѭaR9Ja*eLѽvXG~",=E]#L: kó1Oln}v=>aK^Q0;4tOvxk$U(bT_}jojso%PF|RQˤ_F endstream endobj 1455 0 obj << /Length 2795 /Filter /FlateDecode >> stream xZo8_þYGRE4HҞ=ش#lh6X~3$i9v*yH gÙ CCwggNE grB\z<螯dB*7ovB[_ aR`G'濝}>qaͽbsq@!IQ8\Hx?ψ|혗ٻfD+ ܏@z'%Cȶe ʳyjKUkצyG@G:}Z:x!&W Tgc* )3kJ|G† n7TD“şS\_&SAj~yc~{s>>LCĤyf-kM_g Rߗܼ]_]ޞ/(E&7qqd[Kiݻ˛dp/}'~Uo_Aǡmvm2A~gw7^]G-hG`,;Rp/cmZaSzn<3HDMhY/b;<,Br &{@)5,X[Bk HRp Xf<HOǤ;88ȵ*]>ay$uN-fX#AJ.7_ʇ\W>"ڈ ;'8hYT P<vNW>x:EU <8Dmd!CYK[!wY̯MX`&B!w3z#@Ljĝ9e}ę>b8ph"418%8GLReUmKg2i7O4{X63@З8#P|JtR3v5p:2_.kyCc`"OJy:},xM`.r6>NGPR rȊ>jS}-~Ɖ)0O4hOM]x6j 2ϢOYqUxc5 a /I\AZ@9!&|`(CO'}p1nU鲿F7bv<&iDҼk)^ɸA{aܘUF6" k X#IҫbB5{q~X97Fgqt^'!ޫUVwqQ23nSz{44>?XY 'Ksf_Rܤ2LiR8-fGě]`cx1qP8{QsbWy<߆`*>W?894:~VK$ +Pwgs#ΏB]UqR/NhK^( < zLq=\i=]P?9㬡2 1KkZ{_v?F- NtCXmP _^ELU9X,jռpO`Kz5(oW;?<#渑UzmZDb"{ޑpPm658@V}Rq74P*ڕҾt0q y~'PaL擦_elyl8;ԂГ|P[xMD>bvY]]v^%5m|W]y+Dy`mx n;*?X@5[(,jj/4Ͱ"z,^#'K_M ؾn>mNGQE.>VԶzJM>x?iשEh9֓M~Ru`OqA(OJ!6qKu IMA ߦӅl75؈yX(\3e ,0$CWt-<ٖ]֯?S!$MN;f3W~icӭ9CS -E m-zκ=5-ްo|ܔYM 4}XvmCi""^ظrN^Z5 .C֝3#ͺӒޚh"G:g$2,+Bᐃذ?zZ'׏ƲvmEm)^lhhvk[DCZ){1*=@C`ˏj`ZP{JJs-R{w 9ZUZqF)(ٶ[VYgiIj[0Km' i]WZP&{*ͤYQ[D.].!C&D `zd}mr~O;cqimn3 ncGW}G/ YBb.0wLگ̋DK,7ri> stream x[mB'osfNH\ Z^ %GnwWˎW5(X5 g8zp_n>{YXRݭ"$RGkc-׳/*=4o}dxe6&)BD۟DiVb{'-#yxYƫig1>(j;犡X(fH8*L9\?ei *]!( o, #LaD?;P<'H ړmU5'U0rK O Fx=rJ;Slu1)D%qCO''HcL*If 4G̉bU-c\b< .b2`2R~9%RFU~'0m&/Y; r0[A#7;cG("'{_t^:ߘ'쳞eTxϣ4{{ĽaF7vwz?.j:HI{^0WDRD{pX]W(0$j CB@< kv k0 _iyVy@hgAXhzp&SU?xQTubFh(/k!ppŪ$Q^~hԢ[T 2.5?~ hDG唌y oA=w` iܢ.+7vfqazڋR# }}q2`h} `CHXz #_:D˳#-A8b rҬ{ z7֌eBuWL'Qos I0BSx ;_]m4J ?dxQg_Mg7IXGPOR3 u1otXg;Cƌl̶Jz?ɶ. ԣ*fM9KdS7}~cOZvӺ4:Aph,sYy Uo}+0w/fSr&xf1_F$u^ =]UlY[D+$ڋ7gaomHڳ1l|Y  C# 4Z [ 1l< {f;KW&&6T2]Ydl-ShzkLPXI$i7,B!pHOq%n>:A$$?i˾C@zUT B)OOZvpnS#t HB{tLqQg[ #jc<$KoAwd;p`jR_|7^}|>E3\ 776MelPkv0_]JUXyDJ֗>CJ|B氹MȞ0"1lsmXiCmh[_f$!YxՕwF`r8˸MF3yװOuWe՜nHOB@wHoY˪90h܆>e=Mqg_TP X5gWgvATkN~X.kA.-olL*yp]Jt[s:װU[Og{zv19H t`]8P{/lwB%= bǞgY싲)"4ĝ̀kz7&s[Z_zlw`B %ӉAAS$)  A㲹^O]q KD@^s8Ekgb|68^CA7oN2[ jƉ^s~+}~[?}`$=pt{wnQNZ>d&[k? |>G׌ئz[<\r0OU.'˥ K,Ƽ1&):KuOK8bK\߂x)~/AދEIIx&1uQJUVSEQb~Ya`B^RW0qaX$L -X6ugU*̗+E@Ŏr*w=b Q`R:{Uߕxچ ȏUBXϠb endstream endobj 1466 0 obj << /Length 2574 /Filter /FlateDecode >> stream xZoܸBT-(>Hk.K@E-qwh%G{gH깲c{Kapf8.qvqޜ}qݏ94t.ND>Os9WLn<_U/dLBF>ͧ^_}9 (4#9'd0C|W0g?lYs ~,( ~FD*ۼT\ n`FWP^USňp|v̘L0 "@$NPxc'0N-|Lk&kĝ.+(k@OS#ˍIf}} 8?v>\8w{7g3x+3R0w-kQ`@,0Tg3#GKzQ 9=I+`&D!9AIyPLp#!4Bn0vۋ~=hWOŤ$xU{|4dP׿oS3iW'84s/1 b.Е_UTۍVmc$Kgj6[!Eܡߞé.fy򠞪vL ;3-=a?W#y,ACۈ54IDYeRܵߔ#d-iL{QI@xX"z`Oc{?L 3QTj=/// e^j(߮eٞ+(w)N0P!}HP>#F}!Rљ4 Uu^~imzWaNJ# iD%#GG$Q$>C@E!"= t1y>6PU}[c3&s|{)\m~6/wK; &Mp Vَ>ם v̠iK1w[C"HZʮ)BV+e-NMSlUuS:C#rI>H;{>epS>d*J./@ܿoUgpwr\4]Z/YvU3p@!lʕWi3OJG(sDZpi{&1Կq o4LێE /W̌"z \M)C5'Agr<`8rZۘխ܇"pF<34+mxs?ftċFn%L9AW2g(td(Kݻe/Siw6W*ͷfw6n`_uEf#sOVeժaƲ-L[s,,bf_rKμiU>{_څYHؕCZl'ճ([َx3g߾gbAÕlG!2wf 3))|lB#G ,rS0l~9D/7yu2/"'y(^W6Uq2Z٬0IPیf*K+{]Z;m nʃ4:ootkQ L%{5fPQyN|޴C ˪ZURpW]jy.&#Lzj]- 3ұ`^x􆿙A@,Ovpm[{le{{mvAwzzvN{+`#'B+PE+q$I+D^ 19@) QG$7ie8sȳ USF7k<8}K}Wll9ۻ0z=v#L2ڸ}^4Lupu*+U|)kTdqFe)bNkLX9LM2 08 g) si?D2toqeeǦT~˰I%b/h Y}J,Ty c 42Im (>/)-sSus\W}׶!W fEc1dkQǂbψ:2j ms[3IGWjX[Wd.917 $?ӌ7 u6o,m~/h^b Ab` V 1:wQUZv/Z* `oȬg[-ߊL[vuu#pɽR.QA8 t*R{*DBF, 9a܎&֮63,E2?+.k A5nn݁c}JI10.T 8f+;Q; F{B;SC4% xY>b]P_X *2Ku8 {i DCfh54 |'Ekh(Rg0\>!84lUԌ%d14ΕipBaf! endstream endobj 1473 0 obj << /Length 2672 /Filter /FlateDecode >> stream xZY~__ puq|Nv'( ѦH<;vq!i*vSS5 /thG7>O,JP"S)#5 77MXRצOH1ޚܤ_(#7W?\#) 9RXE7hGDGn>Rg̒ d *ӑ"a){,f)0wd@*TCT˛@ +< `Id *D`Yܔ7YoYa(rigf W)`sX;cOXg ]FPӔ"H,ɢ%a)%BIk%8ޘj#{Q%Ypk7<4YY(֪ӭфiDdHV{2+f='{,pmwD8ZFxнZ7!ޙ/eQguc]mzAq0~ҠoXw9mYcRY zBrs̃ 6f0p߬l2al(QX7aO+I'|v`)pH d  ;C^Ƽ"蝹)HiVMpG!YgȱDaҌ@jl@O6s`9":'b0YC Ų MzLy?# C640,Jh q4vBFB-Gކ"EL  Kh#{UXb _zw,g-r~x~t_F6Q`iBPQ[wS!%$@IX$$J;՟Jߣ!iANpi)4A }H˪2,6]h4@ٗM3e @zQ>'Y 1Kg%`.=xp;\ ]^b_7;tK9_Jz6^BBEE` bP_LBXQ@GxeDAPLkgE4 %2)R< 6-s|sbP[r>LRXoj-0a|u'Zƺl?vBg3DA ݋]61{`30q oA;ٳ4\"Jɳ{:M eZ%Cj[!*u{*دbYCiG8<]=gźm5mjqЄSZ= *!&Ǽ۾O8b\6P=bd'3 ]wO%*\Oz!qܺSacَS,yGxu;>i+ۍz&3ɑ_ >O 2NJ0tsݙ0i5gEw;6L5UQC-j&Jq ۅ1Eֳ^bV= οgۈ,oY1ɴ)@|FmkzsU_Ί˚SunyW1:.f@Rkf腂͇tEnG6b8.yZ@uQ`wĤl` |zeB%A1Q3 6Ly^W5OPמL9D25l J;3Dh\d \$#;0Ll*chߤ띟U]~5k;Ɛ7)sh@_yd7SnI HRwa;H.FYHCv43]HW<;)K0h O O۪܏*+Hf B`6xnZp<&·[ei,r;6U$T[,)Xt.5lXk>҉¤v\/P`]3 2Xm@ud5VCZ5j#IC|Atd.k_60F2uö嘌lNՋSa::dtµ߰$9EYL:VYDam;on/ۋ Eu{[湿^J.L_u;ڼzN_ij3ZLv Rh208N\2d9\s/SY؏F}aFL"O0Q,~y䶿! w&E >[a8y@aXrGn44'3'N'6ڡTiA۝鋗_)Z 4vxI'0tY;q6Pq%!S<&d}5àby/2\@"];[~iϺeh?Gm5"mBMpJo`F\t_5=/WS endstream endobj 1479 0 obj << /Length 3137 /Filter /FlateDecode >> stream x\[s~P*uWCiҦ֝>lZlNd%zw;= g“ |q6IP"\&N׈'lr~sLgsuV?Ō}~d,3"0".ſ/ 'đHa5Y^ O#Ƀu;Ru=.MIFl0SrkKww*3&bzϨgF4+> 0V2zh&;< 1~9 ?O)}A=b?bb $wDx#r@0hשT"WfV E$*l%m'c &&Ij;ٜ=߹ov wIֆ`I9p9!ܮ!1* mqzRo4b>mX=zeVy!f n RB4CܸVO,n*]4W12xȂU 6Nhy:BzN X{!"" JӑMb1*X3p+0K@p bBw"a2wms;q+sk\Sw+?uGD "TNlʻJMzMWa`q$;9@a$CbջS /1,Ԁ[On<=>e_!"emj(Ra6 pmM#9u"`*|̠{9ywc-sqWch^N/lDTP{z0/VHILc h-okjlmT :~~{mMuLtrlA') q`L Yc`Cb6Ya#:S< muwJ!mD1H!"86M7ͪlV/#ci%]>е7^L -'kF}P2A/%ojC"V+|H,Q!lj9ڎ[U 0a,bx4j4iZCfXؕ Zn e" Cz|7ip.IZ e)[ax)k7`mo"D0*SX6Ze TA@1a>C# G4sIfvEg+Wϯ8=1{*2BWG)|UqTu(`@*p_~ ﵳܠ!"2GJŮN1L "QQÉ9)EE!BoJߘ+Mg#ǘ_`ay%cSL4rfI)|!;LzD[_3m5D{zDMk jrBl]]f>y z3h M8s[~$,F]4.r'|ꮬjt /Ř\}rJ(AiyX|XGWrPF}ht2/ y\""CЌnF<0kωQt<#6m1ضn|X\~`y$TDm8l?Xb}>8nDuha :,~;?cAJyR?HI ^@Qѱ8 V<<(0,I8'~6$L_}fOLcR^zi̖ռ;TY57y!^*qqӘUyў7gSiËK߯=<պU-q0cZ7_q[51r#wR]3?) ʣ;Ưu/*s؜|qZ~]go:Oy:kG*wU_ q>.,~%[4UZ7@0T_4Ŧnυ}b} {8#S:<2ZQ%< !޶ %◝>HB$mՎgIu F$GlKO_uU΅=9&{ J#rH/!G$ I@&>l{.N\G2'YhN{ȴ7Dg?"N!O1/$QxۛiA,)>5 }؟,Z%+/^l: endstream endobj 1378 0 obj << /Type /ObjStm /N 100 /First 980 /Length 1996 /Filter /FlateDecode >> stream xZ[o$~_GmQ Z@ .hu-D,_WL0NxHRmWwUW}us'&.rqWK+R]"XlEHFdWmJ-FF$Wc6fr1b(ƭk[3(P)..YL ɵ=N],MnSm|(=,UGTD &2#a1 O)TT!꒖vGtTc4J\ f&RZ"lf݈5 \b(st)'{@Yb$6U`qF7akjoʄ6Al*XQXBAvTnTmN9 MdN/m ӦgjTUM.r{S]rpbl &8,%\.%|nu2pS xw(\Jl2. d12$@m^dRXOAoZBh;5%Ņ " 65RAe(,ZPІV* +&ˮHbPVs(*M%N Z=Hʼ8;[ sĴ"_5|sB0Շ_~ybuu!X6̷)Eo.*w64a;|^}unnxk%6.-gnyu{cvbxY}X]lK[f<`T.ָb:l]]M3}Zڹ#b#i,W~m__^_ W럖&.>;4|wC^NEZO@WQ=kv/VWNÏ7ru'c,[6+y 4 1u󩃀C\F#k =νF@Oụ̈<Q;B!#zIj0iF#|H` WaNJqW2gX|@AK= ,">H y^5 'IW cQGP O@n6 WyN_ bغaw@-Lg$PgYPEsїY.r$$Ќ+}o`*[8ͽ*qNEО(V4>t+÷oGe#*Gp#i{jrH1jh@TY# b$1#W 5'tA<LG[]l|#Xɏl7[}1]?K;11\3|`: 7bzЍF` ܳxؓItW^Wuil#u<x0a gʇ4ĝ1kP4͚:%ݣ%`ӑj̿[Ӽ՞؋*g ;;5aO>kxD4=͝og8qtyeVGeNw)\͒</qW"PNO2fFTitmg~UrRf02+ Tœӕȡ !iT4v.޾'JNYϹHG1e)9FR %;⮔SN 2DiF2F>Np92 uޙHSi'S@euƯTPR٤]վ@dݻԮ9ix@㔽x<Xjoygh_ˑ.4Gpŝ2HcIGZgggMcx5|+ v^ů\.?U$X¾ԝ3R_ endstream endobj 1488 0 obj << /Length 2693 /Filter /FlateDecode >> stream x[s۸_{ԉpNrqۇ8sCK̩LHIP/}m3&bwyN;;-gQIetv1%h"XGue E/'˫$^5-fʳ94/4CB.i2 6 w7Y^֮|UZے_4߾%)7smpEʷҽ)3?Dl_myiڱ7rùu#MU:xdz]2*SOS?z8OKЌ/M"BP"D4!HquQѪUn- g1bR$MU1n JbFS$P% {DDaeÈJUk?iLFFPl,1AsKix M(73_˪~acuӢndfC5++ܭuv}U~cE"-t1 >a,xް,gsGRR/yUD3=JtZnc`NHľ ^J&!Ict9W 4#@cpe]Z's0Ju'VSDJ< |mbFFmD]k>c[bt:RrjGo?C-(1d7޺ w0]h>M$ݾ>۝% @\DfgFۇ{w=x{.iXhr+ Q`°b% E>d ʂ`{Ԅ-EP5u{-tK$b W/NZ+#--:/"u% jN:mow1&`XO=owv@Zp1KPe;.clfW. ].7{O[,A4 — _PJ41 >{匰^5%btHVJ]Dot:*q!δ%ҾH.пg.EZI<fz14Ͳ.]W*h`̽q8 9-jjJ ~<-3s+=G/<-&Zz.`azع|V/V* oA?vڭZ667 :dy'jʾكo(!$5robo(bDƭ`Вa/IX+ ?ϯs3,r{Chx$H?y"Q }r9vǢ^u'EKip*܇ZE\4SߓMǍ{{<5`,-z ޕ;.+.&cZ8xb4L=2,?;(oD9auVa,;fH6ȋ5U]5K# '&){ XV++b1xh}70S j/$w-#(o`u:R{9 'L;.*%Y17 Lyу*A ).NhX }C(<"@e!慹}1mDdL^53һ9` }d,7Bw'.ʻrX[[F^*']}XA*:]K"ِG\a_+_bX<kahۡuڪKNj3>ḯ1`š& Ag`H =~F%f , YYMZˤsmg*fOw7*liIMu߀@m]8)> i p, 5u uaBF;ua Ii:>Mƣ 2+=1,ٞ߂1k(G V፺]\fi,Dgz\[]׾E[xLL-X-|Nu1+3E]Aێ4eZ"SO&w_,bOy]127mƄ&'aza/i&@JJO'y7hs0"OM}i<Ѻ;NsXǝ*%ei, endstream endobj 1503 0 obj << /Length 2254 /Filter /FlateDecode >> stream xZmo6_~w^[l+MSvQ06+K,7^#g;׃Kp8t&qq9hrBrXLggCpO8I)$U)b}p}cL,6/c}qL!FtyQ"P >FA* 1jLCh}~(9Sx$"uMvU圊ك]ƍ9\M{[,lkcw,}.e[-5R@(ym:~U.9Y$qh 7-*5„$<#ຍxŐRaքcQbA2`v5r.~K8Pxf9l,;K!Y0YG@ն*ܮBm?SU!ͥ9:gqժͭK[uyTKiƢpLX8J_ ,!0(0S?KYˉ5Ppo/Ƃ0E 7v .bc^=1ߑA-Ȋd5fB 4ЅU}s۷cE[qЮ=qhyN?(G HPb!s9 xzD y~=S8wBブwj>x7jCq(->sd}2hr$ˋq$TjՉ@\OQH2 RAK"\\!Kd5'OP:$S`(,Ӛ>ŷeIlOj*l? hdG ?#IVw}@iw,:]_=k?P|4‡(BA !E]x0J}i G&2 |8uMRrT}:<È_|gOgn֙7fP >Q+,Wҟ8 K;GFdXL ,Pz1bI!ALQOb1vÂ'vUt(64gZ|t)C9ue]ܝ̂ 6[&ϛ~e,1kt~{oS|A!T`Z$M nzHFao:T.7{uyJfY@\ ڋ7ۭuEIW߷XhZ7]X dX_ZHŬW6  IFO x6s8C<)N !Or'8lvįi- FoNUa7OE :ɨ25)D1Q#dÖ>Syx N#hO/&?LL"أd=#m  {[: |2ܳ1%GJZ$G/"NGg±:*? aK!~Q,ߏ݌ _8EddVxںW')lqȀ#A <7#͂UW endstream endobj 1514 0 obj << /Length 2544 /Filter /FlateDecode >> stream x\[o6~ϯо9E ^E[fO3EDJE,ʊ#ɲ,Mrx.߹6F #*gxi6^=x}|(cR }O na-$g, a!Y2QऻfL10Y%VhѬ|OgR ; @`S؈"b5K]@{\/]q<'M@iW "󦵥F #|P MPR<@x,mw O<|fÙr*0l5KNK0[J|QvZ1P)G`H6(; ~I$(MU2NV\4Ǡ zDhn;Q T=H@B%679aSj3b;aK'ʚFoa嵽ѵ!gX+B׃nRyS6NjZuo.9h` s:F(FC?:-\d|FןIAQ=xE]?iqmfɂmc֢ Z/lSF(KW)~iEOe7fLTf:i&m 'g6E7Be Gp q6K+`$<8WpB:W[Ŕۭ{[ \S8i<-ro(3NϷ&K'_Mc\COg f[faۆ2JkyQTmX9'lYMO cX}2̇6qCn%_E|z{۳d)| }G"VȂ{s8]N}&Wv7Ņ)6CZVTVildyM{\rfg2 4ܮLWw&'uRŵWHRldȢ2eHIQ+4˭jYB'i54/ 5lk.3 tRy<ƞhi~^"L֋xM.ITvԪiYpy~m5u;x#_Qhޗ27#@Vꛯ@qA 6us-#Vm3I}-($z,v?pyw lm8aPb=.}!MAN4 Ճ=mV< wZua\1+sZ'q&W&I{ }l!F]:(أuN ,pR`8)ŋ6GA 7qܶ$+Sgf0w`1B8*צɟ*qR6S!N޺'p~m"?SD[9 Z Ϛ@._b\F1+ԽmÃM@_%y=ޥt0RK_ڂFda0QIjjDTc[҃dѐ̣m6/^&T8YSr?L\W .:Z*lh.}XuxbW9h#EӗΎ𿣹:{6.%#l&_!Dx{0CԫlѨ58A͍8Wb_$FܓDE#«*mGa;̅f))ۑRx sQ:ZߊwR{I(^{s{yfuYeSD=UaJFc<_H~1*7$$h:e endstream endobj 1519 0 obj << /Length 3055 /Filter /FlateDecode >> stream x\m6B@͒HIrŦH.C?$EP[r%/EeCr8|HعvūS\-:"?򜫹ɔ"tBoux"PFdO.~ vluW̡'#/ [UkbgYZ&& <[_3ՃX]sd^rt/xwaWG+;Vk[~L= 6)L@,8ζ+ΏrCcƾ\ȫ0Ћ #Z96JvִQչ1--,6rQqBBPH+fNp PXBT`&.R m0Ɗ8'ْsc anB™+2r9-*RگKf4t?3QGj׹IpDϰ9;qk,ZzlurnDxɻ{$iXa?T-R>UTs>EMgGy(;/峙8mL.NV|@̀?5XÌ\š H9 &m' A40G&$,L$b~.͓ qKS0chv~q>aEG#xMܽ èk}cIg̓oDi#GA=1!~%CG \W;7¥,[U5IwyO|F,y\n}RFjHyLF6IӉy(E^Ve}Ei[ƥ>`4ڨ7oo4Fc-rAZ>髨Ӵ4R48ʌzj>6> y1뽮[-˰E"RE)yp;d,Jnp`닺EqoW71%EIJGoaaǝy`L! h!mmE/Fc9/w|DX>Ħ睷R {]K88֨I`Qo(b~< WC!2 BA`U`4jbALB@ PgfH BC7 =<q16B}z ?}0,@Oo0BpFrnqyᲵ ˭]>iq{*[ÿPGznq9A#CdTx eI5pF^ ݲygÜXailaEqfpjm:}cjSI[7%T ggBL.:*(^x4=9Hp<{t1;j2 ts`X&kVɮ(oşܚ> EYyz̹ȫZ~gT#7`LĨQdwjp0@ ?sW!P>IgqKvM/5Ϧ YlG+VeUn,R1W1nM}[MgL|Yu13D)k+ #zZ24>j!$k~Yv,0֯^qķ) 0hç;ö9-kIZC ͚访Qvzd`il؉]&O[CˊZOxQB ~x77""1nȐj`:^C2Q}\[{U)Kq(U A!6.ohE ­*PD913[I:uE"]Pw6E \Bs/? Bmszer pvT(y7͇U:5;1jCvTt}˺߿4[0IbX+>&Ÿ`i#xܩ}#6Vdad;_4>AWIdTX cG!^Sԭ_w?43kyQmuu>7DV> n/ @dy<*!D~wꌫd<0'Ph ~\M-t4OႯN?FyyڶL܂fW^LXG=(DTU})Zpg*۬tNyTը {Ӄ[0gC#aaoD_F8'-KXiDʊj[fxWh=Yݜ5jh?Ϻ뱾|xbP p#eYQ,덐dj39م~) eKB endstream endobj 1523 0 obj << /Length 2832 /Filter /FlateDecode >> stream x\m~']Smv"Iaq.P~p'XKBQ>_ξ\uHl0`QKrvvv^#xg,*(I"bI],׳'|N*{"- l~H ~8|8"@!eX~%a'*5O#&|Wg;ÎWlUבx#`^43a,FJq=g2FT$Hj]4\t><K {K'eD ,f( xUowX6D&;3&c$-;Cȁ,r#)<5P'Y$K?1β iH~*!pş݌w1z=:8ūEcd28# %e.0hjY7X_"@`Ӑ{9~ۛSmtz(7s0]Z*.w[m+tor'ׄؓ>'Ŝysbm\Ky׿xl"2YUP U6;%OZ#(#->󊏨Kc y=u׎f )B8 Z ڐ.Qj `C.J M=@C!I4p;4aVZְO@kvSS>_䬾qV:/ {I j5`io,.{!/9fVAJu\3N?^orO'}3"=X6 &@\oVY ^NMY.Vja#k^v((vYeW+P{s uVs03 |wl&HnmY_cJBqY⳼HW^JnFҥ_{Ղ]gEݑf!tMd qk$/9!#LX7%$lHiC0~4 $ TbLB EOH?: ]K{|_AH >;|!2NSU^le:Oۭ&1>fL -[|j~^#?N7xZd*C+IJd(G ak{JS |uch(__5IrRеdC^1ۛJ/c]C I_VHݸ*u7ÝXsDgkѾɊ91 1Î䥻cztG #jvyNLЯ,lkMqĴhwg 3-TdA`?Z ~8zBu]ֈ-kdqd'Z8jW>h>yp.2/(e.f2 )`b(I#LȆ@ķ(Z_D\ƙQѲr# x=(rٿOgzkGoqbS7<{l]YmZi `X Oɚ*c1`B~W- bRj dWa2"NܑGt;Rg(ߏא  %@̠g^slإZO uMvd~փC^ .܍ߛq jZ2<&a_6F+eh'Ti [7RP 9 s&L}$>4a=ְyA+rerY NBAzJXHYz\5Rv7ZۅZ.KۻN߻nNJq`WǤp+{~P!uVyvSn-x2s b"(# X[jaQ?gؐm,id%Fm(Y%>]brj.X2]t! w)a|Q.YeŶc[ӽKL*5M4;nK7>_{q4]N}d@d\N (::"`bʱm.bח#{LA돚IRG$i_Bpj$j: Q?nOo2)nmgv[*rEY/yXwM\AwTGwd2Q>BQCb҂IVN RrTdOWS4Oq7'זN3@MO;uzpA)$anZ&+#M] ȚmGHR"4@(ҙܢjwmzG X@P8Duw endstream endobj 1527 0 obj << /Length 2408 /Filter /FlateDecode >> stream x[oBfk.sw4I?@D-|IޡHz؎l[F3yޭO_Tz7O=+].E8Q?#ՉmS'pvSmH"O< G,i|{_= eϥwq[6οzlcgvd& n3#)&D{70d̖q S2{Ν||1GJH+OX\T[8/,Z}![#` ULgIhٝm>,i-L%n`cՙHޮkMM!eB+jO'q$V-gD3e`<(Ep҅$u |̕B۩I v.@_N}l<GcNۓD&q \2*ebf #7#HH'?Um͘T@?5F~+@Pa)6 C3&O^,̢uL̈tǙzŋ(>YhaNlW<5xuފV+L/\GF ڋh$xpv_gK=b۔p%WhhNsrS~2$5@h4b2+PchHn×wG:ϓߛ _qXeqOTU{!4 aPb)qJЦlN${P6pCh FK41%r qK8+hchdŘ6j1MxHL "50,kPbK'(f/ G~°`>W [h%‚]`?Fw]r?E; u1ui;"īq_=0;ШfoB0xL նO20/%<ֻ GK|ιQH<8ju%E^2Ll!)Vgrp d] uOwDTє x3t9wރ)0#_~ShTdFUd?du)G<`yVc+:7f_fП0^2]FE!|=>4Jr]O<SYî:6˰8J:՞}q J8vuiLNֳ: O6SgN*:*Q? {]dF(FudWC:#\Jӊ.KcjHw"˲ˀ9rXõF6O ஻FJkHU)C뫞l܅?e?_l cĶƝu8"Mg?½zWp}_M R`_]5mUN)?JuYV"怽wuߩbɥ7hatP2H_Vrr959Z͒&L&[R vmF.\WF #C/>{ZZ#;ȴ~5w.APlLR7x蕎u>=z1 -%kRVCab`猇^3 :'Ğݕt3C=I}U 6?;i$X$N>L ?i= M, ׺]̵ᴛux9ɸr L3搚N+E6]|}ˮ6yR08bQQ@g dKݵo֞` z 3:,Y?mɘh{Hc=XQvwPұ D;Y> ^O|s7cyXZ?rk?v 51F;#QH!Cho0NSb$E"bYs8Ҟ`p2?(7,^./lqߘfPH`mNnDY3-˱"i*Ť8U/"؁흁^d+CrijQoNTI1}>Ci?GtUk䏧g!!$}1r|ԘZminի$ "ba)pA X"=Ym>',X7#ey: GKymCLJ|<]x7#tSnBs &a?oP˄T endstream endobj 1531 0 obj << /Length 2236 /Filter /FlateDecode >> stream xZ[o~`Jd."4Evчl(z,+^-{«(٢Mp̙ssppWW_,Q, nI D\!.!|KK./I 8'/ĵ EaD?~{+E8 ? 0b ]mps+yYi` &ge01 u8L8R(f2(upG}" d0p YŁ!Knl9t:d`"'vcYRb]/`cg3P FlV~r@*pR&$&"'b#B+r 7AIz& 6IơcItMʤΊr3)ءlO "Bf6K}KQzy]Œ3-˧67s,nhot $fY5᱇{:9:)A;fwϰ!aUApԈ{?Km0s=e!1Hx*,lV|;S1 n%c f,3U5H>pě8->1X 8 05bH4KO1QqG^+1n<"Q3e>:PbH A.>M.H(vY@YCv5J$N.'r I}h %S 'Cv)K]H,J]hԲIXŸ\ÔJp&~qFZn2d5jqI`I.gTc(jkeG]ǍNM! eKs-DUW J*[P崊㉙  .]7hBTNۖ&be )ٱUk|oeV?iȋH 7GU4016|S/enp݌fڨ<(r$>Mc9؁tfIq3pnPFA$ P?(}L"ʗhNЉE봷n^+JXVnkoTL085>cƠzñw}ui=7߼8.H)GXgi|H ]V6WV=Ko^ zEydeBiz m"6y׸"=wdc5RzR7/cLsX.lkrI"3tl;/̂,JbiwhD!t0 xpVJ]U}~8.d5#koSSj怗9ِww3e=M[&҂)^R/⟺:xtpI鰒)\Gw(Rk:S6o=HF85,1jcGZצtb1{!Z,Û,O1O&gwJd;nfVg-F~),\?ը4֌>m}8J׬̬-s)_66&VHޢh=z;[fP%YT \H([̓Koi"';7tՉ߿2~yxz0`j~বF^+`o=zn&u0t0oZ1)CX[΋ot:؝߱+F1+ú1;j>E=J f 0,q@tN'H0|gx2v ZG.I #uM:dbXLMXiTXJ>[M ]^F6|3.3Cֹn uyah]WlfZqLM{aGR:R0iY9Ƽ#A endstream endobj 1538 0 obj << /Length 2213 /Filter /FlateDecode >> stream xZ[o~`R@9}&(hr$HE{\x5勨u\9<,/3'BY:Lu/<+Yq =?r+J Y C i8OIa;#έ޵su>][1^+׎||4̘LYDx)j EA9tV>Na x| o9|aʮzT:!fg߆} DpZ|3 7N0 D*'McYrG$Ӆ'0v-  Ǵo0U2 E#C!H_G S{)'_^Iu>Sѯ@:| =(oSd\rbHhNZPv$| Y4@ P*o =J sh>6dMcwmUdWfr >d^Wv_|gROYn|_X~%f(SaYIsZ6Kaɕ ˪Yۗ.)RY @~+29UVީC+?D8"MvO KyZn V1| ^~ cѯ4@+gTt#y}*"q;ImDzk#`y&f~`M3VW*Ąv D*r!yKoeuqqԉAUFO7~oh.*Zab.ۼ|s8s ۫8@!gvBM:*BaEri3if&R(|4T~_BU~qwֻN?nx%rQ3g__7{5sh(98YafYR464~(Acn$-% DʗZm>$f3fS@hUSN׿f?)sTRx}HZjŒ$ֹIl6q(К@̾L#!G>CmVMkY]afߘl6q 6ʞmG7ʺ, ȣq> )~iGGql}24 e@8y^I4)ӗN,iQv3"RbJL.-&+OSh JW@ i{e#*s_SC%ޜ]I`r AKۀKy\Iu0f& endstream endobj 1545 0 obj << /Length 2849 /Filter /FlateDecode >> stream x[Ko8Wê4oQ^dX9%ܭnkG-y[8bVj>b}UTۀN~8OR15&&A$ .lNKS]פX08O4RwÉ&o?8 hhI"hJDl;jHmOyB=5h("r:\%{ɶ:+!lezYշywV]R >tUxsЛ fY9Ʋ׋t 0^$av6'2ݔvP"q]免mԇFrﺿPU:7b(X2Fb\uVn*OUzꍈm=13+jPB$0a51q` ePI (>9ǸbTd+" Ic'' ~X,5_8x9–E9Gbo~]5t,A/]@I?ԣ#|2^њld.\bfGܼæk1Ut"3Gj!kЦ@Ug2&'x<'*c6(Q(K5B#IˊnY 6/S u>uK]p uyzGܓW@.FU`uED=)R:}D`r  j -WX X9%Żi2kB w[?E_p(ׇ&ԥzK˯NCUy7AuO7wQI}M+uUiaqIF_ jߎ&8vUQ0۴S7m:ƂF[D4HiC8o) *ԱDڹ34VKailOG|Oa4 摬`=9OA{ 4~ugXEL׎Kw¯viqxcoRELs`KU_epʼnƤ)\8nD5, s`Wa2vwqH!i_\/MXHmxtX9h +b=GCˁ( x- `:*%u{z>0vf?j Gq ԐҼ0R>qwlJڼ>IާU`X0e7"Yx=pM't$2/L5zc&3(o'~UiCD֟-M0zigQk_xTmR\DҔѧJCVdcUKl `XՆWJx[ ,\M?e=/^bKOfnDjHJؘ?#ظS(%Fxެ߷iĬDϮI ITSauCCr$57FP٣6sLxˡʗaO$g}p *G6=)ÏAvpM<H px?1 7:*k0J!W6Î"|Kc&z\*KQFr2 Lm,$XTg}L9j'}v=u6dO۽_Lk3Hts3mŔ|욚/6ƀ0OYL~4\ s$0u\TQ֩k9uޖtB1Gpߔ jSXÁ} BB xfVTuݺ&k(H 5/Ӌ/#g## CC!@#$(6w6ͼS=J.Y5.2huE s1TfӠ%_AY ?oz*9% UHƚ endstream endobj 1552 0 obj << /Length 3131 /Filter /FlateDecode >> stream xkopfMkq4mHp9HBRwfw%^rvfvv,՛ϿT2HbD*"x_dk'-?p-_of7"2WWR,bw,XWdn*P&eտ ; #qA vGg'u:lxk,CY/fB:S>>t䯳A"ܮ{lVw_fJg[ F7w ?XY^9Z4UGaWsrol}50[ύǽym(~nG[ۆlėyw \l =[4gno\ ?YqnEyUӘ?p1VF%i"C]@`_L I#yȚxq\D/ 8ב6qP.V#p"P K#.N y4t]MT5VDI65ώ[#x֝f)$ s`Hޫϓs1@$A<6,= gR 2.cS4p(掁=a4uԵB,Ef˗?KPjcN h=*`إe¾ư`xrM:Iwh=Q0WћS1܈?i~J$K4΋4?Amo9o~Cr"*>GĚT.mXdxGvixH8 ~ $/>}$S7kdhRq2 C(6(9'y@4BD1K&bűnQ;0Xc`~mCh=U`SMvgp(EM|CR('R (Mt7Nd O |ٺkaq7^G 'i=p%m-Dxyi"\xK8/|A$7L %Z {aJI>O4roaN6ݹKc&v ONc^^ơ:gYɞ~8`༶g$ρAMsL$bA^DJ n|ztNiblE(_Mۥ]Ǽ~T yr& ]=eƄ .MZZ=F(RFCiC5MƆ7b5OG*evt`lP'B3`4J|D#Z\WI /{w^wX%Pv#8|O6r\K &lep) 5rd7.7Ẅ́1Q}6[bg:;$*ҾΒO8/b'ac hP/O)U}}V83]]X2ds` +D|X0_ fqByeգm>uj|6O5ҥ ǍqZ+X|:ef ;v',@ 1#n]ѦFĄK~ ewr"IIN._eNSM[OKl΁AvIiR͈2'ٶ |P4Ed%ׁ̍aw{6oVEKʯCwv:&ϥav1ӈ^3MN/VXO0orh"Kʭ$[դw$e^BXgvI `+5뼴سͮRwMA'橦L{Nø#`Rj&mFISlG36}A_GO"UդZxDnd+*2z9i6QԫEa˄]Uq ~UGҧ 'TC^Q-W?bdRN@Ʈ6L8CVX'@jA ~o\lЎ[* 8YG \fija+U!g7c9ll.GG‘?.4m5=cg嫼& _v9Rhڏpcy>> vi=+vHA` vT`N棙-Q0ڍ&(Tr[/],pǃ#7Wͣqvi )!NDtN<3dړޖ54)`S5x~fhP3]o,zHE19n/g\>A]b0j,D$$?ђiU4BVN҇a0X5OG39bvV|Bx†;2ڲ~v^J+N_2,,2d,puۨhoxog51}b)ʺO6̓Ato.aTI ղ(/ټ8 nΝlU\85܁?>YCa !¯6C k\fb,aL6~ endstream endobj 1559 0 obj << /Length 2986 /Filter /FlateDecode >> stream x\ߏ۸~߿BTyOQSR\=\6>@kkBl'l;CR$޵l @$Sp8?~#xˋ$TLy wM^,zkQ:d^؂*`D˟.~BGhA?w}o?y>nM'_7޼d?(7%UH| ){rpS> @<}9;-:Waܨ.y묬CO@+|ABM["{7S?I֛,/[)AD֓I'L>Ŷz`%! ETFa09)DVn_ZAH:t׺<6ߐ;O'tf͗~wWr>G4#UqFXP*=L0Zz *B麶vqw ۢ"t"%o4( 7!7߽k=e761y39/_~j8e^*)i(Ԯ3ݷvw4є57Cۼ_mv߉֣d ,^F$5ؓj(!O7 *\].@'i69sݴB\4;ԑ0`U3X-5,H7pavmOyPtvN7?psP#}, \'ᇃ'LCg }+jg[, BJ82Y!ws5ʓrdޝfU ErmoބT.OS'ڎI+{~m@nˊM@sDWUkZD:l:-ta;|!RPHΏ>e M4[LC ֶe 2YR$vnVFЇCn̂Z(f7y*ƸCWu0ItRݦ)1θ&Kmh~:3ܺ.Q|Ud>"pP3ET$ew":*l7{-peg0jRo:CQ[ˁvL} 5,uMB-r|,UT#]aˮIzyhhٗgn(CuuK'!әF봭[*mE< ^6uVw,,t&\oӹI-A7B3c,G y^c ^إ:i95ս`[ߓfk^ڞg+hHV_Z7(3݆7ivqwȎG[{iwh7.Ǭ>2i@è٤t7W*`.0r>[\XE0gǴjܙH!E"v }df_FgLFtWJnRiQ cIìbRLzPaUL]z溞ҙz^kKwt^$>2ZY*#֒3wɑ+f :IFWwDFu~eJpI2E>|=m2W?d/"ΫƮf'6 8"9v[MweOߘ? cf_eqHD;"L0BKq`QSlߎ I ׵(  4J endstream endobj 1579 0 obj << /Length 2713 /Filter /FlateDecode >> stream x[]o}P*3_!nlIH6qЇ$(hilKQZ3_IѶ,9[?,Ν;w=& ='iJ&'W&J$Hb1<}}gL%O\oYyNt/\]dD"z糟.~=L-"Ed:LyB"&[;j52|<j{Ƈi5F{v34"DEQ3GJ&LEIO*=œrvZ HGU8I' ,E00QKgEdVA7;Ih7:v*׃'g Sz!`:ӜHFPݨM{ЖHwhK"l}Ίz=; ~} ,bh{ v+=\>3E%v{>)61$ ĉӟO5+? d{E D&QBY #$k$;1<&I2aO-0jČ=F邷}:l5;dzb| ב Xf~oG]0uC)GYfR22񧠏Cpy;)O wA õ(N  g4ȏƨߍ/܉Q'"IĘ8 X0ap>g1sN)X SP"6K*Eݱ4H;t2\|ÈjTtgb)L^e>_:-㚹;7fY/\ghicn*]rk/׍k\b]^{#<ؖyǤ i4(GwB7bVj[Λv*lr~m-j'j{Ck?Wn 2[5az~ԥ}n;_L2Ko^vGH@Aҁ.`n@)ޏUv:Iڲ[n3 1[;4-/u}vFGugBR`.;IߝG[ fn.1|j*M7.}y]2u[75:N{}}Lnԇ$9n<,\!^ ;C af@%upi#p!¢H>㈋1T_ʛ%v-sF#@ d)z6v 18A,Ixn'B*"Э#zy:3̽gA=g>f[A&t!؁3'Pn5>[?նhR ?Z_]Tmi pzXFࣱ30ߟ 4?ܓЛ>ظq[~f2/덞z4}]V?Ay|>3wybS2Qg#XgTz| Oa{M}S,yVSM3)?sCwSCɐ) )p$ĄZVCy5hՎqal>+-,]mreSe> endstream endobj 1483 0 obj << /Type /ObjStm /N 100 /First 981 /Length 2104 /Filter /FlateDecode >> stream xڵZ]o[7}"Y`y93$,.-EM[ $I_rum% p8w>XGQEoQGKtшb- TW b*l],GHLPM$4, IVn!@lTtL òhBrm JW (2@H*DFj|$sk#hӂEsPq줽Ph6u"6vfb^UP)Z$HY TN .BNO\%RɤA׈൘uɗA%5BJ dZJVIFHdim6֖].) z-Q [ hpu9j9ۼ"y!f4xH4A$L+ Y,@AH(Lf y z69F$Jso[$uAnvOBՃ]]_^;jzpnx2$`l ePr@9uA<-B:<@A)=?̦g'{y7 wћ?>Nqhx &WAKhx=OggnZӯۀ|0 \.i$(҆ _OgY ^fg*ej  ٔ9~ị߆Mlq1N_k~],>~1 >}g?d6ῗ>yUҖ[Zɨ~l=VX w+6c̟x'Ѕ`xNf컑׫T[ b=9my7j.bu[%=l{mǀ/QaO5P(ϊI=+J{TΘPđ`!mg$TB;}ql͛針&uxuces%=!t@k龽< z>FY 9RG3d>>_l_p:Ӌ/mƿ22;Ks9x9X}$P'S}|k;$ {aZgѝ=N NRo*vtC+9A+WdM8` YgO8~ i6S:{8䜽yrn5aͣ.}R8>`3v7ثs!l @Ӈv}7'C}KzOv+| t}-jPv]`i*O~+@4{R`bB.(<@(Beܾ#> QDYɾ]pN{*9E6v,/|-HELxqY:u~[PG'[]O$)FFh@C endstream endobj 1610 0 obj << /Length 3092 /Filter /FlateDecode >> stream x\ݏ6߿By:y$%RT{HAyH鵮Jr7͐ԧe?6I{X,cj89C[z/__"I.燒"@ nvOgPo=JHyw g꽹zuEJ֑y1JZ1N:I,)"WIMg>e;5.eeI۹^/o>Y?,/l"Yh;3%J8U(s^B_&_}#ę=UiImlEf_|e#U+m .Uđ`c$,6u֋$f[VaH@5S/\LtߦLLt꾌$umA\Ln:,sN ciT-y* Zn3cT#h_}pc!a|j~|(ɭ~|0نcxfsρv*s mi(᠐&ees\` ܢH#`jjpCrI&N<岝7#dv7ж ֊d"Y's%뗦jD5)svBIJB<vYNBˠu"Odb!QSėI *?.xr?vyc(]OHa(̓d`B íGKQR|K' FE8C8}}ɚۓ5=ѸxX٥Z9 6!r̂R{$2(M}p @+?uT;7 :$7/GmAuLMi ำNߏpȞalg/ާ~qVX>lIQls~sH5z+=O#qš ->'ѸUD;}96CoY'LxT$"D 8)byh#j$8!$Li-vUqٴ88hH]!&,"]50|l@N=ӽ4 N&gخo,tl^ Mk蠗z \,s3,2^ 7E"*. 37끉Iڃ4s)6c!|]IąRk]g2m Vq:#s ys:'xn?>}:DWϩgx̩sǜ1~̩}N8zN}iLOQ.`)jQ僧YD ?EO2ΡuFv^oh(: 3Ieq $\O۬1ͮ69U>WF[;^PlV,ض+~u~,=ˆiB(&Ɂ9uZZsY]&4XS^'w"̳%VNm 7Ⱥi`*?Q,K\|zϹlr{;ò"KH2ҦL 'fN>O<yv/ ]lm6iv^:FctR/W?,WI8C+z-U2gHSTK$$FRzY}2f aT92Ѥ?+eDFMȻ([-/!m Й.4k#Wj+18Q:.mbWتjVK %ՠmِ>mi{w0 6(Wǒxw[IpIV),"4~C}}4*4sm9TF]*N҃vϾ̇tW$S6)׷}2}7yQaķĜ<;{̝C:vXX!mԴ,8Սuw\pס#v%'T{'m3p3ܰAݰ1WM^CwMbUq>;`BPpٝ 7!TfOO%*( Zdaaϼ܃$"7U 5- m dlͦ :2]Zbh֝ɭ}ڒs <q"M oK_& R,ldS]vYn!lDgfk&PؘM,X6=@& _lŗgC@mGD}tlh}?>4yO]HN:o7,Ixz4RLvIٿ,R1wskXEhVg؏Dcu DXDEh q@{w7^PH ,%/Xe!䗲yr<\+?O֏ڋRsӗs~vsn/]aoǫx@jΰˇ(oiS}&x-8Dł;]a 9 wp>uDGTxX{𨏗/bb2.U[o`ph ˈS6Ý7sE!؞$wA<]##5[p.ޏX,2$Гc5qF_g+iVi Sp7]aG0h p[yy82I8%!tV5Yf*tQ8)4rR&m"%rIy#If}Hv j])jq~( [wҦH2|eGtPF`uN%D\xzⲾl8%0䧼s8q;=RXtnmh 8d͹Mh9zO-[y'rt py6?"[ q[NF|Lh( endstream endobj 1617 0 obj << /Length 2878 /Filter /FlateDecode >> stream x\moF_~h] Y\?ćZZKRBR}H%J}apvvyfW{/~8? Ep4D4 ~|>"?JYu>32q)88g04{بH›.|DwZzpLwgL__+9yt?^ɶe!Á3j]ɩP$BF(āWHڼgkE|chkKZ :EY0:苨Â}``"rIx-0'򶗿¼yh}9y BYj‚~; Ⱥ[ t+|T3pypߚAxʚiX}u* ۱^n|TpP :}K[&xIC v5pWT*'+.Pv:<.L?<34,I,J/Ç*7rZ$ޭp^@מ㋲*R_qGuinȧuQl肅jQlo\%Rŀf0]X[!م-)4k7y+fWnkvoda\ 0o2u ?ZƛٶKjRVRZbvdQŘ1mtI:9inGh*m4Kh}_D63@]mu Q!(Tގeuiv.\3[=d7g3 DtQ`4o7kmf'F 74B7w"Z>mL'ClS[3 \\mH"I7cnznpQDB3~{RԌ.:Z&٬- 2'e4Zo0bf&k4^D6x h0_F ge,ޗK_@sq"ՇxJNrZuMPGv6ѝM mmjL$KlEӖ% xx,)0DzdCİݜ3͗+U>kKQjU{i6k4sRg0D a3B;9xڶ0D8u2ܴi,o.I}w 9Wul+_8 v漐=1i]Ҁءl*v3i 1vctX&c⸥~e.b$zZMHsUVr2=z0K;+lŶ=mЅٷMKGR vS#]aH`OH tRsma-| s6(0a{sCءAqŲ72&3{7/OԀ11: Ya'ìB 9_$$ t0HM/mg۫f:%HCZu*l40T'iJ̠@J (b~=|& U!5VtF`.}I5."!`]Vk3v'.`ERr| Q [A4W+=iΪzN@T-Vc:^+{\G4'4nbCb3g[+K `*:;:{,\I+u!&zLfB-*N0{v G0"97xO~1t)]*܌ 9jTkwmƻxHtH,dkWp+|YYlecKMyk"ѵ߄a>~\ī,\\>9XX0iyHܥ&Vd`LI, endstream endobj 1623 0 obj << /Length 3042 /Filter /FlateDecode >> stream x\mo_|pvI-k;-EQ$-Q6Qt(*wҔ,}IjݝyfvH\8Og F2X,(<yx̂En"hMN+SkRL l8O4YEaD\|g B 9 qWg~0bqVyb} L(1Q,`$ 1xEt\ uէ@Ҷe(ӜVlIQ4 `@{U-ɺGBqãhlw ˌL=!ny1Wz MVl5`:)RcV'JuVݹ%-b8Q}YZ0hH6GLrJ6t;g60OʵRMgǓi ,;:{5Hq%jA ˤҋX b&T-ّs_/Љ 1 at aѽ"LrS dp'rr:X3D1k4ѫ4h-~ #D'G"gc圭N  E4 }`iL6d(q$X}:s~a4H 0Dg_zjF/h&.4h_7n$ma.4>\Qp\!8]êiI@i* U~JV2(kBc]\ù*Fn-Ԗ6UR%T0: C*-J!Z]Yo8I{)n*0Zݸy:h,Z`9. s(|T$ߤP]ӤʳD9ȔFV'\P$)j`8װ:4)F>5  Fc jSAB̢~?MΫ9;Ǫuh#"㼆d=|aE]KRҾx)iQ itMx*"Nu}=>H'#!c sަGpIo)ت]&} k6rIWlpJEH㮅` j0™{rW_]`I|deRF_]ExZ{/'ڟzm v {C/Bmsd.:}8%Ǖ[?'Wa0ґP#X5WvGӳ[6s\^y|i 0qr8Wp/== "P⅝pk 8lPv $1e{xY#::rsG@ &2s!5K%)ND ڷt^I{}VY30y0١Gz'2a+4-LɨQC2=<S|@6E+p.@3]8lh '?)rw6˷œc0xJ&H+=,IUnRS}~/ORS/SG:'Ts5[EbUF sgkSo:t۷P@-OoZ}b ģ̓z0,DR܃<0`(υ9TF@x9:Sie5KYgzR а Ey8CRltg4,(iY]rtNf<7eaɔP=t}{aKNnmo]Y1:43E}gTvTҴ4dV9#pLpy`L@'~rOdBVtj=H!p>kx2^rmnx=+l4Eni7ۜ H,]Q'3͉{m9z#eWB*yTGҘޞ҈iz'ߕbۗ.:eRCȉB9`?KM4 'yjTnڸǭ{:F`uߩb}B&B>$Tc.s>T ɞ去I !&6R/( 2وH""~&3mpv22teWզQYf}:ī꺞]M4Yg {Mw8EĽ ,J'PR mO-p?i endstream endobj 1629 0 obj << /Length 3009 /Filter /FlateDecode >> stream x\۸Mb"%(^ѻpm/OI6*K$gC^m9"@$S"93boaǛn!`^bAww 1[OE20dim4 2I%ˆLt󗻛71C(ġ7_߼}a{o@Dpͼ77o%g37?O4Fqb `1P#Aax^uoؿ/۔rB)-mIv&-foøRD# żjBDG Qs=;jEV"k%b"fܔEq? ЎO1[Ake~T_'/a!ZupaUC7[zۛFqMy wš/TGasf!݀r\=l@hYhze.LZ-걼G9}1ܘPDh=8قt!xQc@ !oogE;Lp!J:0/AT҃sߜJ&&K2&O+/sRKonB Xh[QxbC, s͊|̝l6٣iWC&yJ+]EenrB"]˼6- ,` FaCbOu@pPbqna0F*N8LT3`x,MHĶgi&.y <+P#Cİ7&o0U0)`=-OI#}0f1hآMт-GRC2tXDqKꋃ-\ \o ׄjg([G!!5tk1@H#aZ|ط.Ijz N 'sa%f)zO 1~5Ћ<o,h7u7ibw+qSOxG FdXdžN }N:[ Db ]h.">8& r;qUiձKRU=]%JʸfIU\c\G~%J.P2#h?kB ގٳT`±9A qx9Ͱ!`)b a|)-dRm* &0h4v0%Ҽym,b=Tgڙ B|ŢXe,NuA[|,K.+S<bX6jB5e<*͗&!}`j^2Z'I&3͚js&G)7NUxH8؛HuXM4/,T׆L j b༨$3i /1AoC ܘh>;fAU;inæG3M%tKg -F&bRZ(`R(+ ބ=R8ԟVYu3 d\éj}TWl*"P uܷ#v{3F4<|ta;G/r! ΙWS9!}>VpN_ 0,&ER''Z~D<;uh9>x{\ۅ'5@x8I^%t!W3wVN;PF dA1:faJ`7ZAukNw8 UQyi.2C8KƄd,JU #ㆹED,Ǹu]<>t5=& NuُvqS/csua`v){c4Ě:ӬeUռCר(]q{-#,ءZ6Dzsv=_X7&z)rKQ|lMt Xl2.v:o81 Gqq{-k21rU !Oj6[ud̥ {#NPuSUӪ1VA/TN# , U;{^`l7}3hOW!Qp ?<X]`ד*w|{sum=$: {b4x__Z^xu㨲]:f>a0bWzuV5\}PdR7uKmL%tVlnyA޳l6Z89]PFp #SQy} ܉DY|>CuW)Xc3úOi"(jLj?>L.v/{ӀFq{Xnt*|qWh5ɣ|i_5uh՝GNKSpiҍoENS,`PǦ4Ϛ*vtJVr/UHxerw_rw#k@^LkyL&ozzPث3 Ws tomk"0ԜV M0ǯUcd֫GÿE`_J("@8WɦnX}?oKv/?pեj; q endstream endobj 1634 0 obj << /Length 3081 /Filter /FlateDecode >> stream x\mT93"%R-prA$m48hmZ,9m3$BYڲo/w=$XK5gFN&仫o~{D  ? 7^L~q^-R8R ]F2.aD?\}{}  D$p|u˯d?L\Edj&7ەktuճn/|2?(%m"".u,DA8. @BNn]9_R.ycF,|2ZIą6:/MWRk}{$.tSj:B`k$gQ yT]K" un*=OqeZ|OZsڳ1YQ1WKD{k̨d eMKh\NuK3a8\P@GN'}O|B=ASeʶu^$l\'3D$d0"X͚g jc&ͼv]U?~]@( l@{}w"g/}/# { s!oˬ:z0(Ԃ"$!e]5(N4 ϒj0G@9#"x#>?E=]9]2)E:*Yd&~ʸ-*GM\%y_26oʪrC $U-m$'li#LҼRꚸY[jW,4c('u:ZΓ857Y?ۼIU#1g38? uyDj7 'OW C1 E<8<YhofΑQo q? .8E<5 }֢a\xQO4<`5 BT񿐥%R%U*Pn@8kZ 4*{#PQCePSK ik [1pϫ뼘|9Mwzq ^RLtH6}KJceW27D7 pг_fd(Ll%fIrX;vCܧN/H1 [+B>rUccO|ehda 莏X*2kT4&]ׇ6v4WZ. OM) 1:Rh*6kK_:Mh@bY_Uc3QFy1H,>ȠpKN <~lrh]GEO``KЯ))JU2z+$]'8%lГ\}tsӾD(b=,<OMN` `tx`o v|]>}.iL?P`{nwd'$Q8n ZL G R :xd@H|$Z]L_\c>bvB>óߝBa#x2[>W4Vzcs/-#?H?n3!glA=uGsR~>>#R3JY\b!%kҩ+YXj8:Tc<:U(|9Mpz]L0IGiR]QqbxqM*6pʄb0 o°S=CjX<7b!^ %0[27$_ *АY<~^nyV]iopڃyN57w­,jƤi) \,5/ 7J}iU!ѭ9LbouI!ׅ,ԁMhBË{|7N7zp!Am6&;\x^W8)Ks%S.H\I N43W>Z7.ڝdIڎwKct|Wvz#} q:#vcĽ&ȶw6ՉP(kGSIOR5>MSWk5ǡ`k(`I6) 7Fc&V&ü)yHvԣ9j^fȤ\1+)@V]dqL~ ꀀZZH$U`"lWި/. Ya^0\tT5,ʋ.T"+VHRۄ*KNH꽬31oQ~_5qʪI]h-72[Zi:QY>r\ ~/eE\p6F:ݣ `׆}uc˓F~`uLx q99m;YyXwVt*st~WY=_\`e5>}L1=|p=8ظ j[8FOok qя^=V _61BIkT$DBILۤ5&i1!&v#LvͩG`s~FC0LZ:aCSk?VB endstream endobj 1642 0 obj << /Length 3125 /Filter /FlateDecode >> stream x\6lf%(͡]+6C[-?Yr$96 zP+$ǹ+v, Ù!ǡh5£^gћȧ#lf1yj!'SQf) 㽌4(d?(#2w߾{wG)<"5G>GϿߏ0ba0zOmG\pG?ݽVLV#sTbn:)u"D(\g(ٲh6h] <x.*X,x`Q &.@J[ Xq`իɕHx!yhefP4;GH*SFaI"0i.CyPMO㟢bh@AXuc%/k#/Jv`WPvKzTiFOHMjQD FM^LVv`xۣ) MHB`z\~W 룲6 մ8b$]?.d!84Oʘ pg?70HGє T)tƘMyq UZpO e0z .f #8>~X9UZdcwLIERq|(zw9*AlB͡hnCvN*8h;\Y-Cyd_|l43R0X̣8 P@h39T21yU `>@q4!*{C!w LeqSY8Mee:E%G{]A"7`Y.sC,ֲîglbk+ɢHsLʶ[rAQkJYf^l&o2QS`eb疒>cY T.-ƔǴP7ɼ"7rIu;@*Yo/Z9 咫75 TVɜtr1v812/'S}^2VwT&lBji$5g?4Y)fNIxG E .EC)3y3 0ca^a)6,EȢ],Q\d`8*AٓHrX[}nm~(߀'shǩ"Ibj&A9Gh0CQwIiըyxM8!Bl,Oj^#%V}anxSM5۳[V6FG{ύz*U;`SA1HZ895pRBT}Gw6!h@}ȓk4=--S1iю .5~4%YNj1T酈1ȶʜe<:zy$)@13<1Tn4ȜLk@8RAn`Z `\BNUu(4krjωta0`^+'0ulAc'>KwnŕrLuQScfkK0H!o jvu{IaXtpe& ݅'RIrr6B&LXq ..,<w sons{˿,¨Ca@9-/JۻZuY4}!Np7!D {!A<}% }bD5:@b)XorC2P5Q%he+3x9VϼްudӠ{fij(TV NTg&*=LoS!ydr.Ғp|J,Zi"Jp ufHV/Doq/@4Kbb>N|\bx$TwފShQ}QjOo{Q"VeLGC&HlGۭ7p~v*[f+.>[/T{$>ͥ_ƥ/Ü#Zikc5VC~x08̤%#o p:}3ꚣO;1\J>uL:,nql .Jq!}yw`zY}KOW~:IxSZr4G]Cm醁>W:^20{jbZ~{m T7N#.w+͆ʕ;|9o:f{aX@z?V@C%4voĢp2qVr4$4Sٿl1y*ǤU%Y>ڈbhYrk'<.ogQ */`z̠CDg^z:x(5zo$ ?nu.'\שHj2Vn;k專Tqj*.s t_X՞b̳ xexZQr= '+6IZf!>c|E4,d°7LfOM6]Lڰ[,l =2($]oI߾xS;qSЬJUūgG,Xu0${2ԝ)2U ]F2,gN0D}EEU[rL_z 2@):j]ݛn:Nu4]sBݶ1M3<9ث4}2f6';oz¸s6${"F ZJguH`9f6҈>@cŎOUZ1l!S6C| ;0ff-'7(l8' CZgh5iS0l?/wSLZ@iA(6YB՛ 󗙔$!**jVs絞 E:)˃d2tq9P[ʩ9YRaSoۮ\@9%&9.\ZZMt8,nՉ㿭(@_2Y PybV:KES yԖpڃ endstream endobj 1655 0 obj << /Length 3007 /Filter /FlateDecode >> stream x[ݏ۸߿BTtDJT>$}hsE\[Ҟ$'YwCJ]{oӇCp87^}w< KĻ^yq^eػ^zgK5T ~V՜*U^% W^_z`c^ka-W߆?zag{m=Hx/W ֬=jx?P e9ɂCA1<,^2^{+s gZb` M,79XP47g Yvu,, `zٟiSyvL"qfP~;gDwqDi?2:zq\FGOJ~Nx ӘgϦ#ԛP=34!/ZRϏy<&r>ѣ^suaJ`nsl#++8Չۉ $Xm,=<1J)T0b!!<1lJ6A@O`h]{ջlFͺM^iVnSZEWԦǢ]Vu]ޘ[-6E,M7Z9}lE]-flUg\u7lW{wyYmwWv% 7{V731tm +A6 S&cfOؒ8HoRQf\րa"sU*㫳-x(/GETSGQ}^~~*ڎBيJ^>G< 3~x8)DHNx d~@pY 9}C0\S(:b%(N)'qݱoH{ܹ8ε]=+³!0z_I8Vd%`\G#Ϫl~GeE㠚 1\~> "| *G!dOM_kpk޴o#fĀfqn2_]w#Byo&] 5m^-5 o^n|~ݭ(Kj,vRf`)Cnk R &gQQ7e|Gј^w:LJy$ )TeP{!&(EؗHN=pI[IZvy R8eq׻&vMeaQ_:: 8.18_G/ZRPj:";, %T}6Gg P>t\؆p2~1.??EU=&RCRG3HPj._æH^Z|=Vj,Lj㫓h 8ѐUU`Á(guE#E<Ϯ5ʂ*;Bl_ݴd3=ݑdLS}S3OӋv'3dbzgB= ֭m+}2SqKêhݐ ΚcuAl f(<iRv_| u|yҺ(Ӓ:_bis$9B߄aT!$ޓHZX6PlE'J3$w->7QJ'm4 +:0 3_:~T;ȏY pg4̫#b?;Y\ KzU&S~I`X֓g"#zQup~CrT S?*0^*Xv~P0}X'.BBcn@Tapa( 6"is[B]8N1qDM|ﳬ/\ϳh温*ieީ<|(eghzqUr{y Jm"} Ac:N1`vJn'<ڼ1MѡSGNqLrQoKZ}n2qOXW py |72L9Th7f.Mzםi֕!Z3 3C*2u;2וLZp 2~ۭZz;M;n(EEݒ׀ LY}988C~jzvo׮p]Zu [Z]ܒI@eED;C;ƀAQ=P;kqFlMJ` }&.#a?k@_h$bѬۓ, BF)zL9QcIBJ[|ijwXwG%7ykf­2T[P#sxKE#t;,YÌq7OVzVg(NMoxd@e-]a^6F 1/6qNY(Yq2Y WZñ˜b}'m\E~'~@gՈq{BggtJdfj$F[lImH19EH"ɏ7"h)xM~ &1N]4StCB0{RSwuicyF@s+14̡D`wc<>8 e~_'V$%r8uZ)m՜k,*%MS&L&]HK~J{w6gZewhe]WW.?\ q*u8_OitO9I&˺oFa1_0B [82("^qb>Xtul(hͶF~f ̀m&Ϣ}ooEL Y:~E8|:&`,Ҩz6-b.1P}CbҨ{ uk).\VbMG{1[8i0G A4ٿp. X,?Y endstream endobj 1663 0 obj << /Length 3033 /Filter /FlateDecode >> stream x[ݏܶb=KT~3 ~yuw gE~JqxVwջwvC^L qvK^oC"0"t͇KSsZm7~ëiS=R?npCfwEĈJfޒdUͷ=cHrF0LYb њ̧zn%^'[#,+]RtxWa6a1"Gz˪UgMqp?+qs{ϟCvTUIz7O_\/͚ X)(V@ͷ5|.)IyqԺ!gI.MhjAfjå@Gv!5\ 7NEM]8npoX*%?ߏD^|y:^!CJT9dд`Ct7V~73H8К)xete^f1JĘlg1VaCeG6``>v 0\Q ,+@F Z{p ʉN {+c`M$F@AMCʄh6+ x1wY h2)rl H%(0FKO*6z<%mH쏏&dE?lgH bF|v#$5@^4@E+&`J5hpYcS{VnsfIR`RdWx. |Kmw※+9Ių?e`0XfOYl1/ HzrLOn h\Tiant~ls՘2猊 ҇4d"dLDM!I Cr 9^τyztzy0ȌiYY3Goe}c'E%1 "WtL5dƄOgKIwp}^XC lUfdNıM J!хlv 1pA w}J"˫eSwS Ioɺ3˛EHPftH;PeJ-ֲ2K s/3/%X#N%~Ԓ8&;mh-%E-&!ܩe>0,?$YRćln|-G PCA:@9ճV$Ǝ yhx2|2).ٺO0*wnG 7 SB ~e_zg!kA^ƣߍ3Ș|8(P3 DB)HGC{mf3X+iVD $CZqO^ *;P_ !1Jɝ'9z88H ?aԞ9/Uhiqsc BR ҄N'ו[]eGHO)l}dVi[>Ό~ lSe A0/χQ&=pS<$<ݴj}AJГVqeU%AK5ԋަe`6!~p@}=CDq0c`z+rD/L9}"Zi   ?MASA YlGy*Sj 4cS8" l7#\qX)m^ɶj23>?EUIҜX&_B1'ӥ  Qnst:C'!rXP s=FsunzJ\֓$RX{y)A$v2w , 1G tۄ?Is_KSĀ@L}-YmwF]2Wq{gC !T{4KMqe6qvMCFVA$XQzj{+" ={wz% ݿ*8u!{F]XHD&<] wLHUe:F)5M"3x…cyjA 畗ik'T]+Cuז>i33q >wӳ>h~Z l';[1R}Kֲh(sH/lUqb>fmn ~"ܧ8|­1#t9urtrE2I=#HU>IB9PɤtVN/wt wxN;ܰ ݮx:$|~*9 v e~l~ٶfb `)-Fn\?^hsVN!&MfL?>U̴ZRyu_g` endstream endobj 1670 0 obj << /Length 2408 /Filter /FlateDecode >> stream x\[o~ϯP`kVx !('yӱQEv%Npz^|"_tlLIÙ!9O#ރ{\}^"N7yH0 "`}< >a߹qze(dx/ΏZ S4|CHtZ4Aa*>pa}#v1yfna:*ݱcsgG8I:5Q&#$KdOh֕ntR$Iv7dykW}[rB ׇ"^ᶫ3B+JUwꕨu\ca8,V/aք .J[3JXA qm;djN!,FF̔6!qmjJXh h7-q. }A,B^3Za x%߇/Emk']&1(p,.}1];~<YvvnYv=Q!kyNhF4@~ϊ.fRI8gc \&(`A;;PcX&ݸ5/+LF8̿29X*pi9ܑYni!RƉM]39͆2{˦iL;9f8EI.Ip'8[WPJ3yIyj9 hSQ/嚝"tU"<"Ҩr*<$@e~oq$WNOvO\ji?:6n g5]|㰬^1k.732PJm9v N} 5y% g]O@"!~'dlET'6N\f/zXf%(h.%vs>,p%ӡ>-ȑ9qR|}KZ1%~8I~E߯4=ʦ[AVe @ u)&Z0ny 4î%G.KG[4@ EuuI{&rl+L NnDpYȃ;)H]iڋLlt~tts.|cR楴.a4N:T|x/`X$rs/Xs ^W ۿi(;O+;.vM.3z9 zgGc!AL!蠙gW%DʻGҺHOt8Ϝ"kVoaCV ~7_’qL}'Dwϥ~.s)8ϥ vm+w ubCESaCXQQϹ ZHoE\C ,36c!h\|Ib%nr^ 3{VЙW\} uJCWT}XY+E _mr4?B Ey}eHVӶDw/:xݖVEX c(dsm,}^ka;" ̀!sGAl  CbtLTE 86z/7V)Ewa3?&I_AvC˥JHKo2M|(teśhCxT x/^cKjg =Imcék_!1VNuqMsUnX w$po9> tQ4g3Z">OK6ЦyL t1#<4 {8.̙'rC.{@ SC=]#iT3Vkz(PUwcncՉ*%iCJ߬[P%e'D?2\-o5SMYo} Ss0ȔIaz[̛16IvXO 4̏O-$uEl361; nVUOĎ*VzuhjS6т5X.n.=>A"BXZ1$kL:*˃P}GtɕΌe;@AFH?ʏݬEa|āppUF> endstream endobj 1674 0 obj << /Length 3087 /Filter /FlateDecode >> stream x[6~8/PSR|H岗^qڲ-TIf~3$,{r(XI5 9 sz1%gN膒Jg2w|=ʓBEj`4A5sЮϝ1b;Y-. }ݎFz)h!=M ~'!?[)BUm4%\\K/K;$v3J]&xl OS 64Rϔ,.lv .[C(!vJ!=Ezsʹn~O2u6>?7}rg=V@i稨Y-ӓ |ںn8 _9`< l~xoS5+ה"rҤLp_H5:ByNPoX\.iݵMZz$k02~I#>FuL*ɳO<8nEzAh {o4[ TKmC(6VAhJL(-o+5P(|Q-J"_z:MXHBn2ϫ0_&)~{#Udu`saF-(͍c2T{k=z}=ꘔ6PтAXփ7I+SOK5&/z14?V%_v 3REN!U2^GS`RQ0ES&* af |Mv\؄m&3(+Txw 8AO 41X%:0P,@0fR/cTSNM\ 1avZ=t0JwP y1S ZqVn #4_*M%.jGDCKc o@ ] [Y[4:/*ӏ7j%6 ,[V@|^"`@pj̇?IKv]diIk1 ݆^( }0B07`MGHV FRW!;a{ ѭH( atYO6L2kt`)&2{lB=]PXEJ|[hf7ne*`~2S˴Y@߭AYEhۛG hע?Zte/;7~( (.C [Tgf$-pl )퟊xsRI[NÜCPH9f{8Фgjy4J @D_ERVIf J6i*[4mLU -K?9.!&CXBuU$Gba ]>??W jM> endstream endobj 1683 0 obj << /Length 2692 /Filter /FlateDecode >> stream x\ܶ~~.e% %uu؀mNt;|Av%5 5΋Rޥs<{y@^C%^.7'h:A8sssN #"^Q {o/~;#0P Qo~}Èлս=.B._}-X?/=sGAҌ,$.jU;A0<.`u: +'ps[^X) e0GFRZt")f[a(.mM9_49Esx$TQݡL4oc5MESsZ^g/q9t~TP`r5ː+ 뮕.Dbw\E48nb~"z8&=f'үjsr-trPtw/5Z # FTNvjjF}$# ޑ~h^y>xg.y|+{Ɠ?\Ta}n8(:nr-7oqCdz­_d#@&{D@O[ P;{_ 뿲 `vhDk>b5w{km]fu;ixNhoKpMА9C$ 6# >#vf0$9_g1k4`MVhqX*ϧğd*S:cs(Y̯"x,.nbi6xO sS^ERXdqZi&NqZ!Dei9*犽$4Gͧ.f*T>E_-tIZ.",65y n Bzo9"p[Y(&ZgP'zFB&ۨ o3 Uތ1 x`CD]+".<+&IRs\'n*O)|Tjxw[10ҫ8cK;e6)U9M:^$WN'q}X eDmtfG5 mАOd^Z{5/Wy4q17Vf1ʧ$\ X.7웚 6N͆@Mm\t ;E8k95<  P1y*FI #+U3 Q俣_i|RAg mne$>нR* iKBGnus #,Pђxj;mg(hz˔ j}27+m[ău{0& 2ܕYeCKJǨ\?z?ekMi54#!Xdnס~w}E[bTJ ~zqwʈ`$ػ8Z晍"-=0m["2DBPi! !'w!{'"[wҬܲ@B1Co#y7!PJ 5 Yu:+Vqq~O=K{x-IΎJOqT!xY4[_HgLZq)I.4w6|j~^}o-bu"lFr\^s墶?i XMMg&O7Q^&scc`L Wŀuݥ- y-s UK.dyҫU1]mQJͲX_+ 2t:&CT{yBHM~sa3zRJMI߀HA[+RPU))o@-mHgf ni d!,/M»;3! -nAlO!|a]t`m=A|M~0/{W)HtA4iq*D;ٻnx  qnоRk1۞٥m[67M(7$Sl&F;_L ';Z=sH$0.΃:&Y wbt=j:VĎ +8HѱіX# ׄzNyb#ik#uP&o!k0`%I$Z#`MD8)\鹡Xx|~4g;uscjmh}5qh7F|BX?A;`s}Hfc QgD(" X *t@> stream xڍ?o0wm/mVB0fB 1k0:ܟӻ#Cnj-[;p 4h| |ڨ*v\ӡL8(M",R1"V0oA| _bmБ^7m'@X~/W{0ɽ דAw[Kj ;gQUYNН♻SUiDߝtH6]ǰ_P[ endstream endobj 1694 0 obj << /Length 2534 /Filter /FlateDecode >> stream xڭZw6m,ou7ݙiFmkDiHPŭ\,?Asoq O / TpW7~8{4T%<+oyÇ(r'Ao(,<77_gC."FI)yꭃBXw_ ͏%q0T4NI,W~bD:p&`>Ia"><[G"7LI҄&1qr1*8b_oۭ}(V{?s7Ǻ$ ```n#I&|=v]ھ!K]6c%b_l=`K,:mm]fcO`Еk;dw90bHm[^>lDPqq{E3kzQ쭅`yL]"ٰ:䡓ԀA9}"MKU(e_VOclbF K,ÙՀ( ƑlǨƶ'QȒ>$U6e1 &pt`6zGlڲ*i< 'jW{;n:l5Gh EJ^+ـB۱< YۆmIGql 43/]k}xӠQFCӮt;zYkK\M%&ⰳv40?rat8y3PZǾClm㱬*کFW%RТ{Mt[Hv%,V2#Hi xJo46и)I3knIAX۝~Z%~:iR`X;eЍ}ՑN `j P0fBJ6Q˺dOT}SQO۱"6hg.`?Ì|Cۯ[1& ǧ)wmlʂ3Mk8I-멦w{۞ɛy=q_*ҾveaᠭmFYl!nqEHؑݓ@ p}gs-K3W׽$)>V/AIkdaXAWREbgr*KvE'|\8mHFށ%:GN" Mivee:3݀r0dYNY[]_aV;/'H1xxB?cxGh(&;HUQ1hHҾR- |)mBG_%\14GdMZ HZ?,[@){d6;_"8ED )m8*}mӱ(X[o,ۑb "s[׃KV W;@a|}YP8neuRkpb1mZUn/D8ExY3Ng@9gD0{`+ƓNh~T"㕁"$3Ĵ!k@.@79Xm\t mO UR /g,a4`öJs+K2en2/풮qƢ#MO,&̱/}|^v mN%wq+.9z[U-Gmk"(kA"2DkB UB>H{JuH. @(~(T._gR"sϡJsJ_FWmwdFFy{xED\/+8*V uu'k|ui.{z x-q4v4 /b9LC$#{0Zںn(5vU^Csىȶ*DM 9"ߎǾ> stream xڭZY~_PU+$.gSbOR$f)R} pvg~AF_wFnM.$J6Mm8q6]P.J_wlC~E?ښK$!E~ a+ t,Rnݻ妄7R<89~907 uz-mm.DÁwqTu5u( B 9!iځ~p³hOUxj8h$< a<7{h5R߃=T W"M9u$R/ DocB:"B":?*@Hb-,KNwF3tuЙBC9pnў-Bg{ߌCK-vxh-!OrݎNٗ{ [+tc1mC 9< D–slg"\ݩ,zA܂%=ЊhN49|~Nk"EEs?Uk$V٧0%u?cyxŒA)PIԭ$ FY؎uIc,g[ Ra4PY^i:ړ<>ִE6,=2yUf]܁'m7\ ' 413/ Cvvf R NעȈsn d>08U#swy̔i !EapiGlHS5E=_I+vb'+6&O=9GjK/m.=9#ɘ"b2GcǞydE򇙘'o0Ű&9qLfuHB0it@ǕN Wp;:'f8\ 5dvoϦ3OQ"B=/QWkrf?f7#zMNg V/u.4h9RI ;A۹퇱&О|rֻ fj'И ^9 p <8%cty᥯J6'yMI'^:Hxc=AQiKRV&b_{ѵۑaKa-dKc<RPjՂӕ9*.){ `_n\iU)n+30zۅcbӭ#Ʃ͙F~y'3KE n4馌jCw0  #3!ʠ lMFZ:m:ٻWwC|9?aD"W ^ƞkzz#ǀ߿'t\,.GNb0H \_ex `Q(G|kQJ?B^M{-L)L2^Kͼ~AGY 4m"ʅתugc.Zx&cAW6L+C&t>]B>$KH#$n{rgt }sܖ:ӄغr|&ʀ&.^l7OqR غwԌcHaW*v*SIΓ?)^!̓O}1J :{V5P2'e[` 0lCW0{L ,a{`(#h|p3Ș m"2RՂΦ{qՊ}aR0dʦ}- ƞIpt|uBD]QW2LPjb ɖu< hu5rݒ#ax.෿'ˡ/ xr6}EQ&…Ah\FmFO;@|E")N\2VKy"0$=ўtq%'cTHOd=z Ba$ %s,t q0 i~o:x6VTC .#_ANq-EI% @[> endstream endobj 1604 0 obj << /Type /ObjStm /N 100 /First 985 /Length 2328 /Filter /FlateDecode >> stream xZm~ CN7  ";BϧI:P:EpwgÇp .KFv.kMU#bOE'!#Xٛ-h-9|?^QF: treZ>K4w{Խ9]uϮ'm{ s ECz Dz-fOZf^oW3~}6]LDtl1]~zz>1|d.n&e4G,u%dS3in0;`j>( q'ʈd[SA@D `/<Axc,( 踷v7 HJA4dW aޚA'zl[̜*K0M7ZY.X[};acny$_DS;BR[쐼m17"{I; f1nxX:lwwv#lBě?) =CP pdR*nKFj{yO=z-VLsA A4uLR9[2n@!X閳gT \\ÜdK, #cs_79mBisX 6#VQ<6<,=CT+*^{Py({'7frS8 낇u(ƨhA!Pۊ@i} ,~Eo'HV`J P;0!l(PO =iw/__<_X\Ϳw(nN}wx8>I5hF pm((xA^zb7Gj&0%_PBFtw~#𰱬S{0%6B -::5lR@jA i-]Қ#ҚR]5$qHGV.XD-;髡+:P*Yu槷M#VdG䫣Zb<UDQ휌4 `)?0QJμ2Oc8F 0],#GWE\LN#"boRt;p`ot!ʁwF,XtL.%϶cgo!Qdf*Tae~D43FY7uC<#O:n#ӱCQqNR~c{S(-.WVE4E@,4|{azD'4V‡vW?r:.~]C݆R>.{ǻlar꺊.kkͬk\>EȻD jw "RċG:IwuǓWHt~uq_ggo?{KjBamϦӓNۧEqŘ'bf ETL>tf2b pDo]հ&E|EpB_Jw}mlXʅrFmH%/&j'wEm2Wͯu((2@ l3ز#ס;r-3Cw=#Q;m(CJ #G_)2_HK qKZif JKߐL.e`sSL'λ 픘 c*xDҎ E< endstream endobj 1710 0 obj << /Length 3041 /Filter /FlateDecode >> stream xڵZY~_G Ѽ 0/v=ТZc-}jpy}TU_5+o޼UI0M4ViQwa֛ ͜:rլ}TuuU%ps?x·J j?<7̳ͪWQZ}'9`s$ىjaY%pWs0!f՟9L g)F %Hd0uc5 [2Wh~I)Aa4udLdbAo ngtr Q+ uIxhMEYUǽṴv${%jRȍ80Si"/we6[!4tz?Tu!XovLN+Sk08~Ss|vc0HАzۏ*&9&1gW+ B>fhd'M/}]JT@K]!&=2q|,<>y#'6^$ʝ8pMm)I>gaHSɘ4qYE|cj 8z;(!]e$ZJ¢)7pħzoGԒm1SAN <hybr cE%Ue!"EA ТGcW[SBɼ 70[P%y͡xGӇq5!<֣n~bWs?n/ = IF4w}f"$.KN+C >1%(I r}7~e]}juO($y>A<[+N bQdS ³1t|{=НyĂ2JNh*1 qu) g5k'3z$tF`O.&Ysu%nKnۺ;jc0/.%u|JI]ar4&NC=v=>D<. B Dp!;[w(SFAt[^,lfXZfM@ڤ9X-4 i!@zv0 CxOnl1fT¥ .y c_Mdn}cA~=KGٳʞr_$q̼CL(ڜ*Vwnp[k){%Pf(7]p*5wd._nPY]8qx> k)dP\վ۳MȝM83 3V}P a1z%CDCa/%']N,9UhC )C3v<2Fnrh;k(iπm,PS\XEgO&L4KYEhV[2p_*7~nы Ȁ=1VLeSq_8qh(w(ʪ8\8?b/ˉL\ ,es򆽭nARFw}MD|-EgU'WŌ"k;2̜"eS Ӆ M+a1!Ɍg{p$~]|x"s">mg SN|'g׵E]dV?X.г x"tk[H|eQpraˀJfO8BÛ[˻~Vݯ!wo=ɵ'bUdW:xߒ0s>> stream xYn6}Wm@]T\vw<ؖ2H},RR ` OٮuoֻWކ4ckJBJ4օug_j<[?fs1f㓘[}Zf}[C7Ww\-)լ c kWÍ=J3N:ދb6t/ih*&'aA*aS,QD埕J"mrг'o{ee&Ds'*XtYө@}2#m CȝBX`G9Ǻ0nƼđX V!Hg Ӭ9<%r=z3cxf`Nd4 GUfrxz-c5rU i#f~Q^! Zl!G-~r>2P?< DWV' +Y$]0#Y{"W-S,'5LS2?mON5K0^ҷ7"%IHgqp*ES%kq2DT8:* 9B=.\} 8fѓ|!D4y!K*L"q`/aQij;;FpB$^Є:a~^ oWj^K4 endstream endobj 1738 0 obj << /Length 1869 /Filter /FlateDecode >> stream xڭYMs6WC@ɡubImezpr)HbM*Id߻ O2H݇[+ ['?WǮc(`Y k.GnXu5}3|9n}ɌN/ KK@Cɻ E,iط+p쵱\7.'M}Age`_kaQs:&mC10S|qV:XY~uH3ue|) XQe#]b-uR7`Lcr˅n]9pqC1C.{e\=BfLƢfԛΈ7ЉPkS=&> ZA.6V7Wa/E"zW0^k @VjNku&NBD^ldR(_W2(FO ((r2\vT3si|kv!E%OV%!d8BHt<[,d۫Ll׃@<ٻ@ڳA聈.:*hέ ,8XW尷iљѼ63P>G}2tg.vUu8,3!TN\I_^YԦ@H qCKm*<,)nu&X YS* +oT4˙ty5_e~f xWgCquNGg.9u̍VII;J -Ex*;-lSm,|ś W|0Oq5µ otS6kVaݷPn mqF\ (.ehUcEMzNq {mPBKl}}ޢ5 XrÙYa)t0;HQ߫ !^`&MP[0T{LtV$N?ݭ"!9̿. rފbzyX=Н:4n֎9\OEySizYjD Bcı=x@qyv"|w?"'A;MGp}PاS e-ZbqAӇР)b a-ڐEa.$=j_ j22M~>-jm:imUX;f^ @.珹#}P)iѣ|8p62C<@yE !=DT6bc鶈ds,5Z<Tj8Sd~(WUSܺ/f6 >~~<C/S aIά L"L@Wv'E [.f,l+S|E2th76›hGDM U{/l;覺%:aTcYK.3W m?Sѧ Q-nXH-ˣg;DMKֺrVx#evAKHi.YbՋv5d,o |- hBJ[o^InD}{`׫ D\LphW+moUu}u|@yO-`(auݽ;Fs?,Ci|袐34|̊% @={q¹O ]l 7\Rm]H$is$u  [Qsa3uC~ͧS6͋efé1 n)C`Kʤ~NB4Oh+]x6?].EFft@%7N=yN endstream endobj 1761 0 obj << /Length 2428 /Filter /FlateDecode >> stream xڽZKs8W6T ڃylfqV*9$,q# ?~h/ѴbQ n|]tWo9[$\o]![:R1ʖh3\ɭJ_\J__ެξ9 .\xw_t JX,݂{|ng:hG15s8zlC%7{Y;UUQUZbWo"].4N<+-(٭aLeVcȬfť+#,=-<ǃWރ'D :b|K:?-}h4#( 6j!͉)8pw!ETyP͔?|zz_z}TH'W#Bh@ǂ3D@` ?m `TQQd N0H:9̃4ںmߧ&+fr_ / .8N@D/F9Dx!G׉QJbkE4>*2 HWRN&NV|5uR"HŠ 04dZK|'y]h^/!u PSTרNyJC| HfLi sG{J \%G`P !odu(w _`Y^ý0i4*xWAW49 6?-u}sTf?q ]BpQq4iIMgX&&<'ZmjVa@J)1ƺI_ !}Hxwu~8s{`v[=IO_ˑE[;70,Zxh2_D$pS(O?P }3Ja*6P`oЯ~Ilj22s& lZ/ ^7?hKB4 ..A΂[]ś9 zxDaMw%n`ĎÈgb((A#.Զ:\uNgK3rH/ٝ,T0gAu*D?ׂ* ~iƨcݪN gWqh]gCu猭n͵xu VS&XAebtX12ɰ247T\@nh@E> stream xZKs6WpoRU HI0lxSsHr%X">xoɇ(JqmŦ@nHo 1G/LbDK(C4 f͗>IZT'^,qhyQ/./_a/! $Ho ?z S潨Y[ ?.kי=L L_nņYvb[$WjeriC,]Vls(մ3XRN4z@NܜLHIQ@S;ᛥd1(<Q%10JX_&tq /X GyF*= %ëq੄XQpbQLOP*grV䓔XE,I~ jr+I: Eq؅%:ȏ5+1> )= '`4#c?ѩ_ëίռ_3 qw܎ɌF )ٳju[V;(A0RhO` K:G )S;zd/'`YgejQH͞E>'qtX2F#KI'hH Mħ#&DgU3/W*4czI(;uev(^ڃ/7 "_eY.kj& +1KQebLt c6tg\"V+,~m]@<4i&=_>WU2_]/YV|=ALoQ~Z{K]_* B;^A RR͒JQ & Tn+)Ӆ $OK ` ^v.ʝp!n z(]jײBZsDIF+!)h!˒5 .']ZI< ?mJn.66CcEUY@FԦfYKBTqF;v[wyGz| {lՓX>[3 d*%8-YrnZSȮf2+bÁWʀNOeլlmP:ʠ٥S nJ@)ٔVwnꄺwP O|°UJww '; 1bO d&e@d}$h˞U2DXQu0/Z YPD]ZZѐ$ZBȧh4rPvLNTC,tN`I( ;H!LC a 砛ɧXaA2ݥ璀پu7}<ŘJ˾/OY>0$P]Yp1wHjB7F:CBb6"w&Te}{8|G7$cϔ ( t. W=14cD,f>2BT:liWE[Vw9zp wjؘU!sz{{uF٦(v"6u~7Ӌ[]kݰfVRx̺6R E3U0& hE;i|+&>FQ2Y'( rI%l6{Ǧ[r*i*7pY&4UvL2;JFK0"7B' θ5*l+W:eo=PM}HgT3qU׭8b.T˭ 9֫㎔Zhuy'TwJ( yg/8]?+|{Ċ SWj(q!VmI:2rk^]yrd郂҉Ďcyy~3s=UQ7nj>C'c~U^QtZuI4RmdrPFgj~zl0)y#$]_~#<LxM=^4: ]'v\@'ҳ܊ r Azp{ ag~d7Ulj?asv *O-> stream xYks_G{froYou8isU@@A'=s&3kJ>qo31Bbۆ cLOc2~0h)G$YtO5M)|F&f'O,4,)Enǟ 9a`XB4Vn]~ִ%n?I~U3ߜ9x^AkۂQ9qa\CemZV'Z5%&H;'53E)G!71ZfOzm /Q$Ia+X.)dZI\r ERU'I ŇP[6|+U?ԎV1a|TQ*(wY 5M[=ڼS)UNd͸<&\gߓ-#qD[9$"aLkkwmܝ@OJ0cO=nV;uie'i?x]|:T ; By~lhͨܕ'[lkoXD,}V+ ?^hY%D6Ucj-Z&L$e`0 ?X&Bz |\TA,vF۩PSR+ͪIT5b{?OL2y+*h*L~^OK*M K02X#)Zralx=xb|@7ZRO`x+uVߐ =K V5H=nL/W7?_?.~^/q\yaQbr!#t[8k` bre}z}\@N|&;@^5&ChLa[g5xm_ð@x*vq`habQzsgIm&~Y<˫rusl)V(J&]n]SvX5UN ` KX- m,堍;L㘵0ai.aad6Y x`I8ԮS`O(!#xX:LTFJ m0SFlQJg%T#Om^}tCnp&(xT\j. qGcjch=^;N%, 8$*A>G2Yl$R LQt)GvR_o7ܹT}]VV'wjB LP;4V 3ߏȧ-eOfhnh,{vJtL6š-W\~GdŽ~[B,-i[0Z&a [_asdwK,#n uGvEJ?mkf"$$CWl|$?ld|DTzFM/wOjтۖ-$w B\;V77o,s?*ސFzߴ 2߇kö}Xv>}4kkɯ +P[iY5!w{c i]綾G9Qet%?D 鸞p 6zv} endstream endobj 1791 0 obj << /Length 1079 /Filter /FlateDecode >> stream xXK&ϯQSea@[Sq*8VB3H׻h^LIN@k ?~ج^eqP"i8KQ c9bEl.~[uD<~jMp8#p RYܼ[Y}^ЇdD3,(GT@`y8qKso+m=4RxB|T$ Y#g3('+WE zB6.{iT[GյA){QY-?fe39I|͎a1ɞfRfjyrعय़aHYۭ$CE<GY*8N! XE99O]Sdtڜw#=Uѻ}˯8-8lޟ'?iNO:+ UZ^w*J b>~FiQ`sC|-Ú$ EI|4Zqx}XGQ9˒7Bg8-*-3 /83*PY\,'b`}$[ڍ'g X@8.`o'S2Xuf3 gd%pES`B$z^:QL/N7Vr.\6*fq#7WU) (f%ЫѶB X. Lm{,/S{F1ϵodV[}"ӊ vsf`}'eh^ͭpamknNB.ի ^fqyV>cͫ\V*n[T+pAWV ^B>r9\\io3jNnŖ[]dPʤӽ\G`rЦܣ1u`k˲JŗNoK᭞[ /9,h> stream xY[o6~d`x+vICE>0ŕݯߡHٖ8l`(x؛{ػ=~:̋PЛIUeˁۿ;]i1נּѐ<|{aKpxH[(GTEƻ2_.~[T+"QAu!龊Dd檶'L!bU,2@/_ X7W p݋Yu\c? %tw@@D1̻xW࡝bf`%f3*EsŽeS7&ӿtrG e5iaXf21?gZdHV gœk+LNCh#jQx>>).t $NB7nwx.mLNd#&/1~]J/佽,mXtrIh*IXZ$!L!=kx5'3cB~H`rwm"4 [+ 3m U3@!]EU+hʁ 1`dF|]y/r:.;oλ1gNu3gU@u2u'۫em36ynHXnShE,?;DŽ@g>0b/v1P$ģ{ѡd(3bEZ0 ÂXt^!NgHW)[tfu/6Li/CIO~| U8ez~篟]3볧-xW S^@nڴɶŚDd!aPn~"ZɑbG 3LN p6yBCk ,X/uVfY9¿[a4%0B?VU6p;Fim2: <9M$x彎,mƺ%+_֝YOJjb jH nD \o+5 1lkr b"V-mB7Yva#bۤJHxYc zTr0拲jOݦC]96 ٺUxWÓ%uϕvD8$t\`Tö n9I{, %pX, ;-,?'0BT})"?1%#+{qM GaSOZ-#t endstream endobj 1715 0 obj << /Type /ObjStm /N 100 /First 982 /Length 2385 /Filter /FlateDecode >> stream xڽZko_IryB$p PGא4gZ9zJ{<\r9X2(W R > ]D j(տ-0`&|$K{Í|!k_*HX!qv+w~I؁p %o1 f!1f9pG8Ēo9M_JF7FP?&sk 9bFE|p`[s9L^:Q,òZwk05MÈu644͎i[3 gMlՒUK)91 pM0> j &F7NtPX:Іs  LؚPE`ZC^& ?m'4_ /6g޿6^PVߛ=,r@}x" ?s;9݂XqaV 0+8+ra? y}s)pCآ_`f^Cq?ëop%QDitxvrjǠxzPi`JNk`{÷wӎ!10| X}B]>+sZH%)^a'grWwgppp`8>;;ߜ} !-nU?tX3H 6Q&zOe} 6n_;P* { ma>˰UM})zKܞ bl֢XAQrNS;"pa;)hkEU[7KTփc hFnІ+Q>9y{)6BZH-"͜=&/ WĄL6+A' X.Sȳ̰JPYA"J~x*hE4lQPI~R,pA<>0OA~YvPvZ79Q%:h=*||=mwpprt&(H &F?9"θY[ۋ& E?&#w ]J̴@P?+Z.RmI`FJ @K>ϽCKjwcWtLP&j(5D 5O#tZY˴N[vOx @ ʥ%O@9yQm!%` 2d+"Q( 0f ,fA:9Rs G0E $wϧC1H3"\Wף B8"(Ҕ4 Ͳ$q8; d[?Ui-kRLE?#'6fjt NUGa,ZI(?jxT6ʼY\3!8{{o'FT<m+zzzS5zvZ,t~*OC) +xPAM!ȆHDpԂ|MHNu6 e^A0'GrEeV%iE WY=ff fM\B|E5!Hx^ۓ*e^ fiP<_mA-͏-纰\ubm"uu&[/uMFES v,6v[oPՁ6{BNPeEDx*$=`KF ycOC mՊd[pR{:5|Ùp)yN>q#טJHeun gO"XXhF;Oȶȳ {r98/g֞*rnda[_fT[La*>]-RxS-fj[l-zr7r]^_rUAhs5LrjMS[A5-m^u,\)u Bϸ.߁xx+Á:$@g` endstream endobj 1822 0 obj << /Length 2023 /Filter /FlateDecode >> stream xڵY[s6~`+̈́X$xi3NL:CX$T\=JNl;1ۇs(=>oXw$f$JY{?{^$ZW**F:תX8Woί> ؏{KXo={{Kqfwcgm(N{yƝ܎Uk^._w#VYpZDa{,%_Ec^VU]灜}6v=ja pzhH8cDE(@?JB: p|qXƢJ4tH3/g1KCg]Y7\5)a#\氇= v}awMs11FEn&ln5M׮`*LX,]Y[;A1쒵S; KC$Ԩ %x8Ee`bêo~׿RO/lwe'8fe`G(vlj{TMO줷o#߇;/򏋟'ض5e㑧QPH[eN>p$,{oO0|Rȑ',r%l{r_Y8IyB_e/y xcl11,aQq!4= Ā j !]EpRP<cZ;$mbؚjEݙ6=rr傄g ,Q-L2dQVzOjjT+uw8 \4fa$O;ita'9K#S>CǴl+ko6fiM]"7` ag T]\Ui  J_NGW0@.=?>A^O{S:nTetM<@Aƀ&o|S3P(Lqk w55P9R5NjnXI -HwcyKBlS֟tBHR7DvdC;9<-*krj9f`?IhWm,b",REgBw-yˠ8DQ~ ~MAuٝk7Kzprdj\>j},% md{}$ #1B_/,8d]a-9?|?9=}KS=mRBw?^\>ij@{ws/&S0B[8QR#軯C/mnmRmGQBndQ6m ~k[5 Y/MͲ) +,آ#S4`ijQJNut#5 (zvm$C,L 1l<6 pƮ1X6[lP Ӥ1G rvb%iUrA'VFq,k 0jmتfۆH/Wp705=Dni-!A ,Ikg7۠X2g/-^e݆yF́r fċ) (ido?\$`MeV7fAnj*vr|nLMCbr9X$*at@"&M= +Ug.j\ΩP-TӘ$C`ciVJWp٨C,eX NcBGAIJ[W?J}Az4Ha&geo+T$E;dB$mDIOÄ񰫻mF.QK B4~{ lZ0f4+'UeRi>b" &t)E\q5(U1+V.&oLkǥtwa-oJ&rJw9ӻr*؜RMw|`?LF>@lj/:|ѱIwϰ GI?4 endstream endobj 1828 0 obj << /Length 3053 /Filter /FlateDecode >> stream x[_8O{jɖlk S(XI:vv:;w?RL,ER3Ǚ&ǫ^=㹓Jr⋉ m<0}o.>ʮ3E3ѩJM)0~׷W\qʙpb1'ՇߝI &s`rg6ON~銩@L0LiF)ntoIh,ut-k.Tgn&~k{lJ喼$Q,vk!)u/wYYjU5sR  ژqB)iv)/8]t_4zZ绊:>20σkؘblLSb8"Lb 1K/ F '$}n)$sz#8+?#}|)Ǚ'pN0OK}i}XQ$gvV_uuR`of6:Hg窩 /җD,)W{ {{ ٨Nv=V3)^uzzE ] -n͞`3q ܰ.2Լw}ǞG. =.=9(lr˅g2Ogc.܅7 #gڟWwSJvᩞt]tFu}9*=ܳٸ:|z};%|'0oANX/K{.:C`S_ Ol9H80y\P^~= XsJ!ܓxF%uBe"8:ʀ>>lt#6 w4 ЃO"ϗ 8בfoJ/yg?:Y, F%KlcqDVϭ:ÈZ8ɠu]Q(8Uz 1,2`}pq34 6)I]0{\{3>y8$כhQZ>LIjFjx x#5O#۬2X_+H 'Wi$}g腫] :؄(\Yw|k|g}?,k`0}ƮMR6647`lځ;βj41nv9.4q%U7Y'_ oJl_U|q`K?&ių4Qq.׷H6{8~=伫/6 7l؏Еd۝}yuS7&FZ$}%i+sFӄ=zJ;o#$~L~aE tmZյpץQҼifp/6'yMW# |>1a58񾠰^D`!N>GjA"_xTF7[]D^̇o?{O|#-[siMt"3z=&玻6. ؀n 1kb 6L|VeL|1gmfQUIQ( uw:ė33}VY()V`'l}ZSnjnuKV}{Xb%ٸB`Y(n{9PPM:PT:?͠N|< E𝧃'*?&q#x0E(;]ǃ)xHGv[DZʐXGJDaI%zi S<$9Bף"ʕ1AE&إ3*2`$s% dIBV8)itc=vXJ[-[PQYXߚi5qJAe%i]Pfj鰺Xp oahŶ~(96$(#x`PG0~z˥d~iVY6OB8iYH2/'Lv*i`,ndP\ z$mȄZWWCxL"߀TCz:zNE)k'H͛6I'x¾xzV--F=IU5Ҍ;MM=tNmBQ"t,;WȔJN1̈́C:şC0QS>OB\k)UBEjd'홢tcŚ&JbX#sx˴44Tڣ> /Length 776 /Filter /FlateDecode >> stream x]A7)2|F9H[d+{QjuEѭ }><?|\ۯ|zjs xQ3dzZʼVvB8 Sj}1];ϬGlE}:ߟ9UmW*2eD,>}N٫Oa=iɤȾW jK-*f?gM)&&n&MײW&lN&o"@[k7(=2`a_ /u]uSvFMv5_ԭOѡaJץɉїl0ZhVs-_b3yW*9l==CQ*-^D/Wqg0)d)OLh$aEGB}(<rL!eD &K ^uۡ,E.^aT1إ :91>> /Length 124 /Filter /FlateDecode >> stream xUK A Du]|&;2,tV H'$s~+`{mP z1_[O+KM1oT< B1d.JE…+;.(} endstream endobj 4 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (/home/asr/src/texlive/2018/texmf-dist/tex/latex/keystroke/keystroke_right.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 1837 0 R /BBox [0 0 42 195] /Resources << /ProcSet [ /PDF ] >> /Length 794 /Filter /FlateDecode >> stream xMMT1 Y#aʼn$W`8Fl>_B=oUռT_//?j ]}+jc-7vuW+Y#ҫ~i;ӆic+#qLk|޳ Oݔc}D-g AG#$KWUOg>D([Vh6;HLBgݴdюJf-% φ4?4FȄB>e"q8qg?}ej["rYom` au AQY2׆S:4ld RN~U`8 rDΦ>(sFd$IY!ҳ*:{ MNג;5'O.B иA9uVvsYe}V5ݭ=E1B砐=gTRFG> stream xڭYIs6W(D\NI}V-l߳U&+>fa{*9Roq 9^UH ʣp+5+$w6 qoSu" ^=IcD\Ԩr4 V"c&|/Xb0כZ/ܬr}l*tuvuz(CHRTq) ex `sg<p2yw3>wci?IHC}lvcp7r덃1 _gAm 8a]sŗD6' ȵ'bq-4Cg9ď]N̂:^)qx@EDey>K3 bNfńE]Bɲԝ7Xn7s~ jrA5.7]撡mhZA");5C?$RQ~'Gl #j'[G"5?QA(vټ˵ fqyL&tVÜqFVi&j_QV8&d+gϗ!}2U!9zs.yw8xt߯ߪa(J݄Pn9ۓ{h҄,U &4mwMVE"zCYBAB}>ֹ(G#r9/3sY e=5YyA(ց"6cOo<޺]>}Rڐm0jK=>+PE$`2"!l,Xs~3ʖEDjCӮ漫G/ 2%rRx/dFrZ5yH+ʀT3gx8>6qڴiG@6w$ƿ7ӟ` F!ZTPCm*桊^늄cl$9 endstream endobj 1847 0 obj << /Length 2480 /Filter /FlateDecode >> stream xڵY[sۺ~Ա\xMO8996vf:-ΡH⸿X}"~ rۋo/^񕗰$w{Eҋns}.W2Z:/iyIuVӋd!L,_ >xeۋϿq/_=T{fws ncv]Wz-W!0ІśP!_hW]uz)ŷd 8n]|KEL vibBR狯ESW[]u@S4eڃ[%Jɓ/ϻiIdD$ Tҋ3m0Dǝ>)J@&Vu$rtUNldSXO[v.٘2X!gl1{Vu=cggz=c[PYKٜO 4Tu8MX$ԓVw}&a|XW=uu\"C8Tp(a:`:_qފ2fI(H4;ђ j)NПp͋HnN6%n'm-3*L_M~|{WRJOnAW?Y|8( *~>7)Y"Fi'NEpϽEccV׺{к*Ϟ8606 am|#/u`,',_N:S-(g˪0';#6QavNڽ.޷v^Ju,L YYLS3Z'O xB$OPX?)!L-wS੯if'z`l75Ҽqc {Ø)ר_ f gXcWR<%ۏ)=6LS'Ar+G3~MN31O5E?0lctP;:,jT?-Mͧoԇ7?Կ[ Wr{~^1NRC_׍FJMI=::Q$X HғnQ5=Q-MSTx20IE̚YaaLbPqcQTr!x8Í!)cU u_ BCEp ^M}S+)>qOANtn0C yUi]|-ҹ)Xȏ zuB9~ULiz*,)sg_/ͩNtxQe>hqŭ" G@i[{VLNȁDXNarӗ0ٕ}*LE3Ng(#8s=- ҤY"tUyV":y\`.*leXP,nX)&) 14f`S$,çKa$>@0mZ i>:"Єy#]D;+YEŗKXr6M2VX9$˒ ˉMgnjy f"0tSýM%Ji.CX̒ endstream endobj 1855 0 obj << /Length 2291 /Filter /FlateDecode >> stream xڥYmo__$Wr) rs w "N Z\IDTlwon6r93;3ݼ|=gAFv8BA% YCCϭjCZ ^⍝SJ[eo(Fd718v/ X"' x$Z7Vl5ށL3v83h &S\O$%$AK9ӫ`<qA"$ bQ""1m]v|H囵 +t*#̒ }gy{*ҋa*mމ_HPBlnWgTUgd,7vךRwAI"( 0FZѧFUx۵ZmݹʵA@#A%H)J\ FՒZl 7$Fc"5ɯm/c]xRu[N*Zn2$ 87=ԡn.n1ڼLsNm;敂[06Ogopw99?|@lr&3{;>x57[GR[[h*fBzJ/wzvt Z=`j3֎P\Nm"yy Re 2-ba,a( A2h`ˁ>˕Gvu=:nwC~*-}~ӧOyPj`3DߗöMB9tHcÙLTyfhJXf %p"y='ωn&wwܶ=3N=w{xs51m>cjRI$@CVq_mDdaAL}[E͠1d@w%CẌ́|wڦ֎: z^v'`=1>{ݺ $~>-Ծ"MΣx$\@ {an3ƛc Lp{[@}.y4&7B5x+[ ;6ՠq%pB͸zEE_X[-eh%M>twuI քFgx8E]p>:zIah)F4b:I痓ȳV=zk'ۆok?,].'*st4z+ZkKf)Ӝy ةqc/tMZٙ^4RQ$[ [ yWڠlOLm1 5im& L%̝tbi<4>5mKrUk=-BiBh%B/]؈\ EaHieҔ ,Z5 IiHhƶZvZ՚Y,o\dK%9,fAG2>0 ̛ RD&]q21/#8gh2=* 3)}D֦|$$N$Mq>6S+ɦESZmyZxgXA@Bu0.#^e?j9 PO]\1X2ֻnPlY*ivvv7zon1ff綠O|ZNp]&IWVuM 1mlG1%PK\XW  PdFpHfBRo̿4*KuKB "nKTrrU^,ĤҎ,~+Z-nOO'e BTlwwH9O{艝(4P*QU~Ǟ{PCNdbG|F%Cv-yBg9p6Gf'/~^[npVjZk&5/ip.0$0'#Gzƙ[(enzPc՘o3 g}=ASl d" p)ntԗ8VS<` [n?0-bI#hzZ`rU];:{z0&}?=#2݃ hq6=HY}I2ޞ$2~d0UOjgY;,z#3Yi3eY0wm96q?6i21ǫ6ڽ? ?eZӓ9=>h?IzN Ent׺ߜKm>1"ܶ(՟A endstream endobj 1861 0 obj << /Length 1699 /Filter /FlateDecode >> stream xڭn7{) !q"@QqZ(4v;(-ɛȖ~aV]ūW+cN ]- ZNVjL;qn|j]Ưzn~L3`~zr9{d+hn{^+ΤտjKoZ04 0 E[ӠOsJul^-h*Ái횢^H>v=.WeB2I" ^|\}nL Y(A ~| \ϟ2|Z>_هn4+TiS*vL)U Vj3MJjыiր>?D@(d.@ k[g&#x iif0 3F{1si"نy^s."$fFДkd*!;}߮c6:iyi`\@42mx)"FfdO?7S 0Ot?t @EH w=24:2$<wy^ \0+: qm]τ`W̺28C=ImL@A!! y -evXRt fDz.dhtdHxHCb^B 8Q1C&!軞 dMwytEXYd(ڮ0\inRv[xL͇AǛmǬdHxVHyHCnB`ܴ]cgT[1Bc /SKd 8w/vtj!l^B :2Mt%,3`:Lah.YbM]ɶcX2$<,ik+ (Pb!K lH"${`'Z/bi  i?NgGQ820[]pt+LN7Z/g~]o6ljɉ#FړL߭L賯go Ю0-:Eg/r?|~.![> stream xڭ[s+rZiґodZ'uԙXnKIk1o!= KBGZ%^w| ,}A<=?K)]!&FHKd)lzʍkWm1[Mjx]-ٮjDJw'/O~>a+ Вjɛ+(->ZR[x\?󄶹`-Ta%\+1.-c1팔J1:c*I(QF.J :: 9,Ipnzij5j wD\ XI8HǛ5#dTć)r%ey8aZSw:lu}U۪K0Ί4["c+DږD0gL!~aKs}(Y2`y|H9w~zyDhC1"#JxdhqXfhȴ>?ie gEDq7v1m4=``F1MK6:8bZɐh}"t =ELkDdydp62dgȭdg,5ee Zև6h5;$/ghx@57c<0< xS ve ZvGt-=[,2pcC6F pfPV#Ė58McƓIbP%ӌ2ϊ*)Vw0d4`/(ӈ3 93Ă3kĘ ܮc:^ͷWwM Fbɻʢ4&LD8lhYQiO¯=,nг~q]{?y60&!7b4qF+bg, *(Ldi 1k:KgMx2mSF,.)%ݦ  {ǂg ,AX&Z%!D犴&mE< TҔDPr\ %A]Loe,9]tzOx1K[Z@١ZR3SÆ=cA< (Y]Aey7W>ma@ V'ͳA#_:C.Ćc3&/;^a(Jl@&, yVnE/qXBo_"̺ql47`KB o Đ*mEr<,Zuy "3آu3._!tIu-H&` ͳW"{ d$DȢu3ED܀. 1.ȴIyVy$UYu)]a]9KdQNo]Fs$@ QnYp"a/!%`O'6P/0S& PV`0˔_S' ab0jQ\dJ꾪Tfej_TN@UviZ@gɭJ+9A5l#jF<6Owψ|$@ Ne7nGZy!@ 7qؠ7}c,u>y h7 !7.xP8ѩ_<0]kmAmjY6}*~yFÏIf :W-y{<ǭG#a'{~{FÏILX{/"6Ee{-{dI\x^$4 $%KZ zHV!hw*ՙ>N,/mrͽ ~;fRU;hp.p=Nm(7]UmQ+_}r6ʣi4us Salw|;۷al~D ofw퓋rTn]6u/,gnT'dN>OH]k68lߴZonnF)gZ͖l!)SOjeۖoZp]&nƗϧ[/cjbtrf,fNm}pÈ޶"1J-Ⱦwolf[v֖v7՜9kɦ:ݧϧۗvNVZ.}C6j'wo\> P7gT.#x|H!9ay7=՜?7 0e?Ƶr_ endstream endobj 1878 0 obj << /Length 2549 /Filter /FlateDecode >> stream xڵZ[۸~_6syE-&l3!/>/^`AtG NxlG9T[`aSsTQ<+FA)r~ŒV4!*vC֚o`Odº Ӂf Rp$G=$b1 $㍭VȰtZ4ؚY)&6\ؚ)50ژY6ӈ1 EJ0 G4H=2EP3*&8hX6~qc$xLX˄.̒ŋ-.ShuYT  2{mbӎ7]L 4 mu1w~h{ ?3T~C}K"9V1HBR1Α->Sm/^^쳨yǗ]UH\S_ir?g bBc!H"D'_YV-tU/1=p%hJq 2XaMZͩpLc[POekr1twUQTK!oS0<-H7aEg кn;4^"n,IlR vi) 9:te`:Λ`j>5p.z4 xޜT :8^\.9H?6u6h v[E@eۦBrYaAx6\Ѩ ^]E+Uk%#܅h}x@u޶Дmo|§T.N{R!uCAP/an&0y#%Bsءq? [Hk{nכdM VY^aB/>ST5.:m1&a[0o \|QN%EFKvIMxRN}j <)a݂;7˧Cӧ6)t2k۲Jiư'Z5lO^9DbEElVW݇5k;|hEՐ|ùJ94|C͟PJɲt^R1(_'p-ZANtD9D& l!RexE ӊ|–`l|XKpڀ mBRipƬNמIuNqhx`cu `qYt]UlO017î7Ⱦ/k%eXi ?׊Wyˊƒ#DmN",%ƈgZ٘+zأx95PBk|5%&I8c]L1Ӊ25ʋ; Z,.ILxGC0@bzQm}ڴ-І=TjXyQtʹ]C URAWu" oaPOf+[C5@N2C2/;VѡaYur<Ս7tPs  S =RR)]}%LL Ssr?C eLW)^^sTBLX "yK E*IHjyDjdV{XҚPC9]8x0z_衡L؝3v3ncłǙ;W?ʪ\A*0vB -um!nZK}cLshx*lHwo`wGY^CgJw 15&2@o{ 瘵~zsQc僟S D7Oȑtꐗߧ%آL =>y> stream xYmBAIH_.ApI-p ŵ%Go ;!f{ϻ޴0vMQp8̘_^7Q$,R7wAh43* L( ,xbKi[蛴|OW46m,=Hg|s㕀x #t 7j{d0uY}jD:"oW3r&ujxq0nN(%Q<<^pCCELۼuZCV] /'?}`)#7ya–Y^iw4`k2ڪ% dE Vb̭4TWT]m[D.(L 9 9IIRv9 %^2mQ>86[`& =;əovApdPҘ*Mpcݹג^-ʥ«{(ҾaZf4~pBl:SlaXJ؟U41r΀Aw0348:3:a\@W#āP j?$up9 :r\D7dӜġjai@Ow|eU=["Du!x)D|v=7&p[e ˏQ[wte8Ѫg8ZW wGt1+M~[X-iNS3 ëEȃAL16}ܖj [["bx_RMCgl{ }}Sf(A4ƯY.I ,b)9.w;C[[@|hy}o#Zθ8L zȪ՞Opq.P*n>.]a7Ր_x~j|TK$cB85#U0 wA Y-'\DߡfV}Ο*bic^ͻ &Z=lASj;6;r!1x^ǔ_Qe3pn{b~C!!u8A_ճ~F a2œ#-qL{ F=>Kz @ŎgbWi u]W{p<ݭ=&j(9}2!;QT* ƍ_֮_MruWj5@Z=%`d<Y92q[6yp_g!AFE2,Bg1/[XsGwNr/̈́*eTys넑O| Kh8B:\_T'  4Bt"҇4!3CfCf%z C%fC 2 2sbWr<:};Ph4Ceߵ~CBg"e8m a RD⁀~-1R @}ok"&_o ڛk((w>Mh{K]⮮, Gޗ3uWUH=RoJ'ut7(^o$ x7Sg ,9?ų4>(g=7grQܴb<^fy0Vܿ ui7s6RA5 T210c endstream endobj 1896 0 obj << /Length 3203 /Filter /FlateDecode >> stream xZܶ~(]zq&m^uZ>-|I[ZI9ZI[^yf8T[ozV7U,VJJ&_[.כδAWצ43 X7?|כ_qX*Xq"Xīp`C4YY-Wo~ lF|&X cb_Gb!՝߻=2衰3YVᄌۗ79u:2M[oxȋꎺ꣓Wޱ՛7)DW]oY%;OG;W qj4 iJQe1GdTyy*&D h!%C_n[ +qgM_ tT4|XQR n7'5΋7?V{\X~`HF ]8)uv=t&CY]r53]J' !K'_h+mtӼ$ި` T2A {]eK6Fۂ' xM]V gG,KŤO&vPK&E15Qǂh4);q`i_Xȵ  ob p:6[4%񉔂\ mk} Rwg_ݵʟ}$p4^]7Zy&5)[m Lec^gǃ\EziIцmv$>YF誣5-Aph7›; ̮1Y{p~C0\֙F" V": xS);sNƷ$dyYTIǭ)_>t{cg?4|`}kv/%3bdI?Mh{BD=bf<9>1OH _/G7(b$EX^bz^"e>C] [ ;߂ͼwMSR9hQ4=82eε!Cc]) f&u +5+!_줷["2UЖ|x9 DKO?bD*{(3=pI_ ic%IIᄾbpsaI$r_X@ m/01 ׹âwH'U8m/ Bf@"C;4i $qco.aޏ30 څ(UغyG[ɚ.q{~)|/LWCp {8`R{S UM[c,iv?Ec" SOp880!]XXD`˃WrUJa(j!*Tg>1a, C2?Wmh¹ B$ha:_CnbUX= X9dcSh"_'cQS!ED'3 0e1Wx>ϩO.h}oJy!  ?%$_bdΙ;)XOi&2*tOQ!C0a_]RamCɰ4#IB5$BAc;S c80S#!YJƒ8hE lC?;Xi1@), ňG X3%55ϗ$D<ߞj <Jr^jwX SF5T$p 11l&BG-z'EkT\R!&;U R2cq aD ^)&sW㌺1mGY&[db<+usܻOQk;pKnե;StZ(+j,LQ5[fKTwPZ]@Lk0 "Mz^0,? "X4Wx2#! iCENY.&=d=گ34\|osphAǥ1Ŗ?i.^ ( ID'=/,0 gjn} WT̗lSb콏]ޗD"Tq ~ `#60KtKG83ȆƜ&;Kf !ޝd *'%oI*B ̱w+1KUE&BA(˛v )GTR!r&D D+fهͣGoʆIxN@z,EaN%tg#bp7`ar3:ۻˁAҰБ"HjqgR2g{V.vŻrxAy⪄SőR@]-0gHE[Wx0B#]#w=* Oֽ |;?KݞhO܅l2“p8BV7]LFtj[/`<)hkY2mm.#,9ELL,I3 {a4Fܳ2ИθٮR/IE B H7P1Th1X3H*8IӶ>,Z`a>A4㏫Ƙ9 U[eej~@>9~7H> stream x[[o~ϯPd`]Ҡ-Т,f6N1Ŧmad)+ɛCR87u6S$uxHG89ABu0"$R2dLd",a1KGcTcZ i87Ik8ф6:ϓGDHK(ξ| (I\^@~Ϩyִ315fP9/8v=x^%hfd|~oAØE$u,qb5Uҕ{vl\e83s\tu13Uݤ=7&oDZ+NiNhi9ˊHP,׾/1y2?TSvb$QMLcC!+־.o\w]U:.W-W8P ;krØ"ЁV2F#”Ae9mZB d \1HVЇ+/pLumG t4ePsnų?JV>yuÜÛ6u@dnﭽýKiN74A4 AG$\%A;hZ&O1_}SԉPD1oQu[Jt*On_j \a8 ?m`a6by־7.0, (_X_y黯kO:kYF !-j/ǫˍ5[`)ق"q2b*&TTbӵ83"kK(TV,|ALaoHM޲F`"ptFTչãknٔ\  Ej8{l& 3ܱ߿t:^PkNDZBnX\XS,)ueV)(Pt(X*Y8Kzf8dWWA:ߩ## UG#Qr\%W`Lq3RO"ѓU7_C\}#`EϭRTK^㹔4Ϗ`SAF7zȄ B7!L tq0J"E~6}s||X÷Đc RY`VK~MZg2oPK1Z~BÑY)YTaZZ?s%B*[,=zS˝.Ҏ#DXn֤EH؅yiA\|Xy =EPC(72]}V~oaLL ~@@UllJҶPVF"/Jk~7ap3w5^Ѧ\)"8(mE>q/$ =u2ݞ{B*rc SM{a+|!ҖinJoA1IjiwQET[NQdb0bmso5n endstream endobj 1913 0 obj << /Length 2411 /Filter /FlateDecode >> stream xڵYIϯp*E)v9mI$@D Fhr~؈጖Xl4zyaVo; pݯ"w'j[/_o(~oDMr0-M& Av?mosUlѾhnd Z1KՃZuZa ͯ7lLfLB;s"̋_dɈI=eWf߯7^X?ȵ Bq;ZڴrVi\4!5fN^b/&{}zU8S5koRSu- iAG%z*o49D)j 7s̍IL>0JiyQ臖y=!"Sn!S|8UD׻+5m<ώCH }H-`z[frP" C|eQ1偦Ry:6E^ERO<9f'|2S.;-]隟v1K[o=ڦ@R'SʝN<툛MJc_qw;cGZ D|M6AbGhcM< dגIx8T=>U "%,0r@izPk ,\~yP{=6et7%B@Zq6^ vSi5$/z!Ea {4 HGi}Ďx8%mq JyӤ({+xwbcñ_K\URnϕ/QI4qz'WG>ijxM*Йƀ5.OAj@%hJ do3dw+'d8vRLI)v]Bؼޟq# 5RG #29Լ:t~HB*7c$m2CHcwf\vCK!$1Gr V&No߼[p @PYWp E#n0<&2R$ezK Dĵ=ߘt8/ thBMi#ms%$ ςvoݙc=0}w Px'^߅ }wQ ͙B KYI>H piՐmkSPҹ+DzŃ#Oy v%U;cچ*9уsM΄Z!(SqBH^w%y1ürѶOzd|=?_fS5UP#Hu@[s_Q?8t m >;0-`N LZC":`LC ^dQ<ĀƼ9l\6qŨl7p\YտjY/+׾z~}]k=zX K<;TSv!TRX@EC6,|,A8)֛Th;ȳq&YR!ϋFyh @U81QNtЛd ݥԙ&"$ y&Fb A֌ԝK8H DЊ3v'QW*R%D&MkyȂD& %muWcˏ6jN`G`<;N(sM3qlӥ}$ȨFQ^e} @+ (ؗ>{A|}AIGKȉY(U p`xW[7m+ۮ I:!:Lhy Q@*dz@wpL MWsX@ C"\TވE`wq^7n}A:\̪}Wp6FTjsg'q0YT%I4![()6R6H /BLj:R L*H\P,]hS՞{wbO]k?[|R 5PS}HS}<o)6Z,I 43]W?0&RUGM((x,N%(\֘N031F3 #ô?A#a6Zp2]m|5xӒbmʃA t`z0AS>AI+ʖ)G # 㶖Ea)T@h@w);$}^-+0+ۋ\>EWtfe;IdyS,0yKc$8vg(CQg1ϧHq ! k>̇4=kkWPz䧪\yO?KW>ebiq'KQ G~jMcZhCw endstream endobj 1928 0 obj << /Length 3146 /Filter /FlateDecode >> stream xkobm.%H. .zrA@KDD"Us-;3|,R,rl3 fkgB3&ֳ:Y,UҒO dwM7.Mn"rwW_\J~L"h_s0[Y tf~~f_5͌.޼t;X~A7qf20nV;QG?=}Cfgl ;ơ%ܦ,ܟm*m_tX`@ z]2AKiNdAպ.nã -PnмXh<ği`6? 6- WV&S.U,Q˜Nϴ,.PW^l-G?$C;r9 x"P)bɖg\;@~rօϳy'r6R:z02r ; e l a.0OhT 7~s0G=?:cP":yqL1F4__{*'Ul:LelAAQK.CX8T$C ȞM#.MOpX;OGOːDž1$QD6WyDXG*F*ůN~ӚnwYUov:$fmR&اuO+=-T],}&eB]i^Rv"2zH Nq) YIua@_:}NoMdYB0\eSk^b+?0  >WlJ#\^)9y3qyoh۰ys/"Y PZ"տ-d8O:̊cE/̒[+poz߸_dR<'q +),;Ml`qV3>*)|)<fyݾg`ɗE#mV]}ga8#Bk eke#JD"\T^εrQ|CϓݎhY}6i. mjoDb}J&(/N զm6YzQ"ns/-YM# ssA_6:x.iEAHGi6@ξLNlޢe X8CLN ~6Uj8q(͉KsƟK9:]IdJ6NK1dc v%"ePEU'eF!6ۺ _SEXe:C0mn_3p '9ut먻fa4 i]FVE[<}gmQC?i]Y6cnDi@:Kjd dPW>9Ц i=V`fQ/XYgN(e%],k ۥP~t^wo?+RƹK)n9(́+uaFHmksʅ !cRs?(0 @w=Pf Qewd] :Hʴd-Ve#x|+̪ĥXe "dށLc?VB=)NzYǫ@#@ eLuE3ad/Krld= $d5] n!|Q BIgw9Sæ "g?DB栰tsH 9>zεt-ϗY K`K[γ8'K%8M&~Rs]hHJ>h<]ALliEZ n<ڣ\7w@:x.Y񁳹AO:S,$MtwZw݅Ptw<:9'8rEӣw!} ƽXDE#=dKR2~eyy>3>->dpwna.T0?]|kIlvq3.(gn[,N3v+z|(vjC KuOʘަ+H NZGS!B[h/9# -ɏp1\WL Ken,h 285"9|4WWerئ{G$rLya%xՍ.MוPCIh7g]тy$p**teg*(pI?D:c>Pj2ttZ[wTnHinwnM+6MAܩ[A|++zMЬ~ J|C `z h #z] G7T oQlt&2M"Onw|۱ jZܼ%x;&hyX,ehB7#oc; Pv{p ƞ@ZBrNJZ,B.Nn GY'ҶmrV\EUS*-)*l[P77w*O l#`OR>mOT2C,1yx@7vkT H2t5\ |OxCg *6 fD435]8z~:W^"q􌝂k7AdQC>iyz<8`7M_Tzoĉ ZoAVO_!-AMQfv?Lp‡??\P%z;Uj*S06ֿNn֧7]7uLbI| endstream endobj 1818 0 obj << /Type /ObjStm /N 100 /First 972 /Length 2486 /Filter /FlateDecode >> stream xڽZmo_ܗٗ)+|6Yb,ղ$Hr>SRzbeHw<36(l6N?Qe⼢E EL}P8!Eэ*ڤ"C 0Q(IDp'''4V RȢ{pR9 KE wW$ax .E~*ZbK=&YʉU:"I1.TH3~B, wlč9H0MAڈ)8, @+x1xW1SXW@ѓd dV7< W A/r.phe SQJ8T6Cxe4{z,1.fDN;8kD$nhP]_]r4Tտ޾Wrxd=-XOluu]ҵeA_QCkt*R \1v+zLM`nE5;-@&7p c,B% ぜw9 ԯ7&t\REm﫺Z/BP=}FDZSљ3nEh?x!wF Y)jK$]D-uχ<=#WKd!׈H!6=L~} ^Ӭ* $R|{^|7C=parkK_*D .ڕ.eIlPzH`ZFsL`Z( t?Pj=|hK"#-u֯+Wb6M> Փjݍ-Lvivpx*7vZZ&mi;6߄5f?mG 㘝h^7M?]o<.ͧ/a04NAjԲMN(2rY\83P'Cj6 c)ÝsZڌf3ZZ3JT;wT7,8vĭV ݪCwzdxnBNAKY[)k&ˬ| r*eT& #f v(MvI5FR=6;N^ԻNt6<Up l:W\Gu6xXvxRΌ<3VBܞU]; xGR>6loGǿ-.o`v& єYRA𱥵 W{녞 >^"@oߛfptO%T>p^ |s?ZtX=LsI?Z,Ex#;cwZ{{{|i߆'50KkLnn.6%#QKY3(Jt_&|Ǜ1O'0}Z:>_EOH !0Lw="eM`OBD1oZlПPXc#VD6K7^ͷ|by9޼w?͆0ź3b|@p$ |6ťkx3=2{綢)Z9w+J[#zg@[ѱ&nEH;gāw|~Ⰻzߔ.| endstream endobj 1936 0 obj << /Length 2359 /Filter /FlateDecode >> stream xZm~' 696h־.@{'Cwfw)|2;3;yf4hw߾"JI.###"S]U&&Sn60Ͼ-mZ‰&/_^V4b$hzK(i}p wHPF4%`d_2A2G'$>A2^S$GyL= ERS8g'$`F|7h3c>[90 j: Ř݅ fMTwtge[VȺM\f:t.ls_ڶUaƼ^Wi'L;[6=7MZe LNi/KX4 3fmJQӕt:ǭ]N |,C^8,n*?o(̝#,0CM=n&o8rDr5|>Ѡ dp*| `H< A="hpINcG@L!i0GxrSV׶ۘ68dcikd4>ix#R"5n(}X|j8u .@`Z='#vGmmqN%#*G?'X;Gu<C;qW>F*#aYqTWh_ hx BH1>,0!2 1XGw(.hYYEebγL@Hi*@|:P ];Ep"3A . rM|bdn18SxL5Hv i!8aQ . rB3&]SAn| 5x4@窱vupGͱ!mM{}v{y e@m߸B~lśCo[*/$]̟AQl  `G&+ @Z34e=G#}׎. .a렠p2]t ,o,/.eUlrN\]*ÔUaQyfWce3 boϛۯ d(x]t o `w+ħai&JňЁKfHjA(cj\G^4I5É+t"ӡ:eAQ>Ʋ`D ̺j䐯PTzÄٛ:܋/~=ſ@ij>}yXS!1PE5hpzNFv@c@1?ʬrrRƦzl;sl}[}@ca;<5/)#xS3Hyw6ͻR|L A {4$r:` $e$RS~6Hj&"d,Y4fωↄE!G>9tebd(( Mbɷ&4GSW'&aZ6׀ v1cv|T\>2yQnO2po'"|+ / s s[=$_CYD2%Ƒ>gTG"mDo4ܐ`|{b#qx;7%)O8Үyh+,U)UkQ*eMB;Wu ? Hоv~R JCgn\\pD(+3Yub(#0kWeB/14m2 y];U\fb_w$Vա_@~]-P?NO)=~ RR{$s,|r w|WI/c,9a,ucZ:X!Cf ,K`UsIB.1N! endstream endobj 1941 0 obj << /Length 2052 /Filter /FlateDecode >> stream xZ[۸~_b7Rm7].-0mѶɴɖ,؉b;Ux F"ZL $CH!* '߭5QMQҍ~QInδ{H O_]~8 @#e 0bqگn."͂ˋ_`+UMf`tf&$1A4 2 (2(u=l" ta;/("FF 8N sJs+~FfQjK=r^e#v湚 G{EO(A!iy&-&e8xySm=ؾFf:ON'}N}y\i# ǹlJ]UO=eNܦڍ^^tCz&QD_ +ߠA<3&U3Go$_O'RfXH*4Н:Pj[!gDI4 G$vĽŢzR]GðAcHX*71#6-j$IVv(% ,%8|J"y]ݪudGܳ "&Wk]/v,UnbQS'`Ǘ#Aa@)~i:NCIXY͎<U;@/4,oGHX+slѨcC9/:xX[G-rň fLNIz}1N$WòV@D9h )ܯ5$35ڿ3uO@hMӪTsEgvRC;.%UNI4Y5 GtQ P8&GQ-\YڋVS?n ?v3vXس@BxFY G7c#Q<9g-J̍Kܿڨ@SZ˒bY)??hy,qh;!q 8d_Iðgxx?gqFY\xC$|X`<"&LX^I cņ1Ѐs5p= 'R/Vg_gvm ~T+ x*1HŌzi 9*0mp $$:~:eQUgӍrHdH<ІSޮCY}pY݋e/xl ,Av \;GǾ^|ډ O'3XpW7cJ-_-^wp_"|A)oLGpf-4QP@Qc CwzpPu%כqGؠ_zkbjAtFc8pko+ӈjG"WOg֟ݑ0'[,"@G>?Y7r/osVm(}?&e}M ݐp{Ӗ'N5mqJ/Оt0BW{̤[ݔ?[9)_%rp<Cj*=h.:V`*_+ڴQ{gV3tӻQy]GѬ>V1A<*^P!%O 2r b_c[؞lQ8Mm Z'T*8># \Иr,Q,17":g5L"Ӽi/ G]ǷLi0l v:4}h"Z&lQ:ys]^Y]Mِ!D=;.nX endstream endobj 1947 0 obj << /Length 2063 /Filter /FlateDecode >> stream xZ[۶~_>Y)iM)! ZEWlҢ3"%K b5pf8qշ=$L:3ܙ/wE41?/W))u'eya*ުre>%ta߯(L:ԐNzuP}kx2ߍկWeӭڲc olZ*$&R!p%R#{WN$-d)25eb1enk!FùPc Gk:ː =BD90Üp_8r !F ąqKݚVAҳ *CI^r/U(ԡQ`O de+UMVͩ q+vAEqMS}7k;,?3P{ןw*+."_PI1Z{VI:V'WvP, F>.rxdr߾w}Y{18xL-/c;WM`USvj՘I׭HjCe cD{Vb5wzyk>[VѭtQEQi^dPXi+qRkRInG/o(?f5*>*=DmF!$`^M -* I4= ud )Յ)*B-#*/4ʭ2"DU97 }].I !Iһt$;GT\ߵ:rY/sbafu9"^?O7SSk  !oRBo"%Mૈ./tIV֛TuO!͸LES~ءk=3w@ikh=ycqgKd}pl^CD+=cFi $ѝ{;Dn;xa*nsVv#RUmWhBhfT,ꉖzXpD|@sZ+ \$~{3yC 7c96p^5r8񐰯m^ K.|f }GFOZxϰ -_7b]|#b/v&Mr范B3xH_,MpU)wu.w?luu > h>>;?|Z&lLPia`fKT+Mle.T:TN- Y /wFvtҁ~=Qpu672OCx G ?f}<*8 "??輟`B?D |D.S{imԎmy2p,b7ҙV/o1TrZkZ)M׶B4vwח~!xt!l揿}@`hܶ.G0QS~Cw?wʝ['}o1\#}`qyB9 !#O7w<|=QA @huܡjQS)tTLR#."{lq7%0N"!kӄzXkq .TV_XuOŔڙ"2 xъ*0vY` (3>+زQOe-F[e!gVmYX=lb 6SQLF^' ʇŝNRESX2]/vD"8jptOB\PxMۻB,͕T?Ld% @|ƳDTubʂbu|>Uٍ(I{ĖeQfʄSg 1>r`ǟ0?0 p(}H(3$&Kj`_ijM gl>gҚ+~< 6;|vulXbO0Y5j?4q`npX҇ ;go7: Mx'?E=r2 rF _]Q?$c4ԛ߫? endstream endobj 1952 0 obj << /Length 2562 /Filter /FlateDecode >> stream xZm۸BR. IEr%znIPhmzW,$9Ep3$jy߼wIp+pye@W'ߞ<) &*8_VDKh*x3{qJ ٿ*SOI>gtKSd&"N;?|4` ZMuܜyGPQpmGm"xf?O_+ߕk~2z\cYń2H !ΎB$QP_Di5L/[iM *&D TzUۀ]*]$o\LKOY {`}_2VA-ONPxBM! Ab'- ŅLGX+޶b? ADzX56[4u,U2-b3"Y<}SvL4VJ%F|K%}:=Y&_^f_y Z 5yXp¿}J=v L` oW}"=vg'<;֊g2Cy&HQF&vp SâC N!aQtX{j&aAVt@j"=R)u!2p19 Kwv>μ)>,ɪ$a% 4k7X $3@E .oa`%a$Qqo&ݷ@tD E#?&wNr6d]eV$B&$#j,4ZNf9{~^ak+=a9. II'cтK[l860f FզX GChwb?@/ؓP@^3gNJOvMzK)o0.=$dڃ7c`oZPpk~uڼfhwTO#w<3G³+;3٤dWN Ͷ:5ej|W׹61s !\YYbnz1clZx\on҃L mX/vni*mڵFI9H[?Yt5!dًum,AѳHV(؛XaɥFьtI{HðZ;vk_xܰl(vyKūpk<}ɍT썭Xrs(lJ\lXMn|kѕm8@z<2H {"]+a-3C9Z/v!=1Ze*`u߅t4^pyS 'ڮ==æ6Eۧfo;pOcxP'vSsr”&kFR+clԬ(WFG*lt\ z/'0`/kG0>ĶDULk_nX[Ehö?_ pHلykÓ,Ӧ.(_ UR7u-><ϻneKlhUkĔEP]+!pNK )p{Ch{YF !U?=뮔1+[Sĥa~2Ʀ0BZxND({Ɗ[|2XwU;|x(#N!kvUbQHP=Ub@4,]zKҖ,arr!. 5D৮ƒHDZV!X+$Q:~hu~N]d:NK~AdvQN&n[h.p?ɪn"&tgTt-+_b:yms;gىK z* ;4t1tu! R PUdCkCSEvMQwxuUw_1{Xc9Q)`hw󝛬KzUHIqܿϾI\Al_;uO{Ӹhbw!D] ս+z{%JX a7+gk?&sVCd$ZeU.JS endstream endobj 1958 0 obj << /Length 2213 /Filter /FlateDecode >> stream x[o6B@o ,IT`䲴]vNbщY$PzS[rv1E>|8y}򯫓(T8Wsǣ|׹wӛ(O~*dnZ?*LLdXHEaD?9:R!fj<9ɻ؉{#7Oza‡g\[2~81}]{ScD#s 7o㢌 y9}X&%U{]1= E0!. |_1zC\19tow6'0b ~WZL>F>FˢlZȴ%aQ4c zc\zύ#xHӽo=Hj<4MF6 gwl-Ay5K4z\ϯ~˹e:Ň*Y>,CJP@ȮM";m;D@'x>YQ[r ݵ+h9"b.®ۍ:Z5WpQ3GE[ ȇjɊ6ˢ'E`Mn[fhgoy"1 ;GuFObоs)cće Uu?1yA!L:e9;yLC#IL LRQdxa:s Wm*J{i")]u1&H']U =UO!*+lTh@S5oO[ô)_zF1oȨLW{w:}QȤ"{ty(4j7)?^\^88;<3Ȧ #$Lz磐IYY-mAU1Yw6Ŝ˺b1U1W,c ;gw$Cˡ׶D1%)0նq֡I ,KzRZ_Tݷ'n>:ٴZG"w3ơME-"~ν믾G1RC͌^^Uגzx'~C´A*8voӻZ-8kmJ}eF"i5ЭGltA=u6AuQ !T-gI D&7`HfPTdUɄ sAE؅9 ‹(̅A s"J 8iY`A#Vq<)4 393,5־S 14NotR )*'B#V Uf$2k(T~eEQUR 5姸5iU…mTE|Z:e]HؠI,E,o`;FlDԆTl*lO6R ulH1wŭ 刯(hSƪE`ZXF\ӯl )L\V-esu).#P Gq9GMԧIw)o;@ϵlBU}Jm\+t+يp0  >l6\0Q:xeIq +ʝ/ endstream endobj 1966 0 obj << /Length 2796 /Filter /FlateDecode >> stream xZoܸB62"%srHzh==Ajs^;^Q9 g~3G( Ї_?Nuigg<{vNBF]? I' b$sroVbdQnłzn+̥a$$g?_vFa=ϡNĀt@"/rYAZ;j ?g޽w\z# <Ɋ5vV4jsY+ƭ],YkrMr{}).wx"J?߈Z?)Jݱi+3{U2m;=$-;Q%$.tm cMwscqVL<5|B9jf4"1Y? `iɊE*Ѩc沱t2AcDQ'TE*<;aL8IˢoҺsnc>o#qsc'EAnj… + $?&1J:k8^!B0>}HÀҿ,繗mUhE`'Vf=/ a c4φX<(Mtw} pA qpHd0/ 8qԅ! Oбߵ:ʬI' QSa(:;a$A@Dӡ(\i4;X:jG]Ede9#sBϔSS>vAn|MyYYA13Olt'$&">cBЏ'p 0qzmk^kc0ގ0v(cfֵ+J*k ++&DZ\u"}qQs:`"Q%G=Ǔ!n8:VB-P MZ_'@  DZBVFa^3йҍn6-e)D.KCsFF"[wiL#tf鷲sZf#:RH Xi {om-g 1'Ac!oA[7[R`A*7Y_1K!BM&S9Iv.V)|5BN`)b.:0iLzMsT \%S$|V=a>?y*v|F=SZi&'1롙T?̶ qQz!T)-~4[(ky Q2RUa\Ys/MҐ~(Ja '+y]%b +11Uq_[K3d\OkS e< 2-/"o-8}I`&W4Y* ۣ x d|V4(|#hSh!I= #QBPU_CNdXTqSQz7͸"FVIJFh @#  y%;$L2" zyt?| !rWxG%~l*)׹D-71폌k}kͷiDPMzbD;MU}Wr֖SF[x rǬ0H:IFIP `ѐ)%jPٯ %hUnfjG n ,~BD%\4 ҶtnLeugJZ+@f941y\ĚϨ)HZ}!oJyS1}ȱU/ԜR_!0j;jN, }Yek xnlY؅-CB`mwe2!񪝢Z2SUWbM"DINW-2w;9 ȫrfCu |pϟvwܗzX;XPW'4ߵԟCCWVԻA~6"%uW/uƫpV-$ZX>Uά˶J8hOm˸]ƘŹC#,*iw,qw;]M? _ξ L֛` E)C0r endstream endobj 1974 0 obj << /Length 1793 /Filter /FlateDecode >> stream xZo8EB$b8 8 qpNJ4)k6"Mzr;tIFwB~~o15bl4xtbSE.1 nv1;4-.Ro^tH0‡e[J/僅ˆ~25 06HFsc<_QWEa3q6c).# qJ FRWÌsxxrHaa6s쨋(0`%Y0~iaUqi֋&%!CHK>(/XBХ% .Fpݶ]91F" [ՅE `Jv[ p 0[a2*'Ԟ|.DS(d9 w@!ߎZw#rP`ڐBuh{ph2w  hg%)q< ::1EIVA#v7l`(.Ur?yS pU}9."\T:3_|Zu.`,zkLlD.e?=1* -88*NJ.#j[VCZ> stream xo۶ڊ$ĐDJto-h-ɒ>w)[4ew񉒎ItؚZz~ttru2k4\>rקӱ8)Oe"9#gzȥ!7'_NwB`>lS@"O^ƿ0rߺ[.7N~:V\˦^=_ީ`Ņ@ F0M()$KZdz͈JxE>7hw8!fQ RŽRX#+^GHhj2!ر|+sDO] 0"י0VJ@a$b}1YḤ8YZ[#h*2((LiPb4r#3ڠ Z (Q/LY]]%%󹬙}dQjy&ir PdΊb_= !߇3L%9h s5+ܮ lo㖹\`[ gM^WZ(K@WmCۉQU6|+CD%2Er+Eg.>~'`|.3tAM<`gEjqgѹ*y{.>]ț,*d6 (eVOQ@zIPE2U _g:W*nce^QП[rbyo>>!A 9zVޤx0!qVU\YLs AWt}as>zp=`C)c1A`'kX{ .|=`KKHB*guԚ!-~+}aKDz tøUG;(ՙ.I*yVg-iŐ#]~QX/۶y#DʼnI˗iEi 5Zjo IKn/oݶcj7ֳt+eoOzYZaio3yXfZq2y(TO|X^ a'DeY=]d}u71u a;qov]UtOȞ=XrYmOg_z֙$jK"5{m:%w/^_TI >-#۾ǰ1Alxgb=N6H5?væl+$ !Q8<2ElCYG wjei6F >(V;1 JY7#w*n_MK ܨ.}No]&U ouV}R[cGT:@y]ǷZEJ'3=s1t n wtaii!>YnZa,|e7]dE;[T Q}fEicnĴ>{>M][UyX$#LU~I]RL˫^X/= T_e1Q2 6C,V>"-> stream x[{o6?B]1 &Ň=vKGۭM16mk%OAᆪ(zibnbw{<5ܥjn\̺8lxb˧7h#O`p[` 1B\bQaF%8"V';;' ~bDM,=!8! I-9X^:F-cXZ tXrŰs=/ @rW#BDq-. PB'6X+4<σYt(+McL4A(6 c:5F V`$ ڠSy 4i 0Yֳ~zsm>+NsU W~]ȴjAt&:i.TCIߪwéNNSլkڮ 5S6z`sbP7TWZ27Chɿߖ]VӼjPq0>F$ϝuo՟oQkΨp;jl MW %V&)awh`vz1ߙ uP4rֳ߱(s ] .?m ݭʵ/eW]~{c +=F`{q Fa~TWQ_.ZݚS@%حT0b?4 y Dzc1,ղȢ=P*ncPaq3_DqgB`!2'Mc. Ғ`tJuJE([\bʋZl>ZE믑f\M m-Ǝ`g&."\Z6p| FZ)ՠ#-fkm ząC+G,9E *WŴ;l0U?ZAʇI;xۡ?Wcz1Ue2lռEV3;lmzT_ܹ>=yGzqd+ϾضWaf<5R}jdA3Jm)G 7~EM~Zp5B[:*DE*,@YW~rS$\ќTXÑH(J$4s@cYN,ZV?I 'E̥cmw~Bرu%CH$G=8K(/q1>+* g~R"H'*KhnkUQ!,`]oQEV"lSw鍥PzM8R?n?\ԮͲ a]UE \W*p3tpnˢ)~jh@jD-[VNUU^s^.m?[cppl<-7ܣi955Aע|DEo06彭`7_~Dř<D3Nा-GȹN 8I?NDlZXoV,Iy庠lr졊S?(l8cK᡺@{XV9)of9I zt mfdJǃ]SO!+?fGmg,K$(D!{;om}]Ρ0D۸FɵӹEdRaW-σip?=De*r}fLLKOoC`^ܜiRY{SCؠ7&q+ :b}ןҙw^fmoo29/|u`k^$Ӊot-*-_Ů~Uq'fͼ/0/VQ endstream endobj 1987 0 obj << /Length 1878 /Filter /FlateDecode >> stream xo8lI4ji[ۺͤI[IȀ\[MlUۘ &{/I5akC_F25f:t6k'coO7Xx7{,{ #w:|{9}XkDc6L{O6WFul\3m~gIVY`2,?;è:rA0m ~6r6:T=Ƹ\,8?e0lx8A9X,hPGe8n  r85 _x[-&t&bԓ^VCjٮ+td/ f\8x2SO $I\6A:O2]C6Jyt(`QZ@7.9ESպhJ2Fq^.x%1ŅԍC)Q rڴ$|dz b9c4qNn٦ȩ`a[M2QSru- B{v!mU%?} kC:#%2}k$=u.eF2Llp.G-d-x(UF!RGb B'i B@)^fe]WsgU |I1C9sef`uq[CUA]kV,u̱ 7jd FUn Kק)7kPhsV脞uv\C]|8Ǭjf3~Zjp3T9VqH C]am|u;1^7o3J!\y%  ct[q[cZsbFkm6+z1FbȦB.J#aia߭GH&B`aXEU)qI@!>k!`I~vG(ވҕgZP칈qXM+JDkf^ b^fGK1I͘ ȩ JA15fky&2l4 ɭ,6ZJp;c)XCY1ݮ R~!Ų^ 2zi=Xo Og<ά-+׶s/Jt&:>߱j"{n*YQr77fA^VM+F[x( dG.UIʐ?{(*NA&QD>~WhNt)@I N_^80xf*>zPI?G9=L/;pZXNxQ{UŵuF7`sjGs/ܭe#L_@^t&w72xXr q2'+1vdo0ڱ."׾Pb6nWB'wQqKNo" Olڷiomz"sQ> stream x[o6b T,Em[u}lH)[,yz,-;,rrC (xG6Ӱv4x><:LE.564!5T;>MH76|X^pD0CYN'B^"Fh 9&GM2h,7ЎR& ;d#$72]^sFi)$ S?Ћ,-c12~%<"MXhBgMpD.aic 77>,a@5EZ,4l^U q*5k)<65#J" LO#b<+?8i"+(t.T eO[7_qT_GS1+yzf UFfACԵ݆I\Fa"┗L<EVg8jYF t萹5Z]O0MNm' qP,'mn{No+֌i{tСuY!u p1Gc.Ӛ[ ix, 9д:(F7\р/`QIAf;M+z Fنb;/!ϝ!<zq^:5zpvh5B:hd[ft}^7ˍ}h+$n:~ϙ8uSH[Ux&fpp܍i4"L</JF,r-T/gXN~]"{j)? c7Bte{Y10?'AQ}09PXy= Ct~8˥T-@UrB, *.rKT_͘ ?)A)V)V)6*߫[S+.?VOl{ m,Ɔl`DaimmJYjTEgqG,dav%NMdcgZDuK7UV?īF: hn!2Fs*XxϿ,Lstulp;<`qzV_s;X]vI:0\tیFU}QCy~ƊT?lW-~-J]7(gܰDؘ .˿?.h[tU'5Z;ݏ]E5i3"hTcD6AG$%a[&"&ɡqwi)EFMՠƥd&bC&lV.eB;{79eޮę.2aDՆd\'bϖS<zVf B?fڿ wT Z[zJ_tXTjhf/Jx$ w4Fw5Ǵ\jԕE'eLEWJ]zi,X?c, xJ:3+,_([ͬYI_T`*g$+Hzy6P~'Ʒ^O&B&9$~"<1Ζ-Wm;mc[o(ƶ;ƱWAssx$g6ð.Q,'tֿʃ土E^ ? DMlktd?$e:{*;(_٩{mxDm|ؓ/QL%Ffnx_t 5&/oe) iVzcU_a/UrsLcnJf"LD*Cݒ٠}56;>Ƞy(DX C喣P"cN/)F;ĶA/I01NaUp&sIr{1˴8WG fRf endstream endobj 1995 0 obj << /Length 1907 /Filter /FlateDecode >> stream xn6_MF)h;]ڭvMɒ'KCZNK4Q4ux+3+ǽ79f)S QPa#ѕD=FEb_s1̍ѐ0"gw?=a(T*EV&0^Hwl"]P ˆ {E3E >翤TX9N;B F!Slq$^bi.h녫Xθ3& 1h!b`YΉ Lcl :bh^si&0T,A V q,-ںd/q*\$ LqFQ2b1Ls6vW\TUq=K,fƕWHNoO',TAŽTLOFU/dC61WAU -B2s'bFoXެ< &RXU­pJ(5fľ9 lYXU} ѯ-9~R׆[Zn_WR88FUC+v&VijPD,pޱB*5dXCȝ:1يJ!X[SAB.z)ʨaHrOf6Y٢ <ȃ* IV%PiHMk:z׾h8 f5L߱מMܷn AjUcTUL5ԫr+%̧(łItbT60ɒŹtJpyθI~>i*YES Q T <a4tDl@JR,*b.Uk 8fFQVk٢"mE)M*&bCI wt@~ +i~JtTwp#+6ҋ03XPWv(Tn_;.LͮȚ a~BSWP̺e#g2cLEeFMFQ8opwo da>\-t?:1_{V&BoҦ/1_dceSwM . ?sǎRxE> stream xڽYmo6_ybٖlmٗ.pI+[<Ǟpۏ%=dMpSL'ONB'%)s;qQB4t3{ REۋN\RV .~'#ܜ|w2I&Ν^q"tN~1}Y9H\h8&iS@ SpJQ>uU/3n\̈OP{SG 3Ӑ4qe$R^GQJ֧ iyMuMGJהᙄFz+}-6ۺVH^E 6 W]ST+{Yeʰ+5RmH]_(Fg-?e锭署t DqceuS2P;HtX5<8sFp+ٙOǥa)+\{<$SӾߛmX4l9"n` ?1H4 Xy($4IQj*HFE=J դ>Tб,5~p퇭 ?f[_nպ×Um>hEW,;opE#7+ WͱSjtQ0neȤC%YMW,R4wny ы q}WBA`S|*'/"J.eۊfîgQV 6uc>ϡmUJ^1C`>d-CN벬U{c x űӿvT&uR1CBP^Y׷j^i9niDBtS^֮. 5 ev03QT"CC58[i_EZPBhHֹyC evhUÅk0zrb'UsXy8z?a!359&"ɔ7p>y Eq(O -P'ғrC 4A}@0qSp =ݶPPS[Npqk;AZ{bǤ&-s LyF ۔ZB0PY+e3YKj!LCِZ(VK5^S D7u aJhd4 NfW%rA2xlaX۵s(v(PA!$p+B_Ƴan2"EōX?8_3tk#Խ]8.*C0NNQ1lJ}t{g5lyk?.SZbDo\4[XwR >&̉&l% MinPЌg:EL?bvL7AHMM_/ \ mkAB6MdhEoz`d0 "_bƲu\;]- T#s j/f7X{ ޿=ۋgC`u3N7e$L)fu!馭^d*d) B?R-kRH 1GNk<|MNaQBPf&Pˆm6 o*dyCV>ۦQ6-n^*PJSDx 4_;|޿كL@MNmZn(\\T˲φ/8aH}X/ vu`G$L/dy< ^(c1 ]/ rn=<32 MhImA%HȔgOAg֛$bAd)9hu~HI[QH!c{t_@@ x uFf"^4==zsOcF>K>_}1R[ TXt? >%鰧W˭M+M5r[CVb,ztaEŲm_R;?RAF\_O"=AH#lTMS +G`pSs'U,^ )͖LqL]N_+[M\;EooE'yY "H9iUFՅ/**SbKu3gBMG xcH"^@4v&å܈ 7c<PW! &gf=LWyFEa7McXt3w|γ[SjZsm0HC$Ymg"y.C endstream endobj 2005 0 obj << /Length 2336 /Filter /FlateDecode >> stream xڵY[6~_ jF$3Nd[gEmcudɕLExr2iSAE ^\@ZjqA4lE $_C8,l"u<[^.^|u Ok00g:ĕu2[m6AA1NotJ3lم>'_$D9sݍ s` ?bq4 sdTP U,Hأ"(x( muh8Əq.Q6:JS*W*M<#/0,z~`Q5 1۫rR_mTwPyj X ffa2{-C%8"NHh+Z+^B }YX`GU*L2CFYk+B#nHfq(q_uՐx; @س˖GXqn=d49TOj?>Tri_u>JD %)ࠕƭ@v.pڔƒĖwʑV QM;@|H=kOۏ< !_Oa 6RA Ɠ四(gؗM.p.KU_ϱ·>0cBVUSv7 mĵnPԭޑthLgGӤ( QdnƥBtp 'gN:q,C": `xs^t9{>lthhSozn_W,ʔnQXweT]Kb`HEx6-twA-<ی:0e癯~\N^`N'>7/cB~=ZPT\J -5c& #GLv$D( Q`>tvm<e|"w0b wQd7/sr_7pEz-vmxy K3Jٔnn1u:Kv;u2n(F˒QнjЯLs[Zߛa; 8#G_ EWt]ey#q_8 vこg-TGe]v~L 9 Fc%v..Jx2 e[T0;1խX] P2Lq+f/61FN1j;[NJe-{ײ $ )y? LC8jd&zeo<AQ}AGƤ;A.2q+JRT+y8jAB endstream endobj 2013 0 obj << /Length 2898 /Filter /FlateDecode >> stream xڭZ[o ~ϯ[g3ZIop{)Ew(v2V2.5G0;C'&\tg酧/dK,B'FkCѶ+ȋbcR,˜~e,bv- 2URHPhK\?$Pd*PQbrO!ԖZ [IZ\~Gx[C 7KM"X|qB:46 ,?NU4(8vgdA !XktΈHܫTd |2W.&x-9 U*ĞdNbWy K-2)}'d,|jEK=%̚|h1,KLXoY'Fc0xZ~weC+)mr^ ~!XI\0G>77cFСX8j;ݘtl*R/9_+Z 8mT,̪q?E0ĖH%f^Eݛc&P}^osrQUaz1tz*IX7yn1b73e=<+Ofc74b,쾭EHBÓq]j=;8i򍕘go \3R,dnSWO?V1$%k`zŠG!@ +_`W.8ׇh8g qg39ԬxsAF cջjvH-Dka% 8sj{pJIfK\Brtc"k8앉R&x:"5=\]X,..nrmkO) 㣤5T" ,yIfI*aX̩+}U:s] sfu5^|[W >吩vYV".E^ 23b 7?Qd8d d.YCNX+V4ȃQ|?+<.a ,} tLo9pOd áa3gDΝjJdԳΩgp}pgB"`!(.IoW\l7T6.Oš!3 >cYf"ͦl||(nΔHg~!.洂c#p 6!\OvɷWAqīwj ~]f2e _.3Q=0۞ۣ@4:;0fK&H)Ґc~Y:cN!ft)$+?%8DF| E|' endstream endobj 2023 0 obj << /Length 1891 /Filter /FlateDecode >> stream xڭX[s۶~Ù)5sN"oi\49hTyIv")ZI܌fLx.4h 4`ÃQ6w` JGjHn.~~}qBw4$p¨ ]ëoW׫?L!5L µWvZ$kR[4Dz~}~Qё"K)Bve+ESQv9ڮ( WW?QR~ퟔKˣ ;un6oS(;TĚ6% DQµ0qB~ybȀrƀ9P8aS_-&x)JM6m󪜰B V>g}?yf`?˔p*HaP$qz͉N/g6mWg*ab*MW :Y,&Fzv;LZaCuĶcܢgOr]mU?xq <3h=D)hv5YӲKH476@$!`FRcC6U 9 }G][MZ~yB\kCӇYS!W~rNYcpBD!U>]g6l''Bb4?,9\)jڻO4VzG7nW]^lgE ˍ|ٱSпܠF9ݴx)㻪(W(JQny6/.ttH4q\A>>;W._q\+3܌i5sF2jO j@jBi](IF}uƩAl@qEʤ3!:"&Rrl8!C#P &),zkލCP$!?"MGD e;Y;(g i?b'Ska0ho<OxTva(-=8/1uڤD$z0jBCZ=w粣:ǡkY19*a^5T1 gnCZկ\][/o꣈@V 6P*^: ߳rܖK~P-"bca39R ))ҼHo~GZXjc;mv)F\b1{\eR [9% _a<؄WCvS1prAv_pI_lj1 yA v) HQ!=d~-\2oyi^֣E9 ֿ)dg6\Rm79o'isWUd_vg 1!X,6o \$q2*Y@Yβ{>J+Q8ۡߐnTظnui'Q{ /H6vĞ9:gev"(ܘ[لC/'W@L<,jČʨ~svJde?"TjzLaqB4tY;pLlP#FA8KSKs;R(BS6$K;(])j|pSn2w!5vԣ6[L+{WW{we%p 0zxPֲOcymtw~!{_ćnh;5}=,6y(fវ@rye endstream endobj 2029 0 obj << /Length 1895 /Filter /FlateDecode >> stream xYo6_G9~غX,y4_$+idÆ Bw']G8z={y5DŽEIAEtRIɢ<YkYUs*_K]jj"0"OWog?\`#H'(i>~Qo#̢j%"~a/&su:יsFRHdLf< (b,jtdp_Wu%IYbd9}} fNx\Ql#m#1i7\.jYB6-}w>, ;ׅYlN;)  6B~1gި݊U;n/EscYG Py- 3W:uF±ö:mͭQ 3ucC80''f6!ܷG,A ;&D'H}I|ň f\KX ^E"P潟#D-W9qdU9ůj+u;`:2il { 6_[1ΕROLّ\tuu1!"` eH2X4\aOro}28qwbAA$8-唷Z`G^ XMtt"ߛ}j`ZTȧ 'aWcVIm;1owzgt[>GTFaY`[~37gXC wulQEԓ4#FuuQH7EY^5R*L{˖*s:MY4U4zUB-o݄:4_p)7VeiCA`XPTn>G~gԙ:@_f*S 莇PoT8`[VNKVh1DF2ٌpoFJ2@~8 ,^ ؐXA.i;jӐ7~ہ+Ar.g=p0b/34@|^v1D|iN ^;˺.]5 ~1 Iv4z;# 0`^w6hc|ǮpN5Q͹wF8X{g )YIn7,9 :i eq>I0DiD@A$~{X)MDi9>=oCP}F+ݗd*=ȃW 2his#Y@KNqA24 s)@6BS;xG 疣L{<@!1"qY2`=X ~[^MJ<>75lglGC \sJdFo'B2D3$ 1N% igwР.oz!!xOQcЍ]6R\6:Dg  T$O=l> /@ S|VsD흅a -sI I6M\OJivZKbUƍn[7Wje4rn[,U/*\ϯ卞Z㣗I%ߖ%Ħ))k>A*W1c0/Xo݄)xBKs}xX m> stream xZ[o6~Pfy++KB;%wxcG;\m" \ri%&bDQE44q&1YѯbDpĕM6"0"/'?D1hbGӻ/8JaC*zp".<b,i`vl)K0!1"1<ұ42 mh> PrB+"H 鵇SF Ҝ"o.UH@L_ b]8ހ:U‚1 f51f*S4=x<KyX~_I~lrb S+ f}1O8p<7xFgRppkpM;wbܞWc૽9Z4t; a@56TCiG_:o(kыјQ1y5y~fU$^Zn4)IHA9 @F;˼7;acNV#>Uh0'OoVe R!Eh=>qp}bQ4`D1ܛiĐĢ6:BJHxfjkXVz_&/(qL~пf2ȞpPG9"<_rW;CS>o>k'`Tv ŸfCBeP}*$DړWM q o wňCٵ+fczKS;57[IkpndFD ܬۮhZ$AS >$yR42;Xϗ#*rY[W&IJO\[7a<Λțto m zɴ$yl}'O&uPwltj>cL}nSKVaՃs|vth,ټ/]0mK-&&+K@wh7DpxkƧZ=ٚ>έd?>07+s۬ ""7Sp#|RS521Jq"Y-(gqi5+ΩŽL@/ۨjkOs$ UTbno(>7% X`w#]vy1,uњ9=]k͜*LĈ~Rk:3P8U5;3P jn:~_JA2A7Zi/.+3Q^i㡎4ȶZz ϳs šl ehÎ; P,G3hORƱm9]ўQšTɐ:NMKAeI{@] g\yGu#UtsgE:c0 J lf `&!1Vl' !s(֋OU,+֥c_-v&2 /Fj\B)̤f7)Z+"ZbΕvIupQD$"Pjf}&F܍Y^H+wu(tT5eQ;˗׮bج?Ջ B!+%H+)m] &3J"m6Fί endstream endobj 1931 0 obj << /Type /ObjStm /N 100 /First 986 /Length 1883 /Filter /FlateDecode >> stream xYm7_!藶F#ZI mQ{s=v$}F4SﭏR 9gVgf$lv^e eow$-! (Y$/yRzc y+mXz,6|x6t(zV؈bʜıcI9c#brq+睌Fy7k r 1Rpb/:H^ʛD-DYIy/!€6c 1(OF0,G KS>Ya9Ln0 STp @|1U!XKУZZIHNx `a%bcQE`erNd)&ISB1H7Q.NQe0  Aoژ1~ hB!%D"bH /"()ː8= )Xda1FL3*$zPf#Vl& #HHh"YHeT Š# >$b*!a8aޱb62GD'W8=$14;;UUpnYr/?̪GMoΫǯmyU/E^Dځ.8@ d4"zٙ^YQey#YԷoϟC :2YGB%s59)U2ze_wT|lUS_e]]]v?T6eXmY_/~5iZbYN ^ > @[)hK |fZ4Z7EMwUߺ\}___mn{ly[xy^_~E~!9n9\]^I1(>m} קmnx1탔f7RG ܨZ <`5T=ozUzV=Cd+]iu]4Kۏr5|PR'-V6eU,lw,ԼsV'yCBsswpu'qKޝ}f'i"]Aw.P]NG'm3t3β?wlL-}jMT`b0mh=.f|>T|?P3>TCtljq::N@'a)OG'`MGt*vttȍ@QVlC>#+:kąt.` /]^^v\iF(Rʚ<WRSx Z;VF:Ptrr\lUjS -e D|:,\frN 9$Wr?4[.`;^6Mvo뺗jU͢ߴ|w5Û\RQ.GGdEL t[ϗe-U3P.e ;Jt\@ͻJ):wvB"|ݬAt'H>">NH>Zpדoln%_)[ endstream endobj 2045 0 obj << /Length 1260 /Filter /FlateDecode >> stream xXKo6W(7{hM@CcT\IFCR%GN$- 4Qo^"hiFpL1H3".G_WLs(b9%Eŭ+m\aXaُ݇w?g"Fkb;<3!" \ it0#)W+jxHy{!J0::n]M =n5R&o\sF&E!)Ms췮lmJL& u^hbй<*֭Gu 8$X Ly0[[B>h KuUx 9IUǽnw nџ <l㗣Tp(gejo}4V!$Wmm"sk/4_TJwoվrcXiQ+lE/*Ls(loCPBDZd[{hH=Q N#SQ |C4E(LjF2L(\(R0ߝ^/4Ǚ6C@CKǦ]zz·*-;J G|ņUBw Oc*klκ`]_nMiVt[aƒhl8et#K''фSc^e`HIel偷hoP̴ v}սQm]6$V@V"|ڲ}8 "(h@^*;&2jr΀rzC.]e-:{<H9x5I[WM5c1Cx8Ҟ77B@2ci¶nݯ]FɓQrɜr> 16gk\s}){k?3C͠9l2jv4#XVU:^>bH<|/]ӪI?ͮty~9D)l_iz`V΍Tk̫F@'`4)g[䌇b@pVcSD Ίguu6gLj23g)rL?4\ك3&:-z-w'Q?JosPs4*9<4`QsR0|8S5򳆢068@939 i_Ԅ!Lov$LŠ}UطC7>< endstream endobj 2051 0 obj << /Length 719 /Filter /FlateDecode >> stream xڥMs0:T7vtڙ8ȱj!i__ gڤU/H#gw_Ap `;!@`A/ !fR>Ћh2X>Β޻s؋CdyQ@c$)vFe2$C\>&^1_]~M{40xkpϼ Dx1rqpju t#[ qj[y1b0Q\t2Tr&"V9=:y\F1kE@3{hI`G]EeZϟ7eЩʼKn HqO7[*ăY/rUTEJT>) #I=Zʪe1iQ_#JR>XE6k1vu3cőnsVqq6Ya'rMTvqyk#Y<z\TS#HMvЬd]EέB2ެϴi 5zKPSxuAB׋]PZ#Z>8:)f_떗~{awV}ЮL7$*ض}}NsPQ։>ϥ.0e%Ѹ)tm L+.,Hড়7p8xyq!q@_HD/UE_#Q endstream endobj 2057 0 obj << /Length 414 /Filter /FlateDecode >> stream xڝSMo0 W(J}Xi+aK Zv6{Ű)6YQ9|I5 \'er~%P\A4- %kf\r;!Dm2$= ܵΎ.$*ML~%̗B`ZR.Y#0gՁTƟ-,o FRb//U ) $8ϧO`KSm[;z9ǦmPDȘoS]vMryf}=D΢ESyEv;x2ƈcsYj$nl#ʅ듼}(o̶'QSO䕛X7ΣZoz?FC)ʙ%E+c`瓘:$8\R=.䔱3@ˍiM3yLoBǑvC endstream endobj 2061 0 obj << /Length 282 /Filter /FlateDecode >> stream xڕQMO1WqaǢQh &B ^: Mq @`BoV;X)$yPIlN ꍝI@~gdC^â^os5+yzCĴzMm,&|^Wu+VU0Xxg~6 $vz4VR~=:rnMVo,|]mRDct,&>;`=Q_Mɾ&k~y|_=wˊC#!Mh5S} endstream endobj 2065 0 obj << /Length 215 /Filter /FlateDecode >> stream xڍN1 NeiTGNp_ FIR\F&@ڢ6{ZkU_Fڃuĝ?gיEv2qTg0zTc7c~ٔi-9+8·V/ЪO endstream endobj 2070 0 obj << /Length 373 /Filter /FlateDecode >> stream xeRN0+HdwlnQ( *=TMR"5I ǩC)xgfge +paA<D!5)(RjA IH3lz^ k'GB; j1gwQ[f9Ta)J9P_8YԙG'כ+8_zˌEclӫm i*w?{Տ?i>zzMGfͪ]TUYN$O>5r֭hn. +!b R׮ۜ{זniˮ "ې)c / dѰ .-`HAAI:e2O]QR)xߩ).\#cܷLr . v endstream endobj 2097 0 obj << /Length 266 /Filter /FlateDecode >> stream xeJ0)='bWOu{ܓT< *zn|& B8# d`́TybϺ,}zYʔVgy}y:[7^(fn?Q:mNд2TrD֣H-3, oLҀ @U= Q@T@$߀ bfF%x1 .|,k 0ݘ endstream endobj 2098 0 obj << /Length 264 /Filter /FlateDecode >> stream x]AJ@EE6LG0 AW.AP,h9J*GтW ݴGmc8>,EzVV/dKuT> stream xMѱj@ `-~ sBѐ&PvP:5 iiHygkn`ʧC|~ܬ*r״P'֎#gre@_?XnHH+;b {1:*&3E ~z؝Cԫ樮'UgrT,AͽjjNLvImzj6&Gژ^-y4pH=$˞/{c[|?ȍ endstream endobj 2103 0 obj << /Length 240 /Filter /FlateDecode >> stream xU1j0x0<It:;t01)C2BXHK 2h>QCiW/$ߠ*򥮪Zȇk.^eJZ;=_oonwgiw9/蚑QcjS4m.k`nn4&ZG$>>`V101m Kb b IGs2b5 E8`_rYmQr! endstream endobj 2119 0 obj << /Length1 1415 /Length2 8154 /Length3 0 /Length 9115 /Filter /FlateDecode >> stream xڍT6( " ݍ4H/R Kttt7Rҝ"!s9>3s3\CC,n1@,lI% v6' : nǏN;@HBA@O *A6vN;; *:J,yN# w-, 32Iۂ`S@ >h CL XYY0B [@0 d=2@h {4t%W@bwBAG d{Lq3AAv0; O2bksY6 ;E 3  @' h: # >N|0S(cm~5KۙIBlmAvpP㽻\k;?9fv`GߘG} 8r\L-Yjd~b0 6=ÀN t[3)`ۡd(H?v߿ fq7ϊYUdՔ_A `g>xw >#W{e9@@]K\Dgf3}|?OW;q m6#TQ v %] G-Y0 L 7.5 lR?-fv6={Q<})87 BK~r4a1L< 0@o j `d:1 SG(Qh?݃@. SiUe83$ͦv"=,56J<}yex|'º4ݙŝXfc{FsWwbs~҈&OȇMp%R]4?qzSuGh9\3L߷MI 383* ηI hFtpoƤa|:QMl4_4e9#\2E6.x1^ѺT 3{ Ox51aM!`N/bE{9N< .Orڨ!]" G3u tGøOEX1bknxgyK=vt _s+3Q(*FbN H3< /1U79oJh|+}o\e'cŽ̈́A1ֹy_cՔiSzO5Z"uXVDư*v v,'#aYH 2#]iq=kUR5~LDu"}96pWu T[_F煃15D748^tsN30l^~i筱Le#X<%$KZUӆ$)V5}.<Շy{p+4pSU`h-i#۟fjV<1bh6x#?ʅ’I񲣞؜,մz\4m`ۉ҈JTvc-&<,$]{&/LQV ʮ\ʕP'sA㒶%+뙵8sv"Ic(iʘ>SҡV#,ͭ=vS˻K|3GԦpM]mٓJ ) t2l,=bc~)t a یfcĮ7]uxP r'^) 衚,OC%W93=-Av ֤ K(|%o\]:%k5M,Kc&\zV箅H[tNIX0>%?n mؓ/63o pcK~vc}܆[brv+-o1Ջm]HEN6~;iL[ZWBʐWpSR4*3Ɠkǵ ː,J2͗-y tg;3m~L՚/HƂbFE#B}ᘵT[jJm;2R S#}11Yz#V9 ݰQyQ[l)N۸TF+-?/znC{iA ~.e13tf6C Iƫ٦!Yp̧v&hA׊M]/zV܆]OմqKyAD+hWG+;?? "i]r҆K fD6A&:#5'wvuxKQ빐M^ 96?}hfdJDf$+!)F5 '%RuYM^(w[XO@HсoɿFAN G,!dw/9) M(/kM'ƸΊʏqD:K88u@ίjV㱉N9N&UjZEU,\{ b0yteШ=BI>-[늮ЕcrEɍd|H^]HNd~h9/2J6p=@,oA־*5/%JpB%^˧}2p5Lc/QVp"C׺dh? yMݳd8V7y5i+bJHs=Ѥ;7qj}ުa S$Xp=tTų,nsBD$WnI;Ix7{4OY:D2OXhmp10wŸTٯ@UKT'\%Cea%~TS̷;ŌC4u̼cՓ9>2wKBۂGY"x>c*NB:H50-fU; yaJKF1;LHkR"ԧX8K?\4kτc|$PCY-IbCKZ>}Z{%a&"SLšh=Y)}ƶfy{;>8^]1z@Cxn"tEʫ$|:K }a nșk w&݌@K ł snQ^ٯ'lV FbGx鬔LNJ7ZbRnE!&uU`L!`tݯ}Q2t:ˑ`I"Bl_-y[#:1KHzp!XK&m:5C2A[d}cL,d27 q4q_ZhkҎ%'[7tބ$XhHH_P#=xh&94%x\"'[Z&$p (ԦXGkY)ҤSVgc l g]w =Ow,&^s_ZK8$ky2pEQGGF3⃸0ة;!Mş뉉(tLT.{׳rvQ>lusM[˟X׻p Z~3b6!!֢q#OJT<^Y?ʑdй]!ߪ +O]l=#.Ǫq#-M<"?k7(Ύ$[ů?;^|GEg蟍RhKO#L󷤕ssF46a:S9; αP9-SUVc\NwL'tnF}t zM;~'*.ԝoR"0أ!"aIۡ{ۈyP/B@|Y˘xAH5Sb2 UDtz[iCyv_, ESw/\^ Wj~oc;/{%!iam?*H I߅̻#[M*;oB 0 1FNЯ&JKص8HG;AIkSpbx0͢mМOɊ>k׾|N6Q(O d몬OQ,ye %lڧCoRS-́*'onBF;嵼GlQP$p`ā߂_PnIvuJD̳I& -Y:ކ\XzpϹh9^k,Yl0EYhEDi #k$t-HtyCO}%| EՋM|D(ܴG@٩^x躿dtou96S't58 e/ N@Xp%[_Ra"rŢV!֣Ŝ)!:5|KP(Ŭת7\]U8ƍݧr̜(Kac1fճPJ!-om3ynyl?/1ԛ-7}}f^4ŽH+ȹ茶aV!f'F_(x"_x16 ]S 9aS 4vįВE-":*G;|KxʅPŇK7mЎ9QMqTa`X5W :'YANO{B{ uMCH)n̓9x(ZֱViwJi&# #T#L=fKFY,sl2a>5"mʠV.!ՉBtNѤ{7tlpVTp^6ET(UKgpg"k%ٸJ#lgu,#y}C\4AU2Όn g>5W9DjXH^2@75i$m]L^KOX}X^d8ۨ;P i$c@^EhA!8q9۰duya>bأL@W Y9J]v[#l[y^s[jqMk[H$Sj, IxL=">16omc1hk ݫ[BMG*,ێEbF @BfS.1 g;yqѩ%U+mlUÕ\Z7.0’t, 貢k{ia5uu|X8+nb{Zi/q80OWaϺӬE 17u8DqRRlH(9Szn>y*Y 1֙q~?'͸YF@Wݴ{cê 6# yߔ"FU͢}3@:A}<;q,v`?"ul'{M[~/z"pnэ;+& \k$KѢe{FTS rDF΅8BD4je[:i7ʪHZʛ<("G *,c_^ hb- })@f{;bM<ÙD hzҹS#=]h\KqާbQ#oEx 0Տ ,P\j:EUt1sT43sоog*HrZD78i;;x{l}~~ QfYN[f9`a&ID2֩M怽Wb aI=aojy2&dGOB6uMԑ so\Q])Ns>ҙzUEXb\"Wq~ZdI ^0TUr zu0:(2"jRCm L{ےwAcu9J,fŔ]3=|l>V?T=Jy_d|v1$ sbyrS'RY h l\7 h0E27%$S/eptT֍M<;S }p*u̐"a#z~$ni*ye2PQ`DOlc+Mnd֛ޛfŐ26ng 1vXc {[2~%G~w`Sit'z3|xA@PAY iYX7@7 g#"#b⾮/,_d9ۧEI=x^”b)pV [Z^EetU9ЩQPjCl3wL_tr;4y}o><ז ^6lF' \C 瑫B΁qQ M;:H侟U44`&gnzB(+vvL؍,}#m\P}&Q$25%6+d󻴂giq6{ Nj+OFknxRLٳ~>#/]=kT- OYSI<+yAI- Ta4Tc1:*)ҕ=_(pfE O@hͷͱbΧ'M\so|}>rO!w0kfEvtxQ%=b\t0^bhiJ8jR;q):aN!|g>xn.GVwyxCB Xh>d!xpOvٳ';j j%:5a;{k#j3%Bo '97fmiMJztܼF%ě+Rz66LH~ֵwB/U]*Wd><̰'6HA VW.ktC^)χ˹ԝٽ1%p{'ҜOt7SAv)k#r턽_;h ɏ8hzTu}Ŀd JL:C]{(B <%wUQ!zjL,bnE)؏"gtSs 7< MLgu/-e2KW7u8`4wEih"UnDzC\DU\7.վ'3 co28}soCevhzQ.0?% \]$or|85n(툃Rl9*e1Yۈ +,:Cy&ram`E?e-|uV_I}9]8 endstream endobj 2121 0 obj << /Length1 1866 /Length2 11783 /Length3 0 /Length 12974 /Filter /FlateDecode >> stream xڍT.;/Npwww+E )V\;ES+Z-nz̜9׺we{>M@BCbR8x8Er*<nn>Nnn^ =0 9 B=䁰'C @#(#$ !] 48A=#ٚ#"";@40{SFk@b += * trB$Y`=@{l[hAƉгCTBla@wI@\^؀O*-W˟pyvhm qvx]`'@KQc]l~'z2t @QF|`W v#0OcVp8;\`PɃAOsp] .l.6۰yʥv{RIp @n=zޮ?^AtOHiMm@^=zB1~KO$ =o$, 2FOT:@OOwL\6 <r} .<w жCԶN@?z>q? y=A3_!~O3Op}4'_|~D?L\ c~b-PzU-Cɱ="|~e1RdQXO^P+SQ4whהuz2V'o j=;j ח3Ϛ dD߻@exT5HX(֪Q]NL!bpk8#apٌ1|I&vY7пM> O!ϏZeTs0MO*KU sJem ϑ5%l{^Nj>KAWXJjDT+*&I[G~ _b=lZ؈YlC zr.æ yM[$KDB[=qwP/^?jke\pvŏY[,ʿ9:&Fy·kLRW,}m/." ~=*4%rq9UB \f^Yp/ã4(!D`_A&"T+%4Ć3Fs夲乼ŜTjx^~ +AijkV-ZǾ `496avHQk'}eAnOV1q`;cX`;sNi cEMKL5s6 edɆƭBFc2 61-dQ6n{GnxN&Bo#ۼ$lgnL.:2un1N[>FKIgY94KA6 4 b6zD7o<Yf|FPb}ϋ'W={$nV<*7#jaRD7 ?&.V,Μp3D69C;ȖF_ " #tɋ~JP-Jבo::0rD6Jn.W%>Cu<3'E1"@'\-{$޷ߛpB"`; F!-Bn5pa$]ITOZ!- X9-ak%b*>9CVG*]쾶'旌B5/! >F<mפ\|bA=2[s,qJ5 3ɻowzq"V o7Et(#mޗ|$9Jy TH-5h"aa6!ef`GaދU欝j5gsƑd|Q~e"%ϫsip@~ xB- G>Ǡ.q>uMzt,陴bt l[݋/pK>6ˊQ^[ &VׇPԝ㈹Iz_9qZ Úei7]VS\+6TO*j7,-v%'gT4a( N.!ubq1 oV pe a45eb#WG*sosA5/ˬޙ qr Tr 1POhkK[} ЈpSwx>Ad a|#fԀ*re͏d)J<\"b}*>)%ms\jN^nky~5\u 7VUw5o ku#z׳Y:îhIw4QCQMd b6i* -i]s$:n{&$I3"iu-xn '=?P#KKaYvbTo}ΣFC -w`%M#IXThF(6ԲXHyVCTFE3)51I`:'P^MOįͷ?|`E6a}:fT[wLj,=\]C4 ˲.8w 9`{Օ>9?C"0ua:G/KX0vlGc;Oɛ Vvĺ#h)Y^Yg|7ɦMSv+ße 1A>Wu\@ Yu81yHI~qO($ PH25gSZ$&b* {kPK_».h4E2 M7ϴu:^7UR e63Te~:?%L[t+{4(C9ٸ#Y m3#SVʩS5!܋3Z'n/J<<5yk*x $k$ 4~qXX/uaoOֺ4eIZS6h'ŰO?="QTK(H,uw8*ka^9* vkOP]\s7rgײ"?IXoݟӄS*q' {8Km/GVycQenXCMU)3vEf3KP^7wsj 7bq;rƿ,8]Cis<\YTW y,r|=w#vqRA z[$W:Ak OH"ˇC}[^L|aY?p~%Kƚ;3N>f, B 8‘sO}bI)Z2xD\o5 K#ʴQj'ՑVg|4~i識Ec>shYWپR4| WJ틲坺ku _3[ޫ&XvOL;%vrd5[npQIpIi~CHg_ZBmQJzG<+Wd)=/:l ׌+_ᆱ~~[r=+e;å fepo_$EqP|JEאNb˻H^*?{jsjz!td1R]D<rލ+Xc&vUtIGW-ňEd%i? ]`sE^ w޿Xk3$X [mӃcX؝iy*{} uՉLAk_- '3L?t7Y&i鎔OTڃuGܳ$iݼ_UL3eS$rB? })yq?*6V:3T4.ֽ24(}r%,za#ŽT=qfx\7lTbYHJ>¸B[қh%@7_Ӟ Ԃ|oϬ620`5oNiQm*Ӵr %j[zJ,vz$qVMhl b{?c,G߱/ ),&-9.$[>eٰĂ.*ɂb {_88Us\iew|'ޘ BA CHp]00S  5(Z\ix@CAoҔjBl ]ݼu&ֽ0%8= )U7XgLUr~:̬2WgmEpyȣ`/.Fwl\Q fSI,'Z!Eeb6z{8 Õƀޛ t*[)mo wE)Hgr}o…+^v ԬFH42 D$ХO;~&jdzXҙGQhJ, !gHvj<4 7hḨfW$ 9}QڵXw/^*@UH`" C}_t)iczsAR .X YD^ܪV۸2Q 3Բ ϩE䵋3ʨ4bNXM☻&hrSbch,ڇbvVnFs-B>X}T=Q85#iWVTn#-}7mz)*_Hd_/²5c0~i LߓgIGJ(g)0E;Q ""YQ-oSlZK;|Gqwg>݆c,fA(=xcߺw)REL0oP/HR߇jVAP (ZJ (jbu>Lmv." > <(jN}oIK̀>HQCJ^'}DÈw|q2r+yjbײhW\}z(4yRh<0TB fW})673'fB^G-_Rp"yPZՙks^5}Oekqr,@&H?>CJ t=7'a#肤g,؅=x] }]rY$y>Z\{D 1o5Gr+(骎ib wؤD|TDbt8quʒDon^ |AxӲ;s VPͦ]Y3險|kg'&\ԑ? (ss~<44%AI>} l:oKFQb9IQQ/?c6N8dS~e$J[;~s&lc'{: IԘSBh"(;ѡ-POA2.i"ʐ6De g#$G'SwD$~x(p "Naue5"ތ BO$GbIOjME" Ȧc$-n+ \!&s8wb V{r~Yȶ78R^APsmQ~b.5SXes4&K ͣ|a9-DzKRw%", ֯ai퓸5[X݋_ۼ"*ɾu=?.X᧝bG ̒Ց̧|ŦP9^mjH?檿"Y~TrOY("jV!!MZD8XԞo3a }jl•j%%-p9,H RG)|_TP֎"HlVZ_~.'^9sw]_J9egK2OEziNtJO20c_ìM̵̱(%CQʼtD#:{~(S%"!|$"2R6'Q'Bâc5cy³βy.Jy7 5ԆUy`ڠR̢Vz\T~N{EhUVKy$ J =ZQXx>C5S]/WٺM}=܋y{?HhΎ,g j< 1*|⾗+8.$5.1l7GҬJ◸|P{OSV[[^UV&f|?YK=N,A sӶ+*sXCT%G+woZ%y%00BF'Ee+e+Q3\ҁ|mEL ߯Bh'ڸD ZSsA8#S/o \R~9ǙŁҽBjb [l qQlN=p10aHTpe*DD誮K6]T?tug' s8g{aHkQvěI۔hg__LI."6tOb_rcD-ތ1EqoJٓ֋Y]+ :aqN,Ca鍹{Y_ǘr]-RdeJ\_eqY~0˪%sMA\ZP][5K) 3ˇgUL W|bü]ޏJOP*/[jT$knŔoh"(fͯdx&l K냔~*$qbs!KoO7nHWPs¡Q2@I\<,<;cE#ԘQš NJkH. ;`d =})S!Z9e)2`!=8kf=BR#%=.g"a͋)8=OS,lJsP V'sߎΣYǽi9B ( Ǚ"M}w'qCEէ@MEԊ9.0-Fzã7|=bV]uyq%BWj].z4MXd9`pM{a-JV0x:yzJG{3t!}p[<.gJЩy^0}¹H)a8D3 ;XʚЌ"󍱍DaVse)%g^?^%DʔzP_0R96>T>V*x 8w⍢(/~rqwyT%y \-<_`azf`9z#9tLp sI&sȤC1ZxLdžzpW)F+bCQ0#G!uO|XVR t$_]Hw2ʄ*g3GvN2OfXSG- 22C /LV@nHϴ'y\!j50;ˎw<ʵUIݜp4LB#c14ɶFh*Spʖ[F:[KJuA6&RͶ?#ve|BaE>j 5p@y8Ol |5OبXH|Y=ZBYz2"6%vbaFei-KՊ:w4דf>M}yT1ω ۃFgMK(e&s >o?gH @k <دFr$:ň˶FݘX0lYi@Jo!GJD['2 SQ$GrYUE^4wdԾdhmsD:tԹ57AJ 1V|K' J{؈)~|H|gHh#nN0;ρIDnOǚ r dXD8='Y-:g m6t H 2'dhOGĜ\*e`܈ q$Er ?"WjL$kUEDptpA(EFx5Ld6m^SZsxlhuccWpIM:bdP1hx_]j-&7z60X0q& ʲFF6kҊϘ?V*#֭CZ捽.5%69!3sz+0^BӦ&>|OIl_Z>χK#D2asapkPhg>LqlE֒fLUSOfu Geɨ,HHLHeV }g~y]GR6")2%!cy9&/r5zKYŒFuSYR8~YEp1OWlLx:~W5B mǞ }KL@% iQs @ꦤh\ܐW$XyZ}]_9*4rnZc^u}&9~f7%Gm!]i\;>DIAi5ݪ z9!r+=f!뇽Nd/._]c(ےJ_YYD/{wj_&nSytnHRxS,d^ihxsAD%|fCD0h:̷{|Ut[bsC; 4MN`$x)Pb7ЬN uwx_rO"wy❉b@d *鈮0qZ+$p,H|Fe;$JWŧ[e< \J#+3n`hc1471K]-eg0]".[['+ԡʐ4d8aZb@A4/z \M2G?Ma}D1 $۝j0 T4c& s%҆`Ԫg^XYMPbK a M&WUpYpa{jR8|mD7sAyj; Qa,EOFY#=QoZ YS Ҫ~soƃIr ;(]ѕS cKbL?~I fьQT˧{٫Dh,*9զk GSP\ !#꺖)> ԐDB`-U}="8E\gK|ȧG&X`Y nA4k0{쒾těQtV^" Mc2rx^PEGlr|{uDTqrR 52C$$W&^A 8 E/BMH/#TMxA5 sF+;lЖ\T E]ܹsUۋ"ˑYΈY*O8}@9~LO$HA9ɺ[Ϋ)UCQca sKw_= \ʋ/koz|e&Q2=WLeN=:/ߧG[l)3j SJIuGгVKn\lZ6j^@2 Knu6h&qY#8i endstream endobj 2123 0 obj << /Length1 1396 /Length2 5927 /Length3 0 /Length 6885 /Filter /FlateDecode >> stream xڍTTk;UH 20 14ҝ4ҒHJt 1߻ֽk{?{{y>V&}#^0 !x% ( C.?nVS'o%)(rD%$@ (/ C :|M8 Iw::!Pa Ppx@A0qEhr?JpH;!n>>>| WO>,'pB+dowu0GSC"x ' G僼AP s@UB gJf8=~YXʂ8.0?@e9 'K? Q>B>)C?\M5}>Ju[@{]Ew䋥 ~缌ێvӷitӤhf =hqd=Fu]i>lT4#PS\Nt!ŮxC5{פxLlf-w>d+} qO4C7G"U锅qM HJةݕT,sf tOOܻ_4Qwk>OHNb5][+0^646~%,ExEǤWy+%ĦP=A$geBEՅgc3#c' ;[<+&\dȤ & >-E~zAqE*pLJ)Po5+`q)GqBZ\t4JW,l vxS \ᕄ!fpFdؘ,#- O+j Y=]-] aS$䋉Ѳ\OCҡSKuz/@5-)y[TXld#l=TFj0NOR E[P>};Px@-tERֻV5&o`t+戸д)4+*푬H;l9,ixbNb$ 'љImak'ss%RgkH?ʫbYq"=o)k\pj,*Оd#~%䇥MJi͎S=|gDecfFQ>΄1O sW0xO+vۭhsk|%;gTȵQ8jѷєR~7+!cs10''1''VMi뼫 W/bh>PqMKG06WPVƴӕ" /ݥZ,}b>#R~-S2c7زvagL!o.vl‰4ЯwmQD^1b4-uK_4pڝO3ݱr)5a DYJvS6EPIt?BsEUbP8uή6yx:o𢻤avd˪d!s[rR5_Qql6{&>A3o|y)rl!lVU>xaY;/Q %Ξ<;, {ȓ4r@ y~Y}r=¾Һ9ƣ3|6-Mxk-u -ŏ.1քQ7 hOZKu5esBF1" kQ6-TϻzWDi85L2؉Q,&1jxhgk@f/p͂&=rRdpBXw F“ ],N)gw3ؑvt ߆<IJov[dc{o\F14z6<ݴm|bT|{.P]< &,ӻEߠn+9{fmx!j2zKnyԨ.'7Oq7,nF4D=4r(%KՃ T7;b@ח3YZoq)v/); E7Ibz u\.jEJbhv 0yLx-p8=}/֙*QNഭrN)0n2wOV6 Sh.\w<}RF,6w6^;C $I z,- ;/3M4OD{'j@߆3J"n= 샮d= o |O-EW2LVC)ձŵbؑkl 'bB/ykk- 1&iQd#,ܓZ&uXjygFs;MT<b^vkNɮ>ݔy N?lӞep3V k{AFJu0MXRn2i}rEGnE$9ƥEHa{dwf$aAsӕgv*jǑ7Heh64з7Fg #IaL~Ow4N?@pU? vv9?\f S`y4,Qz" \Mfh~mZC,(7HϮ| N ʊR(T ?C/-b]̡CT. sV2sMeWݳxSդ)^mo 3CU{,Ij=tѮgtP~H-uBc79/g'L;sol(B>2`xI|:#L30NYiueEyf[}1wX9<49XŨZp49sתsZ>ǿǦH ~ޖtf܎O},vD2lqg!֫s3(RqǔC:^,wKCpf 6Fr_ZW1ff&g(HogxUp;/ L_.̑7ehsRy 2C#܎Xtfǖ)k'.#ñFoeߦpQ&Ei`uXfi!$}M/ўV~{v8_~PfZ꩸(tzU^lڶG<_dflPC6\c5qPv5kF>M ³ۮHoœF}AZL$Cc ͱ6J/v)S"H/ ޻3\h\|ÀtE:FB,.'4f빖 LIR5T ~aswKVREM':?#ach'>sI< ދcplB$EoѪ$ӠJhKOJkppn>LI^}dת-*y[zgw>XUI%|L@!`KX4)"@<)\۰]rrM1_.Ml]Ww1LtGg~̍(]|W-lPᙴ4 <;n_܏~\vTo0Kf@TlU(˼l+ S"|CC~'/`D<*O3ilm[,Qu {2 .rJ_xK3䷖޽s@Zx!|lSznI4;Osܡ5'ו56 Qֿ4zvjxޓ)M;2\/Ob#"M˯Ͳ# 52SXZN\гbkz!N.7:alˬZ~[,]A8cÇ|_̴>O?VBƉ6wT&g`&(5ŀ/TI B747 tila%gfg9kSo;cvdeH˩gdžr\6)DHP,ZM;ք= pd 2G@Q70QǦ5a۳"[<ʮCzutpqWZ^hWBSkKJ`><4tާbpc։|¼Bqf i5 D"*DHbgC#["/Xj~J ('RT}*GWٵB3|Ku]L^3sjTOhJ .ui~*{Hf$n:^~HDTy"ӧE/)m$\mX<$JT<.XF K7Z o ^^Vҳe_f^4FG 0E}2삗 ɍٯy1vDnx#ŘOh\IONy׶) \.;0ico.ܴl׭m[>12'fZ;dԟ-.{9rsTrV => K|a؁I3g=ϛww X>*^6P^9_ň _ό!(alAnqy&MZS0o}Va dPSR, R.1k<+CgbUH tPn` yڊL+2Kfqj `{"xQ[x|ߧ=ق1=@䢆H4$!Ar͟ҁI*޷8 4qB& T-؇PHDnZ92|(14PD)G:fAB BN=٠ph}yiLE]bWlr ڭg endstream endobj 2125 0 obj << /Length1 1460 /Length2 7280 /Length3 0 /Length 8265 /Filter /FlateDecode >> stream xڍtT6)i 0 "C ) 0 0 1tttH# HHHJJ(%ߨ9y}kzf_w7'.?D@( $PT@@HSGe&4@8 (PpF@1X"DjAa$v(Bݐp&F!\H9ЎHk v-08tጄAQM(aH%el0G)www v#16GEu@a$ ]uVw35#a 6G8tU5? @(re*DN`hG(X! .hl> Zb~w@:(_\`HG i2SVBƅWHg {nvGy(/pWG}WD$ą%'f#𫼞#’@"?RoqvEz㟈TPG0K5Ewuac/0a'{+/8ew0P3~}h7vO~!Q@PHD ]6WSUQVh OcWn ZoDA0G,)?vs?nh]1Dcߡ?C#]۫bƊ_PcG@6#?v_fD!._o 6 /v`v?. v0F`}(`h@ث"Q GxV6@Bc),g_ڙ5 D_8@?@?$@oՋ? oaX_;@x `s3htm]Hi ѝ}Tp?H1_i|5Q7;k^2'1Ғw:zOc~VȖ5e1T ӝ8,R%8Q^<[rMrKU W m|USA$ib9.zHǕ14"M+㎺Li{C܂ֿran+I2)U,8-qɠTTg{DG:PܲOgzNddaDCw cv&,,;uu7\f (ӡ ړ9•Od޵qgTF٦Wy>{0I`GNP)}.ӫrGHfy%y .,?ٴpƠM 1FA3 ©~P;咙s7_vP .s0ֶ@ȡnh4&(KiyB:Jf!Ǭb8 A5d"&\<˭`02B%xyA{7nkYﻩ_+G y!oE`yARZ#5PaXw)ff:N0lBc?kjj8)a&8sEK/JWPeSh'L %o/'>hrwJ8Bx^qL mMƏ#Vm g 4ԑz¨+0;/|`iޣ6Ev]hG.ۼ֟n<1fti f.$S x>iG O_nA:~\GJmM}ˢGEj$TٙX%<fRc98ߛwQ?Bqe~?hst(~J!_OiIھ]>B˜Lqn/w&7x)z8½eɤ.H+iDxF;lP%];qJnܐTKp%c> y8mXp2;@h-Gq,N$'4ߑ*6?uʐf˿_~)& vڊH}|O,zIȠ=dd W~4]:%!W9 ?拻RmFW%*;{D0s} vQ{87GSA.q%0p&) bXL=|\V9\w,sT^_-~|0_|?1X'b=OʁTF?X=m/eE[at[{PIѺkr ÷ rGi 7X=aKs"6h&d x??irͩV#/-$Lu6+!s3\ +_uN4p3j1)z+}ev]_JYJmnjw*IrعNq#9Xe[|GvE&Iv~4 fKNOhFJ&B:aSK&b4HwQNܱETFt()D)K$bvӼBC^9Q#5<nޓ nV~t`D2TWX0TGw<{ϥzjy)Rׁa?5$5ؙ?^M[.l63U,:1._E = GG1fzG.X@"~]{zg'^5^;XoQΦcI cdӔF k:7 s6:bVqP b'T6)+Ɛ,m9U''l1WhAۇ gF l;Q*Q<9mfҀ\r{ҜYkv́8M$r?2h(l{U~P\BTV;ٿIP&J|"KD\P#R"|AЄ;\`\67.a AIZX8*i3.>,s$ pˍfdT|6| ]/ oKf|gI9|6##q| ;X3#4)ó&w,v(Gݤ[c0"Y8joaְ"{{@7K-ka-jM'ޝ7$Qg Ҵ\?:Ryυv>yd|Vz)ЍF Nk+~7bw<:#:ЮEFK=[yw22=<^S`cBAn:f &\\1lNCD">`e钝Ircn mERAk l>f' ^Bz!k";m;4Oxbu>ey3~4)홚u .ۖlc,J,t+$}H:6pO&>bҳ+(^״i~ 'HZ3({Qj6%5Wn!DioIVukMq+Ѫ#h4#\b0@!p(Nc,b }[q@KaLޖc O:(t+_E[/6uvfZ>|6 3_|7m)|{em8-P|WR]bmz/ؤ e _x'q8>q jij\o١ӣ9|a)YMcR) s#x`u&Hc?~~$M)/偉Zgcr$ڿޣ2QMz#3l?l.?r=ŕ!a)shNúx4G%,ΣA[xtM% F6ާ5YNȇ(gZ ?r' k(v=1.EL_ۧM†"g19Rl]/Fku#[ǀ+T7dzD]co꥚@LIbUE9z3Woò ExtK螶ogbjfOȾ?Q~ұvZt:["V7{nZ Z})-=۠ r*c#;*`ja\تMZYB 2<QxIp's◦-咁 oĸ[ږN"jnćgoI }l(!Js,|yFkP fQxT:za>&eڠz*+&6#Xf^5 QGIwQԅ3.IO׉{L@}譺s|E\GN;DHaMEzNݩŎX(C+W(2Y.$jSyV\|=;E#OuX %M5fDF_rޚJqé:{V|ѤՑxj/Xx)1,0vR{Asǡc|n1t3{&(I|,<I]~=ܳF*!ml* aBËqǂq# 43ob;wW.0\.^A簱,-Odqu{QhԙpWFNƗFzܻ1#6elD}[m FNڦ$,xA  2slowoh}}_RyDGMg1H/jOn?kw|T ] W"r)ByӇցb_CpӮS>0⤉C^jIӝ TUBL 'He텝6%}8ctU<"P4iv͊ J<ށ |H'L"JpLz<Ҩ bq~Xۓ7AqD'bޏO_Qo_K]^&wuqٚp>'#N|D=1֛gULBFaur}ƣ&@Tv\+z9AcY&]Yp"@p…cG8pRⲌm5 'i~Eʚ-t.vHJNS *~Ť>9r e_}hأ'5=eŦeovSg(K4ɢͧ.'KktdT*9Hڜޓ*c-IJ8+2}BLQ֝68b/("ˢ~d|$;}y*\AٽG jnW pNe6I3!* ˙ֆ.Aτ.?=PwUPUY)e}l'fK~l0OmPM.:nݏY6.O, ftoB6>1Qǀ@݉d KS2w^vnv)`NS&/l80|T$DF B='/xn^mY0?'`LP<"6'i1G\ 5c<_ ps|XI+dͣ,'5IO'{UW)ҹO3JҔQC:D*S4X}Pqfp?)i%ur-00&coԝx:58zԒ$W;,g~t}#~,y5o Ri2;קEJ)X> stream xڍtTk6)]2t 1C t !ݍ !% 4yskb~u~h4u8 y(Ȫ) y9y0t0G_a } Ad{YxjP@D"nn"9 5@ 0dޮ`[;k`b@`+ @frzx#@jՂYsprㄺJ<0;6  PpQƉе@m` Cl=TCAtT ;௳9_VVP'g 7b ;0/;bh};ZX>~OnX<K+v%WS~:9 07_Ɂ]AVf PO_ %ݙKvq)EyaBB< ee3w+ yۀaYx0Ww?F@ lXl?A6廂Ӌ{YC!/z|9~n(><).U@@?>&- ԡ6 7?KoeHwwH[8"<jЇ57gi@`w*,Ab`f '7ߟ8MìXO\ת9! M׷塊rep{埔ò~_/ zX bw< WW o@_ÂZ~; J6PW_,,.?( r> o@ %Ao>hM@VKP+Zi OI1ԣ CBStDer~}EΧSFosjԖ 爳pߟ8-y)2OEJ\4qKZ01-= KC;kKT)6aú[gLN_bL"S3hU:/1=kp?SDR:=C_Ǿ-T Qd1a&le׌:mndI iq2PwjU~գjc۹)k+z:WYj=8ʅV!Ģ<#CC$}3EQtI$YI#en>3HNˎYsDH竩- =2%lDnt<)8~vm4KW? ._c|iM+3zFۯeMen ~Nj1%1`N5E2Uo!=U!!-|bHt!>X*֯i ljzZ6q- (c(H](Hl72Q< [{/=S}W oL6Gq2'B'MXNyˡm_yүdkY5f2<+Jk~LՕmڌxN=8[S$3Same5 A=DO~;16=s5벓.K^rDP$&\ {-.=fJ^ 7&Dq[SZx}pH1oYaO˛jߍ)lȣFF6-k (֫:)<7@v5.1xAo FeYD)r1p|ˡ\Cnhd;ޖe<FV-@n4Q~2˗v:U]wv n 3#߿=[g% 2xh"6Bz+F~Ӈ >| cC(6Fdؗ~SE(G {ط/Iũɹ~U[;<\j^'{F޸NwM%5| 5`ɏI *zu=bbA G&Bitfԥ* >QihdcMWlM}l= w3ey(2X\69}(3rfǾJ8*L=>NY',A.kzi()|P= ؁ɔWn~cpr)A#A lM[6m"C^(Z &`xqL΄0 @̚Gok˖6Iz՗tDZ PfEpDWGBQjioL2?x;`?nq`4ձoAJ$(GQ΁E(̓FO3fT2xm &ssܰ,`Civɬ9wLB?V!mZB~" S $7;ˠR)5 iSك "(2bHX 8"_-śC'e)35g:Yr$ F,۱²WtXv'R*k$L{K_ZQFos??X{g}\JfbT=)+B.~8EpǴa16`^&&aCX1?&&a6~v |t%Բ4?aC@["[ctZgNNx9eZtfDH5t!j|GD|3M:{DgWΌ.+xZPo7M)(j˼ _~ٻ3m/y^m!DSu;B. *ELZG#Q몮wxTCq`(SyWʜ泌F|p֖I_x_qd6)Y UE]PRs$ L^tx"󒚱(06'ɤYSğ{p0,;bnHԍJ_z(Lr(I2) ʸ o#1EY3mLcR3rRfwUj,Nj, \x~}Ԗ;k35:ēX]ކ69>[Q;ҚRzE@Gyy \o&v_Y :QڎnOd$lۤ1q9EǣB%Uk/j ]PvK'K1K.7mm<#zb,RZ;}39?NѮ658V`Oxɻyij'b6齩rآYQ\U~l]^UEeiq`!\jUc\bF٬Q( _d\2Ͽxҡ?g'Α|c6dZC-b;!Y|/ӥwƘ׆hk|bK]`Uq`[B2٭n ~gW`O4W-;u.8Oqзa 7 >CuGzF.![;q:=)kb6s;`C"C8# l*U_0c R;fɽZ+woTY8";Ab%}fǹ'yvOȍGQ+Ⱦ#zm/K[s|taGCoɝO\aG9-&6߰Ǻ,a[k4z\sq]fo|O}/, )BvB2@Xj5zpff6+¬UM^RSqZTmBnrw ZƥJ٬T'6ea˻hojaNwY"0['8C Dџ8z݋w`gxJHAeyxMSYY!k1ޓ[ŌS-*'_5}nl 0-FŪhau,X(3fJ_: pQAŭizd_rzPT*P39Ik)wo>X'g`e ,` .OڜZqIiq]0X~1;-ڸݥ@M1E$"- {3m=TwJ f}ݰJ{*$oyv8^C|ՃPX@oe6H,iBXRBiYWK8Wbh5!>;f!̌v@Tu[oCU#+Bģ =UpW^;"2M+T/1·V8wXxQw[L @bf+>Vnw,uD[p?޻rN@o7J98g:J8XsEH5ԹT]XhGkQʛo]ӈqFvzpDqU !W #:Tԍ/J% cE:($mϋњ!q*ɧ-O"#WUٸ[hTt.`ezMO{kɽ {)%9̭^6O - )85͝ܕ&QX&TKK{iw.c-Kw<\8^gKw1~өz42;2へ4d?+8KEON5n &YT_\`V$JTO^>yTMAӒ{<8[GmwťCl<Ƈk)StY{hp@5W{3U˵gdmnMo &sS׫׬ͥ78徎ỗ`ahhLZ[Yӕ6^B_'6{*zzHL͍-m] /SM9R! 1VSld"4m^'D^vK9 4k#5[Rov:h)Ψh]uXZ !nT);S9 gc,"lv_I ϧ|%<\IU:'ɐ@ {u=f!vX4'峈2~.&k6UWC9h '4xeKEZ)%En\ShS*dO [.I=sv'Pp6W"@7V$.th.Bef'(J949Yhڕ5%ŏ~, O }#g[KIBW 躝!mgfVD;#O/ s6_V iswl"g~Q4_|,ѽ e߽JI"i]ax%; I oӘ}y<q8& ܙu}k.qPؾVo #P'3ِ/AtܺҮȎ0?St90KΔBuIUWZLUi&gB]OGdl#/׈h ,c@}_Cf«c}$8k0RHD8lGKHqn4ʉ;[77^ &l<wuKf(:^O~ݨvP C_LخY +٣k`qݸ 6|E8sc؟U9OIuLjD2f}ҭ9mBcJo QHۊ1XR`_dt?0n(/Tɸ.P2aJ`Sx-`4#8wa}?E@Rҭv2z`j>Ȩ(E+j)Ru䬸|q1 !/̧ K`|=[aǮUr}& <觰4 !+:Wf,:,x_]7@D&h/g^/˪Kiƕ<.+dj+š3Q^x [3VKފ%hk>%S}'ٺ*REz$|Eg󯢧:{ Y"e%ї#Кw%1ˤ|7|QeO1̧d罆iD%_le!b6fۀ xzHE`-)T#y*,xaMꙥ_)Yˀ[/A']Y\lTM/4Xp9TE-7h\F4:0dGA-")?ݪ &D}IcJ#;-{x/V?[uw'c4+d} nd#EڠP+1v;>z9V 8_gF#ŭ[ѿ -c]ڞm@`fԤn}TQffYC:V-&#rɼ4~"("ŗ#F.~-'T wQCl> O Ig ygp7}|tcq-h|[j?5'yyN'(q-E7rJa@VinN ⩠܌l\3Ľeu3sd[yȦ/DHO.cr{U5c\\̺:nLED?^'Y1[>)e=| #\P<-E p֛#?`vxu~Ӷ]e/?8)f zvݩ'uUZEjGԓi4Fw'S&ϵl$ާGD1/yCxFVv,qȫռ[la8DG?`F]Tv"$MNskZ6k\gkLpg>!= hI/ 7eTcIB`PSLûh`4#C~+yc)9K H(Fl?0oU2z[BU5toṆvHh9(oRSCi983qiώ9 1T_53Í0Z0l+H93u =^ ~u|F6y:;&p2 ďJhmo5y7*+/6%>%BX1[l;ok A]-P1a%D(\P2J1NyOBImŗ +;ςy mlqGSi=C0 \iN7*&P]at4 endstream endobj 2129 0 obj << /Length1 1398 /Length2 5932 /Length3 0 /Length 6896 /Filter /FlateDecode >> stream xڍtTS.HSiJkiҋtEZ!ޤM" M@"4",;uZ;{fwٜlw 0U 'KJ,*sr"q(_791Ġ@}0A(" @ĥ `@ .((#ùJ {yy \BwY^ sX'50sAL0tDb 08/;;PH8gxp@] uEw@ .7W!$w2 Ǹ>H`D!]U-!7N~a(,!Q0[ ^`pg' Wه %<8swWP;ojBh g1,Y/G qpw7eV:ፀÜZjWoe-"uY/&<ʙլP}QrjQt;0\G@Mĩ )~S LYܻ R9tpR{=u\FxNk{my%} ^w%Oq:Y2^5T o{稻X:b5b 8|ɐ.l 2r%n띊keذz1_JdPw^V7[BF-g&5ve){ k'F).i)Hr$U$ob޾kg$YP Bpt=)u T*3h--Tbu/ 23 .TzpMM($&2*RהcmI_xp[z.#0hCKXP֫Ȇ|xJgi1u P|mXTvé|. ޜpCl;byƻdM!-A*62muuUAsG=:rgrd%y`j+|8xxJQ)ExbJ/*q?@ع#fk;9jb}"^MЩ &-@ào>MP7Jmto`!OȿCeq~CSelBYf'gf~N3#j.cpK]a Vg5'*sVnFGB[, q.o>JׂUQ]rH`}8zb}ByK CCD t˻206\\M6y̥>1(;/o'PcdlC?$Nw-%NC{3R CSLC?[jt]X¤$vionK˩lK//mŦ'~'ɏp>nl=p3vK:L3+pyH0|l KPS352<Lj)EOI3F毊n_a[gмW;W,y*ug;l`>~K8SszTeٛ/+a ,[4s;.9$f re$S\b+r2A;p40ƘZ4 486$>>|Uw-w.[0*Smpn&5$R&[\O D l^NA!{@.oi-I7SG)LgE-{; n_{7:ޟ>ͫ;%Hmx8TxҩS LsB얘[l~Fej9SM5k' }h;EvKTRzGm5ϫa#W;$z4#z' s  _@I1uZӽhbsZh?]910*C>e$ jWÃB7;~Nֈw3tL^m |}=gٹ{wPd3 CZ2{NWGB 4\,A_KmKi@nQZy=D)!v'a%1ߟ.prZjݽ]AUI9{.𲳊P)=9ݗkT#; =F\V.:jBժg#()ceI`~+t3Ur%{;*ь_vcOEnp6jg$!ށ&eW$D[\-[S߽v"٨8 4|G@4(VRɃ3@'uo#/ۉR jlrz+#$mG]y!vR>űxލ#ZSBRȜ/Sv|)|RPufIt& ayI|6Qae e/ߺT^Xq 4k`Z+ҾbW~Kt?LȇP~}NNt8#'ƭ[=qy7lU!49GqE)ԇYǐ!&1́".A'XH b(sÇ9v,C=dRFJnq\럔N&š7ve-O0So?B4#5EJEc KjJgyNB[š^&&ZQ[!Ω:!.ϯlܶy.Gg\ug@Ŀsk]-7©-Q)-{}'Ȋϩ7Ηc [8֋Ơ1;١B ;|dzśLeuˬoKאc {9',/eHxT`PSofrKɋf[Hrj 96ƲfF&L$-W!7lorET,o\E<|i]KВB$L}֔L 4'삘ps=]Wk%7"+a>#dg?e:m(gBvYByKVƔ'd[]ߘk+4kC0_c.%4 Gbb[ce\H5L_Tpvg:`yF,ύ1!.W6<_ٯsBD^S5Rnn#iԜqQB\U4(f~NLJT0駆f)we;9a_^gbQi^+'Sgj&+rbO+ X83]9V=f+]3’6)4뀵<|+b#MsiΘGG) $G4|iV|iFUx+.e_j)_ڹɔ=!N[ʢns t> ߦOqlR$^㢿׸Gi&|6)t2Jh0ۓI(rBNJqj݃ԤPOO-uؤ:UPGEf\+5O\c7ZoVrŗtCKQHЈƍVsuHl #$3 eA*Ji7$2 d G{ PDt{!E>1oh5h䤛3!;rB@kxi_>d!{wȝz/×cт%]KbOu6N5/1۾@ZcXȸu jF>EhBǃ<c=7짼1(Y{]Za}ʥ6И.O4O3m[f)|JNG4='eQ=՝T~Cun};`Q?'L)[mדJ }vWA9`Ϣ&0?WRVTp7=Psr=9zrQR!h}o=SJ0LsȰ4( 7 'cŒF9ma]%Pm:lj`*ψ|15Fp-ַWܲ6¦,YTόy6 pNvIwCI~@npsWWnE _a:JgMCrU1=_ھ?^X-"b =eȱ^:~X Z[(T91sz~g)}Fr%n(XI RUޭK@XΟuF3.\KyLb? b Uh!q`awCj}X&*q?7CNں"eva]<=˳U1Y"~=_6Aq9FNODŰ5a {G٣.oG#ZzgYa=UO&˓2L s"DyD11ྡྷGdŻ/iKg͞r(LrhwXU ^ޭwI`j|?NXQӸsDyM뙕sT&.] L)kRͶU!;+ti^&E=gЗGZzAlrS_NY-0z{> stream xڍT6Lw044HHw0  1C % -HtJHtwJH7 ! 995k=k_{{ .¹yr*^^n^^~<=7bvqbAsHLG4`POLOX+/"E tX40(E#+~W8@ <t@0RNb<<@GWn$Sn xvh:cB\0k @ꊌpZ]*-'0Y)߉ п  @m0@KQ  B~0d<qZ" U(nqrB~; r P+9# w]< B݋CaP kwVnNYY'_/ #_|;6wĪ@aȈ?"Vd0lTn+ B>Wg Rtsp:B& UGn l ^8 2PyWE'J\9@`m+?>䂁W0mum0r(f{..@/<#-!7rCI !dϾk kX@cvODvB$ oPcGRV!IPH $qBJf B#dW[?#ߥ׸@n..yr,e= Yyݧ֋*1q̣ #~W8>Ix̌EŅ^>WvYs?5^g\6g 紌č(Itb]PG<ĕe!a3JV(ҪYUNA+jpd9%-{1&h3]fx%^G僯Ã$"TI bW, 辟FmPzߪt#-tߌsoVU/ARxѸqeU2O)\J˷!j|* CWU}AeF6VmSNmtM9}X^ݡx8){-R1M7 6"V[fϲkREk\5 ks%S~}ª{JuhKiv- v\k { ž]C5 ق$1nF x$Z qqIgfϋ̒%%ez\.9X: NEG39 })bcCئY~a-W"vJE;'od/#< FuK^ajhtʔ|9"-"f$f0nL$Y1i%\G%P|]y̖Zc N-vyWcr$r[S׊vgOʘ-3܋FT^&$HP`,74{Mu>++ۡ1bj#D?PQBۍsFzKNkӱb[}4 ɛ(u^aqI՗qT%;ho%.]&C"6*Y*V2?(U_BZ(mm'` RE};; Xŕ6b.(jH8kd!C/tp6z3^6C d^[Lx}OuӬoo}ۏvPPSt`'( XSāqT3Iᷞ|bW3f~ yMQc*4+ޯ:&_sdvty800,vUIuCZٿ~:bcbyd%IvŃ\LLj]D2&i5_"Ư. 6He@6T(Yp\ÍGen-7UlK]~;:CUɬ\7i78TӈװM4N_ЙJ^ݤ1=ùr2`HpݩW^ؔRlysf^qJMu`ͽ_59oll.A+.:Y@75uFk`:B SJdaWn}ڱہ-W_ZLgR]*mH{áwE@5:"ܫ7V\>影&COjG):p7CWm6?O鄣cך>m\5l訢}sg_;ÜJ!EKdžp70-S?:y^3jFhDGY d&kv^ȹt3%'ZP p&E,B/k_+?֌6 IZ ɛ0\c=A'b=bֽj%wӛY-(W[2xvrBx6Wdy6rZ4"Zhw*&MiRg8qEu'}[WDZEROj$N,gpH8K $#\7D7ȹ:Ӵ@s_jD9BkOo$FMx'V`T%)`2ydiʜk@ 꺚b'#?Wk51R;459d8cc*_P;0.j%mߜZ|oGNoٕCSsfJ#=^LdrY- D}dNT{Fnt}} F,ss\qiM+Qac1b< H+4F>[kU6zb;j/yltƌZI]".6_p>"|CFN[%p4ԾDǵD[{_q7}fs%-E- f? qW _mˌ~ys%P(:NԫK+"unϖpX%Z[2l pk[j29qT\ x7fymr%B\K=I|IUysFJ4ځ"|+tM7O:=jt o[HXdb?]Ofaq kd37 7 [ d/ K5^Zu|ק^tTR1!?XycI5ކ "EGM*I)^q@;R0f;?I?gxv/qFEg{&eB`^Ϧ BMU%͠[vJu8WމQWJ@󊯎@1:ЎsLPvg#UC45)kK9q4M1s' 'Ca/}!\ SgT$a/f`_;y1Gc֮ɘ %=z<\VmWI `]+ NG~<,=̒+#&Dva8WoҤt 2A=tOښ};;)\Y#$}p$⮲,&T1ᤂ*"A=/'?(Bi 0<Ҧ 'jh [WyY`,}Žu_A87a9>ڪK mܿW&Em?fM 0H0Y]&T%"E0T&̢QNCF~龁!.zQZU9/,cЊ|Ӌf'FZ\ Tz{nwDb)Ej, 8wOT>L#}Fy2 ~]ߑɬVt-Ts8L.LIlNOk9oL kmuf=[Bya#}> ׁapsL$L|S< omiFެ-px=,M \u 妈 ]N? jW^S|Hsy+Z}%ʇg2mb{s沒Zsp,VoS8dLrOm*$i'B:/;(~ilG5oah.dϠK_NiFzS-ƢɮE0N 0B'DzW m(HZ ?L)`WjPY!#Twz1}fox ^㍢3v_nlaDI^yN׭VVBޡ5 K˱\we:o?+WV\{DQyfgxs8A?m$ؼ//GWRF81"  WXLS?w$gpBP*ʜ )odn]]t}ev)KL"ZYRA:BׇI"jyY\f2"[ /Ҏ |0'GۃG:0S"uJ Hq@Z-R.ývj0!%|f* f棎Pעd[ ĺ.wiG/'NSX4^}|ng A)k+wxē5^?&48IZܬRuGb"+MMD`peL]D_z}C~dkssIk|W-g Sdz~ W}Jb:g+AV +Ŋ3ŊԾ ܕ[[?5u6aUp}HekH[$Gb'/ h"sDlm;:+6O+O$f>Ii~HljY o-=J=QGTUB. mt*+ e#r^BFkGp62{qj%Z -ta3X,;O)FsW@nAI $PT_?{RL;2_=/G? vz:;7jS6qiuYϲ}EF|K'P}c!7yuF۟d L'"Y׃3QԅjV.C*:$Ej赘ss3U|㥧3IշwG0>|qzL*"˶O,u~X.Nwla'+1MJ\ vЂj^w^D.(?PF2RG{(X吳P7|!y/@+Dc{^jH1ROk`.{ڮ{.BiKϠE:ɍ;ʣS^ԣ0Eɘ }|~kyĖ}p3t<Ƶԓe{-md?0YDw7<de oenh*y./ǫʟw[ 8ZŢꈷe + ?ٟ((d"X`@%AfnأEɮZBI;(B{UH.a/)i׉o8Q Fstf>,6LX{a^GՋl$.Z+?Úd/dޗ̵u,M`Ϣ~u<`O*~a)6-dJ=}/D}i r wzRmF%vx9 Z_Uv/D t-XU+0dzLkЎ?ґZ>?IoosL"eo(G4h!;hN9Cqjڼ;W般VR0jԤg%c E񌙭uu B( ڝ(MOWK,'1%, L LM}eG~܀sNzeT/MrԎ -m\CXQs)FImD{kld_pӹ Uhq9TRbdcNm@!1iW~YdR<8E ֭N^$TР'ɷhYW~Ȭ6U4'EM\zn1SyTile2KY+T:a>-xUUF=؃s)6?^1QYi bz6lQrIvy$.8 ۣC{EWY?'{gFJ>^X5of>axN9zPZjZ*Y]䆂v^5u(8 {?I٪e8z [6^vʳY ؚNF=;hicg)XXZnG Q{',s( YYX~6*?Vz"M1 $<0,'zdb =1ZJ<ۜM.N0](Z{F5-1æ:8ֈ̝$ V_oXo!QFklY]OCq&4(@(m(Ӭėq.VFTn^uw[M9Tn󓉔IΎSJeb~ge/1Ikᕪ!XBy_M֛q2O{DU70dg0s/-5\ Skj+{ݩ]0Ơ~ >Sڨ^g]A1&7pbA=?Iz.0u~,MgU9f>hfOvHALPk~S zgH`hضa9Ǭ"<f"bW!#@G2=y=N.ynW5M7מ>%縩I+rcr;H0q^G,!ͺq!B#;{5(gJG`[3ɨ韪;(v_{Wp"3W߄"1{q_'VV1TW90jM f.ԊP#;$,4H0> stream xڍTk6LK#0twwwK7 0PCtt ! t z{oZqMG&el w@ٸ92j8<윜ܨtt:`#oNv}dg;5g@psr M [;*|ͿF+&w lԀP;V@GvP0;ɝV^An k@'_t6P/ 8@g5 |9@[Ie+ع @`g l *; Bݝ@#O@\[]`%re9uG, dv&q-؀!6pЅ]=@J~ zbj^{u*xv FLnhmVݗb}ki.2{ F̌s5~q9R95`?ḧ́B{+1-9(v2_q|whe.k1 \ٮ"R^5 b3$OE,ꃔ^z& #EBNoIV 99;`> ?V<=cʯd#؎G"+1/SM{-Pxh)rlj*ImBTe_IP^ns_~ v}pthxХeYqWt߻7_嶺k+H}Z@9Бrjx#v6ދTIhFKeG4tZ:HECw7kF 6i̿5b 3=45Ey&Ġ?af0DӛT޴!\"/;USQ5,|ǿD4irsuˠ!Oe>BJЯ1VJA3Lj9ZɯIKxs[ȖHlJ7ꋹ!A&V禳MR$Ngp~VI葐!r9#FW;FЏ%$+&W+&Ƕ zw?; H:{^7[h?X4fj\N,tRUFzKm*΄6jOAe>}Bs(%58aO(PФYaM(t=,;?}V> DZ]Y0'^_,`K)a^wL̚wA#AѷfoTF>Eak}| p gMpy% u KmL 8 {kG|Һ3!!Q\zWuqQ0TWct [(D !k`Y MRwD抙-KR/ߪ_Yޥ ~h[ٖ=k"vqt"ebdȫEX=P&Winpn.߆`PxL5ǗqZtQ~i5!Z%U#}Դ- đ6R彼F ƞP;))~ψ_[׆Su 30#*Gb 0 xeI `ObD.,(GEi6OvcinK$+PDBdG&;XENEzLEŤ˛pUlOrh~;,|)Ejx'B ݱwb^Ѓ̃pmL\5зnչj7|/g{d/1>%S|lE,h6)kO.m]nBoh!22\RkIbAjc"㉎HhoϢ?Š,Y?&T_bnօ[ QH^=ENN:|a"goءqߨGyxZ4b݅"a,*(0foՓ{.z(%lBѳypJ}6iǹpk»5, 65>w0.p|)}%/D+TtCpm6/P-ЦөU" U侱[Q}E+(4zQմa9<\1 ,ŷ 5FZXJ3PVb&N!蟉w _t:N Ǘ9 dxe<4dIԚ#~*KsfUsB<ئ.(#ե\inNROxg%xf~cL υKqt)ODLnO A_X=,[G\kz)}_'2@1Go~zEфz+e8OZE[@Yޝ0-y7+&TܸrUp(Q1X)?}ԭO%8ڳoǾR8F+i=ZS5|j6_k' ,/ _ɣ XH:ܓ' -]2hER\5U*hA `1$;4?߇#c|׸_J#b@RbR% l_t9(V\<u~ioDOvAR8%#V61YӅ:A.wYm#BW9-Ww%=I: M9/ErD\I!PGUDNI*kT믢`_.mVM>8m!42dGƓzZd> 'u>XP?S"0Z1b٨i#V7GWVy1.`j 0yjV ypx,Xn۪Hq.SLzfPɔ4H @s6sX+BծԐm#䵶ۣiP21"B!KfP2JhC.4Hz/'hr ?{>u]|vd*Cjc}JlF)(ft]7ӢA"M FR[>E %  Ζ!3Y\uiY>c˱*>FL 8f&g)%socBI vqJ}݇FX3):*G1O}C(oĈlG Ư*7zaӠμ(ŚcK &z o>n;L FKZEG8:֩1GriD3g151w$ʠ!p3F}Řf{_R>\Uڑذ p -xnO"0sBg4e,&ʵ5ÂD-u>.kwMs ry#H˝l Q+'9ᙊF&tu<[a(0F|̈c}uVU-K8)'\]צ%m~>84b˼xdqba^kmq$H$G7rک7Rg~8r12\(;Y$MR[!;Z.XS#i_M *"|eH^={JnGR<6R!K`oGp ^^\ x~(Fc+ccZ ,-jSxJqvJ Ѐv˶/F*w kOhcSK>OJVv񾲫?㼚 cY= mu,qZ8j%큵𸖄#G(ߧğڮ6'=|ň6~i\NAI>=w| # ꓼ+ <"}.ŒY(aT{܏#޸%x@¦:J[pb!+kH?\^*s sVJM8\ŰgjؙO(-gCwquFE;p n}KGn[zm/x% Mx33N3F\UA5YigѯF !q9p_+wd#^rpCԺzo7>9)'d¯>|ch )e/ UH5f!E269metͨM88b)y5$:oh*USx?nIddܿ 'SPde"p/Wx,\6h,q@軄{ۅU~scDQ&[DddnMK3YD?M=^-*O~j0I-[Ww͆. !I3@1zErf8^CխÕx"<9 /FE^3KM>k)*PJHNn?6h[,Zl?צI^t6(E8+-HQD -"޷} i {Bm91  =a X/L(ö/'> 1+q՛PM#vyg_h.3E bez1UF໎ /[5UGٽpA+jqw`kL@UWxF]5 Yz0:u (Tƍ.)pj.s~XS8~Ҹֺa:^9dj(iݞk;Sj1uxPٳU.gb\\j}VXn0B위%gyim>жZάZmu3.d9fZ[/m&跉kfxTnEEn"RJ2QlX~_S,^`6" ͘JRN[ڑ_rG#mU}l5m&+2*>7K0KvAf6s#*= 'fRg +Z>F=KdmWJ]@ǝ z#Ty}Of)U9> e,ѥ-xZsPV, hgPnY4Dp7hČ['\בCt_ k;gLOshbΛ#wSp71I,{$Pc_aTT݇}Eߌ`dI,Yʘk #u'm<O]tt&w4X\䁓/_{>*UQ^HcOOί[ՏH #P_jZWfDvd3{sKNt 1O8Πn~f\a4d"k~,Ш`u ocY3 bzT4p?}YgXbԀJ]L@yi:ydLpk zԬK&0 vdpۻ*Ys rOgW) E %'28^,0pm#,u:)/qk dӸ{P8{h: vN)i<[W`e2 ù}7ddzn5O䮟ICCх֛e'>Jr2\uzEY5;z/B<4ڗܜPN7G/ojCBa+KeKzf-L76)۲y2\CnɻY؟S*Q٥ì].p{kpu,2դWHR]e ѭZaBǥ{ol=C? w{O)/#`ɪ_Bi+ &INjg,SMؾvƌˌ~kFUˎIG<$A7UA6ifTy9ח1 B(؄ ѺH,Ț|s<'vi9RadO6;}*)0dp?/~v x66UAJr~ ?(]G6ih[e^~ث!9AcAIz .{8pN Sߡ- :2S)+b? u9OcE ƭ@o (v]ac%z&)^\w1;.4&Oh։<;;!ϲP|NgA߂τHJO"Q}d80)a?u6 쒇ֹh|-I[4OƦ 0;N'n Җe'Rv4$g; }3:q/ny +Ǘ8<̤VX 7Rԥ"pڎ ig6b.;,bV~Vz/JjE@:uc0}OjL:Ou+;6&ubNyб: _esUw3{W^u;!Zf2].-dix4Z-?h{?}Z5 ;)L"\'~ _-,Q\6GD7?yhd^.]Pxdr3._ ׉:%zfec=tEg75ʒ\]i{يĝ| v}e߁}3jW0jN`N!@'#ڠqq^J<~t"PhI9(DM+t6YOtlpotd!lO 7IklW䇆\3T YǛ'Oe?fG=uVzX< Ń穆y^6o.,Q'[fz PfZLI!'AJ0(:Zzg]#B̹\ҌP>thKu`C>cߖ+NpAJ"ۼWڦxueowD ,܅"s,_ɰRee<8#D?d9&,^Ί6 Rαi]R5oR)Um. hJogJ 14 f̛hXyˣ0 |T~LS ơu%7%m½=E/PO0qԴ'36#2mHg@z&{caKb_qC|V@w:BUKt"NN^@^#h{bIS3?7)B+ 'X8{I{m2=nO%f:ONbxlO::R!-&.C|4: (cr sz2/~'پ?+gfHZ5G<$uAM673T#KMʰCm^esXQ,0=4pX4_~-/q )C{9U?8+os>-=jT*rl`@K4׊.Qie̴K5BR(%j/tDzΓ~.)c|/R˩ rx$uA'*^mRPge3>#ߒBͭ{BQa}V돊< @0(e$D7r\*yȹ_vV\ ӊƩ'/y?Euഋ^'Uw1EԿ;Xk.2> stream xڍvTm7%1Z~hcۈDPJTREBN% ?~?{]߼\gXJ@Mcs9@$A($x b]tZ0 U)B $G" @ jb}Qn8-9Bpa ';PG#|Qp0hp`Rr@ O",p9p~ ЈߍIKw " G`W/@7z#08J@NWD(`E{0(Dy!:F ørya  Bp]8 Q7`I~u0dm&F`p~_i|pԃbHWo˃sC">"2&zHB 0A`oÿ% 8€NP#d}QAuxPɁ-W,+kوno6K2 g1O>K kBCw.,@Cd pCoGU(7oWk#\Q`cܼ"Op5EGo`^( PlV= Mi}6u.IY VLd<@CWDo` GH/>e$0K[! ߲4#oq*x)2#&=&ư+<^z_(ܯ<,l),m?H~9뻧iQ[hWm%ELCYQSr#h|u΋T\j+'>nz"n13-`|TY6>zll噬!qV 7G]/R >;pc, ۸+Uw02]a).nvtKxt֏™#EqRZt䔂QUIyWnPbtc+'ӟߨ&YY=v`],;_d" y9w/ޙ Q^ 1ա3~މ9EQwrxQm &T)b59v" @!D8Ոzx\ \kAByI,eI5ӞX87_ Fu:6E8'%}S+GE"+iΛw֥v$ZNSM!XJ]t6'o%r|҆wG7Wѣo4H '0Կ{aJsmke<\=ܚUӦ]n%RcCa6Zec0NP$)m+s=3ʽ v; d4ZNIP\QɁintBͼg~+A㵰S˖΄K/ 77>2v-ȳ=sCmT6ݬ{ӅIewɪ -IXf}&q{~EHJڹ]3|'GHyveZe|ckVxosVUO)B%M`k|ZDo7#)Ν2' as4B-13+6p"9O_q*QcկAXS M: u/sPtMj E vBsm팏sQVPion2$Ha_WfFڎB&'5*nuquc41UyP*ԡG:;Iѳ]p ?Xm̋&S(LC`:jذO5hN.Ԋpl;5GC/Rk?+i2t.{ӬD:"9ޑhC沩G.:B`+rTV0-s>:ފG1}rcMrlϧGj T߯N;=Qx6 ] AqdrbtrB ,Ӝb\N;EZm9},H_T-*{m$l/bKԑ!;_ɓʘ}Y; չ)<>R֎DM 0uc co-UM9!Ȱ䩪MMD%c^.Sh^O=S^CGތLkgru7'W;ZH "k<28"_(k/u..-cZ^s5>⳴b7$̃& +BDLY  e-S+Dվ5vO6pTMz1b t]ADnH1M{i:]d/)3r`N|xM֕bN@{\.W3f{bD݆dR{1YO+\%b"#jw" tc i5M*%$>e^FyΝDg=n@$UfsUwk?%ኽuEQ]/tDL@7c285Ѝ\rUٵ7LzysRBH |Vrٻ_N(5=y;Z65v%ɋz1yֶr(_xv-tu?çN[-Ksl_1MyQ(,Xεb5RSm^qf V})5ZK GsVp #a.ﷂQ:Hں>OYNE|;2$ a *#Ò!W|VȊoTE=Nn|(V[}L~ReVr]"sXPo7N>j (uIVխǯc@mnN=bG?}$C @M{aSR6ɳ:h#W߳%֥EIl5: ^f՚ݶS޼%w5t)" n:Ġi?-o}_8rUMζqiIFeuvg>qA1[0?JMGsFus(d455lm?fߝkH統i@)܌%aszE ~!_m^,sD:&O=(/gM3Iƽ:h9 ߒ,nr9ur3&՟z=9C0"9\DR|nD៥,4+x2ȿ_MOCeO|֒{âuxPT+V2 .ŔmDEwNԍf?)CC0.ud5[خa6yᥜ$Ӗ Pr6KL㴫9VUO}hO]̓ORj:K{xo\,zmΕ;fe] ;c/4[7WP|3CEyuTՋgF~H]]Ri0RBgCI9E$Crń҂rۺU:(Ļ3"l#DLޒ`(EW/LQOCKDY$ӱ2xZlPnCGk93b-zk7X74 ,]N?-24݊u9u\O=Z抵|T-] 7\n?1MxmzbMDMI~wG:(]ŏ4ڌE퓴:eٸux87S2s}]xvx]v!$#K(BgQ [C NM;ۂe~~]e2~$.!fqT#eOm.aW`S[#VˌX9X^ hy4Ey?t~7;v Z5Ԏ伐;.e(1Oϰ[C\lk$Ư4 w^^5^mP3ZtÅۭ VQG+HLWc =,IHC*)OGt;.c-g؃N6I1cKۚNZw)GaG>/ ce\LtXAt~9 kbaݚܨ||')n9l^U[kN􌓴՛cHMX7x;qFP&-w jAOg'&?X۝Is1c.JZ|ͩyLlEeo'\+zǮ6Xlb0wJW٠1 ~"uJV.R=]mYu?~.ݲ|cwړ/LtS2 1M;0Bi撀gg9iojJ|877s-l~gнՏ _f XZ**)fN`h Y|irgX`_gx`h`4RWX:ص'iM}-:j|fMm>2w^'(t`|}~e[}&Z꺲<]gG^KE?DJ72&ԛڶ,oT;lH&*``cn ƣ>tW謹U !ՐK _ľGȨq%Vô/t@IU5w\j.P\".F +8ks˹`3pEwd}"B|/(>}%GYR竩sܻ6?yQZ2F=8d"fS G#S`锤hW%U^D9$ٮAlJDHql`B۝QJo&_580x|4HGJXt>tɣhў<+*!B=7Ffcw݅nL,PCjpEN"W)e^So<\ K_3iyoCfUz~ U '5C `et)d7n*<&ոc5d#ClbDcw Z>I\6͍ CĪkݝu TJS%^cLN5eW;Zx-ЈRvY4qBJ<;%v,rZ-ZkCKvSIBGHaS-)co)W0ٳ F7ۘ*E˝Bi"D}f|?5>oQH/uߐ?*0-MRW ^nI'i"|LE9SEuJyHbeKt\K+Ĺ(kM΢zwK ,6CS&%-‰9's]d$t<5WsDq׬6DnC(W@߲-@P٬،8OCB3*zdMDdN՛NٲzYf{^ إKzlo hsjD,l4LGYic\w9Km\z?E&# ^%䡨UB؃ޝZv|Ӭ?pPIzхAZ$imd|#GvD$o΍._⢳+_gMy _eq?i +V$sguf[DJV3%V~"<CSEBUUQs^{}R1L^#7w&Ќw~)>UɈ۬hjlj5Sy7K%/mY=W ):~j Zgmu<h,өpnhs玅*80.7{ ?sir'yU0CKřh+k[ 7 R|K仌o嗑 y0,JaEjP Y9݈}]T3ٕֆG]7, Z9f7o`=UuLwr%Hi.MG}m=2dQ4lXy3zWåk [c_HXhNpJj{O"%)Vvu  :l>6YUd7*'VJ4o"9zy~|:]4f5LDD”W\.I*jV[mqn*OYlyK KJ F?#xb HF-LKU+dx醠p|[~b ^]n!Fayc{KXoaji,ډ}QACwr @;FYP{<2Jlvunҭ[09eN6(ug45nJImR"4Thb#L%c,QqfștLfսi\M'r*|e0.p#Y\hFlqsocp{dngQ,"syu^ M&<6S9[LO'-4UOϹ*,ɳ$, endstream endobj 2137 0 obj << /Length1 1560 /Length2 8523 /Length3 0 /Length 9574 /Filter /FlateDecode >> stream xڍTk6Lt7 %ݡtw03H7%-% ]% _֬̽@.i 3.\@! 1 .࿴ :`'g *<)àW{esȀ e v`9z:Am\``p qH:  (@bvxhh, ` $b(rp9Y1!.6 3 l .@@Zfr 0j v<h+Tп2`=? 985 b)qx@P߆ {gؓ? ?)T;g '33w< Yj) spC]1~'q[55# W'/s{-0>,m;nk%)w'Dgvu1{/9uFMa p&2҇-t#L5CzOv)⏓ǒ TZ{>!w+0*Op>ʣa|e,^Kg?gcJ̳IP\ةX=pnN>($bylr{Ujq;='3 Bf:HU Y.-Z&RDŖʎqYш׹-uqOHTWBhDJTnERc:貒ZkeF,8Mʉp_-Tp:^xN^vފL'/y;71]5]4o?Vi<#\O抢Ɨ_)dC,2)~!ݕ`HYE$f2ҥVEg{JkLOf踗kc "@PtH۽g2F;)sP;Z'C#<3ɑک(2wI)ӑɚ܏nk'~{.F->ZdOs5 h94K{}~TV0@.Lړl}dL&'VQ"7TQ +λwɿ{RF V݋wF(LJH_b3мrU~& T~}ٚ?T-Fat&]$Y{j F晞% dvC~%E.Y sGA@l{G<)|߅D/>kh/"UmJ֢2ueד6~æn) ^#\._bdDߡ`z') A)0'[ǁbοփ[^ȴlMkɮ-ͮE&yOIfTT *S"3f_{L͂y]AHNUkhJR=tax2Gj;/;-q-c!`[Q1J:dyfyyxDY00p=B&UW] ^Pcq*Qv"_MEY <{ڜ5KlR$U|FZy&30?ASѠ4!/mucD*8J꧗6lw-LM!dkd!v4Vr_K&ŒPWkҵ[DQ\—FGA59(WV{F6I4'5^2~ = 92ZJK3wܔ]b=%UKZX=gWd*X*^+6-U=[v5_.0ȧb霖XȜA.IU҆;Ywh[bY̽eLc=&/^IM63KZe}n*80_Ycȑ@}qlTҩ%@rNNULs50vyځ-rުgkxt1u]6soVtˎ 伹q]tG#lӫ(^9ǻ{]:}Md+mȯJmm'=* t:(ӒtH$|uKJ?GB}}y}Mʁ*-dJ% ⵈ$ Ӵ$uLqwx؄p?z@kXDr3D}tT,G4+)FU)!b&-KL@ H<LsbxXN\#pTXk]"޴ iǎ~Ce>)YsY^C(TϩfMO)Y te7&Eb97fkgijOQ̶LC:Nc J.Rl1S"qE!_h~_c(82lIƠ['*_r:З-afgG #6"cψCCBS+"&MDVQI}gΎ*v)luU̝^rUf]x3qS{9t!}ͬM/#Qٮq4n`\Gz u!a[j=i;D4;r4t-A -3p䘦9yb;1Pe;+u-G;|75(_&ׯZϫ+ "R_J=XEg$lלԒ9 ~Ľv_%Fatμu +ʞ)q~_ds}] Ckd}hBy}jP˜M{ YFX26 [`zFdd[zqqM=ox;ō%:2P?^ez6Dt (i+ ,ǧΚ~2E՜A -ʃY[Zo9l?zcǘHDu'Kwl"ƨSKZ4:㨲##Y'~}U%~kFA`|%1nMZǴbnоs}a@kRɇvB~qQzuiK2\M%^{yy\bZ[ ʷDdF9 0)O{(8y ^'HA;o|?ݕq{2Cb8S-$El|ZMؕX#'̷W8AZhq +vZD'a?ҋ F|{z:չzpi|Bhƞ 4^ *3|ɴ(WY뙌LU&صzW)C6 sv1{dq8}K'1x-J(̼ }9|jV‰%DER4Muij$^7b;Q'/5&1B^#}j*J1 Z"ͻ Vp6wkpx.y&zg?RfTÇ1QNξ@diwH$rwPH#Yl)_UE]s%2cʅ (Y˼-— _'C7 .GT`Խ( =8WۀX;老 asϽ3I:Ň^WbYk|=TFؠxğ&۠M qxQ>Qh΢/7򚀠=%pkP-9/.]9xpCZn]k[k.ijg;ggfYi QX"Je殍kevgWn,٥nxlzQy\֐F_x䇖FDP/ЕR8VhIw~ZL 3%a^2L7)T6&*Gp1oFrSl4w@<{{I,|[d<}ݼYTtec`Z[Ns σ墢^U٧1ʸ"u?bR8el hd>s{uV,C1] 8ͩ~, mکӍ.LW== (6:!\NkD,x= ]GW ?7y'ycv#H{{WN-՝1:©NBL5Y<kC.ļ)idy)^Hğ%RaW&h3 t*#zcc^qmsP[Gݝ)\;nlz?;/|P%!e²ͧ=3w}B"woB@o3hp7(K33۝Q}jecdj^Mj0KD1K\a$um{Ic"l"Mɕ6W/!!VI̪=O܍6oɽ<Z8/<&֍-g~!7_ pOmJJDTD$f8S~hm}#]Bӗw=$s'xF=ƕC}5'T ڲf |srP%o7mRc#Oo.!]W|( a" z-P5f>{~̱ǺEoS1Zi|A{}+.y*AU9V6Z#>(PQ q:o,^"<|KU(~ǩ$vOHXй!$wD0Lw"pb`ó6c@Q4sG?5l%3v)L4E"Som%ג^xKYlIJ:,>SMcԬGCUգ2\!ͪdyL N%MWY@ }Rs}1(>&ŭDbADٱSRg47Tf?S".hJ}n4t^[>dz^^ &Psa˥' Ìb?<[ck^kdo9"<, byXDf? V{#P=R8s?qy?y:L"`40mܓmG^D?&ZuǭAg1deb0Q.jvNqD ve6Q  xS'8Hk/_3lEJ NJ2"mGy$ Y}bƚ28a"|)|LWdN_MV5MpٽmGw<(nMHk2hI; $UO,F ,DJqHWoǨ/ ŲP7_V ͚@}^u6/[>94ECRc觓A{^ݜRQI0\jYwm+t% O-9t"y+N,O` 'HI7Q˘RHaHbp_Mu -egQr)G@xd˼cԍtXp$NjNOcfQb\ߖ}@U]&Oe*AO%u팖jTb(h 8i 4KLV P70cѡڜ`?nֵ| S ||(&n|$]jGt/!L(Hf. Xu.%eF[*g XAwUcÆV{meę NR  hO60+M6NSK6MsF&vbh5eMiJ#_08Fe_%eQ "}&tuo;{m̾2/o.epDcBRhUS=g<0pJ14:jcc2us1l٣e5.@<{cةf}zz&gƒX%ۤ5K"Hͫ}FNH$Ld y^!y_k{4<)6׏K9uM\k?#%MV (i%Z+zZa)m̈́|Ifkʯ^#SEBWWS (C5?`p7ia>/0&ݯunA#}\9aFTɻMymKGܮЉG.A'C9$/j'Z̬ven/Mܽfz U3^Ĕj(v,&eD[$9yU!om,iubs3GNF)k_=bWZRv)2%\V'|#P*%ȔG,+u g)\L;ܸix !EV<'\ᾒ!xJ }}Y| PL 9feBMO[~av T>]u[PD 7:JȾc_i2Ie33*#岥Rpg34uY b`q*\wf+ub#IPI\ ̯1=mhS-Ǚĺ+h0 ,* *((<ι$f|.D!vlO}Ԅ+(EUb[;`>Ϩ,6@wW˜Kx7ڙ04uc(p=8 ʅ% R\<s# $|% xCF3b^I@`m/?XfoD`~{[65Ѩ+aJQ,'%=P8=!7t0U&`޼HIj4G+D4ۘ,GXj8xy;W:KpMd X5;(לz:Sx\$%#GPS _ebgV)2x? vͤdکλ\' is)"1'';^›1*Yhlpɔk蟩 d[!AՂw86ݫ>A*!%'ȳn> stream xڍP\. O gЁf%; Mv޽_^QsLAG&aʂl\B)-.N'';''7:N t؁KChaP p89ܜQ *EN'vr#ђ %(9@jgiP1a-A-/mPg!vsG;Fah!@WwwUsG_m  PsW ,NRP9TVSWs\\#;?--N^vN6k;&̝~+ `GY 9¿X9C!;9~YJ tB'm ݋:8=|dmde +7g';7_:0r r.-^?|}kX@_;k }}['t..%`sB; Z 'F?.?fvyLj9TեX*o$-`pqqynnWed .OI/0 LRØ 0C7_\t忽_ɺ@T@^im  NsuUVvn+UöAh6W윯 v@+u;ퟬo ;':b89G[2KۡǕq[^6n^>:lְ'^l+L}`W߃adcjn]Ckod-sr9;=.n]]V[p%W+sq8,]` 7%~fn:xwnl~c$'s;C3 쿝`AX@`߄}NoyU u4w@!n 3蟼xa6~ s?u$`؅O4ؒqH0j`+ؙ݌Csq75xXaBsjtZ#ywaC8[3.AXD {_,ݜ`ќ|.ٟ8~kQ,\]aM( h8 (Ay}+"` J?V%CnE̪h4U},tr-)OYk)P8-SịO6@ +08jIK3#D#D^]]C#*-uހv:b+(M[Ag]̍dGזQLT|P\b$ [88Ūz{dgzjehkVʠ}gt'i0p?+KMuϘƓ\}pCPDRiNþN]OkS\9!"PES,o ~Ѡre k˻\F7¯MUOHJp^2,lUA|/q%a>=gk݄ SZ"?0}]/|zGVKơ8my(PV৻:7}5^c]c=R@VpW%-_eNL[W}й=;܈߶1nT)53d΋[c.'m(e+c#hrUSXW0nE˽dֳ q,#z%Z8qfwrm`r*Quu?w4Bӻ 3ҔCN?vJלgG,Bp 'Q[)\O6 Cm/H\ޖs [D)U+2"c1JaXہ'gEpֈBXWIȋ5yGbǍZ.P(ө&^SgQ,]wem)Q?Htf wǜ'YVnɽL/TM59Iީn xi17`TrO A {Qx]{qa'l[vvOzd}bۚAkmPt%@b CwxWj"G*t + Uu53̘.όo߀Miv.΍@ɱ͐VOq&LT;1.6*'7:cL"%x$EݝӵPck;C&op9ON'˰Ä,4sv^j6SZwbK+qkP-$ީ] 6/0e}ptn%b? kR/0y~D|)ՕpQa^ /F/ga-@=WքЩfqj5][j^mW"M=ͭBO3LÝ124 {EV };ݤlM/>sqb|IV_8>+c \.F[^4*#3fڔV./rҮP\rX- f£㚪|z4cGE~$e.j[Ge 2 qPk49]x'[á~e]qiv܄{A1.j[ òW;mUy^ٸoc)qNX s)d-cf% sT]@B=3Bե~R(>8F1nʓ JbyqUwl=RdMkz$Sڇh /6؛ci{J0mk4<+w2GM$Z-Ca7Z$Z?uBA]cyFp1|@`YluqRŭ<?jiuDI -'¯>]1n]EVO^}CS7]JH_ğ,e z#hKsCBJGQ 5:GJ׸ymh_oY,>՝SI+h> iRgs_vw20\GrqbFD1ҤZcR|Ei=E󶡚g.M#Gΰ 8Z |.;ae>={PBY7í#| Ø,̴Zَ̟d۹z bŮlk5w|#k+.|/Nބr.ͱez?較Z I{y ^]4F4A423 5Wki'jVcNN Y 1א ]uud1]S&F'@o`/B4$`Qy?@_aY{Y$euLŃ&vFŧB+-ܽTgxk:ao3Rhxu'u"]|oފ폳济=\J2%5=cmF|Q'k*BxJrvd]M6F-} 9Tg#c L')])lx^YnI(EŃ'PՆpwVqK&O)N$鱳&1C p/7蛇߾^(L题$9XΒdYu!uΏAg*.mbL 4QLү= 8N⩥uK} V^OTgJF͇Dȴ]d'MJ`'t;j̠<;*{ Ap<22NpUpLNt6Uۑ)gt(yc3֋qƌnɧC"zi+YR9Df:dDQ@{O['G-p>KlJǒ ˘$slYW$GQUFҰs'G.<\Ylp94HfSMJ3b5,S |Y̢**m.M5#7R;GLmS_i C^ΓSZPSm0jAT1'zM6ez:%)!,5Jk櫉2eM;MUn| "?O?~ù~ҲO|ltʹ0;e\V0R$eZD>n,X.va8y3ٵvuPȤ~ =\ߩ@EDjB,u`tBH%\k@ Mo.orɔЗnrJ6.&)ݘ ߯h%w>\IՋu+s$REFdYQҘ$98X; +o̗S}xS[e}z0ϋ}9ZVR]\Y@Y ̨+OD΍}sABEclcw$_\@N>F^ :=!$hkq6tviӉH*5Qj;_2"F-3 GR[hjwgf8#% i>- |R)JR8<>f;ThVkR̿o!L@UL"۲DG-(5mˁ?n)j,琍Or:$^PwY!7+x7C/S:m+ Oj o |[|uRXJj(ğ¬3m=uG{d~PqDTt!kw}ݲv?ʹgAs o50K\vMҔ84cA> >Ԫqǿ䅇,}RN_{IZ𗁨=cNfNQ٬;ݶ~ENv<Jt'gC4a_Glul:OZlG{n,ކP)5P/=$m&7;s2A­i ^od>G8:hG|IND@nӑ1q8kݮ-Sq7xoY?BJ HPj[KҾZkԑ\~\IQ܉mѱ*yQˋ }غ!GarOaq-t M,rOsN~٭!Hj26v˖ {ˤ q}~$ϧN# 벑Yb_"70! h*zS4-#<YƑY1܉=s֣N ۦh*nj*ARk(hbò7Wmәop|ȭlqT 4*r3N "/ò V"eBL[~Fo`1 KѰט\TdU=FlKCl,yc͏w|KkҤ3r4v#߉w3"?@J'Ui(MofBsT$qOYk_6 7@*Z!◃D:w">;_vfŒfePa&\v+ˡۡȢQSlľscKQRXZ:up;H] _3ņʏ'$m0/68xtqU!z4[֢U[䍖hםX&SW*g\>egE9mdeYZ2̤|1g@A3sT(=SG8zԹ2v8;:hY{iyU#sߴ=u/K(%z+-:S?S7˕ķzM.ԏ/3VϹk86WmNC祧UR1x܄q?(/GMB\?6TB0߼CcsCt={b,w٭uJ!:.攵Y !{򻅹.I(Ӗ,T+-+cP| ugp gқI~#x+T4k?^(_R8k1qUiX ޴d*RN36W( Nzs.|V_JhLh`)K3%!3C۠'6Y sv>5\3Mcm5?qr|EL [9bqٕu ~elzw"ɝ:~ŗlAtWa;_$<ߒj2KSd%<,{:»mM6.HD^&8hT,RːZ\kŌQ:ӤR(n_l荜;UEnbn|zy.$*R/vmaZ?G++ɺJ8rȽ\MbD%ەf>s#?5zr3N5;?|8" 錳Ѹl=;0= $Ґ]hԘ귁.Ewr)YXܥ\cm(Vu 9+WU ifUJ6jOKT='v:;8eotL yJӉQg?4ȪfUF4Ä{)Gj*IzUnS>UR]wñƉ2YՋI'nߔ4[=ז}}љS<&B$"c=JX3 @ut;w,!6k?+۞4 z$j&T ?z?D)y] %xkTj2Q@y'%Cț,M-G^(\/@7 ί:Euð>Kn\, ?,4o]= 2LF)~ z#|Z/[j@b@mB>$Td[x;ax@:`AJD'{䏺@sCRP_j*Æ!y~I]z|Gm(j5'A]ҤÑVHLTؚ^#Lf"7TZ-0(E<[:2w T_fuxFo hx``ND5b󃒻btYo5% Ȫ%[ժw}B f ќhܬ9L~Ο\,B~sOm/0}S/0O? xPDߩV=gڄӎ%̩QLĤQdNԼe %S>TF[XRl_dͪ ;xoܦzi}CN( גٔNOsÊPuf>=\=Qپ_?h&چ8[}ɲ95 Ycgm;Rޓ݉s晶P L,Har7 BqRIvi+*[/`#.1a]ᖕ oFu˱o:C!J4P"AT 8~q va{Nbo8Q_E=P]>a)؄'$gv!inwFAt#!s`_%"s6|7le%iM0]~!Tnv)K.Eq{CC s*o.7(ޠ5iXƉ䂗2oz]Qhw;<7-SK|KD%>՘%ODhctRW|:L|KG|ܚ"ǟF䩩GߎI xCgOͱzEaS"bKdʐUGo9ќ,4?zo_8iNM5H_Jx &5DWɠbRB9=Wn1u|@櫘{+"gG\WAX 54!A8Z0=thx\mKYk~.^wg@ |@c YC''_  > Ca!\q췺&hmd2M y#Dxl')J\ Z%w?h b5\~6)[m*k6㨮bi1xU2u3^{e^/񳀤+&ٔ\%%0ЇSBU_#oI*iWQ:&?Z\(DFbp+^W IOX Ѹ .`cv EAl!Y`i\p I'?VԊ^ "|^uRgguW7db6OU5$"sn}ckOArl_*y L ^,OGۆL7.vm!IWvܾ2H6h Egnj*(8 E QZکZK蕛ґ`O} AKc 냷 >1.YnZXr;ax2kS?x2,E]K$,6ɡeivgs. Yw#?޼wUK(Ok).8o_PQAMga}Hߪ` -2Ȫzp}1:#(7\@]5HN#P\vB~6l'Hi`SfjO5~ _78`%5ESim' , %mo%(L#@)krƸryUO9#-]**48 }s.'56Nr#m^yaw@TĆrkhXD8+;YBbQRh㒻A#3.FTb Éb;?2R}ƒ GmʚʱG#kZ; b@WWNKOE86hz7N2$)l45n_=~kn1͕)=*u(`| :@RW{V?O:QD)#Jp_ r!rUy"L<%MI"Iu}%U .feNg^O*7_-'6]gV L,Z"fyJ.4Kwoq>IIG(MXwetB_ɞ] O>MbjDe:> 6y<{' zZ,|y'ڔ:< [*p n\~(h2` ɫZkj 8xxF\}k!TMěaCY˃G vA^z:jqx7;:SZUݮƃxasb]V7n|vL+E pn2}$Dz^ endstream endobj 2141 0 obj << /Length1 1376 /Length2 5980 /Length3 0 /Length 6926 /Filter /FlateDecode >> stream xڍvTT6Hw$CAf!fE%DBZAJ:T@i~Z߷f3sЁ 4 # HPc1C ¤H⯙D@ `mJ0 FN $.-$! Կh7i@ 扄`@Br+]|ܐv6xm!)) p@ᆴM@6H)xe1iAA///0v{@pD_ Z0gğ܀=xAܱ(8 n@.?l!п A;P>H`tB*o ࿀0'w46 C:ߕy]mo{6nH;E_i+(;n# E඿{>@!]=jJ!Xlv ^Wz}o/3? `mE`HaߎH8X#(dǚ!S{BwXz('WPHCzO)(?a!@@JT$fс!VO H){J*yjg.-4?7AloW 'n sF:`9_U꿡?DU:Ga, $ #Ucc1~) Bݑ-(|Xy8bXZv!(4̄̇e'#Ȁ `Cl-ڍXEDAlϰ>ps7 k[7†4vC]xI<0r{Tqog&>Q긫4ǦYxue,(( <{sqfHZFeeoz3p"B[djv (:He\cS͑pLht L6̵|{=Vo)l}`!͓ӡpuWg*Cz]Vڟ*wLz# eqsNH؍<zj)ۦMu&i6$+Kf@gLu- kSwg+︬-$=7lHL*ϗ:.y:#WzY-y.tH*`k/Z)4tijJ~Jffۦ>*'6ڦ>CI@o? UW,+ 4||$e\0="p']u#+~ѐj} ;aLc}0R<Jo{}E@'$ ۙqө^JCj`=߾bJ|a}IUoɡG_#Cp\F*ٮQݞC2_jM]nf&1zF} f0Q<R?*VMr _XnXT%E?&CnԚܫV ݯJ,kz;\+3ҁ&q䄹cG˩cS]3o|G&*vءɢ-! (8zD.R/Po%KsT>? fޱnVڏF^ȅ[ѯ GYI߯'QQp2< A˦OEl|sbe =ҡNLmI`еqIHPT3<'=sթ\1{տ [5|g"Y@š:{l[ؿƥ!"}İp|[RĪN%LI6DxBh-*2bQӍ~i*xepL(fE/PoxH|6e{!{"z*=;!vC1PZUOז޾Mjr\3cym/!%Kq ZxPHP=x.Q 5y$l\56:6t_hY9nϥ"8rjl>Seh||q2f Yr?T?ϊO*P,7j >f4S i!>嶙=hTQZBH J0*s&awfyhy h~OA-Hw djx~v9\v7]?[njIΊj̑, юYLMD.kǦIMp3fU)浏`%2U4(8Et70Po}wJiWr bQ%?DP-*>R&W)]8gBF,e#XL<|` i>ٚ~%ܡ"ȋ,;>,Yld Kh-T(3aZ6̣6CoJw/ZhHhhs+Kmi۰CF&ԾywʅTwSv$hֈ"bQ.Ǔònae!{y>tRl̮Pz}6iHtI1 $.ˇ鉭Sֹ&⹈{Ծ_B4dĹoW;_-ɜYT 'vQE<)48H?&yJފM\GM zt? <]wѰ?#s[i?be6}27]NC\W*JS>偺j|~zNC֪b&2ʌ BsQ tϛn &D=TK'u]ƹv)% 60uL~}s^Ib>y"\ݶ~4fy y,H=+H#I(yj~|J_}8 k=mξȮ}jc'G2KE[-6ĶWvm~VxiX2k{}4ũZՠ]v²6 tkR8a:w'y#UOpƲ9?+H/AΪ Xy)=σ/7F]CI=49PӴǵ^|ǥ* [n-%=tY*c3 ~%FhNOTغMjRzWHs&3&جo4_Ofv!p­ "WB>_E-sYMsRqTAm^1nn :ѩH6,ґs-ƇNJJ{hAEroŶ:(Q&k/J|9m3wY԰)KO rNde6Dl:gGh4RZ+.( +.\'PQ=kOc_Xk(ޙ{`B&;k&}^rCb9`ϲ9@~+Wd7/E![u*&/DWE }Ï T"{3657Z @k+\r^H &44 Mx?P OԴ6Dt{a޴SĉsjԮ5JJdu-eVk殟wϑMw#V$+![;M6H.tϐ@&'d^ajʣڶΟDɌ{ZR. /wB|@bO4~hJgoi&oHۜ0Q}'~6jQv4rxWav+Zs=92/Ѕ8zW~չ 2vqZIż7^wqH~FJ&%g96^[,]Ea|ڦTj`Qxo5p,sn(:Tl9.'üE#eI% #ٲY( `EF`ًU.$~.Xحs ٴZ20TiCqfn~ZV)#=HܸG>\&y`.Koeƕ+$c|5Jo'0M\.gLRK1t1"GcVKZeMi2g,0ZcӺg__{*_npRhi=kFy H.V2 DOWAFȵ+]53Lu Q{f0fGH^{~+z9cK B> stream xڍvP-ҫ4!$@H」HH PB^" t)ҫ"R+(MQ|{}oL;k0p '2H IR!pH_E` Gc/$,(e@ $$/"SF@ RbWa=`yyYE8W8 08!8?J)p >>>@( x\ p8 ~ 0&R\?)Gc ^h@`0t]oBdEh3 jq81 E"B>@B ߝC*(aa<8,@QW)a a~;/f߅3 s5]k `.p=p_'W_A/0A;Lp~Po8߁` 8]hT'p?k{"| ЯϿnà߯-mu-c?;v/. #UR +'g#(oj1?N_ { Z8@?A@N/Kݐ;,;(@Ь} ZxVCx;|v!hY, IX /f9QӐ4Ez@Fx}` }N/IBdPOO( DP$2@)Œg'կk$PJN^a;QMOaCք~V_"_lJ=w#vMtBݗU2L~: m7l)2F٬U|;*҈G{7 F4@P!WADMnΊ`@S_t:Uԥe1=ZF}\L@iSczH(,{Kb&esn@gؖ<<_Ri{ {4tEc :kaGsF{w" ώՒLmOQTl\ÍS/g# 2ڨtnd1 ɻ ß}q')M ۿQ56%h9t9*3ImK@Nl_k cí/$m7BY9:뻞V&lH  +-D^_-uYd{mc/xJeιӻ~!3B)a&AW}^S}Ixce^F hkuɔ U`{WXfoSOLEZ _#A*YDĔLLB_D3lӘ밪ZS,iyrp:0C*2_ލl㖒xviGm4˒իvKڊۊ(ITʥqW6#ɏz`vo.brFxwSˋZn~(O( euvJ[@|ȡAz8$'=V pV14͐\%]G-;Y_=bӣBa?nn_VZ*7qxxnk[VZA65*%N'#",WIsVO#͝0`\yô6ZmjW9"?\\ۯ-_.[`Q ?3VH6Qk`߁8ACCuA ӸW\WH Pdn> f{5-@Jҽy>*1H5lzP@gO_&GJu{AUq_…މվ}yg mMz.*ɢˢBUq1|Y̟i$}T^,C Q_tiBسSVVܧj=;Mf teۥVa߷[%" 8fBW]e}nBH#gΒt\*8s|uI%k?_gܡO)fs>/xwP,D1L2Ooknjh3æi;U:NyFcyLb>Cf`{$- ri|H5pu~p1 6fEA@1>dF=rxGO׆q"M. *XYқh<8a~&VJ(6dKng枾Ulbۺ_V@W\Sә9)2.{^.we$k1,UiB!Bu>mD$[*[nVyAb2A ?М]~g$i=%Pm?hTC[#plի\"gc}c[$Uϓ^H4_ZZi=Нz!{AQs sKsH/|pBĦ1.CW[>@n'me{=-E L|qG>4v{~y]6\Xy/㔾|댺`:cQzl"IJz^#-v,1rinXE@ﻤ} ;@EW/jMLL7JFGTikїAtU_#0jbWHz>EoͽnX/3ˇ,|4RgQ~Ly.Lmkc{H]R=cOQpd(Ŋ2K2coAF$!Oi;XuH=Lky7B9ne/P0y0OwDYD;)R"X ~"!uݥ~5cxs^ [ZO< EgY Pmn]JB+D3Ilt4!\N^ |MSKO]8 odhS3 Kb0bTZ[Mw*ͺp,3hߋo mQyPenX\n>txƈu:dQ5LY"@TwCVv)jkjAUyU?)Iv#OGˆn P/f[UiŬ(]k)8IؚLj>c2NH/NK#B$oqD 9ZV8G$P-yKdd S8X#_OrpZ;jjc'ߢ הȢ+zmAgчkړq5熜)/Ir$k@'yXʢ"hئl3M%5*}+:W7`ÓMSbւ"伊3 QLa>h9qGڬ&[B9ήv4<8{{}~(_yu{yn%>~γNNquAq_.)Ÿ@?-T*$2漁%'[a VԜN9%9vcZkd0L#薊GYTE(kCq^[fcߒ>ֻ$?T&'jvKZ[;,ȶ綢`w47?V_.ĝ 9=BኟhNu:+Vv٬663s#rB+Ф]RT B ;K%I*ӯ1:L&n9Qm@V=. s·~N4:)m/_8\Gz1e(i<45ڄlG:"*T~ySF4&Yf!:>Yݵa`I1UON2f"t2eiFO:?8FGZc?^e|IoK^-#}=eŷl$A;RaVgF B/PTSKSͨw'\ +|BS]O+ ]3a֝ZVz=vo75Rz|߫\xcY;:v/f_")G/?GMd*o\&-Kksd>x2W>4f*[@+~|`%꾂fOmcBiKm %u& Nй 4\bAj9~/sWyA6KuN_ ʩ99VNgl1*tjb%oUKXDL\qH!OAתt@*[wkGܨ'IihsPB~rL|z& T|N;H>KA|ըbE!ǻZpy\zCB@L[MMŇ͐'wipԛ9gw%urZnwR>5OZ\\[W}95kQv$D){W8Z8sBuBwvo)=] @fo"1~x&o^|?ΛYvMRgE tpLH9fjTiھzOE5ޔ#YSXYQ00OdLoQ|[O}̣5gH~Hw5^;]"L@wآl NxQxfT&sy?G3>4yI9$uh1AsEr5Y mΒ'&Wyrdہ?wY}lLY"]Cq'+VzQƂ3P$#ؐ28]\ODVɲ.>'0jǑZe,Àƻºȉ\230g[4"]V'"cmٺtX~yu:)2;ە9 |092%emG Z7(H 3>0VE%f"Y"^hM=mLDiZs_=L(ؤfHb*!zN*&WF .!e8eˤq.O?7reU0*'yB`v|=p/xʝ/mMaYPһ>Z-ۙYͳRw)Y3\f~P$ _fa={ӂ`Pl}-u  9l 䤫W x}I}[zz}?#Ç;qd,K@q~ KAJWe3-}Ll |v|dR;m~ZZr,'4Ѭ M}@BaF9&gOsڏbs{BkqEq1M;74طK޴/Ζll˖j:MJ9%M^v JeZ|oHiqt WӨS/ɸoƶ[p,Twrr2r?rɶv0ĩ/XW89aU3 F֍tAOY;] ]y^.}#*~fsGvN[>' LBwjM">?6'n0wC>Ct}vDSd`f+MKˬnT] ;›L[#'K! r7Ylb["b*'D[5x;, '+32wYsUAa.U? s-(' f^&^յ%y[Z~:<>/.Pvq2~;["!O0Ҝ &fp;Uf13}Tz/9 *TuR$rxۮ{½grT&o1oMd_? p$6/ Lz3^*l8Tϥ< endstream endobj 2145 0 obj << /Length1 1389 /Length2 5990 /Length3 0 /Length 6946 /Filter /FlateDecode >> stream xڍtT.(0HHw#]030 ݍtJH ")! 19߹w{׬>}cc呶FXApO k$'bcӃa"6}(/, F190 SG*n$,=ȁau^ u%bE8{!av(6zp@8GDNH;A0PN!`G.QCr=< s[ ;`s a(W^WʠOYn-prQD!{ܬm~ a | AR0[( HXXPu@=!v__0z?g3=fEݡ \@kD6G<&|h|~~3Cwd4L <@臈(?em'Wn<-ձ_p5'4hB)KwMῪD )9:sa/-Z7 M51:Qemi-Z< A^>?8U ւ v$j08T mAgW /m+ _HF"^D|h9 |@hCZC=+#PzF? IZ@'@k茄 nH$s%n_B=)q}Uh i/CxK+⍺"P/}3]d, j}~>6umӴ-+h1E)!ߵ&sēwyf eFێ>[#?Lfmic `GHfFfMG'@W2TtN.V Ȕ,i榧t'V4,B1k$.a7+Uj;pJ:*o:,:W vo:/b;UMY:ŌҰHDmƱA~^q^x/$n5"5X^Xd۫?yb͗d]kvnѝvEh#[WQ˛m aBrcƳsjU$ ИOvt)(s<6ܘP< g5}C~dEJI$rC 7rj9gتV~% p1/^=$FBwo8:z@J-()»/cլUm`.1Ր=Ju24_{T>veʷQ+H 4X(˺}M1{Nȹp@R{>ϑ XgQ6;Woi 7wтPD[|twg2a9Q^5hfΦYZs>Rړ{bm^||eO` d<85u~M 09Uyo,`R[P7Ei/O :spagt6'RQ T3tWF*`I Yˋp!SqPD* I$;K触$]|A;cګEMF%U+ v nqSb}*fRajB^o:ĪtMA\Ҟp?q!pQv}L|CΑC.* ),. Lo7sIzW~>5^fLσH/> n%ڲjKs56 2%Gr4w&Wo GtqpЎ X3.+rB@sdU3QNK&~k"?IgbE \ss$/+bc.g~,wY~M\zP9Ζ=)Gķwڝ9TɆt=hYkKW>2,T T﨤|qy̸#t$SS*aLZհ|'|)߯gl}{+*-V8&S>OOl8*uw9oӪ2( aI_39Aӽpn s`J?}GK~v6; AC2A3!mv7^FW!DHG$ZƯucƤ#q9#|Weܙ](!1si[Gqz 4e8.IT0dZl6"K}.) /J)=uOς۸#o`MˇT׿#3k=ڌX|cpnⳞ@ ȍl'Ati{I.)M_b7MP .L 7LgN 'I1;#a(Sܨ[E`\C}F !I3oִn"a8bl=}%t 9Y1?#hIľIQ<*Zaca{,`#;xmC]'g!K8ucnx\7VՆeF.?Mt ērhn]5x9o4,N2dj*IurDd SӬtq K ;}ǵ*K܎*-iwI/yr6ugC.!xY;niVU+w[/0q#?ҽ#mYN%fb2:O;츴?M_/"]tf!2\qi EW!w:ʯ7HiJM,'[FMar ?OfL Y7bOnEg EJ Lmѫ¥ s yĬ( >1zz9|SIJ#,icP^ nb!uh LX{"U R$kߙ;P{v[0I;BZ`w.%m2J\h,.]8:Kذj4V#&,lK#&tκJ]1B}w%e[4./sd$x>^(ϸn9LdT%49Hb]}BnuIYNiäls c61ɖ-ƐOSl:U[nDN5{"ǫYw[k_uuF& |n`NR𷕲zsvfٓm\0a7Yfa# oEfaM[Ԥ*vH6vWg\(Jjc2_DpN!KK5 0K^WG,h&G+aZ=~ IviKXFu1uWK .>3ISۥ pNTit$z#pƋ3t^b%B5h>`9T(fP3ZR%V8pCAM̷yC| ލGЯ*U.ehS:ҩ{| \<)xǫ-o`3fHLc*#Nz/! 5lZ$*9"fN o̰;$_7UJT#@/(x:k'?k>޼̠:`5^TMg&;nzuLɴ'+Qy6EHup / f'1TOpHנSQzx7|qnMp2Mh#A.r]=C^?upj˼/@UD;$O'g;1y%ݕu,!?|14tnO?F1C+ ;iǙJ.*U_!:EH"h:Az{hMX(ܛ*\*]FYdA0_ag9fcuU83X:ߞXtyJ^[IØGBJ~.e]R̋v偷]ádu}ӡ2wa K"8+z Q߬ޥ v7S?-lKrQ~T"?f/!99%c$x֐Ǵ}p?=xZyZVfQv>'Q(6'-4B?QYo*ixYHq*\''AGy@}%N[6ocsͤjK9ίg #)DY]οA+,˪³he*_+D+՘|u2э\g5 %*#NTJ$bkLW7*]-m؜l}ʭ*{Ir?Jٱ-O:+W5y4J/q1+ײ[TwG8V쟓09VB|MȆkGF̂_ʲΛM:A3]:>I,wG(hxiCydC;o^| bR/.>p&E䈬:ؠ__S [QJu.=aŷfMGֳr#pa'$j֊!fd e/j{lHs*)&Bf_Y4*)ޙl<'USӰL!|m78P=zhW]enIB"'{aAiG{X,U*gI;)e;Ǡ@$xұ17yۘij`U&%ZQj,EE=lRͩc5c>(A"aqzMvFvf':L)G\N:y=.yi @ )>z"ry֓ݳIR,c 8߱83 hϫH҆7娇,NjX)ǻoRskUO~3@tVTU %h q]dK̳i&f[5q r>~(mG!KX737Ώ;I $[UNu~dfmr2`dŒ+tNμKzŰhWmO|*No($6IUSI?w$1g7t=57Q32-Oe)JH]T^  BψRqb|Nvݞ[Sh+7^ z͕'7-7fr]T-V[/y>o?.zc3F nQLa!/K)1;FmSĎ Q,:ӟЊ)_ڞvz]# 3Uh kҼod@3%}vXzm2_Igvxm'b0Y85p`Vp/\r|QHP|VNNm(()6O%B(exo4G]idњ*m=4xǁ֚X=ۓ4Fy}HHjog?7ut^:SgjC.+Qz{X endstream endobj 2147 0 obj << /Length1 1376 /Length2 5989 /Length3 0 /Length 6936 /Filter /FlateDecode >> stream xڍUX}FJ F7HK0@6ƈ ) J(KIw#!(HHJgιs]= MT`h;4 '$ XEDA""bnnS$ 6cH4J0poS8}4 JɉJˉDDdDc$ Qp,[ A"p2zA҂*.p  A!8 " 4ACp?R)8prž  Hc<0ρw!.ߓ@S$m`@ w Mpoo EAN'g"$W0 EBPHht p^8A  8cx ~uQ1B ]qXsDi𷬁]\(?u$_:О(?{$ fs VpPRDVJJBw½?ӛz9E]!H{8x8;;yaH(hG Qpg1H/ X=QϿlQWXBEOSUE{}EB@QQI,i !?mGewu|ghN_.8^>a?u&&)`0oNb} {b2PB!@@{4sb@a|n#= ui8 LOa*TX<~h%|w9SsMz_ˈ ?ͣA/T8mܞ& ͌N^zdtb,\U|l l%t8bOe=TiZ#d뵴M͆ c qL Ύ4<ݶrZ&:.&G:XU)L]"x m`ٺw8S[a'Vf7M;^\q m؈ʅ&nՐ~U4IH7K؛>RR$e_UhܨE) q˽)vUOJYAd|nQGR2V2XDz[~ twϫuy >3n nD%G|m`)_id*YݱY4%sׁBquYkÜ&6k[n Cg(&n=P &j6;ѪBSɧJ}ƒNϗlJ5G1 M+}fm?:Y[U-X^ˬtC-*"1z+K̫iI('}0N>FL檥Zod.Ά8ar oIel,^ݜ-PU`sQ[4HyePW*x.Gf 8a ׮_obr܏}?& ȥ)~^j9LTl]@1v 6Sv藄t 0W>put+D x3بN:)wȍ˪i-G6SXT]LQ–Dȹ0ސDRC})4֖.-{gk%aܹI3v? k^56gÁzLW9wj) |E+5w\OTՁ4SG3#%?t+X$ 6J4Zp^Ѯ"l@ٸR7;Eh[t_J#}gH.0׭\GGR7io;n|haA Wrknk~|cr0t3~Qd1QPo()b,Z}]vԟy92:njy-R{J$@ڼo|#U5,dX_]LjtٻV.'|=2C}(O¹KPa`v*T]esx8f|V^e'N(А]< פ8L>Z=P,;8yq85Ri) WTLYΎ:YpWU$2 -آ98gRRo=[ G9\3RgX" wa\I󣭡|W-I<5;͒;pF4'A3jM+G,k|̵py*]߬fPas,.5h%Q^*&j]βyc|;M/^J( A$7CtNg`E|y'{`DuQֺmYnpϤp%HV*h9q軜OŸɵs?]|UO֙z#B\&B߫lBXRE= o92i3=U d|PINYڣKn9[&$tmO7J'GxO2N&f@7<wAuc1>z|=b#i}T4Dw´{o&5|c2&"p5KfAJ{b\Ȟ'I ̓>Qm7%2g"3-m]rm|J467oh+coFt?#` kRjs|IeV'd+S3Y)> dj'!fQ&&)b旓b{Ay-zageU,9›4QnE:5=}zN,؂!@߫~ =0&ݝ&>OѪr_Mj~@ N8/z#$B~FU鑔!>gY sFE ]M6Ti7~Z\s0'>[-=LrDu*Dc &D҇`'_fg/LO n/lDz'9ϳc'%*|m$Оϟa|+8i][H*A+w<:@X9{ăcH|jCfᖋ{}Ʌx b>g}oô2 DU]3X5hrICm["Fj5(HOE>h¡Z/## 7)mx}R ]^ߴ(U~Vƙ6מ0P85)F,*50])lgߐo]۲F稯7Ǐ_b4Q`: Fc%ԩGu dNʸ7:V>t4 fW{¦bRc˦-uDvPO䮩RCX-5tW3 &Ȍ(=Gqxtn .~Ѻ\_fs9i@]aVCuUJo yp/3 ?iZ3[!kCjSNC'C2*u$T2 Zw=geҋ-I}!-}FNɹ{ws<:Mf `3X`*^ޟgG1U!C@iׄw_{?dEr@#=~H[:}3׎>fJЇp|brM߱ʒ=ϡ-K܊ꤐDqNz04E61D!)'=B[ei:t@e v[S?$,? IX*]O[8t$|\p]㓝Jγ)OzpMNE30hct2%w~>|TYhhtV4X]*7R^2k8rde$j{0 э-vYdb9IL5B6ԬWnZ]J 4&"us s.q]*IX@9}5޿7:1 9IȈ2"nAm`q/f@IE)6]ۦ'!~EoDj܌@u%Dc7tydNTR#Ymv<ӗq!F=*]IU}tIl7|U^GxWʱAuَ@"d91-kdK2ʩΎRASd;Qb4튋u<@!WLSZ]Hv;À[r%a0yx㖎b0!VQ<]$N-8eNPr`Lg,Okz2^j%/ Hm"UJxs#u`daKQ,qq{O{̹/PO67']ܟPDp$EIua/ jj8/'˯zb>wLpL;"bH]Q1Q.b09@dVM+IN?rދVa>I#F- :?c1GOZF%ϊ V%ݳ*C[w8eA2oMɲrGs?`s'xѴLn){A@ouMX U\ln#~K7Iݸez]v՗J.yp3gG^zx(LY׉=qw :)=KDNJ ,ҀK* #ۧKݙ~|=!7I}ωXΞaiv-F%>lr CMo-μa깽/r~TWd2W!^:]%JlU A2@liS(vߊ $$+xO2hgW7mvwu$oP-m{dd1A[Tvk I 2*k@VV~w)nbh1?/k:KcM, ȼy#{Q~H?+i=EcO[ ,*k\G8ڦka؋k9nGP $em@E|^ \0AMF#8I[k&%9COID2Kt72={_N1` &l6jLuF"f+ n9zjywJya0ݛzL.b1It Xvcڃnռ%rJY2ݕoRo}uIM74 8F-QfOY4q~iY7rڠW &l}'eZ\%P5X3A$"y[7r> stream xڍT6L ! 2HttKJ730C t7-JI {=5kefpG c$ cfօ `(]@wPxrp'/?lOd.k D؁PFx$tt傻J>x@v`W;]0@2.K?S#TJJ[!{8a,j+ \Yr"PEtKnMr߹5@#2ҹlS JI)!Gdz;q5rCb.7 ҨrrDkts.`L6,q/s^6*_ͩ>sX'JK8l诨@1oK,zumt冒W_- ygGzn+FdƜRRHN)j!2!ÕǞnCɔ;[4ӥ)K'^PFnI>XJ=w`nRgQ̠I/^1j7a)~UFuNUNaнUb[Xx&ceS?si?fnKL(z&S(,E7bCɗWΔ\fR -aEd},z%ݱ_{84DܖZ Ldқ!7.ա&dI50XA#(0MxRM)1ab Ek|leõ+8K)ZUOo^ٺuRNJzv΁^9UvLpOei-J#mc۞?ud j#!͂ $h8Խ=&Rf+mpKzf^V""bg6V Ts>6 @BbJAf)¼l׬šˈ^8=IZ+{ K~4#JЬ?X-6&rQxxeaw$q(^O4ۗ_42.^N$;Pq17Qq6aoZL?G6f77s#NL3h7 wDDZGi:f,W{S:O+Rw8(KÎ>/;97eKKy|kk!Cy.^5驍Qˇ3)9zZ - UK~>zc垡a,}-܋TK COTDmd:Dy{o+XiG~SLZ I(Sʢ9AJR+IS;U 9ٜx;6Yd*,<>iM/djU@usNZeN0Yˑ5s[e~ENIɓ=R@414hQ&" /UmP_=ed~eK I̤٬:#[)Hy;\PUbZ{M0U9ۈ딞:ǭSrO4<Zwr5~ׂiG*&]m錊:{]JcWhFZE+`<=x"mG#I^5"&/#lZuiC 5D2>ًK>L8:"h8.$(b ELxqyDญazg-1"M[rY x8Vl,[IZ-GZ%[T!&^톎{ Q:;Ap~ yt{$\5#`!ZwuyP xa!*m:*[;7Yp'>&=T+7}qM@y= 4E"'WS\BEsɽP}`PqEgzU;m2׎;_,Ťhw: +S$tp">Azy}͋е-z"2&KzbEC{I?̘c"V놔 (ԲU ܅t_56eꇽ }7؁92N{q>^ZVgwGU }=i( Ώs@.-d*mVXBKF*ԟ(sƧ슳~ldH˵PRY)z/daާ VَQTI^hkAVM`;ȔR/ީs9>ɯ6(F317icm7]޴WW=LWozb|`"ƩH,C5]D Ca*>1^OD/fE"QփSW2ߐjqEj־h5]j@U`6w6(H)Fa!Zb=à;6UAlLո=^־ *ddw>yr9^=~zS92ՍA񘃿7 .*x`nU*\~š#KQ;p(5ڟ!4MO2ωIJ x%EH77t|]xRM"YDn15,a_ p^ORŹ&$y$;EwGf " WoNKO#p؞3zǐR1>>j~W(F)(̅tW+ՈזtfǕ7NcUq6R Aa=>5hw '"܄k층㓇B{1(K'w;ŠHA:F %n_xsƗr SiO/hkQ aGb]|k9UcÁ+W_4ǖጯπޓ < /`Xsj|U`F|Oc#YEBb)-]E QsWg2<.߅O@>T?~.ld8T2h~غ$Vfz1ׅ8ӂxRZV3`? g7vֻJd~aOm_\6J3~P.| 2IľuExz/(Lp:lKhslv=K݄52'ް%jhOɽ= ;مx"ސ Qs;!nx-/o!s$Eit%Ԁ8fX6wbx =r pEpʬfpg[g/c2\Ҷ([LPkXRвD" vl7x;J[T1Ts5+xc}*f<%صV؎\vY[> b8{=Z #vrhTׄS>[ퟭ.Ӌ"x,Yݼl_0>bnvOPyݒ`|\юssz^@(GB?b j.x?p%iR\Q=z0ѨP޽8L'í[ae݀LR g}^L#6R:$8>'MG;}[Q?t\pҮăP,_U_jo.tLj=tbyIY66<^c*`})m@5՘Lz6K$~:vwt/@XM,솥E$4%Q/K´k|&.{^>cd:?.T^ ~#E>Xa]Q>^Re\v>\'Wj/?&uZopLIpR/bHjPO+T&=p2a#lQeu-@FwG1AdюOrmןD&_'jXJ8M+k@;Edæ;p<#-c6wsu99Ru DlBOu/l|*Nu$ ѠE'rUk]`zұW;_F0r'N""y燅+)V(VdB32#|xV=ST9qxxf shT'9jWUL s,="rkVJ\I&gOipg(68>|"r.Husf^i #z`6I4wDFYuUcC+!׹ b }oQe , - 8b{@G`{&3v}z%N1F) 7w/T%d=SH^XfѲ1e ΀½~:Py.WBUYou>agۈ|wi?J{IgBRhRQg%sQyQVy _]I=ifɖ qCO#+d$hh݌ye` -ȑ)>y\M$,ό#%0qnLk Pհ]^ yݲ?L"\$Tj9a@:Mx:cFqTP"*[i[=|nr˪류I^Liw$.6T7䩑)BIw$s:>S>HQt~X hVc >YSytbN&nⵆԄ8ylOȺdowk䮔T;ę5J#(s ӘFӫ; S,93~8EzlP]'g!{q?-Gc@B /jȤ tЇg7uk$܁qd{(' c͹}2l0<2Zоm˓-vp6[{ˣNLfLlLiV\U8 ^UF.uS)#Uyl~"x}5UƵg.yvXWx6Wrhmb0>lYJ1^UĀ Ilճbk,C{O4eLI˥Q>ވN ;*Hl^$g7zʌ41_w/H$kΥ兖0!A K%aQ/e֖xZc"|V+goX6R+#>/iJv!1O3#WȠ],E+!'R*<唤+Z;8*|Xk>vn|yA_8ѽ~Yr /&\uُjW2?VM^ovԡ=/-Ǫ*JFQzxzwP~Ɣ3i N;v!J})~^sgpԐ?PX(a rCA>GW#W] tثPZYzHȅe[@l tP.o.Krܔ[+&w*xJWEc]JVbs(H,eY ƕ}9޶](.%Wj'7O>0eQnҦ8_9I8S4r0s03#Z_6Ruq"4mWZX~0nJ45S`T_LA f(xAkJfa^L2Imm3OaA \{A0+IiW)/ˈ6r勊n\r*С= .,4ݠ:K"ʫx|)/ȸ6(7#>.Πs4apGO͖fG10k~+yFgix)]mLuyߗފ\Fo_Z,~^RCyb2xAnBSߝWәX]d ƜI͸$D[`?x!j˃ʫz~k-@{fX/~hcO4٠>&XsAc {ƧJZ7-?i^sU8qzm1J\aEyRyg9@5at3~ʄ MF_{w8e9$cxXW:M{sOXAUEԢay$l۫j/!aiوi>kݯrؒYFLo4ndϐQ<+#}[-,KIo&6COM5D 1&8-mέ4@b!@Y19"y9x&~QȢk\kҹk++Hԅ@lʗ~h0̒lݟU?a!i#Hp|ɉh%F99;KOlŖi6έdݺ˩[Pk9d{a|权OSsk_ 1\#MG7 fcZZiܨyEw*!x]]lSI/&qTC>nS C(%lBS&r3_\DMA56CdO$ RX:m]1d  g^&}E\򞬼LYco@WgƧ,)*&LVWjUҵA+N 4/sE :6" L[]:qC&FJ2 G҃ΣGvM0q|uV2{"e:|'uVJXTda"O>zM(ө NfEcUQE?eE K&T%E x9#U0 .ADF`Wb9&lHˮ%|(PbdCV҈q=m Y`@b:5Uƅۄ"W?Ǿk&@߮omoVaev @fT^2*$,N)÷MV uVcX_|˔RYLB$F)<k~k\Dw+ꩤ="Wb%Ix]2}oD;YAME;_٧jHaXD endstream endobj 2151 0 obj << /Length1 1407 /Length2 7483 /Length3 0 /Length 8444 /Filter /FlateDecode >> stream xڍtT6ݍ4 ݡR03t RJJ)ttR}{~Z߷fߜ9,zm6PP_@m.(ppPN&P7$ _E7(uS8@ (|$!(*! DI0[6?@" 8.n0{>,(ߟt3 `nG `((-BH`g$?^ C9 H{dh#! vN0KqBw յ.P_`| /rg.IC g0]-~|i P&{>$ B#aNg.swp[E3BO ܝ7u#{( " @]P/F.?A}].10;/ܡ; Al08߹vw< @_+;"Nb#+><Aѻڽ;Z tw̅MtsGRo,]IHO/;ÜF1umĝ 5%]m-(w~((/ TyAm`(_o[oN08T~a+v'2+NC2-6# MpwwWNP?d] nF =e@߾Mo$z1cW۝㮥?zB D2YEhY< a⮃#! -;fsk!=nW#Q>Ru%vqj~a DGҊ a~ORP.?:֤Ύ<؎q Y)C-0lnhoʼ]o{Di=XmS||g(&:tvn`_ֽٙuo_ ײfϑӉFy>B"\EmŪ*S*ÿB+ߓki Y!3FSz(k }'!Q!n10>/W BE>t<*7ml'U#`!ܿdb 6e{4ӧ*ˢJ6rRwm/2]QV/;&"ޕW`iIN{ɷ/FfF[B^}L}Y-`wA6Rð=Vʾ_ ;ɴ~u<AGGE9hLVrďkKP~-^l Ve%*kj]FK>$t\_Jű$rTREOv:riO^x H\{iehm]ю,Rߋ"*~f!@S$Lҧ1;3p"XYufA6g4"'e06"$~ ;1SOő5ݢx'k8ߓhslɽq̌a^<a[?x = e~4'N92okgZֈ*H>n1cl6!6 =.,&^LpX4CʳVpv';4HVǘR8e&1 Ffљ3>\ ekCbsn^l0gCW;Ol L,Jj s='<`-aϠoE,&}ggCWz]ԘNm(EU&f}/yˤHV葈Da >y vS7a:ZoL-IhVf΄YD$R7K>Z=GdDx[JQ oq2 U#νw_*.7%ɾ-p̦r^ MhIˀ1!FꏆMe򨭉SpyOeZkU!Y+ck\.{{ߊ6$˂H?NpS’X /wkw@dW}Jto^Zf|oV|wToPՁ6BJ}*grրr/y%%B./%ܻ5z~9+x4Lh*%|tivh?*ZKhl{[(Cc\>Hÿ(qŮJ˴n ;GOd\ħ%"9eYHc̐GqλTiծxIcJ?T 6顺ay<;%ޠRg h2n[TFamܔ3D}7xQ%C8A}!}Ċ4ر4#D>_kk#.kY5}U-1 T>yp,@MMOO҆-ٍ`՟܃\>ϞVw=b$K,_YWT|qʦ^;Q|jXe8 4M]^BVpT$)^%hH[{0DOCՖγ{_$݇+0928m9VR%RAzRK3'ūEĥW\~G/&DС+J PK dٌg"pυAd^?`_0wzx$5$S_.j7G-Vиٯ 6)$_?oYZWutK(|p2dp7bĞ -TFӧLuZi~F[A[h&n7Jc/EH>=*mqB,V4AG>WΗ*kh\)*0OUN7<:%)פCj͘c2fa cK( &c׬7P'q6Lzgg Vz j`_y=/{+N~1.KK ?LH ?&;,Y;3yZo5JI:̳qővt-XNp,̦X5u8D'SZ*<`.EK7PG_ihzp =Egh9ń7ctwʊ|6/Rn@O0;A}j4I'QjӪ@.𷫵wF6W:=Uc3l&D/¤~Պyf^SO_ _{ CK8~za V/5k6,܏fO.2!iSbaCLǏٗ'XLcQIgdcϚ_5`JY|^Gd*9? ⃺vMu|x99Un sn]o:Y|ЮtSSG2Z[]n>CޛSPij b}>!W\yhdԁWb^nӰqʒ34sp=Jpe3fx>2ZlЋ'kl\Նgq{]#:6lbθCp&IM6oBu['eUVYҦD n,/npw/Z[  Y,<ظ3_Q!䭲fKe_)NF3 LbѥWdsPUBŋшG*85lVWҙU>)CLcN6]j2ձi:٨qOV\_0?ueju b!;ny7Om8hB>3QF:>)_egs% :SxcXۜK~}m#SU6sV>ss"98w`u?2DNZuFvA䮹wRVTO.4ẗ́Q-Ԭ-%uHՌ㰁XyoQu8A-,i0w t}7)E 5~"$mH,_ItlO]͸20cإ̺uʰHwo+Oq$Zb_vs)?L[/ VZ>ߘaz5*c#\1N0hhYW`4f--ylT 3B"[ɱ$NkwzFhF[|oe]c*␯lg!d)MZݹ6]IQO&* Biwd[T:C̜|SᏲ'R8tX+aЊP P}?Mra@ כKsn"bB~1өH!l hK$%e 0i>*]ʠs=HۙU:n^yB if;ng0@2B$)/ÔT1QaݤNpޓdUWop3" Ch++͍͐!Q6E橸Fˣ 樓TJ=;^9~v"M1c_r3۝mqiIkYǎ(L~@sOv}C!fMJ?uZG]Egj! m$ܗcJ3ti-Vːn4A:ft'0`ὕКDڊO(%$h>v`HrV>Uu1{7yi%@~l&l(1_ N̐ImM+d񳾽bLQA(͌e eR7Jg F@,]^}a:YzCtlmrYdȾKLv$=< FvTOs;a}n0@#[٭<"{pqvJ>Ӭ LXF^IZ% Z [} X&͡{QU/k>GptwGGbS!)P*rZ~T )oermf2. HĒ2w7ԟoYfR`%lq1'mt5`;=' sۦ_i4"0]ɻQ2|v2#fU"I'{/AIC lʜH}À1(U^sjBtt7m~FfF8hX@pjf4x-ZdPZ%Wu8$mW~ҍʳFWq55RMFo)ӮX=g~NlFî#>vEu(%\s1\[JaTЂjB/iw[\bEׅ/$qZg?3Q}XqDʺf <5IE`FLEV 0~!Ę">l\G)P0;?,d[J!.ԭ7`xUlfUwSEO ~ d5-yoBytM2Sye,tsIjU`kW`x~ JlI{ RlBYXp}(k\|,: )Mr1-&CbUV-ϪWaismbF=zKrAJ6Pt.GOjq  ޞ@+>4t2HRzxe\y%g/駹;QEF2H/,6এŁAtQ  0mZ9A gh3Gb=>aV;{4y*Qc|+HxаsM%ePHh>ix-̽@} T!UnWJNG6Ic+'wQ<_3x;i2L*> stream xڍt4k׶uD/QD6^C 33̌NQB(A !j5%z >I{w_׬s}7eSG!B`@DIOŅ`1RnnS8LmCc(aMC!mw *ޒ10X?@ZPx0B0*(Wo4 + Ғ%nAzF{0AaXQ9a2""0 /x±N1 C{} Oe¤܀nrzB0ҀÐw$./LtWX@7tE"#CQ.780@]W H/ A]C< p;sd@. <=c_%rq!_0˶{3GB~uw1CaZA.MaX@,.`nI+_W+pY#@<`ߎH/p{,`s#Ia4/{w~ݿDx=_+ -#?SVFy-Q1@TR!zK 7!Wb(@OmO ͥT- G`ˇ%NH?8@C7gU`P{K+!7Q{p.X5= kC$n4M .W A@D^X&5r1(G/~{w4rC~# 'Fˆw/v5ґmթ`J7cxOzYzCy$;F8E6߁Hjm[e\ӢL?Gpխ{j1 khIû0D+ ~T@^VP8KyU:}gt%C4Vĭ'~߲ғ}ob{ͭk(>Tqݝ4w7ѡ˝;A cf^чI򀡽P4";e I2 /Ajv<xh(zE;o(;c ?8˺⠖sdVm,OL vŒ}+_Ĭ;Qf/7c%TzIG _! 5L3r lFSMW~^OpńNkBQpfc9҈: jwEKA*| ~~_`<}[yKݩXW_fbyh+(ia\k7 v~ m0cD-1͠yBmUpa޷^ixۤ+ԑR|S\ վ\onإWp<F[owwe63,˗?[N’3t?9᙮e vJSk$Y:WVt~M ں?urQ'Zq:c^ Nz}ō^! !dU]L꺡ޙ J\P^qAe1R_btLxCS*d,H ;ʒ5{pb.PpS(g~S>O=""y03GiF p/6&3ڭQ"樚pQ`׼wڞbM\QUNkkJ e]ƃ}LWUEY͆3kֵ쑓H zrM$nEѢAcrAa_Ye{{[-IA9 M0ӄ8bzʬaFEEi˭xgȶmT77'[ڊb)Id\N0(uţ@Zu׎l{xs&kM9L@BQq r9/mdbǦ&./4kIvT4QRM3899Ik{\ȣbAG슋;<6ظcبxV}aKПE e)#PRgR]BBE;κ&FÇziԖh=+f@$jx:@=u&rfPng(QjutnrՐ.z_; oU=q1:Ғvɲo27'Dy,qeo$ dKWTz)nUz'~HXe#sQL(Y]ak[}n˭WZ5CuB LIQ4Q_?eMJ' _)W]V{:8€Z^B-sqC3}5k|V^2e?ӟ>9c. 23D>K~8 &|eeJjN;"KM 'l6}(侣}:MUo 7p ;i{XӢ5V|Zȴ0kp~9<U %۠REn/"b]FCDE6 kޣyg)>,ZLl`gǽ'z:H|U zT x˿2o5F63ͲK;&߷1M:?FA!k-f|nכ3nd <$:ȺQlYJGHM:ᷜSY8%~.<#cَ~7 /S1C>m(FJ:n/mk_(ʝCk)h%FUg *$NFȗX.4QM ֺipAwj97S٘9mLޘ6;Qs?eƑi s3%pqd ")|ČON2ЦNc?m}f*##(GGIW[F}Ypϣ5heXgyf F+qm[nEƦrݞi}IZ.V,Jq+Lb>ϸJ_ L8Ę ũQ7k7 = ~"<'dq&q/cX qLnrH)P#\ITc+ݏW}7-]SKu?x3/ OIp *)7{L~ zC} 'D$dtG%WI)3M-V.s!P/F7˙CW]lU/0HHV\_~n7f"#{q;M*S(1-fRȶ&z*'p::ɡ\ν)zzFQ&W|J`F +TӴIًen9h>VEpsڏo`Tz\" #fԛha1;]KbP[@9l +KF% HSUCѕk])߾I/G%G:OJӄF˂Fmjاp>WYoo7hWV}ȣ&US,GC&w(g"ArTىj7ϔ~ϘhKW>bULUS{l^ŕ}v-kZ+ƥCY~˅EoΛ0#qy] 4Ǝ^PЫ0 =w 韠r8 U w/#U!!V2==Xg=ѻn x/յ)"A|_nO* |VwݝbK1 4>mKq'IsJ87Pv'U +M k4d4i[%u0#c Ef{G5U-bDN 3m M~)0_! zKin`2zaA#*"WC1V#TclCDT]/Ӫ߶(9߭(hT2'er≃=m'lll† : ]ʫSX_RU"*6#lRp>¤(>VqE:zݢ{sv.!((eȒy QaaL<#عw1`imT ƥ0Z>Զǫ}2Mx02Dpb2LniE#; tҌ|ԭgbUᢁS̜|5M0kxω% >qĠGrwdgTܳ2/F ƫ, ;rHBК0W6*bmSǯ;4U㈡n-:5671>dB)075ٯV>'RT;FvA]c8Q!DK/ٛ4!koZ+MgxHijC+F]tt7-rr0$H1Qq!7Ov]X*0'tc~1ʡl)[~tz9bWU6P1Х(/Awi͇"|^SSR!4l?WyeMٰc>g+sƇy}5#{d>5xVgUr˭3l|ɂEP!}-za:kUL噜oaŮ?$IGq8}X ڍ`a-cC<& {{U ߃q?Œ P1o{¼܇N&e4ŞZKG/DN' Y^+xbZuLLD_jr'dhrm9PO)4'48j8 ڬ<1ٷ*4I "JeK:q0׽1$!d#[G)HJ-*kkH-4h}p¤kVeCEFuІ #y 3e#KYwNNI)&_]}HB4A43ۅr}±.uKOuSXABDE=ϺWx^6ͮ+-ng&(2ҕ$@a!/-'#i󇂅;'{}Yt/>qE&IC-:]<&nsǪRuzXV%=Ðzy:}ɔM~"6-]e=i$O6'hωnorh' W6B`yWALMj.u"Cz-oʵEEY)? bwDAJVKڡ1IƦ$0̙ny)773Z;3b<+N+UDĄ[X#)r V>m7{zoքeS81cq+sL1N\u`dR; endstream endobj 2155 0 obj << /Length1 721 /Length2 1121 /Length3 0 /Length 1690 /Filter /FlateDecode >> stream xmR}8Ty*쎥~Yǘ>fJЌ̙9QV0> ]bci{W!./oUӒRgUY!;Xz?s?s=sZOq2,{X,`1ut.F0r@*|T bA:t%dq$Ac%b$MH [cbb\b &T7QP($(z/@( KB$CP\2@A|c9x JRjaa$!WOxp\bs5EHvZ$b$Zd|ԁ  p ױ#yX-Ԃj}`CajB"(X%2$vR_`RLy2)X+v5arO,c0XhBc |?Cb9R@oonf8B1<)0)^06= b @0Eb@bΞk-D܈Cvf6sta#`;norI85gz|P4Et[ d3ɗQxE`=-9YTWظ(X̾`]L߳CD[s(f+S?f3<竿$1WOקo<2"+2h$ ˄f5-×S2˫ni Öl%Y^QxO|dYX~dkuU6z/:9`Q"n8l8\t24V5ւjTi3"ٵm!GMyce}hZdijerRp`G;eI2P<̋& ȫ}Le4(n"q舗{9E.O) 0hjtq:]]„%;;!&YQc|C U&=,|ke[dT\XWTeÅ.?s,aQϞg. > stream xmR}8gL4"=hV89=^9R,$ևZJKG䌄+)Zc{K׮k}ܿ榮$A) b9NϝܜOA & @ _p9e"#h`ZAK@FGGoR)'l/@D[݅`!$ %Hc(؂@FRNJRlJS[-Qx\~oB 1 :ʉaCƦLKfhJNGl) cv7wBFӰTx[bE1%BVP"OJRB-M"%˘p:ĞͱƱ(W,JE.Qj<N'bJ#qW)IqeQw}|f@]v!PRfP@]Iwϩs])),l㰧3uFX7 6Ǝ&G.(HjۙYu0uفsǓ\ʚ*~[ wꆷ-ĮGHC .YHGlݘeb2~Ԭ224'X g> RE ylB%᪖ͣ2xI]تF)bWPf.I67(=x{H>,X|M_UO:,yCc'Bۍ)kT/PW}rKT9ߺ'}UqOc3~>4ѡ* hͪ{nw;m kՔbCwv ڳN::nz7=zhWh'omaZ0-ڑX ! ^ϋrIص$}̯1n_?lc7=D{#/|;aݢ[y:ހ[D:<ΐ~18Y ; L|}S~+Úo%礦ׁ|^y|}ԪዳBį3欬˼_|ܐ+/rPptg?\yXoМt5#;&Y%*z~4ucgo)`iUSAAgO7s_YJrѹ22U}.%\fkd9W\Ք;:,x`Z3~'7]MҮYwpQoHN_,ESQ#왏oyqEun^h- ]mvIx9U@h#{((R ՎkM>Ke'vz:~x7O۰KVl?KO\l@ +װusl hFAl[Ư5 bO`FvWɜ-Xfn1ycg?%}wӒ[W֋4WV8G|:wb:_%a9Twlꅇ*:9A|GtOmS N &' #z\y9(muÁyND*B㖌mS)ޖ޿(79-Tͪ{C:KvM >5pZ endstream endobj 2159 0 obj << /Length1 920 /Length2 1602 /Length3 0 /Length 2235 /Filter /FlateDecode >> stream x}Sy.O2֖oGw 0E{|pv)\:a(2YD~gBZ:!Ƚ]Jݭ# -?)I%Zzmm-i-vC%mC}0'IbéxΘzv:ڧV&+oy;vazZd[Flľ ٶuǎQaj"wG˺ThČ S+ G9qIQ*c՘qIgx!L^ސ=.Wa%M8u.)>=O{VØ J5pS>P2'ϕ)wl11*'V2Ե#E̮V(%{vvL&$?CL;0:ɊSwb=R~aiȑ!BG}Bo\(\]Vq}/jTJǂW_ ]$cK~ud>4"e^WΘ8ߞ ARŇs4=$2.0v:9|4Kn#oDS'4mbv P9FUB=;7'N%GM4 H^ ߂a=Iw hanԎ8T^ud/^ ^^U]0g%#Rm֫m6J(*֟!z-}Jfk˷;a۲*>g]cuʢ$bH }_e<ޒFlmϮɻ~~oҰ=2o2]z?q4/̝{v[G,:^MŁx6ss@TbzP} !&nZՠ hF bvRQNb#7qWd9pROQA@@UAfke? 'F]3A2ݑ"`/\ gT3&^0:V;QmAR7pv }ewb >6W(3oS=6IgMO^LL}5808Yr++JWI/{DdĀdň?ʋ3پ0D)XLQT#c/awA2C,;Goy :g^9\|yQ4W?7Իz!EUR6r܀h9onr$+}M̵;y91:vc|e#$3؛OMp˧FS+rS"=Qb`,^uZ#N7@S &nGLލ/)JF>(~e{TN =; endstream endobj 2161 0 obj << /Length1 792 /Length2 1606 /Length3 0 /Length 2166 /Filter /FlateDecode >> stream x}Sy`e3d  a8:> ;HX%%*Qa(Dl@00@Ԥ(dm< D=; 2f, gp|s۟W PUVxu0 , tP"Al ]+ ؂t0E ?&8LAЇL>03JP YL |`1`xLnb@l&̂x3G$~l`7 RGyT,!>b3CvvFjƚfy$` ^DNE ƫrГƮnB[3l 7Tk a2g^E} +fAuuuWl l8p"Dw[@Hp$]DC8w1^mm {CP D?C{z-hl3vz!E".W-ɕz%Dծn_n7uWY; 悌Vg|FaL@qߝ)mBQO/$se[Gg҂N9 Ǧ-ؼ‹ܹ8סm ðzWtUrRЛfeԢLWK*Ъ6'a:{nƅ+rcaQJM@j|@z̗W#ƳRi[-UpNVAm?̓rSrC@[d+[6zRN/X9=!{sm>:%NcPϩ sNNR9ʍWGrN Qǝ]{ܺܝƽ*bOmNI?L$졌DKgE1t/ 豜*=˅F~Qj.SOkf*-R_|E33Α0lIznR )ˉkӫ9߰u"3 cF>(&_g(z\Hs/}S5Z[d.Sþ!5{j،gb1ȩ'{λ E^y"vr;TjpSMs@DV;NmS뛸H}P1j\`t!COrT>2{"jGEZcJ:nr8XL.KS:v2I`SECcѷt{>ջ}##?-j=(pmZ>mϙ[wEǻntvyW)q"퉿<*p5,<"񍂥ԑbu$tFS94'Ue%trI|g`ŋOQ4kd61xүIғUx]\OIRȋI }'+cl#jEiʻE,R=D65οذ "2D &=UL2cl-"8ShmVy= 6?"b Lz'8+}E/L1oǴyi|F84lKe1%R+yXLѩCOT'>\cW*Ψנ:`zi"Cmȹ5lKk΋qաjeE| aÊ.ʌ(^)5^yn%5뇀~eyr)4˅n|?7@w2k3 Wpَ?8& endstream endobj 2163 0 obj << /Length1 1606 /Length2 16358 /Length3 0 /Length 17196 /Filter /FlateDecode >> stream xڬStm.;8ضtlۙmc۶ݱٱcZk㹫ꪺd)( :13r6F.Nv2tv&F6822GSCg)7@ jj `f0qqqD=JU%u*0ߛN@s[WSk;{S[MM3)@D^ASRN@)! 05u4(Y2@cS['S*# Ҝb 9 NLݍMqMmNN@'8.&k7!{G6}윜΀YDNnH;cJ/_! lO.#S o`pqښZ_to[{ݿڌoNc翹́p v:A _&vS389;)w*ω? #5^CX[/ cc6@kCT776ٚF8Dll03ۣUmMLWtLͧb4lvښwoe e%eiMWugWv&yCXEcs289|_gYCgG;@oɌL*`lLegC[.׻8kMMMVy-2ӝr'E{CKU kzw* kC蛦?=?G{1)zRL/|H P6;9hJz]-lCh3N**镼COw8\=Q>#6bt!7'<=R @’b&%9{87Br S FXAD|?m5L0@34M%sYI"gV!"}"u7S>_frbwY_*ӰRJqCZuøtPiJMjJ HX"M;h0ǽ#l|j+˔ F8yMBc8?yg^V\ OAQN ZUnമsgcM&ո(udM%pӠwad<9e׷\5@$ِ1W>8V N&lneOhkr2|YyND~id+ >PD}Aw5@ rDiXl.-QfZ龙 =dy=L߷ ZmA%WOj@{G%UbW.ɉ*K=x7_M%1‹ +QWܬe3D~O9V3VSYԮi]$,VI#Vt/[T<_u}Ɠ+HhY"c%\[h&x|L#_EjuFR,Q*}W #~Թd0 hKdz+j" q6GL0,ȢYHne|6|.}it)㇗H|vߺ@Lrd:?+u},`=*zXf^gBtw| ġ nxw[мvoM| :'gNʉ6ʕE!fP:&< ^G32Ж쐅76Kv+w7Ͼ8D3Î-ќ Cec-gb|N >yVbC7~:!&BV̺l?U"FAb19ב!y؁o,|zVݥsЈD+g\0ݱNj9_4= ۬&gnhkq4U9&]f z b02dҫ9Tߧ]1AyO&  55Af4f-eq:3C9],QR }[Tvך TEȻ bꐔf Z6GWK"D%qF%CX7.9d}tv!W Apٹ4KϊqxKLk'խ0ٖ^) Y <`6o_|& :jF v) )?-64~/-o?m-%M"LO[ZCS+bq˰;석 oνA,AU:bk{i ~s7,wK׏o(,x+#D# .Gfψ݂5DӑQ:[5UNq [y鸭( P[=ƙYBh]n*Y׹5U50D8WPNNzԖAϵ<[g^=uO$)jP͈B]!'‘D vvABCN SZuYl@?Al{v5đ *)WI)h{I{GU].OBdQhhHn^ԁsX,8~9å~:HUAM[YPzo$8꿩:S\| Nh0~ w&V^rfJs!DWҰ` z3#p4yӨ,Zп egPVw3`o.$29}T5)h)K;Q ߑf(TK&䲩!v񯠛^^#^,yP;28JfSdtRKr7(Wxr>^܂[0BLUdUğ . tڳTadh;iYM{s.T_49>RUN$Me) {鼑i$iD@'gtt{V^/QȆNtEb}FcVQet|mY-2F-q!͊=x}yHXXʞgmWOOWאvZf"%Be٧di12IlL|T?R|k3D?jðQzƈl%6Y4'L:/%W]l)~SOq۳و8wlp* \CUAd_}wx@Ζ 0ޢ} j MqEU"Y,nW^VyrsU0O:/]$LTbn# =䣧dpf&L=[W/\4JX?a*״ibxNIX3k`Vݮw5nD8!;y '\Q 0 JM#C"р73`DB;+}Tu^mo]uecK8SY[{oڅOB||;NhT!$%TW 0[U|F@jNL_i_!JvAjDǧTmr!*^bƞ'-6h%wmL"'Bg(umzY98Խh6V7-{9*x+!C?D ,Ws?&HpqT״bЅif&imlJQalBu$ ]C~V8fܱwI_Wxù|N %YDRgWfʠ^BH#5쳳1Ӫ/;[eOXG}cД dn`%f%A3 e|":\dƧrA< RBzԇ:'4BIZo|efQ{#뇚Eܭ;煉coNGeNJfcuUs_xJ7BPDKúK!!%L*>ƒņr N,VH-J~^_XC=\0'C> & }o X(fܵp3^R$Oǁ/n=`LG"ư CҢhy66q {>8 1^c V! kּNTo؛ 4tځ}KWWTs%% qh/K,d(-oTv77B*]HP4߀IF<W?X^ h2e1-zG6:ZTLiܥt#ϴ#m&{## X ZBh9o:y)*ȝ@vULr=a7|KhkN pŐ2HttZu`jdU#/ĸJ?3rm՜ɑ>SiSjd@#Wk~E16Y*YrMfC} C2bRڲUiVH_ W !.wc['c4kv&n20F =U[m $~FeF$bEn`Lǽ(R"ySԅ|ކɮ%ͩF{/2ShO3C Zuu޾FHu'aXtZ7@jk<6XGP !:NJVy?+TaGo^])\|*sUKA<wH]?? "C%=bfh[7sgQE(N\>4JV[FBXSzu#dp^~AišfQi#7=Kف5!ŴUg$##uxbS>XlaÃ-ϸJ͋d&c6S`C5%6VS=.8dZ h>us%ĚW+jb>a/emנbX );)/A,,er6Ȗ;wxb"y TY!*to]4 ĮϊSv>518d6uR@a;ũvzM({b3+B%3#Z{@ͤ)Vu[q00} >|O3Ee,m7kKg3%yqĆ!"'6&MX)„>rs]\omVx)j;8:k?Ngv>>f]`)dN*gp5}C cawDĜ&"%3\h3;1iʐ4lQL'9PZ꡺6NKtȬps#A7RL4PuFur9jLc{5̣L5?WC(k8BCNXw:ՠQR{_0 J1B2m[G2UVU;(S|Rw6$).\I!V /wF%0=  rGi+$ȕ`6GJ 7HvMEoZJhax[V*331(g~Bs 'cpˮ^2ekKa^8\c:<ܑ0=,1 ',<^sъQF7S\̺|g8t7$vNMGNLabU'r@8N߽9?fxsͫH֭y1F\=[C Vp|prZ hD,1GH#!BWP7diL:#T;i"*!;#;;Sk,&~ElTdH솧Vk(;*z Nی yQ1֊l]g02cֿ:aմZЗ%2i$k$EjU@4 -C}2ӕ˙Kx>?p~ |^WQA5p1g"d*qncN_>XeR4AB)I8}Wv2baҤ`CYR78!}ۆ3Hky T<&dlďٕe p+޴3f {"e˸qx*C_w 60I +cT$|xA"ՂSތ0'9if%i{S|j4A+jxJ%@[k\y2>5X)Da)K4+D'O\^1󒡗C-d,;BW~AzJL1Y830ca_}7TmI뚝X(Ev0 [^ $*8UB' #:1ywYz6X걉S_ D87yfO:gt9>v=_c;hi& LPlv_`zz9#mF]$]Z0u8" ak*|؃]0,ˉ7.4΍ œOA27I0K1>pģw!)bsLJmOʠʣQH<~`<$2%7t\2OBfjQt\4lû̀ќr{ N}!,{kvmqvQ)xh'*|4_A,UsL*d2[?Ăyh?^831( 03DeU%{eBS~MeNLFK&S>8 [iN1daTuc[;DCfGmS2 /~a3-;`Uuij-(jnZњEHfN1B }Jě] t4Y+r Z.1Km>īVBKuTM%])#EA=nFYLn^zn>T^ݗR.UK'y̮ܼ+fm;xwxM4kPڠa}`PN=š"N:vrQhĄh<Ս[8+(K`Ud-a׭_wlt]EXOJ<[HZ9Opw4Y+B`2?!(v'8f)$*)eE]QB\AAeȗ!Wm4(b"5q{rr#=Kc̮_ZPVbQ!Sa-+AِwZaf,wq)Gs]3 b-?_u\m}grf[PO3"punq[UXAݿ݈P7ݫhQo5;ݖvCbw Ђq}҅y!hM}?zx烔-iWvc7LtM(T|>? 8C+[{\.k93TiUnu`=Z\Lf]PV>/<8qZM8/8]"28=pE(3Fv}aunJ D%GF\F}ίcCR1 cHRCj nyV>jK'x00&!j;:ݒNڛV> s*MZC $.1bD$s^aKab /">0G4~+]d뱜bj\т7b.oᜋYJ<ƌ鉣xfCGͻPqVx'_ y$ yԺ.#IY:6HI}";<ݥ^V2>$ Tȏdg|/"}_0KehvL,%.hXlA50b]0]C܃`AJKbǣltwhSVu He;h+kF`E}&]T$8$Ul]33KYލWYYaiL{8uP|<N*G޽:T$JJ NQ#*Lk/ Hǫ%'{\22@m XD ׉ am1F9r]>\O)c&ﲦ Qg-uQKiX'cG5DHk зڤ-rڸH;5G\Zi{v=twɡ^񧯢NIi)0ӻo84  [lѳo"knU/S. g*u(y~wBTvWU_3X,qf^ _n}5&|r侢m<^T^5`S Nj#&l}_N?UB7ޤ+zݹrt=ht[ySqEHL72Y½Y5yN0?i#^PH;tl%]tcH&31:{\O#Xʭ>]~#ܳmnjs|f᯶C  6gĉ:!dVV;e0Mj|7{P%8 8ij,UT& 6DJ}9i5?Jœ<_T8xP2$)p!:fBzo"mENLGEIDC[y/9,C 9JB[:a64 Q-ny2 OfnZo=n锱a.ClBͧ{&NN# !Z$;% <RDҧϝZVְ .6C/É q5(#4%YfM:mb/siM%icO:f% ʶf(Ps>46{WSsyWhQ߭n0(0.L2k0Zrev:yx$:@khJ(_wS d!tY@SRzٻ+|[7j>F6' 0E7|O"$2,.'&ua{[T)PX3tx9:k3NW.ma4l?頫u,aq~$5/V =%gV'ܚol,1wTrCy o֬i>[#|j.-Y*5o5G,w])K3|)\E'*@B.>~L)Ju.S'\>Nuh!12n"_>S7AV#؇ DU{抽YNV~\"U_vڄ(I /s}G1i TW-J2&HVЊ:ᯁ(|mոo tIxԼ;mFbZIf@uBV):꡶>]N1C P<߀]d)Šm%zTӥ-vJR} Z+cL㜔-uD|.u L 2LǑ3y)sNMɄAfZC0'_1ufR{[4Ԉ1S3_ M]cHw%Cy7s^U+'a-q@|8ck_uSg-NV ߻u5{zQkWfu}MOW0~d:Y$6|7Nc <-QZ$Vv$x ;4֙4@⮶N (I@Yr,Zx8%Gq{QE5F׃Fj]FN^3ūUu0Tm7a{,Z! _^bgL睯9dޘA!"#w!.5gK}Z"x[0 $fw%6r+GXO{,DKTEf9}I;ZE QߍKv9 ˭t<80`D[v^0#e Jjc/4+ba5qHI>ڡ-6>עCPk=@b~?$Vz@sb<3a=yptVh o-|\=fgŽ6bg F쳃P# >@\xMuX7[S[yZWTזּv;MeD3zpkI~<$ҥTi"Tt * \\MA<0 /Ušw=/k"R=Iyמ5vY؉-X0L\®u"ˈJ1MMt~2}E5J1$*$\E~) kuՍXM' qFWH"9 }iaJns߽AwT P}]2: bk]-B ց9RO{o3u 0~$Dm;@cmF( iA<wi&}4;l=\bb*&U>ĔUMCTGg;绕%-tJr- k?*4{zRZZvƵNu7xD.^>Rjo2d`-ǘ0R{<_\ uaZ9{ZO;Bm3$DQ#_္o{@3 ~O \&Q9y\0s.؟pyJR:3f)72_HO<{Yt(~1LB}КZDUiìn7U.KyGM|ۂP],tW4hy2 %FsB`r4pt\[L4 UC o_x ZsD:=X~xL]g vyӷE .]]@Cth 55%'i{+>Մ?Dl!Z)" 7"5:y@\>G~3Ab~8,t ]qd1Aɕ;L v-hio;"rܴbiı$}%Dt[e0Uc?Ejڴq#O ɕ H?vxdrip9ClDS:N6|vȆGH0%7_bMH"$`Hdz&)p5Ybvel w}f^nQF  qbe) Za*/تWGDŽ"d&D7j՝ST.J6g.PֹlrpFf/`XWZlYO12C$BKh ƽu&iSrްD?QS8Yɝ!x)i QoMعBwAhDbNfOks$:SkwE۪W˺k`ce$)4kt25DÁ`Y脳䪘=K'DM&LyB4,ɉbآ 9Pk߲0ȵ>P;[c>4`OܧܶjdLl7\Q^@A(Vdb>%x{JKUs `i:A.nuFlD-ϦyQiG,2.Ȁ [;Mn]Jz]NiD0~p5<`#%ݯzBTH6P1C` t 2Qgs ~I!Epnn2|St3,Qzi/b)FP &f~"hSfjP'SN]a K3h绂Y4Ww%an;ڤx\0,Cp?'Vh-Ë]{>@3魳_Bj*V?^ɔK[{_ B '[QBR.N8/ ?wdJղ 'KQ`oץo\Ϋ*5ƍ&$>i!8 )pliAcz(~1JG-E !`_&s`6(Ts3RܪOGc^B/@u'`M-4/#؅eߨ 3Z%(`>TGF8b4ޔ`Vnl@z0Pf>dU2g,޵$nĕߣW UDgA (iE.FNSb`,!Nu p_13r?~P=(9_A R 9b6ps@ I"y(2k0coW>GPmD ' a$5 ĩ9|{?ˮQ?$ԧ·88`3CD'vY]hCz#W}RI|e ".?F8΅g#R< $ pp-h:&N_u]p %`\o/-^t[+^`oυ2Oz\?/Z endstream endobj 2165 0 obj << /Length1 1624 /Length2 7731 /Length3 0 /Length 8562 /Filter /FlateDecode >> stream xڭVeXݺ&N sfH)IA inK)~ɵD)k )B!pN^.1qAm5@I $0@6>>(6@wXu Y9%` C> F<<6N AlCDέk?Z3qۍ:>+u_8Be+cz=HU#d"Hf U(3ȵϥeqj0u\6ɏ&?(H}[>bOy\匵C 5ZHa?e2{czp G ϋG.cb .K^!JIHK6F:{<C>5R4;y>W;~ .]~LR+ۨ$ƌt6սsZ}Rp! %gI. OD(h1_BE[q'"_4}y >eW!Ӽ7>f'"GW3v\| #׾H1Z2AECD+ /䥘%.a 9 >_*z:\c%o~IM /ktF{yKlX6 G*|Z15~>¾~j;ŸԗS$+}Ԯ}Iw&-`Hifl3H1(c3\61.;UdoSC2^).W;ԆY]˟~-^>^\ [y5~HZ.ϲbk~#M@h@VS+~n{mZ@a\'A0+0|ˈ(ZJ>To.Imtng?'&5qވE~ž2R.{Ֆp8GP_f12{vcYG 2DqFz.".gJ,- Hdh¨IYz"]볲׉0(Z嗔K.ͼYIs 0Am֪>nĀ):JB1Lèը`L9zXc՝ /O"T?unŏs◻a-ΒTɁ$qʁ>{-6=dfO[$qF+];&3v]Ϋ$W!dsx"jq%{P>JzY /P>%cd8fm/??>+Qtt )I)o# JB'&MVvUTov<@-Qݿ+z^C橤ݱO+߰3 j^Ko_(tY-I.ڦkj=bxGj\2SBCU ao 4wXj_Ye`1~>z~=W]d9FR[E9ޱe-Sg1Cz$pi݈{ tLnx`RΓ5?%}3kc%OpX݂1pkp.aH{hz0OM qCt|0FG4^Ir(1o,)yׁ=fO4l\i۽>A2<@y Wڤ"Z<'9xo&eNw9,X?w&ZäQSW.iNOx+^e$YLݲ˩: VqU@8(m9JѠ'Tm8,k#i|%K&2}Y`wuPеd R3̑@ڿ,IU!c'HTo&DrF-Z9mRT[LnFW\}tOVe}}]~O-T8,<7O<^tj=WXۺ:;nվNa.an۶6=ut \Bf!93f+JU?>Y>2E6[4|l'84f[޾fm*KcMئdV_/m"j>qnDt,TH\myձ,$b5 MV~IgiKyޓa[z F+|ZEh?hf,E& L|oOxH8egQA‡UtSk1AdYc1/IBnxSs|:#*J)wp~KvW3Iy'tgdɖ5ņ$rg!n!NzG+E"}QӰ]DDTNԄLٱg{@Fv&[<;jVSLOf55 꺺bθbQrg*nي-<[h e?&Yѩ/0'k k,dV9w\DtN?\5_O#blDh}oi3L q±:R !͊!_q9Nz odS9wV]e(q:7LBNM2*#CKI9u6iT&-8=ˇ;b~^glEcNAI原}yUO(>ʽ=3|-{M Qsb,{Hye~k{3#S+ֽQqXzck xxl&KrƛkA]\,Uxz w^Ƞ1|=/`"y_~]s>ћ)u<ԺH(q71٪Ec$-#O'k[ASԊIHh@Au}FșlzN"q\;Aꦨ QG0E[vUPM[9,3v[E ^OAW- Ƶp\ֶ$~|:߲#nG7.7ms>_Eˎ䆡DDod\UQ㒥}zN0ޮWL;텊Dψv_D++$3 *9fpyzjΨo(mLr/NX %)lYlprA+ O;? Y[腒$Ť_!, wn4TǦ0(3Ao-K*E?O-숆7 7E0Kkov}*`ww;F[T[ :oЪÖ žo%hKFzYwX"` jR4}:xl!{8FHUTmֶd(UK1~yJ vR%Ы^7Q=(봯k>7KCyK#sM4ݝX+ߒ+{+g:ҼMK ^DB9]qX{H%Sr-X6Ӕulɺ.'xY u]P'/tRIZotFy_犅_{rrPrS|es,vuk|o%{e佭 *V'HŹް"-(͞J.L_#HOyS %zfܸ 4[Ú3 /YYPӵDvAt?dVy/nj;4,復pAe&K [Mٝ0|/WpGb"4j-t@y{CbnbKhGMǏ z,? y+3D\Aa"r nSH^foW*i\/gL^K )>Ы0Li Pf\ꖸ>:~=ȴg;0ue^|]I[{GK'ڥ/znbZ B&o1X$l呏t}yi@RA,c0) f3jLqXI)Ds͟Ub.ZbKtqT=N"9\+F[@ZSTJɎ,*#+'J\|sk1餬TUa`[.>+%Yz(Gߥk ,&{$t529(;%܏Np-W;H ?̋/ {WrKųD>AifRc+ gZ7@6+fĬMij l1-qZ!Q>'Cyۯ `⸀ fr:RIirWr.y:&?^ʊǨ4]I zO[JE]ߣl`XeSG\@p6/*e.8XrHyR`RZ WS\ ^.#^ 7})/@O->8RK UMF &$.W )[`i65[6LJ7- P?f^'?dzؤciЌΎcOr>湨B8JXx~׺7cHX9*(U2:^y^Ɩ#b}VCT@m 3~$Ӓt ?LR3ϺBNW:j\Nw;( OhTCWnlW׉=n akl (谜X2e*$cfiGQ:mmIsy1KkgeVdnE)d >aܔЋ1E10)FiOzq4W}S|VVs-U8;8CR>I_T 5W$a!󣁐ci1 @t3UcG#Øs]>P$+["(>oDZCS؜mAye۳牗)11߽SV*}O̦pXq@ ߙ8!~ }GڀLIPA5j QlYI$ϼ.?H7JCbIa lΔߵ<$mVR_ IuXb . 7± 9m͌)Uv"/13}'~, b^$ڣTP>Wx> J@5 !GVWz 7ҩ7-O?9NB$:;0+hknT$ ˯yKraa)B`i r>]j m1bˈJkhie17_-K|O&]0/7keJeN口VVɪqJ Nc}ISJW,-/6.;T$fG𦟪]VyjR&n!^ɺcO$.:w:qT̈́c<ڥECSw TeٚN ըuL˴ڝ}؊賰M1|CSCVxr `:wNbx4˄UxP+[ǻD0jNMc]0j!N2, endstream endobj 2167 0 obj << /Length1 1612 /Length2 19980 /Length3 0 /Length 20818 /Filter /FlateDecode >> stream xڬctf].vضmIwlvlculultlul۶O?x>~1֬yUu՜c- e53+ #3/@E^Ahk䀣sZ9؋yZ@38 `ၣ98z:[YX5ThOztP}q:8]B_oT@- #(RHƶe7[+S)H0wp{0u74ƿX".c#6wS?.z#;`ll+{S[7;`..VY%.Vfn/_^Wc+{+?L3+G[cϿ9:[18-l..abӝUoh_\]p,smaeϠ؛;Xm7ss>wD%al`o 01):M SO[ovtU4;`o<;nlgeZq5 {032h"ihljj 07۩5̀ζVf[ZzfIHΤ&.Mw꿢j(E-uf{Xٸr ƮVzKffWH؛:3+jfq9;U_'osAMVLB3bM:6T;tGl^sc_`˖;xOKF[AEwdXL+j^~ BY`gBEհO3M{A#iZ}oF3ʤG}|8X >clSdWo \;|*(gɭ1#W:"M"CA\8?gTs\rXG%h52L`a)8h[1 L `Z,8bf߳oY &"?i'6=wka߳ Za"[tW*r{'f|.ay,kΉg&X Sp8pÛCKx b?SlS~w6[cp͒ gҭF[obӅ_#h4`\mݷ')[@ 'R^HMr_̋t_&|%X:g]Ƌ%<3+Oc?Ty;>_(|z`kM bƎ؛.ȨJ Ae,ea¯鰡3HFHG1_hoTe\ 7պJPEvYDcv }1Dc`Ѵ͂:`98^bsB\ؠTW4J+Q|=%Osxegb1V `?I]}jxʏc?%BD#&Хh(my4>ݨƢ׍ܜqt|0K^pК,^%ZӜڅT3%YgTn@^ř$nT48ծ]QUJp)$:ɳfƢ͏a)9Ȅex&$~v%_0BSj:~'"u %5I^!6X<*|ȎZRUo&.2!i<Ƌ~=.w+2|rjOuŖۨq@\; j0$IkUp)f%3H͖։(^¯I!чfWKލk9S4 6}lǑΪ d/b1~ \;y# pvŀ4Hv4 :o &a ]U&G _oPE'#T+Υ" ٤Q~C(a)v[=_>װQƙ?(UDc_ uN4cB ~Ԑ7x(R0ۜdkX]Ku" YA}[QSsh'&**^ ;e6j ΁-y% yP#$Tԁ8L]n< .naPM|>L j/u FJ;=V񁡣DgJlOÄQˆ=#$3 iт/nknHe˭;e" Ry]ݛ.j, `JK V (Kf/ghS,fj逢erL57Z)Nf=-緅u2nrќ: S=L*bK`˜TbKjJ>XbAÛR4\_BpMma,u)Ψtnfs@>dO䇵=j&K:1}:S^D/!i˦'fOW@R׿PZDsѵSyrX(A)ίʔ`>&=8ڣ793nnyo|G D)!o!uhxB* NXj+ӣ z)>^ [ߴ<G>MEF$Ik4aنإ0.bdݓ`6ߋ6#'Ѷ"z`Z1G)AMP^4 706a=)h7<= :^$Kh H]F +P*vt[*yE ~+㓁3n坖6}=7yr.lD8}WpfBB@ejPv5*lH-͉b]b#?|8mOxDZV43<(-1DEUP'][i!lt":"c~ycfa 3}m>1E2C A9;HZ(fc{->h5Mz*|?J5b{F@:# .' >4''H2C:_1;>+GZ,Qi7iynzdN~Й=u)@n(vV_خkZ"ycDՉF)V [^]c[2Sy˟=-El.ЃӈفWSI6\<Zv@K!%"b{#`Co:#)vμP)JM J;^^vCi j9d@G9;a\մG$pa%)=F5dIiQ9"t]=?3QI4K_TQTK3K6 9Il636146B)JJ麔'%6+tz `>eKڍ-P N.jTeߴDeL"{uZl+(&>Eރh%|JUT3Mfxhe] tp@Vť,_QzQݏ`si|-J)QrЍcQ<$d Wg"bΉJ[12Ձ>e4[rYCl^ݷ:>6n?>ryf Zd*jn0Y>5OR#+lK}2'𒜮۳(  ^xr}|4ɷWbk#XFI"B-lʷ v,i {a:TG„qBQS-k#h3(uRx > <0(;[O܏6F"x}BhKs>]&Fl>w偏j+aOsl.G doEB%/ sozVH)MMRJMD\"YS[X ٿo]g%g+Y|يЅuNHTAnEpv2$g"͠]!E9v`P< ( s%nz/ۆg9~'}*Gd@)EGМ͢n/ g,p8s%#>܀a l.Lב 9kټ&{VY}ϢHi@21LInZj`AT}q;H@=\$8,xwFV7Ea^_l\ydmN<1Fw1S~2I/HT㨱P~"8iF>nl?灮@Pjp tЃ&GhOr3Rh}P]_j4P]ԩҢBq;NV:I_ B|R8x ɘ/]19ZZ Y&R `I;)D#xq- J<BLX@qO-,nqn[|iw> !<=p:AƬmN)*UcqcWP"|}93a";ނ4 &*h!TjB9ZY_dY#OF@hBV4.eRU>Z%BGo;C9đ^BLJ@:,Û><:EPLubTt2zXcYyؤ(_zh?!jv:N犣6eCaԄ,/Xs$0^ĥgln7j5A(;Tظ`1'Z;m hOάtw~>؈]Z jal}^)[M`l( >LBm9-7} V#M,p^'#"sOpYp p8 ؐ=Y4+h e_~'њE <:E]mmg ԀYK!n}BtWw!dpAcnsjE 3RBeMYRtD]3o yvTQ!'!XO5Vf͸Pj\ٻAfܤCH?24AXr1H*Wh|rGk~ZVs>1&LMn ~b$Zlğe C1a}Y;Q-Wa+^^إz.gγҩU9F ^xV~}w;£ؐU0(uNb{(4dn,(ԣ- PLK?*./Kf6ak %.ƒgL׺YfŪGWG9+-t aCVZ5aI.I360P>V~hc)a .ia-~d"k/ֶ@1M }.yAҭ]E愓$ |[<ƮHtImqv6Tgyu\-!iIa@J<P˳&leIh W5SY}`dǝu罍:WAZh΂@'X3~D$i*itoS k]jV:|D5ծ݅}pۣHA,Nj+cFu81^ԓt=DzNڲʮXF+1 ?njiDfhd"-M{I\b/4̆ Be񝘛w7g#ܸOT/\Y3-(4$w4ڑP,ጫ"k0! Rl8-L> 48k%{xF+),rݓ~,)(c>2|,u2VcB+wšӀ bb<&_ι{e }\P ύs#mX~u{`}nn~ģCDf3Bj8AH~-|PFܕ[s D$s+|%zhu\D>M ~] EH! K~G/scN$dZ}4Cf\ yYقxZ`ފݢO 7ΊYOnzfC49⫸@ȄQ*߀ xI^b5ζ}1EsEHSO5N b #&"ƀE]̷.hXrK+B.ZkAr- \O>* vQƫJx9lK=uR1i$Y˒:FQ 7 oqaBkҧhtۇmja'z+.E4!G[3xhQ?5K qoB'Iml)6$9vI4dPHWHm]D쯾ۆ`EF /a9I@* +/ Bb )=墴!q vM7/ UK֮8sۚf.]X|U}3Z~[R8Nc.':7+\5.N#&GV#$#~%MuGI{ Jpa?\lt o aRͷ; S',񜽣Y*SYP[_?8#9xDbg>?wX-KzV,ϺߢJ"jy%ur_ٓ6|$֐Ziw,B0F7w`yi/9mDĀƾOi$+mOnպQswfN/ \v+zmCWv ȥ  >-{;V?Doi Zww]ӻGC]{'"Y!~'oiB!b_.;".r]C@XD>"0Wa/ruƾ WL6_it_#lF\+Dh *3#Ņl NI76i#K SCjOoO0į%l4Tr?rD?QEH~C᧮o[mP\)vxZ:L ",phɎJ%!ovl;'Vc9BTi"H.W# ݷVT`CtGg.+ e,ʈU{!JqX8hΗ!Ro4Eobmy6^Ӧ!\R:賆Y5YO6|seă* Q~C3zȷDS4ݒaUĺ* &5JH6VQVUVac:\c>v\T=~ F2 e{*>fəP({s^ag)({; 1z2NTNFづߐ΅ٳ5~0kSMkо6Lસ:zP6J}4@wd{URq޴"|9,>BYwtZѥ i <=N=[":$&ȇWmJҐ~jJ$| b^s]KԊhJqt? YηD"~eg? .)R͵V$g..?o ih7Bzgvn`_bMDŕ"d_<dbV9Te]eabv}Z6sjdxmkyx!ǼmI{Mä3CՎvA馩Y椩(t֋~;@xزfF=m53BD簬XU@ 0VRHR~ vBzG@ -y35Br.Ud*8S޶%+{t'~J2K{'Y`BNbfT :@.(QWf`D<:/_ePٙ{)vs;b#Uz kƔ{J;fش׼Y.aN645$@X"#A5EGYƳd|OU7p>ԛUخ޸3͙箘Y9^YM{0*L1V7bJ$/q"{}IDʥkH囼;4C1zg>47ZxMiKI#_$#"a{,FK 33"ȮۍdЊZl4*4yg,VCSUBxO(4F:{:`F:8 >O&IY[*PH챲 esor80 _v IՋ՜:yEw:fdE)F@@*Ǝ GTEN_B,mGEC(Iq;8m aEs`4$r֐|Ӈq}"ff+w*~|4fS`;xǺAy赜5@E)sfO=qsQ`P x]cSlI4TaʛGpI+OT( :4Ĵ\4CtD $1N }4 gKm% *d"; l /q[y/U g6‚t-%|.5&6#Q݀nwLB!0mʷD_>\aP-Q[4s0 D xh"Q}hâ#Z-jm H,NBE L4 ߦ|Y.>[?@Jm|T&˻=k :ԄbVz[pwG' zϦ5#~+aDi_ ADdL|)$HmN eƢzgˮwL:+|dERە IV~mm?D(ݳn6pzΗ Ԃɡ |N2X330ʗ^Wa4 7DO4&_ԽfL@Hž`%.щ Vh969IeIpmbKAKL>3nayHEZbrhñZLVcetO*Af՛|ԳHO,W18/?)^mWPj9G8DUryd#lޛ=~SW[ٲ[w`RV259n$eB[&߂f3!h~չ9 ~ݤ/T4ҖѺ78&~W$*>=I7dS|SB3nM"`D+J`b!>;?uԒpy(Ĭ߇Nd\'+z[[ֻ#bZgBQŅayZ[T= $?Xgr} eov5;}ƇI@E&eJf<5iVOJF$7 X 9x.NΈM$X6)SkSoAHz=q~3!L`kT <-#§T *UdƢRSR= S.r=,Puv#buRe7{ӛW6Y|2qc@+N:$r(Z}}H7).&Wa}:}q蓼 ޕ[rJMY Zoj!ĸ~zry '6z̖$^zp('ugT9oE[ $bF9ʍߩyͼ\T hgȰt*$%Rutcy<ΒeXw0(Lzfa o[B$<ψ6$-A2H )L_eDZ񡶁Eln@5#@yɞ"hd~;4$u6mָN\phfԅC hjrP~Xg8h1^Կ1y9gmjL{vUqaTi+D Po ]Glx W~A"P؋0eL+q0W 78LRқ|Y%=@W)1G+!5F'*= f]-<6`^WaBU&A>.wB0,afnv:$GZNơ@0LIUu1"kkcdqyNأ=̰;{B0YresO[ 1Y̿A<r.u2gB,wh v|0%ƶy 9qW&R['{w;u%5C:]UN%|edr;;$<'?AԣmDJ'b,pEc{3?ּR:w6K9Emr6O%nV[{6**Ŷo_R .0_ ~L[ْR]s4 !Xh IPCE$+{j'MHn-2tAK_ODZ=fޚ_R"BxŠE2 3hiR뛞h%k尞:7EXg!O/=v~1P>L[;?:($<ڐDε õDvj(4D.sf O_ iUTfS/ 饀Ut\=QOEЯFN9O=$_..auDMA+撻Ɨe΄1,'$lpS}GKX=́I3,Cדy;2 ?5kho깞%ŝ{-{w]A &12|]z-^H12,nI~ZEiBS}jYa4=\O;L"&7r,6K9O.VbzQK[(QK/XCR*0AٓÍ}tn[ێ})j*[$Paf.W)q]0в.>X̓8]߬'L%p^OSd e7H}~ŠwN^C3-Nԫ e+DǥE&b6 CWo1HK#K,'xb|VďIW.26κ_qv&k2iЄsD<}U_Lo𨩭 q /#X {81rYnH,s(U~ȕ-p%& ǹ'{p//DQ){!t_|q\O榕h`Lcg_ꋼ7}_8GcDz(V 4g>^c)RҏYPo2;XJk KzW9#vŃAkKw_9 `ν "b k/B5321dcEKhc 7b/&0ar|O4Tu)=*cPQ8?|kف}e;/K \-qP'J'iHkS]t|:{4<,) %s@I7-٭/fL>(us__-[֌  *ؿ\ǹS"C ]vj$UE_M{z SyJ*k '?FmY@&a;숈'zBkԇnWBub%lEvF%9'Z 08Oo yHȔfd|p~b[`H)8=7{zl"j̲w'R/ސн:Fh!g=NF S叞A(=߭ QJQeʢkH>+5vnuYVJX6XhC?j)k 5ָo Շݹ{y-GDDL>!%3jc@N]ͪ~;W(5%Kj8rE{z[;mD>656֕Rj;"-Pr \ӄesy?i OhTZBŻFm p-u.WdЙ/?ܚ4/Ę]M:fx3~Y@-SEvBuv頡7eSԟlS|L.vZm[ TŃt~n{or~!'QD X U4.^QD\ߨޥɾsJ%XXbհf><7R3h67x q%)5윌(p3l|=͒w[,~J2EO=hq‘,߃ G4#qxsh >6)y<]Pm}J<6j@53(_IN,P,!57 Zꢥ1h53t/j8*t1"ŭeA*w3CP˄dIەT鲦+ԕPfX ŮpJaE;.ڞR&%a h]1Sg0&Ͼuz\L6gWME:;~ 3nJP+kY˛lE.PW ,<zveg?<=ʪU1(=qkB4=֗b$$qA( *tLVα؏3GDSgꦌö`j@ @~ T=S?"7;zŪ'F/؊|:6,wKikfNVcE<X֮*wdRn-R] 9lk MwxLR%5ſZBz"+Uo 8`U' \BX8dV.|Eီ' 8[[!\;=<3q*Q$nP a9k9 .J qXRbYMj ۡo~}7 "$TFb3 Kz#7v{ۓQR'PYL|n0 0d;D[d#Y=. 2x`R0k U&s6Z\V [}`i[P)z3]]ֵjg7 $m5ז ,8xcvGf=h}~\Kf$i6t3 Hr."%֤Ɇ#A4 &闃pGjjjY‰ՖtY<c)αGbkViSmN>fǿj_1YC|!b:`ɈI_M`eI$N9jG5s$5"!%_^qfXWTDX`4ß 0h8j>./-^Q\E3[gbz<`磗qJn{ PPTɎn^&~| kP na~`4늧 \QW@U.>f-2c6cb:.A=@cX=8.|]ZNcqdKB5Qt,Ű6cr_xnW0hcJ[A ޛ1R(ucwWBTb=Ȫɖm$D/W%aOcm"P^޸pS@Otljڤ3Y )uK;+nvۻWA8@}d?݇br-nqaW|qB PB& %oՆrĞĖ6 <4I.BO>raS+{"u$H!)ҏ~ZHA᪱sk@7m\2S'k*fcDI߱oH,X$Co5i9T⟟dq$ .<~T( HK[IxbMdO1YSxDZji`}Y&楦MWgI=ao B'ePMNXg #̅%j(,G&Q':v]>L+C0w>l@pL@g!l%z+^5fs'|Zs6S>:Ll{W[fGI~/&*,^wdQd'FZ h@~lݰމvHK'*<)ζdU:W-Wѓ\>gEX* "+P…(7n@廩VKlZV-^Y3E=v$Mjj16Z}o 6 #:% ݎ}"BZ(>GD\Iǫk7G!c70q oDttߨGxo{iy(ajO^aѵeshMˤ*%n߇y?JQJ)NU'?_CM2+\tD-xy[=sO ^hg%ǽ?Vo*d|MQ?;:ӡ,[}Yi}B`y.weVѱZw v T$+%!!'N1euFFȹKo|gqo ?8>[ש[ŝM/N,V)_0-d>3GSH1=}č(w S=m8a7 `!T @vٱK%" daT9BΏy!de?VĆMHz\Dˣ,PS'Esa< g~=ѲA5=pɺ`z,TTkGCZ" }LRvs~k{^o e6)rm93b6_HMBM]dYr9)0dYy]JZԻ>JȶePAJ(qQ A<7v]2:?a3LW[A/KPJC\Mg*f@cZVaҼjS60%6馓Vn&2RvćvLm Q}VS~)kp?@45`=?ȝ¦: ̠WO}9)]6a<,ĠAeP6!Q^3k}9x6^_Kɒc`#,!S̈eFan> stream xڬcx]-'ۨcutlvŶmulضcN~ϵs1UEF,D'`lkqcgȚ[:;H)M VX22!4LLƟ?’lM͜*jT44e`HGsS5/up2Ḽ!9y Y1 @ ht0;m mnqRLlV>lmi͑/#h42t3掎S3pY9S_ saK&oh`nU^Xu:8/ 5ilkOKE mN@7rvVs%s0WΎ6U-hj`lttKW{;;+E?k0wrZ22i7 Eo`.@ 򟝡[;hCoJs"H?"ow}ԢVVߗ -c sX8k읁0ks+CwTa 'C1+ #=ÿ探n@cys'#3ߙˮbc t2_c0e3s#KD`71_PT?ݰ Nv@J&ckxmtl:&fv;; _4u1pr0wh1300~N:FQr21li6rvpM_k`Wl,R3Ҝ~c Mk0ە+Uvm olu_<ؗ>N^{G$og9[vy Ơz3[E0sD%(Fr3G}<_ȸ |N>!_]]w+[G4=!,f|ʔr0FDn&IMى)a1cJDgV!@EFIwQV|qWx  *:{5`I\~ fzScv@} Su9ZPpa43%!DM<64^r=(cM%4wƸAt_wz'GA8,Z}4^B4Ճmr>Z%F)'APvk6ڛE5v:z)4p)RH{ ]mKD^+E@`SMUXyэQ2A_5n)pT6qQgoG zu Y评銒ܛ9uN3+3#7}1υ: )`>^' e_YFL$3f>xt KRu jf~Ln _P ~Sb k k&`MhBv"UUA\bf` ;[cABW^ؼ'˳Ӏq]@DXG5'J7R@n9lw >wK|z 9jx6y6q5.C:_t[6uwR׃7;V_4)Vc!l391soYO4Afő|c \9j?]rac z+v_ {.1iڌ#*;gej $u݉O$&,uAáxw iM.w@x}IUP;břBcl_w[nPQѽ^{p?t":D7OG~OڡCmA ԬA_jQ^USxasWw w~, }q2lr- XlVK!:UCWO"shEEE^wTtǂӘ ,Ngʴ]%C \TIb Gs7M{PjO3|mTd,b@KM#`#Ҩ긬9}طz' /tN Ĝ6Xk)ʽoWE`z[/&*{F?W2nn Q^_&'aKx?m=<Ȳ2楻mt"`g]7byCh\tβ0ݳ`#%7onW6Iا:"Us?R:85޷r:i\{K$5b)=_?F݈&bč=.$KlCMtܑPΰ`3qm~F-y㗰5- 6""ԃNs*l{Ce=9] pDu6?{r9?sx2p.<"85t#53qb?WSԤ6x/!ML 0(_wo { ZC$bXdhʵZKP[2gWܸy;PvAeofo ;~w'`-GZ &U@/]8;bk)Q":Բ"; rXbϕj,cW*\iRy[˝H wn~J]=W;Sg{F/k[ɡM`QECsTNѱ'LB.)c/wyQXnꞒ@U]u. ѲnHrS~SNTZsk|*;%5}8sAMU`e䶷J ?СAL昨N rQLٔ}m&Uf(*EY3,rE/b5ՔߎU9j]颰:]>4PA`ƅjQwdmBSըFy8 3rUTYw0e+M[iCEP,Cmhҷۄ |') =mnlhf^m؟/kHnu2љ;-'XD+gCGyed(a1 K JƼo7_}7=PAj!A}ۄV<ϽJ q.R6i znZT jY_,xfsZzfJ* %(hU:dضR76 y%򵝈R蘁̬bY+Ahaɏ5ބϧ<' T*gšvK5DߴīФ_> ssa{Km-*o_?ǺO14Bn @o@,{;$;+wN)y4)t`zbkݬG)B3\O?T\rL<@Ȝh@D.?85nA.x'>^y󍁪jz'쒧E<5*wc3AI_ FYi>ֽNЍLc m<( 4<=l[ &FD| [ hɛS~ ێ|DJ9^ZS:i}tJGɣ>̋ԯDLPovh ij_zS[9z;c!5-̌a~lUo٪dWTZg]Yhc{B,58<{ \uM䡨gܘC"ǹ.b'+z[Pn)J0P(?*RI#3ٙ.; -45\xS&–lJ,ijLcm); ޳U z,Fn/Aj ؞oW/5ޓ.v۷2]:y霅KcPJ&d2d=<Q[-\噙dm|K6H%("[>BHZ!'>-XܜZ}#~LM̢DOGW!>rk)Fe28@npÙɶ;_#G|z<1rQ ^{b/]֌! 6:Y%^  Jd}QGa?6&8M)ۛ'7vT3+46m΢1DݾH10A0Զ`NݰXOŢ@bho"wV# PK`oo@f)ҏx8ѲT۟Ɇ2Jvqӈ#~K`G#S'>`SA-6.0:IJ5"i_\gߗeb $Ck\"ׅL+S<4j}!jBrޯ*#ІU;49MSQ7qE]Ze@W?~kƒ #&xZ }ōx.Gxeia"f\g ocvUSBb@8E0phhԱZܕ={ŮAIt{2T{K2 K]+%BndžbXtlQu (59Űrs((}->#E{4'ZA(rNV[c IpꂲJad;O\9t_p\CR+ʹ߄hsՈa f9PV^psTZ%. ff}z.}/иR}t%vp/m.9$#5SPqJ*zC%\!(\#ڭFavek]n#=tr^-<A-ZiosAe]QMW"P.#5v:_m`AXLqe#DֵOHD8鴙j#2 EMyYIUeicYoXnpR(rR7$\|`TP_ڏ,kXwlG3BTcEF"j N@1(@E~:Jq+p5 7C# PĬY&Ab324BBhrfy=ڵTu6td 0[Qu7jz/I F(c8WuQQj޺[`|%;42Gaɋ̈01;$wxL/}+s3 3׳NHgHڨLC4  W^Tgԅg ׿vO^D6rwuxk_x%Z]&YM)Twzi؄Rek1`ߜyQU~-6%+^lwkŲY`46[G'1+fu{1M!pUV`ɽ3=&!a"Zi@ѓK! B;7gr qnl5ȓVͳپJ1F@Ӈ?~Ο λN$joPGC8YaiTpN~]-G:P8OX:ye;m? K񋼹υ2%dGT8願LO3g/}Wy! ho<*E +֡L l෷]gbQ7飮(_+hVh'T=}Q|< a> Chf)؛/ Y/8¦yEP}$]V+'7{ 3~Yyy GђݢV8QOSA RMfLjp6qsPR2F /-H";  / @٦cDQ"Amn \$pB eCCtu+)ZULWI44y'+;wth\hTB臭:YҡV2#BԯN˱B GW5=CrȨtLv X#YW:uY`xJj\́!EZnTaQθ;W)*^/lW8̌CIÏXor=uG[P{Oۏ*c*9i^Jyuu U{E_=D1MKѕ$ ~~vHh?Ӄ(UKi\9MK5#&&!!Wmbt5:O DwH~Kk 40>%W;բhCzaǎ3|PK/'LI?#5Q-Gep4ꣲ 7΍·^hl-9& N6lBc#-(>6,}p)BHm"l7Q +]GxX0*#\FjnIDыƻM hu|" hŇgy?kDV,6wrm =)%rϬPC2K8hAWSެ#ka/vHQ8ɤ`Z͢ _00돂3$.@=ĤbdD+%9=5ڪhN邎[/LU;<]k~B?/Vƭ)- 'UWܢ[wo{L 5X߅A3Һ0 ԰kژ&Y.9=?+@*8$ԽNٔ =ґ _A[JߘvfY:nj$(E-p§lMo.s¶s^7fu:^rkQ莌\ptZ!lD:ϓ.G~ ‰"^e=?Li;,.ŁJnj^e P'/Czl:Ua`B0JvQ ;%QJYqTܗSWpSo KOvT&(]5[FC9#@xV],z*IrH1ܯ]UBZ6zJ)2&\.RdvfD#o UQ)&9CT#z0*= /?.k$_D,n4U <zZrBׄJ#7z0Eb{Gh~ٗ7'Ӛx, 8jRޭc}øDv# SүRP e؝Wk_H ~0QʼnxԱ72uoVi,B8>Un_-l]m~h>?Y5 :;^Nj3mF y+\oY Yų ig[>4 EH*zKN7 7S3`%+r^kVН\rJA6İsZȤV`^W-! VhSǜ_/a͌e[YK8%F+k+H9s~bh8~_或#*vU(,0{ -~zz l:ꊻ $aJ+UŬY^ KsĚ|…IoH֋pӄ4Gre/d_'^oRf&e藥/m=I9LSt^,U9}Hl#SY%i߸%Ql)|ɃdEUMqsp3: `.jsG)19+Ov'no5(v"H"J,{xd3ٔ 4Ӄ%$ Ax*h( rB{ IR88w(Ihu}j 2SR.P$N 6elYf|;F HYǶ16*wJJ)Y ț254N&{_.Sz|u\eTmHj HNc/uAGNuj S*8nmZGT$$oHJo)01{x̧5kx\+MY,nU7t-/moчpOdDjFhIGbEM&l LLX^ oNLmDŦ( et_l(awTDK}I3XK߱;N %Ud`:"Qݙ'9GAsLY҆ma?P 47掗tQGZ;q3tTIm1u2cQ^ёƊ@P^{>v_ UC)Uc%fҎHO^&U_пyys)0ˏK1WC:~}g'䮰ls}<gc!'u{͕7]{(\F6L0T~?}n!@i89QgE jnJMC=w& +fdRoqV~ }F_kBBWS#d9&Pf.4aʛ0IftGa pEmͨhAauB7JulYtiDܦo;#z \rw%\CLWHl У,ئD#ra?>Üd* n:kQܖzƄ֕,8R.[]ݳ; (O$`jHPp5ʼnOL`XS[SP΃ӟQﱊ m+ec3 Θ Cv& xi CHDLӕ]#p&C WxsL!`,кH0QגeY6ȞJDx^eb^:t dsڤ0[R^Th ~ ` {1Xb+oT&Mؤ d=peһO ڭ#`H՝VSqz[>'c?C~k|,KhYhR$NkDvVXk58\`[2(zSGR +L })WN2vΆQ`Hg>&/@JIڔu*Ȃ ly2 f}J:?@"u^~*H#f`F0RBawnW$ l<%g$_6cyY!^3ih/ b(arwz arXA4p8ّٷNuxXR'ޘvC~+o 6XTyr }pip#?_ ZK2zDF;2q*H?4:uXvZ2>fdk+v>U 7Q`٫&:dzT'F9U4yhAu,u^ʟ% 3r)1 ~4DŽt#4FL7Y.@'sF,,&WAyqͩVA=Vq Ruƹ1bȁs?PmD5(# %Ƴ7S Yv`7^R{*pJ3!0G=0LV:: ΋RXbv#@Vgsk W1pB~oiA.h:gT$Gmӓa, ]ĺ9TJT˔vJD<cFh7Mg*h?Y}9r4XA1 )Lbǂ5f=UV#_gHPΆ 虈')ל@H1nHL7ˢ%x25A)sAt":Y\r۾2_-5f3d\PLݯۄ=½H/I5ת[ Ґ(ȷk?H_2lIT솱)e}11!6ALnJT4V'hr)<d6Mq;=Db. e2isi\Nh%xC,H5˱f}ɉ}&p5¼S./S>M00vߞS찏uY. nSiQP+J䩅֐m<=V#lhdPel ";^Z'a6$zv38.OHԠ7/_ڮ6TTKu}b͆ƛl{4C~͢jt:qjBHFNWz&N0` Og.ɔzP L_beFܳ~@tڈ5߱;.u#R;l3 ۡ7 Su*uhU⏞nB q? ^B|:̥ 4h^4%"k}7 yoi2ojad%ut_\AZz ,pyu'V4l$Y:|$cQy:pW젟pKN6FY=P52r[m3cL;aI`H =A4ǏTjW,J1,ȍ7Hņw?3oϑr2D`ukF6GZKae8N`Ձ}\uA'h|Ab1FY)%g-}A8E!VsOE2dL2<DŻ@wͤ8/1HT+|ZgfEԦ1_S=-+n쉉'tR:K1uX^4w˖̒f3i5D#Lon\$ E{m׸"5 R("gdqi) rSffM֔KY xO ZN\y]8+sZ蚴_ihGkeJ |$}B׊e4@K56XH붞s63Jqx|nfw*Mr0F(p\Qץ*Xo?}BO+>"px #9jg = 7VI[,(bOR3I"^kKJϗzp`/=I?##Ora> stream xڭwePݖ5Np&!KH,;ݝN3No~̏zkSՔ*B&F q[#=37@  ZޜȔ" -XhL c  bk`afAMKK/_)#XTo k[; |P8 @9NFY c:am&axdW`r@޾6G[/o~Sۿ 9ؾeؼm!c ;G[UEQt4:Ubؚe;߱7# 8\eX@쬁no,dt0A o0oM_}K@;;kOO)23[McǷf`dƿE lj `f?c 寝~#4[L@Ȍo%_g*3߉ 'w%wڼ-? zc\0@ocIDdhhl0Zo`miS505tC ɿ3oތrRC_¶zfNV=+ecbpqy7b-ttp5wo0b`c[D6y[: ;98)mk?r#/X&8Vet1+S-9x;CK4`?A9^ݹW8iwR5=fd9w7G HXޝQP8|C6NmǬª;:;;4{63 pDfp]gB_ɝ}ܸgJ']!"ASd>P%}Ci1=ƀ!!n0AX>۟b#v?NԻxz3M`=%;D/oĝp8efe/K + 3f Snٽ͋\9Ƅ =hBmTcbCQZӾi22HyD2ZMCBe`F&y @Sݯ<+X$64E<)=eQg{h*yP9rtjF>$AǏ(ԣYhF-ow*d 'rAC~#j}-i:`ͷEȶ 3C4zmx2lXQo:RaN Pv2}! 5lt0*Qd/hIO'VX PAa|a}e϶ 9oXB(l}/H,(N(9&4mPBOS7uOUi3H;ei!o  z,]7]lȐh- 9\C3R'TQYpVljMdr/H% Яxcg2w'ApS"'X$ m§_^(ysm[_ΝEN^ЭnD:r5601̴iĦ8߳u7>Y*KG0WW,*sXoۿ'Hk{-z,@"onx;} 5ݏ >Ц]896OX6sHΗRk#nɟ\Dz c%V_R} 5>&Rk2:П8=i˖G+t Yq2 G*8Jخuզ`voDEhS9H+qԕ8 5$% ő()G ]V3vqP{l|ΰCkid\TZcD. i,IltJ4GD eIQ 隕挊٪Lh';: %!nh I|'SN 4ht1;x񣩤k9!e\x.)`r>nG}sS:0۠lșV̨+H) J 41"YǫR#06@rKhg#ISH{o,s؆#Q[gSz%vsdz;#S n0GW>b*8<$a ;:u6R)5A4:5ZDE l[H$$Ưj{1֒/_OxFU)&/uf"*aB?mn0ڙ B n2-_Ɓ 3sbE=qS}m{9qSR|8ᡋ%tNj\P\gDoOLb% ׉n?n+q/4V^ :|^A_3ShgT(;U S}夝HDO i \zjڢЧNu6vj'Ǜ\4-|$҃"*kuA ˹a]tyK:gTr3}*g)aβh@yF64C-w'J옎Q3.I`|b(ڞeHiU~F-aEl`k`)F鶰L/7іmI$olsf`T!žLġkG2=[OMP;*ŵxsVc}6>]wa\&,ak%=Q_e@**ܗC޷ GEѐ0ng*XSsIG`.D3ޚlPC lcy=wVwȹ&pWi }0u'܆ ]6os2~GG DP_vm߁m~k~=˝YђOԬ:H{rqּHmSQՉ.i|zPy Jr[L c۵|{gR-5u7 wW@oKA{0X3oT $,G%6s',SxG^<`1"2TWM*߻aqۥۨe(CgY,d`(kJҴJְ&*Bʬ.QKKsͮ@\(MEa% ѽm`#a@;I F*{9Wws!2Ҕ}s^T[+*(JC۩Ct&1]FDؑ\'Xt Q"$#(710I;'+^ήC2廠Ynp_ZqOQ;eϱLJhˆBlh lhNh PW37_7m1DI{p};9bа^k ZyEIW_X4Lu#Zz#щPհS{c%[,P.H:p#=il/`[ٙP(v6Ҽ"?PeKaf+aZ(cDm):.ž!ʵ*f7-Qʔin|rW";̉+n!jg0tQdT<dSXFr",a:sqN:[)Sp۩aZu X鴐mxA4= E|9B\;y/~]yZEZWޢ̤Eۥ>τ^uoۭ}-q+݋D4ɡ +:,O~tMNkJ(O@rjeZuM(C%r_%N ђup3OFrJ$z1=:`J4#/S>MgO:NPip|ҝ2H $ˋxzz\h+d”+wuCs"b̾ {Cm8g6;LT_#{6KZKgؤc{=}DQlY>@q ^Y1n d{)|W(oY5o 7l9cIDzl];-r;ѷxkwGdq3S% B4wپK`kYHAyl+h{]ր,JQձ/3e[RH̄v=t _ŽdAke5zq[gBe@R۲C:/4+2r/{J@X5_L&)'gk+?zS*0 D09iUe?d1qHp0/`TټܩJU'Q:sܣjߝ9];iG-tL&E5_ԏ)9n fkY!Ulcȅ(bnSbCtۀnkGۖwL?CeP7&+b2oҰGP3&L%gT"/+-c-$t [Iv94,yM/׭["N[f! U[~8̓徃h"TB4Ko*,H-i\TLQw9v?n7HhP0 XRGM Xq{DZۢQ)փ>92,ҽG5J竼g!M۷O13@Bd"O5, 53שL[ĀʗK +RbXk4v5c["0sd"2F;Ou-q ՞`M[">%@P#/:j SZĥywN$NRh{GZ' vje/%mo`߭ssFyx!idCfhx XN%qirB$Kh`#}c8(-"a$]% qaB{mGޯg{~W78b<[7Mu\x{$[r52i +Xqa5EH1%eTբ] oEbxS,ƴR. TP4s>r4t>VJWL0q;CS&y/ (f `m (\SFw.ᐞFȐ%ٮVE-[ }!M@m =; ^ 6h{4Ĵ4t'Ԋ%B];]&)udp j5C\ ) 5و.lT9>W+n;d. ^AFBF)n ɒ\bL|փk4 B#v6!GTgf*ȁ[?J\[5uUHN3xΚv1#PK,ۍӳ>Os- ~&v0ߢ-a+簑SCx汵qԅKԘ>£ ֋3~.Q9[˿#;>H;yɚO5c1.t؇Czf8nj6ÑrWׇu:錑ë\d=S_DÉm)߿7Jzdl3Fbً,n$0dBo}1o0J5٣<5יsKjOA唃xCt1\AxmA -Nxxl;eh'NGk[* ~3V/a?HfpY VuyخE 9@\)5u߭(U8+Lv ٙ5y@&P6ћ:D 8yŅ[5*P/am*-cݭ@I>dGZ),VC[ܷuܰVG=Ո ѦTWkPzvI#^E?O*iN0xg onLW-B [FtiۅSԃ/ l-j,~=No aXXmeHQdq*IQU85䅾9 R_/Dڧ=E8@*Y¯QWU<`s~3 zIr(/6$?4& zpLns ye\8aYnvjSYiSZ{B#=_޷.^:s8"$Ukp4^MȜ,XrèD<>z-b'H-m#1rرl{ggT|Z<~I7 =2V"ؘ~fԓҭlnNl% {",{N'&mr]9QS&v|?}۩=ڹ 1^Ib%o3 e@EnYA퇼P/*rm,Y&%c\1%aY LP}FEg!k|6kT_=~Y lW> ]2|Ut,b(BÁtm9~kWb-^iWmbHHa0x񈒱zWeeVi<]JBrx ;vdO [P5߭ x74ߝ [b&Bkxw ic"|qBY =mZ ܅,IҹY"-Qch990Q|ԛ'?, nv_xT#eiE2Uj#̀+LdXTMUT(CL^%4gŝ1{F{uُ_9H )"[!)G꟪Xml$;_(`])c6#D~#{Acx[V+: łF}!1sꡑQӆVfrrJ訪|#ZF .U9 ew~/j~+*'XDXWGvZλuSLݏ Ǯ1j3S$;HtUY>dDIJL=ܫZkvj!V.v:Fiiϻ< $j|}1ޔ_9u[v^']f yHNtꋼ-c.H ͐.G}EKҨ.* =@1oB9ϥHuU)Q4Uah8Nl0Ty!FՎl 1.S)(CH#WpYvƖB?$:+[HCiM^p6t;YON{2)<`{'2fSjp~҈ی gc-+8_-Q䜘w4ٝ8utG8mg巚kB81R:#Mʜ ,">a: ?MpH>׸e#A<>!$4l?YjS^Lcdp%,mE]]%\I "ULf3E] {D&7QH:I s;:KC3m츰C%ɮ8U8ˣ03"^ `YVTtNM&Ȳti14M %h[9WI_b$)golP!N\Ͷ$WBm'ssp:?C3/ۦ]Yeb,Ry9GʱEŨ5ȗc?+QhP;09&1H3)=x YnrAM:Gj+j7f)k}N:ؓit<KPQAfi%]V9iϩTR۔R#?(LʂQ,9siG{ #_.\<};[pU H!EXnsOeR\!0=SOeI|s: (ah4t.Fm8y 3R}+Q+L%qZDN N >X08^#զBXL\X >Ž!":]/WmTwrcnLCXrݑuܶV ϠOu }c&H{[: /LdJQ.<5UOuyi웟ZpIʄpLV(}hk'X~K-ݺnxU~O;2;ÁHŘOivͳy=/4c,^_\X"̆vI>LEhgc4 xJ*FTk`]ɽ,?QF evŮ Яnu)ȞXӍ(m ###h{k`4-=UC#Fpd Mcm*"zP$5?.aE޹`m Z]%(bh&IB+  ezg0uڷgDK(:?| MՆ H'>sCQVEIHš;Sfػ\<J+ B 1*<#akdEMOBJa0BB:R_é9ϙ^? En]Ry1U;aSx2N 7 IZ`M;s_a̻=GIɪ8~31Wش*Ul$B ue@ReOiN:=y,2-Q0OpSz?CkXV]AvS^u\a[o L%;XF4ȣͨ,~AK^<ܽ.MGQ-_e}W;eu8Lj9w_PC5AyJf̥E'l|>@=E-2:C4p]vc50ZA U/cTȯc$ZŦ5l!B%h?'\^p;C<.vš]_3NQ=T&CM'YD^ 靚mLRb{V֣v/F̆3B' zh/?(Jg?\=gw1~zZAw/*{#ݬ4 !ńaN{Iv8X;SqR¸flcV{Ù~ CsӃTJkn+/Zhp5d'jg:mIP)6El-:A- D۔04q?y[tqPqsJ^q%g1dGMZg`VҩK^jƈxRVC8vb5ңI,*aٰz v΄CؾuW0~N#o1Yp/%^TFnV.R2)?GUz/$O/ J`6`甕u# 0ᜡ^]nף>àXU^-0}KJq1IƞN,Rmcb<5_dq܊hcl~KnHc7PQ4 L>.mpARk (e8aOm - =I>,5"B!eym%o!(Do *p-w+5v_в c:\f>' e8 |RsU(̻<992iē+X:o!>mU1Bx#M[Y:\v=,Q,-vt9>ݱ#$՟ObOK<"gל=*'5TBc8J5 ;DɳVageJ}(b\nPDzJu'K5(wfMm3Ph;_f1{qϹ 9=dޛwC% !1t~pO˦z|s I/ ι˹œ{B}kws0򢦿ij=ֻM)}g45{lyjW6߾4@K,q,׬}8 C4Gr(|I$w㧭YnR+!F)CP՜s1åxU%Gow=6a+mJYn'r`!:3x^r͡R{ʜJ }ܳNN/L[MXP)|8xد1j> n4% hR@/͙>yyx:=Of:0sL˱΅}(gM ߇1v9wI`ݮ$9{r#]l&n 6i̡z`ʥayih |KXs3Px/tm-s?_PՑ\WO٧7EGݒɫ0:o{2؇f HHA|RvF 3u4>>1sH^>sh969 ?;SvB?v١'=1L)ޱb"X> stream xڭTeXF .rhiaafR..PIPRZ$)A@3\ux.6C!'#T `';ic Iť:`aH*0:ԡ@TVV Da.X9,]~@p ‘((?@+ Cj`6(W# PpF]Fǥ80(( Bߐ E{07X\H {9;#B8#3DbpY 5҉uu΍`鄄x.XB}s9BN0 ˍ#Cadxa`).h'8w_uG(O4?5(YTT v!HE~/6 ewB4D88!p?ԙTRxoS ?0Ȁ# 3{N-+';n!*7--~lʊ,[eQ!0"wa kUӞ-YLFZ`-TA9y7ߧז< by#&~]LyɬK{KـG]S;O@_oOUfD.y-4=G\^j0H`MYu6KA|)1pJmiSGl+1u@abcJ}}_ I۶P)-UQ >ɕ] :zb esE.{I6MuxOVJfD M00ACƧJ.u9{\>?5_GuWxڟ'vdkMڦ]f 﫜}.PњvrfV;`.C"`)H0rgP[-# vg=3I8>a4 D5HRJm蠧JW#EžDw~Îuq xsB6D^ދ* &Q^,㟭ric^@TLx_U2ͣfۨl mW4h%w4ZqRX mĕN NWyGY!%$BN9k4R#ac 1INo!AhhDOݬ.mx\SM(0~e wW`5YjNf@D)~wW̓^QޙjG5_R]yL˻ã R P=޷oMw[*$Ҽ[HK2Y4W0IyQhpdֈ E\R}H|!ᅂ Eك޳F^#!óZMT]keEKeK)#mֺ5;rf=H&Uh[2jxNҟ:mmBI6 r?>P֞k{Oj7*䗯[B-: '?9]?L 9*ԥ_yq||s`k-}ۢl]jS?*^hkʅfOepo2/_\-V߁`(0fg2u׷(H=9bY,hp`2`0+y@Y>\sZ] ߗsR jMqKFGroGj]5DiZ\OAZ^``O)wB{r,>H 4Z9Vgaِp*.9Ōdx2= ('`5W2Q:6D1sҭ|qK G e_:E/Bu^&B_`nqRU7oɚ8N9XҾ!Zl1QQ2v޽q4+ix4 ү7ת THWE&й]1w^%_rӶqklk-M'Lݼ/j<ʔ48>]^.X|PXQ&`"3f)Vt$i+c4אO&$҄76߹2%vn,r7c{k$X+qX<Oox'r=~ QlXI)}$yZ~͵R$$p&&s;<(\њ9_4<; `q}*;ϣTV{7߳N^gۄZ5A: 8Rm&S3U2̖WwuDK*us|԰Hጯ;x餸N!o΃jvy_mW|J|CmWwQݛi7ߘsSoSn;N~͈9eLKC{DC!Y EU ݵDxU2D$JHe^WX=`3UB' DIVݒDK(N;5Yw*`cpL8KEY+~4Ìv2jBx#`OkofxLY'1p!9wQH*vu֒J%鑊;ñBݪsp[tN>TEC?Q$ :++Q|,N"YNQPWGjLFI"Є)Za5~\-V4]E.Cr6E-Xe-{$̴JN*R+1`/gzىҏ<(pSKFx&ܞۈpٍH}!RQԲ435uA^lT궁$niP|goPj)vz]n>r (jUPs"N&ޒX4ǴD1a f܊Y9jX(|%>1oRi܍z%o;dS?dJY:C4hiH_ Uǯ#BnnE.DŽhUImKNW|IܠZ7 "hLϐdePpEf İY<-&1hIٺ-2zsǻ'| ޷Ody93gJ[*6$e3䕩̲rn;~j #~o#DwokNXs?yM\ 0 Wu22$KyKފк@s+EzzF㴣KYxYn{M*Ɠx{Z rҺ{)RdJUONz}[ -{%qK{ xyBk$|F#L+7o>5E&ʧȼOձ8LXF:xjx ,)Ō,|Z(A:נHk\s^K"q6(0e Zulcv>1.Rͭlp=3>- ѧPVf]<ɣ߼!0<V)dp23dza&[N?̶!($F[WiIyrhrIwteFM'6PQ4W3k'Q(wO{[7\_1: eeҸwPq68y<0ZJ9]~XzUݔ~3fp"^Өΰ"fdo.10WR (XRYr ;KGrhi@\R gP󾼮2Fe({bT\b^NƐkՋŊ  cԣ)msZ_Z3] #o]/#ˏ2\(0yW 4k%度y*hi4/>a7w%:&zQ*{LWq^-òHV35ü2gW_7R袭[ct OR,;m5B#'˶21ށV=^ehO>Y)H|3ӕj$U,c~̓IkKͨ ;͵Ųv*W{ LU Wb78 "Ou>x饗n|OR,Jl(m/H[h%ەDxSz|dl>|3;rhOn{chTclYm2W=]AJʝyS磗g6N~'t?( #k&jG5FQ(mΛUZ>5)= jS=T}NFltv:(V^R!.e7hu}~FFɺZNIxigRy}9uv&mZL??Nc)t1zN,-&j3LRQ"fߜhX%Yo9˺! V-_4[I< PS[MkD;H<%Rۼ$8ڷa|#Gu|LZ#G9쏓LoScYM{!W/j󘀝|Gg~&A9x^W3;@IB\`?{zǪ-@?bO! zW7sR}Z;nǠGEo⊤ak$ *eG]eꭒQәķw5 yAÎ;F-z6ֹ `EIa| \1]}*+w"NsfiI5tvH/Ge{SHY(lR86V_^,+nJT!h^mjW3B X}n^I, W;yoĖ$_M{v endstream endobj 2175 0 obj << /Length1 1144 /Length2 5532 /Length3 0 /Length 6291 /Filter /FlateDecode >> stream xuWw<ۺ&DO^&z FG= 3 c#DKtm%zQK-zA\Zy} :Jh/c\\b ( PAB@(( B]&.h. @Ii19P/CR`# ¯)U#G=<`P@#!^3*@AB]PnS#s>#BRRR_ @u8'wk8y4H E.ByH z8 טNT VAvEgP$(?G( 4C=-5HƜ!(P(@<_G!M0?H0x8`^z yPH4$%}E"$CQ18P_5P?^(a6CjV|_VʈkB~aIk\{G3Y HuJV!ݓu P xA迊*PG`gʽ:ߵ@0Caំ?uB`PG%3_mzC}!`(Oa8 Ą@/kAAT;"P3u?/7F"]kN8N!e\Ok|ދ_YDI`+7hD_I WY'2II)wRR=E#P/'M{tCK|SӧwؒC^e8q/j}SXcGg7}MCiNUkHD:Mcg\HvN*;('zoNk;0XIHwҡ؉8:k0/d)ILdii?:1dMvqI+}X?Ѣu5,ϟ6 Mw ~8Ɔmo=2rYݩ2SkÌcN C4mk۽)HhuR*kvV%&l10{t+RO/45S /uQs],1̘pZhlC+i7 ؚSmY.k=xfT caD,||jDc2GkjlN.ǜGl 4N.:c# pShEUw*S9"{ICvybjiySֈ?<+uȐ3M܉?qxHk W:ս!dr))p 5,~x4nR }m۷ 1VTG(ѻG5^wՐ+E-G (-%nLz9Ԭ IFh#J ˽WR '-pJn=F /1}=lBX;?&Rj]> w+aN`EtFÏǥdc[84NhV|,p0wH) lOFovX[&wu8__/$,k,枵& M/V7.o&Od%pU <F̗r0FVU .53u3͂8JBwlʹo:/205;&Pey1UDp A.C#Ozm87ǬSHfliU z˫Q;2{db4AA"x7*O^2sdbJ4ZǼTڔT O7IOܓ%F;i25Y`+b|uHIbbL T&zIcvO(7 !gGCWдcVY*T9T Z6F2]R|7I;tJ5D FSXt}N:V*ɕShi(fP '8WEF̬3L]>1hd6sS N{Vefi#0U$o&&4}!\fp:q}e$m|#-qKq_Um? g=R[Fyݚ An'8 C UZx]T!8<)#!Z%t@ʅ^%,AgC,-жv#Z嘩NuNmR|ɗ0r'[؈wF}Ռo( Qť~dQҁDn3tr~OX 1}=:7`K'xPTnT;`cQٻvF5qh4/0L Gn.瞏vdzJt/$(lh'֛ O>Z'A5mZ +B?&;*6`Ĥ-hhk8ap -sc3) ]9q4SK˿Ҕ>̽iҧ˗ zXl;sRMY A]H6l@=XB?&yJ#!F}p4vZwK!,N~hsՖzK()LNh%yj(qr|H7Iy%uPԃY3‹Tz\vǁDsɟOSyFN1-T^Nm"@⌿%?L[1z&eKSE&h ؕ+ߌ[qQM zALsX*c]y+S+#!>y!auQagw~6oz}Z"ӓj4Kg]G[KW*ޜ \ ڡ}TIŜEKy.עe{s͒L('6#Hsﱪ $CB0WʟG͹l^oZj_ 2 \(4zָ zaNK B!{Oc6Ezse@69_HPoCxSp۫UiϤvZo+JA&7Սsf_ !V#~ZleWgs;f>gtG“YAKԓiTgRTն4z9O(.F+9x"ԡ v%Y&r"b*%M1i"ΈkTcR{ݮ^ | D+R\0pS ƷnRk!ঈ|<ͭ/M Ϡ*kQC`ӧA׿ ݎET;6:` lOGoM.[p=u)q+i[9֭2 .} qMwHtS&S5|جgsǻ[gAY@5'K-${#bRո.'xY'l34 ko}vGYI{rXmHyY@\4gNk"\tvzjmyf*gLϥ+x4iEov?|- XvәK`ǻ1<ͼ/{klt"3G 턀as}\Z٫:Ěxsc'2V(TZ؟ mUa+E/,y,%RRaD[?bT~nl"Ջlա%%=*O|KUdhƴ'^ >񙝒hǔ-g 4;.$~Lla}g_=_d,֟L|@WxD/lI_gɴCԻ.PCk߻-rkцkfm(Oif\, x;Ǧ"4̯?/5EZ؃,Rr^#n8_#/ئTċ!XFXI%,ߞW{TB\&\ ʹV?ٶOzF/1=b2uOM\kl)A*Q۹e~^W#<˪䐘T-Z/+@<iЗ^NB]CY- YËƉ΍FE`W[ދzOn~}їƶS7FҼr Oz͟sȤQgU,WUeSHE"'$vabMa9+&xNy' 5wc6>E勾b;dR_8#)C 4‘Ӥb/u~XeTX,GQg>=6#L-LJ(m0ţf[NpU~ЃC\*|5,ܔ˵87o6;WҔRM>L̇i,Hz|1\w24G'8}Rgqq t0n$|'xsA\ #)Ҫo[̠.ğhmUX:Y_u-M7L*1|#Q8c\+Ӷ*Y~KFé_E 8/Sgu(M8ڼB6CfJ>qv=+]hxrd5q1}j;7퀄I _|.:D젞]|\QؾRRW9"xb&Û"ϖpfߚD^Xe훽U̍xԗ.N,1''̵!oeS9f_uNh[Q4ӮZt j/ x9u*M=%ܱwKs&ߊkRmoiUkA"bv&o]y\Y7 0/KT7Ů#n .evrkظEjJ ˟?A_ĭNK"BD8鵉`ox44bg[[z1ÙsCH&!}'{/o:]nf~ucn,6!bP7Qk D%r)oSebm0cH|E2cX<8)4xu\c} 2DeQtȊgb$PB1M21N #BE$c?կc K k,?lj#AH:>a[";ۣ\iv-/O2~WwoT%y0%8s]n=Ըl4j)ا}U̠bLb<}2So.wCSf5dD ޟjK$yʳ D">J'( KU_Qܞc0-Bبi4g6s{@81M.v U2mdy!`Z=-eם1Vk8mN124OKQ:F}&G #I)$u:)ob(;NjQ @ĥِo|*T9_S8b\vz oNߧ|5dѧF{a~ A\S8MRe@DfFI endstream endobj 2177 0 obj << /Length1 1626 /Length2 15236 /Length3 0 /Length 16085 /Filter /FlateDecode >> stream xڭeT&\ 4XNp I ̼Νeҧ]U5,́Ҏ`3+?@`ȧȤʹ%\f#X -@ ;; huK jz@{G' 7V { @BEUONY@+.fU7s{@dV.`K?2% 0:-@݀@T'7 v1C-,Wn/@N.-SutZ YU%bc'+hퟒb @O?́K9/=o ߪ7sr㿬hoŌ7onkY[9X-ts:w˿DafXY!ShXf#[Gr]?CK+9%c3E?brOkъ;[Nb%b`뿴2[ry-UA ~K؃&6Viڀ,olR/,: :z /CտCrhw0q88޽Y)Jf'oݬlda lw_uV?y hh!b4c u*m,* q H4} enkZz O8ևk7xQ@GI_Mpb\K'rIqNUpJMݸd.ҽ0 ".&(o?$<? bD-`<erh5/.`ܑdUM2P˼\[s㠔l#p_"V{P/ :4LI^ ?Gab稪kÎ z+H7WgΏ7V|Oe'fd oq{k]Ŵ.Dy4R"9ٛG `%{볔I#$=&+Yaop7zDm4-=<-tL=YS&M<!*u[iRqA$Ɏ:;cmm tB͎y޽2zӏMh͎ݵA ܫd,i:5ycqJp,mSk޾`g |q|洨%Z !0E0o`1!wm0,Δ$#іHHaJW\c5ש4N˄J1p) '[jjcw/fFH;="?SzR.a-'.|XSf=FںcMc{<1<=5;ӹ$zU;~z^*7Eԋ?ZvteG}Lb"AA)%tlIB^|9F4jBtM8{oHZ_ja`EG!n7Oq#~ <+OI[%`gk=Vڱyh|ۧXFoթr^j|O^ 1iY u,ö1\N/Jn_,H"XtV~7'dmٗ3D 1~hkz/>ѩ2T^HRtv\$yD{`C;4]&;kT.xNZW^^CwP\= J!%d! "ϵ#B5eoP\SŗPHEY4a_b̈,UTDE466"c΄>L+RL .?jV^~%YHeץԽ4koUwJ{5^MIhP>i5Le(]hQO@zTD΍Q!MdxVCs!~|M:OH}vs~3"@vmGY~ةeBtV{*XcB 4Zq# wW"߇+'$IGO{K7DG VAN)-,/ ^I,W9|*ֆo3BHn# *uF$s住հvyoNdslo|Mߵ*XF_sPce'@<^$Gy$َ#zBi '\<,u*Nek#ns{[Qd?kd A-W1-V1k8|x3|1XṞ^ܲmت?J[TٌMc՘;>լƩM1# vUQo!u@]-;گc3dugcW[Nv6C0Ikn*tM9 Ĝu|EIŢ/a؛1bWG+enoϞ/|IIJ#IPS ~tW 9ҽDM:Ʃ\pN?h$)S}Z$*J46?F_zn۱VCɊ*ZlI6<3pqw6 9=@f[:*P5 iN+ū. Y/gͳݖ\鰗+Dr3x ELjG&P3#,:(%=NW+h_}nlvNy 72 t`U@ՖnR7ыWε҈3 INݫa=wmM .\-S{j dbsK*Wz<*L(vݱ:=Dm1|DMd }.Z_ X?e#wݣgm_ 8ޯ "t<(d$`} &?` <8юcت{jr6i~v? ]&WQI*~;f_C͡IȽ3( ~Fx`Dˌ&u>Gzjc+?BkIL͑OOA;~e&o6RC뗫*z %P0|<L bw p ^Х&:թm]I4.Aߟ!W΍Y㬱lȨ 6[?~/LARwMʯRzO#])dz9g2!YajYEPĔ 3BR@Kyğ^iX/fIܮ}]tzTv!R)]HE$^PN;xmAgic1qi?,jh~Zzoj@ ؗ-[48Ia*GP,^kzavVopF_MSxEiC77k q8mC<3ԃ^*` 15(*\|pս&]At1D!>m25~w "T12eRnGxČk '%;26uqt-WӞ2z/|١ί; aAzC f8k KWӴrb}"tv-\uacѷ.+Z~_MhA0{9=45 mQ{(vJ +bwϲ 55 ٖ޿k.Z܎Dh&V9nªOjmNɼXUilS9zP`0ϭ*6 5vfrS9>sBJLG@t9o]gI\21qrͬ6Zz׷TЍ~m|Fi9'#m88ҷ[/gDs%aZN\DkbFް=M8;FnutR#?&#N[.ql1}IC10!#|Y&htYغNurA{~T&F P!u27c#0[)1b"U.}6$QjCGTRӔT,LE8D>@m텰 8dx St H ?_nōZXtU>+~*tZ<ܒDAE^FbSfVx3ᒈFX>iE9L&icLM) ң@v4.8UݴLO=j$:YjF%# D`0IGjg?ǟM;Y3аA1%$y: @yo$]5_3y:·|J AFva>×15.k. ΀{χoG4·Mi>pl<@?KRTl>6d*ar?M4_1RDL)F 8 2bYG@}FH8j\T:#ʼn:Qxdؽ~}gGYwQ<+[dMAdǏTnO(`:!F9j4$NATxMc8`¨L>{ }_;m9\zjpڮpaGkVR/]*t92(4wQ1zl̵M `cL};}s{ Ӆ/WT4Ov2(>qdR+_B.?-K$`םFIeN*^ƐƕCx55U'=s/riP_w(;$H"tYD0xH7̯b6E ?ƚfv'Q'nf ǹ5WQtJaNӽJ -د_ 0Qx3 Tɢxl->lF''; j!tݬVs_URX$C/rrD{U& sU9jA G72P$4N@ću*c@Zn GK+TQlTGJnѐ Z1p&Y03$ 0jKK:-.:ɵ8ђy9OI)4vMˉ`OV>oı Z~^qڅ/GPZd>touIC{9߫dKf`-k*kc t7"p/ŷ=3t=XX #:/cMĶI_~|D{l)MB&?FOU ~&=$f`"?eC$AZyeY p|6胸'6Q-a"+q[2Qِ._??R *f9^W^1g_LIԀApmVS_awc\Wev\ M#x:B `Φ[wX8/(zG-\ *#&Z1ޤy毳I ⠥SAnA+ɞS& &LSѩE;eۢ{ܮX~ŸIz.VűR[]45(1p!D!" _9Y%.-`޶rNv܋O?:]Lnzy>鸔c^X]`/R%`g_ѭz:1Ķ$;S;ڬv `2=FV8C~G%aF;Vz85Q,_ZlU|@GmhXT<~+~IA,RWz4ҒF%GZ6^TҼb1صYQa~:oW ;% 4Qd!j9^BРsN<ҷrCnƆiY" 2;I!+:In|V|ŷC 6/MH o|!@BrڽdT渢U`+5)H7>|#WW{_ ]x 2:uuQ痓ON:˘eqj8LQLŞ?ɶW:eNq,#]ό&22 f J/¡CPR?*-8K*h#InPӋ!o\ Y5es۔(0B"mԞ?6;Xdxe@st6(Me\y 6h3pS_{f7_K{ #.b-:y2z.7I; u4= [9^ĐD@qk #׃_\VmƮN?cI8뫙;:_BE$-8{KI䭕 <"9p| 8+vԖ(^ W=%fQ4yUrkW b/o3tѺzKNJW}NicYreET魧3rnBz9weE]Wه m*^ Fmbrs]17Jzhu'ag99 Li橁nC׋r`IJXA}WˊeŦt[ n9"d$gt,钣#|mz#w}lxܿ)&vt 3d˶C⯦Nw%ꧻex@~d2_l8B'oi=ͪi|Pd?2A>jƒha~#]}@in9ELwn=D&Í 4`tId=]aX{C1ΩPJ=USͤ7y+ɂm1Szqz|Ö pP [ӗ>IxڜfM.KY'ҡ M>!xr>'8+En ȁ2A48'ei "gӼi ysȻB㦳4ǴvѪm9,lvDω(2ezo-wXϖwIڪW \n7eTR+Fr/ڿ]/GS HSiPы+ rs{%/Sj3:GRZ+Kp "#q]+b.e $ PlX~/aǩ K*T&so߯!б5aZȳֿ>izCyr  ٸki2/Ji|L?~4jrο&:֏8tb`:+t^zL3xQ;;).F)'?oY%>ۮCuqOzh=h@r_q 'jGFմ:`gr *^A i1)K"`抇G٠2#Ï#4Y,~̿ۙ1JYK+]lRH']X bzZGJrDo2* ;?6H6$_WcPx}}`7z7/]UbXA B&1ng 8 jAzmGdcxA"FM +zL}zFH0O_Y\92 Y4fp,,LkN`{GZjis,PK.[VB?f4rh=Tr9x(UkEL:,tlIzPgA&"LtIezkp8⼉jznDg<;`ۋ7Z_{=FIymb*p?F4S{kyLi*j0(S4647߻Yh,lbʨ\I&[vJ~VhH'kK|*Q ,[Q;{>,ҡUt aіNӟdl4Dn-X;evAc7,RY?ۨucBNxe޿%(;4YT,0.L۾`տJU9,fFȢXp S5N79&3RYm**Mk5,?ʼn{S3K뒤(rbMPa7$kl 54Fm:=8f4 w-S%;g*3m; bokËe:V ̨2q$ol<7VJ8Ցj4C%;kkƷ}jE c<VC؀9RGex`,^5U1>I}+NoLtg`aDGQtJa<6 `c4Xl5*ͳYlr<7F38hb`%RpZ*y7 YnwЭCI ,HQńX/(w`GL͵;_YwZD5?|N߇g-˕БrޜdZGi2ZǏdq5Ě]|r5!Wt}ӻ\GͲv /з1,.es֭XTZ3VKdv>%-,N~$H֎5rbSQyd[ϩnaEH a OOe4}x{d^j#fp&Izv7zN񦑕&($I2'2ah8Kv1M|(M]k%Iل 4>VV7k HxrvII OI(@w~U9H$4N#l;)J =샿@=r2"oc4 XLL !g$\zV)6=g[w>|Z.>f:7_ 5niV k@M4G)$YW3~e<@rQp4~bZ̅ "iX a 黨KB{daHYg?cx:|5p_0Mw |OQo[patW"PFJ**H~do (35d1q,M ޛ@M|R lJԂ^RKJ3kq0nU`W]@$Dq'o/R&2Cշ!~Lbp<ڱĬ՗wn` ESKY!ByVfqS7,׿ pMH4"zoڪ0Hmwc$ee85oZ:WU<ܰ*rͦ?L +~(uilea/#CC42>5neb#"9Jt5)әYfE~cOL\魅tFd>[@$Hzt]Ldװ)~5m]#6O vH5v\/̴3^6nR1әNjeQ5.4뭵A9D}b@2W\TlR%9 ii&kI?hE6&d1_7Gqڟm[6Q_LkT:Yj6p>:UDެzS'FỷKibBcxc5XXm蓨u3=rqmc"UzU1iZqk{f 1;KρWJ$h#5ZJ5lLxRʽL؟ߕn+PuըIؐ'0~UzlJ~Y|cE^jR톶aH} sfJ{e&AnnQh-E?BkUĤs)nX5(0ϐnf37ҊZFrY4QߥX,7T-5~qnuasO|6ʠêPS!.9&ՙ[ p:5߽j;2~oTiFUءPۿ 4.. Kg]( 2y}2p2ǃXmT)*891^&k?9Y=[P>bxn&@<ȥi Ä5lX܍}Sn3 ł,DQ ЯU7#* )Ȕjg>p)&x3xAZ҇0!}7L'E*~-ryXQ 5R5ژWh)kB4T[0'Ȋ"b2}InP7y" V*Pa y &GH"ŽEg5>O'U"G^j%KH}B<2 buxՅ iS^.}q}ghK"~ϼ E!NJDn?;/B>ʛd>ܙ#1(S7 Ds<~eKdϕi|ߩ/K+ qԿՉ-XTr۟d|gs]1ž$Tb ?qYFzeY؜Vn1vWۛmA(b\Y%!134þjÚ;~YLĄ &G^(eԌN ET }#GM[jm-wh8zz+9`-] zzyId:@P?FXo`wc.%2gZv]sFOgRr{w&͘g*bpwcz(n9C4ah GԅDg\] KHC`t .`E0: 0OLǃ p4̻`2]RNxԵ_@GwRk~}t$8OM@m$7Vj Wk]&n)W{g\ߗEcr,@IP_.`?*<*g݆$uTBtTYy An,Zn*\؂("]qG֭?{VN~oV"39K#,n8DCKTt8a U T4)3?F𛚐ھ׳UYxˁiXR8.BOhXR0|c 3i{յpV^ֈkOoIG#7뜋nyx$p}iMSl kKNS\8ڝhfS܈Qn( zGiiط+9M1ÎAFեr/jS_3UlN7Ʉ!X?躍ѩ2:ՍN=б ڈvAu8D~#$cGaL:5焋IMAcI"O[L}f(Sy?xBɹr޸JШc]0C> stream x\S_Ԗ{-T "0s׿$d&(:nNߟ3\,TnL&\l@g(P^TЙT^fC엳Eu٠9}ʩB}SMeOxsG3swGxN=߁6h@?^+W'z^Bޅ+{7~f ,S4yOkY!6'ӳrʳ # )mFtXd!{i'y9)^_ēǏyt>Ł}?.q1_^N'#ѿ8pr"Fټ;O<'w$ndq+X+cEB9 0$OC&MAXzZHyYVn=a"Yͧd6B|;2\qdmsidH?o|"׃U|9r'IԱ-å5m=/[򁸜Dz!Y?zcpO2x6EgTa{DO䰪" 6Dad#: jz`xj#?Gӑ>EOgl]Yϝ< [w𽦮-ڋ- C-[ä!Hp^(N" D@Mb hZYD@D0J`q^`(e YSnDteVq9(,qL&1L l3l2WЃA@#1ܧj]*GF"n+ N1IV5E-FUMi)T{0Ka # `+n| @ 3#0 8sG׌W̙9*ǓhX./ &%X^<`Tlgl' G_E6.W}-;AYX frk. i> ,--2R2Lǹ]qOsk'ggj̎>[V]27W-Ӷd{6u]YaTuEW*(DgB1̥ltRȆ.ʔƒ ++WۈΊW-ʥX?޸_$!m7+V2\*Nӿk"† i};N/3ۃl?%Ko,pntr6_S Bg?AU,,Y"KQϻ!c>BƓYyN"orhU9~g\!dz8;]W`|xlx4mۮ#Lva8p&u` &4a}NRH'X)>7tXE÷28ޜ pPG=)+i҇+hxfǭ1 l$r0""۷YwcoJʺgF,D?N41Fhtށ~>0æ ?NF50fr?FzDL `MjS7X1lNEMT :yF3AgS*:j=yEʈKsQ>%92 gZFs/-fIwq=mum^ݢ+*oi{`; {WA|pEV1ɀYǥu.䞌R!mA -W{ld[>CVR$Md=AYj7_8F+rt+VH]-0#:Go/lߞi$|}ExH:[ҵWV {2Hq vdO8u!&~bWEsreAYCV"qvI̐a3bS f-t,| 9jT;ݤ>V lVl-{FXIGY"W$7I*IX6*ԫ;rM8,Ǔe\y>H܎ol,uO2}ڂx'Ey0G}qLr}*U'Tt>JD~~Oe ϬvRS>'[=VEI߯VÝ ?Kpљ>Ifs.PHMI]}zJ>Ch( ldJҽ!ԄHQe|kkdBB$+ NipMBt,Bވ36Հw "U&B`n؂MLBZ$j$3]Qo \zGw3W /=W/3U^j/CB70gr zX2қ1P͉e@Ko2OI" rQ[ŷz"J `i@)Al~W dx*om' ė_Rzu϶X%l< aM`/ 05e 1WCC[}5*H/lf՘DDr9ʹ޷/ '߾`Uci7>}i9?"O\j H?iKCQ}WLڙN}Íqlm5x74uSk%q?ˇP[t:O|#̩aؿe&=yD=K΄$x2;ŷOW/%! I4Űhy9zOQQ51v$R \ϸSROzVtɫNHZU wko @ye )#QW}qRt2Y9ry5 'c)p.·} Y_dT^ŕ*ə+6_Lh+1\ШFӗG/v%M@X˰i9\a9bpguqL͝g/1P(@u;^{}tyix+τCsq;@ՃQk-uÓQIu8h:Xta}`|qYK?}* -Y?̀_xNR]@/R*z46ԇxRpa oLv-w<]m $y]Ԭt!q @$-`F"gh2 ZKuyo$wh@"ґsY\-@z9#w!Zp;\;y W7pYK Wjl ׿o6]҄ ,>rH *'s,a*鴮Nk7l/ =~tz'AR;^7\v'׏6'ó ,tz,?J/8d7(P+/x +Z=މ}q@ v2}'d$OD;&3ԯ"*+&CجEӈKqW) *EPXr4 RDAFldZ"+-2kvd|s2&mR5HI57$2qI*g!N ??ZXK=?::JQ_^\w5A{ wA..h0M@m Ʊ1z^1,t0ɋX(ֆP6_VRQ6zY=Ō,B A7H!-V@RX]|Kx\8`-hwHErZHuw9mZ6hg%&C^5N1ͯ0j" q͐ȋ)񘿐rzoٗ>y:R PjQPKMTOZ~QmzRMÚVZsVE|A w$m~-'ݫ[{mj](g)co)l~mAθȜGP˳ߦ{BݖlA.A.Aw0vzjl)^kp.<|T.u/S{-7Fd7)^?_mGn[H,ʊ4Qy)im[}6ܬTك$/ȓ!-4>@ endstream endobj 2179 0 obj << /Length1 1642 /Length2 6360 /Length3 0 /Length 7192 /Filter /FlateDecode >> stream xڭugXk.UwiA RKG:H%P.H"^"EA 5p:g\3=3=,:z0k2H_uvsՅ9i5iBPU$D  sV"!#D!\F<PWe'E6@G8!G3#ӷ+!qf,/edl?:@d J^ ~$)呐0@\ @'5H`/4J !`!,L? |$߾OAVe}R4 Tf_ [/*nDMmѫj:8r'ArwfS.p4<, M1ޟX3}o鹮e-f!Sn?Vl?_p2_PrU m E UEG/ΞCU&BvI o6Ke8]_"NO>nC< E]:2ҍO|kJ[uEZD*6^PR6* _X Ɏ/saݟ3JdUIHΉa{ vT3%3-dDuNHL\*uJ1:1z՝MrtC|4w-zF2ZҖjy}DWj;EAj)i3U[f0Z1J3uk/ ,?(\oC:= p||ܗ/ 2˧?OvZ.=iґ!B&dK&W2I)d#P0u]=V6. a4 >rC+`2ut?@1jNw̛2 u>\M"ܢ\pnͷ쑍ZwYZ]VKd}Dt].JJ CjVSܳ;=ޒ~)yE}\. 'Q&"wU$Y*Jf6%xo߂-M40UL]P,)җեc '?m:<7ďyKO= ԒSʨ}1.<㞴/ޮq i8C󝋹wX>ݶGWb}xsZ$ؠXyn~ZP]"}E)IR*!4^чo }#O\mSƒ8{A-=t5T|ak*-?'VHI=Ѷ]wbiu4O#Jų/ű $Vsn#7RPads菊3wzƣRգn潨"w z/mMMi^kY *Wz$<^=d)=も}tDFXrױ}2QoO<ufgzOv+=G<'8"D$+䎄nxK)`! Sk}.Ld2kM5nx@ۓ̒Rp#=rhVS-Gh_ȓ&RuaG)Sz CƟq7/Y|EUhtm, nr  Oq~ >&BGq\D"u=#Ld-O 'OS_>:/L!mʘ .iD/)tFG! 53+oC'44ҒEYV{ŸlWmoYxk gOz}VeùX\BlYsm$ڛByǚNF_0@\)SsRB:\ +ϲas)~OёTD*qB;X-&xTVW9Rw!9x*{PKP~~:D9cvD(d%Epl0P(vn=|:,~./BQwc=NQߪ &`|p" `qx&^?xy?yf;;FsM}([F[N>."śIb<٤t'rsmq^"h l.x0E@,gOܤ&a?E!'@1Er .V㩬 @$0 e4t D769dfG=`f9Ua$;2 a>LC9A?Kj}zԈ #5b=O|a_{eك׵~kc!+hL, ;H}5gǡJyijnq  |i,vLi~; P`GP;[^Z.r zɦ1nXH8@R_G6V..=!:|%ElF6n;SίydxpZ@ؘTeS)hh,P;ut顾A\ !OOԛk)l#{1BX%\$Nudvuʹ4;Ir5'xe豅ЛPLTw'fNZU3OviDn؇䑧l  jT1^y0 ϭ GCͿqL? o!>s$7%rkm3;U@Ү.#U>3"FW^ 7/3gCe}6Kӕ+ Y6=?~m,NcwOܐ?4r 3x@Qe0mGj{z,I#,C}E]5v } c %艄hqRb=c2<,O#a^>z՜i923dգ_"MX5,}bjfm<~M-˅fLqo yzcXȴG Enގ 4].45pKöU4IwyH?oNm .ͤY$Y-hmq:\N/02M7J=RQj\9O]Fv{zt\ȦOצO&F e9o4+~1}oY=8Gv+RWAol6Xw|*_q-8` 9xfͷ(@+L>{Mȳ [=oj3/<~jpI&G+.r2"%LF'*ak 7됄FPٰ/6 * sxC8F²Vs7rEby%7s=p$}‚+3y:Mh1^רa/e)!۴lN_:֮ATÆ!ko$u *ăyJmcy/ygs$ r[+Tj]K s闄عWF,sz5=B&pb=Rgܥr8kJ֤6w-sMq,u]qϲ%* C=)N, tg İ)jڛA4p*T)17] iW碴GӒBȜBx P@m6)QC^\-½%]Z&[ȩss@/mY+y Nd#2qj&<{QV6&0śoTKQ P\#a5,x!ޢ }jéd)}mA$QSZťpP8U&9k9 .!b&P(L5L)1}mK>; =p[ e ѭ&nk>ģ)pUZw{_e=lc.9ui>XPhkxm2 􈌋P\_+ŽK7h+Tf0h`rqӢ  ~oT>M"ojT6.,{ v+vuMK.p-:{Sju,-΅vQ۔۱+FrqMق /*Bq ㉺iBz& ,޸sa0CfK7h1q-޴:3Z\v~H/7Ѽe*Y?. ܡ=jl"]Z#&|USJ2.gr7@o~\DyJs>Ot;X,z̅%tykf,ShOWO/YJq05x%(!$'Jͽ DjBŎ-j:%;fQ' ʯ^+(??k8L!eUծo{l6p(fqgKb>3GOꉕ -aru'L ,I$oNV=53S@/29(bCFW~NK>f2OC,I9,"XCGevŞO9|a3N{FNHDRe=3&o-K09gw bwRu˘jK3e?s̑$x&4ak!R6xtidIWUgj_r2a@IrL:! l!6)a0Y2,)\r[ыHn7a&[Ēx/67F/v]ᅘ٩C2 sܾ {%ϞT $P [cMYv+sՆk~ ̮N1D.GաW">j6SfV)v: +k ޿S_8n}sa)c4~jͥ0_.18fY/nI>#㡎2mVvl; N3NVz;RU[(*LU%sLo┚o֋͋tSfLEv?_azZ$ϫ8ѵĮ}m/FC>݊FV7.%Xh>K74 \xo "9w=6-n))[};e]}xrLO:9yK7U7_=iWY-~~״63aƨ]'yq_Öa1~/_W"\Ҵh4#xW 'D$#/dQք-F*;="Zƶ2GJBˌ|ֆ'~KPϗS|wS 4B?u3Wzg|Y9sH,*bĈCnOh4qwY2vI3\rXóMhEI1tV.y{o"UڃKX㭢 C/_}څ=m$mrÅ1D4bY;"[g2I%9>gB@wPDjl/)_3n̩<>dpH~ batAE['[}7j)aL6}P,UmEx?)RNWTOKSfG1I|!ߪg&S z)Y =F"t0l1AjpkeGԋP$IK{Fsy#}+ 3>1#A`\E*D[dB: "[z|w&5S~p3W"Y 0 ?f+ Nw!7 endstream endobj 2182 0 obj << /Length1 1630 /Length2 20020 /Length3 0 /Length 20860 /Filter /FlateDecode >> stream xڬsto&v*m;۪Xc۶m;'ݱmc|{9sfo柙GƵェ QRe1s0J:ػ002L\UxTr8 1'  4M8 Z]E?%L+n]31oLŽ}A[nOoG ⼐f]ϦmKr9XX|?fzݨ*NԬHνd>,5;zAbG |p=8C& fSZ-F_NysAX h70`UQ>nnYy5d=D-)ڳ%zMݠS-MlLk 5S!@զ{[d+<t}5RfdUZ?Ksk8PB C<5P<1X*(ZyPđE.5kH!#٬@Tp s .k^ٜ =wE<-`/Qv $k AsOCŏ*VBu:hĐ3 d*xNX7~lίX^o mM_4?h蘡U3T(if4֋!5.sͨU"V^&TJC\I>MvqtUR : '_FkܫyV 4( ~3&ƙo|&8x5 .JL=mRߪ17~Hq'A ۆ/vv/Vz:Eg5`;DǮ;kScozAS∨ mmj͍zU<+Imq! :1 N8#FzæY"N[Ti2!.鹭%HĭwK›J{)o$4[0ml Ls6&|ٖ#.% kfnP$GnG)Vp*G_ˌ>p .?B*+{6|#0(H8*D\} J/.J2ÒDp-Jɛ1rZMIDw8Q 48tw]gGcqRg \JVѲ i,4vtrcHwZWj7pSZZ8R<"f7ƒ$N/qBB{q5B;'ϲ"~"BYsț.qbMO>{ E͉brJ: 'w| iwl3IB.-> _41"BgKe6yk>zJ lo^%6O*Q!uyY!fqU!sOQ;IJ^|H^AWZ}ZKf7@ջ&{[ zfeCq]!2،)}08?)kEvRY^3/8lMJ`Oָ'M h&+ڢ] ӓ] uiR" ,<w2hP g*C?4mo7A%tuDb}D8wG@uRL0K45֒V>CJUt4۟ I%Í {ڹ';D I-P{[iȹ60`@> iT;\s^#چ)c-2~(/è;#(,)ع P[zQ*AnSN-WmV< =X'af;R2! P` /u:T"ĻL aHY"= ưg:e:2g{6~T#g\RmGu}ʍ/Z#2+:2RE "wߘ$> /NgH#G8ދvx_^*4+ R k|SU.oAu$eݑ(8FU!8b:r^Z@"0^iKtBx\f_=WlϺҜ[u9J@HrBeE妬^NP$TB7B~1Jh:[Sː< PdB}J_ Q%_6L)$D7Av|5RR0jI~br2r6)sw߲>5#>dc5mtI>|TD-üB0^5L@&hڝ9|`]ۋw/e2Ü6c;僧d"9UqJ`N:l{+؟%W*lWԸ&#TLrE(6k z:1ùx@=atSVۼZ(m+LT\ JV,hԦ%%EuYGL %ݛlnvs{/zKǜ fǔ  =Yl4Lp@A2RWǹ|3XZl xlE8v*)UFT_}Гkt0<';xd8 Z^ gEYC"cF}{>l)kQ`R'nPCWEWdTsO&EhC?,e23%qQxjD;`;£ 0w*AҒ;l`LPT7_s(m|̕eh?&iNNHQبb@y9csgi +iu Fl~,'q_p=LMi#-eF}CK0k6\*on\?6PAߍveDkPo77ia1a Y}1婇иPU0!mޏ)>j7`s i'zin'e,쵖@ul;jF!rpYCRƳ|U3(.'mT}n'tm AbtQ4_bkm pI$AkxϜ[_?+iخ D= ?JL R@f69Ft5jW0r]Ȝ6gT`ᾲ;"'0tYzs0=Sg^цGDMxIpOC!&z8")@ԳN-kl#f-bii\xa &Joub~'ik>\fn`Jt%75ڧHT͑!KCt"h%?+A0GB 5,?dgP{+{spS`|oԸ8$m`{d1۩n<âgjM1{cY!"3!ek[6~C+$ɺ(†ѣloW(xОWr{۰cLI#C8|P(">̲Q޴MQ0qıǪf֛ZPhWJa~:Va 쾟\)iR"d"")Aʹї/ !;dF[\OvWC1fd8:֯%`dT]wN&%6YVӻgAׯU8Yn&J[/m]Jd[lujs 8QuĆm7IYr4a7sFg AklbgwAPHр/\, <8CH;nS ON#'`^O}~b{Ʈ}Dm[77k14eTH4F^^MX*4ĿK4X@sJnyham6f@.nѨc%psVk65ےDeg/O^tBIq ugHqA&۸Ĵd KS$}!l1VxpG3rٻn.ςySJoֺYy f<eZ*8m|<%lH<O:‰b?kmB &DJ`}ܘuu8Ǚ:Cֱ[ UC[Nm:䓂b603TM5Q)AD,|묯J(M7l:,Ȥ!|Uyf#h׶0JFqFLтbİ% Q37) HJ1RݨlOyYA]NaQgx~G^,n->?DSg=~y\Qo }! 8`D/0ԟ80eRcԜ*.Cўs- 0XQ?}vXץzy w /]%N0V[sGIp}Iыe'fqqٞ7x pR8MFsƹ7m&0P2S 仯 AQNdǂg[7R?8yvaB\=&yUҊp45N#9ցe=ϩ,YhU&<Ϯ*K6ho̷EWT{v{Q ]DB cs>RzV K$;N(0tEkͿ;wŧtQj% ?5:TD3+ߐ3"ˏ~iB'2av^1NtإWT.f+y:)S(I6|X"[#RABI1J9;6%y{;ejq78VM AMՃge3ٷMm.LȂ々^n1&8`# ra:\\M 9Q0W&- #n5mLwd U)QsAF`hʚ͢<Iu D䚪`UslQj`-(qS}7  rA|JT1p`nNSLAiYK𪇞p3 %^DV5X&'s.ycV ߴQ⧨پ&"t}VM~w!Ȍ` tU;QmpM'pϧVů|&/t лs314j*|&O#yVxʶ KuޝkXbl76i><%#Ar*h /Hm_"GѲXnfvFEf]2KA֏_GanLO;wz\YGDcVM^Zת$޳5sz6$eVOw<{c fib-EprTr?]7`!݂n5;A0CRjXe<).NU|o|BO!eX16%۬9j TƢr,hTl1$gN~njPcEpL>I̩ϩ \EKA|9T^m߅!FM#-Q~t/t`J[ZN 6j`!G>7X>BX|,HXMxNMUB$Du-si۲{OcrcgbdP #] x-ՐxӃQZPxQU^ɽt;r}H\r3frDX?3[ՠx<LUQg]`La49dx̗ =urr͐ &Pd9u 8ۧ0t,lmZrN $ ƒ|uη *$x8eB)-!;f}~(,H+6kR.TDXWbW$kL)B8/-b 󪍏BkpESΦ)]$4fM0 A~%fT &4o8c86G nr E~<߀gkaOzV&jesM#Ef zy"vP7!% gMB:F>wWyҠhe-.Zq6NﲔbtZcmQ9gIL5E<͇P w$Elk/u]t3r;n+5{7i8m\` ={QTO'X]KseE𗐲dk{J"aK dNاjT.\6E:j2vTR˵wH=X댒BFvfv*T3S3{.bTx/aKG9=25oɜDc]o?シxcjopvYa]f'Nts_gpҌ/)HG=TvE\.u3A 3>/ ERR_$F#IpҖU6K^uiLx=ҜhͻN}xoo%2[+-PeGnl lFROY&sF(8X\Q."Vd(Z;GcTB@e񎤢ʽ]WEcdp?|* ۚ& A)B2}~MHv>]3D8)7 t[j{n~pl>c >*c#2 ]q;c4cNsh |h ;7~bjjj=Isʲva;~]QVyi'bZznz f@k^U9Л7~a7眓A[OXsd ̏+UހcrLLE+s%j;qL_M 9/)Cݧ{h1MlYr\!1ٚu<Jˤ\&B*Xte,p ę@*k=Xwhb ṯӅt.]w/baG3\LE![<7ύT[ ~[ԍZ8 ֩8ax{ 5*πKz7["^A.n~f۲D_Tcu 5%Ī$ĬÜVá}|qeX_9Kt8Xϯfzp( rSӢ}~?UF+ךˑzD |4zw6z57CM'!Y~M4_)$ؔڈ~1y̛3BvNv~rb]g;1 b+R^j~D=V]~eAhF ~/\F UvPڶ5:Y?OcN -aGy\`JZR`fX Ѭ>fǡsӮK·T}[2VaY2 _3vp-t(Oc$9QjP R,oZ*?sb T8pAjPþ$ .Q9u纋IC2FBYܤF ۚEh;N#iS,U!7#G?РRĴzeS˖l%KTJ60dxS*0qv1 ^_IȔ+ ]NDܯ^uXl` C 9 *Hi@tB'ҕ7oߟyߖW|\$&C}Yٴzrh߱#J0CH0V1z)`=%DƋ*|-) fBg)#dYDg?[BTERS'9NM@ʾr@{Ocȿ]Tt"w)缕zZQ() KtZw2,I/|!#B.. k(,Ώp +7X71m"c5i( Ȃ7ƺ w˕U 2W=(w 3 TK?_סK p yC93R#- 9מ98lVEPb3tPUB147PۑFuZTPp!%6 Z+YrKp=raLj͎o24[( "T(5d69KH.ǷjĒBDq%̆RlRPnl\_P5`Bʒf%pYy˚АiLmsHgіZ)Y6A;g?t!l`EdIG5lNoȢHoh.SQ]~qy*;2@>:&$4fZ@BFlQ]: ǘVIG*(8wJnMؒPc%{ܧ_W]}B 'G\t[UXָnFv6ų6+m> owbgyjwppdjXVnx~@'FJWô?q /!vA^,K>lp)ռF9lR Kܘ׀7VfOApLv ]++BLdSԺ0> _x .,%VzH'JA7t~JT@,(gH#PWI+_ aL(ƻR 7V"j4郸s]mG͑d3HhzYxu3IaqQ懅At:;m a&|Uo}?n[D}} NŹmYZZ|2pA=$`Ԡ!lF"n_O|+FUֵ7,&7PR1GvK"⩭~O(ۛĊn_>l[5#wff 6j͠0qW5LT4_M j ۱^S%8$&Wc^156Ƿ\ .|_,KUD6=OǑ g|? 39ܸP^Ng87zS8XԢt{WGoCzA ҨrHdBg2!$%fw2NaM%n-F]*/~w8K*[x5B!?Tٻ1giScdxY(|nelg[ie7gk?!M[&inJ!u镌;d--ފǢY)'!NQ18.G([/M4{جp]AAԈs9tc@D4^EiPB|7Z!MPm¢~C}+PpLlQVz)HGx#<~TԖtoۍXeim>fXVQvBqe"-xl*<|Of\dkU,iLdT PWx"8zl2ƭk{>1߮7k\X *-fzJ!6]ՊQ<@o:^%IKU:Ij p4O<5`SqD!`zM"mWudLRh5&}}ΨNKQxq0ub\{ko[[$EnaGڨֶ K?ZmZVH ^\sv֖4df:y1!/ )^i/vl&5[(1))DZȿ z"e2_:B$p,ǁ+d׾H:_5 Y\*}A󽊌/nVjYqiiC{hxZ-[u7i?_uqIѫ| ao:Tx Mq%r,E#OXf5ª`=:_㏵ ` :uU4S 4b` -|82 ZP$]*#Zπ-'z2㐤eșg њj'/A5'QʦD3.]k{70z Yx=x-(9I}g}S.ZH.㽲TK.4(`֭dԽKN:Ys?wA*~_YB&.~h+1_o7pV%/s\vEFQdo*Ywwl9UH3q0p096pXq7ehzB]E)qyT|cĀ ;̋S=KtU~&/$SgGy? S@Sݱfc;| ai*+#9x7ٗz+zHQ #x"ͥ};3'|<[l~S" ]Vɰ|'GaR usx5xl7JA*"nISYL.}pOF%'Lx Cwn' Rp7=~of+@yϳ;s>XAeXb{%3%M4MqJHM8R} rl in}u4x ۰';q |O8sҜt)qCx=c3G*M)|}QR k@kplH"ix`@JE C- ŦRaN^Sԃ2/e"s bg_;}w6}<$g<{1X$Jlèߠ]5Hj '[{c܁%*<&hoT*Adq)z}+6 ڄ]'N!6.Xy;$h>ʧ_3N(8D5oBb/8MM7H?ʮۅ,ᤱr]}TZ=(Ia3[5gq}֖NSXy,կDথ8Ub(yc_R8)E~ֆbMaboer(Ŭ!V$JO_rR|-Q+%X:Wt3a j">[j+d䦺 =vZ (&xhz鷙pֱ ``O0$ԴpﮠU<"ڻ :eu)( :L*]>z=VjMUixK zp|=UW1!st"To"Alcu4Ypl(i R15)MRZ`ܫԟBEQr aG_0(`uT(^}jvz&႘k],k\ KFI FWP.`T+|ÀȡhBqMrsvc@յ?H$TYJ_<KRSD{R5`ty>-+IDZ RF-&d__J}۫Q 6LJo7ˑEW#Q -2 -D0p5.b>[!샡gAZ)5Ev$e۴?l%Oyhݣ8_RU=Of *(B{,>2*~(cѧm]>H G+Erjś!pb[S&=Bѩe@E6^I.1FetL,]gy|y `:b:1 :+MWfkXc5lJ'!CB(^DcYAkH).Q]f 0JXbA.5.8GCSG;C'n 7>ʛYFYܬ]X=A*髲#9J<_PM5,**9S춹U]B<\z{Ad#-nځň50{]!j$g黁dAWJ'.G#Ң |"q2vziϓNu΀ 2 }&A,6/ݒN Q:A#chJy<ϯBiee!CWLH#aŷ"|!#;oD oȼsGNεX,*B֢ MetJlVHF/.Lg0="H9c !l{kS16sK\T4YRؗ*Y^$utJK]XN^Q^bœ4yty ߔ%2Yӛў;\cͷoʬշO>|h-SQVFMAoBoq51'j5|8H J;f]HV\W',84Z34p c13莭'J]qJϸ, aod8aE3 ?v5ZЫ =[d+4jѲMӍd\.w0鄭m@l,$>,Q ZGm喽ͧBJ29JN p4@r ~XRէ+ޮSpg1a޺jJ̱&Q Ai#;q/O~i#&Ci2c_7wNkIK(g@V,6֙/ ~,RӖ㑃~JW& jvʐz1aZ ÉD[k|Q;sִQiN_w1?z/p ^-I4 %L s !/FܓW=7;u'J^8u[4/ꄆK£`f L>tgC˴&@X\(ͧvqloODEX@j/%;Bo)2Ԙ>T&H,}–CTǽ1OɍCE!UKIeA9qs`y97m5:y`Z)1szrzff8GwcP2U;֛Z'BG ĎF~ɧ˪=h࡚gݻ\ݟΊ'A gd,ȘwK(anޝLʋڧ FDV l՘#`0psX`kPIPxwX[T ?W.LSUV~SOa<9ۚ$Nt quX'6aQoPfqe>e}G9[o)KHl΅e$a6KR~2R j,RXL OG)wu0>M*yL+B> V7Ԉce(׺?%Xmd͉CQ+Cˆg2̗tw8u&Ra tb$ @!48*: }Lw5ޫߘbG}X*?@:)eK"Qg+UG ʸ@7yϑ?SH#PRԥu;VSVlIa_ DsBVss؄v6X?vA'h**QÔ$o.yQD[m$^Ѝ. w# 8%h+ޘsq늏^mn\ssnk`(Q@\\<Lze~pK#'s ޣMz4mw\SrLQ>(ן@aWU&׸7%wNRaf {<}6[ 󘦎1q2\Z7~nW E.u鏞/ҵ%WfETN5\=QJI+/LRyl % q8 HqF/' 1Zn+X&d#`W7JsٹĨ0fxΨcY! OüM>=iz&# 7/ACfMs5˩1|4U!bn KZ$]^7bB.7DIX  e- 4GGRCCƪ7 =M&99 r¸,^} l L$0nk7~#JŀBjه|%ޜFLj yҖ[iuѥ> stream xڬcxg_&v~m;۶m;ضmvmtl۞?Ϝ9s/3^ujݵj)( ۹13r,m\mdL]%] m1622'SCK{;QCSn @ `!;x:Y[(Uԩhhh =-?LmlM\R_;*\,Lf6yMIrvNPp54X9R6^L,)͙/3`jl`dk` 0w2s{.K;cWk7WBNw);8;Y:FUw..v 47vai.vSbL,l =Kd4\-3Z_ ߪ7tpv,]Mma4v~301nӿ򟞡' AoH}"7H"oWKz+4v g:8WC[Kݭn'BBtLll6[:[z(X[ m޿v&N6vEubd/?j235_0)j Kh6+ OS.koP {عt/_DL5tqh3322ϕ37] L2:9U_o%0505Y[7 Jpcu(kR). O2 oj\:s<>ðM5*%/D$9 b+8W^bgT;ܝTT+dq~ q+ @#}r@3NkCBjB/:;'O:y~?ɍ&1K9#Jv4pzh2spuFt% #Nie,NsnZhf~# '5A:yDdK٢RvxlZMgdɼ3W7`hC$z⏃X29\0CX(Tb'FpQ8~"Q#;2łlB═vJt$Tlְ^XZe}h!7փZ:7(Y 3rZ[(jt{,ՍU}6*)Z=EL=6榶ti -V? S_Ay&ߨ if%x^% JτZ6 ;"B`V}x x-C uF{ 5nYAR9_+`ݘ4ҩJjS#YzT'A'XwG@)`48IE)l#3vR ]XȽrWG:'$,jۃefd*yG_/S"`**R=Ӑ.4/gaAcTi "2 KU}v"|wr5Mh@ H).֬u. ^S.FB? lkT b~7 \欱ZfmO}Fރ1 Y;Bxb'V% uȁٸm?`4=Gqփ_0Ϛ#+$;ռmG*0ޔ1 asrhVa@qB24(F0IO |s76lF!g:#A)kĻzm=XJYixci:Y:\K{4E>g1.UnB7Jqf,$Piz {pbSo,HiL4d24|+n>%0Z,e"̎QЀemIc_n%#NGi&{YuGۤW81ԄdYy O?^ E^4m0i? vƹ)3&Bo+'A ` ow0'cZТT-p< .a~2I'5T ʓQ0A #},z~*gq"0Ѡlpם*ݞMD~ϸuٽA[t%k\i馱fYHy:ql1Ys8.wlAx%Yi,vjMr"U uGX**5Z5-I)GalocTA0-wdžITab+0 bH/t&},GCYKe5O@ pt ;WhZb?K9~F2H2iX%ov=v%CMV U6@s9n3Qssv<0lK<p elfmh 76BUJ0LD(jCv/UxD Fn_*YBWGGE'<.c>.:`r*$.޹ffwboVn|@З%lV( |v kN?$aMK UvtiP̢)>R hPQ z71Lvz-Hf! #=fd& ߪCt6!7U.UIJlwԏzP,9ޡ|vUMdW\&sQ-M v?{><ݶge)%r}l)Cc%%XgUq%paF-={y~mDI'N*|Uǜel^0?PN\9L o& xuo ܳWTBAI ^%Z'Z|R'GXruƟ)XyzÆ;A%K_EtэWiH%\E:bT*%I\ ˑN }pXcyES**$ 9}ߗ#‚7f 2ؼa:\UkWlбwN.xg ACP\[?{ vĠ2gA3'>d^!46iB[4@7"=@?Sى -R7{)ƜW-Gv(_r UfÄ8/= ZKM-x-l^x0I8^켻T!NQݾ3Jf&Yp1bs6((6m"MRC/T7\f3w~)׉q b/65eiG؁b#<}kܗ_9Wӿa}'P?gʟs'Xl\Z*dn-L+`i{bռ57bK={$sذP3ۦ;d"1n͊%JO&dsdq~X+~리P40o!7lX5\~5R}`]B'/l 4FO{#r,_u`؂",؍HWLbh)HK Oj_ؖGzOVݽRZfW ޏ墷8ӷemŀ?$)a|MROb$'uRLB:ͨmxȕ2§D ?<6ձ(#4._2*\1\5r,LjCP%R`S9U4F,Yn敖9#"p(SƘ-z; RDn'B%jp숓phDBwJ [R/d|:e'ʝz1v[ u P3v& &=h r 쳰-%c%OuᥡnO2=¿lWU>*#ܔbE#,4Ȫ͛v z-đGYxO䋐N^#RzgΆFbQa%.]ƌF컣J 6nX,Ys ' 20\Xhh>gM?Ujnh q\^s[&|ఌ=V o}N 0[jV %87h}(;^g~!ƫf {0u"cl1d=Jet&z#kd0qK?I)!zjzU[ ؎@sZfOeǮ3Xp[cE2PuH`Hʷm5|}S'*[)p'0԰i?%ڬ+I?6LO%lN*\ԜUQTϐGhq<}ăk8^!{#GWV^}h!.,K⦛V:-£6͟o6F{1ógF$It+P 6<B`~jTٙ yObo06[G+SgxZb~Eqz"8&"Q ^L(~%%uw+k4OؕjOm\<"33*+ԣs~} aye`ؤ"SxȒcE}L52NaKna(ެ_4!&aKTnq [)ʑڻ4c{ͽto\C] +.c4HpB(yz?(w M<.JL+moiܚ4GN %qBO2s&=`ȭ~oJ+OBiDtbv|87Q=/"p` t}mc,rekCtQ M/f_w 8{xEkx?{>Wz0CR[T!لіod' C3TE\U_1 \;Fc/(ف37h+FD p+@Ơ[/ b}lkOKnӗ^fG n`)Tv%rFΓFp~K1zy_Ԉ< ?gÊ1Vδd*fhp 7=Xg1Jʃ@hBGOŶ\9jC./ڧ6ɞͭ@#.N1%3 'O_,!1z^ D:(ߜ(xbfǼ3a1uW3u7Bf ]zG.)>XZ}2/sE6V7!Pa(>O_1ICj^DX,)}_}je @ʾ&7hV ~N  ~LݲcEc ?_#he|"Ç.J8av~r^#EM7Ԩ~LRQPYS0y5Bmױhؑ:h*-@sҲM1MEe-+yX t J$t$ྯfV eb8bbʵfϭܩG5'⇻>J+; %.\m6m0QѠB@o %vN,eAE ӰC5IRq4ɘ*S1i{XD%wi5317F!>S<3Ico&FЉy:Umq{TZ)B)=), lU OpMw.XI)@֫t`>l$4Ҹ9P/('Bl{(35r>wF4$ O 8:X5 IMIKlKYL9E=BfH!F01?g+Ø7*[؉(2aEx%TcEG l$rG3Ws=VsPݐW7WwӴ-{pj@2Oօ|veOkSvD[2(q‹װB߫o54(G):pM L q-x^pm}pͣ4@^*GPGZ)tJI"Ռ.xfpŒ@}jPUH.-)aPBW$ sa^OW5l?N"[wzsZcs2Uxo'ZQwR=V-ԓGBYnbOm)v{Lhʅ 5gu~Z06]<>U  ד(=gP(wp v=FҧGo"5  }E kM!g%G3ZLu|[X+kղ)LTkֳ {J<ӟtBN/%w >~:5Q I&$mp Mj'f)nc7Տ(IGkEvA~VXlڙq:v&~zc*Տ;I͆_B"9՟Q<1-isr@Zȼ'V &[5)$VFkJ 3nnœl!?6qE>~R#}#(-v Hʴ]xnA~Ɏm`)|m_4/Nٌ4r-0r *I  jf y0A-~>ds]+-1TVqz6QNO),d/}m=m{)R:4x )4}Qg`ru<*%灃]ej3O* i`2*!D<ߤQe3UWtɿE(6j?PDF`ӲK9:(} 6|0;n( w_R"CW'g|47RfԒòjFхwTuQw ExkMxy}Ɏ[wјe(q` ].0DHj'k_Tu6%BJﻬJ"yEN^MKz#,x ki/x *'3Ш8,_6`L$] 6Uy]&/gKBA6rkcEGhy$Bp&}_s?c k?d|,OH`sF[dJ3oʜC~UdtRh݋hCPB·d:b /P[Owɯ8;c{a:Ȇ;@=4-5QHxV@">F]1hxS zo24XBb?շ3.ley*eu䈞Xyab&:4??vxgA-oլ},Dc5&gNּC婩(H®ԧ:ThL-dT6lҦӡc>xtKUf(m!rNwP,$mz\'ܑ&p RZqBJ[Mra1Xe|^,n;DFlҚ!;IA+Hg&>9}dh)Eҽ$][㍶s ģRCGk:#Aw\ŴzWTטzZ8$u:yvxzTMb@[DHlEK?'#WzrFhx?C/iVc/GR=%r6D\d9Bo AyeCQ7AXlǤGI~BY uhJ@Vݹ1Iѣ+gswQXq_th*bqgF(j@:Wh;"(h,4^ڣ>\d)Qe SGL y^h`_PSz wM)9B.Uc9II:'XPA֚*4 !`v@~n7G:e xV?2r"Y-%p`v.yLC” :܏.j'FEvsqbgJ*Y6}i ^̇9A4~z!M2?ŦhWE+((C2'0Y`Dh@AYl%E!TIxp]VQs# 8sw8j*62A= Jy Yg WD}(cٜw W>9o|dBDjb1LJ[7G %R%QW78nwB<_H8W~!.&$7c~}[/p 54,;-fjg[p0K6ClCCX_`?|87!r)dsF:J9]scv쫇MIT"j 8=kqq!;CzJh2 a,7a"1M)ײhZ!T6VK/+]N%(V7٪n 'rKvkk7>1yJb44PWN­Q}aBs]5s/6"@6mn_.9u>CohxۋC1}a%1VC O=JLR(}2G óɨ-nIa1ډvpNoY1bo% ʧKvcUyޕ/|:d2wYqaWEs7Q|C#1ƉyhzWgeþ{f6Q RH)7%ٽ T9a 8'P+? v*4!xmצn9]87ya>|u#> IZ|󭤎EɰUUe|:u2/f՘*9J[Y:(ڼ ~Ȳ~UKkO9T&Pu\(AD y}RW1I : jIr"[#w7;K ERs0X9^dms0#=KTt2p1S>U%& aF37gC$=Uf`OWƓp%ʦC< {Ij)I?5<M ,s c ͍aoLR=Qa2kbQý)S RGR*l-g7Xjuu9!SBn[~č0Rn'kYGpĪ# 9D6 w΍S*;O\f`1*L#5[5HۥYp.[U=zH .چä֊98^)(=FP_"uM.aD_yBa|2"&+^g9KRtR}%Wٿ7ƽИ&7AI0V*gB6"$ -AG^JvwP 8`@Ԃ 2\=2?{Yv@{JjBdq`į#͍h$U0@Ʀ=+/yX*i,v#GN]"fH{|jܷ-se].B/Vk 2HaWmeHׯ5BE*rdPʕ[ 5*k/h]MI4Z7bUY2J3$ƹ+dDҶӯC s3@Em~[PHj\P[ꑹꢜ@iȻ2EJbn֥ax/"I?\L^Ջ"f KT_ U;;i>aG=Ϗ[l7Ln$;S9ʶw𪞡J8vj`h !$}w֯?Z 9$%ZY奁MU_@~TȢ*ήa8Xzw__zz#drZu7ҍ<vӈnw(efOFX,'>цڵVLϹ} [JM]yI2E痡xiPtSN< a.J8,/kJ$ȏ˧|rc1\|l>a5שc_s,29 &ȋ29?i IZp-xE3Y%"Zn:r X-M6s,N1 Tf m38QQ1򫥉S9܉XHUc'|Fwt7".?>d["z+[+Az|85ȤeZbya׶:3l9Bs>^ǯɥ-˔!s-m~$E(X>v?`}8H_'5QBPu}sfbִگxnwY uc]fڇ4 >KtӘBqYE.JڄHm:@jSY׼K}\NTx:63ְ3D1sxĽd\YxRr[a唚ዿTk#*HOwL%Y n!%Jvcyk9Ef k#ȩ)zЧ1Nmk+ s%"x%*T%tMp*%. Cx! b2@TnؚImߑ(}>pxI0t8hAL;4+ ^ ZTd |=,32J`&b }xAK!h;02BLqF$ -pMuk5$ֈ{[qKKeoxi+| WA,Y*!r g2eN3vȺo 5-ϯEswk@uKhhࢼ1`4tz*! s()7[ڨv^@:<|tyS/>5 F e Ecl̻QhsJ1BZ\ !9~tpEb?n!Vmӹ١ӏR,S-͹'SJXw91Ϋ M6n,oN}-}0#QbaCUL?:.xo9xEUӭ3XǛѥ }p jݡP3Nb9A;LHK~,#|eo`xctwzrse.[̜Sk9k-@܄eM,n*4j$2QD& gi{bJb H;4--%ՏrN]+ )Z0yE{4 XX7RhNVۆh:7Nl!rvRe^ b,؋ud<JKT_BvLW~ex9Sx4 ½B-y&UB0{NͨZXh@7 3Bv(Ҵs0]S&ZC^%9i +GSJS/d2Q1Z"B$9nJ(N%^Z0,X-ߘr:J9|*|u{Gz%;~A53R]`eqd/5XUO }- eQe%J0!o:,|7!.dh ̭ &H8۲ҬY%m[-t32 P "PVS恖6KMۻu][ƈا~@P-7IGa|. Jp$q(.&xLˆ*_N1yQǁȜLzx Ur}O_Yހo2]2A}+أAMJ#])Ԩ+"nع"[},)o(ܾ2R0QR!ɭ?{/5-?&hd[)@Xӱ|`aZ  endstream endobj 2186 0 obj << /Length1 1635 /Length2 3270 /Length3 0 /Length 4075 /Filter /FlateDecode >> stream xڭTy ƀ9 gnX@o>F6h$%`~$BFTs@ăH4= FH 4HD3 4 @@{v pt:F'ID$'p_u|D4p^tO.F$KH`0i''D<A禓 2h(A@a@"NCޙ}=ǐwq^Հ&A LIFc9Tw`_vTO,$HnggE P8, @/U[TVD$GG]},EA `<4[F(?COq{E;MEeF MB^ }dv', $`X.TAj0G4_E^>]UX2WO쮯=}Hd<_"8_&cc\0 SWt C]" @0o4X$<'I,ov`d@y 7ywA0Dr!b|2nBZaLs#JpuGu<6J/Ttn=%o~R bd뮃wEåy?RE9oq&ԙ6u uª|t`v<g< |sgS6hkm[dn$x;]FǴ5ك#vN@kwܡt|VՁ=s!Z`Xm(lR:43^rW@پyȧ?;m|fUyn#Vi?[A5q.?[+n)\~~А[a>I]i{em^m\}fjH+.oVX9T&79+ru@;YV8,GޅWO]= x;P\tzݙ }_>X?H%j9{?W9[4H- MF1Tx3u-vRn/%*Qe42%*.I#fH`oY3mǛg.plmy(2ͯ\Īy;tm\h`Q$,"pTHq5ma&hxC [ o!EkSߩ2=&G:EtZ })E/(:2]&$:cǔJ$pC,~- FrEod@&)oȱ+VFjڮpbf3Ǜ3xC'^<xc:Uw$_㏙0;"귤]2QU ~dF\iun}V>@yY"q:Nx#O_ /^ë'G`q5g\QkvgGca6MS% %&SN=g3^}|x"9C~EgZҘٷPwcnoSk&fIWHoT?U9ߠ+èYvNϞT1'q ײՏP1SBˌ0D;[p" ,O?_~z_ڬd;/()j9XCem${Dot*e%$r_9j RJ׺2F)ւaO,XHϽ|~⓾Fxe#g|,O)9vwdEN^ǃe TMcq4g֌9%gh1o/uZ/Bok(6|cS`oRnBmu 3Z6Jt`yݿ4mCgZܠHT5^{ksj-%#L0M\YarV/}QwcK~aM8YaZ ՓX]3.yH0T!߂m eoK)!&=ŦKbBeV9Cp%[ٜCX1wnyYN1P к"v[ȑ>l#Rnl8M|\y5}@G{Z>ߛ(1pҜ򐩭X9؟tp+Ӹ^.Uy}n}n!27#R(7UY"e,NU(po/C>(ҴDL} M4QN: 46dj}O21"asai2;MdD:~7&rūDtKYp;kb_goYF=:^-_]a6 lzu|كոELb|m|N7B 񡘻5M{#1]k73EqQtQM $0wXd~9KݱO-C l3Ѿ[2N.7<*Z)YCm6O%!!r.VV֟*A1) JRTG58f+,1>M݌0YxvԫA{2;v4}4-KVyb ")4F`TUfl1}|x2{iCt-|ksCH~}CkKb/о>v/kĭinA}Hzv,lw/Dpw1wwzZ vn*7;kŜg={ h-=Xz}bwORqTGpO|݄TU,{ $Pbޘ>EF}|dqV8cqq@pΩN%vξ'6a?rbD#qBNG4TOpɫF[9JQ7VHKu D`-gv*U0m9,} ]S:L'cB]<>KP*9 v(_6}`VIyĜl F H0VyyPIYRV:&Ul!턊˫?`Kϧ^~ڲrALns}_e|ޮH3=w"cE|̢B\ UH%ҍ eR@rMJ~f`ɤni>8w‰My&ocet2WJ̍̃L9YgThIEMi10XTRPR|ByZY87us!&kpΪ9c=c~޴RcgPҦC7*S^^,y\XGB}R;C!,Ѳe^k67 ʟ~hY Sݐ\qG%m㤺TqUܥ)f=6fby5K~J!g,0 IIOpl endstream endobj 2188 0 obj << /Length1 1605 /Length2 2844 /Length3 0 /Length 3672 /Filter /FlateDecode >> stream xڭTy8}NYȚ=a){Bf13=0"kBBR)[EЦ%ޛy?9y]7JN4-hM!C(6"qXhkñ>% BD hx@cc>%Be҈A!X8j N6`A81p$"#A2T(432*,SA<>Aj PAZND:OÒ!@HƓU0/&(pEɜ(twu BD8 PJZH HL7LFd0 菥H ܫ5'T*vV"DI~H>6|Zے(J'N`P ik RB: k;5Dr?JAD?~qjq$,- Fjtkb(Hp"BK D$[k4 u~Kɫ[5XKdrصa_`?!W&_;)@& DF(etYcA 'FW.2BX_GhX&6LKCW$S @e@oiaQ:ګ!Ϡ໶/P7 < U[߈K\Z\ty6߸w<YF잠~ޣ>ڸҐ NPPk*z|Pc$Z2ɰ]v} ;\ZeեmvL!蘨UϪL'XNĤrǏZ>q5 Kk*`Yg /mDAJ63fcjK>AwIwq} N\G{ZM[=L{{gT.1Ɉ,8=v0S/:z; "m3b- )Rqvcr]7xKVt[jTPa$K BM8mۨnϑڄn*{w%y%]NJV Z(j@8!2zc={1=U-xDg2uZU-ZUlKBZgejjǬCc(w9vs ywxl OF9];m8?Ld'S/0NENs70ĥmRS->^v~O- dP1&lv@rcѢ=g}v4iXb0 /K%U&a#л${rX4_\*^np y˧.rBe?3 1$I3g'3Ŝ)ڿsEϷG\/)RUeUO\}Vi.\]Iijl#1=7tEտUZaesE[~'4=4q5~7(}t۽?Ok~M[ϲ<)/ww\$ !3,$]ǽ(?qSV҆,{y:R9ٙ)O6aM;juNF16-߁i(VJ:Flenmn ?)#7Mk͕a0f=P/ۑ%hC|9,'Ysu L/ڂ&/D5n {>-jeL6ZtaO0rB LKf۩,! l7)C3<ҶّP{_A s F;etQqa2k#4-H1z uE'oDe]C5BR+KiI^xTMth*,6QMO,uAՓfڊJ dt+vmϋ닓|f꺭[H5# 8p;VuFC'Qszk. =c*uL il}lktݏgvR*@\Q='lt|ȳoz)Fc)vRN>O7r, !wes%< Q) jG_'ƴHwpFQ+.9t+,Jg1O,y,%y[HELv.$ʹF5Txȅn>Suج3'yMƺe\nF-oCf2 G{}a>dkM=m < *JLDһG, 'GE2] Ҩ<"k A\Q5үz9Z'x/L##X5`)I]A^tHQfNDoOۗ謁ZgNUrxez\Oȵt:†.Ӿo(Nwh%~/჏=Ŷ'u'ՅbCY;1QԖ|)ro0H5yu ~gR\o~v=iV&i4YQmu:߹`֊];. A+1^DHNqDLcb[-);564Fͩ+bn8{[b}`W8d377{xe7R< ,“ !٧8aNG lE6jHV<H4K`oabvIgh`ʙT\gGwj1R{_WnHa0"DeabYrZƚ fC!mzU/] a}ohW%wO<~9 /v4=3/E-84w|,hf^xwйp+{m]vKIÌwU=w{;-y-,8!wtT?mCF[ǝ_ǯ׶ C'[dS2/DCõPޙ^C+O.kM\o*-@T|!="n!!O9|P5T endstream endobj 2181 0 obj << /Type /ObjStm /N 100 /First 976 /Length 3468 /Filter /FlateDecode >> stream xڭ[YS~{zߪ CXI ʃ0tx2Vwے%ئjZK,90j"Q $FkFQi ʍ9J,)"@0XQq@,M`AJrą0+D*M HTA"CZá4V!w",<*IN 8<@ b0L"I@IF%qgpyI-H L\2Hq i0%\"e("@ke_h݀x .S%Sl H+┥Hs Ֆ`!eXÀGYT 0P')iF3Љƀ1SD@9RPx@7Q֝R\g#Hܐ *0*ʐ0f-F;%P&qA$"@pqW%ʜՔ80"4Aip`̙ ap'b CNӀrPUJ ځ!$ i#*ĸ{΀wҍ<`n#*cΧNG<2F> h#P  aqj+A#cL GE70rҍnW~M> G7^q#?o%spluZa6iؿLi҇ ?B;9tJ|mI/N妁4{~ ݃iԬw0|hLg YAK2S|#Nqxx'xg:g ipGFwO[%` o~b]XҢT-&^# JR47!>1> W6[ w]$ͦ)Nx q2e4?྇mO&/a~4 ~K07f~:=GC;$y,R4I$H:ﳤ_~2O)~F1~4c_~Cqh$0x8<q1/8y+j^rV2Xbʋ/ɱ+b2ݪF;Hކzٸ7lI>]g~~_HB٢:T+N-N A~,Y-Xх|P.Z[v EXg>iN٫?:%V3Re0OE(d;_ZeRbC0' >Ɠ-n$Qw, ӷOC 8^:@˳zXE)J'+pr+ 2(ĝ)n0WuY_bb }}u eൢ N-t{||^!(/-Wݏ7sx[_+[s|ӿ]~^aY.0{B+.E]K5\wDkayނ wQ| U*mϯ;9~]uzr^o7?m}8몓XKRe0ې):pa[d|]].bap'E[~<>KwnaіӼ,k2_̮xս:9ٻ\%"!|" Ns^/GËXU3%CXEUTXV{tC?S8JRн;GGEf[Ej^EwQy i^AS$U`iP枮%+E>9nl6VԲtu؆iw݋Oͽt.T5.l,;eAݺP b vsvvxs9n_Va*j {MfpnwA3x UʬW*H9fwus><{t[~WzXwܯn q)w( G IBsZDrK VR\ӅWޝہ(w)_:~f^sC 2c8W@t ` B&P=n@oF",1!&&Xb(폾@#5W2=A 6PpYO-A֓T Tx+XCgvH|v0o/h()4rA b hgm/8* $eA$ pāJ3Ub1V,T=,1PcbzMoO @mKP"O(h wAF'TpS]LK2J@9.#cˆq1wJ.EUA*Aw!R*"#BLJbeױhfV} cӱ$h0MLjgCWR-o靠LH'f P6 HFl*6yD˛%(E4fms.,K/$.F|` 0`@+*jL'^F_<ǹo+a9.C"u8oԘ-&(oy8fIGԾG&Xx\pMv466_20_\}WڡŪ b;k޴}9fByk@Sbs/ɾMЉP0p[G6}a;p . >taJ-Z¸]+:N, yx= +x}O1geAB=kg\\vFU]xʵJQdN"*>6Qke:"EYFYԚzYaΞsx+Jp^mTӖJƾY HR>QN_쮘\ B|s[%:QEWh6kDiU5( endstream endobj 2198 0 obj << /Type /ObjStm /N 100 /First 932 /Length 3285 /Filter /FlateDecode >> stream x}Zێ}߯G[AF-HHHZa5NS=d5/TrX^f6ݖfm66l6mmCO< n#wwa+٠M-fڡ md` G1F0s~{b)}dž3;2#ݜ8g {n =v쌋oKq߳3.q⊇wg0+YnAFP۸[聟|ef< @25[4"3'E3#;ظE`qb'K@`iK^8ec]N0/7N-x lU(eql$#s$|S9<0ƞ=0{7>p$DcKV6o%X#'aP 肄ŀZ]p>L7Ң*'}T=<ԱI0-#4UOib#4FIP Y{UiVz}dgS?6dP0|~߿oY뗗f;?]>a`x@sﺛ/ 3^ < 1rc01UBҌٰK@83RrsM:ϭ[vooeȲV)_%j$nd3{r 2c[Htˇ}~7߿{}&{Oݧ- 8yco)7D;?+n[fa_t+W6'lp!}lO Ԡ6A&3l.)Ŀ&;6dWW HT۬Hi*VX&D<YӥB[V[ mQht_򐝉3"1lсgŦFb ֢Waؔ/<4֣pŨ߁4tMFZdzlN@z4o^+@ދMD>j "5,}o)k>HlFFZ 5Z"v̏M ޲΋eeu D]{@P` Eo)R#x#GFNAtb+4ĦGF:"x#[b}A L g0Qn٣f7 oE7 x*zK_N@&9x==x+ߔĦg9NM$61dAV`UZΒRP<헥?RHjiq uJYV -v 㣗?r%eHE1NvRgD햁ɋÑ, 3Dv ŷsB.PϢr &$#Y%Py RJeToD8I0S;> L$c{.$7إ{إ{ؽI/GIV6Hc{7v©EIR4{mt^h\‰,h:'Ҡ@)*5зg윐ZkIpuLM#%`"uuJqx\ )EZp '^[ e.k$B^_tݕn%P*:dX; ֎mIt?6v)J"~^ra/G2r~!ۑ-}@Y!,ˆԆ^C5X>#6?8$s)*yȷxPAH HMKF.@L{W =RC1p^?]p endstream endobj 2337 0 obj << /Author(\376\377\000T\000h\000e\000\040\000A\000g\000d\000a\000\040\000T\000e\000a\000m)/Title(\376\377\000A\000g\000d\000a\000\040\000U\000s\000e\000r\000\040\000M\000a\000n\000u\000a\000l)/Subject()/Creator(LaTeX with hyperref)/Producer(pdfTeX-1.40.19)/Keywords() /CreationDate (D:20190513184006-05'00') /ModDate (D:20190513184006-05'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) kpathsea version 6.3.0) >> endobj 2257 0 obj << /Type /ObjStm /N 80 /First 828 /Length 3174 /Filter /FlateDecode >> stream xڝ[o% c_%H`aޚ&E=l#X`!ߗ]7Ő E~$RyԶJ[fkVi#jlnf}6馽]tPN72.>]lR,{R<|bsѨ) ުWYCW]{񺗴fTѧWL7WY!xs( CH9(g̽Ȟ@CH=N!(ٺ;&XuԄҦk!$kfCc6T!"c1]'ԞB ԤrŌ?mWXQ c $ ƅiboUXS"̖hNb CT=.P]SzR`1Ǡ&\&h`j 5]etT.9m(1h%uժ }M>"!h9D ٰrAVʹaXs:%l|Y0dxa3R +jDVuKCR\ilM˴`LX^L#i,18_A[-`5`3MDtNj=Ǖ>p汉Q CoC gﺈ(˔@(" q\#AӉ`q)Aa #iv L[bЌdMg1XmtLK/k2=HX#l0{=Øk >^lô_>@9LQ`T5L0&r C05S ;]еpO0V_EAca,0@ 0ZK`NDt\mqt40ma=jmiAS[a:P+*$!$iZja۟[x;v([M< +uvOؾK-PI LPRIbb%. {©N%!{Ւq4w#+';\y-qSse #yUNq0y]UX  \Y*r;?O_E777{7~m_v*'))R 7drt<`#nyH-ayd4:VgQJI6}W܊jkh5[ n1 5!}-bp[qCo,.;5fn6M6NuAT_݋ͩe .i PCu9Twgu+~aW7ds+[G!ﵟٜHswv?śLWڝRwJ)uwlwz_ ^~yuE΋Ob.LRr^y;0'q؉c8e+伸T|RةS_/"ĭI<'D8췔FƟ:R|H'| VZm훻b{ފ-73{;P5 endstream endobj 2338 0 obj << /Type /XRef /Index [0 2339] /Size 2339 /W [1 3 1] /Root 2336 0 R /Info 2337 0 R /ID [<852EB3CF3CFC4D43603CE5CE4DB2DA3C> <852EB3CF3CFC4D43603CE5CE4DB2DA3C>] /Length 5654 /Filter /FlateDecode >> stream x%{lY}w~ĉ'$N$NG8?')]ĂhmRz) RLGZ,0 *Х]MYDcXD>:wΝ;3Ϝ9sq~gʱR?S389)9VRΩ3#Fl/<(Jl"(Cl72#vX7zPEuvQmMuQm-뤺 &6Kl'5`-vP]FbT7Z5l'&X/mTVbLjSm[JU _SmVڡڞĴyL]6SՉ&vvM'q1FJ@-31V/G8T~b3tJn[Kvb:b:c8Eb-TZ,]OLi< NBip6bR,"Xap!b<@<:#`bRo r7Ջ`|eb7N+IZ-%zL\ }tm͂j[O&#v2[69b1[+w KE@m%V3<]m_vh@yb}\;rbȏbnS%b>ǜ$9d+\aXxc27&v*-ĐkscX\r@2C;t06Usě̩[izJ+0sƭ43\1#H̕3\1TU3\1#ak\>\A\oU\[q\G)\3J lqVq.xpėW::ʇ *ʹd%G^a]9ޫ;csнǀ8y tJ9Ns~QŸיUfMd~1pØ_փ `#6-`;h4gVdwĕ^;N sW]h;ӊc7~p08Qp 8 @9Ty Y0p,S:΃ `10`؜UEp \ `̂&̙9p ,XXK",$B`ܠdơ9OaC$ңDzHX-&s^Imۊi+J(;&J|+hmmuO>Du=Qm4{㷴h0'BtGaN9DaN9DJ**6EK",$’K",$ˆ"yy$E!R4i;vk_"0yPEPePAhMU`5Xւu@O\Ѳ96;6Ϙ`:t. t` z@YqXy` :`\KAtAtg>S~?8~p!qkA8fΗ. 8N38iN%;K[=P` L|M2/`\W4d~^Y5 n`"1OgwxK\Ivל_-fCX`]uryWxXijsDX`]u^`Z6-iXl vv4 +@f}ݷtf>Gbf~b$>0Z1'< 8 6< 5@.AdNdh\xA0 ZeC)fu z >~ HpFpNrm yi(5{S*=vU|`;* ʠ4fPTFP 5#8)z1go#6u@]ZV-fߛ/ځ^@'aʛp]zf/=o]=}+C=t04#[y(8N8 ΀@F s<F 0hOk`\ &p\3`w2ϛ?9ȹGB=r7-s-0"հd}*l7_CDjby4^yxYnjmdµ/HXngj]6,[nInxaCYuA)<vM ˽žƢid/s<90mtyakCxHGj=~u+<T3n[iq(@A A @?[ւ􀺴U`h\ zI `#6-fݮ߶񼱓]JtvjYv p/i}O]nfژ k\ZRgMLiO~˷u10#k; NYqEgmu0v06.˟y`LM],?JNyp +6nsږ_.` hP]re f;*jM.66&.ҸHh梙C.⢊죊*nlĺnLmBM r\⋋/." .LϺ(|ECn?д+G.{EW3:2bԩ>..nឰSTqQմ&jqý ,K\rա΂I?;."4.ް'&@yb =&jqí.`Vx*@ZssF)ҤeFZo_RHŐ&EiRTI$]c-;ŜAҍV輯蓢Ef/_RƜ+ ԫR48ZpjR]%ERJ$eK&%^+hMq(ŗURH1"%΁ARH0y]դ;jǒt Yuܺ&KRI2Q+,kJ/r08J*)ȐK tPВF-.&t x6H)2%)Ra_NR*:PVՠlbOC) A ]%:5lZZlkUn;A>a+5Kb;^eA]`73)J@>u@A+?K?ap'Q+|ew 8ioZO3<ss`\O^BZ.I0fB]ja5\Ӏ%^XZf]U-+> ҡQ]b{պ &t"C4aΊRU)UifND4aB .D) )DiB 7V]'DAš>݊$i)R!V'<zS iBT t҄V|CK/!+ rHFxƊ|hˈT !`?@p K4!B _B}\ÒP"4KpŠO:A&74 $\%R!.ԁz 8 4^-"(P3Tbr &4ZߨK hkƊ߬u6`9jnt]RS`/!j]R﵁8ʡS:΀VZUgCS:sକ.C` RFEp \:Fu&Up ̀)+uw6)&n}^ɍy+]| Ї׻@[}d%cӪ@V`'P㚏*~# >KVz8Qg_>F(cϙqGcVz1mEhU|wGA|QG _^ >h -`}|XsE\QQ!,GyO3 ncVzauOX )㣅>c? xJ[|׭-|e}6}o򱍪A#Yow"(jGVuգi9>6>VJ_6 M[?Vv;(`e>~݀+j{^>hh^Pp ޴ 8N#Vm8 u s!+j`\V?_\EpL`\< d-puZ7Xw#He hY}+<ܔH̩<|F *k@'UUhwjE '*|l7a Uf}C*HSHS :UvHShʏ*Q鳲WXB*R9h~L }*/*vP娕Ui*VK!RK*; PR9+)\3ll*Xg:}*VA JU&5W̩\2fYkY9~Z1a T*ؔ˒3B}ky a$3+?]UdT/Y/,Uc!ë P?!c|*kPA&ӺM?bؔ1heؔmj'qδfBW"e!RH"e1d8PCe8ZpOROaSv[XF _+k '5KCP*d FdMdzC&Ò KkmoiƬ.lyJ*MXSJkt^|JVvXt5J׭cJSVz4cTfUa ײְܠҜ5HWWrUqT9*Q8G/)`jE0j" ZɃkUk V/jy]2*ӳeP{8KjO8M I9%8a=p-:aN·OBIh|O$'"Lx\MpX&aPHX\U Y%,Mx.Iv Kh>M'<$L$|+OzOH|B'$>! OH|B'$>! OH|B'$>! OH|B'$>! OH|B\Ւrb  endstream endobj startxref 866909 %%EOF Agda-2.6.0.1/dist/0000755000000000000000000000000013466402167011654 5ustar0000000000000000Agda-2.6.0.1/dist/build/0000755000000000000000000000000013466402167012753 5ustar0000000000000000Agda-2.6.0.1/dist/build/Agda/0000755000000000000000000000000013466402167013607 5ustar0000000000000000Agda-2.6.0.1/dist/build/Agda/Syntax/0000755000000000000000000000000013466402167015075 5ustar0000000000000000Agda-2.6.0.1/dist/build/Agda/Syntax/Parser/0000755000000000000000000000000013466402171016324 5ustar0000000000000000Agda-2.6.0.1/dist/build/Agda/Syntax/Parser/Lexer.hs0000644000000000000000000536017013466402170017752 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP,MagicHash #-} {-# LINE 1 "src/full/Agda/Syntax/Parser/Lexer.x" #-} {-# OPTIONS_GHC -fno-warn-deprecated-flags #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-tabs #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE BangPatterns #-} {-| The lexer is generated by Alex () and is an adaptation of GHC's lexer. The main lexing function 'lexer' is called by the "Agda.Syntax.Parser.Parser" to get the next token from the input. -} module Agda.Syntax.Parser.Lexer ( -- * The main function lexer -- * Lex states , normal, code , layout, empty_layout, bol, imp_dir -- * Alex generated functions , AlexReturn(..), alexScanUser ) where import Agda.Syntax.Parser.Alex import Agda.Syntax.Parser.Comments #ifndef __HADDOCK__ import {-# SOURCE #-} Agda.Syntax.Parser.Layout import {-# SOURCE #-} Agda.Syntax.Parser.LexActions #endif import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.StringLiterals import Agda.Syntax.Parser.Tokens import Agda.Syntax.Literal #if __GLASGOW_HASKELL__ >= 603 #include "ghcconfig.h" #elif defined(__GLASGOW_HASKELL__) #include "config.h" #endif #if __GLASGOW_HASKELL__ >= 503 import Data.Array import Data.Array.Base (unsafeAt) #else import Array #endif #if __GLASGOW_HASKELL__ >= 503 import GHC.Exts #else import GlaExts #endif alex_tab_size :: Int alex_tab_size = 8 alex_base :: AlexAddr alex_base = AlexA# "\xf7\xff\xff\xff\x6c\x00\x00\x00\xe1\x00\x00\x00\x55\x01\x00\x00\xcb\x01\x00\x00\xc1\x02\x00\x00\x36\x03\x00\x00\xac\x03\x00\x00\x73\x00\x00\x00\xd8\xff\xff\xff\x8b\x04\x00\x00\xe9\x04\x00\x00\x47\x05\x00\x00\xcc\x01\x00\x00\xa3\x05\x00\x00\xff\x05\x00\x00\x54\x06\x00\x00\x53\x06\x00\x00\xd3\x06\x00\x00\x53\x07\x00\x00\x32\x08\x00\x00\x31\x08\x00\x00\xb1\x08\x00\x00\x31\x09\x00\x00\xb1\x09\x00\x00\x90\x0a\x00\x00\xec\x0a\x00\x00\xeb\x0a\x00\x00\x00\x00\x00\x00\x5c\x0b\x00\x00\x00\x00\x00\x00\xcd\x0b\x00\x00\x00\x00\x00\x00\x3e\x0c\x00\x00\x00\x00\x00\x00\xaf\x0c\x00\x00\x00\x00\x00\x00\xf0\x0c\x00\x00\x00\x00\x00\x00\x31\x0d\x00\x00\x00\x00\x00\x00\x72\x0d\x00\x00\x00\x00\x00\x00\xb3\x0d\x00\x00\x92\x0e\x00\x00\x11\x0f\x00\x00\xd1\x0e\x00\x00\x00\x00\x00\x00\xd1\x0f\x00\x00\x91\x0f\x00\x00\x00\x00\x00\x00\x91\x10\x00\x00\x51\x10\x00\x00\x00\x00\x00\x00\x51\x11\x00\x00\xc7\x11\x00\x00\x29\x11\x00\x00\x00\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x12\x00\x00\xb5\x13\x00\x00\xac\x14\x00\x00\xa3\x15\x00\x00\x9a\x16\x00\x00\x91\x17\x00\x00\x88\x18\x00\x00\x7f\x19\x00\x00\x76\x1a\x00\x00\x6d\x1b\x00\x00\x64\x1c\x00\x00\x5b\x1d\x00\x00\x52\x1e\x00\x00\x49\x1f\x00\x00\x40\x20\x00\x00\x37\x21\x00\x00\x2e\x22\x00\x00\x25\x23\x00\x00\x1c\x24\x00\x00\x13\x25\x00\x00\x0a\x26\x00\x00\x01\x27\x00\x00\xf8\x27\x00\x00\xef\x28\x00\x00\xe6\x29\x00\x00\xdd\x2a\x00\x00\xd4\x2b\x00\x00\xcb\x2c\x00\x00\xc2\x2d\x00\x00\xb9\x2e\x00\x00\xb0\x2f\x00\x00\xa7\x30\x00\x00\x9e\x31\x00\x00\x95\x32\x00\x00\x8c\x33\x00\x00\x83\x34\x00\x00\x7a\x35\x00\x00\x71\x36\x00\x00\x68\x37\x00\x00\x5f\x38\x00\x00\x56\x39\x00\x00\x4d\x3a\x00\x00\x44\x3b\x00\x00\x3b\x3c\x00\x00\x32\x3d\x00\x00\x29\x3e\x00\x00\x20\x3f\x00\x00\x17\x40\x00\x00\x0e\x41\x00\x00\x05\x42\x00\x00\xfc\x42\x00\x00\xf3\x43\x00\x00\xea\x44\x00\x00\xe1\x45\x00\x00\xd8\x46\x00\x00\xcf\x47\x00\x00\xc6\x48\x00\x00\xbd\x49\x00\x00\xb4\x4a\x00\x00\xab\x4b\x00\x00\xa2\x4c\x00\x00\x99\x4d\x00\x00\x90\x4e\x00\x00\x87\x4f\x00\x00\x7e\x50\x00\x00\x75\x51\x00\x00\x6c\x52\x00\x00\x63\x53\x00\x00\x5a\x54\x00\x00\x51\x55\x00\x00\x48\x56\x00\x00\x3f\x57\x00\x00\x36\x58\x00\x00\x2d\x59\x00\x00\x24\x5a\x00\x00\x1b\x5b\x00\x00\x12\x5c\x00\x00\x09\x5d\x00\x00\x00\x5e\x00\x00\xf7\x5e\x00\x00\xee\x5f\x00\x00\xe5\x60\x00\x00\xdc\x61\x00\x00\xd3\x62\x00\x00\xca\x63\x00\x00\xc1\x64\x00\x00\xb8\x65\x00\x00\xaf\x66\x00\x00\xa6\x67\x00\x00\x9d\x68\x00\x00\x94\x69\x00\x00\x8b\x6a\x00\x00\x82\x6b\x00\x00\x79\x6c\x00\x00\x70\x6d\x00\x00\x67\x6e\x00\x00\x5e\x6f\x00\x00\x55\x70\x00\x00\x4c\x71\x00\x00\x43\x72\x00\x00\x3a\x73\x00\x00\x31\x74\x00\x00\x28\x75\x00\x00\x1f\x76\x00\x00\x16\x77\x00\x00\x0d\x78\x00\x00\x04\x79\x00\x00\xfb\x79\x00\x00\xf2\x7a\x00\x00\xe9\x7b\x00\x00\xe0\x7c\x00\x00\xd7\x7d\x00\x00\xce\x7e\x00\x00\xc5\x7f\x00\x00\xbc\x80\x00\x00\xb3\x81\x00\x00\xaa\x82\x00\x00\xa1\x83\x00\x00\x98\x84\x00\x00\x8f\x85\x00\x00\x86\x86\x00\x00\x7d\x87\x00\x00\x74\x88\x00\x00\x6b\x89\x00\x00\x62\x8a\x00\x00\x59\x8b\x00\x00\x50\x8c\x00\x00\x47\x8d\x00\x00\x3e\x8e\x00\x00\x35\x8f\x00\x00\x2c\x90\x00\x00\x23\x91\x00\x00\x1a\x92\x00\x00\x11\x93\x00\x00\x08\x94\x00\x00\xff\x94\x00\x00\xf6\x95\x00\x00\xed\x96\x00\x00\xe4\x97\x00\x00\xdb\x98\x00\x00\xd2\x99\x00\x00\xc9\x9a\x00\x00\xc0\x9b\x00\x00\xb7\x9c\x00\x00\xae\x9d\x00\x00\xa5\x9e\x00\x00\x9c\x9f\x00\x00\x93\xa0\x00\x00\x8a\xa1\x00\x00\x81\xa2\x00\x00\x78\xa3\x00\x00\x6f\xa4\x00\x00\x66\xa5\x00\x00\x5d\xa6\x00\x00\x54\xa7\x00\x00\x4b\xa8\x00\x00\x42\xa9\x00\x00\x39\xaa\x00\x00\x30\xab\x00\x00\x27\xac\x00\x00\x1e\xad\x00\x00\x15\xae\x00\x00\x0c\xaf\x00\x00\x03\xb0\x00\x00\xfa\xb0\x00\x00\xf1\xb1\x00\x00\xe8\xb2\x00\x00\xdf\xb3\x00\x00\xd6\xb4\x00\x00\xcd\xb5\x00\x00\xc4\xb6\x00\x00\xbb\xb7\x00\x00\xb2\xb8\x00\x00\xa9\xb9\x00\x00\xa0\xba\x00\x00\x97\xbb\x00\x00\x8e\xbc\x00\x00\x85\xbd\x00\x00\x7c\xbe\x00\x00\x73\xbf\x00\x00\x6a\xc0\x00\x00\x61\xc1\x00\x00\x58\xc2\x00\x00\x4f\xc3\x00\x00\x46\xc4\x00\x00\x3d\xc5\x00\x00\x34\xc6\x00\x00\x2b\xc7\x00\x00\x22\xc8\x00\x00\x19\xc9\x00\x00\x10\xca\x00\x00\x07\xcb\x00\x00\xfe\xcb\x00\x00\xf5\xcc\x00\x00\xec\xcd\x00\x00\xe3\xce\x00\x00\xda\xcf\x00\x00\xd1\xd0\x00\x00\xc8\xd1\x00\x00\xbf\xd2\x00\x00\xb6\xd3\x00\x00\xad\xd4\x00\x00\xa4\xd5\x00\x00\x9b\xd6\x00\x00\x92\xd7\x00\x00\x89\xd8\x00\x00\x80\xd9\x00\x00\x77\xda\x00\x00\x6e\xdb\x00\x00\xe3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\xdc\x00\x00\x64\xdd\x00\x00\x64\xde\x00\x00\x5a\xdf\x00\x00\x5a\xe0\x00\x00\x50\xe1\x00\x00\x50\xe2\x00\x00\x50\xe3\x00\x00\x50\xe4\x00\x00\x50\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x13\x00\x00\xa3\x14\x00\x00\x93\xd7\x00\x00\x80\xd8\x00\x00\x65\xdb\x00\x00\x4e\xdc\x00\x00\x44\xdf\x00\x00\x2f\xe6\x00\x00\x8b\xe6\x00\x00\xe7\xe6\x00\x00\x43\xe7\x00\x00\x9f\xe7\x00\x00\xfb\xe7\x00\x00\x57\xe8\x00\x00\xb3\xe8\x00\x00\x0f\xe9\x00\x00\x6b\xe9\x00\x00\xc7\xe9\x00\x00\x23\xea\x00\x00\x7f\xea\x00\x00\xdb\xea\x00\x00\x37\xeb\x00\x00\x93\xeb\x00\x00\xef\xeb\x00\x00\x4b\xec\x00\x00\xa7\xec\x00\x00\x03\xed\x00\x00\x5f\xed\x00\x00\xbb\xed\x00\x00\x17\xee\x00\x00\x73\xee\x00\x00\xcf\xee\x00\x00\x2b\xef\x00\x00\x87\xef\x00\x00\xe3\xef\x00\x00\x3f\xf0\x00\x00\x9b\xf0\x00\x00\xf7\xf0\x00\x00\x53\xf1\x00\x00\xaf\xf1\x00\x00\x0b\xf2\x00\x00\x67\xf2\x00\x00\xc3\xf2\x00\x00\x1f\xf3\x00\x00\x7b\xf3\x00\x00\xd7\xf3\x00\x00\x33\xf4\x00\x00\x8f\xf4\x00\x00\xeb\xf4\x00\x00\x47\xf5\x00\x00\xa3\xf5\x00\x00\xff\xf5\x00\x00\x5b\xf6\x00\x00\xb7\xf6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xff\xff\xff\xda\xff\xff\xff\x00\x00\x00\x00\x13\xf7\x00\x00\x6f\xf7\x00\x00\x72\xd9\x00\x00\xcb\xf7\x00\x00\x27\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\xff\xff\xff\x00\x00\x00\x00\x83\xf8\x00\x00\x69\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\xf8\x00\x00\x3b\xf9\x00\x00\x97\xf9\x00\x00\xf3\xf9\x00\x00\x4f\xfa\x00\x00\xab\xfa\x00\x00\x07\xfb\x00\x00\x63\xfb\x00\x00\xbf\xfb\x00\x00\x1b\xfc\x00\x00\x77\xfc\x00\x00\xd3\xfc\x00\x00\x2f\xfd\x00\x00\x8b\xfd\x00\x00\xe7\xfd\x00\x00\x43\xfe\x00\x00\x9f\xfe\x00\x00\xfb\xfe\x00\x00\x57\xff\x00\x00\xb3\xff\x00\x00\x11\x00\x01\x00\x6f\x00\x01\x00\xcd\x00\x01\x00\x2b\x01\x01\x00\x89\x01\x01\x00\xe7\x01\x01\x00\x45\x02\x01\x00\xa1\x02\x01\x00\xfd\x02\x01\x00\x59\x03\x01\x00\xb5\x03\x01\x00\x11\x04\x01\x00\x6d\x04\x01\x00\xc9\x04\x01\x00\x25\x05\x01\x00\x81\x05\x01\x00\xdd\x05\x01\x00\x39\x06\x01\x00\x95\x06\x01\x00\xf1\x06\x01\x00\x4d\x07\x01\x00\xa9\x07\x01\x00\x05\x08\x01\x00\x61\x08\x01\x00\xbd\x08\x01\x00\x19\x09\x01\x00\x75\x09\x01\x00\xd1\x09\x01\x00\x2d\x0a\x01\x00\x89\x0a\x01\x00\xe5\x0a\x01\x00\x41\x0b\x01\x00\x9d\x0b\x01\x00\xf9\x0b\x01\x00\x55\x0c\x01\x00\xb1\x0c\x01\x00\x0d\x0d\x01\x00\x69\x0d\x01\x00\xc5\x0d\x01\x00\x21\x0e\x01\x00\x7d\x0e\x01\x00\xd9\x0e\x01\x00\x35\x0f\x01\x00\x91\x0f\x01\x00\xed\x0f\x01\x00\x49\x10\x01\x00\xa5\x10\x01\x00\x01\x11\x01\x00\x5d\x11\x01\x00\xb9\x11\x01\x00\x15\x12\x01\x00\x71\x12\x01\x00\xcd\x12\x01\x00\x29\x13\x01\x00\x85\x13\x01\x00\xe1\x13\x01\x00\x3d\x14\x01\x00\x99\x14\x01\x00\xf5\x14\x01\x00\x51\x15\x01\x00\xad\x15\x01\x00\x09\x16\x01\x00\x65\x16\x01\x00\xc1\x16\x01\x00\x1d\x17\x01\x00\x79\x17\x01\x00\xd5\x17\x01\x00\x31\x18\x01\x00\x8d\x18\x01\x00\xe9\x18\x01\x00\x45\x19\x01\x00\xa1\x19\x01\x00\xfd\x19\x01\x00\x59\x1a\x01\x00\xb5\x1a\x01\x00\x11\x1b\x01\x00\x6d\x1b\x01\x00\xc9\x1b\x01\x00\x25\x1c\x01\x00\x81\x1c\x01\x00\xdd\x1c\x01\x00\x39\x1d\x01\x00\x95\x1d\x01\x00\xf1\x1d\x01\x00\x4d\x1e\x01\x00\xa9\x1e\x01\x00\x05\x1f\x01\x00\x61\x1f\x01\x00\xbd\x1f\x01\x00\x19\x20\x01\x00\x75\x20\x01\x00\xd1\x20\x01\x00\x2d\x21\x01\x00\x89\x21\x01\x00\xe5\x21\x01\x00\x41\x22\x01\x00\x9d\x22\x01\x00\xf9\x22\x01\x00\x55\x23\x01\x00\xb1\x23\x01\x00\x0d\x24\x01\x00\x69\x24\x01\x00\xc5\x24\x01\x00\x21\x25\x01\x00\x7d\x25\x01\x00\xd9\x25\x01\x00\x35\x26\x01\x00\x91\x26\x01\x00\xed\x26\x01\x00\x49\x27\x01\x00\xa5\x27\x01\x00\x01\x28\x01\x00\x5d\x28\x01\x00\xb9\x28\x01\x00\x15\x29\x01\x00\x71\x29\x01\x00\xcd\x29\x01\x00\x29\x2a\x01\x00\x85\x2a\x01\x00\xe1\x2a\x01\x00\x3d\x2b\x01\x00\x99\x2b\x01\x00\xf5\x2b\x01\x00\x51\x2c\x01\x00\xad\x2c\x01\x00\x09\x2d\x01\x00\x65\x2d\x01\x00\xc1\x2d\x01\x00\x1d\x2e\x01\x00\x79\x2e\x01\x00\xd5\x2e\x01\x00\x31\x2f\x01\x00\x8d\x2f\x01\x00\xe9\x2f\x01\x00\x45\x30\x01\x00\xa1\x30\x01\x00\xfd\x30\x01\x00\x59\x31\x01\x00\xb5\x31\x01\x00\x11\x32\x01\x00\x6d\x32\x01\x00\xc9\x32\x01\x00\x25\x33\x01\x00\x81\x33\x01\x00\xdd\x33\x01\x00\x39\x34\x01\x00\x95\x34\x01\x00\xf1\x34\x01\x00\x4d\x35\x01\x00\xa9\x35\x01\x00\x05\x36\x01\x00\x61\x36\x01\x00\xbd\x36\x01\x00\x19\x37\x01\x00\x75\x37\x01\x00\xd1\x37\x01\x00\x2d\x38\x01\x00\x89\x38\x01\x00\xe5\x38\x01\x00\x41\x39\x01\x00\x9d\x39\x01\x00\xf9\x39\x01\x00\x55\x3a\x01\x00\xb1\x3a\x01\x00\x0d\x3b\x01\x00\x69\x3b\x01\x00\xc5\x3b\x01\x00\x21\x3c\x01\x00\x7d\x3c\x01\x00\xd9\x3c\x01\x00\x35\x3d\x01\x00\x91\x3d\x01\x00\xed\x3d\x01\x00\x49\x3e\x01\x00\xa5\x3e\x01\x00\x01\x3f\x01\x00\x5d\x3f\x01\x00\xb9\x3f\x01\x00\x15\x40\x01\x00\x71\x40\x01\x00\xcd\x40\x01\x00\x29\x41\x01\x00\x85\x41\x01\x00\xe1\x41\x01\x00\x3d\x42\x01\x00\x99\x42\x01\x00\xf5\x42\x01\x00\x51\x43\x01\x00\xad\x43\x01\x00\x09\x44\x01\x00\x65\x44\x01\x00\xc1\x44\x01\x00\x1d\x45\x01\x00\x79\x45\x01\x00\xd5\x45\x01\x00\x31\x46\x01\x00\x8d\x46\x01\x00\xe9\x46\x01\x00\x45\x47\x01\x00\xa1\x47\x01\x00\xfd\x47\x01\x00\x59\x48\x01\x00\xb5\x48\x01\x00\x11\x49\x01\x00\x6d\x49\x01\x00\xc9\x49\x01\x00\x25\x4a\x01\x00\x81\x4a\x01\x00\xdd\x4a\x01\x00\x39\x4b\x01\x00\x95\x4b\x01\x00\xf1\x4b\x01\x00\x4d\x4c\x01\x00\xa9\x4c\x01\x00\x05\x4d\x01\x00\x61\x4d\x01\x00\xbd\x4d\x01\x00\x19\x4e\x01\x00\x75\x4e\x01\x00\xd1\x4e\x01\x00\x2d\x4f\x01\x00\x89\x4f\x01\x00\xe5\x4f\x01\x00"# alex_table :: AlexAddr alex_table = AlexA# "\x00\x00\x1d\x01\x3a\x00\x3a\x00\x3a\x00\x10\x01\x3d\x00\x57\x01\x58\x01\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\xf8\x01\x6b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6a\x01\x62\x01\x63\x01\xf8\x01\xf8\x01\xf8\x01\x80\x01\x59\x01\xf8\x01\x72\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x5b\x01\x5a\x01\xf8\x01\x5c\x01\xf8\x01\x5e\x01\x66\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1e\x02\xf8\x01\xf8\x01\xa7\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x65\x01\xf8\x01\xf8\x01\x5d\x01\xf8\x01\xfc\x01\xf8\x01\xd7\x01\x87\x01\xfa\x01\xca\x01\xf8\x01\xe4\x01\x5d\x02\xf8\x01\xf8\x01\x9f\x01\xce\x01\xf7\x01\x22\x02\xe6\x01\xcf\x01\xd8\x01\xe2\x01\xe1\x01\xd3\x01\xf0\x01\xb0\x01\xf8\x01\xf8\x01\xf8\x01\x68\x01\x5f\x01\x69\x01\xf8\x01\x1e\x01\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x3b\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x0a\x00\x3a\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x1a\x00\x14\x00\x14\x00\x19\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x09\x00\x14\x00\x00\x00\x14\x00\x1d\x01\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\xf8\x01\x6b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6a\x01\x62\x01\x63\x01\xf8\x01\xf8\x01\xf8\x01\x80\x01\x59\x01\xf8\x01\x72\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x5b\x01\x5a\x01\xf8\x01\x5c\x01\xf8\x01\x5e\x01\x66\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1e\x02\xf8\x01\xf8\x01\xa7\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x65\x01\xf8\x01\xf8\x01\x5d\x01\xf8\x01\xfc\x01\xf8\x01\xd7\x01\x87\x01\xfa\x01\xca\x01\xf8\x01\xe4\x01\x5d\x02\xf8\x01\xf8\x01\x9f\x01\xce\x01\xf7\x01\x22\x02\xe6\x01\xcf\x01\xd8\x01\xe2\x01\xe1\x01\xd3\x01\xf0\x01\xb0\x01\xf8\x01\xf8\x01\xf8\x01\x68\x01\x5f\x01\x69\x01\xf8\x01\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x0a\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x1a\x00\x14\x00\x14\x00\x19\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x09\x00\x14\x00\x00\x00\x14\x00\xff\xff\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\xf8\x01\x0d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x01\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x7f\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0d\x00\xf8\x01\xf8\x01\x0c\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x9d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x09\x00\xf8\x01\x00\x00\xf8\x01\x1f\x01\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x0a\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x1a\x00\x14\x00\x14\x00\x19\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x09\x00\x14\x00\x00\x00\x14\x00\xff\xff\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x6b\x01\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x9e\x00\xa0\x00\x04\x01\x9f\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x7d\x00\xa4\x00\xab\x00\xdf\x00\xaf\x00\x00\x00\xa8\x00\xe2\x00\xbb\x00\x00\x00\x00\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x01\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x11\x01\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x0b\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x12\x01\x14\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x0f\x00\x3e\x02\x3e\x02\x0e\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x00\x00\x3e\x02\x36\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x0b\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x00\x00\x14\x00\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x11\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x14\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x7d\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x0f\x00\x3e\x02\x3e\x02\x0e\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x00\x00\x3e\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x36\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x38\x00\x11\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2b\x00\x16\x00\x22\x00\x22\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xff\xff\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xff\xff\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe7\x01\xf8\x01\xa2\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x04\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x00\x00\x00\x00\x00\x00\x00\xc9\x00\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x00\xef\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x34\x00\x12\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x29\x00\x17\x00\x20\x00\x20\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xf8\x01\x3f\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xff\xff\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xff\xff\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xff\xff\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xff\xff\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x31\x00\x13\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x27\x00\x18\x00\x1e\x00\x1e\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x14\x01\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x13\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x14\x01\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x16\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x01\x00\x00\x00\x00\x19\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x16\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x01\x00\x00\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x00\x00\x00\x00\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x00\x00\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x00\x00\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x01\x1c\x01\x1c\x01\x1c\x01\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x01\x00\x00\x1c\x01\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x16\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x1a\x01\x17\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x13\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x1a\x01\x17\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x16\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\xff\xff\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x16\x01\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x17\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x16\x01\x00\x00\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2f\x00\x2e\x00\x15\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x1b\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x35\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x36\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x42\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x45\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\x41\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4f\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\x44\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4e\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xec\x01\xf8\x01\xf8\x01\xf8\x01\xc1\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc4\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xaa\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x61\x01\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\x43\x02\xf8\x01\x85\x01\x2c\x00\xf8\x01\x6f\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6c\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3f\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x42\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x42\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\x70\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x42\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x42\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x46\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x2c\x00\xf8\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x47\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x45\x02\x3e\x02\x45\x02\x10\x00\x3e\x02\x78\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x75\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x40\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\xf8\x01\x3e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3f\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x44\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x44\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x7b\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x44\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x44\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x41\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x40\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\xf8\x01\x3e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x1a\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x11\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x1a\x01\x10\x00\xf8\x01\x73\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\x71\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\x64\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x11\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xee\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x12\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xef\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x12\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x12\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x12\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x7a\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x12\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x22\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x35\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x23\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x26\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x27\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x28\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2c\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x30\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x31\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x32\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x33\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x39\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3c\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x48\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x49\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x50\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x51\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x52\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x53\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x54\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x55\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x5e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x5a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x57\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x56\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x55\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x54\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x93\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x53\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x52\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x51\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4d\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x98\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x49\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x9e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3d\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3c\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xae\x01\x3b\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x39\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x38\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x37\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x36\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x34\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x33\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x32\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x31\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x30\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2f\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa3\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa4\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2d\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2c\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2b\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x29\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x28\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x27\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x25\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x24\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x23\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xaf\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0b\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb7\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x19\x02\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x21\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x20\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xbf\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x15\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0f\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc3\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1d\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1b\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe0\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc7\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x18\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x17\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x14\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xcb\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xcc\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x13\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x12\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x11\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x10\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0d\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0c\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd0\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd1\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x09\x02\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd2\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x07\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd4\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x02\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xed\x01\xf8\x01\xf8\x01\xde\x01\xf8\x01\xf8\x01\x06\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xda\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xdb\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xdc\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xdd\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x05\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x03\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x01\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xea\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xff\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xfe\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x81\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x82\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf2\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf3\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x83\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf6\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf4\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xfd\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xeb\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xe3\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x08\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xcd\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x0e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1a\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc6\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1c\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc2\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xc0\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x1f\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xd6\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xbe\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xbd\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xbc\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xbb\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xba\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb9\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb6\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xfb\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf1\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb4\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb3\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb2\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xb1\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xad\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x26\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xac\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xab\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa6\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa5\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa1\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xa0\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xdf\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x9c\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x9b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x9a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x99\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x48\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x97\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x96\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x95\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4c\x02\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x50\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x94\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x92\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x91\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x90\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8f\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x58\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8c\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x59\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x8a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x89\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x88\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x5b\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x5c\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x86\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\xf8\x01\x3e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\x74\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x77\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x76\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\xf8\x01\x3e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\x43\x02\xf8\x01\x85\x01\x10\x00\xf8\x01\x7a\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x7a\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\x79\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x3e\x02\xf8\x01\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x45\x02\x3e\x02\x45\x02\x10\x00\x3e\x02\x7e\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x10\x00\x3e\x02\x7e\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x7c\x01\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x3e\x02\x00\x00\x3e\x02\xf8\x01\x3e\x02\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\x6d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4f\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4e\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4b\x02\xf8\x01\xf8\x01\x4c\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x4b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x47\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x46\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\x43\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\x40\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3f\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3d\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x3b\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x38\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x37\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x34\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2f\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2e\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x2a\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x29\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x25\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x24\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x16\x02\x21\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\x00\x00\xf8\x01\xf8\x01\xf8\x01\x84\x01\x10\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x20\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\x00\x00\xf8\x01\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# alex_check :: AlexAddr alex_check = AlexA# "\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x23\x00\x2e\x00\x2e\x00\x7c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x20\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x20\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\xff\xff\x7e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\xff\xff\x7e\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x21\x00\x23\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\xff\xff\x7e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\xff\xff\x7e\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\xff\xff\x52\x00\x53\x00\x54\x00\xff\xff\xff\xff\x57\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x7c\x00\xff\xff\x7e\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x20\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x20\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7d\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x43\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\x54\x00\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x21\x00\x23\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x20\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7d\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x20\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x2d\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x20\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x2d\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x20\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\x2d\x00\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\x2d\x00\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\x2d\x00\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\x2d\x00\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# alex_deflt :: AlexAddr alex_deflt = AlexA# "\xff\xff\xff\xff\xff\xff\xff\xff\x0e\x01\xff\xff\xff\xff\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x24\x00\x26\x00\x26\x00\x28\x00\x28\x00\x2a\x00\x2a\x00\x2f\x00\x2f\x00\x32\x00\x32\x00\x35\x00\x35\x00\x39\x00\x39\x00\xff\xff\x16\x01\x16\x01\x16\x01\x0e\x01\x0e\x01\x0e\x01\xca\x00\xca\x00\xca\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xca\x00\x0e\x01\x0e\x01\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\x0e\x01\x0e\x01\x0e\x01\x0e\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x15\x01\x15\x01\x16\x01\x1c\x01\x16\x01\x1c\x01\x1b\x01\x1b\x01\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# alex_accept = listArray (0 :: Int, 606) [ AlexAccNone , AlexAccPred 549 ( not' eof )(AlexAccNone) , AlexAccNone , AlexAcc 548 , AlexAccNone , AlexAccNone , AlexAcc 547 , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccNone , AlexAccSkip , AlexAccSkip , AlexAccSkip , AlexAcc 546 , AlexAcc 545 , AlexAcc 544 , AlexAcc 543 , AlexAcc 542 , AlexAcc 541 , AlexAcc 540 , AlexAcc 539 , AlexAcc 538 , AlexAcc 537 , AlexAcc 536 , AlexAcc 535 , AlexAcc 534 , AlexAcc 533 , AlexAcc 532 , AlexAcc 531 , AlexAcc 530 , AlexAcc 529 , AlexAcc 528 , AlexAcc 527 , AlexAcc 526 , AlexAcc 525 , AlexAcc 524 , AlexAcc 523 , AlexAcc 522 , AlexAcc 521 , AlexAcc 520 , AlexAcc 519 , AlexAcc 518 , AlexAcc 517 , AlexAcc 516 , AlexAcc 515 , AlexAcc 514 , AlexAcc 513 , AlexAcc 512 , AlexAcc 511 , AlexAcc 510 , AlexAcc 509 , AlexAcc 508 , AlexAcc 507 , AlexAcc 506 , AlexAcc 505 , AlexAcc 504 , AlexAcc 503 , AlexAcc 502 , AlexAcc 501 , AlexAcc 500 , AlexAcc 499 , AlexAcc 498 , AlexAcc 497 , AlexAcc 496 , AlexAcc 495 , AlexAcc 494 , AlexAcc 493 , AlexAcc 492 , AlexAcc 491 , AlexAcc 490 , AlexAcc 489 , AlexAcc 488 , AlexAcc 487 , AlexAcc 486 , AlexAcc 485 , AlexAcc 484 , AlexAcc 483 , AlexAcc 482 , AlexAcc 481 , AlexAcc 480 , AlexAcc 479 , AlexAcc 478 , AlexAcc 477 , AlexAcc 476 , AlexAcc 475 , AlexAcc 474 , AlexAcc 473 , AlexAcc 472 , AlexAcc 471 , AlexAcc 470 , AlexAcc 469 , AlexAcc 468 , AlexAcc 467 , AlexAcc 466 , AlexAcc 465 , AlexAcc 464 , AlexAcc 463 , AlexAcc 462 , AlexAcc 461 , AlexAcc 460 , AlexAcc 459 , AlexAcc 458 , AlexAcc 457 , AlexAcc 456 , AlexAcc 455 , AlexAcc 454 , AlexAcc 453 , AlexAcc 452 , AlexAcc 451 , AlexAcc 450 , AlexAcc 449 , AlexAcc 448 , AlexAcc 447 , AlexAcc 446 , AlexAcc 445 , AlexAcc 444 , AlexAcc 443 , AlexAcc 442 , AlexAcc 441 , AlexAcc 440 , AlexAcc 439 , AlexAcc 438 , AlexAcc 437 , AlexAcc 436 , AlexAcc 435 , AlexAcc 434 , AlexAcc 433 , AlexAcc 432 , AlexAcc 431 , AlexAcc 430 , AlexAcc 429 , AlexAcc 428 , AlexAcc 427 , AlexAcc 426 , AlexAcc 425 , AlexAcc 424 , AlexAcc 423 , AlexAcc 422 , AlexAcc 421 , AlexAcc 420 , AlexAcc 419 , AlexAcc 418 , AlexAcc 417 , AlexAcc 416 , AlexAcc 415 , AlexAcc 414 , AlexAcc 413 , AlexAcc 412 , AlexAcc 411 , AlexAcc 410 , AlexAcc 409 , AlexAcc 408 , AlexAcc 407 , AlexAcc 406 , AlexAcc 405 , AlexAcc 404 , AlexAcc 403 , AlexAcc 402 , AlexAcc 401 , AlexAcc 400 , AlexAcc 399 , AlexAcc 398 , AlexAcc 397 , AlexAcc 396 , AlexAcc 395 , AlexAcc 394 , AlexAcc 393 , AlexAcc 392 , AlexAcc 391 , AlexAcc 390 , AlexAcc 389 , AlexAcc 388 , AlexAcc 387 , AlexAcc 386 , AlexAcc 385 , AlexAcc 384 , AlexAcc 383 , AlexAcc 382 , AlexAcc 381 , AlexAcc 380 , AlexAcc 379 , AlexAcc 378 , AlexAcc 377 , AlexAcc 376 , AlexAcc 375 , AlexAcc 374 , AlexAcc 373 , AlexAcc 372 , AlexAcc 371 , AlexAcc 370 , AlexAcc 369 , AlexAcc 368 , AlexAcc 367 , AlexAcc 366 , AlexAcc 365 , AlexAcc 364 , AlexAcc 363 , AlexAcc 362 , AlexAcc 361 , AlexAcc 360 , AlexAcc 359 , AlexAcc 358 , AlexAcc 357 , AlexAcc 356 , AlexAcc 355 , AlexAcc 354 , AlexAcc 353 , AlexAcc 352 , AlexAcc 351 , AlexAcc 350 , AlexAcc 349 , AlexAcc 348 , AlexAcc 347 , AlexAcc 346 , AlexAcc 345 , AlexAcc 344 , AlexAcc 343 , AlexAcc 342 , AlexAcc 341 , AlexAcc 340 , AlexAcc 339 , AlexAcc 338 , AlexAcc 337 , AlexAccPred 336 ( not' (followedBy '#') )(AlexAccNone) , AlexAccPred 335 ( not' (followedBy '#') )(AlexAccNone) , AlexAcc 334 , AlexAcc 333 , AlexAcc 332 , AlexAccPred 331 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 330 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 329 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 328 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 327 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 326 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAccNone)) , AlexAccPred 325 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAcc 324)) , AlexAccPred 323 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAcc 322)) , AlexAccPred 321 ( keepComments .&&. (followedBy '\n' .||. eof) )(AlexAccSkipPred ( followedBy '\n' .||. eof )(AlexAcc 320)) , AlexAcc 319 , AlexAccSkip , AlexAccSkip , AlexAcc 318 , AlexAcc 317 , AlexAcc 316 , AlexAcc 315 , AlexAcc 314 , AlexAcc 313 , AlexAcc 312 , AlexAcc 311 , AlexAcc 310 , AlexAcc 309 , AlexAcc 308 , AlexAcc 307 , AlexAcc 306 , AlexAcc 305 , AlexAcc 304 , AlexAcc 303 , AlexAcc 302 , AlexAcc 301 , AlexAcc 300 , AlexAcc 299 , AlexAcc 298 , AlexAcc 297 , AlexAcc 296 , AlexAcc 295 , AlexAcc 294 , AlexAcc 293 , AlexAcc 292 , AlexAcc 291 , AlexAcc 290 , AlexAcc 289 , AlexAcc 288 , AlexAcc 287 , AlexAcc 286 , AlexAcc 285 , AlexAcc 284 , AlexAcc 283 , AlexAcc 282 , AlexAcc 281 , AlexAcc 280 , AlexAcc 279 , AlexAcc 278 , AlexAcc 277 , AlexAcc 276 , AlexAcc 275 , AlexAcc 274 , AlexAcc 273 , AlexAcc 272 , AlexAcc 271 , AlexAcc 270 , AlexAcc 269 , AlexAcc 268 , AlexAcc 267 , AlexAcc 266 , AlexAcc 265 , AlexAcc 264 , AlexAcc 263 , AlexAcc 262 , AlexAcc 261 , AlexAcc 260 , AlexAcc 259 , AlexAcc 258 , AlexAcc 257 , AlexAcc 256 , AlexAcc 255 , AlexAccPred 254 (alexRightContext 8)(AlexAccNone) , AlexAcc 253 , AlexAcc 252 , AlexAcc 251 , AlexAcc 250 , AlexAcc 249 , AlexAcc 248 , AlexAccPred 247 (alexRightContext 55)(AlexAccNone) , AlexAcc 246 , AlexAcc 245 , AlexAcc 244 , AlexAcc 243 , AlexAcc 242 , AlexAcc 241 , AlexAcc 240 , AlexAcc 239 , AlexAcc 238 , AlexAcc 237 , AlexAcc 236 , AlexAcc 235 , AlexAcc 234 , AlexAcc 233 , AlexAcc 232 , AlexAcc 231 , AlexAcc 230 , AlexAcc 229 , AlexAcc 228 , AlexAcc 227 , AlexAcc 226 , AlexAcc 225 , AlexAcc 224 , AlexAcc 223 , AlexAcc 222 , AlexAcc 221 , AlexAcc 220 , AlexAcc 219 , AlexAcc 218 , AlexAcc 217 , AlexAcc 216 , AlexAcc 215 , AlexAcc 214 , AlexAcc 213 , AlexAcc 212 , AlexAcc 211 , AlexAcc 210 , AlexAcc 209 , AlexAcc 208 , AlexAcc 207 , AlexAcc 206 , AlexAcc 205 , AlexAcc 204 , AlexAcc 203 , AlexAcc 202 , AlexAcc 201 , AlexAcc 200 , AlexAcc 199 , AlexAcc 198 , AlexAcc 197 , AlexAcc 196 , AlexAcc 195 , AlexAcc 194 , AlexAcc 193 , AlexAcc 192 , AlexAcc 191 , AlexAcc 190 , AlexAcc 189 , AlexAcc 188 , AlexAcc 187 , AlexAcc 186 , AlexAcc 185 , AlexAcc 184 , AlexAcc 183 , AlexAcc 182 , AlexAcc 181 , AlexAcc 180 , AlexAcc 179 , AlexAcc 178 , AlexAcc 177 , AlexAcc 176 , AlexAcc 175 , AlexAcc 174 , AlexAcc 173 , AlexAcc 172 , AlexAcc 171 , AlexAcc 170 , AlexAcc 169 , AlexAcc 168 , AlexAcc 167 , AlexAcc 166 , AlexAcc 165 , AlexAcc 164 , AlexAcc 163 , AlexAcc 162 , AlexAcc 161 , AlexAcc 160 , AlexAcc 159 , AlexAcc 158 , AlexAcc 157 , AlexAcc 156 , AlexAcc 155 , AlexAcc 154 , AlexAcc 153 , AlexAcc 152 , AlexAcc 151 , AlexAcc 150 , AlexAcc 149 , AlexAcc 148 , AlexAcc 147 , AlexAcc 146 , AlexAcc 145 , AlexAcc 144 , AlexAcc 143 , AlexAcc 142 , AlexAcc 141 , AlexAcc 140 , AlexAcc 139 , AlexAcc 138 , AlexAcc 137 , AlexAcc 136 , AlexAcc 135 , AlexAcc 134 , AlexAcc 133 , AlexAcc 132 , AlexAcc 131 , AlexAcc 130 , AlexAcc 129 , AlexAcc 128 , AlexAcc 127 , AlexAcc 126 , AlexAcc 125 , AlexAcc 124 , AlexAcc 123 , AlexAcc 122 , AlexAcc 121 , AlexAcc 120 , AlexAcc 119 , AlexAcc 118 , AlexAcc 117 , AlexAcc 116 , AlexAcc 115 , AlexAcc 114 , AlexAcc 113 , AlexAcc 112 , AlexAcc 111 , AlexAcc 110 , AlexAcc 109 , AlexAcc 108 , AlexAcc 107 , AlexAcc 106 , AlexAcc 105 , AlexAcc 104 , AlexAcc 103 , AlexAcc 102 , AlexAcc 101 , AlexAcc 100 , AlexAcc 99 , AlexAcc 98 , AlexAcc 97 , AlexAcc 96 , AlexAcc 95 , AlexAcc 94 , AlexAcc 93 , AlexAcc 92 , AlexAcc 91 , AlexAcc 90 , AlexAcc 89 , AlexAcc 88 , AlexAcc 87 , AlexAcc 86 , AlexAcc 85 , AlexAcc 84 , AlexAcc 83 , AlexAcc 82 , AlexAcc 81 , AlexAcc 80 , AlexAcc 79 , AlexAcc 78 , AlexAcc 77 , AlexAcc 76 , AlexAcc 75 , AlexAcc 74 , AlexAcc 73 , AlexAcc 72 , AlexAcc 71 , AlexAcc 70 , AlexAcc 69 , AlexAcc 68 , AlexAcc 67 , AlexAcc 66 , AlexAcc 65 , AlexAcc 64 , AlexAcc 63 , AlexAcc 62 , AlexAcc 61 , AlexAcc 60 , AlexAcc 59 , AlexAcc 58 , AlexAcc 57 , AlexAcc 56 , AlexAcc 55 , AlexAcc 54 , AlexAcc 53 , AlexAcc 52 , AlexAcc 51 , AlexAcc 50 , AlexAcc 49 , AlexAcc 48 , AlexAcc 47 , AlexAcc 46 , AlexAcc 45 , AlexAcc 44 , AlexAcc 43 , AlexAcc 42 , AlexAcc 41 , AlexAcc 40 , AlexAcc 39 , AlexAcc 38 , AlexAcc 37 , AlexAcc 36 , AlexAcc 35 , AlexAcc 34 , AlexAcc 33 , AlexAcc 32 , AlexAcc 31 , AlexAcc 30 , AlexAcc 29 , AlexAcc 28 , AlexAcc 27 , AlexAcc 26 , AlexAcc 25 , AlexAcc 24 , AlexAcc 23 , AlexAcc 22 , AlexAcc 21 , AlexAcc 20 , AlexAcc 19 , AlexAcc 18 , AlexAcc 17 , AlexAcc 16 , AlexAcc 15 , AlexAcc 14 , AlexAcc 13 , AlexAcc 12 , AlexAcc 11 , AlexAcc 10 , AlexAcc 9 , AlexAcc 8 , AlexAcc 7 , AlexAcc 6 , AlexAcc 5 , AlexAcc 4 , AlexAcc 3 , AlexAcc 2 , AlexAcc 1 , AlexAcc 0 ] alex_actions = array (0 :: Int, 550) [ (549,alex_action_36) , (548,alex_action_39) , (547,alex_action_38) , (546,alex_action_2) , (545,alex_action_2) , (544,alex_action_3) , (543,alex_action_4) , (542,alex_action_4) , (541,alex_action_5) , (540,alex_action_6) , (539,alex_action_7) , (538,alex_action_8) , (537,alex_action_9) , (536,alex_action_10) , (535,alex_action_11) , (534,alex_action_12) , (533,alex_action_13) , (532,alex_action_14) , (531,alex_action_15) , (530,alex_action_16) , (529,alex_action_17) , (528,alex_action_18) , (527,alex_action_19) , (526,alex_action_20) , (525,alex_action_21) , (524,alex_action_22) , (523,alex_action_23) , (522,alex_action_24) , (521,alex_action_25) , (520,alex_action_26) , (519,alex_action_27) , (518,alex_action_27) , (517,alex_action_27) , (516,alex_action_27) , (515,alex_action_27) , (514,alex_action_27) , (513,alex_action_27) , (512,alex_action_27) , (511,alex_action_27) , (510,alex_action_27) , (509,alex_action_27) , (508,alex_action_27) , (507,alex_action_27) , (506,alex_action_27) , (505,alex_action_27) , (504,alex_action_27) , (503,alex_action_27) , (502,alex_action_27) , (501,alex_action_27) , (500,alex_action_27) , (499,alex_action_27) , (498,alex_action_27) , (497,alex_action_27) , (496,alex_action_27) , (495,alex_action_27) , (494,alex_action_27) , (493,alex_action_27) , (492,alex_action_27) , (491,alex_action_27) , (490,alex_action_27) , (489,alex_action_27) , (488,alex_action_27) , (487,alex_action_27) , (486,alex_action_27) , (485,alex_action_27) , (484,alex_action_27) , (483,alex_action_27) , (482,alex_action_27) , (481,alex_action_27) , (480,alex_action_27) , (479,alex_action_27) , (478,alex_action_27) , (477,alex_action_27) , (476,alex_action_27) , (475,alex_action_27) , (474,alex_action_27) , (473,alex_action_27) , (472,alex_action_27) , (471,alex_action_27) , (470,alex_action_27) , (469,alex_action_27) , (468,alex_action_27) , (467,alex_action_27) , (466,alex_action_27) , (465,alex_action_27) , (464,alex_action_27) , (463,alex_action_27) , (462,alex_action_27) , (461,alex_action_27) , (460,alex_action_27) , (459,alex_action_27) , (458,alex_action_27) , (457,alex_action_27) , (456,alex_action_27) , (455,alex_action_27) , (454,alex_action_27) , (453,alex_action_27) , (452,alex_action_27) , (451,alex_action_27) , (450,alex_action_27) , (449,alex_action_27) , (448,alex_action_27) , (447,alex_action_27) , (446,alex_action_27) , (445,alex_action_27) , (444,alex_action_27) , (443,alex_action_27) , (442,alex_action_27) , (441,alex_action_27) , (440,alex_action_27) , (439,alex_action_27) , (438,alex_action_27) , (437,alex_action_27) , (436,alex_action_27) , (435,alex_action_27) , (434,alex_action_27) , (433,alex_action_27) , (432,alex_action_27) , (431,alex_action_27) , (430,alex_action_27) , (429,alex_action_27) , (428,alex_action_27) , (427,alex_action_27) , (426,alex_action_27) , (425,alex_action_27) , (424,alex_action_27) , (423,alex_action_27) , (422,alex_action_27) , (421,alex_action_27) , (420,alex_action_27) , (419,alex_action_27) , (418,alex_action_27) , (417,alex_action_27) , (416,alex_action_27) , (415,alex_action_27) , (414,alex_action_27) , (413,alex_action_27) , (412,alex_action_27) , (411,alex_action_27) , (410,alex_action_27) , (409,alex_action_27) , (408,alex_action_27) , (407,alex_action_27) , (406,alex_action_27) , (405,alex_action_27) , (404,alex_action_27) , (403,alex_action_27) , (402,alex_action_27) , (401,alex_action_27) , (400,alex_action_27) , (399,alex_action_27) , (398,alex_action_27) , (397,alex_action_27) , (396,alex_action_27) , (395,alex_action_27) , (394,alex_action_27) , (393,alex_action_27) , (392,alex_action_27) , (391,alex_action_27) , (390,alex_action_27) , (389,alex_action_27) , (388,alex_action_27) , (387,alex_action_27) , (386,alex_action_27) , (385,alex_action_27) , (384,alex_action_27) , (383,alex_action_27) , (382,alex_action_27) , (381,alex_action_27) , (380,alex_action_27) , (379,alex_action_27) , (378,alex_action_27) , (377,alex_action_27) , (376,alex_action_27) , (375,alex_action_27) , (374,alex_action_27) , (373,alex_action_27) , (372,alex_action_27) , (371,alex_action_27) , (370,alex_action_27) , (369,alex_action_27) , (368,alex_action_27) , (367,alex_action_27) , (366,alex_action_27) , (365,alex_action_27) , (364,alex_action_27) , (363,alex_action_27) , (362,alex_action_27) , (361,alex_action_27) , (360,alex_action_27) , (359,alex_action_27) , (358,alex_action_27) , (357,alex_action_27) , (356,alex_action_27) , (355,alex_action_27) , (354,alex_action_27) , (353,alex_action_27) , (352,alex_action_27) , (351,alex_action_27) , (350,alex_action_27) , (349,alex_action_27) , (348,alex_action_27) , (347,alex_action_27) , (346,alex_action_27) , (345,alex_action_27) , (344,alex_action_27) , (343,alex_action_27) , (342,alex_action_27) , (341,alex_action_28) , (340,alex_action_28) , (339,alex_action_28) , (338,alex_action_28) , (337,alex_action_28) , (336,alex_action_29) , (335,alex_action_29) , (334,alex_action_30) , (333,alex_action_31) , (332,alex_action_31) , (331,alex_action_32) , (330,alex_action_32) , (329,alex_action_32) , (328,alex_action_32) , (327,alex_action_32) , (326,alex_action_32) , (325,alex_action_32) , (324,alex_action_114) , (323,alex_action_32) , (322,alex_action_114) , (321,alex_action_32) , (320,alex_action_114) , (319,alex_action_34) , (318,alex_action_40) , (317,alex_action_41) , (316,alex_action_42) , (315,alex_action_43) , (314,alex_action_44) , (313,alex_action_45) , (312,alex_action_46) , (311,alex_action_47) , (310,alex_action_48) , (309,alex_action_49) , (308,alex_action_50) , (307,alex_action_51) , (306,alex_action_52) , (305,alex_action_53) , (304,alex_action_54) , (303,alex_action_55) , (302,alex_action_56) , (301,alex_action_57) , (300,alex_action_58) , (299,alex_action_59) , (298,alex_action_60) , (297,alex_action_61) , (296,alex_action_62) , (295,alex_action_63) , (294,alex_action_64) , (293,alex_action_65) , (292,alex_action_66) , (291,alex_action_67) , (290,alex_action_68) , (289,alex_action_69) , (288,alex_action_70) , (287,alex_action_71) , (286,alex_action_72) , (285,alex_action_72) , (284,alex_action_72) , (283,alex_action_73) , (282,alex_action_73) , (281,alex_action_73) , (280,alex_action_74) , (279,alex_action_75) , (278,alex_action_76) , (277,alex_action_77) , (276,alex_action_78) , (275,alex_action_79) , (274,alex_action_80) , (273,alex_action_81) , (272,alex_action_82) , (271,alex_action_83) , (270,alex_action_84) , (269,alex_action_85) , (268,alex_action_86) , (267,alex_action_87) , (266,alex_action_88) , (265,alex_action_89) , (264,alex_action_90) , (263,alex_action_91) , (262,alex_action_92) , (261,alex_action_93) , (260,alex_action_94) , (259,alex_action_95) , (258,alex_action_96) , (257,alex_action_97) , (256,alex_action_98) , (255,alex_action_99) , (254,alex_action_100) , (253,alex_action_101) , (252,alex_action_102) , (251,alex_action_103) , (250,alex_action_104) , (249,alex_action_105) , (248,alex_action_106) , (247,alex_action_107) , (246,alex_action_108) , (245,alex_action_109) , (244,alex_action_110) , (243,alex_action_111) , (242,alex_action_112) , (241,alex_action_112) , (240,alex_action_112) , (239,alex_action_112) , (238,alex_action_112) , (237,alex_action_112) , (236,alex_action_112) , (235,alex_action_112) , (234,alex_action_113) , (233,alex_action_113) , (232,alex_action_113) , (231,alex_action_113) , (230,alex_action_113) , (229,alex_action_113) , (228,alex_action_113) , (227,alex_action_113) , (226,alex_action_113) , (225,alex_action_113) , (224,alex_action_113) , (223,alex_action_114) , (222,alex_action_114) , (221,alex_action_114) , (220,alex_action_114) , (219,alex_action_114) , (218,alex_action_114) , (217,alex_action_114) , (216,alex_action_114) , (215,alex_action_114) , (214,alex_action_114) , (213,alex_action_114) , (212,alex_action_114) , (211,alex_action_114) , (210,alex_action_114) , (209,alex_action_114) , (208,alex_action_114) , (207,alex_action_114) , (206,alex_action_114) , (205,alex_action_114) , (204,alex_action_114) , (203,alex_action_114) , (202,alex_action_114) , (201,alex_action_114) , (200,alex_action_114) , (199,alex_action_114) , (198,alex_action_114) , (197,alex_action_114) , (196,alex_action_114) , (195,alex_action_114) , (194,alex_action_114) , (193,alex_action_114) , (192,alex_action_114) , (191,alex_action_114) , (190,alex_action_114) , (189,alex_action_114) , (188,alex_action_114) , (187,alex_action_114) , (186,alex_action_114) , (185,alex_action_114) , (184,alex_action_114) , (183,alex_action_114) , (182,alex_action_114) , (181,alex_action_114) , (180,alex_action_114) , (179,alex_action_114) , (178,alex_action_114) , (177,alex_action_114) , (176,alex_action_114) , (175,alex_action_114) , (174,alex_action_114) , (173,alex_action_114) , (172,alex_action_114) , (171,alex_action_114) , (170,alex_action_114) , (169,alex_action_114) , (168,alex_action_114) , (167,alex_action_114) , (166,alex_action_114) , (165,alex_action_114) , (164,alex_action_114) , (163,alex_action_114) , (162,alex_action_114) , (161,alex_action_114) , (160,alex_action_114) , (159,alex_action_114) , (158,alex_action_114) , (157,alex_action_114) , (156,alex_action_114) , (155,alex_action_114) , (154,alex_action_114) , (153,alex_action_114) , (152,alex_action_114) , (151,alex_action_114) , (150,alex_action_114) , (149,alex_action_114) , (148,alex_action_114) , (147,alex_action_114) , (146,alex_action_114) , (145,alex_action_114) , (144,alex_action_114) , (143,alex_action_114) , (142,alex_action_114) , (141,alex_action_114) , (140,alex_action_114) , (139,alex_action_114) , (138,alex_action_114) , (137,alex_action_114) , (136,alex_action_114) , (135,alex_action_114) , (134,alex_action_114) , (133,alex_action_114) , (132,alex_action_114) , (131,alex_action_114) , (130,alex_action_114) , (129,alex_action_114) , (128,alex_action_114) , (127,alex_action_114) , (126,alex_action_114) , (125,alex_action_114) , (124,alex_action_114) , (123,alex_action_114) , (122,alex_action_114) , (121,alex_action_114) , (120,alex_action_114) , (119,alex_action_114) , (118,alex_action_114) , (117,alex_action_114) , (116,alex_action_114) , (115,alex_action_114) , (114,alex_action_114) , (113,alex_action_114) , (112,alex_action_114) , (111,alex_action_114) , (110,alex_action_114) , (109,alex_action_114) , (108,alex_action_114) , (107,alex_action_114) , (106,alex_action_114) , (105,alex_action_114) , (104,alex_action_114) , (103,alex_action_114) , (102,alex_action_114) , (101,alex_action_114) , (100,alex_action_114) , (99,alex_action_114) , (98,alex_action_114) , (97,alex_action_114) , (96,alex_action_114) , (95,alex_action_114) , (94,alex_action_114) , (93,alex_action_114) , (92,alex_action_114) , (91,alex_action_114) , (90,alex_action_114) , (89,alex_action_114) , (88,alex_action_114) , (87,alex_action_114) , (86,alex_action_114) , (85,alex_action_114) , (84,alex_action_114) , (83,alex_action_114) , (82,alex_action_114) , (81,alex_action_114) , (80,alex_action_114) , (79,alex_action_114) , (78,alex_action_114) , (77,alex_action_114) , (76,alex_action_114) , (75,alex_action_114) , (74,alex_action_114) , (73,alex_action_114) , (72,alex_action_114) , (71,alex_action_114) , (70,alex_action_114) , (69,alex_action_114) , (68,alex_action_114) , (67,alex_action_114) , (66,alex_action_114) , (65,alex_action_114) , (64,alex_action_114) , (63,alex_action_114) , (62,alex_action_114) , (61,alex_action_114) , (60,alex_action_114) , (59,alex_action_114) , (58,alex_action_114) , (57,alex_action_114) , (56,alex_action_114) , (55,alex_action_114) , (54,alex_action_114) , (53,alex_action_114) , (52,alex_action_114) , (51,alex_action_114) , (50,alex_action_114) , (49,alex_action_114) , (48,alex_action_114) , (47,alex_action_114) , (46,alex_action_114) , (45,alex_action_114) , (44,alex_action_114) , (43,alex_action_114) , (42,alex_action_114) , (41,alex_action_114) , (40,alex_action_114) , (39,alex_action_114) , (38,alex_action_114) , (37,alex_action_114) , (36,alex_action_114) , (35,alex_action_114) , (34,alex_action_114) , (33,alex_action_114) , (32,alex_action_114) , (31,alex_action_114) , (30,alex_action_114) , (29,alex_action_114) , (28,alex_action_114) , (27,alex_action_114) , (26,alex_action_114) , (25,alex_action_114) , (24,alex_action_114) , (23,alex_action_114) , (22,alex_action_114) , (21,alex_action_114) , (20,alex_action_114) , (19,alex_action_114) , (18,alex_action_114) , (17,alex_action_114) , (16,alex_action_114) , (15,alex_action_114) , (14,alex_action_114) , (13,alex_action_114) , (12,alex_action_114) , (11,alex_action_114) , (10,alex_action_114) , (9,alex_action_114) , (8,alex_action_114) , (7,alex_action_114) , (6,alex_action_114) , (5,alex_action_114) , (4,alex_action_114) , (3,alex_action_114) , (2,alex_action_114) , (1,alex_action_114) , (0,alex_action_114) ] {-# LINE 239 "src/full/Agda/Syntax/Parser/Lexer.x" #-} -- | This is the initial state for parsing a regular, non-literate file. normal :: LexState normal = 0 {-| The layout state. Entered when we see a layout keyword ('withLayout') and exited either when seeing an open brace ('openBrace') or at the next token ('newLayoutContext'). Update: we don't use braces for layout anymore. -} layout :: LexState layout = layout_ {-| The state inside a pragma. -} pragma :: LexState pragma = pragma_ -- | The state inside a FOREIGN pragma. This needs to be different so that we don't -- lex further strings as pragma keywords. fpragma :: LexState fpragma = fpragma_ {-| We enter this state from 'newLayoutContext' when the token following a layout keyword is to the left of (or at the same column as) the current layout context. Example: > data Empty : Set where > foo : Empty -> Nat Here the second line is not part of the @where@ clause since it is has the same indentation as the @data@ definition. What we have to do is insert an empty layout block @{}@ after the @where@. The only thing that can happen in this state is that 'emptyLayout' is executed, generating the closing brace. The open brace is generated when entering by 'newLayoutContext'. -} empty_layout :: LexState empty_layout = empty_layout_ -- | This state is entered at the beginning of each line. You can't lex -- anything in this state, and to exit you have to check the layout rule. -- Done with 'offsideRule'. bol :: LexState bol = bol_ -- | This state can only be entered by the parser. In this state you can only -- lex the keywords @using@, @hiding@, @renaming@ and @to@. Moreover they are -- only keywords in this particular state. The lexer will never enter this -- state by itself, that has to be done in the parser. imp_dir :: LexState imp_dir = imp_dir_ -- | Return the next token. This is the function used by Happy in the parser. -- -- @lexer k = 'lexToken' >>= k@ lexer :: (Token -> Parser a) -> Parser a lexer k = lexToken >>= k -- | Do not use this function; it sets the 'ParseFlags' to -- 'undefined'. alexScan :: AlexInput -> Int -> AlexReturn (LexAction Token) -- | This is the main lexing function generated by Alex. alexScanUser :: ([LexState], ParseFlags) -> AlexInput -> Int -> AlexReturn (LexAction Token) bol_,code,empty_layout_,fpragma_,imp_dir_,layout_,pragma_ :: Int bol_ = 1 code = 2 empty_layout_ = 3 fpragma_ = 4 imp_dir_ = 5 layout_ = 6 pragma_ = 7 alex_action_2 = beginWith pragma $ symbol SymOpenPragma alex_action_3 = beginWith fpragma $ symbol SymOpenPragma alex_action_4 = endWith $ symbol SymClosePragma alex_action_5 = keyword KwBUILTIN alex_action_6 = keyword KwCATCHALL alex_action_7 = endWith $ beginWith fpragma $ keyword KwCOMPILE alex_action_8 = endWith $ beginWith fpragma $ keyword KwFOREIGN alex_action_9 = keyword KwDISPLAY alex_action_10 = keyword KwETA alex_action_11 = keyword KwIMPOSSIBLE alex_action_12 = keyword KwINJECTIVE alex_action_13 = keyword KwINLINE alex_action_14 = keyword KwNOINLINE alex_action_15 = keyword KwLINE alex_action_16 = keyword KwMEASURE alex_action_17 = keyword KwNO_POSITIVITY_CHECK alex_action_18 = keyword KwNO_TERMINATION_CHECK alex_action_19 = keyword KwNO_UNIVERSE_CHECK alex_action_20 = keyword KwNON_TERMINATING alex_action_21 = keyword KwOPTIONS alex_action_22 = keyword KwPOLARITY alex_action_23 = keyword KwREWRITE alex_action_24 = keyword KwSTATIC alex_action_25 = keyword KwTERMINATING alex_action_26 = keyword KwWARNING_ON_USAGE alex_action_27 = withInterval $ TokString alex_action_28 = withInterval $ TokString alex_action_29 = nestedComment alex_action_30 = symbol SymEndComment alex_action_31 = symbol SymEndComment alex_action_32 = withInterval TokComment alex_action_34 = begin bol_ alex_action_36 = offsideRule alex_action_38 = endWith newLayoutContext alex_action_39 = emptyLayout alex_action_40 = keyword KwLet alex_action_41 = keyword KwIn alex_action_42 = keyword KwWhere alex_action_43 = keyword KwDo alex_action_44 = keyword KwField alex_action_45 = keyword KwWith alex_action_46 = keyword KwRewrite alex_action_47 = keyword KwPostulate alex_action_48 = keyword KwPrimitive alex_action_49 = keyword KwOpen alex_action_50 = keyword KwImport alex_action_51 = keyword KwModule alex_action_52 = keyword KwData alex_action_53 = keyword KwCoData alex_action_54 = keyword KwRecord alex_action_55 = keyword KwConstructor alex_action_56 = keyword KwInductive alex_action_57 = keyword KwCoInductive alex_action_58 = keyword KwEta alex_action_59 = keyword KwNoEta alex_action_60 = keyword KwInfix alex_action_61 = keyword KwInfixL alex_action_62 = keyword KwInfixR alex_action_63 = keyword KwMutual alex_action_64 = keyword KwAbstract alex_action_65 = keyword KwPrivate alex_action_66 = keyword KwInstance alex_action_67 = keyword KwOverlap alex_action_68 = keyword KwMacro alex_action_69 = keyword KwSet alex_action_70 = keyword KwProp alex_action_71 = keyword KwForall alex_action_72 = withInterval' (read . drop 3) TokSetN alex_action_73 = withInterval' (read . drop 4) TokPropN alex_action_74 = keyword KwQuoteGoal alex_action_75 = keyword KwQuoteContext alex_action_76 = keyword KwQuote alex_action_77 = keyword KwQuoteTerm alex_action_78 = keyword KwUnquote alex_action_79 = keyword KwUnquoteDecl alex_action_80 = keyword KwUnquoteDef alex_action_81 = keyword KwTactic alex_action_82 = keyword KwSyntax alex_action_83 = keyword KwPatternSyn alex_action_84 = keyword KwVariable alex_action_85 = keyword KwUsing alex_action_86 = keyword KwHiding alex_action_87 = keyword KwRenaming alex_action_88 = endWith $ keyword KwTo alex_action_89 = keyword KwPublic alex_action_90 = hole alex_action_91 = symbol SymEllipsis alex_action_92 = symbol SymDotDot alex_action_93 = symbol SymDot alex_action_94 = symbol SymSemi alex_action_95 = symbol SymColon alex_action_96 = symbol SymEqual alex_action_97 = symbol SymUnderscore alex_action_98 = symbol SymQuestionMark alex_action_99 = symbol SymBar alex_action_100 = symbol SymOpenIdiomBracket alex_action_101 = symbol SymCloseIdiomBracket alex_action_102 = symbol SymOpenParen alex_action_103 = symbol SymCloseParen alex_action_104 = symbol SymArrow alex_action_105 = symbol SymLambda alex_action_106 = symbol SymAs alex_action_107 = symbol SymDoubleOpenBrace alex_action_108 = symbol SymOpenBrace alex_action_109 = symbol SymCloseBrace alex_action_110 = litChar alex_action_111 = litString alex_action_112 = literal LitNat alex_action_113 = literal LitFloat alex_action_114 = identifier {-# LINE 1 "templates/GenericTemplate.hs" #-} -- ----------------------------------------------------------------------------- -- ALEX TEMPLATE -- -- This code is in the PUBLIC DOMAIN; you may copy it freely and use -- it for any purpose whatsoever. -- ----------------------------------------------------------------------------- -- INTERNALS and main scanner engine -- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. #if __GLASGOW_HASKELL__ > 706 #define GTE(n,m) (tagToEnum# (n >=# m)) #define EQ(n,m) (tagToEnum# (n ==# m)) #else #define GTE(n,m) (n >=# m) #define EQ(n,m) (n ==# m) #endif data AlexAddr = AlexA# Addr# -- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. #if __GLASGOW_HASKELL__ < 503 uncheckedShiftL# = shiftL# #endif {-# INLINE alexIndexInt16OffAddr #-} alexIndexInt16OffAddr (AlexA# arr) off = #ifdef WORDS_BIGENDIAN narrow16Int# i where i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low) high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) low = int2Word# (ord# (indexCharOffAddr# arr off')) off' = off *# 2# #else indexInt16OffAddr# arr off #endif {-# INLINE alexIndexInt32OffAddr #-} alexIndexInt32OffAddr (AlexA# arr) off = #ifdef WORDS_BIGENDIAN narrow32Int# i where i = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#` (b2 `uncheckedShiftL#` 16#) `or#` (b1 `uncheckedShiftL#` 8#) `or#` b0) b3 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#))) b2 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#))) b1 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) b0 = int2Word# (ord# (indexCharOffAddr# arr off')) off' = off *# 4# #else indexInt32OffAddr# arr off #endif #if __GLASGOW_HASKELL__ < 503 quickIndex arr i = arr ! i #else -- GHC >= 503, unsafeAt is available from Data.Array.Base. quickIndex = unsafeAt #endif -- ----------------------------------------------------------------------------- -- Main lexing routines data AlexReturn a = AlexEOF | AlexError !AlexInput | AlexSkip !AlexInput !Int | AlexToken !AlexInput !Int a -- alexScan :: AlexInput -> StartCode -> AlexReturn a alexScan input__ (I# (sc)) = alexScanUser undefined input__ (I# (sc)) alexScanUser user__ input__ (I# (sc)) = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of (AlexNone, input__') -> case alexGetByte input__ of Nothing -> AlexEOF Just _ -> AlexError input__' (AlexLastSkip input__'' len, _) -> AlexSkip input__'' len (AlexLastAcc k input__''' len, _) -> AlexToken input__''' len (alex_actions ! k) -- Push the input through the DFA, remembering the most recent accepting -- state it encountered. alex_scan_tkn user__ orig_input len input__ s last_acc = input__ `seq` -- strict in the input let new_acc = (check_accs (alex_accept `quickIndex` (I# (s)))) in new_acc `seq` case alexGetByte input__ of Nothing -> (new_acc, input__) Just (c, new_input) -> case fromIntegral c of { (I# (ord_c)) -> let base = alexIndexInt32OffAddr alex_base s offset = (base +# ord_c) check = alexIndexInt16OffAddr alex_check offset new_s = if GTE(offset,0#) && EQ(check,ord_c) then alexIndexInt16OffAddr alex_table offset else alexIndexInt16OffAddr alex_deflt s in case new_s of -1# -> (new_acc, input__) -- on an error, we want to keep the input *before* the -- character that failed, not after. _ -> alex_scan_tkn user__ orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len) -- note that the length is increased ONLY if this is the 1st byte in a char encoding) new_input new_s new_acc } where check_accs (AlexAccNone) = last_acc check_accs (AlexAcc a ) = AlexLastAcc a input__ (I# (len)) check_accs (AlexAccSkip) = AlexLastSkip input__ (I# (len)) check_accs (AlexAccPred a predx rest) | predx user__ orig_input (I# (len)) input__ = AlexLastAcc a input__ (I# (len)) | otherwise = check_accs rest check_accs (AlexAccSkipPred predx rest) | predx user__ orig_input (I# (len)) input__ = AlexLastSkip input__ (I# (len)) | otherwise = check_accs rest data AlexLastAcc = AlexNone | AlexLastAcc !Int !AlexInput !Int | AlexLastSkip !AlexInput !Int data AlexAcc user = AlexAccNone | AlexAcc Int | AlexAccSkip | AlexAccPred Int (AlexAccPred user) (AlexAcc user) | AlexAccSkipPred (AlexAccPred user) (AlexAcc user) type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool -- ----------------------------------------------------------------------------- -- Predicates on a rule alexAndPred p1 p2 user__ in1 len in2 = p1 user__ in1 len in2 && p2 user__ in1 len in2 --alexPrevCharIsPred :: Char -> AlexAccPred _ alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__ alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__) --alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _ alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__ --alexRightContext :: Int -> AlexAccPred _ alexRightContext (I# (sc)) user__ _ _ input__ = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of (AlexNone, _) -> False _ -> True -- TODO: there's no need to find the longest -- match when checking the right context, just -- the first match will do. Agda-2.6.0.1/dist/build/Agda/Syntax/Parser/Parser.hs0000644000000000000000000224263113466402171020126 0ustar0000000000000000{-# OPTIONS_GHC -w #-} {-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-} #if __GLASGOW_HASKELL__ >= 710 {-# OPTIONS_GHC -XPartialTypeSignatures #-} #endif {-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} {-| The parser is generated by Happy (). - - Ideally, ranges should be as precise as possible, to get messages that - emphasize precisely the faulting term(s) upon error. - - However, interactive highlighting is only applied at the end of each - mutual block, keywords are only highlighted once (see - `TypeChecking.Rules.Decl'). So if the ranges of two declarations - interleave, one must ensure that keyword ranges are not included in - the intersection. (Otherwise they are uncolored by the interactive - highlighting.) - -} module Agda.Syntax.Parser.Parser ( moduleParser , moduleNameParser , exprParser , exprWhereParser , tokensParser , holeContentParser , splitOnDots -- only used by the internal test-suite ) where import Control.Monad import Data.Char import Data.Functor import Data.List import Data.Maybe import Data.Monoid import qualified Data.Traversable as T import Debug.Trace import Agda.Syntax.Position hiding (tests) import Agda.Syntax.Parser.Monad import Agda.Syntax.Parser.Lexer import Agda.Syntax.Parser.Tokens import Agda.Syntax.Concrete as C import Agda.Syntax.Concrete.Attribute import Agda.Syntax.Concrete.Pattern import Agda.Syntax.Concrete.Pretty () import Agda.Syntax.Common import Agda.Syntax.Fixity import Agda.Syntax.Notation import Agda.Syntax.Literal import Agda.TypeChecking.Positivity.Occurrence hiding (tests) import Agda.Utils.Either hiding (tests) import Agda.Utils.Functor import Agda.Utils.Hash import Agda.Utils.List ( spanJust, chopWhen ) import Agda.Utils.Monad import Agda.Utils.Pretty import Agda.Utils.Singleton import Agda.Utils.Tuple import qualified Agda.Utils.Maybe.Strict as Strict import Agda.Utils.Impossible #include "undefined.h" import qualified Data.Array as Happy_Data_Array import qualified Data.Bits as Bits import qualified GHC.Exts as Happy_GHC_Exts import Control.Applicative(Applicative(..)) import Control.Monad (ap) -- parser produced by Happy Version 1.19.9 newtype HappyAbsSyn = HappyAbsSyn HappyAny #if __GLASGOW_HASKELL__ >= 607 type HappyAny = Happy_GHC_Exts.Any #else type HappyAny = forall a . a #endif happyIn10 :: ([Token]) -> (HappyAbsSyn ) happyIn10 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn10 #-} happyOut10 :: (HappyAbsSyn ) -> ([Token]) happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut10 #-} happyIn11 :: ([Token]) -> (HappyAbsSyn ) happyIn11 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn11 #-} happyOut11 :: (HappyAbsSyn ) -> ([Token]) happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut11 #-} happyIn12 :: (Token) -> (HappyAbsSyn ) happyIn12 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn12 #-} happyOut12 :: (HappyAbsSyn ) -> (Token) happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut12 #-} happyIn13 :: (([Pragma], [Declaration])) -> (HappyAbsSyn ) happyIn13 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn13 #-} happyOut13 :: (HappyAbsSyn ) -> (([Pragma], [Declaration])) happyOut13 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut13 #-} happyIn14 :: (()) -> (HappyAbsSyn ) happyIn14 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn14 #-} happyOut14 :: (HappyAbsSyn ) -> (()) happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut14 #-} happyIn15 :: (()) -> (HappyAbsSyn ) happyIn15 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn15 #-} happyOut15 :: (HappyAbsSyn ) -> (()) happyOut15 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut15 #-} happyIn16 :: (Interval) -> (HappyAbsSyn ) happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn16 #-} happyOut16 :: (HappyAbsSyn ) -> (Interval) happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut16 #-} happyIn17 :: (()) -> (HappyAbsSyn ) happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn17 #-} happyOut17 :: (HappyAbsSyn ) -> (()) happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut17 #-} happyIn18 :: (Integer) -> (HappyAbsSyn ) happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn18 #-} happyOut18 :: (HappyAbsSyn ) -> (Integer) happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut18 #-} happyIn19 :: (Name) -> (HappyAbsSyn ) happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn19 #-} happyOut19 :: (HappyAbsSyn ) -> (Name) happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut19 #-} happyIn20 :: ([Name]) -> (HappyAbsSyn ) happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn20 #-} happyOut20 :: (HappyAbsSyn ) -> ([Name]) happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut20 #-} happyIn21 :: (Range) -> (HappyAbsSyn ) happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn21 #-} happyOut21 :: (HappyAbsSyn ) -> (Range) happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut21 #-} happyIn22 :: (Arg Name) -> (HappyAbsSyn ) happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn22 #-} happyOut22 :: (HappyAbsSyn ) -> (Arg Name) happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut22 #-} happyIn23 :: ([Arg Name]) -> (HappyAbsSyn ) happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn23 #-} happyOut23 :: (HappyAbsSyn ) -> ([Arg Name]) happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut23 #-} happyIn24 :: ([Arg Name]) -> (HappyAbsSyn ) happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn24 #-} happyOut24 :: (HappyAbsSyn ) -> ([Arg Name]) happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut24 #-} happyIn25 :: ([Arg Name]) -> (HappyAbsSyn ) happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn25 #-} happyOut25 :: (HappyAbsSyn ) -> ([Arg Name]) happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut25 #-} happyIn26 :: (Attr) -> (HappyAbsSyn ) happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn26 #-} happyOut26 :: (HappyAbsSyn ) -> (Attr) happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut26 #-} happyIn27 :: ([Attr]) -> (HappyAbsSyn ) happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn27 #-} happyOut27 :: (HappyAbsSyn ) -> ([Attr]) happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut27 #-} happyIn28 :: ([Attr]) -> (HappyAbsSyn ) happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn28 #-} happyOut28 :: (HappyAbsSyn ) -> ([Attr]) happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut28 #-} happyIn29 :: (QName) -> (HappyAbsSyn ) happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn29 #-} happyOut29 :: (HappyAbsSyn ) -> (QName) happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut29 #-} happyIn30 :: (QName) -> (HappyAbsSyn ) happyIn30 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn30 #-} happyOut30 :: (HappyAbsSyn ) -> (QName) happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut30 #-} happyIn31 :: (Name) -> (HappyAbsSyn ) happyIn31 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn31 #-} happyOut31 :: (HappyAbsSyn ) -> (Name) happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut31 #-} happyIn32 :: ([Name]) -> (HappyAbsSyn ) happyIn32 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn32 #-} happyOut32 :: (HappyAbsSyn ) -> ([Name]) happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut32 #-} happyIn33 :: ([NamedArg BoundName]) -> (HappyAbsSyn ) happyIn33 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn33 #-} happyOut33 :: (HappyAbsSyn ) -> ([NamedArg BoundName]) happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut33 #-} happyIn34 :: (Either [NamedArg BoundName] [Expr]) -> (HappyAbsSyn ) happyIn34 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn34 #-} happyOut34 :: (HappyAbsSyn ) -> (Either [NamedArg BoundName] [Expr]) happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut34 #-} happyIn35 :: ([NamedArg BoundName]) -> (HappyAbsSyn ) happyIn35 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn35 #-} happyOut35 :: (HappyAbsSyn ) -> ([NamedArg BoundName]) happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut35 #-} happyIn36 :: ([String]) -> (HappyAbsSyn ) happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn36 #-} happyOut36 :: (HappyAbsSyn ) -> ([String]) happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut36 #-} happyIn37 :: (String) -> (HappyAbsSyn ) happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn37 #-} happyOut37 :: (HappyAbsSyn ) -> (String) happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut37 #-} happyIn38 :: ([(Interval, String)]) -> (HappyAbsSyn ) happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn38 #-} happyOut38 :: (HappyAbsSyn ) -> ([(Interval, String)]) happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut38 #-} happyIn39 :: ([(Interval, String)]) -> (HappyAbsSyn ) happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn39 #-} happyOut39 :: (HappyAbsSyn ) -> ([(Interval, String)]) happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut39 #-} happyIn40 :: (Name) -> (HappyAbsSyn ) happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn40 #-} happyOut40 :: (HappyAbsSyn ) -> (Name) happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut40 #-} happyIn41 :: (QName) -> (HappyAbsSyn ) happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn41 #-} happyOut41 :: (HappyAbsSyn ) -> (QName) happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut41 #-} happyIn42 :: ([QName]) -> (HappyAbsSyn ) happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn42 #-} happyOut42 :: (HappyAbsSyn ) -> ([QName]) happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut42 #-} happyIn43 :: (Expr) -> (HappyAbsSyn ) happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn43 #-} happyOut43 :: (HappyAbsSyn ) -> (Expr) happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut43 #-} happyIn44 :: (Expr) -> (HappyAbsSyn ) happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn44 #-} happyOut44 :: (HappyAbsSyn ) -> (Expr) happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut44 #-} happyIn45 :: ([Expr]) -> (HappyAbsSyn ) happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn45 #-} happyOut45 :: (HappyAbsSyn ) -> ([Expr]) happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut45 #-} happyIn46 :: ([Expr]) -> (HappyAbsSyn ) happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn46 #-} happyOut46 :: (HappyAbsSyn ) -> ([Expr]) happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut46 #-} happyIn47 :: (Expr) -> (HappyAbsSyn ) happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn47 #-} happyOut47 :: (HappyAbsSyn ) -> (Expr) happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut47 #-} happyIn48 :: (Maybe Expr) -> (HappyAbsSyn ) happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn48 #-} happyOut48 :: (HappyAbsSyn ) -> (Maybe Expr) happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut48 #-} happyIn49 :: (Expr) -> (HappyAbsSyn ) happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn49 #-} happyOut49 :: (HappyAbsSyn ) -> (Expr) happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut49 #-} happyIn50 :: ([Expr]) -> (HappyAbsSyn ) happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn50 #-} happyOut50 :: (HappyAbsSyn ) -> ([Expr]) happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut50 #-} happyIn51 :: ([Expr]) -> (HappyAbsSyn ) happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn51 #-} happyOut51 :: (HappyAbsSyn ) -> ([Expr]) happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut51 #-} happyIn52 :: (Expr) -> (HappyAbsSyn ) happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn52 #-} happyOut52 :: (HappyAbsSyn ) -> (Expr) happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut52 #-} happyIn53 :: (Expr) -> (HappyAbsSyn ) happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn53 #-} happyOut53 :: (HappyAbsSyn ) -> (Expr) happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut53 #-} happyIn54 :: (Expr) -> (HappyAbsSyn ) happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn54 #-} happyOut54 :: (HappyAbsSyn ) -> (Expr) happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut54 #-} happyIn55 :: (Expr) -> (HappyAbsSyn ) happyIn55 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn55 #-} happyOut55 :: (HappyAbsSyn ) -> (Expr) happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut55 #-} happyIn56 :: (RecordAssignments) -> (HappyAbsSyn ) happyIn56 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn56 #-} happyOut56 :: (HappyAbsSyn ) -> (RecordAssignments) happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut56 #-} happyIn57 :: (RecordAssignments) -> (HappyAbsSyn ) happyIn57 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn57 #-} happyOut57 :: (HappyAbsSyn ) -> (RecordAssignments) happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut57 #-} happyIn58 :: (RecordAssignment) -> (HappyAbsSyn ) happyIn58 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn58 #-} happyOut58 :: (HappyAbsSyn ) -> (RecordAssignment) happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut58 #-} happyIn59 :: (ModuleAssignment) -> (HappyAbsSyn ) happyIn59 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn59 #-} happyOut59 :: (HappyAbsSyn ) -> (ModuleAssignment) happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut59 #-} happyIn60 :: ([FieldAssignment]) -> (HappyAbsSyn ) happyIn60 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn60 #-} happyOut60 :: (HappyAbsSyn ) -> ([FieldAssignment]) happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut60 #-} happyIn61 :: ([FieldAssignment]) -> (HappyAbsSyn ) happyIn61 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn61 #-} happyOut61 :: (HappyAbsSyn ) -> ([FieldAssignment]) happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut61 #-} happyIn62 :: (FieldAssignment) -> (HappyAbsSyn ) happyIn62 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn62 #-} happyOut62 :: (HappyAbsSyn ) -> (FieldAssignment) happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut62 #-} happyIn63 :: (Telescope) -> (HappyAbsSyn ) happyIn63 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn63 #-} happyOut63 :: (HappyAbsSyn ) -> (Telescope) happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut63 #-} happyIn64 :: (Telescope) -> (HappyAbsSyn ) happyIn64 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn64 #-} happyOut64 :: (HappyAbsSyn ) -> (Telescope) happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut64 #-} happyIn65 :: ([TypedBinding]) -> (HappyAbsSyn ) happyIn65 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn65 #-} happyOut65 :: (HappyAbsSyn ) -> ([TypedBinding]) happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut65 #-} happyIn66 :: (TypedBinding) -> (HappyAbsSyn ) happyIn66 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn66 #-} happyOut66 :: (HappyAbsSyn ) -> (TypedBinding) happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut66 #-} happyIn67 :: (TypedBinding) -> (HappyAbsSyn ) happyIn67 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn67 #-} happyOut67 :: (HappyAbsSyn ) -> (TypedBinding) happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut67 #-} happyIn68 :: (TypedBinding) -> (HappyAbsSyn ) happyIn68 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn68 #-} happyOut68 :: (HappyAbsSyn ) -> (TypedBinding) happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut68 #-} happyIn69 :: (TypedBinding) -> (HappyAbsSyn ) happyIn69 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn69 #-} happyOut69 :: (HappyAbsSyn ) -> (TypedBinding) happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut69 #-} happyIn70 :: (TypedBinding) -> (HappyAbsSyn ) happyIn70 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn70 #-} happyOut70 :: (HappyAbsSyn ) -> (TypedBinding) happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut70 #-} happyIn71 :: ([LamBinding]) -> (HappyAbsSyn ) happyIn71 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn71 #-} happyOut71 :: (HappyAbsSyn ) -> ([LamBinding]) happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut71 #-} happyIn72 :: (Either ([LamBinding], Hiding) [Expr]) -> (HappyAbsSyn ) happyIn72 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn72 #-} happyOut72 :: (HappyAbsSyn ) -> (Either ([LamBinding], Hiding) [Expr]) happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut72 #-} happyIn73 :: ([Either Hiding LamBinding]) -> (HappyAbsSyn ) happyIn73 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn73 #-} happyOut73 :: (HappyAbsSyn ) -> ([Either Hiding LamBinding]) happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut73 #-} happyIn74 :: (Either [Either Hiding LamBinding] [Expr]) -> (HappyAbsSyn ) happyIn74 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn74 #-} happyOut74 :: (HappyAbsSyn ) -> (Either [Either Hiding LamBinding] [Expr]) happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut74 #-} happyIn75 :: (LamClause) -> (HappyAbsSyn ) happyIn75 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn75 #-} happyOut75 :: (HappyAbsSyn ) -> (LamClause) happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut75 #-} happyIn76 :: (LamClause) -> (HappyAbsSyn ) happyIn76 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn76 #-} happyOut76 :: (HappyAbsSyn ) -> (LamClause) happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut76 #-} happyIn77 :: (LamClause) -> (HappyAbsSyn ) happyIn77 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn77 #-} happyOut77 :: (HappyAbsSyn ) -> (LamClause) happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut77 #-} happyIn78 :: ([LamClause]) -> (HappyAbsSyn ) happyIn78 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn78 #-} happyOut78 :: (HappyAbsSyn ) -> ([LamClause]) happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut78 #-} happyIn79 :: ([LamClause]) -> (HappyAbsSyn ) happyIn79 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn79 #-} happyOut79 :: (HappyAbsSyn ) -> ([LamClause]) happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut79 #-} happyIn80 :: ([LamBinding]) -> (HappyAbsSyn ) happyIn80 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn80 #-} happyOut80 :: (HappyAbsSyn ) -> ([LamBinding]) happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut80 #-} happyIn81 :: ([LamBinding]) -> (HappyAbsSyn ) happyIn81 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn81 #-} happyOut81 :: (HappyAbsSyn ) -> ([LamBinding]) happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut81 #-} happyIn82 :: ([LamBinding]) -> (HappyAbsSyn ) happyIn82 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn82 #-} happyOut82 :: (HappyAbsSyn ) -> ([LamBinding]) happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut82 #-} happyIn83 :: ([LamBinding]) -> (HappyAbsSyn ) happyIn83 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn83 #-} happyOut83 :: (HappyAbsSyn ) -> ([LamBinding]) happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut83 #-} happyIn84 :: (Either [LamBinding] [Expr]) -> (HappyAbsSyn ) happyIn84 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn84 #-} happyOut84 :: (HappyAbsSyn ) -> (Either [LamBinding] [Expr]) happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut84 #-} happyIn85 :: ([DoStmt]) -> (HappyAbsSyn ) happyIn85 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn85 #-} happyOut85 :: (HappyAbsSyn ) -> ([DoStmt]) happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut85 #-} happyIn86 :: (DoStmt) -> (HappyAbsSyn ) happyIn86 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn86 #-} happyOut86 :: (HappyAbsSyn ) -> (DoStmt) happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut86 #-} happyIn87 :: ([LamClause]) -> (HappyAbsSyn ) happyIn87 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn87 #-} happyOut87 :: (HappyAbsSyn ) -> ([LamClause]) happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut87 #-} happyIn88 :: (ImportDirective) -> (HappyAbsSyn ) happyIn88 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn88 #-} happyOut88 :: (HappyAbsSyn ) -> (ImportDirective) happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut88 #-} happyIn89 :: ([ImportDirective]) -> (HappyAbsSyn ) happyIn89 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn89 #-} happyOut89 :: (HappyAbsSyn ) -> ([ImportDirective]) happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut89 #-} happyIn90 :: (ImportDirective) -> (HappyAbsSyn ) happyIn90 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn90 #-} happyOut90 :: (HappyAbsSyn ) -> (ImportDirective) happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut90 #-} happyIn91 :: ((Using, Range)) -> (HappyAbsSyn ) happyIn91 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn91 #-} happyOut91 :: (HappyAbsSyn ) -> ((Using, Range)) happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut91 #-} happyIn92 :: (([ImportedName], Range)) -> (HappyAbsSyn ) happyIn92 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn92 #-} happyOut92 :: (HappyAbsSyn ) -> (([ImportedName], Range)) happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut92 #-} happyIn93 :: (([Renaming] , Range)) -> (HappyAbsSyn ) happyIn93 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn93 #-} happyOut93 :: (HappyAbsSyn ) -> (([Renaming] , Range)) happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut93 #-} happyIn94 :: ([Renaming]) -> (HappyAbsSyn ) happyIn94 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn94 #-} happyOut94 :: (HappyAbsSyn ) -> ([Renaming]) happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut94 #-} happyIn95 :: (Renaming) -> (HappyAbsSyn ) happyIn95 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn95 #-} happyOut95 :: (HappyAbsSyn ) -> (Renaming) happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut95 #-} happyIn96 :: (ImportedName) -> (HappyAbsSyn ) happyIn96 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn96 #-} happyOut96 :: (HappyAbsSyn ) -> (ImportedName) happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut96 #-} happyIn97 :: (ImportedName) -> (HappyAbsSyn ) happyIn97 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn97 #-} happyOut97 :: (HappyAbsSyn ) -> (ImportedName) happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut97 #-} happyIn98 :: ([ImportedName]) -> (HappyAbsSyn ) happyIn98 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn98 #-} happyOut98 :: (HappyAbsSyn ) -> ([ImportedName]) happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut98 #-} happyIn99 :: ([ImportedName]) -> (HappyAbsSyn ) happyIn99 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn99 #-} happyOut99 :: (HappyAbsSyn ) -> ([ImportedName]) happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut99 #-} happyIn100 :: (LHS) -> (HappyAbsSyn ) happyIn100 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn100 #-} happyOut100 :: (HappyAbsSyn ) -> (LHS) happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut100 #-} happyIn101 :: ([Expr]) -> (HappyAbsSyn ) happyIn101 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn101 #-} happyOut101 :: (HappyAbsSyn ) -> ([Expr]) happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut101 #-} happyIn102 :: ([Expr]) -> (HappyAbsSyn ) happyIn102 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn102 #-} happyOut102 :: (HappyAbsSyn ) -> ([Expr]) happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut102 #-} happyIn103 :: (HoleContent) -> (HappyAbsSyn ) happyIn103 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn103 #-} happyOut103 :: (HappyAbsSyn ) -> (HoleContent) happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut103 #-} happyIn104 :: (WhereClause) -> (HappyAbsSyn ) happyIn104 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn104 #-} happyOut104 :: (HappyAbsSyn ) -> (WhereClause) happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut104 #-} happyIn105 :: (ExprWhere) -> (HappyAbsSyn ) happyIn105 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn105 #-} happyOut105 :: (HappyAbsSyn ) -> (ExprWhere) happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut105 #-} happyIn106 :: ([Declaration]) -> (HappyAbsSyn ) happyIn106 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn106 #-} happyOut106 :: (HappyAbsSyn ) -> ([Declaration]) happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut106 #-} happyIn107 :: ([Declaration]) -> (HappyAbsSyn ) happyIn107 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn107 #-} happyOut107 :: (HappyAbsSyn ) -> ([Declaration]) happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut107 #-} happyIn108 :: ([Arg Declaration]) -> (HappyAbsSyn ) happyIn108 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn108 #-} happyOut108 :: (HappyAbsSyn ) -> ([Arg Declaration]) happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut108 #-} happyIn109 :: ([Declaration]) -> (HappyAbsSyn ) happyIn109 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn109 #-} happyOut109 :: (HappyAbsSyn ) -> ([Declaration]) happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut109 #-} happyIn110 :: (RHSOrTypeSigs) -> (HappyAbsSyn ) happyIn110 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn110 #-} happyOut110 :: (HappyAbsSyn ) -> (RHSOrTypeSigs) happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut110 #-} happyIn111 :: (Declaration) -> (HappyAbsSyn ) happyIn111 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn111 #-} happyOut111 :: (HappyAbsSyn ) -> (Declaration) happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut111 #-} happyIn112 :: (Declaration) -> (HappyAbsSyn ) happyIn112 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn112 #-} happyOut112 :: (HappyAbsSyn ) -> (Declaration) happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut112 #-} happyIn113 :: (Declaration) -> (HappyAbsSyn ) happyIn113 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn113 #-} happyOut113 :: (HappyAbsSyn ) -> (Declaration) happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut113 #-} happyIn114 :: (Declaration) -> (HappyAbsSyn ) happyIn114 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn114 #-} happyOut114 :: (HappyAbsSyn ) -> (Declaration) happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut114 #-} happyIn115 :: ((Name, IsInstance)) -> (HappyAbsSyn ) happyIn115 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn115 #-} happyOut115 :: (HappyAbsSyn ) -> ((Name, IsInstance)) happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut115 #-} happyIn116 :: (Declaration) -> (HappyAbsSyn ) happyIn116 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn116 #-} happyOut116 :: (HappyAbsSyn ) -> (Declaration) happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut116 #-} happyIn117 :: ([Declaration]) -> (HappyAbsSyn ) happyIn117 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn117 #-} happyOut117 :: (HappyAbsSyn ) -> ([Declaration]) happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut117 #-} happyIn118 :: ([Declaration]) -> (HappyAbsSyn ) happyIn118 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn118 #-} happyOut118 :: (HappyAbsSyn ) -> ([Declaration]) happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut118 #-} happyIn119 :: (Declaration) -> (HappyAbsSyn ) happyIn119 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn119 #-} happyOut119 :: (HappyAbsSyn ) -> (Declaration) happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut119 #-} happyIn120 :: (Declaration) -> (HappyAbsSyn ) happyIn120 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn120 #-} happyOut120 :: (HappyAbsSyn ) -> (Declaration) happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut120 #-} happyIn121 :: (Declaration) -> (HappyAbsSyn ) happyIn121 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn121 #-} happyOut121 :: (HappyAbsSyn ) -> (Declaration) happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut121 #-} happyIn122 :: (Declaration) -> (HappyAbsSyn ) happyIn122 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn122 #-} happyOut122 :: (HappyAbsSyn ) -> (Declaration) happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut122 #-} happyIn123 :: (Declaration) -> (HappyAbsSyn ) happyIn123 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn123 #-} happyOut123 :: (HappyAbsSyn ) -> (Declaration) happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut123 #-} happyIn124 :: (Declaration) -> (HappyAbsSyn ) happyIn124 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn124 #-} happyOut124 :: (HappyAbsSyn ) -> (Declaration) happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut124 #-} happyIn125 :: (Declaration) -> (HappyAbsSyn ) happyIn125 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn125 #-} happyOut125 :: (HappyAbsSyn ) -> (Declaration) happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut125 #-} happyIn126 :: (Declaration) -> (HappyAbsSyn ) happyIn126 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn126 #-} happyOut126 :: (HappyAbsSyn ) -> (Declaration) happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut126 #-} happyIn127 :: (Declaration) -> (HappyAbsSyn ) happyIn127 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn127 #-} happyOut127 :: (HappyAbsSyn ) -> (Declaration) happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut127 #-} happyIn128 :: (Declaration) -> (HappyAbsSyn ) happyIn128 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn128 #-} happyOut128 :: (HappyAbsSyn ) -> (Declaration) happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut128 #-} happyIn129 :: ([Arg Name]) -> (HappyAbsSyn ) happyIn129 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn129 #-} happyOut129 :: (HappyAbsSyn ) -> ([Arg Name]) happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut129 #-} happyIn130 :: ([RString]) -> (HappyAbsSyn ) happyIn130 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn130 #-} happyOut130 :: (HappyAbsSyn ) -> ([RString]) happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut130 #-} happyIn131 :: ([NamedArg HoleName]) -> (HappyAbsSyn ) happyIn131 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn131 #-} happyOut131 :: (HappyAbsSyn ) -> ([NamedArg HoleName]) happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut131 #-} happyIn132 :: (NamedArg HoleName) -> (HappyAbsSyn ) happyIn132 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn132 #-} happyOut132 :: (HappyAbsSyn ) -> (NamedArg HoleName) happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut132 #-} happyIn133 :: (HoleName) -> (HappyAbsSyn ) happyIn133 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn133 #-} happyOut133 :: (HappyAbsSyn ) -> (HoleName) happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut133 #-} happyIn134 :: (HoleName) -> (HappyAbsSyn ) happyIn134 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn134 #-} happyOut134 :: (HappyAbsSyn ) -> (HoleName) happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut134 #-} happyIn135 :: (RString) -> (HappyAbsSyn ) happyIn135 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn135 #-} happyOut135 :: (HappyAbsSyn ) -> (RString) happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut135 #-} happyIn136 :: (Maybe Range) -> (HappyAbsSyn ) happyIn136 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn136 #-} happyOut136 :: (HappyAbsSyn ) -> (Maybe Range) happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut136 #-} happyIn137 :: ([Declaration]) -> (HappyAbsSyn ) happyIn137 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn137 #-} happyOut137 :: (HappyAbsSyn ) -> ([Declaration]) happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut137 #-} happyIn138 :: ([Expr]) -> (HappyAbsSyn ) happyIn138 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn138 #-} happyOut138 :: (HappyAbsSyn ) -> ([Expr]) happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut138 #-} happyIn139 :: (Telescope -> Parser ModuleApplication) -> (HappyAbsSyn ) happyIn139 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn139 #-} happyOut139 :: (HappyAbsSyn ) -> (Telescope -> Parser ModuleApplication) happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut139 #-} happyIn140 :: (Declaration) -> (HappyAbsSyn ) happyIn140 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn140 #-} happyOut140 :: (HappyAbsSyn ) -> (Declaration) happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut140 #-} happyIn141 :: (Declaration) -> (HappyAbsSyn ) happyIn141 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn141 #-} happyOut141 :: (HappyAbsSyn ) -> (Declaration) happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut141 #-} happyIn142 :: (Name) -> (HappyAbsSyn ) happyIn142 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn142 #-} happyOut142 :: (HappyAbsSyn ) -> (Name) happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut142 #-} happyIn143 :: ([Declaration]) -> (HappyAbsSyn ) happyIn143 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn143 #-} happyOut143 :: (HappyAbsSyn ) -> ([Declaration]) happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut143 #-} happyIn144 :: (Declaration) -> (HappyAbsSyn ) happyIn144 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn144 #-} happyOut144 :: (HappyAbsSyn ) -> (Declaration) happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut144 #-} happyIn145 :: (Pragma) -> (HappyAbsSyn ) happyIn145 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn145 #-} happyOut145 :: (HappyAbsSyn ) -> (Pragma) happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut145 #-} happyIn146 :: (Pragma) -> (HappyAbsSyn ) happyIn146 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn146 #-} happyOut146 :: (HappyAbsSyn ) -> (Pragma) happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut146 #-} happyIn147 :: (Pragma) -> (HappyAbsSyn ) happyIn147 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn147 #-} happyOut147 :: (HappyAbsSyn ) -> (Pragma) happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut147 #-} happyIn148 :: (Pragma) -> (HappyAbsSyn ) happyIn148 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn148 #-} happyOut148 :: (HappyAbsSyn ) -> (Pragma) happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut148 #-} happyIn149 :: (Pragma) -> (HappyAbsSyn ) happyIn149 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn149 #-} happyOut149 :: (HappyAbsSyn ) -> (Pragma) happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut149 #-} happyIn150 :: (Pragma) -> (HappyAbsSyn ) happyIn150 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn150 #-} happyOut150 :: (HappyAbsSyn ) -> (Pragma) happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut150 #-} happyIn151 :: (Pragma) -> (HappyAbsSyn ) happyIn151 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn151 #-} happyOut151 :: (HappyAbsSyn ) -> (Pragma) happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut151 #-} happyIn152 :: (Pragma) -> (HappyAbsSyn ) happyIn152 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn152 #-} happyOut152 :: (HappyAbsSyn ) -> (Pragma) happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut152 #-} happyIn153 :: (Pragma) -> (HappyAbsSyn ) happyIn153 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn153 #-} happyOut153 :: (HappyAbsSyn ) -> (Pragma) happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut153 #-} happyIn154 :: (Pragma) -> (HappyAbsSyn ) happyIn154 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn154 #-} happyOut154 :: (HappyAbsSyn ) -> (Pragma) happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut154 #-} happyIn155 :: (Pragma) -> (HappyAbsSyn ) happyIn155 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn155 #-} happyOut155 :: (HappyAbsSyn ) -> (Pragma) happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut155 #-} happyIn156 :: (Pragma) -> (HappyAbsSyn ) happyIn156 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn156 #-} happyOut156 :: (HappyAbsSyn ) -> (Pragma) happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut156 #-} happyIn157 :: (Pragma) -> (HappyAbsSyn ) happyIn157 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn157 #-} happyOut157 :: (HappyAbsSyn ) -> (Pragma) happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut157 #-} happyIn158 :: (Pragma) -> (HappyAbsSyn ) happyIn158 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn158 #-} happyOut158 :: (HappyAbsSyn ) -> (Pragma) happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut158 #-} happyIn159 :: (Pragma) -> (HappyAbsSyn ) happyIn159 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn159 #-} happyOut159 :: (HappyAbsSyn ) -> (Pragma) happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut159 #-} happyIn160 :: (Pragma) -> (HappyAbsSyn ) happyIn160 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn160 #-} happyOut160 :: (HappyAbsSyn ) -> (Pragma) happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut160 #-} happyIn161 :: (Pragma) -> (HappyAbsSyn ) happyIn161 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn161 #-} happyOut161 :: (HappyAbsSyn ) -> (Pragma) happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut161 #-} happyIn162 :: (Pragma) -> (HappyAbsSyn ) happyIn162 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn162 #-} happyOut162 :: (HappyAbsSyn ) -> (Pragma) happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut162 #-} happyIn163 :: (Pragma) -> (HappyAbsSyn ) happyIn163 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn163 #-} happyOut163 :: (HappyAbsSyn ) -> (Pragma) happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut163 #-} happyIn164 :: (Pragma) -> (HappyAbsSyn ) happyIn164 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn164 #-} happyOut164 :: (HappyAbsSyn ) -> (Pragma) happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut164 #-} happyIn165 :: (Pragma) -> (HappyAbsSyn ) happyIn165 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn165 #-} happyOut165 :: (HappyAbsSyn ) -> (Pragma) happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut165 #-} happyIn166 :: (Pragma) -> (HappyAbsSyn ) happyIn166 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn166 #-} happyOut166 :: (HappyAbsSyn ) -> (Pragma) happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut166 #-} happyIn167 :: ([(Range, Occurrence)]) -> (HappyAbsSyn ) happyIn167 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn167 #-} happyOut167 :: (HappyAbsSyn ) -> ([(Range, Occurrence)]) happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut167 #-} happyIn168 :: ((Range, Occurrence)) -> (HappyAbsSyn ) happyIn168 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn168 #-} happyOut168 :: (HappyAbsSyn ) -> ((Range, Occurrence)) happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut168 #-} happyIn169 :: ([TypeSignature]) -> (HappyAbsSyn ) happyIn169 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn169 #-} happyOut169 :: (HappyAbsSyn ) -> ([TypeSignature]) happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut169 #-} happyIn170 :: ([TypeSignature]) -> (HappyAbsSyn ) happyIn170 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn170 #-} happyOut170 :: (HappyAbsSyn ) -> ([TypeSignature]) happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut170 #-} happyIn171 :: ([TypeSignature]) -> (HappyAbsSyn ) happyIn171 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn171 #-} happyOut171 :: (HappyAbsSyn ) -> ([TypeSignature]) happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut171 #-} happyIn172 :: ([Arg TypeSignature]) -> (HappyAbsSyn ) happyIn172 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn172 #-} happyOut172 :: (HappyAbsSyn ) -> ([Arg TypeSignature]) happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut172 #-} happyIn173 :: ([Arg TypeSignature]) -> (HappyAbsSyn ) happyIn173 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn173 #-} happyOut173 :: (HappyAbsSyn ) -> ([Arg TypeSignature]) happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut173 #-} happyIn174 :: ([Arg TypeSignature]) -> (HappyAbsSyn ) happyIn174 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn174 #-} happyOut174 :: (HappyAbsSyn ) -> ([Arg TypeSignature]) happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut174 #-} happyIn175 :: ([Arg TypeSignature]) -> (HappyAbsSyn ) happyIn175 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn175 #-} happyOut175 :: (HappyAbsSyn ) -> ([Arg TypeSignature]) happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut175 #-} happyIn176 :: (((Maybe (Ranged Induction), Maybe HasEta, Maybe (Name, IsInstance)), [Declaration])) -> (HappyAbsSyn ) happyIn176 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn176 #-} happyOut176 :: (HappyAbsSyn ) -> (((Maybe (Ranged Induction), Maybe HasEta, Maybe (Name, IsInstance)), [Declaration])) happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut176 #-} happyIn177 :: ([RecordDirective]) -> (HappyAbsSyn ) happyIn177 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn177 #-} happyOut177 :: (HappyAbsSyn ) -> ([RecordDirective]) happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut177 #-} happyIn178 :: (RecordDirective) -> (HappyAbsSyn ) happyIn178 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn178 #-} happyOut178 :: (HappyAbsSyn ) -> (RecordDirective) happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut178 #-} happyIn179 :: (Ranged HasEta) -> (HappyAbsSyn ) happyIn179 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn179 #-} happyOut179 :: (HappyAbsSyn ) -> (Ranged HasEta) happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut179 #-} happyIn180 :: (Ranged Induction) -> (HappyAbsSyn ) happyIn180 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn180 #-} happyOut180 :: (HappyAbsSyn ) -> (Ranged Induction) happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut180 #-} happyIn181 :: ([Declaration]) -> (HappyAbsSyn ) happyIn181 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn181 #-} happyOut181 :: (HappyAbsSyn ) -> ([Declaration]) happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut181 #-} happyIn182 :: ([Declaration]) -> (HappyAbsSyn ) happyIn182 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn182 #-} happyOut182 :: (HappyAbsSyn ) -> ([Declaration]) happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut182 #-} happyIn183 :: ([Declaration]) -> (HappyAbsSyn ) happyIn183 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn183 #-} happyOut183 :: (HappyAbsSyn ) -> ([Declaration]) happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut183 #-} happyIn184 :: ([Declaration]) -> (HappyAbsSyn ) happyIn184 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn184 #-} happyOut184 :: (HappyAbsSyn ) -> ([Declaration]) happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut184 #-} happyInTok :: (Token) -> (HappyAbsSyn ) happyInTok x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyInTok #-} happyOutTok :: (HappyAbsSyn ) -> (Token) happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOutTok #-} happyExpList :: HappyAddr happyExpList = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x63\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x53\x6c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\xdf\x0a\x01\x00\x80\x39\xb6\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x44\x00\x00\x00\x4c\x31\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x4b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8e\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x44\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x36\x11\x00\x00\x00\x53\x0c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x29\x96\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x26\x02\x00\x00\x60\x8a\xa1\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x4d\x04\x00\x00\xc0\x14\x43\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x23\x88\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x80\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x08\x7d\x2a\x04\x00\x00\xe6\xd8\xae\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x73\x6c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x39\xb6\x7a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x1c\x5b\x35\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x26\x02\x00\x00\x60\x8a\xa1\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x76\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x63\xab\x07\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\xcc\xb1\x55\x83\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\xe1\xbd\xdf\xe7\x4e\x00\x00\x60\x8a\xad\x0a\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x89\x00\x00\x00\x98\x62\xa8\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x63\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x54\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x5b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\xcc\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x1c\x5b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x11\x44\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x14\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x42\xe8\x53\x21\x00\x00\x30\xc5\x76\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xab\x07\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x55\xa3\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xae\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x73\x6c\xf5\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x39\xb6\x6a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x4b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8a\xa5\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc5\x52\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x63\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x22\x00\x00\x00\xa6\x18\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x74\x78\xef\xf7\xb9\x13\x00\x00\x98\x62\xab\x42\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x11\x44\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x84\xd0\xa7\x42\x00\x00\x60\x8a\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc5\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x84\x3e\x15\x02\x00\x00\x53\x6c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x29\xb6\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x5b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x73\x6c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x4d\x04\x00\x00\xc0\x14\x43\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8e\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x53\x2c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x29\xb6\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8a\xa5\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc5\x52\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xa9\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x53\x6c\x55\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x5b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8e\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x44\x00\x00\x00\x4c\x31\x54\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xa9\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x29\x96\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xa9\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8a\xa5\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc5\x52\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x54\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xa6\x58\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x80\x3e\x15\x02\x00\x00\x53\x2c\x55\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x20\x0a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x42\xe8\x53\x21\x00\x00\x30\xc5\x76\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xab\x07\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\x4c\xb1\x55\x83\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x4d\x04\x00\x00\xc0\x14\x43\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x63\xab\x02\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x08\xa2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\xc3\x7b\xbf\xcf\x9d\x00\x00\xc0\x14\x5b\x95\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x08\xa2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x41\x14\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x20\x0a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x08\xa2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x04\x51\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x74\x78\xef\xf7\xb9\x13\x00\x00\x98\x62\xab\x42\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x44\x00\x00\x00\x4c\x31\x54\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x08\xa2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x05\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x82\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc5\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x88\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\xcc\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\xcc\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x22\x00\x00\x00\xa6\x18\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x41\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x39\xb6\x7a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x4b\x15\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x01\xf4\xa9\x10\x00\x00\x98\x62\xa9\x42\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\xfa\x54\x08\x00\x00\xcc\xb1\x55\x81\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x40\x10\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8e\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x10\x04\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xa6\x58\xaa\xd0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x14\x4b\x15\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\xa0\x4f\x85\x00\x00\xc0\x1c\x5b\x15\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x04\xd0\xa7\x42\x00\x00\x60\x8e\xad\x0a\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x50\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x40\x9f\x0a\x01\x00\x80\x39\xb6\x2a\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x04\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\xe8\x53\x21\x00\x00\x30\xc7\x56\x05\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x22\x00\x00\x00\xa6\x18\xaa\xc0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x41\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x8f\xef\xff\x3e\x77\x02\x00\x00\x53\x6c\x55\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x04\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x10\x04\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x00\x7d\x2a\x04\x00\x00\xe6\xd8\xea\xc1\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x80\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x40\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x40\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\xa0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x50\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x28\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x76\x78\xef\xf7\xb9\x13\x00\x00\x98\x62\xab\x52\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xc7\xf7\x7f\x9f\x3b\x01\x00\x80\x29\xb6\x2a\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# {-# NOINLINE happyExpListPerState #-} happyExpListPerState st = token_strs_expected where token_strs = ["error","%dummy","%start_tokensParser","%start_exprParser","%start_exprWhereParser","%start_moduleParser","%start_moduleNameParser","%start_funclauseParser","%start_holeContentParser","Tokens","TokensR","Token","File","maybe_vclose","close","semi","beginImpDir","Int","Id","SpaceIds","DoubleCloseBrace","MaybeDottedId","MaybeDottedIds","ArgIds","ModalArgIds","Attribute","Attributes","Attributes1","QId","ModuleName","BId","SpaceBIds","CommaBIds","CommaBIdAndAbsurds","BIdsWithHiding","PragmaStrings","PragmaString","Strings","ForeignCode","PragmaName","PragmaQName","PragmaQNames","Expr","Expr1","WithExprs","Application","Expr2","LetBody","ExtendedOrAbsurdLam","Application3","Application3PossiblyEmpty","Expr3Curly","Expr3NoCurly","ExprOrAttr","Expr3","RecordAssignments","RecordAssignments1","RecordAssignment","ModuleAssignment","FieldAssignments","FieldAssignments1","FieldAssignment","TeleArrow","Telescope1","TypedBindings","TypedBinding","TBind","ModalTBind","TBindWithHiding","ModalTBindWithHiding","LamBindings","AbsurdLamBindings","LamBinds","LamBindsAbsurd","NonAbsurdLamClause","AbsurdLamClause","LamClause","LamClauses","LamWhereClauses","ForallBindings","TypedUntypedBindings1","TypedUntypedBindings","DomainFreeBinding","DomainFreeBindingAbsurd","DoStmts","DoStmt","DoWhere","ImportDirective","ImportDirectives","ImportDirective1","Using","Hiding","RenamingDir","Renamings","Renaming","ImportName_","ImportName","CommaImportNames","CommaImportNames1","LHS","WithExpressions","RewriteEquations","HoleContent","WhereClause","ExprWhere","Declaration","TypeSigs","ArgTypeSigs","FunClause","RHS","Data","DataSig","Record","RecordSig","RecordConstructorName","Infix","Fields","Generalize","Mutual","Abstract","Private","Instance","Macro","Postulate","Primitive","UnquoteDecl","Syntax","PatternSyn","PatternSynArgs","SimpleIds","HoleNames","HoleName","SimpleTopHole","SimpleHole","SimpleId","MaybeOpen","Open","OpenArgs","ModuleApplication","ModuleMacro","Module","Underscore","TopLevel","Pragma","DeclarationPragma","OptionsPragma","BuiltinPragma","RewritePragma","ForeignPragma","CompilePragma","StaticPragma","InlinePragma","NoInlinePragma","InjectivePragma","DisplayPragma","EtaPragma","NoTerminationCheckPragma","NonTerminatingPragma","TerminatingPragma","MeasurePragma","CatchallPragma","ImpossiblePragma","NoPositivityCheckPragma","NoUniverseCheckPragma","PolarityPragma","WarningOnUsagePragma","Polarities","Polarity","TypeSignatures0","TypeSignatures","TypeSignatures1","ArgTypeSignatures","ArgTypeSignatures1","ArgTypeSignaturesOrEmpty","ArgTypeSignatures0","RecordDeclarations","RecordDirectives","RecordDirective","RecordEta","RecordInduction","Declarations","Declarations0","Declarations1","TopDeclarations","'abstract'","'codata'","'coinductive'","'constructor'","'data'","'eta-equality'","'field'","'forall'","'variable'","'hiding'","'import'","'in'","'inductive'","'infix'","'infixl'","'infixr'","'instance'","'overlap'","'let'","'macro'","'module'","'mutual'","'no-eta-equality'","'open'","'pattern'","'postulate'","'primitive'","'private'","'Prop'","'public'","'quote'","'quoteContext'","'quoteGoal'","'quoteTerm'","'record'","'renaming'","'rewrite'","'Set'","'syntax'","'tactic'","'to'","'unquote'","'unquoteDecl'","'unquoteDef'","'using'","'where'","'do'","'with'","'BUILTIN'","'CATCHALL'","'DISPLAY'","'ETA'","'FOREIGN'","'COMPILE'","'IMPOSSIBLE'","'INJECTIVE'","'INLINE'","'NOINLINE'","'MEASURE'","'NO_TERMINATION_CHECK'","'NO_POSITIVITY_CHECK'","'NO_UNIVERSE_CHECK'","'NON_TERMINATING'","'OPTIONS'","'POLARITY'","'WARNING_ON_USAGE'","'REWRITE'","'STATIC'","'TERMINATING'","setN","propN","tex","comment","'...'","'..'","'.'","';'","':'","'='","'_'","'?'","'->'","'\\\\'","'@'","'|'","'('","')'","'(|'","'|)'","'{{'","'}}'","'{'","'}'","vopen","vclose","vsemi","'{-#'","'#-}'","id","q_id","string","literal","%eof"] bit_start = st * 287 bit_end = (st + 1) * 287 read_bit = readArrayBit happyExpList bits = map read_bit [bit_start..bit_end - 1] bits_indexed = zip bits [0..286] token_strs_expected = concatMap f bits_indexed f (False, _) = [] f (True, nr) = [token_strs !! nr] happyActOffsets :: HappyAddr happyActOffsets = HappyA# "\x00\x00\x53\x0c\x53\x0c\xb2\xff\x4d\x00\x3c\x0f\x13\x09\x00\x00\x66\x05\xc4\xff\x00\x00\x10\x14\x00\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x9d\x0c\xe9\x0c\xeb\xff\x00\x00\xf0\x02\x00\x00\xe1\xff\x14\x06\x3c\x00\x00\x00\x00\x00\x00\x00\x47\x00\x00\x00\x5a\x14\x22\x12\x00\x00\x75\x14\x00\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x11\x01\xbd\x14\x00\x00\x00\x00\xbb\x01\x49\x03\x48\x07\xe9\x0c\x92\x07\x5d\x09\x00\x00\x00\x00\x00\x00\x3c\x0f\xc4\x00\xbf\x00\x25\x02\x92\x00\xd8\x14\xaa\x09\xdf\x07\xf4\x09\x00\x00\x00\x00\x92\x00\x92\x00\xff\x04\x10\x00\x92\x00\x92\x00\x92\x00\x00\x00\xfa\x00\xde\x00\x8e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x01\x00\x00\x00\x00\x00\x00\x1d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x01\x22\x01\x22\x01\x47\x01\x71\x01\x5b\x01\x5b\x01\x5b\x01\x78\x01\x78\x01\x02\x01\x78\x01\xa4\x00\x25\x01\x81\x01\xc3\x01\xc6\x01\x20\x15\xb1\x01\xc7\xff\xb1\x01\x8a\x0a\x04\x02\x00\x00\x00\x00\xe8\x00\x00\x00\x37\x02\x40\x02\x00\x00\x00\x00\x10\x00\xe9\x0c\xe9\x0c\x22\x12\x6a\x02\x00\x00\x25\x02\x86\x0f\x61\x02\x65\x02\x00\x00\xbc\xff\x5b\x02\x60\x02\x7c\x02\xe8\x00\xe8\x00\x77\x02\xd0\x0f\xa7\x02\xbe\xff\xa8\x02\xaf\x02\xb7\x02\xbe\x02\x75\x02\x00\x00\xe9\x0c\x00\x00\x00\x00\x7f\x04\xe9\x0c\x00\x00\xdf\x02\x00\x00\x17\x06\xae\x05\xe9\x02\xa6\x02\x41\x03\x00\x00\x41\x0a\x8b\x0a\xd8\x0a\x25\x0b\x2c\x08\x6f\x0b\x22\x12\x6c\x12\x6c\x12\xe9\x0c\x0c\x03\x3b\x15\x00\x00\xed\x02\x75\x02\x7e\x03\x8a\x03\xfe\x06\x7a\x06\xe9\x0c\x36\x03\x7a\x06\x00\x00\x33\x0d\x1a\x10\x1a\x10\x00\x00\xc3\x02\x7d\x0d\x1a\x10\x1a\x10\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x0d\xc7\x0d\x3e\x03\x3b\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x0d\x00\x00\x00\x00\x1a\x10\x00\x00\xb6\x12\x64\x10\x00\x00\xb6\x12\x00\x13\x00\x13\xae\x10\x3b\x03\xae\x10\x11\x02\xae\x10\x45\x03\x47\x03\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\xc7\x0d\xc7\x0d\x63\x03\x3b\x15\x5e\x03\x00\x00\x74\x03\x00\x00\x00\x00\x64\x03\x4a\x13\xac\x03\x1d\x00\x93\x01\x8c\x03\xe8\x00\x9c\x03\xa8\x03\xe8\x00\x9f\x03\x7b\x00\x8f\x03\xf8\x10\x00\x00\xaf\x01\x7d\x01\x4a\x13\xb9\x03\xdc\x03\xc7\x03\xcf\x03\x00\x00\x94\x13\x94\x13\x00\x00\x94\x13\x94\x13\x44\x11\xe0\x06\xd1\x03\xe0\x06\xbc\x0b\x06\x0c\x11\x0e\x00\x00\x00\x00\xd3\x03\x83\x15\xf8\xff\x00\x00\x00\x00\x00\x00\x5e\x0e\xd9\x03\x00\x00\x00\x00\x00\x00\x75\x01\x00\x00\x00\x00\x5e\x0e\xa1\x01\xe7\x03\x10\x00\x00\x00\x5e\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\xff\xcc\x03\xeb\x03\xfb\x03\xfe\x03\x18\x04\x1f\x04\x22\x04\x22\x04\x22\x04\x3a\x04\x2b\x04\x49\x04\x4e\x04\x55\x04\x5d\x04\x62\x04\x75\x04\x79\x04\x8d\x04\x92\x04\x98\x04\xfa\x03\x35\x04\x5e\x0e\xc8\x03\xe3\x06\x00\x00\x00\x00\x99\x04\x00\x00\x00\x00\x1a\x00\x00\x00\xd4\x09\xa6\x04\x00\x00\x21\x0a\x21\x0a\x00\x00\x00\x00\x00\x00\xb3\x01\x00\x00\xb3\x01\xb3\x01\x00\x00\xb6\x01\x00\x00\xe1\x02\x21\x0a\x21\x0a\x00\x00\x00\x00\x00\x00\xa1\x02\xfe\x06\x00\x00\x98\x06\x00\x00\x66\x04\xe3\x04\xb8\x04\xb8\x04\x00\x00\x9e\x15\x21\x0a\x7e\x00\x21\x0a\x88\x00\xcf\x04\x45\x02\x00\x00\xe1\x00\xce\x04\x00\x00\x00\x00\xe1\x00\xb3\x01\x00\x00\x00\x00\x00\x00\x09\x05\x11\x00\x21\x0a\x00\x00\xfb\x04\x00\x00\x00\x05\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x8e\x11\x53\x02\x00\x00\x00\x00\x00\x00\xfe\x04\xe9\xff\xe9\xff\x00\x00\x00\x00\x5e\x0e\x5e\x0e\x00\x00\x00\x00\xf2\x04\x00\x00\x00\x00\xf4\x04\xf3\x04\xf9\x04\x00\x00\x00\x00\xf8\x04\xfc\x04\x00\x00\x00\x00\x00\x00\x00\x00\x02\x05\x74\x05\x76\x05\x7c\x05\x00\x00\x85\x05\xe0\x02\x93\x05\x97\x05\x00\x00\x9a\x05\x9a\x05\x00\x00\x00\x00\x5e\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x0e\x00\x00\x00\x00\x9e\x15\x59\x01\x79\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x00\xe7\x00\x11\x02\x07\x01\x11\x02\x00\x00\xb1\x05\xd8\x11\x00\x00\x00\x00\xd8\x11\x00\x00\x5e\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x0e\xa8\x0e\x00\x00\x00\x00\xa9\x05\x00\x00\xc8\x05\xbe\x05\x00\x00\xd1\x05\xa1\x02\x00\x00\x59\x01\xf2\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xca\x05\x00\x00\x15\x02\x00\x00\xc6\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\xcf\x05\x00\x00\xd5\x05\xd8\x05\x00\x00\xc4\x05\x00\x00\xd8\x11\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x11\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x05\xee\x05\xf9\x05\x00\x00\x06\x06\xe0\x02\xe0\x02\x04\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x01\x0d\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x06\x27\x06\xb8\x01\xd6\x05\x2c\x06\xb9\x01\x00\x00\x1a\x06\x24\x00\x23\x06\xf2\x0e\x00\x00\x21\x06\xf2\x0e\xf2\x0e\x38\x06\x2b\x06\xa1\x02\x2b\x06\x00\x00\x00\x00\x28\x03\x3d\x06\x00\x00\x00\x00\x28\x03\x00\x00\x2f\x04\x00\x00\x00\x00\xc4\x02\x2f\x03\x8e\x00\x8e\x00\xf2\x0e\x2f\x06\xf2\x0e\x00\x00\x2f\x06\xf2\x0e\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x61\x06\x00\x00\x62\x06\x00\x00\x00\x00\x8e\x00\x34\x06\x31\x06\x31\x06\xe8\x00\x00\x00\x31\x06\x31\x06\x00\x00\x31\x06\x31\x06\x00\x00\x00\x00\xf2\x0e\x00\x00\x00\x00\xe6\x15\x59\x01\x00\x00\x01\x03\x00\x00\x00\x00\x00\x00\x69\x06\x00\x00\xcc\x05\x39\x06\x00\x00\x49\x06\x50\x06\xe9\xff\x00\x00\x52\x06\x53\x06\xe9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x06\x00\x00\x4d\x06\x00\x00\x00\x00\x00\x00\x00\x00\x59\x01\x00\x00\x00\x00\xe1\x00\x00\x00\xee\xff\xfe\xff\xee\xff\x00\x00\x00\x00\x6f\x06\x5f\x06\x00\x00\x5a\x06\x5a\x06\x71\x06\x7e\x06\xa3\x06\x00\x00\x00\x00\x76\x06\x00\x00\x00\x00\xe0\x02\x00\x00\x72\x06\x00\x00\x6b\x06\x6b\x06\x7c\x06\x75\x06\x75\x06\x00\x00\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x77\x06\x00\x00\x00\x00\x7b\x06\x00\x00\x7d\x06\x59\x01\x00\x00\x00\x00\xc6\x08\x00\x00\x7f\x06\xe8\x00\x83\x06\xe8\x00\x2f\x04\x2f\x04\x00\x00\x85\x06\x85\x06\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x04\x2f\x04\x2f\x04\x2f\x04\xe8\x00\x00\x00\x00\x00\x32\x04\x00\x00\x00\x00\x00\x00\x32\x06\x8a\x06\x8e\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x06\x84\x06\xd1\x06\x00\x00\x00\x00\x00\x00\x00\x00\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x87\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x06\x00\x00\x00\x00\x00\x00"# happyGotoOffsets :: HappyAddr happyGotoOffsets = HappyA# "\x68\x03\x3e\x19\xe5\x03\xea\x06\x95\x01\xdf\x13\xec\x13\xf0\x06\xf1\x06\x00\x00\x00\x00\x0f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x08\x5e\x19\x00\x00\x00\x00\x35\x03\x00\x00\x00\x00\x19\x03\x4a\x06\x00\x00\x00\x00\x00\x00\xed\x06\x00\x00\xce\x01\xe8\x07\x00\x00\x4e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x27\x04\x57\x01\x08\x03\x7e\x19\xc2\x16\xed\x16\x00\x00\x00\x00\x00\x00\x28\x14\x9b\x06\x00\x00\x96\x06\x00\x00\xc2\x00\x9e\x19\x1e\x19\xbe\x19\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\x9f\x06\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x29\x03\xfb\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x03\xf9\x06\x02\x07\x6e\x06\x78\x06\x0d\x07\x1a\x07\x1b\x07\xab\x03\xbd\x03\x27\x00\xbf\x03\x7f\x02\x1e\x07\xc3\x03\xe0\x03\xe4\x03\xeb\x02\x28\x07\x93\x04\x9c\x04\x00\x00\x00\x00\x00\x00\x00\x00\x27\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x06\xde\x19\xfe\x19\x35\x08\xdc\x06\x00\x00\xd4\x06\xf7\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x07\x33\x07\x00\x00\x62\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x06\x7f\x02\x00\x00\x1e\x1a\x00\x00\x00\x00\x68\x02\x3e\x1a\x00\x00\x00\x00\x00\x00\x99\x03\x00\x00\x00\x00\xca\x00\xce\x00\x00\x00\xa1\x03\x3d\x17\x7c\x03\x91\x16\x22\x18\x4c\x18\x71\x02\x73\x18\x7e\x18\x31\x16\x00\x00\xd3\x01\x00\x00\x00\x00\x4a\x07\x00\x00\x21\x07\x54\x02\xba\x03\x5e\x1a\x00\x00\xdf\x03\x00\x00\xa1\x03\x81\x17\xa0\x17\x00\x00\x00\x00\xc0\x03\xbf\x17\xde\x17\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x1a\x9e\x1a\x00\x00\xa2\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x1a\x00\x00\x00\x00\x67\x1d\x00\x00\xb3\x09\xb7\x1d\x00\x00\xa4\x07\x9b\x18\xa6\x18\x72\x1d\x00\x00\x91\x1d\x36\x07\xa1\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x07\x00\x00\xde\x1a\xfe\x1a\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x82\x08\xff\x06\x46\x07\x47\x07\x00\x00\x4c\x07\x00\x00\x00\x00\x4e\x07\x00\x00\x00\x00\x00\x00\x1c\x09\x00\x00\x4f\x07\x56\x07\x6f\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x18\xce\x18\x00\x00\xeb\x18\xf6\x18\x08\x00\xa7\x03\x00\x00\x23\x04\xa1\x03\x62\x17\xfd\x17\x00\x00\x00\x00\x00\x00\x4a\x00\x40\x07\x00\x00\x00\x00\x00\x00\x1e\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x02\x00\x00\x00\x00\x3e\x1b\x5c\x02\x00\x00\x0e\x07\x00\x00\x5e\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x07\x00\x00\x00\x00\x00\x00\x52\x07\x57\x07\x5d\x07\x5f\x07\x00\x00\x00\x00\x00\x00\x00\x00\x53\x07\x6d\x07\x6e\x07\x8a\x02\x71\x07\x00\x00\xb4\x04\x00\x00\x00\x00\x7e\x1b\x9b\x03\xee\x02\x00\x00\x00\x00\xfc\xff\x00\x00\x00\x00\xfd\xff\x00\x00\x2a\x01\x83\x07\x00\x00\x8e\x04\xf0\x04\x00\x00\x00\x00\x00\x00\x2f\x02\x00\x00\x84\x03\xa2\x03\x00\x00\x03\x00\x00\x00\xf9\xff\xf5\x04\xf4\x05\x00\x00\x00\x00\x00\x00\xe6\x03\xe8\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x04\x31\x04\x00\x00\xba\x00\x89\x06\x00\x00\xc0\x06\x00\x00\x00\x00\x21\x04\x00\x00\xfd\x04\xef\x06\x4f\x02\x00\x00\x06\x05\xc1\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x05\x00\x00\x00\x00\x00\x00\x00\x00\x18\x17\x08\x02\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x04\x7a\x04\x00\x00\x00\x00\x9e\x1b\xbe\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x07\x00\x00\xfa\x06\x00\x00\x00\x00\x7c\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x07\x84\x07\x00\x00\x89\x07\x00\x00\x87\x07\x88\x07\x00\x00\x00\x00\xde\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x1b\x00\x00\x00\x00\xdf\x00\x24\x04\x1e\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x05\x00\x00\x9d\x07\x00\x00\x9e\x07\x00\x00\x00\x00\x2f\x01\x00\x00\x00\x00\xcb\x01\x00\x00\x1e\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x02\x00\x00\xe1\x04\x3e\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x02\xa5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x07\x9c\x07\xa1\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x07\x00\x00\x00\x00\x43\x07\x00\x00\x27\x01\x00\x00\x24\x07\x7e\x1c\x00\x00\x3a\x00\x9e\x1c\xbe\x1c\x00\x00\x90\x04\x25\x00\xa1\x04\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\xb6\x03\x00\x00\x00\x00\xc3\x07\xc4\x07\x04\x01\x34\x02\xde\x1c\xb1\x04\xfe\x1c\x00\x00\x45\x05\x1e\x1d\x00\x00\xbd\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x02\x00\x00\xc9\x07\xca\x07\xcb\x07\x00\x00\x3e\x05\xf8\x05\x00\x00\xfc\x05\x0b\x06\x00\x00\x00\x00\x3e\x1d\x00\x00\x00\x00\x55\x01\x31\x07\x00\x00\x2e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x01\x58\x07\x00\x00\x00\x00\x00\x00\x9d\x05\x00\x00\x00\x00\x00\x00\xad\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x07\x00\x00\x00\x00\x51\x06\x00\x00\x77\x00\xdb\x00\x44\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x07\xd1\x07\x00\x00\x00\x00\x00\x00\xcd\x07\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x07\x00\x00\x00\x00\x00\x00\x63\x07\x64\x07\x00\x00\x67\x07\x6c\x07\x00\x00\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\xe6\x07\x00\x00\xe7\x07\x00\x00\x00\x00\xc0\x05\x00\x00\x4d\x07\x74\x07\x00\x00\x00\x00\x1e\x19\x00\x00\x00\x00\xe9\x07\x00\x00\xec\x07\xd2\x03\xf4\x03\x00\x00\xc9\x05\xd4\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x04\xc4\x04\xd8\x04\xe2\x04\xee\x07\x00\x00\x00\x00\xfc\xff\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x07\xf4\x07\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x07\xfb\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int# happyAdjustOffset off = off happyDefActions :: HappyAddr happyDefActions = HappyA# "\xf6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\xfe\x00\x00\xf8\xff\x67\xff\x6a\xff\x00\x00\x1d\xff\xa4\xfe\x4b\xff\x4a\xff\x48\xff\x47\xff\x44\xff\x00\x00\x1a\xff\x19\xff\x1e\xff\x40\xff\x00\x00\x00\x00\x0b\xff\x09\xff\xa3\xfe\x00\x00\x00\x00\x00\x00\x2f\xff\x2d\xff\x2b\xff\x00\x00\x2c\xff\x00\x00\x00\x00\x2e\xff\x00\x00\x2a\xff\x00\x00\x29\xff\x28\xff\x1f\xff\x00\x00\x00\x00\x30\xff\x31\xff\x00\x00\x00\x00\x50\xfe\x00\x00\x00\x00\x00\x00\x86\xff\x68\xff\x1c\xff\x00\x00\xa6\xfe\x00\x00\x7f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\xff\x66\xff\x00\x00\x00\x00\x50\xfe\xa2\xfe\x00\x00\x00\x00\x00\x00\x9e\xfe\x00\x00\x00\x00\xf5\xfd\x9c\xfe\x9b\xfe\x9a\xfe\x99\xfe\x98\xfe\x97\xfe\x9d\xfe\x96\xfe\x95\xfe\x94\xfe\x93\xfe\x92\xfe\x91\xfe\x90\xfe\x8f\xfe\x88\xfe\x8a\xfe\x89\xfe\x00\x00\x8e\xfe\x8d\xfe\x8c\xfe\x8e\xff\x8b\xfe\x42\xfe\x2d\xfe\x41\xfe\x40\xfe\x3e\xfe\x3f\xfe\x3d\xfe\x3b\xfe\x3a\xfe\x3c\xfe\x32\xfe\x31\xfe\x36\xfe\x37\xfe\x38\xfe\x34\xfe\x33\xfe\x39\xfe\x30\xfe\x2f\xfe\x2e\xfe\x35\xfe\xf3\xfd\x43\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\xff\x24\xff\x00\x00\x83\xff\x00\x00\x00\x00\x25\xff\x22\xff\xa2\xfe\x00\x00\x00\x00\x00\x00\xa8\xfe\x69\xff\x7f\xfe\x00\x00\x1d\xff\x00\x00\x61\xff\x60\xff\x00\x00\x00\x00\x30\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x51\xfe\x6d\xff\x00\x00\x65\xff\xd2\xfe\xea\xfe\x00\x00\x38\xff\x00\x00\xf5\xfe\xf2\xfe\xeb\xfe\x00\x00\x00\x00\x00\x00\x64\xff\x50\xfe\x00\x00\x35\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\xff\x37\xff\xa5\xfe\x00\x00\x18\xff\x00\x00\x3b\xff\x50\xfe\xd7\xfe\x00\x00\x00\x00\xd8\xfe\xd3\xfe\x50\xfe\x00\x00\x00\x00\x0a\xff\x00\x00\x50\xfe\x00\x00\x00\x00\x0c\xff\x4f\xff\x46\xff\x36\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\xf5\xff\xf4\xff\xf3\xff\xf2\xff\xf1\xff\xf0\xff\xef\xff\xee\xff\xed\xff\xec\xff\xeb\xff\xea\xff\xe9\xff\xe8\xff\xe7\xff\xe6\xff\xe5\xff\xe4\xff\xe3\xff\xe2\xff\xe1\xff\xe0\xff\xdf\xff\xde\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xd9\xff\xd8\xff\xd7\xff\xd6\xff\xd5\xff\xd4\xff\xd3\xff\xd2\xff\xd1\xff\xd0\xff\xcf\xff\xce\xff\xcd\xff\xcc\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xc5\xff\xc4\xff\xc3\xff\xc2\xff\xc1\xff\xc0\xff\xbf\xff\xbe\xff\xbd\xff\xbc\xff\xbb\xff\xba\xff\xb9\xff\xb8\xff\xb7\xff\xb6\xff\xb5\xff\xb1\xff\xb4\xff\xb3\xff\xb2\xff\xb0\xff\xaf\xff\xae\xff\xad\xff\xac\xff\xab\xff\xaa\xff\xa9\xff\xa8\xff\xa7\xff\xa6\xff\xa5\xff\xa4\xff\xa3\xff\xa2\xff\xa1\xff\xa0\xff\x9f\xff\x9e\xff\x9d\xff\x9c\xff\x9b\xff\x9a\xff\x99\xff\x98\xff\x97\xff\x96\xff\x95\xff\x94\xff\x93\xff\x92\xff\x91\xff\x90\xff\x23\xff\x00\x00\x4c\xff\x4e\xff\x00\x00\x60\xff\x40\xff\x00\x00\x5b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x61\xff\x00\x00\x00\x00\x00\x00\x00\x00\x5b\xff\xda\xfe\xdb\xfe\x43\xff\xd9\xfe\x00\x00\x42\xff\x00\x00\x00\x00\x67\xff\x4c\xfe\x00\x00\x17\xff\x16\xff\x13\xff\x14\xff\x11\xff\x00\x00\xc1\xfe\x00\x00\xc5\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\xfe\x00\x00\x40\xff\xde\xfe\x00\x00\x00\x00\x35\xff\xe8\xfe\x00\x00\xe7\xfe\xe9\xfe\xd1\xfe\x00\x00\x00\x00\xd0\xfe\x00\x00\x00\x00\x35\xff\xf1\xfe\xed\xfe\xf2\xfe\x50\xfe\x00\x00\x00\x00\xf6\xfe\x45\xff\xec\xfe\x4c\xfe\x3b\xff\xfc\xfe\x01\xff\x02\xff\x00\x00\x00\x00\x26\xff\xff\xfe\x00\xff\x00\x00\xfd\xfe\xfe\xfe\x00\x00\x00\x00\x00\x00\xa2\xfe\xa9\xfe\x00\x00\x49\xff\x81\xfe\x80\xfe\x83\xfe\x1b\xff\x82\xff\x27\xff\x33\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\xff\x00\x00\x00\x00\x57\xff\x00\x00\x00\x00\x84\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xfe\xf8\xfd\x6d\xfe\x00\x00\x69\xfe\x12\xfe\x00\x00\x6a\xfe\x63\xfe\x00\x00\x6f\xfe\xd4\xfe\xd4\xfe\x44\xfe\x6b\xfe\x6c\xfe\x00\x00\x87\xff\x00\x00\x00\x00\x70\xfe\x08\xfe\x71\xfe\x6c\xff\xd4\xfe\xd4\xfe\x6e\xfe\x8f\xff\x8d\xff\x00\x00\x50\xfe\x8a\xff\xf6\xfd\xa1\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xfd\x4c\xfe\xd4\xfe\x00\x00\xd4\xfe\x00\x00\x00\x00\x00\x00\x0c\xfe\x00\x00\x00\x00\x6c\xff\x09\xfe\x00\x00\x62\xff\x74\xfe\x73\xfe\x72\xfe\x00\x00\x00\x00\xd4\xfe\x62\xfe\x00\x00\x13\xfe\x00\x00\x0f\xfe\x00\x00\x8b\xff\x8c\xff\xf9\xfd\x00\x00\x11\xff\x00\x00\x5f\xfe\x5d\xfe\x58\xfe\x00\x00\x00\x00\x00\x00\x52\xfe\x68\xfe\x00\x00\x00\x00\x85\xff\x1e\xfe\x00\x00\x51\xff\x50\xff\x00\x00\x57\xff\x00\x00\x16\xfe\x52\xff\x00\x00\x5a\xff\x1f\xfe\x19\xfe\x1a\xfe\x20\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x1b\xfe\x00\x00\x55\xff\x00\x00\x5a\xff\x1c\xfe\x00\x00\x00\x00\xa7\xfe\x82\xfe\x00\x00\x5f\xff\x5d\xff\xfa\xfe\x5e\xff\x5c\xff\x00\x00\xf8\xfe\xfb\xfe\x4c\xfe\xbd\xfe\x00\x00\xef\xfe\xee\xfe\xf0\xfe\xf4\xfe\xf3\xfe\xe4\xfe\xe2\xfe\xe1\xfe\xdc\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\xfe\x00\x00\x35\xff\x3a\xff\x89\xff\x35\xff\x34\xff\x00\x00\x08\xff\x06\xff\x07\xff\x05\xff\x03\xff\x04\xff\x00\x00\xc4\xfe\x41\xff\xc2\xfe\x00\x00\x3d\xff\x00\x00\x00\x00\x10\xff\x0f\xff\x00\x00\x21\xff\xbd\xfe\x00\x00\x3f\xff\x3c\xff\xfa\xfd\xcf\xfe\x00\x00\xcb\xfe\x00\x00\xcd\xfe\x61\xff\x4d\xff\xcc\xfe\xca\xfe\xce\xfe\x0d\xff\x12\xff\xbf\xfe\xbd\xfe\xbb\xfe\xba\xfe\xb9\xfe\x00\x00\xbc\xfe\x00\x00\x00\x00\x15\xff\x00\x00\x20\xff\x35\xff\xc3\xfe\xe6\xfe\xdf\xfe\xe0\xfe\x00\x00\xc8\xfe\xc9\xfe\xc6\xfe\xc7\xfe\x39\xff\x35\xff\x1f\xff\x4e\xfe\x4b\xfe\xf7\xfe\xf9\xfe\x00\x00\x00\x00\x00\x00\x21\xfe\x00\x00\x55\xff\x55\xff\x5a\xff\x23\xfe\x25\xfe\x24\xfe\x1d\xfe\x59\xff\x2c\xfe\x00\x00\x00\x00\x56\xff\x29\xfe\x26\xfe\x66\xfe\x67\xfe\x00\x00\x55\xfe\x00\x00\x00\x00\x55\xfe\x00\x00\x5e\xfe\x00\x00\x67\xff\x00\x00\x00\x00\x11\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\xff\x0b\xfe\x6c\xff\x00\x00\x84\xfe\x0e\xfe\x6c\xff\x7f\xff\x7b\xff\x6e\xff\x6b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xfe\x00\x00\x00\x00\xd5\xfe\xbd\xfe\xa0\xfe\x9f\xfe\x4f\xfe\x00\x00\x7b\xfe\x7a\xfe\x7c\xfe\x86\xfe\x7d\xff\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff\x00\x00\x00\x00\x81\xff\x00\x00\x00\x00\x7c\xff\x0d\xfe\x00\x00\x0a\xfe\x45\xfe\x4c\xfe\xbd\xfe\x46\xfe\x00\x00\x64\xfe\x87\xfe\x10\xfe\x77\xfe\x78\xfe\x04\xfe\x65\xfe\x61\xfe\x00\x00\x00\x00\x00\x00\x5b\xfe\x00\x00\x00\x00\x00\x00\x5c\xfe\x17\xfe\x15\xfe\x18\xfe\x14\xfe\x00\x00\x54\xff\x00\x00\x28\xfe\x22\xfe\x2a\xfe\x2b\xfe\xbd\xfe\xdd\xfe\xe5\xfe\x00\x00\x0e\xff\xad\xfe\x88\xff\xad\xfe\xbe\xfe\xaf\xfe\xab\xfe\x00\x00\xac\xfe\x00\x00\x00\x00\x00\x00\xb3\xfe\x00\x00\x88\xff\xb5\xfe\x00\x00\xc0\xfe\x4d\xfe\x55\xff\x27\xfe\x00\x00\x55\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\xfe\x01\xfe\x00\x00\x02\xfe\xff\xfd\x00\xfe\x00\x00\xfb\xfd\x00\x00\xfe\xfd\xfc\xfd\x00\x00\xfd\xfd\x00\x00\xbd\xfe\x48\xfe\x49\xfe\x00\x00\x85\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x79\xff\x77\xff\x7e\xff\x00\x00\x00\x00\x7d\xfe\x7e\xfe\x78\xff\x7a\xff\x73\xff\x75\xff\x6f\xff\x71\xff\x1f\xff\x47\xfe\x79\xfe\x00\x00\x76\xfe\x05\xfe\x07\xfe\x50\xfe\x00\x00\x00\x00\x59\xfe\x54\xfe\x53\xfe\x5a\xfe\x53\xff\xb8\xfe\x00\x00\x00\x00\x88\xff\xb6\xfe\xb1\xfe\xae\xfe\xb7\xfe\x00\x00\xaa\xfe\xb4\xfe\xb2\xfe\xb0\xfe\x56\xfe\x57\xfe\x03\xfe\x00\x00\x00\x00\x4a\xfe\x72\xff\x70\xff\x76\xff\x74\xff\x00\x00\x06\xfe\x75\xfe"# happyCheck :: HappyAddr happyCheck = HappyA# "\xff\xff\x05\x00\x05\x00\x15\x00\x0c\x00\x09\x00\x09\x00\x0a\x00\x0f\x00\x43\x00\x11\x00\x4f\x00\x10\x00\x4f\x00\x12\x00\x13\x00\x5e\x00\x09\x00\x0f\x00\x15\x00\x11\x00\x57\x00\x4f\x00\x5b\x00\x54\x00\x5d\x00\x00\x00\x13\x00\x09\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x09\x00\x27\x00\x28\x00\x15\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x63\x00\x65\x00\x24\x00\x25\x00\x09\x00\x27\x00\x09\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x09\x00\x13\x00\x14\x00\x13\x00\x14\x00\x53\x00\x52\x00\x2e\x00\x2e\x00\x13\x00\x13\x00\x14\x00\x09\x00\x0a\x00\x32\x00\x33\x00\x34\x00\x67\x00\x41\x00\x42\x00\x43\x00\x63\x00\x45\x00\x0f\x00\x57\x00\x11\x00\x63\x00\x0f\x00\x09\x00\x11\x00\x57\x00\x5a\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x62\x00\x60\x00\x13\x00\x61\x00\x63\x00\x4f\x00\x65\x00\x66\x00\x67\x00\x68\x00\x62\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x4f\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x54\x00\x5f\x00\x7e\x00\x7f\x00\x5f\x00\x63\x00\x82\x00\x83\x00\x09\x00\x4f\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x09\x00\x5e\x00\x61\x00\xa3\x00\x84\x00\xa1\x00\x97\x00\x10\x00\x62\x00\x12\x00\x13\x00\x09\x00\x62\x00\x81\x00\x09\x00\xa5\x00\xad\x00\x63\x00\x84\x00\x2e\x00\x80\x00\x13\x00\x81\x00\x63\x00\x64\x00\x22\x00\x23\x00\x24\x00\x25\x00\x2e\x00\x27\x00\x28\x00\x15\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x52\x00\x24\x00\x25\x00\x55\x00\x27\x00\x09\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x4e\x00\x80\x00\x09\x00\x4e\x00\x13\x00\x57\x00\x58\x00\x59\x00\x33\x00\x34\x00\x09\x00\x2e\x00\x13\x00\x4e\x00\x09\x00\x5d\x00\x4b\x00\x4c\x00\x5e\x00\x41\x00\x42\x00\x43\x00\x15\x00\x45\x00\x00\x00\x07\x00\x15\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x25\x00\x5a\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x60\x00\x63\x00\x13\x00\x63\x00\x4e\x00\x65\x00\x66\x00\x67\x00\x68\x00\x67\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x63\x00\x64\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x7e\x00\x7f\x00\x0c\x00\x0d\x00\x82\x00\x83\x00\x55\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x09\x00\x4d\x00\x54\x00\x55\x00\x56\x00\x97\x00\x09\x00\x10\x00\x4e\x00\x12\x00\x13\x00\x09\x00\x57\x00\x80\x00\x59\x00\x5e\x00\xad\x00\xae\x00\x15\x00\x5f\x00\x60\x00\x13\x00\x5b\x00\x5d\x00\x5d\x00\x22\x00\x23\x00\x24\x00\x25\x00\x50\x00\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x50\x00\x24\x00\x25\x00\x4e\x00\x27\x00\x09\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x63\x00\x09\x00\x80\x00\x09\x00\x13\x00\x38\x00\x0a\x00\x5d\x00\x63\x00\x64\x00\x56\x00\x13\x00\x3f\x00\x13\x00\x5a\x00\x62\x00\x5c\x00\x0b\x00\x65\x00\x41\x00\x42\x00\x43\x00\x49\x00\x4a\x00\x07\x00\x28\x00\x1e\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x5f\x00\x24\x00\x5a\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2c\x00\x60\x00\x63\x00\x2d\x00\x63\x00\x63\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x57\x00\x58\x00\x59\x00\x09\x00\x78\x00\x5e\x00\x77\x00\x7e\x00\x7f\x00\x7d\x00\x5e\x00\x82\x00\x83\x00\x13\x00\x14\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x66\x00\x54\x00\x55\x00\x56\x00\x50\x00\x97\x00\x11\x00\x12\x00\x09\x00\x4d\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\x5e\x00\x10\x00\xad\x00\x12\x00\x13\x00\x09\x00\x80\x00\x5e\x00\x09\x00\x63\x00\x64\x00\x5d\x00\x4d\x00\x09\x00\x60\x00\x13\x00\x5e\x00\x4d\x00\x13\x00\x22\x00\x23\x00\x24\x00\x25\x00\x13\x00\x27\x00\x28\x00\x2e\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x60\x00\x24\x00\x25\x00\x50\x00\x27\x00\x60\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2b\x00\x2c\x00\x28\x00\x4d\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x4b\x00\x4c\x00\x50\x00\x63\x00\x64\x00\x4b\x00\x4c\x00\x50\x00\x50\x00\x54\x00\x50\x00\x41\x00\x42\x00\x43\x00\x60\x00\x5a\x00\x56\x00\x5c\x00\x09\x00\x63\x00\x5a\x00\x63\x00\x5c\x00\x09\x00\x63\x00\x5a\x00\x63\x00\x63\x00\x13\x00\x63\x00\x10\x00\x60\x00\x5e\x00\x13\x00\x63\x00\x5e\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x7e\x00\x7f\x00\x0c\x00\x0d\x00\x82\x00\x83\x00\x15\x00\x16\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x09\x00\x0f\x00\x4e\x00\x11\x00\x5d\x00\x97\x00\x4e\x00\x10\x00\x09\x00\x12\x00\x13\x00\xa8\x00\xa9\x00\xaa\x00\x09\x00\x5b\x00\xad\x00\x5d\x00\x13\x00\x5b\x00\x09\x00\x5d\x00\x4e\x00\x4f\x00\x13\x00\x22\x00\x23\x00\x24\x00\x25\x00\x09\x00\x27\x00\x28\x00\x15\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x7a\x00\x7b\x00\x13\x00\x7d\x00\x24\x00\x25\x00\x09\x00\x27\x00\x19\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x4b\x00\x4c\x00\x13\x00\x14\x00\x5d\x00\x24\x00\x25\x00\x57\x00\x27\x00\x54\x00\x30\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x5a\x00\x38\x00\x5c\x00\x4f\x00\x41\x00\x42\x00\x43\x00\x1c\x00\x3f\x00\x63\x00\x56\x00\x20\x00\x09\x00\x3b\x00\x5a\x00\x5a\x00\x5c\x00\x4f\x00\x49\x00\x4a\x00\x4e\x00\x60\x00\x13\x00\x63\x00\x63\x00\x5d\x00\x65\x00\x66\x00\x67\x00\x68\x00\x5d\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x4f\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x59\x00\x09\x00\x7e\x00\x7f\x00\x0c\x00\x0d\x00\x82\x00\x83\x00\x63\x00\x64\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x09\x00\x11\x00\x12\x00\x09\x00\x4e\x00\x50\x00\x09\x00\x10\x00\x97\x00\x12\x00\x13\x00\x56\x00\x09\x00\x13\x00\x57\x00\x5a\x00\xad\x00\x5c\x00\x15\x00\x63\x00\x64\x00\x57\x00\x13\x00\x14\x00\x63\x00\x22\x00\x23\x00\x24\x00\x25\x00\x57\x00\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2b\x00\x2c\x00\x10\x00\x56\x00\x12\x00\x13\x00\x5e\x00\x5a\x00\x5a\x00\x5c\x00\x5c\x00\x19\x00\x09\x00\x2f\x00\x30\x00\x31\x00\x38\x00\x63\x00\x34\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x15\x00\x27\x00\x28\x00\x52\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x48\x00\x49\x00\x4a\x00\x11\x00\x12\x00\x4b\x00\x4c\x00\x35\x00\x36\x00\x37\x00\x38\x00\x61\x00\x5a\x00\x3b\x00\x3c\x00\x65\x00\x56\x00\x5e\x00\x60\x00\x5c\x00\x5a\x00\x63\x00\x5c\x00\x65\x00\x66\x00\x67\x00\x68\x00\x38\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x46\x00\x47\x00\x55\x00\x49\x00\x4a\x00\x63\x00\x64\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x82\x00\x83\x00\x37\x00\x38\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x09\x00\x7e\x00\x7f\x00\x52\x00\x5a\x00\x0c\x00\x5c\x00\x10\x00\x09\x00\x12\x00\x13\x00\x52\x00\x50\x00\x63\x00\x17\x00\x18\x00\xad\x00\x0c\x00\x56\x00\x5d\x00\x15\x00\x16\x00\x5a\x00\x57\x00\x5c\x00\x57\x00\x56\x00\x24\x00\x25\x00\x09\x00\x27\x00\x63\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x09\x00\x63\x00\x64\x00\x15\x00\x66\x00\x09\x00\x10\x00\x4f\x00\x12\x00\x13\x00\x39\x00\x3a\x00\x15\x00\x16\x00\x18\x00\x19\x00\x5d\x00\x15\x00\x41\x00\x42\x00\x09\x00\x44\x00\x4d\x00\x0c\x00\x09\x00\x0e\x00\x24\x00\x25\x00\x63\x00\x27\x00\x09\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x15\x00\x10\x00\x38\x00\x12\x00\x13\x00\xab\x00\xac\x00\x15\x00\x16\x00\x3f\x00\x19\x00\x2e\x00\x09\x00\x3b\x00\x3c\x00\x0c\x00\x38\x00\x0e\x00\x52\x00\x49\x00\x4a\x00\x24\x00\x25\x00\x3f\x00\x27\x00\x09\x00\x5d\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x09\x00\x49\x00\x4a\x00\x38\x00\x57\x00\x15\x00\x10\x00\x57\x00\x12\x00\x13\x00\x13\x00\x14\x00\x3b\x00\x3c\x00\x09\x00\xab\x00\xac\x00\x0c\x00\x47\x00\x0e\x00\x49\x00\x4a\x00\x5d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x52\x00\x27\x00\x28\x00\x32\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x97\x00\x79\x00\x7a\x00\x7b\x00\x38\x00\x7d\x00\x52\x00\x35\x00\x36\x00\x37\x00\x38\x00\x56\x00\x7e\x00\x7f\x00\x52\x00\x5a\x00\x52\x00\x5c\x00\x52\x00\x47\x00\x4e\x00\x49\x00\x4a\x00\x09\x00\x63\x00\x09\x00\x0c\x00\x62\x00\x0e\x00\x09\x00\x10\x00\x00\x00\x01\x00\x02\x00\x4e\x00\x04\x00\x05\x00\x15\x00\x07\x00\x08\x00\x09\x00\x15\x00\x0b\x00\x7e\x00\x7f\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x5f\x00\x13\x00\x14\x00\x15\x00\x16\x00\x4f\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x65\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xab\x00\xac\x00\x26\x00\x27\x00\x28\x00\x38\x00\x2a\x00\x2b\x00\x2c\x00\x38\x00\x65\x00\x2f\x00\x3f\x00\x65\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xab\x00\xac\x00\xab\x00\xac\x00\x49\x00\x4a\x00\xab\x00\xac\x00\x49\x00\x4a\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x46\x00\x47\x00\x4b\x00\x4c\x00\x4a\x00\x65\x00\x4c\x00\x9f\x00\xa0\x00\x62\x00\x50\x00\x51\x00\x4f\x00\x53\x00\x54\x00\x65\x00\x56\x00\x5a\x00\x58\x00\x5c\x00\x5a\x00\x62\x00\x5c\x00\xab\x00\xac\x00\x5f\x00\x63\x00\x61\x00\x2e\x00\x63\x00\x64\x00\x09\x00\x66\x00\x00\x00\x01\x00\x02\x00\x09\x00\x0a\x00\x05\x00\x65\x00\x07\x00\x08\x00\x09\x00\x15\x00\x0b\x00\x09\x00\x0a\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x62\x00\x13\x00\x14\x00\x15\x00\x16\x00\x62\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x62\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\x0a\x00\x26\x00\x27\x00\x28\x00\x65\x00\x2a\x00\x2b\x00\x2c\x00\x38\x00\x65\x00\x2f\x00\x09\x00\x4b\x00\x4c\x00\x0c\x00\x09\x00\x0e\x00\x50\x00\x0c\x00\x52\x00\x0e\x00\xab\x00\xac\x00\x56\x00\x48\x00\x49\x00\x4a\x00\x5a\x00\x65\x00\x5c\x00\xab\x00\xac\x00\x65\x00\x46\x00\x47\x00\x09\x00\x63\x00\x4a\x00\x0c\x00\x4c\x00\x0e\x00\x7c\x00\x7d\x00\x50\x00\x51\x00\x09\x00\x53\x00\x54\x00\x0c\x00\x56\x00\x0e\x00\x58\x00\x65\x00\x5a\x00\x62\x00\x5c\x00\x7c\x00\x7d\x00\x5f\x00\x09\x00\x61\x00\x63\x00\x63\x00\x64\x00\x09\x00\x66\x00\x01\x00\x02\x00\x05\x00\x06\x00\x05\x00\x15\x00\x07\x00\x08\x00\x09\x00\x63\x00\x15\x00\x05\x00\x06\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x2e\x00\x13\x00\x14\x00\x15\x00\x16\x00\x5e\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x4e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x05\x00\x06\x00\x26\x00\x27\x00\x28\x00\x38\x00\x2a\x00\x2b\x00\x2c\x00\x5e\x00\x38\x00\x2f\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x05\x00\x06\x00\x2e\x00\x48\x00\x49\x00\x4a\x00\xab\x00\xac\x00\x48\x00\x49\x00\x4a\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x46\x00\x47\x00\x09\x00\x0a\x00\x4a\x00\x4f\x00\x4c\x00\xab\x00\xac\x00\x4e\x00\x50\x00\x51\x00\x53\x00\x53\x00\x54\x00\x62\x00\x56\x00\x62\x00\x58\x00\x65\x00\x5a\x00\x62\x00\x5c\x00\xab\x00\xac\x00\x5f\x00\x66\x00\x61\x00\x65\x00\x63\x00\x64\x00\x62\x00\x66\x00\x67\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x62\x00\x0b\x00\x62\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x62\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x65\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xab\x00\xac\x00\x26\x00\x27\x00\x28\x00\x62\x00\x2a\x00\x2b\x00\x2c\x00\x4b\x00\x4c\x00\x2f\x00\x65\x00\x09\x00\x50\x00\x65\x00\x52\x00\x09\x00\x0a\x00\x52\x00\x56\x00\x09\x00\x0a\x00\x5e\x00\x5a\x00\x15\x00\x5c\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x63\x00\x46\x00\x47\x00\x09\x00\x0a\x00\x4a\x00\x4f\x00\x4c\x00\x7c\x00\x7d\x00\x5d\x00\x50\x00\x51\x00\x4d\x00\x53\x00\x54\x00\x57\x00\x56\x00\x5d\x00\x58\x00\x56\x00\x5a\x00\x63\x00\x5c\x00\x7c\x00\x7d\x00\x56\x00\x38\x00\x61\x00\x56\x00\x63\x00\x64\x00\x5b\x00\x66\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x48\x00\x49\x00\x4a\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x62\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x62\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x05\x00\x06\x00\x26\x00\x27\x00\x28\x00\x62\x00\x2a\x00\x2b\x00\x2c\x00\x4b\x00\x4c\x00\x2f\x00\x4b\x00\x4c\x00\x50\x00\x05\x00\x06\x00\x50\x00\x62\x00\x65\x00\x56\x00\xab\x00\xac\x00\x56\x00\x5a\x00\x62\x00\x5c\x00\x5a\x00\x5d\x00\x5c\x00\xab\x00\xac\x00\x4f\x00\x63\x00\x46\x00\x47\x00\x63\x00\x4f\x00\x4a\x00\x63\x00\x4c\x00\xab\x00\xac\x00\x5e\x00\x50\x00\x51\x00\x63\x00\x53\x00\x54\x00\x4f\x00\x56\x00\x5e\x00\x58\x00\x4e\x00\x5a\x00\x5e\x00\x5c\x00\x2e\x00\x2e\x00\x5d\x00\x09\x00\x61\x00\x63\x00\x63\x00\x64\x00\x2e\x00\x66\x00\x01\x00\x02\x00\x52\x00\x63\x00\x05\x00\x15\x00\x07\x00\x08\x00\x09\x00\x52\x00\x0b\x00\x52\x00\x52\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x62\x00\x13\x00\x14\x00\x15\x00\x16\x00\x62\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x57\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x4d\x00\x63\x00\x26\x00\x27\x00\x28\x00\x38\x00\x2a\x00\x2b\x00\x2c\x00\x4b\x00\x4c\x00\x2f\x00\x57\x00\x09\x00\x50\x00\x4d\x00\x29\x00\x57\x00\x63\x00\x5d\x00\x56\x00\x48\x00\x49\x00\x4a\x00\x5a\x00\x15\x00\x5c\x00\x5b\x00\x63\x00\x5e\x00\x63\x00\x5e\x00\x5d\x00\x63\x00\x46\x00\x47\x00\x5d\x00\x57\x00\x4a\x00\x5e\x00\x4c\x00\x57\x00\x15\x00\x63\x00\x50\x00\x51\x00\x63\x00\x53\x00\x54\x00\x03\x00\x56\x00\x5f\x00\x58\x00\x01\x00\x5a\x00\x02\x00\x5c\x00\xab\x00\x09\x00\x5c\x00\x38\x00\x61\x00\x64\x00\x63\x00\x64\x00\x5e\x00\x66\x00\x01\x00\x02\x00\x06\x00\x09\x00\x05\x00\x04\x00\x07\x00\x08\x00\x09\x00\x48\x00\x49\x00\x4a\x00\x09\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xa2\x00\x13\x00\x14\x00\x15\x00\x16\x00\x08\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\xa4\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x08\x00\x08\x00\x26\x00\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x4b\x00\x4c\x00\x2f\x00\x4b\x00\x4c\x00\x50\x00\x09\x00\x0b\x00\x50\x00\x09\x00\x5e\x00\x56\x00\x5b\x00\x64\x00\x56\x00\x5a\x00\x0b\x00\x5c\x00\x5a\x00\x0b\x00\x5c\x00\x15\x00\x0b\x00\xab\x00\x63\x00\x46\x00\x47\x00\x63\x00\x26\x00\x4a\x00\x05\x00\x4c\x00\x05\x00\x4d\x00\x06\x00\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\x09\x00\x56\x00\x06\x00\x58\x00\x0b\x00\x5a\x00\x0b\x00\x5c\x00\x13\x00\x06\x00\x13\x00\x14\x00\x61\x00\x18\x00\x63\x00\x64\x00\x38\x00\x66\x00\x1d\x00\x26\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x5e\x00\x1a\x00\x26\x00\x1f\x00\x28\x00\x1f\x00\x2a\x00\x48\x00\x49\x00\x4a\x00\x1f\x00\x2f\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x1f\x00\x1e\x00\x34\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x1e\x00\x09\x00\x1f\x00\x46\x00\x47\x00\x1f\x00\xa2\x00\x4a\x00\x4b\x00\x4c\x00\x1c\x00\x1a\x00\x9d\x00\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\x1f\x00\x56\x00\x57\x00\x58\x00\x1d\x00\x5a\x00\x1a\x00\x5c\x00\x13\x00\x1f\x00\x1f\x00\x0b\x00\x0b\x00\x0b\x00\x63\x00\x64\x00\x09\x00\x66\x00\x1d\x00\x0b\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x1d\x00\x13\x00\x26\x00\x1d\x00\x28\x00\x1a\x00\x2a\x00\x19\x00\x9e\x00\x7d\x00\x7d\x00\x2f\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x24\x00\x25\x00\xa6\x00\x27\x00\x09\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\x09\x00\x07\x00\x7d\x00\x0b\x00\x09\x00\x46\x00\x47\x00\x09\x00\x1d\x00\x4a\x00\x4b\x00\x4c\x00\x3b\x00\x7d\x00\x7d\x00\x50\x00\x51\x00\x7d\x00\x53\x00\x54\x00\x08\x00\x56\x00\x7d\x00\x58\x00\x05\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x09\x00\x09\x00\x13\x00\xa6\x00\x0b\x00\x63\x00\x64\x00\x0b\x00\x66\x00\x0b\x00\x09\x00\x13\x00\x1d\x00\x09\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x05\x00\x09\x00\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\x22\x00\x23\x00\x24\x00\x25\x00\x2f\x00\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\x09\x00\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x13\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\x23\x00\x24\x00\x25\x00\x2f\x00\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\x09\x00\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x13\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\x23\x00\x24\x00\x25\x00\x2f\x00\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\x09\x00\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x13\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\x24\x00\x25\x00\x2f\x00\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\x09\x00\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x13\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x25\x00\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\x24\x00\x25\x00\x2f\x00\x27\x00\xff\xff\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\x09\x00\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x13\x00\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x5d\x00\xff\xff\x09\x00\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x13\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\x24\x00\x25\x00\x2f\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\x2f\x00\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\x18\x00\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\x2f\x00\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\x61\x00\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\x18\x00\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x5b\x00\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\x08\x00\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x54\x00\x08\x00\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x5d\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\x08\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\x08\x00\x53\x00\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\x53\x00\x09\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x10\x00\x5c\x00\x12\x00\x13\x00\xff\xff\xff\xff\x09\x00\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\x09\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x10\x00\x5a\x00\x2a\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x5d\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x09\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x63\x00\x64\x00\x13\x00\x66\x00\x1d\x00\xff\xff\x1f\x00\x20\x00\x19\x00\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\x5a\x00\xff\xff\x2a\x00\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\x63\x00\x64\x00\x4a\x00\x66\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\x1d\x00\x66\x00\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\x63\x00\x64\x00\x4a\x00\x66\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\x1d\x00\x66\x00\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\x63\x00\x64\x00\x4a\x00\x66\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\x1d\x00\x66\x00\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\x1f\x00\x20\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\x63\x00\x64\x00\x4a\x00\x66\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x63\x00\x64\x00\x1d\x00\x66\x00\x1f\x00\x20\x00\x10\x00\x22\x00\x23\x00\x13\x00\xff\xff\x26\x00\xff\xff\x17\x00\x18\x00\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\x09\x00\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\x5a\x00\x10\x00\x5c\x00\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\x64\x00\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\x09\x00\x3b\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x32\x00\x33\x00\x34\x00\x10\x00\xff\xff\x12\x00\x13\x00\x39\x00\x3a\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\x39\x00\x3a\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\x39\x00\x3a\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x13\x00\x09\x00\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x24\x00\x25\x00\x09\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x39\x00\xff\xff\x13\x00\x09\x00\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\x39\x00\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x24\x00\x25\x00\x09\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x39\x00\xff\xff\x13\x00\x09\x00\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\x39\x00\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x24\x00\x25\x00\x09\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x39\x00\xff\xff\x13\x00\x09\x00\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\x39\x00\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x39\x00\xff\xff\xff\xff\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x39\x00\x12\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\x09\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xff\xff\x27\x00\x28\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x35\x00\x36\x00\x37\x00\x38\x00\x10\x00\xff\xff\xff\xff\x13\x00\x09\x00\xff\xff\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\x09\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x10\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\x17\x00\x18\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x13\x00\x24\x00\x25\x00\xff\xff\x27\x00\x18\x00\x19\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\x10\x00\x27\x00\xff\xff\x13\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x19\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\x25\x00\xff\xff\x27\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# happyTable :: HappyAddr happyTable = HappyA# "\x00\x00\x17\x02\x11\x02\x29\x03\x71\x01\x09\x00\xcf\x01\x12\x02\x00\x02\x40\x02\x01\x02\x48\xff\x0a\x00\x48\xff\x3b\x00\x0c\x00\x49\x00\x09\x00\x00\x02\x2e\x03\x01\x02\x48\xff\xd3\x01\x48\xff\xf0\x00\x48\xff\x16\x02\x0c\x00\x71\x02\x16\x02\x3c\x00\x0f\x00\x10\x00\x11\x00\xf6\x01\x12\x00\x3d\x00\x4f\x00\x14\x00\x15\x00\x16\x00\x17\x00\x39\x00\x41\x02\x54\x02\x11\x00\x44\x00\x12\x00\x44\x00\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\x09\x00\x44\x00\x45\x00\xfc\x02\x45\x00\xdf\x01\xbd\x02\xe9\x00\x50\x00\xcb\x02\x0c\x00\x45\x00\xfc\x02\xcf\x01\x12\x02\x72\x02\x73\x02\x74\x02\xff\xff\x55\x02\x56\x02\x57\x02\x22\x02\x58\x02\x00\x02\x4c\x02\x01\x02\x39\x00\x00\x02\x09\x00\x01\x02\x2f\x03\x3e\x00\x14\x00\x15\x00\x16\x00\x4c\x02\x02\x02\x50\x00\x0c\x00\x13\x02\x51\x00\xcc\x02\x52\x00\x53\x00\x54\x00\x55\x00\x06\x02\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x79\x02\x14\x00\x15\x00\x16\x00\x4c\x02\xf0\x00\x17\x02\x63\x00\x64\x00\x17\x02\x39\x00\x65\x00\x66\x00\x24\x03\xee\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x09\x00\xdb\x00\x02\x03\x03\x02\xf7\x01\x14\x02\x8a\x01\x0a\x00\xfa\x02\x3b\x00\x0c\x00\x09\x00\xf8\x02\xfd\x02\x71\x02\x07\x02\x6e\x01\x39\x00\xe0\x01\xe1\x02\x77\x02\x0c\x00\x49\x03\x39\x00\x3a\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\xde\x02\x12\x00\x3d\x00\xde\x01\x14\x00\x15\x00\x16\x00\x17\x00\xed\x00\x54\x02\x11\x00\xa4\x00\x12\x00\x09\x00\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\x60\xff\x4d\x02\x09\x00\xe2\x02\x0c\x00\x25\x03\x2f\x03\x27\x03\x1f\x03\x74\x02\xbc\x00\xc4\x02\x0c\x00\xdf\x02\xbc\x00\x60\xff\xef\x02\xf0\x02\xd3\x00\x55\x02\x56\x02\x57\x02\x92\x01\x1e\x03\x16\x02\x29\x03\x8f\x01\x14\x00\x15\x00\x16\x00\x4c\x02\x09\x00\x27\x00\x3e\x00\x24\x03\x14\x00\x15\x00\x16\x00\x9f\x00\x50\x00\x39\x00\x0c\x00\x51\x00\xc5\x02\x52\x00\x53\x00\x54\x00\x55\x00\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x39\x00\x3a\x00\x14\x00\x15\x00\x16\x00\x4c\x02\xd4\x02\x63\x00\x64\x00\xec\x02\xf0\x02\x65\x00\x66\x00\xa4\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x09\x00\xf4\x01\x2a\x03\x2b\x03\x2c\x03\x8a\x01\xbc\x00\x0a\x00\xad\x01\x3b\x00\x0c\x00\x09\x00\x25\x03\xe3\x02\x77\x03\xd8\x01\x7f\x00\x80\x00\xbd\x00\x17\x02\x62\x02\x0c\x00\x9c\x00\x9e\x02\x9d\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\xe2\x01\x12\x00\x3d\x00\x24\x03\x14\x00\x15\x00\x16\x00\x17\x00\xe2\x01\x54\x02\x11\x00\xad\x01\x12\x00\x09\x00\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\x39\x00\x09\x00\xa2\x02\x44\x00\x0c\x00\x96\x01\x8e\x02\x9c\x02\x39\x00\x3a\x00\xd0\x00\x0c\x00\x0f\x02\x0c\x00\xd1\x00\x13\x03\xd2\x00\xf2\x01\x14\x03\x55\x02\x56\x02\x98\x02\x98\x01\xdf\x00\x29\x03\xd3\x00\x8f\x02\x14\x00\x15\x00\x16\x00\xd4\x00\xf1\x01\x90\x02\x3e\x00\x14\x00\x15\x00\x16\x00\x4c\x02\xba\x00\x50\x00\x39\x00\x91\x02\x51\x00\x39\x00\x52\x00\x53\x00\x54\x00\x55\x00\x3c\x03\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x25\x03\x26\x03\x27\x03\x44\x00\x06\x03\xd8\x01\x10\x02\x63\x00\x64\x00\x07\x03\xec\x01\x65\x00\x66\x00\x45\x00\x46\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xe6\x01\x78\x03\x2b\x03\x2c\x03\x49\x02\x8a\x01\x05\x02\x06\x02\x09\x00\xf4\x01\x3d\x03\x3e\x03\x3f\x03\x40\x03\xea\x01\x0a\x00\x41\x03\x3b\x00\x0c\x00\x09\x00\x4b\x03\xd8\x01\x09\x00\x39\x00\x3a\x00\x61\x02\xf4\x01\x09\x00\x62\x02\x0c\x00\xd8\x01\xf4\x01\x0c\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\x0c\x00\x12\x00\x3d\x00\xc6\x00\x14\x00\x15\x00\x16\x00\x17\x00\xf5\x01\x54\x02\x11\x00\x46\x02\x12\x00\x6d\x02\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\xd6\x00\x16\x00\xeb\x00\xf4\x01\x14\x00\x15\x00\x16\x00\xd4\x00\x6c\xff\x6c\xff\xc9\x00\x39\x00\x3a\x00\xc7\x00\xc8\x00\x0e\x03\x0a\x03\x6c\xff\xc9\x00\x55\x02\x56\x02\x97\x02\x62\x02\x6c\xff\xca\x00\x6c\xff\x44\x00\x39\x00\xcb\x00\x39\x00\xcc\x00\x09\x00\x6c\xff\x3e\x00\x22\x02\x22\x02\x47\x02\x39\x00\xa5\x00\x50\x00\xdb\x01\x0c\x00\x51\x00\xd8\x01\x52\x00\x53\x00\x54\x00\x55\x00\x3c\x03\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\xee\x00\xbc\x00\x14\x00\x15\x00\x16\x00\xd4\x00\xd4\x02\x63\x00\x64\x00\xec\x02\xed\x02\x65\x00\x66\x00\x08\x02\x0b\x02\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x09\x00\xd0\x02\xad\x01\x01\x02\xba\x01\x8a\x01\x44\x02\x0a\x00\x44\x00\x3b\x00\x0c\x00\x7d\x03\x3f\x03\x40\x03\x09\x00\x9c\x00\x7e\x03\x9d\x00\x44\x02\x9c\x00\xbc\x00\x9d\x00\xa2\x00\xa3\x00\x0c\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\x09\x00\x12\x00\x3d\x00\xbd\x00\x14\x00\x15\x00\x16\x00\x17\x00\xc0\x02\x1c\x02\x0c\x00\x1d\x02\x54\x02\x11\x00\x44\x00\x12\x00\xb3\x00\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\xd9\x02\xda\x02\x45\x00\x9f\x01\xb8\x01\x5f\x01\x11\x00\xb7\x01\x12\x00\x34\x00\xb2\x01\x14\x00\x15\x00\x16\x00\x5d\x01\xdb\x02\x96\x01\xdc\x02\xc2\x02\x55\x02\x56\x02\x1c\x03\x29\x02\x9e\x01\x39\x00\x1f\x02\x2a\x02\x09\x00\x80\x01\x20\x02\x3e\x00\x21\x02\xae\x01\x98\x01\xdf\x00\xad\x01\x50\x00\x0c\x00\x22\x02\x51\x00\xac\x01\x52\x00\x53\x00\x54\x00\x55\x00\xab\x01\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\xaa\x01\x14\x00\x15\x00\x16\x00\x57\x01\xa7\x01\xd4\x02\x63\x00\x64\x00\xec\x02\x54\x03\x65\x00\x66\x00\x39\x00\x3a\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x09\x00\x05\x02\x06\x02\x09\x00\xa5\x01\xc9\x00\xbc\x00\x0a\x00\x8a\x01\x3b\x00\x0c\x00\xd0\x00\x72\x01\x0c\x00\xa4\x01\x94\x01\x6e\x01\x95\x01\xbd\x00\x39\x00\x3a\x00\xa3\x01\x45\x00\x73\x01\x39\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\xa2\x01\x12\x00\x3d\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\xd4\x01\x16\x00\x0a\x00\x61\x01\xb2\x00\x0c\x00\xdb\x00\x62\x01\xf6\x02\x63\x01\xf7\x02\xb3\x00\xbc\x00\x91\x02\x76\x01\x77\x01\xfc\x01\x39\x00\x78\x01\x9d\x00\x0e\x00\x0f\x00\xb4\x00\x11\x00\xbd\x00\x12\x00\x13\x00\x9d\x01\x14\x00\x15\x00\x16\x00\x17\x00\x18\x02\xfe\x01\xdf\x00\x05\x02\x06\x02\x2f\x00\xe5\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\xab\x02\x3e\x00\xb5\x00\xb6\x00\xac\x02\xe6\x00\x96\x01\x50\x00\x7a\x01\xe7\x00\x51\x00\xe8\x00\x52\x00\x53\x00\x54\x00\x55\x00\xdb\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\xdc\x00\xdd\x00\x7b\x01\xde\x00\xdf\x00\x39\x00\x3a\x00\x63\x00\x64\x00\x4c\x00\x08\x00\x65\x00\x66\x00\xe3\x00\x1b\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x09\x00\x63\x00\xb7\x00\x6c\x01\xf3\x02\x72\x01\xf4\x02\x0a\x00\xbc\x00\x63\x01\xa8\x00\x59\x01\xc9\x00\x39\x00\xa9\x00\x64\x01\xfa\x01\x71\x01\x61\x01\x81\x02\x08\x02\x0a\x02\x91\x01\x7d\x02\x92\x01\x60\xff\xbc\x00\x84\x01\x11\x00\xbc\x00\x12\x00\x39\x00\x85\x01\x14\x00\x15\x00\x16\x00\x86\x01\x09\x00\xbc\x00\x39\x00\x3a\x00\xbd\x00\x3b\x00\xbc\x00\x0a\x00\x79\x02\x67\x01\xa8\x00\xac\x00\xad\x00\x08\x02\x09\x02\x68\x01\xb3\x00\x77\x02\xbd\x00\x87\x01\x88\x01\xd4\x02\x89\x01\x76\x02\xd5\x02\xbc\x00\xf7\x02\x69\x01\x11\x00\x39\x00\x12\x00\x09\x00\xbc\x00\x14\x00\x15\x00\x16\x00\x5d\x01\xbd\x00\x0a\x00\x96\x01\x5e\x01\x0c\x00\xd5\x01\xf5\x01\x08\x02\xcd\x02\x97\x01\xb3\x00\x70\x02\xd4\x02\xb5\x00\xb6\x00\xd5\x02\x96\x01\x5a\x03\x65\x02\x98\x01\xdf\x00\x5f\x01\x11\x00\x53\x02\x12\x00\xbc\x00\x6b\x02\x14\x00\x15\x00\x16\x00\x5d\x01\x09\x00\x44\x00\x98\x01\xdf\x00\xdb\x00\x69\x02\xbd\x00\x0a\x00\x66\x02\x0b\x00\x0c\x00\x45\x00\xfb\x01\xb5\x00\xb6\x00\xd4\x02\xd5\x01\xee\x01\xd5\x02\x6d\x01\x59\x03\xde\x00\xdf\x00\x68\x02\x49\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xef\xfe\x12\x00\x13\x00\xbc\x01\x14\x00\x15\x00\x16\x00\x17\x00\x8a\x01\x1a\x02\x1b\x02\x1c\x02\xdb\x00\x1d\x02\xee\xfe\x18\x00\x19\x00\x1a\x00\x1b\x00\x1f\x02\x63\x00\xb7\x00\xf0\xfe\x20\x02\xf4\xfe\x21\x02\xf3\xfe\x6a\x01\x4a\x02\xde\x00\xdf\x00\xd4\x02\x22\x02\xbc\x00\xd5\x02\x3f\x02\xd6\x02\xbc\x00\xd7\x02\x16\x02\x82\x00\x83\x00\x44\x02\x80\x03\x84\x00\xbd\x00\x85\x00\x1f\x00\x86\x00\xbd\x00\x50\xfe\x63\x00\xb7\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x4a\x00\x20\x00\x8b\x00\x8c\x00\x8d\x00\x25\x02\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\x3e\x02\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\xd5\x01\xe3\x01\x28\x00\x94\x00\x29\x00\x96\x01\x2a\x00\x95\x00\x96\x00\xbe\x00\x29\x02\x2b\x00\x52\x02\x3c\x02\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xd5\x01\xe2\x01\xd5\x01\xde\x01\x98\x01\xdf\x00\xd5\x01\xdb\x01\xc3\x00\xc4\x00\xa1\x02\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x2c\x00\x2d\x00\xd9\x02\xda\x02\x2e\x00\x3b\x02\x41\x00\xd8\x01\xd9\x01\x3a\x02\x31\x00\x32\x00\x24\x02\x33\x00\x34\x00\x29\x02\x42\x00\xdb\x02\x36\x00\xdc\x02\x43\x00\x35\x02\x44\x00\xd5\x01\xd6\x01\x17\x02\x39\x00\x97\x00\xfa\x01\x39\x00\x3a\x00\xbc\x00\x3b\x00\x16\x02\x82\x00\x83\x00\xcf\x01\xd1\x01\x84\x00\x2f\x02\x85\x00\x1f\x00\x86\x00\xbd\x00\x50\xfe\xcf\x01\xd0\x01\x87\x00\x88\x00\x89\x00\x8a\x00\x34\x02\x20\x00\x8b\x00\x8c\x00\x8d\x00\x33\x02\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\x32\x02\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\xcf\x01\x25\x02\x28\x00\x94\x00\x29\x00\x31\x02\x2a\x00\x95\x00\x96\x00\xfc\x01\x2f\x02\x2b\x00\xd4\x02\xc7\x00\xc8\x00\xd5\x02\xd4\x02\x84\x03\xc9\x00\xd5\x02\xf1\xfe\x83\x03\xd5\x01\xe5\x02\x9a\x01\x0d\x02\xfe\x01\xdf\x00\x9b\x01\x29\x02\x9c\x01\xd5\x01\xe4\x02\x2c\x02\x2c\x00\x2d\x00\xd4\x02\x39\x00\x2e\x00\xd5\x02\x41\x00\x82\x03\xbd\x02\xbe\x02\x31\x00\x32\x00\xd4\x02\x33\x00\x34\x00\xd5\x02\x42\x00\x81\x03\x36\x00\x29\x02\x43\x00\x27\x02\x44\x00\xba\x02\xbb\x02\x17\x02\xbc\x00\x97\x00\x39\x00\x39\x00\x3a\x00\xbc\x00\x3b\x00\x82\x00\x83\x00\xd2\x02\xd3\x02\x84\x00\xbd\x00\x85\x00\x1f\x00\x86\x00\x39\x00\xbd\x00\xce\x02\xcf\x02\x87\x00\x88\x00\x89\x00\x8a\x00\xf9\x01\x20\x00\x8b\x00\x8c\x00\x8d\x00\xd8\x01\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\xdd\x02\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\xc5\x02\xc6\x02\x28\x00\x94\x00\x29\x00\xfc\x01\x2a\x00\x95\x00\x96\x00\xec\x01\xfc\x01\x2b\x00\x87\x02\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x9e\x02\x9f\x02\xcd\x02\x0c\x02\xfe\x01\xdf\x00\xd5\x01\xfe\x02\xff\x01\xfe\x01\xdf\x00\x23\x03\x89\x02\x8a\x02\x8b\x02\x8c\x02\x2c\x00\x2d\x00\xcf\x01\x51\x03\x2e\x00\xc9\x02\x41\x00\xd5\x01\xfb\x02\xc8\x02\x31\x00\x32\x00\xc0\x02\x33\x00\x34\x00\xb8\x02\x42\x00\xb7\x02\x36\x00\x2c\x02\x43\x00\xb3\x02\x44\x00\xd5\x01\xea\x02\xf4\xfd\xb5\x02\x97\x00\x31\x02\x39\x00\x3a\x00\xb1\x02\x3b\x00\xf4\xfd\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07\x01\x08\x01\x09\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\x30\x01\x31\x01\x32\x01\x33\x01\x34\x01\x35\x01\x36\x01\x37\x01\x38\x01\x39\x01\x3a\x01\x3b\x01\x3c\x01\x3d\x01\x3e\x01\x3f\x01\x40\x01\x41\x01\x42\x01\x43\x01\x44\x01\x45\x01\x46\x01\x47\x01\x48\x01\x49\x01\x4a\x01\x4b\x01\x4c\x01\x4d\x01\x4e\x01\x4f\x01\x50\x01\x51\x01\x52\x01\x53\x01\x54\x01\x55\x01\x56\x01\x57\x01\x82\x00\x83\x00\x43\x03\x44\x03\x84\x00\x45\x03\x85\x00\x1f\x00\x86\x00\xb0\x02\x50\xfe\xaf\x02\x46\x03\x87\x00\x88\x00\x89\x00\x47\x03\xae\x02\x20\x00\x8b\x00\x8c\x00\x8d\x00\x48\x03\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\x29\x02\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\xd5\x01\xe8\x02\x28\x00\x94\x00\x29\x00\xa9\x02\x2a\x00\x95\x00\x96\x00\xd3\xfe\xd3\xfe\x2b\x00\x31\x02\xbc\x00\xd3\xfe\x29\x02\xd3\xfe\xcf\x01\x50\x03\x9a\x02\xd3\xfe\xcf\x01\x4f\x03\x95\x02\xd3\xfe\xbd\x00\xd3\xfe\xe6\x02\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\xd3\xfe\x2c\x00\x2d\x00\xcf\x01\x4e\x03\x2e\x00\x79\x02\x41\x00\x38\x03\x35\x03\x94\x02\x31\x00\x32\x00\x93\x02\x33\x00\x34\x00\x86\x02\x42\x00\x84\x02\x36\x00\x23\x03\x43\x00\x39\x00\x44\x00\x34\x03\x35\x03\x22\x03\xfc\x01\x97\x00\x21\x03\x39\x00\x3a\x00\x0c\x03\x3b\x00\x82\x00\x83\x00\x43\x03\x44\x03\x84\x00\x45\x03\x85\x00\x1f\x00\x86\x00\xfd\x01\xfe\x01\xdf\x00\x46\x03\x87\x00\x88\x00\x89\x00\x47\x03\x1b\x03\x20\x00\x8b\x00\x8c\x00\x8d\x00\x48\x03\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\x1a\x03\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\x30\x03\x9f\x02\x28\x00\x94\x00\x29\x00\x19\x03\x2a\x00\x95\x00\x96\x00\xc7\x00\xc8\x00\x2b\x00\xc7\x00\xc8\x00\xc9\x00\x65\x03\x66\x03\xc9\x00\x18\x03\x31\x02\xe1\x00\xd5\x01\xe3\x01\x9a\x01\xe2\x00\x11\x03\xe3\x00\x9b\x01\x10\x03\x9c\x01\xd5\x01\x58\x03\x0f\x03\x39\x00\x2c\x00\x2d\x00\x39\x00\x0b\x03\x2e\x00\x22\x02\x41\x00\xd5\x01\x57\x03\x06\x03\x31\x00\x32\x00\x39\x00\x33\x00\x34\x00\x00\x03\x42\x00\xd8\x01\x36\x00\xfa\x02\x43\x00\xd8\x01\x44\x00\x57\x03\x56\x03\x54\x03\xbc\x00\x97\x00\x39\x00\x39\x00\x3a\x00\x49\x03\x3b\x00\x89\xff\x89\xff\x3b\x03\x22\x02\x89\xff\xbd\x00\x89\xff\x89\xff\x89\xff\x3a\x03\x89\xff\x38\x03\x37\x03\x89\xff\x89\xff\x89\xff\x89\xff\x34\x03\x89\xff\x89\xff\x89\xff\x89\xff\x33\x03\x89\xff\x89\xff\x89\xff\x89\xff\x89\xff\x89\xff\x76\x03\x89\xff\x89\xff\x89\xff\x89\xff\x89\xff\x77\x03\x39\x00\x89\xff\x89\xff\x89\xff\xfc\x01\x89\xff\x89\xff\x89\xff\xc7\x00\xc8\x00\x89\xff\x73\x03\xbc\x00\xc9\x00\x72\x03\x71\x03\x6f\x03\x22\x02\x6d\x03\xe1\x00\xe2\x02\xfe\x01\xdf\x00\xe2\x00\xbd\x00\xe3\x00\x6a\x03\x22\x02\x63\x03\x39\x00\x06\x03\x5f\x03\x39\x00\x89\xff\x89\xff\x5d\x03\x7d\x03\x89\xff\xd8\x01\x89\xff\x7c\x03\x2e\x03\x39\x00\x89\xff\x89\xff\x39\x00\x89\xff\x89\xff\x47\x00\x89\xff\x88\x03\x89\xff\x08\x00\x89\xff\xf0\x00\x89\xff\xd9\x00\xd8\x00\xa4\x00\xfc\x01\x89\xff\xa0\x00\x89\xff\x89\xff\x4d\x00\x89\xff\x82\x00\x83\x00\xf2\x01\xed\x01\x84\x00\xef\x01\x85\x00\x1f\x00\x86\x00\xdf\x02\xfe\x01\xdf\x00\xec\x01\x87\x00\x88\x00\x89\x00\x8a\x00\xea\x01\x20\x00\x8b\x00\x8c\x00\x8d\x00\xe7\x01\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x21\x00\xe8\x01\x22\x00\x23\x00\x24\x00\x25\x00\x93\x00\xe6\x01\xe4\x01\x28\x00\x94\x00\x29\x00\xdc\x01\x2a\x00\x95\x00\x96\x00\xc7\x00\xc8\x00\x2b\x00\xc7\x00\xc8\x00\xc9\x00\xd3\x01\xb8\x01\xc9\x00\xbc\x00\xb5\x01\x9a\x01\xb0\x01\xaf\x01\xe1\x00\x9b\x01\xa8\x01\x9c\x01\xe2\x00\xa7\x01\x1a\x02\xbd\x00\x7e\x02\xa0\x01\x39\x00\x2c\x00\x2d\x00\x39\x00\x6f\x01\x2e\x00\x7b\x02\x41\x00\x6d\x02\x6e\x02\x6b\x02\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x72\x01\x42\x00\x62\x02\x36\x00\x69\x02\x43\x00\x66\x02\x44\x00\xb9\x00\x5f\x02\x45\x00\x73\x01\x97\x00\xba\x00\x39\x00\x3a\x00\xfc\x01\x3b\x00\x21\x00\x6f\x01\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x42\x02\x2f\x02\x28\x00\x3c\x02\x29\x00\x38\x02\x2a\x00\xc9\x02\xfe\x01\xdf\x00\x37\x02\x2b\x00\x74\x01\x75\x01\x76\x01\x77\x01\x36\x02\x35\x02\x78\x01\x4a\x03\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x31\x03\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x2d\x02\x0e\x02\x2c\x02\x2c\x00\x2d\x00\x27\x02\xd1\x02\x2e\x00\x2f\x00\x30\x00\xb5\x02\xb1\x02\xb3\x02\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\xac\x02\x35\x00\x9f\x00\x36\x00\xa9\x02\x37\x00\xa7\x02\x38\x00\x20\x00\xa6\x02\xa5\x02\x9c\x02\x9a\x02\x84\x02\x39\x00\x3a\x00\x09\x00\x3b\x00\x21\x00\x1b\x03\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x16\x03\x0c\x00\x28\x00\x15\x03\x29\x00\x14\x03\x2a\x00\xb3\x00\x11\x03\x0c\x03\x08\x03\x2b\x00\x60\x03\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x5f\x01\x11\x00\x04\x03\x12\x00\xf4\x02\xf1\x02\x14\x00\x15\x00\x16\x00\x5d\x01\xf4\x02\xf1\x02\x6f\x03\x3b\x03\x52\x03\x74\x03\x2c\x00\x2d\x00\x73\x03\x6d\x03\x2e\x00\x2f\x00\x30\x00\x83\x01\x6b\x03\x6a\x03\xaf\x00\x32\x00\x68\x03\x33\x00\x34\x00\x1f\x00\x35\x00\x67\x03\x36\x00\x64\x03\x37\x00\x9c\x00\x38\x00\x9d\x00\x63\x03\x09\x00\x20\x00\x61\x03\x5d\x03\x39\x00\x3a\x00\x5b\x03\x3b\x00\x80\x03\x7a\x03\x0c\x00\x21\x00\x79\x03\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x86\x03\x85\x03\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\xd5\x00\x0f\x00\x10\x00\x11\x00\x2b\x00\x12\x00\x3d\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x9c\x00\x38\x00\x9d\x00\x00\x00\x09\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x0c\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\xb2\x01\x10\x00\x11\x00\x2b\x00\x12\x00\x3d\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x9c\x00\x38\x00\x9d\x00\x00\x00\x09\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x0c\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x70\x02\x10\x00\x11\x00\x2b\x00\x12\x00\x3d\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\xa1\x02\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x9c\x00\x38\x00\x9d\x00\x00\x00\x09\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x0c\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\xea\x00\x11\x00\x2b\x00\x12\x00\xeb\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x60\x03\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x9c\x00\x38\x00\x9d\x00\x00\x00\x09\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x0c\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\xea\x00\x11\x00\x2b\x00\x12\x00\x00\x00\x63\x02\x14\x00\x15\x00\x16\x00\x86\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x09\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x0c\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x02\x11\x00\x00\x00\x12\x00\x00\x00\x5e\x02\x14\x00\x15\x00\x16\x00\x86\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x99\x00\x00\x00\x09\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x0c\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\xea\x00\x11\x00\x2b\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x9f\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\xc7\x00\xc8\x00\x00\x00\x00\x00\x2b\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x01\x00\x00\x00\x00\x00\x00\x9b\x01\x00\x00\x9c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x99\x00\x00\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x39\x00\x3a\x00\xba\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\xc7\x00\xc8\x00\x00\x00\x00\x00\x2b\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\xe2\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x8f\x01\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\xbb\x01\xbc\x01\xbd\x01\xbe\x01\xbf\x01\xc0\x01\xc1\x01\xc2\x01\xc3\x01\xc4\x01\xc5\x01\xc6\x01\xc7\x01\xc8\x01\xc9\x01\xca\x01\xcb\x01\xcc\x01\xcd\x01\xce\x01\xcf\x01\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x9c\x00\x44\x00\x9d\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x8c\x01\x00\x00\x00\x00\x20\x00\x8d\x01\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x9f\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x99\x00\x00\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x39\x00\x3a\x00\xba\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x52\x02\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x9c\x00\x44\x00\x9d\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x37\xff\x33\x00\x1f\x00\x37\xff\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x34\x00\x1f\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x50\x02\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x89\xff\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x89\xff\x00\x00\x89\xff\x89\xff\x89\xff\x89\xff\x89\xff\x00\x00\x00\x00\x89\xff\x00\x00\x89\xff\x00\x00\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x89\xff\x00\x00\x00\x00\x89\xff\x89\xff\x89\xff\x00\x00\x00\x00\x00\x00\x89\xff\x89\xff\x1f\x00\x89\xff\x89\xff\x00\x00\x89\xff\x00\x00\x89\xff\x00\x00\x89\xff\x00\x00\x89\xff\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x89\xff\x00\x00\x89\xff\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x2f\x00\x30\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x35\xff\x33\x00\x1f\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x8d\x01\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x8d\x01\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x1f\x00\x33\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x32\x00\x00\x00\x33\x00\x09\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x0a\x00\x44\x00\x3b\x00\x0c\x00\x00\x00\x00\x00\x09\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x3d\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x09\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\xa5\x00\x3e\x00\x2a\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1d\x00\x3c\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x3d\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x34\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x09\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x39\x00\x3a\x00\x0c\x00\x3b\x00\x21\x00\x00\x00\x22\x00\x23\x00\xa5\x01\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\xa6\x00\x00\x00\x2a\x00\x00\x00\x5f\x01\x11\x00\x00\x00\x12\x00\xee\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x39\x00\x3a\x00\x2e\x00\x3b\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x21\x00\x3b\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x36\x00\x00\x00\xce\x00\x00\x00\xcf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x39\x00\x3a\x00\x2e\x00\x3b\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x21\x00\x3b\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x39\x00\x3a\x00\x2e\x00\x3b\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x21\x00\x3b\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x4f\x02\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x39\x00\x3a\x00\x2e\x00\x3b\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x43\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x39\x00\x3a\x00\x21\x00\x3b\x00\x22\x00\x23\x00\xa5\x00\x25\x00\x26\x00\xa8\x00\x00\x00\x28\x00\x00\x00\xae\x01\xaa\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\xee\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x31\x00\x32\x00\x00\x00\x00\x00\x09\x00\x00\x00\x42\x00\x00\x00\x36\x00\x00\x00\x4d\x03\x0a\x00\x44\x00\x0b\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x01\x7d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x95\x02\x7d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x0e\x00\x0f\x00\xb4\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x09\x00\x83\x01\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\xa7\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x0e\x00\x0f\x00\xab\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\x0a\x00\x00\x00\xa7\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x00\x0e\x00\x0f\x00\xab\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x02\x18\x00\x19\x00\x1a\x00\x1b\x00\xac\x00\xad\x00\x0a\x00\x00\x00\x63\x01\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x64\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x09\x00\x00\x00\x8d\x01\x00\x00\x72\x02\x73\x02\x74\x02\x0a\x00\x00\x00\x65\x01\xa8\x00\xac\x00\xad\x00\x00\x00\x66\x01\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x09\x00\x00\x00\x50\x02\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x65\x01\xa8\x00\xaf\x00\xb0\x00\x00\x00\x66\x01\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x0a\x00\x00\x00\x65\x01\xa8\x00\x00\x00\x00\x00\x00\x00\x66\x01\xaa\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x0a\x00\x00\x00\x63\x01\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x64\x01\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x0a\x00\x00\x00\x5b\x01\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x0a\x00\x00\x00\x5b\x01\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x0a\x00\x00\x00\x63\x01\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x64\x01\x00\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x09\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\xa8\x00\xac\x00\xad\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x0e\x00\x0f\x00\xab\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x82\x01\x0a\x00\x00\x00\x0b\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x00\x0e\x00\x0f\x00\xab\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x81\x01\xa8\x00\x09\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x5c\x01\x11\x00\x09\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x7f\x01\x00\x00\xa8\x00\x09\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x7e\x01\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xaa\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x5c\x01\x11\x00\x09\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x82\x01\x00\x00\xa8\x00\x09\x00\x00\x00\x00\x00\x5c\x02\xaa\x00\x00\x00\x00\x00\x00\x00\x81\x01\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x5b\x02\xaa\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x5c\x01\x11\x00\x09\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x82\x01\x00\x00\xa8\x00\x09\x00\x00\x00\x00\x00\x5a\x02\xaa\x00\x00\x00\x00\x00\x00\x00\x81\x01\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x59\x02\xaa\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x7f\x01\x00\x00\x00\x00\x09\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x7e\x01\x0b\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x01\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x03\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x02\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x03\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x12\x00\x13\x00\x00\x00\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\xa5\x00\x00\x00\x00\x00\xa8\x00\x09\x00\x00\x00\x00\x00\xae\x01\xaa\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xae\x01\x81\x02\x5c\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x09\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\xa5\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x7f\x02\xaa\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\xa8\x00\x5c\x01\x11\x00\x00\x00\x12\x00\x7d\x02\xa5\x01\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x01\x11\x00\xa5\x00\x12\x00\x00\x00\x0c\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\xa5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x01\x11\x00\x00\x00\x12\x00\x00\x00\x00\x00\x14\x00\x15\x00\x16\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# happyReduceArr = Happy_Data_Array.array (7, 524) [ (7 , happyReduce_7), (8 , happyReduce_8), (9 , happyReduce_9), (10 , happyReduce_10), (11 , happyReduce_11), (12 , happyReduce_12), (13 , happyReduce_13), (14 , happyReduce_14), (15 , happyReduce_15), (16 , happyReduce_16), (17 , happyReduce_17), (18 , happyReduce_18), (19 , happyReduce_19), (20 , happyReduce_20), (21 , happyReduce_21), (22 , happyReduce_22), (23 , happyReduce_23), (24 , happyReduce_24), (25 , happyReduce_25), (26 , happyReduce_26), (27 , happyReduce_27), (28 , happyReduce_28), (29 , happyReduce_29), (30 , happyReduce_30), (31 , happyReduce_31), (32 , happyReduce_32), (33 , happyReduce_33), (34 , happyReduce_34), (35 , happyReduce_35), (36 , happyReduce_36), (37 , happyReduce_37), (38 , happyReduce_38), (39 , happyReduce_39), (40 , happyReduce_40), (41 , happyReduce_41), (42 , happyReduce_42), (43 , happyReduce_43), (44 , happyReduce_44), (45 , happyReduce_45), (46 , happyReduce_46), (47 , happyReduce_47), (48 , happyReduce_48), (49 , happyReduce_49), (50 , happyReduce_50), (51 , happyReduce_51), (52 , happyReduce_52), (53 , happyReduce_53), (54 , happyReduce_54), (55 , happyReduce_55), (56 , happyReduce_56), (57 , happyReduce_57), (58 , happyReduce_58), (59 , happyReduce_59), (60 , happyReduce_60), (61 , happyReduce_61), (62 , happyReduce_62), (63 , happyReduce_63), (64 , happyReduce_64), (65 , happyReduce_65), (66 , happyReduce_66), (67 , happyReduce_67), (68 , happyReduce_68), (69 , happyReduce_69), (70 , happyReduce_70), (71 , happyReduce_71), (72 , happyReduce_72), (73 , happyReduce_73), (74 , happyReduce_74), (75 , happyReduce_75), (76 , happyReduce_76), (77 , happyReduce_77), (78 , happyReduce_78), (79 , happyReduce_79), (80 , happyReduce_80), (81 , happyReduce_81), (82 , happyReduce_82), (83 , happyReduce_83), (84 , happyReduce_84), (85 , happyReduce_85), (86 , happyReduce_86), (87 , happyReduce_87), (88 , happyReduce_88), (89 , happyReduce_89), (90 , happyReduce_90), (91 , happyReduce_91), (92 , happyReduce_92), (93 , happyReduce_93), (94 , happyReduce_94), (95 , happyReduce_95), (96 , happyReduce_96), (97 , happyReduce_97), (98 , happyReduce_98), (99 , happyReduce_99), (100 , happyReduce_100), (101 , happyReduce_101), (102 , happyReduce_102), (103 , happyReduce_103), (104 , happyReduce_104), (105 , happyReduce_105), (106 , happyReduce_106), (107 , happyReduce_107), (108 , happyReduce_108), (109 , happyReduce_109), (110 , happyReduce_110), (111 , happyReduce_111), (112 , happyReduce_112), (113 , happyReduce_113), (114 , happyReduce_114), (115 , happyReduce_115), (116 , happyReduce_116), (117 , happyReduce_117), (118 , happyReduce_118), (119 , happyReduce_119), (120 , happyReduce_120), (121 , happyReduce_121), (122 , happyReduce_122), (123 , happyReduce_123), (124 , happyReduce_124), (125 , happyReduce_125), (126 , happyReduce_126), (127 , happyReduce_127), (128 , happyReduce_128), (129 , happyReduce_129), (130 , happyReduce_130), (131 , happyReduce_131), (132 , happyReduce_132), (133 , happyReduce_133), (134 , happyReduce_134), (135 , happyReduce_135), (136 , happyReduce_136), (137 , happyReduce_137), (138 , happyReduce_138), (139 , happyReduce_139), (140 , happyReduce_140), (141 , happyReduce_141), (142 , happyReduce_142), (143 , happyReduce_143), (144 , happyReduce_144), (145 , happyReduce_145), (146 , happyReduce_146), (147 , happyReduce_147), (148 , happyReduce_148), (149 , happyReduce_149), (150 , happyReduce_150), (151 , happyReduce_151), (152 , happyReduce_152), (153 , happyReduce_153), (154 , happyReduce_154), (155 , happyReduce_155), (156 , happyReduce_156), (157 , happyReduce_157), (158 , happyReduce_158), (159 , happyReduce_159), (160 , happyReduce_160), (161 , happyReduce_161), (162 , happyReduce_162), (163 , happyReduce_163), (164 , happyReduce_164), (165 , happyReduce_165), (166 , happyReduce_166), (167 , happyReduce_167), (168 , happyReduce_168), (169 , happyReduce_169), (170 , happyReduce_170), (171 , happyReduce_171), (172 , happyReduce_172), (173 , happyReduce_173), (174 , happyReduce_174), (175 , happyReduce_175), (176 , happyReduce_176), (177 , happyReduce_177), (178 , happyReduce_178), (179 , happyReduce_179), (180 , happyReduce_180), (181 , happyReduce_181), (182 , happyReduce_182), (183 , happyReduce_183), (184 , happyReduce_184), (185 , happyReduce_185), (186 , happyReduce_186), (187 , happyReduce_187), (188 , happyReduce_188), (189 , happyReduce_189), (190 , happyReduce_190), (191 , happyReduce_191), (192 , happyReduce_192), (193 , happyReduce_193), (194 , happyReduce_194), (195 , happyReduce_195), (196 , happyReduce_196), (197 , happyReduce_197), (198 , happyReduce_198), (199 , happyReduce_199), (200 , happyReduce_200), (201 , happyReduce_201), (202 , happyReduce_202), (203 , happyReduce_203), (204 , happyReduce_204), (205 , happyReduce_205), (206 , happyReduce_206), (207 , happyReduce_207), (208 , happyReduce_208), (209 , happyReduce_209), (210 , happyReduce_210), (211 , happyReduce_211), (212 , happyReduce_212), (213 , happyReduce_213), (214 , happyReduce_214), (215 , happyReduce_215), (216 , happyReduce_216), (217 , happyReduce_217), (218 , happyReduce_218), (219 , happyReduce_219), (220 , happyReduce_220), (221 , happyReduce_221), (222 , happyReduce_222), (223 , happyReduce_223), (224 , happyReduce_224), (225 , happyReduce_225), (226 , happyReduce_226), (227 , happyReduce_227), (228 , happyReduce_228), (229 , happyReduce_229), (230 , happyReduce_230), (231 , happyReduce_231), (232 , happyReduce_232), (233 , happyReduce_233), (234 , happyReduce_234), (235 , happyReduce_235), (236 , happyReduce_236), (237 , happyReduce_237), (238 , happyReduce_238), (239 , happyReduce_239), (240 , happyReduce_240), (241 , happyReduce_241), (242 , happyReduce_242), (243 , happyReduce_243), (244 , happyReduce_244), (245 , happyReduce_245), (246 , happyReduce_246), (247 , happyReduce_247), (248 , happyReduce_248), (249 , happyReduce_249), (250 , happyReduce_250), (251 , happyReduce_251), (252 , happyReduce_252), (253 , happyReduce_253), (254 , happyReduce_254), (255 , happyReduce_255), (256 , happyReduce_256), (257 , happyReduce_257), (258 , happyReduce_258), (259 , happyReduce_259), (260 , happyReduce_260), (261 , happyReduce_261), (262 , happyReduce_262), (263 , happyReduce_263), (264 , happyReduce_264), (265 , happyReduce_265), (266 , happyReduce_266), (267 , happyReduce_267), (268 , happyReduce_268), (269 , happyReduce_269), (270 , happyReduce_270), (271 , happyReduce_271), (272 , happyReduce_272), (273 , happyReduce_273), (274 , happyReduce_274), (275 , happyReduce_275), (276 , happyReduce_276), (277 , happyReduce_277), (278 , happyReduce_278), (279 , happyReduce_279), (280 , happyReduce_280), (281 , happyReduce_281), (282 , happyReduce_282), (283 , happyReduce_283), (284 , happyReduce_284), (285 , happyReduce_285), (286 , happyReduce_286), (287 , happyReduce_287), (288 , happyReduce_288), (289 , happyReduce_289), (290 , happyReduce_290), (291 , happyReduce_291), (292 , happyReduce_292), (293 , happyReduce_293), (294 , happyReduce_294), (295 , happyReduce_295), (296 , happyReduce_296), (297 , happyReduce_297), (298 , happyReduce_298), (299 , happyReduce_299), (300 , happyReduce_300), (301 , happyReduce_301), (302 , happyReduce_302), (303 , happyReduce_303), (304 , happyReduce_304), (305 , happyReduce_305), (306 , happyReduce_306), (307 , happyReduce_307), (308 , happyReduce_308), (309 , happyReduce_309), (310 , happyReduce_310), (311 , happyReduce_311), (312 , happyReduce_312), (313 , happyReduce_313), (314 , happyReduce_314), (315 , happyReduce_315), (316 , happyReduce_316), (317 , happyReduce_317), (318 , happyReduce_318), (319 , happyReduce_319), (320 , happyReduce_320), (321 , happyReduce_321), (322 , happyReduce_322), (323 , happyReduce_323), (324 , happyReduce_324), (325 , happyReduce_325), (326 , happyReduce_326), (327 , happyReduce_327), (328 , happyReduce_328), (329 , happyReduce_329), (330 , happyReduce_330), (331 , happyReduce_331), (332 , happyReduce_332), (333 , happyReduce_333), (334 , happyReduce_334), (335 , happyReduce_335), (336 , happyReduce_336), (337 , happyReduce_337), (338 , happyReduce_338), (339 , happyReduce_339), (340 , happyReduce_340), (341 , happyReduce_341), (342 , happyReduce_342), (343 , happyReduce_343), (344 , happyReduce_344), (345 , happyReduce_345), (346 , happyReduce_346), (347 , happyReduce_347), (348 , happyReduce_348), (349 , happyReduce_349), (350 , happyReduce_350), (351 , happyReduce_351), (352 , happyReduce_352), (353 , happyReduce_353), (354 , happyReduce_354), (355 , happyReduce_355), (356 , happyReduce_356), (357 , happyReduce_357), (358 , happyReduce_358), (359 , happyReduce_359), (360 , happyReduce_360), (361 , happyReduce_361), (362 , happyReduce_362), (363 , happyReduce_363), (364 , happyReduce_364), (365 , happyReduce_365), (366 , happyReduce_366), (367 , happyReduce_367), (368 , happyReduce_368), (369 , happyReduce_369), (370 , happyReduce_370), (371 , happyReduce_371), (372 , happyReduce_372), (373 , happyReduce_373), (374 , happyReduce_374), (375 , happyReduce_375), (376 , happyReduce_376), (377 , happyReduce_377), (378 , happyReduce_378), (379 , happyReduce_379), (380 , happyReduce_380), (381 , happyReduce_381), (382 , happyReduce_382), (383 , happyReduce_383), (384 , happyReduce_384), (385 , happyReduce_385), (386 , happyReduce_386), (387 , happyReduce_387), (388 , happyReduce_388), (389 , happyReduce_389), (390 , happyReduce_390), (391 , happyReduce_391), (392 , happyReduce_392), (393 , happyReduce_393), (394 , happyReduce_394), (395 , happyReduce_395), (396 , happyReduce_396), (397 , happyReduce_397), (398 , happyReduce_398), (399 , happyReduce_399), (400 , happyReduce_400), (401 , happyReduce_401), (402 , happyReduce_402), (403 , happyReduce_403), (404 , happyReduce_404), (405 , happyReduce_405), (406 , happyReduce_406), (407 , happyReduce_407), (408 , happyReduce_408), (409 , happyReduce_409), (410 , happyReduce_410), (411 , happyReduce_411), (412 , happyReduce_412), (413 , happyReduce_413), (414 , happyReduce_414), (415 , happyReduce_415), (416 , happyReduce_416), (417 , happyReduce_417), (418 , happyReduce_418), (419 , happyReduce_419), (420 , happyReduce_420), (421 , happyReduce_421), (422 , happyReduce_422), (423 , happyReduce_423), (424 , happyReduce_424), (425 , happyReduce_425), (426 , happyReduce_426), (427 , happyReduce_427), (428 , happyReduce_428), (429 , happyReduce_429), (430 , happyReduce_430), (431 , happyReduce_431), (432 , happyReduce_432), (433 , happyReduce_433), (434 , happyReduce_434), (435 , happyReduce_435), (436 , happyReduce_436), (437 , happyReduce_437), (438 , happyReduce_438), (439 , happyReduce_439), (440 , happyReduce_440), (441 , happyReduce_441), (442 , happyReduce_442), (443 , happyReduce_443), (444 , happyReduce_444), (445 , happyReduce_445), (446 , happyReduce_446), (447 , happyReduce_447), (448 , happyReduce_448), (449 , happyReduce_449), (450 , happyReduce_450), (451 , happyReduce_451), (452 , happyReduce_452), (453 , happyReduce_453), (454 , happyReduce_454), (455 , happyReduce_455), (456 , happyReduce_456), (457 , happyReduce_457), (458 , happyReduce_458), (459 , happyReduce_459), (460 , happyReduce_460), (461 , happyReduce_461), (462 , happyReduce_462), (463 , happyReduce_463), (464 , happyReduce_464), (465 , happyReduce_465), (466 , happyReduce_466), (467 , happyReduce_467), (468 , happyReduce_468), (469 , happyReduce_469), (470 , happyReduce_470), (471 , happyReduce_471), (472 , happyReduce_472), (473 , happyReduce_473), (474 , happyReduce_474), (475 , happyReduce_475), (476 , happyReduce_476), (477 , happyReduce_477), (478 , happyReduce_478), (479 , happyReduce_479), (480 , happyReduce_480), (481 , happyReduce_481), (482 , happyReduce_482), (483 , happyReduce_483), (484 , happyReduce_484), (485 , happyReduce_485), (486 , happyReduce_486), (487 , happyReduce_487), (488 , happyReduce_488), (489 , happyReduce_489), (490 , happyReduce_490), (491 , happyReduce_491), (492 , happyReduce_492), (493 , happyReduce_493), (494 , happyReduce_494), (495 , happyReduce_495), (496 , happyReduce_496), (497 , happyReduce_497), (498 , happyReduce_498), (499 , happyReduce_499), (500 , happyReduce_500), (501 , happyReduce_501), (502 , happyReduce_502), (503 , happyReduce_503), (504 , happyReduce_504), (505 , happyReduce_505), (506 , happyReduce_506), (507 , happyReduce_507), (508 , happyReduce_508), (509 , happyReduce_509), (510 , happyReduce_510), (511 , happyReduce_511), (512 , happyReduce_512), (513 , happyReduce_513), (514 , happyReduce_514), (515 , happyReduce_515), (516 , happyReduce_516), (517 , happyReduce_517), (518 , happyReduce_518), (519 , happyReduce_519), (520 , happyReduce_520), (521 , happyReduce_521), (522 , happyReduce_522), (523 , happyReduce_523), (524 , happyReduce_524) ] happy_n_terms = 104 :: Int happy_n_nonterms = 175 :: Int happyReduce_7 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_7 = happySpecReduce_1 0# happyReduction_7 happyReduction_7 happy_x_1 = case happyOut11 happy_x_1 of { happy_var_1 -> happyIn10 (reverse happy_var_1 )} happyReduce_8 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_8 = happySpecReduce_2 1# happyReduction_8 happyReduction_8 happy_x_2 happy_x_1 = case happyOut11 happy_x_1 of { happy_var_1 -> case happyOut12 happy_x_2 of { happy_var_2 -> happyIn11 (happy_var_2 : happy_var_1 )}} happyReduce_9 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_9 = happySpecReduce_0 1# happyReduction_9 happyReduction_9 = happyIn11 ([] ) happyReduce_10 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_10 = happySpecReduce_1 2# happyReduction_10 happyReduction_10 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwAbstract happy_var_1) -> happyIn12 (TokKeyword KwAbstract happy_var_1 )} happyReduce_11 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_11 = happySpecReduce_1 2# happyReduction_11 happyReduction_11 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwCoData happy_var_1) -> happyIn12 (TokKeyword KwCoData happy_var_1 )} happyReduce_12 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_12 = happySpecReduce_1 2# happyReduction_12 happyReduction_12 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwCoInductive happy_var_1) -> happyIn12 (TokKeyword KwCoInductive happy_var_1 )} happyReduce_13 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_13 = happySpecReduce_1 2# happyReduction_13 happyReduction_13 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwConstructor happy_var_1) -> happyIn12 (TokKeyword KwConstructor happy_var_1 )} happyReduce_14 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_14 = happySpecReduce_1 2# happyReduction_14 happyReduction_14 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) -> happyIn12 (TokKeyword KwData happy_var_1 )} happyReduce_15 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_15 = happySpecReduce_1 2# happyReduction_15 happyReduction_15 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwEta happy_var_1) -> happyIn12 (TokKeyword KwEta happy_var_1 )} happyReduce_16 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_16 = happySpecReduce_1 2# happyReduction_16 happyReduction_16 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwField happy_var_1) -> happyIn12 (TokKeyword KwField happy_var_1 )} happyReduce_17 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_17 = happySpecReduce_1 2# happyReduction_17 happyReduction_17 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwForall happy_var_1) -> happyIn12 (TokKeyword KwForall happy_var_1 )} happyReduce_18 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_18 = happySpecReduce_1 2# happyReduction_18 happyReduction_18 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwVariable happy_var_1) -> happyIn12 (TokKeyword KwVariable happy_var_1 )} happyReduce_19 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_19 = happySpecReduce_1 2# happyReduction_19 happyReduction_19 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwHiding happy_var_1) -> happyIn12 (TokKeyword KwHiding happy_var_1 )} happyReduce_20 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_20 = happySpecReduce_1 2# happyReduction_20 happyReduction_20 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwImport happy_var_1) -> happyIn12 (TokKeyword KwImport happy_var_1 )} happyReduce_21 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_21 = happySpecReduce_1 2# happyReduction_21 happyReduction_21 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwIn happy_var_1) -> happyIn12 (TokKeyword KwIn happy_var_1 )} happyReduce_22 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_22 = happySpecReduce_1 2# happyReduction_22 happyReduction_22 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInductive happy_var_1) -> happyIn12 (TokKeyword KwInductive happy_var_1 )} happyReduce_23 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_23 = happySpecReduce_1 2# happyReduction_23 happyReduction_23 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfix happy_var_1) -> happyIn12 (TokKeyword KwInfix happy_var_1 )} happyReduce_24 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_24 = happySpecReduce_1 2# happyReduction_24 happyReduction_24 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfixL happy_var_1) -> happyIn12 (TokKeyword KwInfixL happy_var_1 )} happyReduce_25 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_25 = happySpecReduce_1 2# happyReduction_25 happyReduction_25 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfixR happy_var_1) -> happyIn12 (TokKeyword KwInfixR happy_var_1 )} happyReduce_26 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_26 = happySpecReduce_1 2# happyReduction_26 happyReduction_26 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInstance happy_var_1) -> happyIn12 (TokKeyword KwInstance happy_var_1 )} happyReduce_27 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_27 = happySpecReduce_1 2# happyReduction_27 happyReduction_27 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwOverlap happy_var_1) -> happyIn12 (TokKeyword KwOverlap happy_var_1 )} happyReduce_28 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_28 = happySpecReduce_1 2# happyReduction_28 happyReduction_28 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwLet happy_var_1) -> happyIn12 (TokKeyword KwLet happy_var_1 )} happyReduce_29 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_29 = happySpecReduce_1 2# happyReduction_29 happyReduction_29 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwMacro happy_var_1) -> happyIn12 (TokKeyword KwMacro happy_var_1 )} happyReduce_30 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_30 = happySpecReduce_1 2# happyReduction_30 happyReduction_30 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) -> happyIn12 (TokKeyword KwModule happy_var_1 )} happyReduce_31 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_31 = happySpecReduce_1 2# happyReduction_31 happyReduction_31 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwMutual happy_var_1) -> happyIn12 (TokKeyword KwMutual happy_var_1 )} happyReduce_32 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_32 = happySpecReduce_1 2# happyReduction_32 happyReduction_32 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNoEta happy_var_1) -> happyIn12 (TokKeyword KwNoEta happy_var_1 )} happyReduce_33 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_33 = happySpecReduce_1 2# happyReduction_33 happyReduction_33 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) -> happyIn12 (TokKeyword KwOpen happy_var_1 )} happyReduce_34 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_34 = happySpecReduce_1 2# happyReduction_34 happyReduction_34 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPatternSyn happy_var_1) -> happyIn12 (TokKeyword KwPatternSyn happy_var_1 )} happyReduce_35 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_35 = happySpecReduce_1 2# happyReduction_35 happyReduction_35 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPostulate happy_var_1) -> happyIn12 (TokKeyword KwPostulate happy_var_1 )} happyReduce_36 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_36 = happySpecReduce_1 2# happyReduction_36 happyReduction_36 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPrimitive happy_var_1) -> happyIn12 (TokKeyword KwPrimitive happy_var_1 )} happyReduce_37 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_37 = happySpecReduce_1 2# happyReduction_37 happyReduction_37 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPrivate happy_var_1) -> happyIn12 (TokKeyword KwPrivate happy_var_1 )} happyReduce_38 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_38 = happySpecReduce_1 2# happyReduction_38 happyReduction_38 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwProp happy_var_1) -> happyIn12 (TokKeyword KwProp happy_var_1 )} happyReduce_39 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_39 = happySpecReduce_1 2# happyReduction_39 happyReduction_39 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPublic happy_var_1) -> happyIn12 (TokKeyword KwPublic happy_var_1 )} happyReduce_40 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_40 = happySpecReduce_1 2# happyReduction_40 happyReduction_40 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuote happy_var_1) -> happyIn12 (TokKeyword KwQuote happy_var_1 )} happyReduce_41 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_41 = happySpecReduce_1 2# happyReduction_41 happyReduction_41 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteContext happy_var_1) -> happyIn12 (TokKeyword KwQuoteContext happy_var_1 )} happyReduce_42 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_42 = happySpecReduce_1 2# happyReduction_42 happyReduction_42 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteGoal happy_var_1) -> happyIn12 (TokKeyword KwQuoteGoal happy_var_1 )} happyReduce_43 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_43 = happySpecReduce_1 2# happyReduction_43 happyReduction_43 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteTerm happy_var_1) -> happyIn12 (TokKeyword KwQuoteTerm happy_var_1 )} happyReduce_44 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_44 = happySpecReduce_1 2# happyReduction_44 happyReduction_44 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> happyIn12 (TokKeyword KwRecord happy_var_1 )} happyReduce_45 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_45 = happySpecReduce_1 2# happyReduction_45 happyReduction_45 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwRenaming happy_var_1) -> happyIn12 (TokKeyword KwRenaming happy_var_1 )} happyReduce_46 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_46 = happySpecReduce_1 2# happyReduction_46 happyReduction_46 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwRewrite happy_var_1) -> happyIn12 (TokKeyword KwRewrite happy_var_1 )} happyReduce_47 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_47 = happySpecReduce_1 2# happyReduction_47 happyReduction_47 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwSet happy_var_1) -> happyIn12 (TokKeyword KwSet happy_var_1 )} happyReduce_48 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_48 = happySpecReduce_1 2# happyReduction_48 happyReduction_48 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwSyntax happy_var_1) -> happyIn12 (TokKeyword KwSyntax happy_var_1 )} happyReduce_49 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_49 = happySpecReduce_1 2# happyReduction_49 happyReduction_49 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwTactic happy_var_1) -> happyIn12 (TokKeyword KwTactic happy_var_1 )} happyReduce_50 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_50 = happySpecReduce_1 2# happyReduction_50 happyReduction_50 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwTo happy_var_1) -> happyIn12 (TokKeyword KwTo happy_var_1 )} happyReduce_51 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_51 = happySpecReduce_1 2# happyReduction_51 happyReduction_51 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUnquote happy_var_1) -> happyIn12 (TokKeyword KwUnquote happy_var_1 )} happyReduce_52 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_52 = happySpecReduce_1 2# happyReduction_52 happyReduction_52 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDecl happy_var_1) -> happyIn12 (TokKeyword KwUnquoteDecl happy_var_1 )} happyReduce_53 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_53 = happySpecReduce_1 2# happyReduction_53 happyReduction_53 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDef happy_var_1) -> happyIn12 (TokKeyword KwUnquoteDef happy_var_1 )} happyReduce_54 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_54 = happySpecReduce_1 2# happyReduction_54 happyReduction_54 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUsing happy_var_1) -> happyIn12 (TokKeyword KwUsing happy_var_1 )} happyReduce_55 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_55 = happySpecReduce_1 2# happyReduction_55 happyReduction_55 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwWhere happy_var_1) -> happyIn12 (TokKeyword KwWhere happy_var_1 )} happyReduce_56 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_56 = happySpecReduce_1 2# happyReduction_56 happyReduction_56 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwDo happy_var_1) -> happyIn12 (TokKeyword KwDo happy_var_1 )} happyReduce_57 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_57 = happySpecReduce_1 2# happyReduction_57 happyReduction_57 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwWith happy_var_1) -> happyIn12 (TokKeyword KwWith happy_var_1 )} happyReduce_58 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_58 = happySpecReduce_1 2# happyReduction_58 happyReduction_58 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwBUILTIN happy_var_1) -> happyIn12 (TokKeyword KwBUILTIN happy_var_1 )} happyReduce_59 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_59 = happySpecReduce_1 2# happyReduction_59 happyReduction_59 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwCATCHALL happy_var_1) -> happyIn12 (TokKeyword KwCATCHALL happy_var_1 )} happyReduce_60 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_60 = happySpecReduce_1 2# happyReduction_60 happyReduction_60 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwDISPLAY happy_var_1) -> happyIn12 (TokKeyword KwDISPLAY happy_var_1 )} happyReduce_61 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_61 = happySpecReduce_1 2# happyReduction_61 happyReduction_61 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwETA happy_var_1) -> happyIn12 (TokKeyword KwETA happy_var_1 )} happyReduce_62 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_62 = happySpecReduce_1 2# happyReduction_62 happyReduction_62 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwFOREIGN happy_var_1) -> happyIn12 (TokKeyword KwFOREIGN happy_var_1 )} happyReduce_63 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_63 = happySpecReduce_1 2# happyReduction_63 happyReduction_63 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILE happy_var_1) -> happyIn12 (TokKeyword KwCOMPILE happy_var_1 )} happyReduce_64 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_64 = happySpecReduce_1 2# happyReduction_64 happyReduction_64 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwIMPOSSIBLE happy_var_1) -> happyIn12 (TokKeyword KwIMPOSSIBLE happy_var_1 )} happyReduce_65 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_65 = happySpecReduce_1 2# happyReduction_65 happyReduction_65 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwINJECTIVE happy_var_1) -> happyIn12 (TokKeyword KwINJECTIVE happy_var_1 )} happyReduce_66 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_66 = happySpecReduce_1 2# happyReduction_66 happyReduction_66 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwINLINE happy_var_1) -> happyIn12 (TokKeyword KwINLINE happy_var_1 )} happyReduce_67 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_67 = happySpecReduce_1 2# happyReduction_67 happyReduction_67 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNOINLINE happy_var_1) -> happyIn12 (TokKeyword KwNOINLINE happy_var_1 )} happyReduce_68 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_68 = happySpecReduce_1 2# happyReduction_68 happyReduction_68 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwMEASURE happy_var_1) -> happyIn12 (TokKeyword KwMEASURE happy_var_1 )} happyReduce_69 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_69 = happySpecReduce_1 2# happyReduction_69 happyReduction_69 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNO_TERMINATION_CHECK happy_var_1) -> happyIn12 (TokKeyword KwNO_TERMINATION_CHECK happy_var_1 )} happyReduce_70 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_70 = happySpecReduce_1 2# happyReduction_70 happyReduction_70 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNO_POSITIVITY_CHECK happy_var_1) -> happyIn12 (TokKeyword KwNO_POSITIVITY_CHECK happy_var_1 )} happyReduce_71 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_71 = happySpecReduce_1 2# happyReduction_71 happyReduction_71 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNO_UNIVERSE_CHECK happy_var_1) -> happyIn12 (TokKeyword KwNO_UNIVERSE_CHECK happy_var_1 )} happyReduce_72 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_72 = happySpecReduce_1 2# happyReduction_72 happyReduction_72 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNON_TERMINATING happy_var_1) -> happyIn12 (TokKeyword KwNON_TERMINATING happy_var_1 )} happyReduce_73 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_73 = happySpecReduce_1 2# happyReduction_73 happyReduction_73 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwOPTIONS happy_var_1) -> happyIn12 (TokKeyword KwOPTIONS happy_var_1 )} happyReduce_74 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_74 = happySpecReduce_1 2# happyReduction_74 happyReduction_74 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPOLARITY happy_var_1) -> happyIn12 (TokKeyword KwPOLARITY happy_var_1 )} happyReduce_75 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_75 = happySpecReduce_1 2# happyReduction_75 happyReduction_75 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwREWRITE happy_var_1) -> happyIn12 (TokKeyword KwREWRITE happy_var_1 )} happyReduce_76 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_76 = happySpecReduce_1 2# happyReduction_76 happyReduction_76 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwSTATIC happy_var_1) -> happyIn12 (TokKeyword KwSTATIC happy_var_1 )} happyReduce_77 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_77 = happySpecReduce_1 2# happyReduction_77 happyReduction_77 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwTERMINATING happy_var_1) -> happyIn12 (TokKeyword KwTERMINATING happy_var_1 )} happyReduce_78 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_78 = happySpecReduce_1 2# happyReduction_78 happyReduction_78 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwWARNING_ON_USAGE happy_var_1) -> happyIn12 (TokKeyword KwWARNING_ON_USAGE happy_var_1 )} happyReduce_79 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_79 = happySpecReduce_1 2# happyReduction_79 happyReduction_79 happy_x_1 = case happyOutTok happy_x_1 of { (TokSetN happy_var_1) -> happyIn12 (TokSetN happy_var_1 )} happyReduce_80 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_80 = happySpecReduce_1 2# happyReduction_80 happyReduction_80 happy_x_1 = case happyOutTok happy_x_1 of { (TokPropN happy_var_1) -> happyIn12 (TokPropN happy_var_1 )} happyReduce_81 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_81 = happySpecReduce_1 2# happyReduction_81 happyReduction_81 happy_x_1 = case happyOutTok happy_x_1 of { (TokTeX happy_var_1) -> happyIn12 (TokTeX happy_var_1 )} happyReduce_82 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_82 = happySpecReduce_1 2# happyReduction_82 happyReduction_82 happy_x_1 = case happyOutTok happy_x_1 of { (TokComment happy_var_1) -> happyIn12 (TokComment happy_var_1 )} happyReduce_83 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_83 = happySpecReduce_1 2# happyReduction_83 happyReduction_83 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymEllipsis happy_var_1) -> happyIn12 (TokSymbol SymEllipsis happy_var_1 )} happyReduce_84 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_84 = happySpecReduce_1 2# happyReduction_84 happyReduction_84 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDotDot happy_var_1) -> happyIn12 (TokSymbol SymDotDot happy_var_1 )} happyReduce_85 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_85 = happySpecReduce_1 2# happyReduction_85 happyReduction_85 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDot happy_var_1) -> happyIn12 (TokSymbol SymDot happy_var_1 )} happyReduce_86 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_86 = happySpecReduce_1 2# happyReduction_86 happyReduction_86 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymSemi happy_var_1) -> happyIn12 (TokSymbol SymSemi happy_var_1 )} happyReduce_87 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_87 = happySpecReduce_1 2# happyReduction_87 happyReduction_87 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymColon happy_var_1) -> happyIn12 (TokSymbol SymColon happy_var_1 )} happyReduce_88 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_88 = happySpecReduce_1 2# happyReduction_88 happyReduction_88 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymEqual happy_var_1) -> happyIn12 (TokSymbol SymEqual happy_var_1 )} happyReduce_89 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_89 = happySpecReduce_1 2# happyReduction_89 happyReduction_89 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymUnderscore happy_var_1) -> happyIn12 (TokSymbol SymUnderscore happy_var_1 )} happyReduce_90 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_90 = happySpecReduce_1 2# happyReduction_90 happyReduction_90 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymQuestionMark happy_var_1) -> happyIn12 (TokSymbol SymQuestionMark happy_var_1 )} happyReduce_91 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_91 = happySpecReduce_1 2# happyReduction_91 happyReduction_91 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymArrow happy_var_1) -> happyIn12 (TokSymbol SymArrow happy_var_1 )} happyReduce_92 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_92 = happySpecReduce_1 2# happyReduction_92 happyReduction_92 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymLambda happy_var_1) -> happyIn12 (TokSymbol SymLambda happy_var_1 )} happyReduce_93 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_93 = happySpecReduce_1 2# happyReduction_93 happyReduction_93 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymAs happy_var_1) -> happyIn12 (TokSymbol SymAs happy_var_1 )} happyReduce_94 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_94 = happySpecReduce_1 2# happyReduction_94 happyReduction_94 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymBar happy_var_1) -> happyIn12 (TokSymbol SymBar happy_var_1 )} happyReduce_95 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_95 = happySpecReduce_1 2# happyReduction_95 happyReduction_95 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> happyIn12 (TokSymbol SymOpenParen happy_var_1 )} happyReduce_96 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_96 = happySpecReduce_1 2# happyReduction_96 happyReduction_96 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymCloseParen happy_var_1) -> happyIn12 (TokSymbol SymCloseParen happy_var_1 )} happyReduce_97 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_97 = happySpecReduce_1 2# happyReduction_97 happyReduction_97 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenIdiomBracket happy_var_1) -> happyIn12 (TokSymbol SymOpenIdiomBracket happy_var_1 )} happyReduce_98 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_98 = happySpecReduce_1 2# happyReduction_98 happyReduction_98 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymCloseIdiomBracket happy_var_1) -> happyIn12 (TokSymbol SymCloseIdiomBracket happy_var_1 )} happyReduce_99 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_99 = happySpecReduce_1 2# happyReduction_99 happyReduction_99 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleOpenBrace happy_var_1) -> happyIn12 (TokSymbol SymDoubleOpenBrace happy_var_1 )} happyReduce_100 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_100 = happySpecReduce_1 2# happyReduction_100 happyReduction_100 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleCloseBrace happy_var_1) -> happyIn12 (TokSymbol SymDoubleCloseBrace happy_var_1 )} happyReduce_101 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_101 = happySpecReduce_1 2# happyReduction_101 happyReduction_101 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenBrace happy_var_1) -> happyIn12 (TokSymbol SymOpenBrace happy_var_1 )} happyReduce_102 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_102 = happySpecReduce_1 2# happyReduction_102 happyReduction_102 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymCloseBrace happy_var_1) -> happyIn12 (TokSymbol SymCloseBrace happy_var_1 )} happyReduce_103 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_103 = happySpecReduce_1 2# happyReduction_103 happyReduction_103 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenVirtualBrace happy_var_1) -> happyIn12 (TokSymbol SymOpenVirtualBrace happy_var_1 )} happyReduce_104 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_104 = happySpecReduce_1 2# happyReduction_104 happyReduction_104 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymCloseVirtualBrace happy_var_1) -> happyIn12 (TokSymbol SymCloseVirtualBrace happy_var_1 )} happyReduce_105 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_105 = happySpecReduce_1 2# happyReduction_105 happyReduction_105 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymVirtualSemi happy_var_1) -> happyIn12 (TokSymbol SymVirtualSemi happy_var_1 )} happyReduce_106 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_106 = happySpecReduce_1 2# happyReduction_106 happyReduction_106 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> happyIn12 (TokSymbol SymOpenPragma happy_var_1 )} happyReduce_107 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_107 = happySpecReduce_1 2# happyReduction_107 happyReduction_107 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymClosePragma happy_var_1) -> happyIn12 (TokSymbol SymClosePragma happy_var_1 )} happyReduce_108 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_108 = happySpecReduce_1 2# happyReduction_108 happyReduction_108 happy_x_1 = case happyOutTok happy_x_1 of { (TokId happy_var_1) -> happyIn12 (TokId happy_var_1 )} happyReduce_109 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_109 = happySpecReduce_1 2# happyReduction_109 happyReduction_109 happy_x_1 = case happyOutTok happy_x_1 of { (TokQId happy_var_1) -> happyIn12 (TokQId happy_var_1 )} happyReduce_110 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_110 = happySpecReduce_1 2# happyReduction_110 happyReduction_110 happy_x_1 = case happyOutTok happy_x_1 of { (TokString happy_var_1) -> happyIn12 (TokString happy_var_1 )} happyReduce_111 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_111 = happySpecReduce_1 2# happyReduction_111 happyReduction_111 happy_x_1 = case happyOutTok happy_x_1 of { (TokLiteral happy_var_1) -> happyIn12 (TokLiteral happy_var_1 )} happyReduce_112 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_112 = happySpecReduce_3 3# happyReduction_112 happyReduction_112 happy_x_3 happy_x_2 happy_x_1 = case happyOut143 happy_x_2 of { happy_var_2 -> happyIn13 (takeOptionsPragmas happy_var_2 )} happyReduce_113 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_113 = happySpecReduce_0 4# happyReduction_113 happyReduction_113 = happyIn14 (() ) happyReduce_114 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_114 = happySpecReduce_1 4# happyReduction_114 happyReduction_114 happy_x_1 = happyIn14 (() ) happyReduce_115 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_115 = happySpecReduce_1 5# happyReduction_115 happyReduction_115 happy_x_1 = happyIn15 (() ) happyReduce_116 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_116 = happyMonadReduce 1# 5# happyReduction_116 happyReduction_116 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((( popContext)) ) (\r -> happyReturn (happyIn15 r)) happyReduce_117 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_117 = happySpecReduce_1 6# happyReduction_117 happyReduction_117 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymSemi happy_var_1) -> happyIn16 (happy_var_1 )} happyReduce_118 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_118 = happySpecReduce_1 6# happyReduction_118 happyReduction_118 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymVirtualSemi happy_var_1) -> happyIn16 (happy_var_1 )} happyReduce_119 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_119 = happyMonadReduce 0# 7# happyReduction_119 happyReduction_119 (happyRest) tk = happyThen ((( pushLexState imp_dir)) ) (\r -> happyReturn (happyIn17 r)) happyReduce_120 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_120 = happyMonadReduce 1# 8# happyReduction_120 happyReduction_120 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokLiteral happy_var_1) -> ( case happy_var_1 of { LitNat _ i -> return i; _ -> parseError $ "Expected integer" })}) ) (\r -> happyReturn (happyIn18 r)) happyReduce_121 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_121 = happyMonadReduce 1# 9# happyReduction_121 happyReduction_121 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokId happy_var_1) -> ( mkName happy_var_1)}) ) (\r -> happyReturn (happyIn19 r)) happyReduce_122 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_122 = happySpecReduce_2 10# happyReduction_122 happyReduction_122 happy_x_2 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> case happyOut20 happy_x_2 of { happy_var_2 -> happyIn20 (happy_var_1 : happy_var_2 )}} happyReduce_123 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_123 = happySpecReduce_1 10# happyReduction_123 happyReduction_123 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> happyIn20 ([happy_var_1] )} happyReduce_124 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_124 = happySpecReduce_1 11# happyReduction_124 happyReduction_124 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleCloseBrace happy_var_1) -> happyIn21 (getRange happy_var_1 )} happyReduce_125 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_125 = happyMonadReduce 2# 11# happyReduction_125 happyReduction_125 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokSymbol SymCloseBrace happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymCloseBrace happy_var_2) -> ( if posPos (fromJust (rEnd' (getRange happy_var_2))) - posPos (fromJust (rStart' (getRange happy_var_1))) > 2 then parseErrorRange happy_var_2 "Expecting '}}', found separated '}'s." else return $ getRange (happy_var_1, happy_var_2))}}) ) (\r -> happyReturn (happyIn21 r)) happyReduce_126 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_126 = happySpecReduce_2 12# happyReduction_126 happyReduction_126 happy_x_2 happy_x_1 = case happyOut19 happy_x_2 of { happy_var_2 -> happyIn22 (setRelevance NonStrict $ defaultArg happy_var_2 )} happyReduce_127 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_127 = happySpecReduce_2 12# happyReduction_127 happyReduction_127 happy_x_2 happy_x_1 = case happyOut19 happy_x_2 of { happy_var_2 -> happyIn22 (setRelevance Irrelevant $ defaultArg happy_var_2 )} happyReduce_128 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_128 = happySpecReduce_1 12# happyReduction_128 happyReduction_128 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> happyIn22 (defaultArg happy_var_1 )} happyReduce_129 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_129 = happySpecReduce_2 13# happyReduction_129 happyReduction_129 happy_x_2 happy_x_1 = case happyOut22 happy_x_1 of { happy_var_1 -> case happyOut23 happy_x_2 of { happy_var_2 -> happyIn23 (happy_var_1 : happy_var_2 )}} happyReduce_130 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_130 = happySpecReduce_1 13# happyReduction_130 happyReduction_130 happy_x_1 = case happyOut22 happy_x_1 of { happy_var_1 -> happyIn23 ([happy_var_1] )} happyReduce_131 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_131 = happySpecReduce_2 14# happyReduction_131 happyReduction_131 happy_x_2 happy_x_1 = case happyOut22 happy_x_1 of { happy_var_1 -> case happyOut24 happy_x_2 of { happy_var_2 -> happyIn24 (happy_var_1 : happy_var_2 )}} happyReduce_132 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_132 = happySpecReduce_1 14# happyReduction_132 happyReduction_132 happy_x_1 = case happyOut22 happy_x_1 of { happy_var_1 -> happyIn24 ([happy_var_1] )} happyReduce_133 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_133 = happyReduce 4# 14# happyReduction_133 happyReduction_133 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut23 happy_x_2 of { happy_var_2 -> case happyOut24 happy_x_4 of { happy_var_4 -> happyIn24 (map makeInstance happy_var_2 ++ happy_var_4 ) `HappyStk` happyRest}} happyReduce_134 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_134 = happySpecReduce_3 14# happyReduction_134 happyReduction_134 happy_x_3 happy_x_2 happy_x_1 = case happyOut23 happy_x_2 of { happy_var_2 -> happyIn24 (map makeInstance happy_var_2 )} happyReduce_135 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_135 = happyReduce 4# 14# happyReduction_135 happyReduction_135 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut23 happy_x_2 of { happy_var_2 -> case happyOut24 happy_x_4 of { happy_var_4 -> happyIn24 (map hide happy_var_2 ++ happy_var_4 ) `HappyStk` happyRest}} happyReduce_136 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_136 = happySpecReduce_3 14# happyReduction_136 happyReduction_136 happy_x_3 happy_x_2 happy_x_1 = case happyOut23 happy_x_2 of { happy_var_2 -> happyIn24 (map hide happy_var_2 )} happyReduce_137 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_137 = happyReduce 5# 14# happyReduction_137 happyReduction_137 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> case happyOut24 happy_x_5 of { happy_var_5 -> happyIn24 (map (hide . setRelevance Irrelevant . defaultArg) happy_var_3 ++ happy_var_5 ) `HappyStk` happyRest}} happyReduce_138 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_138 = happyReduce 4# 14# happyReduction_138 happyReduction_138 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> happyIn24 (map (hide . setRelevance Irrelevant . defaultArg) happy_var_3 ) `HappyStk` happyRest} happyReduce_139 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_139 = happyReduce 5# 14# happyReduction_139 happyReduction_139 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> case happyOut24 happy_x_5 of { happy_var_5 -> happyIn24 (map (makeInstance . setRelevance Irrelevant . defaultArg) happy_var_3 ++ happy_var_5 ) `HappyStk` happyRest}} happyReduce_140 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_140 = happyReduce 4# 14# happyReduction_140 happyReduction_140 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> happyIn24 (map (makeInstance . setRelevance Irrelevant . defaultArg) happy_var_3 ) `HappyStk` happyRest} happyReduce_141 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_141 = happyReduce 5# 14# happyReduction_141 happyReduction_141 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> case happyOut24 happy_x_5 of { happy_var_5 -> happyIn24 (map (hide . setRelevance NonStrict . defaultArg) happy_var_3 ++ happy_var_5 ) `HappyStk` happyRest}} happyReduce_142 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_142 = happyReduce 4# 14# happyReduction_142 happyReduction_142 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> happyIn24 (map (hide . setRelevance NonStrict . defaultArg) happy_var_3 ) `HappyStk` happyRest} happyReduce_143 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_143 = happyReduce 5# 14# happyReduction_143 happyReduction_143 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> case happyOut24 happy_x_5 of { happy_var_5 -> happyIn24 (map (makeInstance . setRelevance NonStrict . defaultArg) happy_var_3 ++ happy_var_5 ) `HappyStk` happyRest}} happyReduce_144 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_144 = happyReduce 4# 14# happyReduction_144 happyReduction_144 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut20 happy_x_3 of { happy_var_3 -> happyIn24 (map (makeInstance . setRelevance NonStrict . defaultArg) happy_var_3 ) `HappyStk` happyRest} happyReduce_145 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_145 = happyMonadReduce 2# 15# happyReduction_145 happyReduction_145 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut27 happy_x_1 of { happy_var_1 -> case happyOut24 happy_x_2 of { happy_var_2 -> ( mapM (applyAttrs happy_var_1) happy_var_2)}}) ) (\r -> happyReturn (happyIn25 r)) happyReduce_146 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_146 = happyMonadReduce 2# 16# happyReduction_146 happyReduction_146 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokSymbol SymAs happy_var_1) -> case happyOut54 happy_x_2 of { happy_var_2 -> ( setRange (getRange (happy_var_1,happy_var_2)) `fmap` toAttribute happy_var_2)}}) ) (\r -> happyReturn (happyIn26 r)) happyReduce_147 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_147 = happySpecReduce_0 17# happyReduction_147 happyReduction_147 = happyIn27 ([] ) happyReduce_148 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_148 = happySpecReduce_2 17# happyReduction_148 happyReduction_148 happy_x_2 happy_x_1 = case happyOut27 happy_x_1 of { happy_var_1 -> case happyOut26 happy_x_2 of { happy_var_2 -> happyIn27 (happy_var_2 : happy_var_1 )}} happyReduce_149 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_149 = happySpecReduce_1 18# happyReduction_149 happyReduction_149 happy_x_1 = case happyOut26 happy_x_1 of { happy_var_1 -> happyIn28 ([happy_var_1] )} happyReduce_150 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_150 = happySpecReduce_2 18# happyReduction_150 happyReduction_150 happy_x_2 happy_x_1 = case happyOut28 happy_x_1 of { happy_var_1 -> case happyOut26 happy_x_2 of { happy_var_2 -> happyIn28 (happy_var_2 : happy_var_1 )}} happyReduce_151 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_151 = happyMonadReduce 1# 19# happyReduction_151 happyReduction_151 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokQId happy_var_1) -> ( mkQName happy_var_1)}) ) (\r -> happyReturn (happyIn29 r)) happyReduce_152 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_152 = happySpecReduce_1 19# happyReduction_152 happyReduction_152 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> happyIn29 (QName happy_var_1 )} happyReduce_153 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_153 = happySpecReduce_1 20# happyReduction_153 happyReduction_153 happy_x_1 = case happyOut29 happy_x_1 of { happy_var_1 -> happyIn30 (happy_var_1 )} happyReduce_154 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_154 = happySpecReduce_1 21# happyReduction_154 happyReduction_154 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> happyIn31 (happy_var_1 )} happyReduce_155 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_155 = happySpecReduce_1 21# happyReduction_155 happyReduction_155 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymUnderscore happy_var_1) -> happyIn31 (Name (getRange happy_var_1) InScope [Hole] )} happyReduce_156 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_156 = happySpecReduce_2 22# happyReduction_156 happyReduction_156 happy_x_2 happy_x_1 = case happyOut31 happy_x_1 of { happy_var_1 -> case happyOut32 happy_x_2 of { happy_var_2 -> happyIn32 (happy_var_1 : happy_var_2 )}} happyReduce_157 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_157 = happySpecReduce_1 22# happyReduction_157 happyReduction_157 happy_x_1 = case happyOut31 happy_x_1 of { happy_var_1 -> happyIn32 ([happy_var_1] )} happyReduce_158 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_158 = happyMonadReduce 1# 23# happyReduction_158 happyReduction_158 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut34 happy_x_1 of { happy_var_1 -> ( case happy_var_1 of Left ns -> return ns Right _ -> parseError $ "expected sequence of bound identifiers, not absurd pattern")}) ) (\r -> happyReturn (happyIn33 r)) happyReduce_159 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_159 = happyMonadReduce 1# 24# happyReduction_159 happyReduction_159 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut46 happy_x_1 of { happy_var_1 -> ( boundNamesOrAbsurd happy_var_1)}) ) (\r -> happyReturn (happyIn34 r)) happyReduce_160 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_160 = happyMonadReduce 3# 24# happyReduction_160 happyReduction_160 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut29 happy_x_1 of { happy_var_1 -> case happyOut29 happy_x_3 of { happy_var_3 -> ( fmap (Left . (:[])) $ mkNamedArg (Just happy_var_1) (Left happy_var_3))}}) ) (\r -> happyReturn (happyIn34 r)) happyReduce_161 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_161 = happyMonadReduce 3# 24# happyReduction_161 happyReduction_161 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut29 happy_x_3 of { happy_var_3 -> ( fmap (Left . (:[])) $ mkNamedArg Nothing (Left happy_var_3))}) ) (\r -> happyReturn (happyIn34 r)) happyReduce_162 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_162 = happyMonadReduce 3# 24# happyReduction_162 happyReduction_162 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut29 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_3 of { (TokSymbol SymUnderscore happy_var_3) -> ( fmap (Left . (:[])) $ mkNamedArg (Just happy_var_1) (Right $ getRange happy_var_3))}}) ) (\r -> happyReturn (happyIn34 r)) happyReduce_163 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_163 = happyMonadReduce 3# 24# happyReduction_163 happyReduction_163 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_3 of { (TokSymbol SymUnderscore happy_var_3) -> ( fmap (Left . (:[])) $ mkNamedArg Nothing (Right $ getRange happy_var_3))}) ) (\r -> happyReturn (happyIn34 r)) happyReduce_164 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_164 = happyMonadReduce 1# 25# happyReduction_164 happyReduction_164 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut46 happy_x_1 of { happy_var_1 -> ( let -- interpret an expression as name getName :: Expr -> Maybe Name getName (Ident (QName x)) = Just x getName (Underscore r _) = Just (Name r InScope [Hole]) getName _ = Nothing getNames :: Expr -> Maybe [Name] getNames (RawApp _ es) = mapM getName es getNames e = singleton `fmap` getName e -- interpret an expression as name or list of hidden names getName1 :: Expr -> Maybe [Arg Name] getName1 (Ident (QName x)) = Just [defaultArg x] getName1 (Underscore r _) = Just [defaultArg $ Name r InScope [Hole]] getName1 (HiddenArg _ (Named Nothing e)) = map (setHiding Hidden . defaultArg) `fmap` getNames e getName1 _ = Nothing in case mapM getName1 happy_var_1 of Just good -> return $ (map . fmap) (unnamed . mkBoundName_) $ concat good Nothing -> parseError $ "expected sequence of possibly hidden bound identifiers")}) ) (\r -> happyReturn (happyIn35 r)) happyReduce_165 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_165 = happySpecReduce_0 26# happyReduction_165 happyReduction_165 = happyIn36 ([] ) happyReduce_166 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_166 = happySpecReduce_2 26# happyReduction_166 happyReduction_166 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokString happy_var_1) -> case happyOut36 happy_x_2 of { happy_var_2 -> happyIn36 (snd happy_var_1 : happy_var_2 )}} happyReduce_167 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_167 = happySpecReduce_1 27# happyReduction_167 happyReduction_167 happy_x_1 = case happyOutTok happy_x_1 of { (TokString happy_var_1) -> happyIn37 (snd happy_var_1 )} happyReduce_168 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_168 = happySpecReduce_0 28# happyReduction_168 happyReduction_168 = happyIn38 ([] ) happyReduce_169 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_169 = happySpecReduce_2 28# happyReduction_169 happyReduction_169 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokString happy_var_1) -> case happyOut38 happy_x_2 of { happy_var_2 -> happyIn38 (happy_var_1 : happy_var_2 )}} happyReduce_170 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_170 = happySpecReduce_0 29# happyReduction_170 happyReduction_170 = happyIn39 ([] ) happyReduce_171 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_171 = happySpecReduce_2 29# happyReduction_171 happyReduction_171 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokString happy_var_1) -> case happyOut39 happy_x_2 of { happy_var_2 -> happyIn39 (happy_var_1 : happy_var_2 )}} happyReduce_172 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_172 = happyReduce 4# 29# happyReduction_172 happyReduction_172 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOut39 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> case happyOut39 happy_x_4 of { happy_var_4 -> happyIn39 ([(happy_var_1, "{-#")] ++ happy_var_2 ++ [(happy_var_3, "#-}")] ++ happy_var_4 ) `HappyStk` happyRest}}}} happyReduce_173 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_173 = happyMonadReduce 1# 30# happyReduction_173 happyReduction_173 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokString happy_var_1) -> ( mkName happy_var_1)}) ) (\r -> happyReturn (happyIn40 r)) happyReduce_174 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_174 = happyMonadReduce 1# 31# happyReduction_174 happyReduction_174 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokString happy_var_1) -> ( pragmaQName happy_var_1)}) ) (\r -> happyReturn (happyIn41 r)) happyReduce_175 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_175 = happyMonadReduce 1# 32# happyReduction_175 happyReduction_175 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut38 happy_x_1 of { happy_var_1 -> ( mapM pragmaQName happy_var_1)}) ) (\r -> happyReturn (happyIn42 r)) happyReduce_176 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_176 = happySpecReduce_2 33# happyReduction_176 happyReduction_176 happy_x_2 happy_x_1 = case happyOut63 happy_x_1 of { happy_var_1 -> case happyOut43 happy_x_2 of { happy_var_2 -> happyIn43 (Pi happy_var_1 happy_var_2 )}} happyReduce_177 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_177 = happySpecReduce_3 33# happyReduction_177 happyReduction_177 happy_x_3 happy_x_2 happy_x_1 = case happyOut50 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymArrow happy_var_2) -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn43 (Fun (getRange (happy_var_1,happy_var_2,happy_var_3)) (defaultArg $ RawApp (getRange happy_var_1) happy_var_1) happy_var_3 )}}} happyReduce_178 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_178 = happyMonadReduce 4# 33# happyReduction_178 happyReduction_178 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_1 of { happy_var_1 -> case happyOut50 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymArrow happy_var_3) -> case happyOut43 happy_x_4 of { happy_var_4 -> ( applyAttrs happy_var_1 (defaultArg $ RawApp (getRange (happy_var_1,happy_var_2)) happy_var_2) <&> \ dom -> Fun (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) dom happy_var_4)}}}}) ) (\r -> happyReturn (happyIn43 r)) happyReduce_179 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_179 = happySpecReduce_3 33# happyReduction_179 happyReduction_179 happy_x_3 happy_x_2 happy_x_1 = case happyOut44 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymEqual happy_var_2) -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn43 (Equal (getRange (happy_var_1, happy_var_2, happy_var_3)) happy_var_1 happy_var_3 )}}} happyReduce_180 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_180 = happySpecReduce_1 33# happyReduction_180 happyReduction_180 happy_x_1 = case happyOut44 happy_x_1 of { happy_var_1 -> happyIn43 (happy_var_1 )} happyReduce_181 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_181 = happyMonadReduce 1# 34# happyReduction_181 happyReduction_181 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut45 happy_x_1 of { happy_var_1 -> ( case happy_var_1 of { [e] -> return e ; e : es -> return $ WithApp (fuseRange e es) e es ; [] -> parseError "impossible: empty with expressions" })}) ) (\r -> happyReturn (happyIn44 r)) happyReduce_182 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_182 = happySpecReduce_3 35# happyReduction_182 happyReduction_182 happy_x_3 happy_x_2 happy_x_1 = case happyOut50 happy_x_1 of { happy_var_1 -> case happyOut45 happy_x_3 of { happy_var_3 -> happyIn45 (RawApp (getRange happy_var_1) happy_var_1 : happy_var_3 )}} happyReduce_183 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_183 = happySpecReduce_1 35# happyReduction_183 happyReduction_183 happy_x_1 = case happyOut46 happy_x_1 of { happy_var_1 -> happyIn45 ([RawApp (getRange happy_var_1) happy_var_1] )} happyReduce_184 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_184 = happySpecReduce_1 36# happyReduction_184 happyReduction_184 happy_x_1 = case happyOut47 happy_x_1 of { happy_var_1 -> happyIn46 ([happy_var_1] )} happyReduce_185 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_185 = happySpecReduce_2 36# happyReduction_185 happyReduction_185 happy_x_2 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> case happyOut46 happy_x_2 of { happy_var_2 -> happyIn46 (happy_var_1 : happy_var_2 )}} happyReduce_186 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_186 = happySpecReduce_3 37# happyReduction_186 happyReduction_186 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymLambda happy_var_1) -> case happyOut71 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn47 (Lam (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 happy_var_3 )}}} happyReduce_187 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_187 = happySpecReduce_1 37# happyReduction_187 happyReduction_187 happy_x_1 = case happyOut49 happy_x_1 of { happy_var_1 -> happyIn47 (happy_var_1 )} happyReduce_188 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_188 = happySpecReduce_3 37# happyReduction_188 happyReduction_188 happy_x_3 happy_x_2 happy_x_1 = case happyOut80 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn47 (forallPi happy_var_2 happy_var_3 )}} happyReduce_189 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_189 = happySpecReduce_3 37# happyReduction_189 happyReduction_189 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwLet happy_var_1) -> case happyOut181 happy_x_2 of { happy_var_2 -> case happyOut48 happy_x_3 of { happy_var_3 -> happyIn47 (Let (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 happy_var_3 )}}} happyReduce_190 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_190 = happyReduce 4# 37# happyReduction_190 happyReduction_190 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwDo happy_var_1) -> case happyOut85 happy_x_3 of { happy_var_3 -> happyIn47 (DoBlock (getRange (happy_var_1, happy_var_3)) happy_var_3 ) `HappyStk` happyRest}} happyReduce_191 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_191 = happySpecReduce_1 37# happyReduction_191 happyReduction_191 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> happyIn47 (happy_var_1 )} happyReduce_192 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_192 = happyReduce 4# 37# happyReduction_192 happyReduction_192 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteGoal happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokKeyword KwIn happy_var_3) -> case happyOut43 happy_x_4 of { happy_var_4 -> happyIn47 (QuoteGoal (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_2 happy_var_4 ) `HappyStk` happyRest}}}} happyReduce_193 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_193 = happySpecReduce_2 37# happyReduction_193 happyReduction_193 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwTactic happy_var_1) -> case happyOut50 happy_x_2 of { happy_var_2 -> happyIn47 (Tactic (getRange (happy_var_1, happy_var_2)) (RawApp (getRange happy_var_2) happy_var_2) [] )}} happyReduce_194 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_194 = happyReduce 4# 37# happyReduction_194 happyReduction_194 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwTactic happy_var_1) -> case happyOut50 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymBar happy_var_3) -> case happyOut45 happy_x_4 of { happy_var_4 -> happyIn47 (Tactic (getRange (happy_var_1, happy_var_2, happy_var_3, happy_var_4)) (RawApp (getRange happy_var_2) happy_var_2) happy_var_4 ) `HappyStk` happyRest}}}} happyReduce_195 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_195 = happySpecReduce_2 38# happyReduction_195 happyReduction_195 happy_x_2 happy_x_1 = case happyOut43 happy_x_2 of { happy_var_2 -> happyIn48 (Just happy_var_2 )} happyReduce_196 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_196 = happySpecReduce_0 38# happyReduction_196 happyReduction_196 = happyIn48 (Nothing ) happyReduce_197 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_197 = happyReduce 4# 39# happyReduction_197 happyReduction_197 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymLambda happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenBrace happy_var_2) -> case happyOut78 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseBrace happy_var_4) -> happyIn49 (ExtendedLam (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) (reverse happy_var_3) ) `HappyStk` happyRest}}}} happyReduce_198 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_198 = happyReduce 5# 39# happyReduction_198 happyReduction_198 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymLambda happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwWhere happy_var_2) -> case happyOut79 happy_x_4 of { happy_var_4 -> happyIn49 (ExtendedLam (getRange (happy_var_1, happy_var_2, happy_var_4)) (reverse happy_var_4) ) `HappyStk` happyRest}}} happyReduce_199 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_199 = happyMonadReduce 2# 39# happyReduction_199 happyReduction_199 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokSymbol SymLambda happy_var_1) -> case happyOut72 happy_x_2 of { happy_var_2 -> ( case happy_var_2 of Left (bs, h) -> if null bs then return $ AbsurdLam r h else return $ Lam r bs (AbsurdLam r h) where r = fuseRange happy_var_1 bs Right es -> do -- it is of the form @\ { p1 ... () }@ p <- exprToLHS (RawApp (getRange es) es); return $ ExtendedLam (fuseRange happy_var_1 es) [LamClause (p [] []) AbsurdRHS NoWhere False])}}) ) (\r -> happyReturn (happyIn49 r)) happyReduce_200 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_200 = happySpecReduce_1 40# happyReduction_200 happyReduction_200 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> happyIn50 ([happy_var_1] )} happyReduce_201 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_201 = happySpecReduce_2 40# happyReduction_201 happyReduction_201 happy_x_2 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> case happyOut50 happy_x_2 of { happy_var_2 -> happyIn50 (happy_var_1 : happy_var_2 )}} happyReduce_202 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_202 = happySpecReduce_0 41# happyReduction_202 happyReduction_202 = happyIn51 ([] ) happyReduce_203 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_203 = happySpecReduce_2 41# happyReduction_203 happyReduction_203 happy_x_2 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> case happyOut51 happy_x_2 of { happy_var_2 -> happyIn51 (happy_var_1 : happy_var_2 )}} happyReduce_204 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_204 = happySpecReduce_3 42# happyReduction_204 happyReduction_204 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenBrace happy_var_1) -> case happyOut43 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseBrace happy_var_3) -> happyIn52 (HiddenArg (getRange (happy_var_1,happy_var_2,happy_var_3)) (maybeNamed happy_var_2) )}}} happyReduce_205 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_205 = happySpecReduce_2 42# happyReduction_205 happyReduction_205 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenBrace happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymCloseBrace happy_var_2) -> happyIn52 (let r = fuseRange happy_var_1 happy_var_2 in HiddenArg r $ unnamed $ Absurd r )}} happyReduce_206 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_206 = happySpecReduce_1 43# happyReduction_206 happyReduction_206 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymQuestionMark happy_var_1) -> happyIn53 (QuestionMark (getRange happy_var_1) Nothing )} happyReduce_207 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_207 = happySpecReduce_1 43# happyReduction_207 happyReduction_207 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymUnderscore happy_var_1) -> happyIn53 (Underscore (getRange happy_var_1) Nothing )} happyReduce_208 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_208 = happySpecReduce_1 43# happyReduction_208 happyReduction_208 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwProp happy_var_1) -> happyIn53 (Prop (getRange happy_var_1) )} happyReduce_209 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_209 = happySpecReduce_1 43# happyReduction_209 happyReduction_209 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwSet happy_var_1) -> happyIn53 (Set (getRange happy_var_1) )} happyReduce_210 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_210 = happySpecReduce_1 43# happyReduction_210 happyReduction_210 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuote happy_var_1) -> happyIn53 (Quote (getRange happy_var_1) )} happyReduce_211 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_211 = happySpecReduce_1 43# happyReduction_211 happyReduction_211 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteTerm happy_var_1) -> happyIn53 (QuoteTerm (getRange happy_var_1) )} happyReduce_212 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_212 = happySpecReduce_1 43# happyReduction_212 happyReduction_212 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteContext happy_var_1) -> happyIn53 (QuoteContext (getRange happy_var_1) )} happyReduce_213 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_213 = happySpecReduce_1 43# happyReduction_213 happyReduction_213 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUnquote happy_var_1) -> happyIn53 (Unquote (getRange happy_var_1) )} happyReduce_214 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_214 = happySpecReduce_1 43# happyReduction_214 happyReduction_214 happy_x_1 = case happyOutTok happy_x_1 of { (TokSetN happy_var_1) -> happyIn53 (SetN (getRange (fst happy_var_1)) (snd happy_var_1) )} happyReduce_215 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_215 = happySpecReduce_1 43# happyReduction_215 happyReduction_215 happy_x_1 = case happyOutTok happy_x_1 of { (TokPropN happy_var_1) -> happyIn53 (PropN (getRange (fst happy_var_1)) (snd happy_var_1) )} happyReduce_216 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_216 = happySpecReduce_3 43# happyReduction_216 happyReduction_216 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleOpenBrace happy_var_1) -> case happyOut43 happy_x_2 of { happy_var_2 -> case happyOut21 happy_x_3 of { happy_var_3 -> happyIn53 (InstanceArg (getRange (happy_var_1,happy_var_2,happy_var_3)) (maybeNamed happy_var_2) )}}} happyReduce_217 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_217 = happySpecReduce_3 43# happyReduction_217 happyReduction_217 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenIdiomBracket happy_var_1) -> case happyOut43 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseIdiomBracket happy_var_3) -> happyIn53 (IdiomBrackets (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 )}}} happyReduce_218 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_218 = happySpecReduce_2 43# happyReduction_218 happyReduction_218 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymCloseParen happy_var_2) -> happyIn53 (Absurd (fuseRange happy_var_1 happy_var_2) )}} happyReduce_219 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_219 = happySpecReduce_2 43# happyReduction_219 happyReduction_219 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleOpenBrace happy_var_1) -> case happyOut21 happy_x_2 of { happy_var_2 -> happyIn53 (let r = fuseRange happy_var_1 happy_var_2 in InstanceArg r $ unnamed $ Absurd r )}} happyReduce_220 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_220 = happySpecReduce_3 43# happyReduction_220 happyReduction_220 happy_x_3 happy_x_2 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymAs happy_var_2) -> case happyOut55 happy_x_3 of { happy_var_3 -> happyIn53 (As (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_1 happy_var_3 )}}} happyReduce_221 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_221 = happySpecReduce_2 43# happyReduction_221 happyReduction_221 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDot happy_var_1) -> case happyOut55 happy_x_2 of { happy_var_2 -> happyIn53 (Dot (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_222 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_222 = happyReduce 4# 43# happyReduction_222 happyReduction_222 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenBrace happy_var_2) -> case happyOut56 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseBrace happy_var_4) -> happyIn53 (Rec (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_223 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_223 = happyReduce 5# 43# happyReduction_223 happyReduction_223 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> case happyOut53 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymOpenBrace happy_var_3) -> case happyOut60 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymCloseBrace happy_var_5) -> happyIn53 (RecUpdate (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) happy_var_2 happy_var_4 ) `HappyStk` happyRest}}}}} happyReduce_224 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_224 = happySpecReduce_1 43# happyReduction_224 happyReduction_224 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymEllipsis happy_var_1) -> happyIn53 (Ellipsis (getRange happy_var_1) )} happyReduce_225 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_225 = happySpecReduce_1 43# happyReduction_225 happyReduction_225 happy_x_1 = case happyOut54 happy_x_1 of { happy_var_1 -> happyIn53 (happy_var_1 )} happyReduce_226 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_226 = happySpecReduce_1 44# happyReduction_226 happyReduction_226 happy_x_1 = case happyOut29 happy_x_1 of { happy_var_1 -> happyIn54 (Ident happy_var_1 )} happyReduce_227 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_227 = happySpecReduce_1 44# happyReduction_227 happyReduction_227 happy_x_1 = case happyOutTok happy_x_1 of { (TokLiteral happy_var_1) -> happyIn54 (Lit happy_var_1 )} happyReduce_228 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_228 = happySpecReduce_3 44# happyReduction_228 happyReduction_228 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOut43 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseParen happy_var_3) -> happyIn54 (Paren (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 )}}} happyReduce_229 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_229 = happySpecReduce_1 45# happyReduction_229 happyReduction_229 happy_x_1 = case happyOut52 happy_x_1 of { happy_var_1 -> happyIn55 (happy_var_1 )} happyReduce_230 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_230 = happySpecReduce_1 45# happyReduction_230 happyReduction_230 happy_x_1 = case happyOut53 happy_x_1 of { happy_var_1 -> happyIn55 (happy_var_1 )} happyReduce_231 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_231 = happySpecReduce_0 46# happyReduction_231 happyReduction_231 = happyIn56 ([] ) happyReduce_232 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_232 = happySpecReduce_1 46# happyReduction_232 happyReduction_232 happy_x_1 = case happyOut57 happy_x_1 of { happy_var_1 -> happyIn56 (happy_var_1 )} happyReduce_233 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_233 = happySpecReduce_1 47# happyReduction_233 happyReduction_233 happy_x_1 = case happyOut58 happy_x_1 of { happy_var_1 -> happyIn57 ([happy_var_1] )} happyReduce_234 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_234 = happySpecReduce_3 47# happyReduction_234 happyReduction_234 happy_x_3 happy_x_2 happy_x_1 = case happyOut58 happy_x_1 of { happy_var_1 -> case happyOut57 happy_x_3 of { happy_var_3 -> happyIn57 (happy_var_1 : happy_var_3 )}} happyReduce_235 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_235 = happySpecReduce_1 48# happyReduction_235 happyReduction_235 happy_x_1 = case happyOut62 happy_x_1 of { happy_var_1 -> happyIn58 (Left happy_var_1 )} happyReduce_236 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_236 = happySpecReduce_1 48# happyReduction_236 happyReduction_236 happy_x_1 = case happyOut59 happy_x_1 of { happy_var_1 -> happyIn58 (Right happy_var_1 )} happyReduce_237 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_237 = happySpecReduce_3 49# happyReduction_237 happyReduction_237 happy_x_3 happy_x_2 happy_x_1 = case happyOut30 happy_x_1 of { happy_var_1 -> case happyOut138 happy_x_2 of { happy_var_2 -> case happyOut88 happy_x_3 of { happy_var_3 -> happyIn59 (ModuleAssignment happy_var_1 happy_var_2 happy_var_3 )}}} happyReduce_238 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_238 = happySpecReduce_0 50# happyReduction_238 happyReduction_238 = happyIn60 ([] ) happyReduce_239 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_239 = happySpecReduce_1 50# happyReduction_239 happyReduction_239 happy_x_1 = case happyOut61 happy_x_1 of { happy_var_1 -> happyIn60 (happy_var_1 )} happyReduce_240 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_240 = happySpecReduce_1 51# happyReduction_240 happyReduction_240 happy_x_1 = case happyOut62 happy_x_1 of { happy_var_1 -> happyIn61 ([happy_var_1] )} happyReduce_241 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_241 = happySpecReduce_3 51# happyReduction_241 happyReduction_241 happy_x_3 happy_x_2 happy_x_1 = case happyOut62 happy_x_1 of { happy_var_1 -> case happyOut61 happy_x_3 of { happy_var_3 -> happyIn61 (happy_var_1 : happy_var_3 )}} happyReduce_242 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_242 = happySpecReduce_3 52# happyReduction_242 happyReduction_242 happy_x_3 happy_x_2 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn62 (FieldAssignment happy_var_1 happy_var_3 )}} happyReduce_243 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_243 = happySpecReduce_2 53# happyReduction_243 happyReduction_243 happy_x_2 happy_x_1 = case happyOut64 happy_x_1 of { happy_var_1 -> happyIn63 (happy_var_1 )} happyReduce_244 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_244 = happySpecReduce_1 54# happyReduction_244 happyReduction_244 happy_x_1 = case happyOut65 happy_x_1 of { happy_var_1 -> happyIn64 (happy_var_1 )} happyReduce_245 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_245 = happySpecReduce_2 55# happyReduction_245 happyReduction_245 happy_x_2 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> case happyOut65 happy_x_2 of { happy_var_2 -> happyIn65 (happy_var_1 : happy_var_2 )}} happyReduce_246 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_246 = happySpecReduce_1 55# happyReduction_246 happyReduction_246 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> happyIn65 ([happy_var_1] )} happyReduce_247 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_247 = happyReduce 4# 56# happyReduction_247 happyReduction_247 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOut69 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ setRelevance Irrelevant happy_var_3 ) `HappyStk` happyRest}}} happyReduce_248 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_248 = happyReduce 4# 56# happyReduction_248 happyReduction_248 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymOpenBrace happy_var_2) -> case happyOut67 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseBrace happy_var_4) -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ setHiding Hidden $ setRelevance Irrelevant happy_var_3 ) `HappyStk` happyRest}}} happyReduce_249 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_249 = happyReduce 4# 56# happyReduction_249 happyReduction_249 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymDoubleOpenBrace happy_var_2) -> case happyOut67 happy_x_3 of { happy_var_3 -> case happyOut21 happy_x_4 of { happy_var_4 -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ makeInstance $ setRelevance Irrelevant happy_var_3 ) `HappyStk` happyRest}}} happyReduce_250 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_250 = happyReduce 4# 56# happyReduction_250 happyReduction_250 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOut69 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ setRelevance NonStrict happy_var_3 ) `HappyStk` happyRest}}} happyReduce_251 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_251 = happyReduce 4# 56# happyReduction_251 happyReduction_251 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymOpenBrace happy_var_2) -> case happyOut67 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseBrace happy_var_4) -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ setHiding Hidden $ setRelevance NonStrict happy_var_3 ) `HappyStk` happyRest}}} happyReduce_252 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_252 = happyReduce 4# 56# happyReduction_252 happyReduction_252 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_2 of { (TokSymbol SymDoubleOpenBrace happy_var_2) -> case happyOut67 happy_x_3 of { happy_var_3 -> case happyOut21 happy_x_4 of { happy_var_4 -> happyIn66 (setRange (getRange (happy_var_2,happy_var_3,happy_var_4)) $ makeInstance $ setRelevance NonStrict happy_var_3 ) `HappyStk` happyRest}}} happyReduce_253 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_253 = happySpecReduce_3 56# happyReduction_253 happyReduction_253 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOut69 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseParen happy_var_3) -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 )}}} happyReduce_254 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_254 = happySpecReduce_3 56# happyReduction_254 happyReduction_254 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOut70 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseParen happy_var_3) -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) happy_var_2 )}}} happyReduce_255 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_255 = happySpecReduce_3 56# happyReduction_255 happyReduction_255 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleOpenBrace happy_var_1) -> case happyOut67 happy_x_2 of { happy_var_2 -> case happyOut21 happy_x_3 of { happy_var_3 -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) $ makeInstance happy_var_2 )}}} happyReduce_256 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_256 = happySpecReduce_3 56# happyReduction_256 happyReduction_256 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymDoubleOpenBrace happy_var_1) -> case happyOut68 happy_x_2 of { happy_var_2 -> case happyOut21 happy_x_3 of { happy_var_3 -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) $ makeInstance happy_var_2 )}}} happyReduce_257 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_257 = happySpecReduce_3 56# happyReduction_257 happyReduction_257 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenBrace happy_var_1) -> case happyOut67 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseBrace happy_var_3) -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) $ setHiding Hidden happy_var_2 )}}} happyReduce_258 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_258 = happySpecReduce_3 56# happyReduction_258 happyReduction_258 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenBrace happy_var_1) -> case happyOut68 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseBrace happy_var_3) -> happyIn66 (setRange (getRange (happy_var_1,happy_var_2,happy_var_3)) $ setHiding Hidden happy_var_2 )}}} happyReduce_259 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_259 = happySpecReduce_3 56# happyReduction_259 happyReduction_259 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOut137 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseParen happy_var_3) -> happyIn66 (TLet (getRange (happy_var_1,happy_var_3)) happy_var_2 )}}} happyReduce_260 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_260 = happyReduce 4# 56# happyReduction_260 happyReduction_260 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenParen happy_var_1) -> case happyOut181 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn66 (TLet (getRange (happy_var_1,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}} happyReduce_261 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_261 = happySpecReduce_3 57# happyReduction_261 happyReduction_261 happy_x_3 happy_x_2 happy_x_1 = case happyOut33 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymColon happy_var_2) -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn67 (let r = getRange (happy_var_1,happy_var_2,happy_var_3) -- the range is approximate only for TypedBindings in TBind r happy_var_1 happy_var_3 )}}} happyReduce_262 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_262 = happyMonadReduce 4# 58# happyReduction_262 happyReduction_262 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_1 of { happy_var_1 -> case happyOut33 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymColon happy_var_3) -> case happyOut43 happy_x_4 of { happy_var_4 -> ( do let r = getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4) -- the range is approximate only for TypedBindings xs <- mapM (applyAttrs happy_var_1) happy_var_2 return $ TBind r xs happy_var_4)}}}}) ) (\r -> happyReturn (happyIn68 r)) happyReduce_263 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_263 = happySpecReduce_3 59# happyReduction_263 happyReduction_263 happy_x_3 happy_x_2 happy_x_1 = case happyOut35 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymColon happy_var_2) -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn69 (let r = getRange (happy_var_1,happy_var_2,happy_var_3) -- the range is approximate only for TypedBindings in TBind r happy_var_1 happy_var_3 )}}} happyReduce_264 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_264 = happyMonadReduce 4# 60# happyReduction_264 happyReduction_264 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_1 of { happy_var_1 -> case happyOut35 happy_x_2 of { happy_var_2 -> case happyOutTok happy_x_3 of { (TokSymbol SymColon happy_var_3) -> case happyOut43 happy_x_4 of { happy_var_4 -> ( do let r = getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4) -- the range is approximate only for TypedBindings xs <- mapM (applyAttrs happy_var_1) happy_var_2 return $ TBind r xs happy_var_4)}}}}) ) (\r -> happyReturn (happyIn70 r)) happyReduce_265 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_265 = happyMonadReduce 2# 61# happyReduction_265 happyReduction_265 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut73 happy_x_1 of { happy_var_1 -> ( case reverse happy_var_1 of Left _ : _ -> parseError "Absurd lambda cannot have a body." _ : _ -> return [ b | Right b <- happy_var_1 ] [] -> parsePanic "Empty LamBinds")}) ) (\r -> happyReturn (happyIn71 r)) happyReduce_266 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_266 = happyMonadReduce 1# 62# happyReduction_266 happyReduction_266 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut74 happy_x_1 of { happy_var_1 -> ( case happy_var_1 of Left lb -> case reverse lb of Right _ : _ -> parseError "Missing body for lambda" Left h : _ -> return $ Left ([ b | Right b <- init lb], h) _ -> parseError "Unsupported variant of lambda" Right es -> return $ Right es)}) ) (\r -> happyReturn (happyIn72 r)) happyReduce_267 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_267 = happySpecReduce_2 63# happyReduction_267 happyReduction_267 happy_x_2 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> case happyOut73 happy_x_2 of { happy_var_2 -> happyIn73 (map Right happy_var_1 ++ happy_var_2 )}} happyReduce_268 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_268 = happySpecReduce_2 63# happyReduction_268 happyReduction_268 happy_x_2 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> case happyOut73 happy_x_2 of { happy_var_2 -> happyIn73 (Right (DomainFull happy_var_1) : happy_var_2 )}} happyReduce_269 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_269 = happySpecReduce_1 63# happyReduction_269 happyReduction_269 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> happyIn73 (map Right happy_var_1 )} happyReduce_270 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_270 = happySpecReduce_1 63# happyReduction_270 happyReduction_270 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> happyIn73 ([Right $ DomainFull happy_var_1] )} happyReduce_271 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_271 = happySpecReduce_2 63# happyReduction_271 happyReduction_271 happy_x_2 happy_x_1 = happyIn73 ([Left NotHidden] ) happyReduce_272 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_272 = happySpecReduce_2 63# happyReduction_272 happyReduction_272 happy_x_2 happy_x_1 = happyIn73 ([Left Hidden] ) happyReduce_273 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_273 = happySpecReduce_2 63# happyReduction_273 happyReduction_273 happy_x_2 happy_x_1 = happyIn73 ([Left (Instance NoOverlap)] ) happyReduce_274 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_274 = happySpecReduce_2 64# happyReduction_274 happyReduction_274 happy_x_2 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> case happyOut73 happy_x_2 of { happy_var_2 -> happyIn74 (Left $ map Right happy_var_1 ++ happy_var_2 )}} happyReduce_275 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_275 = happySpecReduce_2 64# happyReduction_275 happyReduction_275 happy_x_2 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> case happyOut73 happy_x_2 of { happy_var_2 -> happyIn74 (Left $ Right (DomainFull happy_var_1) : happy_var_2 )}} happyReduce_276 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_276 = happySpecReduce_1 64# happyReduction_276 happyReduction_276 happy_x_1 = case happyOut84 happy_x_1 of { happy_var_1 -> happyIn74 (case happy_var_1 of Left lb -> Left $ map Right lb Right es -> Right es )} happyReduce_277 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_277 = happySpecReduce_1 64# happyReduction_277 happyReduction_277 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> happyIn74 (Left [Right $ DomainFull happy_var_1] )} happyReduce_278 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_278 = happySpecReduce_2 64# happyReduction_278 happyReduction_278 happy_x_2 happy_x_1 = happyIn74 (Left [Left NotHidden] ) happyReduce_279 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_279 = happySpecReduce_2 64# happyReduction_279 happyReduction_279 happy_x_2 happy_x_1 = happyIn74 (Left [Left Hidden] ) happyReduce_280 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_280 = happySpecReduce_2 64# happyReduction_280 happyReduction_280 happy_x_2 happy_x_1 = happyIn74 (Left [Left (Instance NoOverlap)] ) happyReduce_281 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_281 = happyMonadReduce 3# 65# happyReduction_281 happyReduction_281 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut51 happy_x_1 of { happy_var_1 -> case happyOut43 happy_x_3 of { happy_var_3 -> ( do p <- exprToLHS (RawApp (getRange happy_var_1) happy_var_1) ; return LamClause{ lamLHS = p [] [] , lamRHS = RHS happy_var_3 , lamWhere = NoWhere , lamCatchAll = False })}}) ) (\r -> happyReturn (happyIn75 r)) happyReduce_282 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_282 = happyMonadReduce 4# 65# happyReduction_282 happyReduction_282 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut51 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_4 of { happy_var_4 -> ( do p <- exprToLHS (RawApp (getRange happy_var_2) happy_var_2) ; return LamClause{ lamLHS = p [] [] , lamRHS = RHS happy_var_4 , lamWhere = NoWhere , lamCatchAll = True })}}) ) (\r -> happyReturn (happyIn75 r)) happyReduce_283 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_283 = happyMonadReduce 1# 66# happyReduction_283 happyReduction_283 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut46 happy_x_1 of { happy_var_1 -> ( do p <- exprToLHS (RawApp (getRange happy_var_1) happy_var_1); return LamClause{ lamLHS = p [] [] , lamRHS = AbsurdRHS , lamWhere = NoWhere , lamCatchAll = False })}) ) (\r -> happyReturn (happyIn76 r)) happyReduce_284 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_284 = happyMonadReduce 2# 66# happyReduction_284 happyReduction_284 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut46 happy_x_2 of { happy_var_2 -> ( do p <- exprToLHS (RawApp (getRange happy_var_2) happy_var_2); return LamClause{ lamLHS = p [] [] , lamRHS = AbsurdRHS , lamWhere = NoWhere , lamCatchAll = True })}) ) (\r -> happyReturn (happyIn76 r)) happyReduce_285 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_285 = happySpecReduce_1 67# happyReduction_285 happyReduction_285 happy_x_1 = case happyOut75 happy_x_1 of { happy_var_1 -> happyIn77 (happy_var_1 )} happyReduce_286 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_286 = happySpecReduce_1 67# happyReduction_286 happyReduction_286 happy_x_1 = case happyOut76 happy_x_1 of { happy_var_1 -> happyIn77 (happy_var_1 )} happyReduce_287 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_287 = happySpecReduce_3 68# happyReduction_287 happyReduction_287 happy_x_3 happy_x_2 happy_x_1 = case happyOut78 happy_x_1 of { happy_var_1 -> case happyOut77 happy_x_3 of { happy_var_3 -> happyIn78 (happy_var_3 : happy_var_1 )}} happyReduce_288 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_288 = happySpecReduce_3 68# happyReduction_288 happyReduction_288 happy_x_3 happy_x_2 happy_x_1 = case happyOut76 happy_x_1 of { happy_var_1 -> case happyOut77 happy_x_3 of { happy_var_3 -> happyIn78 ([happy_var_3, happy_var_1] )}} happyReduce_289 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_289 = happySpecReduce_1 68# happyReduction_289 happyReduction_289 happy_x_1 = case happyOut75 happy_x_1 of { happy_var_1 -> happyIn78 ([happy_var_1] )} happyReduce_290 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_290 = happySpecReduce_3 69# happyReduction_290 happyReduction_290 happy_x_3 happy_x_2 happy_x_1 = case happyOut79 happy_x_1 of { happy_var_1 -> case happyOut77 happy_x_3 of { happy_var_3 -> happyIn79 (happy_var_3 : happy_var_1 )}} happyReduce_291 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_291 = happySpecReduce_1 69# happyReduction_291 happyReduction_291 happy_x_1 = case happyOut77 happy_x_1 of { happy_var_1 -> happyIn79 ([happy_var_1] )} happyReduce_292 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_292 = happySpecReduce_2 70# happyReduction_292 happyReduction_292 happy_x_2 happy_x_1 = case happyOut81 happy_x_1 of { happy_var_1 -> happyIn80 (happy_var_1 )} happyReduce_293 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_293 = happySpecReduce_2 71# happyReduction_293 happyReduction_293 happy_x_2 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> case happyOut81 happy_x_2 of { happy_var_2 -> happyIn81 (happy_var_1 ++ happy_var_2 )}} happyReduce_294 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_294 = happySpecReduce_2 71# happyReduction_294 happyReduction_294 happy_x_2 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> case happyOut81 happy_x_2 of { happy_var_2 -> happyIn81 (DomainFull happy_var_1 : happy_var_2 )}} happyReduce_295 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_295 = happySpecReduce_1 71# happyReduction_295 happyReduction_295 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> happyIn81 (happy_var_1 )} happyReduce_296 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_296 = happySpecReduce_1 71# happyReduction_296 happyReduction_296 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> happyIn81 ([DomainFull happy_var_1] )} happyReduce_297 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_297 = happySpecReduce_2 72# happyReduction_297 happyReduction_297 happy_x_2 happy_x_1 = case happyOut83 happy_x_1 of { happy_var_1 -> case happyOut82 happy_x_2 of { happy_var_2 -> happyIn82 (happy_var_1 ++ happy_var_2 )}} happyReduce_298 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_298 = happySpecReduce_2 72# happyReduction_298 happyReduction_298 happy_x_2 happy_x_1 = case happyOut66 happy_x_1 of { happy_var_1 -> case happyOut82 happy_x_2 of { happy_var_2 -> happyIn82 (DomainFull happy_var_1 : happy_var_2 )}} happyReduce_299 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_299 = happySpecReduce_0 72# happyReduction_299 happyReduction_299 = happyIn82 ([] ) happyReduce_300 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_300 = happyMonadReduce 1# 73# happyReduction_300 happyReduction_300 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut84 happy_x_1 of { happy_var_1 -> ( case happy_var_1 of Left lbs -> return lbs Right _ -> parseError "expected sequence of bound identifiers, not absurd pattern")}) ) (\r -> happyReturn (happyIn83 r)) happyReduce_301 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_301 = happySpecReduce_1 74# happyReduction_301 happyReduction_301 happy_x_1 = case happyOut31 happy_x_1 of { happy_var_1 -> happyIn84 (Left [DomainFree $ defaultNamedArg $ mkBoundName_ happy_var_1] )} happyReduce_302 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_302 = happySpecReduce_2 74# happyReduction_302 happyReduction_302 happy_x_2 happy_x_1 = case happyOut31 happy_x_2 of { happy_var_2 -> happyIn84 (Left [DomainFree $ setRelevance Irrelevant $ defaultNamedArg $ mkBoundName_ happy_var_2] )} happyReduce_303 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_303 = happySpecReduce_2 74# happyReduction_303 happyReduction_303 happy_x_2 happy_x_1 = case happyOut31 happy_x_2 of { happy_var_2 -> happyIn84 (Left [DomainFree $ setRelevance NonStrict $ defaultNamedArg $ mkBoundName_ happy_var_2] )} happyReduce_304 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_304 = happySpecReduce_3 74# happyReduction_304 happyReduction_304 happy_x_3 happy_x_2 happy_x_1 = case happyOut34 happy_x_2 of { happy_var_2 -> happyIn84 (mapLeft (map DomainFree) happy_var_2 )} happyReduce_305 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_305 = happyMonadReduce 4# 74# happyReduction_305 happyReduction_305 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_2 of { happy_var_2 -> case happyOut34 happy_x_3 of { happy_var_3 -> ( applyAttrs happy_var_2 defaultArgInfo <&> \ ai -> mapLeft (map (DomainFree . setArgInfo ai)) happy_var_3)}}) ) (\r -> happyReturn (happyIn84 r)) happyReduce_306 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_306 = happySpecReduce_3 74# happyReduction_306 happyReduction_306 happy_x_3 happy_x_2 happy_x_1 = case happyOut34 happy_x_2 of { happy_var_2 -> happyIn84 (mapLeft (map (DomainFree . setHiding Hidden)) happy_var_2 )} happyReduce_307 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_307 = happyMonadReduce 4# 74# happyReduction_307 happyReduction_307 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_2 of { happy_var_2 -> case happyOut34 happy_x_3 of { happy_var_3 -> ( applyAttrs happy_var_2 defaultArgInfo <&> \ ai -> mapLeft (map (DomainFree . setHiding Hidden . setArgInfo ai)) happy_var_3)}}) ) (\r -> happyReturn (happyIn84 r)) happyReduce_308 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_308 = happySpecReduce_3 74# happyReduction_308 happyReduction_308 happy_x_3 happy_x_2 happy_x_1 = case happyOut33 happy_x_2 of { happy_var_2 -> happyIn84 (Left $ map (DomainFree . makeInstance) happy_var_2 )} happyReduce_309 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_309 = happyMonadReduce 4# 74# happyReduction_309 happyReduction_309 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_2 of { happy_var_2 -> case happyOut33 happy_x_3 of { happy_var_3 -> ( applyAttrs happy_var_2 defaultArgInfo <&> \ ai -> Left $ map (DomainFree . makeInstance . setArgInfo ai) happy_var_3)}}) ) (\r -> happyReturn (happyIn84 r)) happyReduce_310 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_310 = happyReduce 4# 74# happyReduction_310 happyReduction_310 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut33 happy_x_3 of { happy_var_3 -> happyIn84 (Left $ map (DomainFree . setHiding Hidden . setRelevance Irrelevant) happy_var_3 ) `HappyStk` happyRest} happyReduce_311 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_311 = happyReduce 4# 74# happyReduction_311 happyReduction_311 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut33 happy_x_3 of { happy_var_3 -> happyIn84 (Left $ map (DomainFree . makeInstance . setRelevance Irrelevant) happy_var_3 ) `HappyStk` happyRest} happyReduce_312 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_312 = happyReduce 4# 74# happyReduction_312 happyReduction_312 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut33 happy_x_3 of { happy_var_3 -> happyIn84 (Left $ map (DomainFree . setHiding Hidden . setRelevance NonStrict) happy_var_3 ) `HappyStk` happyRest} happyReduce_313 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_313 = happyReduce 4# 74# happyReduction_313 happyReduction_313 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut33 happy_x_3 of { happy_var_3 -> happyIn84 (Left $ map (DomainFree . makeInstance . setRelevance NonStrict) happy_var_3 ) `HappyStk` happyRest} happyReduce_314 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_314 = happySpecReduce_1 75# happyReduction_314 happyReduction_314 happy_x_1 = case happyOut86 happy_x_1 of { happy_var_1 -> happyIn85 ([happy_var_1] )} happyReduce_315 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_315 = happySpecReduce_2 75# happyReduction_315 happyReduction_315 happy_x_2 happy_x_1 = case happyOut86 happy_x_1 of { happy_var_1 -> happyIn85 ([happy_var_1] )} happyReduce_316 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_316 = happySpecReduce_3 75# happyReduction_316 happyReduction_316 happy_x_3 happy_x_2 happy_x_1 = case happyOut86 happy_x_1 of { happy_var_1 -> case happyOut85 happy_x_3 of { happy_var_3 -> happyIn85 (happy_var_1 : happy_var_3 )}} happyReduce_317 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_317 = happyMonadReduce 2# 76# happyReduction_317 happyReduction_317 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut43 happy_x_1 of { happy_var_1 -> case happyOut87 happy_x_2 of { happy_var_2 -> ( buildDoStmt happy_var_1 happy_var_2)}}) ) (\r -> happyReturn (happyIn86 r)) happyReduce_318 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_318 = happySpecReduce_0 77# happyReduction_318 happyReduction_318 = happyIn87 ([] ) happyReduce_319 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_319 = happyReduce 4# 77# happyReduction_319 happyReduction_319 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut79 happy_x_3 of { happy_var_3 -> happyIn87 (reverse happy_var_3 ) `HappyStk` happyRest} happyReduce_320 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_320 = happyMonadReduce 1# 78# happyReduction_320 happyReduction_320 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut89 happy_x_1 of { happy_var_1 -> ( mergeImportDirectives happy_var_1)}) ) (\r -> happyReturn (happyIn88 r)) happyReduce_321 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_321 = happySpecReduce_2 79# happyReduction_321 happyReduction_321 happy_x_2 happy_x_1 = case happyOut90 happy_x_1 of { happy_var_1 -> case happyOut89 happy_x_2 of { happy_var_2 -> happyIn89 (happy_var_1 : happy_var_2 )}} happyReduce_322 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_322 = happySpecReduce_0 79# happyReduction_322 happyReduction_322 = happyIn89 ([] ) happyReduce_323 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_323 = happySpecReduce_1 80# happyReduction_323 happyReduction_323 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPublic happy_var_1) -> happyIn90 (defaultImportDir { importDirRange = getRange happy_var_1, publicOpen = True } )} happyReduce_324 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_324 = happySpecReduce_1 80# happyReduction_324 happyReduction_324 happy_x_1 = case happyOut91 happy_x_1 of { happy_var_1 -> happyIn90 (defaultImportDir { importDirRange = snd happy_var_1, using = fst happy_var_1 } )} happyReduce_325 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_325 = happySpecReduce_1 80# happyReduction_325 happyReduction_325 happy_x_1 = case happyOut92 happy_x_1 of { happy_var_1 -> happyIn90 (defaultImportDir { importDirRange = snd happy_var_1, hiding = fst happy_var_1 } )} happyReduce_326 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_326 = happySpecReduce_1 80# happyReduction_326 happyReduction_326 happy_x_1 = case happyOut93 happy_x_1 of { happy_var_1 -> happyIn90 (defaultImportDir { importDirRange = snd happy_var_1, impRenaming = fst happy_var_1 } )} happyReduce_327 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_327 = happyReduce 4# 81# happyReduction_327 happyReduction_327 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwUsing happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOut98 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn91 ((Using happy_var_3 , getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) ) `HappyStk` happyRest}}}} happyReduce_328 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_328 = happyReduce 4# 82# happyReduction_328 happyReduction_328 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwHiding happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOut98 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn92 ((happy_var_3 , getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) ) `HappyStk` happyRest}}}} happyReduce_329 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_329 = happyReduce 4# 83# happyReduction_329 happyReduction_329 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwRenaming happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOut94 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymCloseParen happy_var_4) -> happyIn93 ((happy_var_3 , getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) ) `HappyStk` happyRest}}}} happyReduce_330 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_330 = happySpecReduce_3 83# happyReduction_330 happyReduction_330 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwRenaming happy_var_1) -> case happyOutTok happy_x_2 of { (TokSymbol SymOpenParen happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymCloseParen happy_var_3) -> happyIn93 (([] , getRange (happy_var_1,happy_var_2,happy_var_3)) )}}} happyReduce_331 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_331 = happySpecReduce_3 84# happyReduction_331 happyReduction_331 happy_x_3 happy_x_2 happy_x_1 = case happyOut95 happy_x_1 of { happy_var_1 -> case happyOut94 happy_x_3 of { happy_var_3 -> happyIn94 (happy_var_1 : happy_var_3 )}} happyReduce_332 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_332 = happySpecReduce_1 84# happyReduction_332 happyReduction_332 happy_x_1 = case happyOut95 happy_x_1 of { happy_var_1 -> happyIn94 ([happy_var_1] )} happyReduce_333 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_333 = happySpecReduce_3 85# happyReduction_333 happyReduction_333 happy_x_3 happy_x_2 happy_x_1 = case happyOut96 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokKeyword KwTo happy_var_2) -> case happyOut19 happy_x_3 of { happy_var_3 -> happyIn95 (Renaming happy_var_1 (setImportedName happy_var_1 happy_var_3) (getRange happy_var_2) )}}} happyReduce_334 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_334 = happySpecReduce_2 86# happyReduction_334 happyReduction_334 happy_x_2 happy_x_1 = case happyOut19 happy_x_2 of { happy_var_2 -> happyIn96 (ImportedName happy_var_2 )} happyReduce_335 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_335 = happySpecReduce_3 86# happyReduction_335 happyReduction_335 happy_x_3 happy_x_2 happy_x_1 = case happyOut19 happy_x_3 of { happy_var_3 -> happyIn96 (ImportedModule happy_var_3 )} happyReduce_336 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_336 = happySpecReduce_1 87# happyReduction_336 happyReduction_336 happy_x_1 = case happyOut19 happy_x_1 of { happy_var_1 -> happyIn97 (ImportedName happy_var_1 )} happyReduce_337 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_337 = happySpecReduce_2 87# happyReduction_337 happyReduction_337 happy_x_2 happy_x_1 = case happyOut19 happy_x_2 of { happy_var_2 -> happyIn97 (ImportedModule happy_var_2 )} happyReduce_338 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_338 = happySpecReduce_0 88# happyReduction_338 happyReduction_338 = happyIn98 ([] ) happyReduce_339 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_339 = happySpecReduce_1 88# happyReduction_339 happyReduction_339 happy_x_1 = case happyOut99 happy_x_1 of { happy_var_1 -> happyIn98 (happy_var_1 )} happyReduce_340 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_340 = happySpecReduce_1 89# happyReduction_340 happyReduction_340 happy_x_1 = case happyOut97 happy_x_1 of { happy_var_1 -> happyIn99 ([happy_var_1] )} happyReduce_341 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_341 = happySpecReduce_3 89# happyReduction_341 happyReduction_341 happy_x_3 happy_x_2 happy_x_1 = case happyOut97 happy_x_1 of { happy_var_1 -> case happyOut99 happy_x_3 of { happy_var_3 -> happyIn99 (happy_var_1 : happy_var_3 )}} happyReduce_342 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_342 = happyMonadReduce 3# 90# happyReduction_342 happyReduction_342 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut44 happy_x_1 of { happy_var_1 -> case happyOut102 happy_x_2 of { happy_var_2 -> case happyOut101 happy_x_3 of { happy_var_3 -> ( exprToLHS happy_var_1 >>= \p -> return (p happy_var_2 happy_var_3))}}}) ) (\r -> happyReturn (happyIn100 r)) happyReduce_343 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_343 = happySpecReduce_0 91# happyReduction_343 happyReduction_343 = happyIn101 ([] ) happyReduce_344 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_344 = happySpecReduce_2 91# happyReduction_344 happyReduction_344 happy_x_2 happy_x_1 = case happyOut43 happy_x_2 of { happy_var_2 -> happyIn101 (case happy_var_2 of { WithApp _ e es -> e : es; e -> [e] } )} happyReduce_345 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_345 = happySpecReduce_0 92# happyReduction_345 happyReduction_345 = happyIn102 ([] ) happyReduce_346 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_346 = happySpecReduce_2 92# happyReduction_346 happyReduction_346 happy_x_2 happy_x_1 = case happyOut44 happy_x_2 of { happy_var_2 -> happyIn102 (case happy_var_2 of { WithApp _ e es -> e : es; e -> [e] } )} happyReduce_347 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_347 = happySpecReduce_1 93# happyReduction_347 happyReduction_347 happy_x_1 = case happyOut43 happy_x_1 of { happy_var_1 -> happyIn103 (HoleContentExpr happy_var_1 )} happyReduce_348 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_348 = happySpecReduce_1 93# happyReduction_348 happyReduction_348 happy_x_1 = case happyOut102 happy_x_1 of { happy_var_1 -> happyIn103 (HoleContentRewrite happy_var_1 )} happyReduce_349 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_349 = happySpecReduce_0 94# happyReduction_349 happyReduction_349 = happyIn104 (NoWhere ) happyReduce_350 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_350 = happySpecReduce_2 94# happyReduction_350 happyReduction_350 happy_x_2 happy_x_1 = case happyOut182 happy_x_2 of { happy_var_2 -> happyIn104 (AnyWhere happy_var_2 )} happyReduce_351 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_351 = happyReduce 4# 94# happyReduction_351 happyReduction_351 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut182 happy_x_4 of { happy_var_4 -> happyIn104 (SomeWhere happy_var_2 PublicAccess happy_var_4 ) `HappyStk` happyRest}} happyReduce_352 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_352 = happyReduce 4# 94# happyReduction_352 happyReduction_352 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut142 happy_x_2 of { happy_var_2 -> case happyOut182 happy_x_4 of { happy_var_4 -> happyIn104 (SomeWhere happy_var_2 PublicAccess happy_var_4 ) `HappyStk` happyRest}} happyReduce_353 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_353 = happySpecReduce_2 95# happyReduction_353 happyReduction_353 happy_x_2 happy_x_1 = case happyOut43 happy_x_1 of { happy_var_1 -> case happyOut104 happy_x_2 of { happy_var_2 -> happyIn105 (ExprWhere happy_var_1 happy_var_2 )}} happyReduce_354 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_354 = happySpecReduce_1 96# happyReduction_354 happyReduction_354 happy_x_1 = case happyOut117 happy_x_1 of { happy_var_1 -> happyIn106 (happy_var_1 )} happyReduce_355 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_355 = happySpecReduce_1 96# happyReduction_355 happyReduction_355 happy_x_1 = case happyOut109 happy_x_1 of { happy_var_1 -> happyIn106 (happy_var_1 )} happyReduce_356 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_356 = happySpecReduce_1 96# happyReduction_356 happyReduction_356 happy_x_1 = case happyOut111 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_357 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_357 = happySpecReduce_1 96# happyReduction_357 happyReduction_357 happy_x_1 = case happyOut112 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_358 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_358 = happySpecReduce_1 96# happyReduction_358 happyReduction_358 happy_x_1 = case happyOut113 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_359 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_359 = happySpecReduce_1 96# happyReduction_359 happyReduction_359 happy_x_1 = case happyOut114 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_360 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_360 = happySpecReduce_1 96# happyReduction_360 happyReduction_360 happy_x_1 = case happyOut116 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_361 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_361 = happySpecReduce_1 96# happyReduction_361 happyReduction_361 happy_x_1 = case happyOut118 happy_x_1 of { happy_var_1 -> happyIn106 (happy_var_1 )} happyReduce_362 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_362 = happySpecReduce_1 96# happyReduction_362 happyReduction_362 happy_x_1 = case happyOut119 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_363 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_363 = happySpecReduce_1 96# happyReduction_363 happyReduction_363 happy_x_1 = case happyOut120 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_364 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_364 = happySpecReduce_1 96# happyReduction_364 happyReduction_364 happy_x_1 = case happyOut121 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_365 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_365 = happySpecReduce_1 96# happyReduction_365 happyReduction_365 happy_x_1 = case happyOut122 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_366 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_366 = happySpecReduce_1 96# happyReduction_366 happyReduction_366 happy_x_1 = case happyOut123 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_367 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_367 = happySpecReduce_1 96# happyReduction_367 happyReduction_367 happy_x_1 = case happyOut124 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_368 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_368 = happySpecReduce_1 96# happyReduction_368 happyReduction_368 happy_x_1 = case happyOut125 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_369 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_369 = happySpecReduce_1 96# happyReduction_369 happyReduction_369 happy_x_1 = case happyOut137 happy_x_1 of { happy_var_1 -> happyIn106 (happy_var_1 )} happyReduce_370 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_370 = happySpecReduce_1 96# happyReduction_370 happyReduction_370 happy_x_1 = case happyOut140 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_371 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_371 = happySpecReduce_1 96# happyReduction_371 happyReduction_371 happy_x_1 = case happyOut141 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_372 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_372 = happySpecReduce_1 96# happyReduction_372 happyReduction_372 happy_x_1 = case happyOut144 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_373 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_373 = happySpecReduce_1 96# happyReduction_373 happyReduction_373 happy_x_1 = case happyOut127 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_374 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_374 = happySpecReduce_1 96# happyReduction_374 happyReduction_374 happy_x_1 = case happyOut128 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_375 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_375 = happySpecReduce_1 96# happyReduction_375 happyReduction_375 happy_x_1 = case happyOut126 happy_x_1 of { happy_var_1 -> happyIn106 ([happy_var_1] )} happyReduce_376 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_376 = happySpecReduce_3 97# happyReduction_376 happyReduction_376 happy_x_3 happy_x_2 happy_x_1 = case happyOut20 happy_x_1 of { happy_var_1 -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn107 (map (\ x -> typeSig defaultArgInfo x happy_var_3) happy_var_1 )}} happyReduce_377 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_377 = happySpecReduce_3 98# happyReduction_377 happyReduction_377 happy_x_3 happy_x_2 happy_x_1 = case happyOut25 happy_x_1 of { happy_var_1 -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn108 (map (fmap (\ x -> typeSig defaultArgInfo x happy_var_3)) happy_var_1 )}} happyReduce_378 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_378 = happyMonadReduce 4# 98# happyReduction_378 happyReduction_378 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwOverlap happy_var_1) -> case happyOut25 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_4 of { happy_var_4 -> ( let setOverlap x = case getHiding x of Instance _ -> return $ makeInstance' YesOverlap x _ -> parseErrorRange happy_var_1 "The 'overlap' keyword only applies to instance fields (fields marked with {{ }})" in T.traverse (setOverlap . fmap (\ x -> typeSig defaultArgInfo x happy_var_4)) happy_var_2)}}}) ) (\r -> happyReturn (happyIn108 r)) happyReduce_379 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_379 = happySpecReduce_2 98# happyReduction_379 happyReduction_379 happy_x_2 happy_x_1 = case happyOut172 happy_x_2 of { happy_var_2 -> happyIn108 (let setInstance (TypeSig info x t) = TypeSig (makeInstance info) x t setInstance _ = __IMPOSSIBLE__ in map (fmap setInstance) happy_var_2 )} happyReduce_380 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_380 = happyMonadReduce 3# 99# happyReduction_380 happyReduction_380 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut100 happy_x_1 of { happy_var_1 -> case happyOut110 happy_x_2 of { happy_var_2 -> case happyOut104 happy_x_3 of { happy_var_3 -> ( funClauseOrTypeSigs [] happy_var_1 happy_var_2 happy_var_3)}}}) ) (\r -> happyReturn (happyIn109 r)) happyReduce_381 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_381 = happyMonadReduce 4# 99# happyReduction_381 happyReduction_381 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut28 happy_x_1 of { happy_var_1 -> case happyOut100 happy_x_2 of { happy_var_2 -> case happyOut110 happy_x_3 of { happy_var_3 -> case happyOut104 happy_x_4 of { happy_var_4 -> ( funClauseOrTypeSigs happy_var_1 happy_var_2 happy_var_3 happy_var_4)}}}}) ) (\r -> happyReturn (happyIn109 r)) happyReduce_382 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_382 = happySpecReduce_2 100# happyReduction_382 happyReduction_382 happy_x_2 happy_x_1 = case happyOut43 happy_x_2 of { happy_var_2 -> happyIn110 (JustRHS (RHS happy_var_2) )} happyReduce_383 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_383 = happySpecReduce_2 100# happyReduction_383 happyReduction_383 happy_x_2 happy_x_1 = case happyOut43 happy_x_2 of { happy_var_2 -> happyIn110 (TypeSigsRHS happy_var_2 )} happyReduce_384 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_384 = happySpecReduce_0 100# happyReduction_384 happyReduction_384 = happyIn110 (JustRHS AbsurdRHS ) happyReduce_385 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_385 = happyReduce 7# 101# happyReduction_385 happyReduction_385 (happy_x_7 `HappyStk` happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymColon happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> case happyOutTok happy_x_6 of { (TokKeyword KwWhere happy_var_6) -> case happyOut182 happy_x_7 of { happy_var_7 -> happyIn111 (Data (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5,happy_var_6,happy_var_7)) Inductive happy_var_2 happy_var_3 happy_var_5 happy_var_7 ) `HappyStk` happyRest}}}}}}} happyReduce_386 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_386 = happyReduce 7# 101# happyReduction_386 happyReduction_386 (happy_x_7 `HappyStk` happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwCoData happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymColon happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> case happyOutTok happy_x_6 of { (TokKeyword KwWhere happy_var_6) -> case happyOut182 happy_x_7 of { happy_var_7 -> happyIn111 (Data (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5,happy_var_6,happy_var_7)) CoInductive happy_var_2 happy_var_3 happy_var_5 happy_var_7 ) `HappyStk` happyRest}}}}}}} happyReduce_387 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_387 = happyReduce 5# 101# happyReduction_387 happyReduction_387 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokKeyword KwWhere happy_var_4) -> case happyOut182 happy_x_5 of { happy_var_5 -> happyIn111 (DataDef (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) Inductive happy_var_2 happy_var_3 happy_var_5 ) `HappyStk` happyRest}}}}} happyReduce_388 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_388 = happyReduce 5# 101# happyReduction_388 happyReduction_388 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwCoData happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokKeyword KwWhere happy_var_4) -> case happyOut182 happy_x_5 of { happy_var_5 -> happyIn111 (DataDef (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) CoInductive happy_var_2 happy_var_3 happy_var_5 ) `HappyStk` happyRest}}}}} happyReduce_389 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_389 = happyReduce 5# 102# happyReduction_389 happyReduction_389 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymColon happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> happyIn112 (DataSig (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) Inductive happy_var_2 happy_var_3 happy_var_5 ) `HappyStk` happyRest}}}}} happyReduce_390 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_390 = happyMonadReduce 7# 103# happyReduction_390 happyReduction_390 (happy_x_7 `HappyStk` happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> case happyOut53 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymColon happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> case happyOutTok happy_x_6 of { (TokKeyword KwWhere happy_var_6) -> case happyOut176 happy_x_7 of { happy_var_7 -> ( exprToName happy_var_2 >>= \ n -> let ((x,y,z),ds) = happy_var_7 in return $ Record (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5,happy_var_6,happy_var_7)) n x y z happy_var_3 happy_var_5 ds)}}}}}}}) ) (\r -> happyReturn (happyIn113 r)) happyReduce_391 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_391 = happyMonadReduce 5# 103# happyReduction_391 happyReduction_391 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> case happyOut53 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokKeyword KwWhere happy_var_4) -> case happyOut176 happy_x_5 of { happy_var_5 -> ( exprToName happy_var_2 >>= \ n -> let ((x,y,z),ds) = happy_var_5 in return $ RecordDef (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) n x y z happy_var_3 ds)}}}}}) ) (\r -> happyReturn (happyIn113 r)) happyReduce_392 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_392 = happyMonadReduce 5# 104# happyReduction_392 happyReduction_392 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) -> case happyOut53 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymColon happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> ( exprToName happy_var_2 >>= \ n -> return $ RecordSig (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) n happy_var_3 happy_var_5)}}}}}) ) (\r -> happyReturn (happyIn114 r)) happyReduce_393 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_393 = happySpecReduce_2 105# happyReduction_393 happyReduction_393 happy_x_2 happy_x_1 = case happyOut19 happy_x_2 of { happy_var_2 -> happyIn115 ((happy_var_2, NotInstanceDef) )} happyReduce_394 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_394 = happyReduce 5# 105# happyReduction_394 happyReduction_394 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut19 happy_x_4 of { happy_var_4 -> happyIn115 ((happy_var_4, InstanceDef) ) `HappyStk` happyRest} happyReduce_395 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_395 = happySpecReduce_3 106# happyReduction_395 happyReduction_395 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfix happy_var_1) -> case happyOut18 happy_x_2 of { happy_var_2 -> case happyOut32 happy_x_3 of { happy_var_3 -> happyIn116 (Infix (Fixity (getRange (happy_var_1,happy_var_3)) (Related happy_var_2) NonAssoc) happy_var_3 )}}} happyReduce_396 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_396 = happySpecReduce_3 106# happyReduction_396 happyReduction_396 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfixL happy_var_1) -> case happyOut18 happy_x_2 of { happy_var_2 -> case happyOut32 happy_x_3 of { happy_var_3 -> happyIn116 (Infix (Fixity (getRange (happy_var_1,happy_var_3)) (Related happy_var_2) LeftAssoc) happy_var_3 )}}} happyReduce_397 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_397 = happySpecReduce_3 106# happyReduction_397 happyReduction_397 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInfixR happy_var_1) -> case happyOut18 happy_x_2 of { happy_var_2 -> case happyOut32 happy_x_3 of { happy_var_3 -> happyIn116 (Infix (Fixity (getRange (happy_var_1,happy_var_3)) (Related happy_var_2) RightAssoc) happy_var_3 )}}} happyReduce_398 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_398 = happySpecReduce_2 107# happyReduction_398 happyReduction_398 happy_x_2 happy_x_1 = case happyOut172 happy_x_2 of { happy_var_2 -> happyIn117 (let inst i = case getHiding i of Instance _ -> InstanceDef _ -> NotInstanceDef toField (Arg info (TypeSig info' x t)) = Field (inst info') x (Arg info t) in map toField happy_var_2 )} happyReduce_399 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_399 = happySpecReduce_2 108# happyReduction_399 happyReduction_399 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwVariable happy_var_1) -> case happyOut174 happy_x_2 of { happy_var_2 -> happyIn118 (let toGeneralize (Arg info (TypeSig _ x t)) = TypeSig info x t in [ Generalize (fuseRange happy_var_1 happy_var_2) (map toGeneralize happy_var_2) ] )}} happyReduce_400 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_400 = happySpecReduce_2 109# happyReduction_400 happyReduction_400 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwMutual happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn119 (Mutual (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_401 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_401 = happySpecReduce_2 110# happyReduction_401 happyReduction_401 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwAbstract happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn120 (Abstract (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_402 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_402 = happySpecReduce_2 111# happyReduction_402 happyReduction_402 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPrivate happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn121 (Private (fuseRange happy_var_1 happy_var_2) UserWritten happy_var_2 )}} happyReduce_403 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_403 = happySpecReduce_2 112# happyReduction_403 happyReduction_403 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInstance happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn122 (InstanceB (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_404 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_404 = happySpecReduce_2 113# happyReduction_404 happyReduction_404 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwMacro happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn123 (Macro (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_405 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_405 = happySpecReduce_2 114# happyReduction_405 happyReduction_405 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPostulate happy_var_1) -> case happyOut182 happy_x_2 of { happy_var_2 -> happyIn124 (Postulate (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_406 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_406 = happySpecReduce_2 115# happyReduction_406 happyReduction_406 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwPrimitive happy_var_1) -> case happyOut169 happy_x_2 of { happy_var_2 -> happyIn125 (Primitive (fuseRange happy_var_1 happy_var_2) happy_var_2 )}} happyReduce_407 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_407 = happySpecReduce_3 116# happyReduction_407 happyReduction_407 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDecl happy_var_1) -> case happyOut43 happy_x_3 of { happy_var_3 -> happyIn126 (UnquoteDecl (fuseRange happy_var_1 happy_var_3) [] happy_var_3 )}} happyReduce_408 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_408 = happyReduce 4# 116# happyReduction_408 happyReduction_408 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDecl happy_var_1) -> case happyOut20 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_4 of { happy_var_4 -> happyIn126 (UnquoteDecl (fuseRange happy_var_1 happy_var_4) happy_var_2 happy_var_4 ) `HappyStk` happyRest}}} happyReduce_409 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_409 = happyReduce 4# 116# happyReduction_409 happyReduction_409 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDef happy_var_1) -> case happyOut20 happy_x_2 of { happy_var_2 -> case happyOut43 happy_x_4 of { happy_var_4 -> happyIn126 (UnquoteDef (fuseRange happy_var_1 happy_var_4) happy_var_2 happy_var_4 ) `HappyStk` happyRest}}} happyReduce_410 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_410 = happyMonadReduce 5# 117# happyReduction_410 happyReduction_410 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut131 happy_x_3 of { happy_var_3 -> case happyOut130 happy_x_5 of { happy_var_5 -> ( case happy_var_2 of Name _ _ [_] -> case mkNotation happy_var_3 happy_var_5 of Left err -> parseError $ "Malformed syntax declaration: " ++ err Right n -> return $ Syntax happy_var_2 n _ -> parseError "Syntax declarations are allowed only for simple names (without holes)")}}}) ) (\r -> happyReturn (happyIn127 r)) happyReduce_411 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_411 = happyMonadReduce 5# 118# happyReduction_411 happyReduction_411 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwPatternSyn happy_var_1) -> case happyOut19 happy_x_2 of { happy_var_2 -> case happyOut129 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymEqual happy_var_4) -> case happyOut43 happy_x_5 of { happy_var_5 -> ( do p <- exprToPattern happy_var_5 return (PatternSyn (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) happy_var_2 happy_var_3 p))}}}}}) ) (\r -> happyReturn (happyIn128 r)) happyReduce_412 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_412 = happySpecReduce_0 119# happyReduction_412 happyReduction_412 = happyIn129 ([] ) happyReduce_413 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_413 = happyMonadReduce 1# 119# happyReduction_413 happyReduction_413 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut73 happy_x_1 of { happy_var_1 -> ( patternSynArgs happy_var_1)}) ) (\r -> happyReturn (happyIn129 r)) happyReduce_414 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_414 = happySpecReduce_1 120# happyReduction_414 happyReduction_414 happy_x_1 = case happyOut135 happy_x_1 of { happy_var_1 -> happyIn130 ([happy_var_1] )} happyReduce_415 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_415 = happySpecReduce_2 120# happyReduction_415 happyReduction_415 happy_x_2 happy_x_1 = case happyOut130 happy_x_1 of { happy_var_1 -> case happyOut135 happy_x_2 of { happy_var_2 -> happyIn130 (happy_var_1 ++ [happy_var_2] )}} happyReduce_416 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_416 = happySpecReduce_1 121# happyReduction_416 happyReduction_416 happy_x_1 = case happyOut132 happy_x_1 of { happy_var_1 -> happyIn131 ([happy_var_1] )} happyReduce_417 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_417 = happySpecReduce_2 121# happyReduction_417 happyReduction_417 happy_x_2 happy_x_1 = case happyOut131 happy_x_1 of { happy_var_1 -> case happyOut132 happy_x_2 of { happy_var_2 -> happyIn131 (happy_var_1 ++ [happy_var_2] )}} happyReduce_418 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_418 = happySpecReduce_1 122# happyReduction_418 happyReduction_418 happy_x_1 = case happyOut133 happy_x_1 of { happy_var_1 -> happyIn132 (defaultNamedArg happy_var_1 )} happyReduce_419 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_419 = happySpecReduce_3 122# happyReduction_419 happyReduction_419 happy_x_3 happy_x_2 happy_x_1 = case happyOut134 happy_x_2 of { happy_var_2 -> happyIn132 (hide $ defaultNamedArg happy_var_2 )} happyReduce_420 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_420 = happySpecReduce_3 122# happyReduction_420 happyReduction_420 happy_x_3 happy_x_2 happy_x_1 = case happyOut134 happy_x_2 of { happy_var_2 -> happyIn132 (makeInstance $ defaultNamedArg happy_var_2 )} happyReduce_421 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_421 = happyReduce 5# 122# happyReduction_421 happyReduction_421 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut135 happy_x_2 of { happy_var_2 -> case happyOut134 happy_x_4 of { happy_var_4 -> happyIn132 (hide $ defaultArg $ named happy_var_2 happy_var_4 ) `HappyStk` happyRest}} happyReduce_422 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_422 = happyReduce 5# 122# happyReduction_422 happyReduction_422 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut135 happy_x_2 of { happy_var_2 -> case happyOut134 happy_x_4 of { happy_var_4 -> happyIn132 (makeInstance $ defaultArg $ named happy_var_2 happy_var_4 ) `HappyStk` happyRest}} happyReduce_423 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_423 = happySpecReduce_1 123# happyReduction_423 happyReduction_423 happy_x_1 = case happyOut135 happy_x_1 of { happy_var_1 -> happyIn133 (ExprHole happy_var_1 )} happyReduce_424 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_424 = happyReduce 6# 123# happyReduction_424 happyReduction_424 (happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut135 happy_x_3 of { happy_var_3 -> case happyOut135 happy_x_5 of { happy_var_5 -> happyIn133 (LambdaHole happy_var_3 happy_var_5 ) `HappyStk` happyRest}} happyReduce_425 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_425 = happyReduce 6# 123# happyReduction_425 happyReduction_425 (happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_3 of { (TokSymbol SymUnderscore happy_var_3) -> case happyOut135 happy_x_5 of { happy_var_5 -> happyIn133 (LambdaHole (Ranged (getRange happy_var_3) "_") happy_var_5 ) `HappyStk` happyRest}} happyReduce_426 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_426 = happySpecReduce_1 124# happyReduction_426 happyReduction_426 happy_x_1 = case happyOut135 happy_x_1 of { happy_var_1 -> happyIn134 (ExprHole happy_var_1 )} happyReduce_427 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_427 = happyReduce 4# 124# happyReduction_427 happyReduction_427 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut135 happy_x_2 of { happy_var_2 -> case happyOut135 happy_x_4 of { happy_var_4 -> happyIn134 (LambdaHole happy_var_2 happy_var_4 ) `HappyStk` happyRest}} happyReduce_428 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_428 = happyReduce 4# 124# happyReduction_428 happyReduction_428 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_3 of { (TokSymbol SymArrow happy_var_3) -> case happyOut135 happy_x_4 of { happy_var_4 -> happyIn134 (LambdaHole (Ranged (getRange happy_var_3) "_") happy_var_4 ) `HappyStk` happyRest}} happyReduce_429 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_429 = happySpecReduce_1 125# happyReduction_429 happyReduction_429 happy_x_1 = case happyOutTok happy_x_1 of { (TokId happy_var_1) -> happyIn135 (Ranged (getRange $ fst happy_var_1) (stringToRawName $ snd happy_var_1) )} happyReduce_430 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_430 = happySpecReduce_1 126# happyReduction_430 happyReduction_430 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) -> happyIn136 (Just (getRange happy_var_1) )} happyReduce_431 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_431 = happySpecReduce_0 126# happyReduction_431 happyReduction_431 = happyIn136 (Nothing ) happyReduce_432 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_432 = happyMonadReduce 5# 127# happyReduction_432 happyReduction_432 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut136 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokKeyword KwImport happy_var_2) -> case happyOut30 happy_x_3 of { happy_var_3 -> case happyOut138 happy_x_4 of { happy_var_4 -> case happyOut88 happy_x_5 of { happy_var_5 -> ( let { doOpen = maybe DontOpen (const DoOpen) happy_var_1 ; m = happy_var_3 ; es = happy_var_4 ; dir = happy_var_5 ; r = getRange (happy_var_1, happy_var_2, m, es, dir) ; mr = getRange m ; unique = hashString $ prettyShow $ (Strict.Nothing :: Strict.Maybe ()) <$ r -- turn range into unique id, but delete file path -- which is absolute and messes up suite of failing tests -- (different hashs on different installations) -- TODO: Don't use (insecure) hashes in this way. ; fresh = Name mr NotInScope [ Id $ stringToRawName $ ".#" ++ prettyShow m ++ "-" ++ show unique ] ; fresh' = Name mr NotInScope [ Id $ stringToRawName $ ".#" ++ prettyShow m ++ "-" ++ show (unique + 1) ] ; impStm asR = Import r m (Just (AsName (Right fresh) asR)) DontOpen defaultImportDir ; appStm m' es = Private r Inserted [ ModuleMacro r m' (SectionApp (getRange es) [] (RawApp (getRange es) (Ident (QName fresh) : es))) doOpen dir ] ; (initArgs, last2Args) = splitAt (length es - 2) es ; parseAsClause = case last2Args of { [ Ident (QName (Name asR InScope [Id x])) , e -- Andreas, 2018-11-03, issue #3364, accept anything after 'as' -- but require it to be a 'Name' in the scope checker. ] | rawNameToString x == "as" -> Just . (asR,) $ if | Ident (QName m') <- e -> Right m' | otherwise -> Left e ; _ -> Nothing } } in case es of { [] -> return [Import r m Nothing doOpen dir] ; _ | Just (asR, m') <- parseAsClause -> if null initArgs then return [ Import (getRange (m, asR, m', dir)) m (Just (AsName m' asR)) doOpen dir ] else return [ impStm asR, appStm (fromRight (const fresh') m') initArgs ] -- Andreas, 2017-05-13, issue #2579 -- Nisse reports that importing with instantation but without open -- could be usefule for bringing instances into scope. -- Ulf, 2018-12-6: Not since fixes of #1913 and #2489 which require -- instances to be in scope. | DontOpen <- doOpen -> parseErrorRange happy_var_2 "An import statement with module instantiation is useless without either an `open' keyword or an `as` binding giving a name to the instantiated module." | otherwise -> return [ impStm noRange , appStm (noName $ beginningOf $ getRange m) es ] })}}}}}) ) (\r -> happyReturn (happyIn137 r)) happyReduce_433 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_433 = happyReduce 4# 127# happyReduction_433 happyReduction_433 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) -> case happyOut30 happy_x_2 of { happy_var_2 -> case happyOut138 happy_x_3 of { happy_var_3 -> case happyOut88 happy_x_4 of { happy_var_4 -> happyIn137 (let { m = happy_var_2 ; es = happy_var_3 ; dir = happy_var_4 ; r = getRange (happy_var_1, m, es, dir) } in [ case es of { [] -> Open r m dir ; _ -> Private r Inserted [ ModuleMacro r (noName $ beginningOf $ getRange m) (SectionApp (getRange (m , es)) [] (RawApp (fuseRange m es) (Ident m : es))) DoOpen dir ] } ] ) `HappyStk` happyRest}}}} happyReduce_434 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_434 = happyReduce 6# 127# happyReduction_434 happyReduction_434 (happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut30 happy_x_2 of { happy_var_2 -> case happyOut88 happy_x_6 of { happy_var_6 -> happyIn137 (let r = getRange happy_var_2 in [ Private r Inserted [ ModuleMacro r (noName $ beginningOf $ getRange happy_var_2) (RecordModuleInstance r happy_var_2) DoOpen happy_var_6 ] ] ) `HappyStk` happyRest}} happyReduce_435 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_435 = happySpecReduce_0 128# happyReduction_435 happyReduction_435 = happyIn138 ([] ) happyReduce_436 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_436 = happySpecReduce_2 128# happyReduction_436 happyReduction_436 happy_x_2 happy_x_1 = case happyOut55 happy_x_1 of { happy_var_1 -> case happyOut138 happy_x_2 of { happy_var_2 -> happyIn138 (happy_var_1 : happy_var_2 )}} happyReduce_437 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_437 = happyReduce 4# 129# happyReduction_437 happyReduction_437 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOut30 happy_x_1 of { happy_var_1 -> case happyOutTok happy_x_2 of { (TokSymbol SymDoubleOpenBrace happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymEllipsis happy_var_3) -> case happyOut21 happy_x_4 of { happy_var_4 -> happyIn139 ((\ts -> if null ts then return $ RecordModuleInstance (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_1 else parseError "No bindings allowed for record module with non-canonical implicits" ) ) `HappyStk` happyRest}}}} happyReduce_438 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_438 = happySpecReduce_2 129# happyReduction_438 happyReduction_438 happy_x_2 happy_x_1 = case happyOut30 happy_x_1 of { happy_var_1 -> case happyOut138 happy_x_2 of { happy_var_2 -> happyIn139 ((\ts -> return $ SectionApp (getRange (happy_var_1, happy_var_2)) ts (RawApp (fuseRange happy_var_1 happy_var_2) (Ident happy_var_1 : happy_var_2)) ) )}} happyReduce_439 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_439 = happyMonadReduce 6# 130# happyReduction_439 happyReduction_439 (happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) -> case happyOut30 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOut139 happy_x_5 of { happy_var_5 -> case happyOut88 happy_x_6 of { happy_var_6 -> ( do { ma <- happy_var_5 (map addType happy_var_3) ; name <- ensureUnqual happy_var_2 ; return $ ModuleMacro (getRange (happy_var_1, happy_var_2, ma, happy_var_6)) name ma DontOpen happy_var_6 })}}}}}) ) (\r -> happyReturn (happyIn140 r)) happyReduce_440 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_440 = happyMonadReduce 7# 130# happyReduction_440 happyReduction_440 (happy_x_7 `HappyStk` happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwModule happy_var_2) -> case happyOut19 happy_x_3 of { happy_var_3 -> case happyOut82 happy_x_4 of { happy_var_4 -> case happyOut139 happy_x_6 of { happy_var_6 -> case happyOut88 happy_x_7 of { happy_var_7 -> ( do {ma <- happy_var_6 (map addType happy_var_4); return $ ModuleMacro (getRange (happy_var_1, happy_var_2, happy_var_3, ma, happy_var_7)) happy_var_3 ma DoOpen happy_var_7 })}}}}}}) ) (\r -> happyReturn (happyIn140 r)) happyReduce_441 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_441 = happyReduce 5# 131# happyReduction_441 happyReduction_441 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) -> case happyOut30 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokKeyword KwWhere happy_var_4) -> case happyOut182 happy_x_5 of { happy_var_5 -> happyIn141 (Module (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) happy_var_2 (map addType happy_var_3) happy_var_5 ) `HappyStk` happyRest}}}}} happyReduce_442 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_442 = happyReduce 5# 131# happyReduction_442 happyReduction_442 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) -> case happyOut142 happy_x_2 of { happy_var_2 -> case happyOut82 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokKeyword KwWhere happy_var_4) -> case happyOut182 happy_x_5 of { happy_var_5 -> happyIn141 (Module (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) (QName happy_var_2) (map addType happy_var_3) happy_var_5 ) `HappyStk` happyRest}}}}} happyReduce_443 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_443 = happySpecReduce_1 132# happyReduction_443 happyReduction_443 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymUnderscore happy_var_1) -> happyIn142 (noName (getRange happy_var_1) )} happyReduce_444 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_444 = happySpecReduce_1 133# happyReduction_444 happyReduction_444 happy_x_1 = case happyOut184 happy_x_1 of { happy_var_1 -> happyIn143 (figureOutTopLevelModule happy_var_1 )} happyReduce_445 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_445 = happySpecReduce_1 134# happyReduction_445 happyReduction_445 happy_x_1 = case happyOut145 happy_x_1 of { happy_var_1 -> happyIn144 (Pragma happy_var_1 )} happyReduce_446 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_446 = happySpecReduce_1 135# happyReduction_446 happyReduction_446 happy_x_1 = case happyOut147 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_447 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_447 = happySpecReduce_1 135# happyReduction_447 happyReduction_447 happy_x_1 = case happyOut148 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_448 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_448 = happySpecReduce_1 135# happyReduction_448 happyReduction_448 happy_x_1 = case happyOut150 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_449 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_449 = happySpecReduce_1 135# happyReduction_449 happyReduction_449 happy_x_1 = case happyOut149 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_450 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_450 = happySpecReduce_1 135# happyReduction_450 happyReduction_450 happy_x_1 = case happyOut151 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_451 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_451 = happySpecReduce_1 135# happyReduction_451 happyReduction_451 happy_x_1 = case happyOut154 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_452 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_452 = happySpecReduce_1 135# happyReduction_452 happyReduction_452 happy_x_1 = case happyOut152 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_453 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_453 = happySpecReduce_1 135# happyReduction_453 happyReduction_453 happy_x_1 = case happyOut153 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_454 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_454 = happySpecReduce_1 135# happyReduction_454 happyReduction_454 happy_x_1 = case happyOut162 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_455 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_455 = happySpecReduce_1 135# happyReduction_455 happyReduction_455 happy_x_1 = case happyOut159 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_456 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_456 = happySpecReduce_1 135# happyReduction_456 happyReduction_456 happy_x_1 = case happyOut158 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_457 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_457 = happySpecReduce_1 135# happyReduction_457 happyReduction_457 happy_x_1 = case happyOut157 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_458 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_458 = happySpecReduce_1 135# happyReduction_458 happyReduction_458 happy_x_1 = case happyOut166 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_459 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_459 = happySpecReduce_1 135# happyReduction_459 happyReduction_459 happy_x_1 = case happyOut160 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_460 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_460 = happySpecReduce_1 135# happyReduction_460 happyReduction_460 happy_x_1 = case happyOut161 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_461 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_461 = happySpecReduce_1 135# happyReduction_461 happyReduction_461 happy_x_1 = case happyOut155 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_462 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_462 = happySpecReduce_1 135# happyReduction_462 happyReduction_462 happy_x_1 = case happyOut156 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_463 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_463 = happySpecReduce_1 135# happyReduction_463 happyReduction_463 happy_x_1 = case happyOut163 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_464 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_464 = happySpecReduce_1 135# happyReduction_464 happyReduction_464 happy_x_1 = case happyOut164 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_465 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_465 = happySpecReduce_1 135# happyReduction_465 happyReduction_465 happy_x_1 = case happyOut165 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_466 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_466 = happySpecReduce_1 135# happyReduction_466 happyReduction_466 happy_x_1 = case happyOut146 happy_x_1 of { happy_var_1 -> happyIn145 (happy_var_1 )} happyReduce_467 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_467 = happyReduce 4# 136# happyReduction_467 happyReduction_467 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwOPTIONS happy_var_2) -> case happyOut36 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn146 (OptionsPragma (getRange (happy_var_1,happy_var_2,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_468 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_468 = happyReduce 5# 137# happyReduction_468 happyReduction_468 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwBUILTIN happy_var_2) -> case happyOutTok happy_x_3 of { (TokString happy_var_3) -> case happyOut41 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> happyIn147 (BuiltinPragma (getRange (happy_var_1,happy_var_2,fst happy_var_3,happy_var_4,happy_var_5)) (snd happy_var_3) happy_var_4 ) `HappyStk` happyRest}}}}} happyReduce_469 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_469 = happyReduce 5# 137# happyReduction_469 happyReduction_469 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwBUILTIN happy_var_2) -> case happyOutTok happy_x_3 of { (TokKeyword KwREWRITE happy_var_3) -> case happyOut41 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> happyIn147 (BuiltinPragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4,happy_var_5)) "REWRITE" happy_var_4 ) `HappyStk` happyRest}}}}} happyReduce_470 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_470 = happyReduce 4# 138# happyReduction_470 happyReduction_470 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwREWRITE happy_var_2) -> case happyOut42 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn148 (RewritePragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_471 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_471 = happyReduce 5# 139# happyReduction_471 happyReduction_471 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwFOREIGN happy_var_2) -> case happyOutTok happy_x_3 of { (TokString happy_var_3) -> case happyOut39 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> happyIn149 (ForeignPragma (getRange (happy_var_1, happy_var_2, fst happy_var_3, happy_var_5)) (snd happy_var_3) (recoverLayout happy_var_4) ) `HappyStk` happyRest}}}}} happyReduce_472 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_472 = happyReduce 6# 140# happyReduction_472 happyReduction_472 (happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwCOMPILE happy_var_2) -> case happyOutTok happy_x_3 of { (TokString happy_var_3) -> case happyOut41 happy_x_4 of { happy_var_4 -> case happyOut36 happy_x_5 of { happy_var_5 -> case happyOutTok happy_x_6 of { (TokSymbol SymClosePragma happy_var_6) -> happyIn150 (CompilePragma (getRange (happy_var_1,happy_var_2,fst happy_var_3,happy_var_4,happy_var_6)) (snd happy_var_3) happy_var_4 (unwords happy_var_5) ) `HappyStk` happyRest}}}}}} happyReduce_473 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_473 = happyReduce 4# 141# happyReduction_473 happyReduction_473 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwSTATIC happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn151 (StaticPragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_474 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_474 = happyReduce 4# 142# happyReduction_474 happyReduction_474 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwINLINE happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn152 (InlinePragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) True happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_475 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_475 = happyReduce 4# 143# happyReduction_475 happyReduction_475 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwNOINLINE happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn153 (InlinePragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) False happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_476 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_476 = happyReduce 4# 144# happyReduction_476 happyReduction_476 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwINJECTIVE happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn154 (InjectivePragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_477 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_477 = happyMonadReduce 5# 145# happyReduction_477 happyReduction_477 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_3 of { (TokString happy_var_3) -> case happyOut36 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> ( let (r, s) = happy_var_3 in parseDisplayPragma (fuseRange happy_var_1 happy_var_5) (iStart r) (unwords (s : happy_var_4)))}}}}) ) (\r -> happyReturn (happyIn155 r)) happyReduce_478 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_478 = happyReduce 4# 146# happyReduction_478 happyReduction_478 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwETA happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn156 (EtaPragma (getRange (happy_var_1,happy_var_2,happy_var_3,happy_var_4)) happy_var_3 ) `HappyStk` happyRest}}}} happyReduce_479 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_479 = happySpecReduce_3 147# happyReduction_479 happyReduction_479 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwNO_TERMINATION_CHECK happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn157 (TerminationCheckPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) NoTerminationCheck )}}} happyReduce_480 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_480 = happySpecReduce_3 148# happyReduction_480 happyReduction_480 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwNON_TERMINATING happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn158 (TerminationCheckPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) NonTerminating )}}} happyReduce_481 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_481 = happySpecReduce_3 149# happyReduction_481 happyReduction_481 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwTERMINATING happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn159 (TerminationCheckPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) Terminating )}}} happyReduce_482 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_482 = happyReduce 4# 150# happyReduction_482 happyReduction_482 (happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwMEASURE happy_var_2) -> case happyOut40 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokSymbol SymClosePragma happy_var_4) -> happyIn160 (let r = getRange (happy_var_1, happy_var_2, happy_var_3, happy_var_4) in TerminationCheckPragma r (TerminationMeasure r happy_var_3) ) `HappyStk` happyRest}}}} happyReduce_483 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_483 = happySpecReduce_3 151# happyReduction_483 happyReduction_483 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwCATCHALL happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn161 (CatchallPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) )}}} happyReduce_484 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_484 = happySpecReduce_3 152# happyReduction_484 happyReduction_484 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwIMPOSSIBLE happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn162 (ImpossiblePragma (getRange (happy_var_1,happy_var_2,happy_var_3)) )}}} happyReduce_485 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_485 = happySpecReduce_3 153# happyReduction_485 happyReduction_485 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwNO_POSITIVITY_CHECK happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn163 (NoPositivityCheckPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) )}}} happyReduce_486 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_486 = happySpecReduce_3 154# happyReduction_486 happyReduction_486 happy_x_3 happy_x_2 happy_x_1 = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwNO_UNIVERSE_CHECK happy_var_2) -> case happyOutTok happy_x_3 of { (TokSymbol SymClosePragma happy_var_3) -> happyIn164 (NoUniverseCheckPragma (getRange (happy_var_1,happy_var_2,happy_var_3)) )}}} happyReduce_487 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_487 = happyReduce 5# 155# happyReduction_487 happyReduction_487 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) = case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwPOLARITY happy_var_2) -> case happyOut40 happy_x_3 of { happy_var_3 -> case happyOut167 happy_x_4 of { happy_var_4 -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> happyIn165 (let (rs, occs) = unzip (reverse happy_var_4) in PolarityPragma (getRange (happy_var_1,happy_var_2,happy_var_3,rs,happy_var_5)) happy_var_3 occs ) `HappyStk` happyRest}}}}} happyReduce_488 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_488 = happyMonadReduce 5# 156# happyReduction_488 happyReduction_488 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokSymbol SymOpenPragma happy_var_1) -> case happyOutTok happy_x_2 of { (TokKeyword KwWARNING_ON_USAGE happy_var_2) -> case happyOut41 happy_x_3 of { happy_var_3 -> case happyOutTok happy_x_4 of { (TokLiteral happy_var_4) -> case happyOutTok happy_x_5 of { (TokSymbol SymClosePragma happy_var_5) -> ( case happy_var_4 of { LitString r str -> return $ WarningOnUsage (getRange (happy_var_1,happy_var_2,happy_var_3,r,happy_var_5)) happy_var_3 str ; _ -> parseError "Expected string literal" })}}}}}) ) (\r -> happyReturn (happyIn166 r)) happyReduce_489 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_489 = happySpecReduce_0 157# happyReduction_489 happyReduction_489 = happyIn167 ([] ) happyReduce_490 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_490 = happySpecReduce_2 157# happyReduction_490 happyReduction_490 happy_x_2 happy_x_1 = case happyOut167 happy_x_1 of { happy_var_1 -> case happyOut168 happy_x_2 of { happy_var_2 -> happyIn167 (happy_var_2 : happy_var_1 )}} happyReduce_491 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_491 = happyMonadReduce 1# 158# happyReduction_491 happyReduction_491 (happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOutTok happy_x_1 of { (TokString happy_var_1) -> ( polarity happy_var_1)}) ) (\r -> happyReturn (happyIn168 r)) happyReduce_492 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_492 = happySpecReduce_2 159# happyReduction_492 happyReduction_492 happy_x_2 happy_x_1 = happyIn169 ([] ) happyReduce_493 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_493 = happySpecReduce_1 159# happyReduction_493 happyReduction_493 happy_x_1 = case happyOut170 happy_x_1 of { happy_var_1 -> happyIn169 (happy_var_1 )} happyReduce_494 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_494 = happySpecReduce_3 160# happyReduction_494 happyReduction_494 happy_x_3 happy_x_2 happy_x_1 = case happyOut171 happy_x_2 of { happy_var_2 -> happyIn170 (reverse happy_var_2 )} happyReduce_495 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_495 = happySpecReduce_3 161# happyReduction_495 happyReduction_495 happy_x_3 happy_x_2 happy_x_1 = case happyOut171 happy_x_1 of { happy_var_1 -> case happyOut107 happy_x_3 of { happy_var_3 -> happyIn171 (reverse happy_var_3 ++ happy_var_1 )}} happyReduce_496 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_496 = happySpecReduce_1 161# happyReduction_496 happyReduction_496 happy_x_1 = case happyOut107 happy_x_1 of { happy_var_1 -> happyIn171 (reverse happy_var_1 )} happyReduce_497 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_497 = happySpecReduce_3 162# happyReduction_497 happyReduction_497 happy_x_3 happy_x_2 happy_x_1 = case happyOut173 happy_x_2 of { happy_var_2 -> happyIn172 (reverse happy_var_2 )} happyReduce_498 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_498 = happySpecReduce_3 163# happyReduction_498 happyReduction_498 happy_x_3 happy_x_2 happy_x_1 = case happyOut173 happy_x_1 of { happy_var_1 -> case happyOut108 happy_x_3 of { happy_var_3 -> happyIn173 (reverse happy_var_3 ++ happy_var_1 )}} happyReduce_499 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_499 = happySpecReduce_1 163# happyReduction_499 happyReduction_499 happy_x_1 = case happyOut108 happy_x_1 of { happy_var_1 -> happyIn173 (reverse happy_var_1 )} happyReduce_500 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_500 = happySpecReduce_3 164# happyReduction_500 happyReduction_500 happy_x_3 happy_x_2 happy_x_1 = case happyOut175 happy_x_2 of { happy_var_2 -> happyIn174 (reverse happy_var_2 )} happyReduce_501 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_501 = happySpecReduce_3 165# happyReduction_501 happyReduction_501 happy_x_3 happy_x_2 happy_x_1 = case happyOut175 happy_x_1 of { happy_var_1 -> case happyOut108 happy_x_3 of { happy_var_3 -> happyIn175 (reverse happy_var_3 ++ happy_var_1 )}} happyReduce_502 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_502 = happySpecReduce_1 165# happyReduction_502 happyReduction_502 happy_x_1 = case happyOut108 happy_x_1 of { happy_var_1 -> happyIn175 (reverse happy_var_1 )} happyReduce_503 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_503 = happySpecReduce_0 165# happyReduction_503 happyReduction_503 = happyIn175 ([] ) happyReduce_504 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_504 = happyMonadReduce 3# 166# happyReduction_504 happyReduction_504 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut177 happy_x_2 of { happy_var_2 -> ( ((,) `fmap` verifyRecordDirectives happy_var_2 <*> pure []))}) ) (\r -> happyReturn (happyIn176 r)) happyReduce_505 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_505 = happyMonadReduce 5# 166# happyReduction_505 happyReduction_505 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut177 happy_x_2 of { happy_var_2 -> case happyOut183 happy_x_4 of { happy_var_4 -> ( ((,) `fmap` verifyRecordDirectives happy_var_2 <*> pure happy_var_4))}}) ) (\r -> happyReturn (happyIn176 r)) happyReduce_506 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_506 = happyMonadReduce 3# 166# happyReduction_506 happyReduction_506 (happy_x_3 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut183 happy_x_2 of { happy_var_2 -> ( ((,) `fmap` verifyRecordDirectives [] <*> pure happy_var_2))}) ) (\r -> happyReturn (happyIn176 r)) happyReduce_507 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_507 = happySpecReduce_0 167# happyReduction_507 happyReduction_507 = happyIn177 ([] ) happyReduce_508 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_508 = happySpecReduce_3 167# happyReduction_508 happyReduction_508 happy_x_3 happy_x_2 happy_x_1 = case happyOut177 happy_x_1 of { happy_var_1 -> case happyOut178 happy_x_3 of { happy_var_3 -> happyIn177 (happy_var_3 : happy_var_1 )}} happyReduce_509 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_509 = happySpecReduce_1 167# happyReduction_509 happyReduction_509 happy_x_1 = case happyOut178 happy_x_1 of { happy_var_1 -> happyIn177 ([happy_var_1] )} happyReduce_510 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_510 = happySpecReduce_1 168# happyReduction_510 happyReduction_510 happy_x_1 = case happyOut115 happy_x_1 of { happy_var_1 -> happyIn178 (Constructor happy_var_1 )} happyReduce_511 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_511 = happySpecReduce_1 168# happyReduction_511 happyReduction_511 happy_x_1 = case happyOut180 happy_x_1 of { happy_var_1 -> happyIn178 (Induction happy_var_1 )} happyReduce_512 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_512 = happySpecReduce_1 168# happyReduction_512 happyReduction_512 happy_x_1 = case happyOut179 happy_x_1 of { happy_var_1 -> happyIn178 (Eta happy_var_1 )} happyReduce_513 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_513 = happySpecReduce_1 169# happyReduction_513 happyReduction_513 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwEta happy_var_1) -> happyIn179 (Ranged (getRange happy_var_1) YesEta )} happyReduce_514 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_514 = happySpecReduce_1 169# happyReduction_514 happyReduction_514 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwNoEta happy_var_1) -> happyIn179 (Ranged (getRange happy_var_1) NoEta )} happyReduce_515 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_515 = happySpecReduce_1 170# happyReduction_515 happyReduction_515 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwInductive happy_var_1) -> happyIn180 (Ranged (getRange happy_var_1) Inductive )} happyReduce_516 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_516 = happySpecReduce_1 170# happyReduction_516 happyReduction_516 happy_x_1 = case happyOutTok happy_x_1 of { (TokKeyword KwCoInductive happy_var_1) -> happyIn180 (Ranged (getRange happy_var_1) CoInductive )} happyReduce_517 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_517 = happySpecReduce_3 171# happyReduction_517 happyReduction_517 happy_x_3 happy_x_2 happy_x_1 = case happyOut183 happy_x_2 of { happy_var_2 -> happyIn181 (happy_var_2 )} happyReduce_518 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_518 = happySpecReduce_2 172# happyReduction_518 happyReduction_518 happy_x_2 happy_x_1 = happyIn182 ([] ) happyReduce_519 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_519 = happySpecReduce_1 172# happyReduction_519 happyReduction_519 happy_x_1 = case happyOut181 happy_x_1 of { happy_var_1 -> happyIn182 (happy_var_1 )} happyReduce_520 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_520 = happySpecReduce_3 173# happyReduction_520 happyReduction_520 happy_x_3 happy_x_2 happy_x_1 = case happyOut106 happy_x_1 of { happy_var_1 -> case happyOut183 happy_x_3 of { happy_var_3 -> happyIn183 (happy_var_1 ++ happy_var_3 )}} happyReduce_521 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_521 = happySpecReduce_2 173# happyReduction_521 happyReduction_521 happy_x_2 happy_x_1 = case happyOut106 happy_x_1 of { happy_var_1 -> happyIn183 (happy_var_1 )} happyReduce_522 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_522 = happySpecReduce_1 173# happyReduction_522 happyReduction_522 happy_x_1 = case happyOut106 happy_x_1 of { happy_var_1 -> happyIn183 (happy_var_1 )} happyReduce_523 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_523 = happySpecReduce_0 174# happyReduction_523 happyReduction_523 = happyIn184 ([] ) happyReduce_524 :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduce_524 = happySpecReduce_1 174# happyReduction_524 happyReduction_524 happy_x_1 = case happyOut183 happy_x_1 of { happy_var_1 -> happyIn184 (happy_var_1 )} happyNewToken action sts stk = lexer(\tk -> let cont i = happyDoAction i tk action sts stk in case tk of { TokEOF{} -> happyDoAction 103# tk action sts stk; TokKeyword KwAbstract happy_dollar_dollar -> cont 1#; TokKeyword KwCoData happy_dollar_dollar -> cont 2#; TokKeyword KwCoInductive happy_dollar_dollar -> cont 3#; TokKeyword KwConstructor happy_dollar_dollar -> cont 4#; TokKeyword KwData happy_dollar_dollar -> cont 5#; TokKeyword KwEta happy_dollar_dollar -> cont 6#; TokKeyword KwField happy_dollar_dollar -> cont 7#; TokKeyword KwForall happy_dollar_dollar -> cont 8#; TokKeyword KwVariable happy_dollar_dollar -> cont 9#; TokKeyword KwHiding happy_dollar_dollar -> cont 10#; TokKeyword KwImport happy_dollar_dollar -> cont 11#; TokKeyword KwIn happy_dollar_dollar -> cont 12#; TokKeyword KwInductive happy_dollar_dollar -> cont 13#; TokKeyword KwInfix happy_dollar_dollar -> cont 14#; TokKeyword KwInfixL happy_dollar_dollar -> cont 15#; TokKeyword KwInfixR happy_dollar_dollar -> cont 16#; TokKeyword KwInstance happy_dollar_dollar -> cont 17#; TokKeyword KwOverlap happy_dollar_dollar -> cont 18#; TokKeyword KwLet happy_dollar_dollar -> cont 19#; TokKeyword KwMacro happy_dollar_dollar -> cont 20#; TokKeyword KwModule happy_dollar_dollar -> cont 21#; TokKeyword KwMutual happy_dollar_dollar -> cont 22#; TokKeyword KwNoEta happy_dollar_dollar -> cont 23#; TokKeyword KwOpen happy_dollar_dollar -> cont 24#; TokKeyword KwPatternSyn happy_dollar_dollar -> cont 25#; TokKeyword KwPostulate happy_dollar_dollar -> cont 26#; TokKeyword KwPrimitive happy_dollar_dollar -> cont 27#; TokKeyword KwPrivate happy_dollar_dollar -> cont 28#; TokKeyword KwProp happy_dollar_dollar -> cont 29#; TokKeyword KwPublic happy_dollar_dollar -> cont 30#; TokKeyword KwQuote happy_dollar_dollar -> cont 31#; TokKeyword KwQuoteContext happy_dollar_dollar -> cont 32#; TokKeyword KwQuoteGoal happy_dollar_dollar -> cont 33#; TokKeyword KwQuoteTerm happy_dollar_dollar -> cont 34#; TokKeyword KwRecord happy_dollar_dollar -> cont 35#; TokKeyword KwRenaming happy_dollar_dollar -> cont 36#; TokKeyword KwRewrite happy_dollar_dollar -> cont 37#; TokKeyword KwSet happy_dollar_dollar -> cont 38#; TokKeyword KwSyntax happy_dollar_dollar -> cont 39#; TokKeyword KwTactic happy_dollar_dollar -> cont 40#; TokKeyword KwTo happy_dollar_dollar -> cont 41#; TokKeyword KwUnquote happy_dollar_dollar -> cont 42#; TokKeyword KwUnquoteDecl happy_dollar_dollar -> cont 43#; TokKeyword KwUnquoteDef happy_dollar_dollar -> cont 44#; TokKeyword KwUsing happy_dollar_dollar -> cont 45#; TokKeyword KwWhere happy_dollar_dollar -> cont 46#; TokKeyword KwDo happy_dollar_dollar -> cont 47#; TokKeyword KwWith happy_dollar_dollar -> cont 48#; TokKeyword KwBUILTIN happy_dollar_dollar -> cont 49#; TokKeyword KwCATCHALL happy_dollar_dollar -> cont 50#; TokKeyword KwDISPLAY happy_dollar_dollar -> cont 51#; TokKeyword KwETA happy_dollar_dollar -> cont 52#; TokKeyword KwFOREIGN happy_dollar_dollar -> cont 53#; TokKeyword KwCOMPILE happy_dollar_dollar -> cont 54#; TokKeyword KwIMPOSSIBLE happy_dollar_dollar -> cont 55#; TokKeyword KwINJECTIVE happy_dollar_dollar -> cont 56#; TokKeyword KwINLINE happy_dollar_dollar -> cont 57#; TokKeyword KwNOINLINE happy_dollar_dollar -> cont 58#; TokKeyword KwMEASURE happy_dollar_dollar -> cont 59#; TokKeyword KwNO_TERMINATION_CHECK happy_dollar_dollar -> cont 60#; TokKeyword KwNO_POSITIVITY_CHECK happy_dollar_dollar -> cont 61#; TokKeyword KwNO_UNIVERSE_CHECK happy_dollar_dollar -> cont 62#; TokKeyword KwNON_TERMINATING happy_dollar_dollar -> cont 63#; TokKeyword KwOPTIONS happy_dollar_dollar -> cont 64#; TokKeyword KwPOLARITY happy_dollar_dollar -> cont 65#; TokKeyword KwWARNING_ON_USAGE happy_dollar_dollar -> cont 66#; TokKeyword KwREWRITE happy_dollar_dollar -> cont 67#; TokKeyword KwSTATIC happy_dollar_dollar -> cont 68#; TokKeyword KwTERMINATING happy_dollar_dollar -> cont 69#; TokSetN happy_dollar_dollar -> cont 70#; TokPropN happy_dollar_dollar -> cont 71#; TokTeX happy_dollar_dollar -> cont 72#; TokComment happy_dollar_dollar -> cont 73#; TokSymbol SymEllipsis happy_dollar_dollar -> cont 74#; TokSymbol SymDotDot happy_dollar_dollar -> cont 75#; TokSymbol SymDot happy_dollar_dollar -> cont 76#; TokSymbol SymSemi happy_dollar_dollar -> cont 77#; TokSymbol SymColon happy_dollar_dollar -> cont 78#; TokSymbol SymEqual happy_dollar_dollar -> cont 79#; TokSymbol SymUnderscore happy_dollar_dollar -> cont 80#; TokSymbol SymQuestionMark happy_dollar_dollar -> cont 81#; TokSymbol SymArrow happy_dollar_dollar -> cont 82#; TokSymbol SymLambda happy_dollar_dollar -> cont 83#; TokSymbol SymAs happy_dollar_dollar -> cont 84#; TokSymbol SymBar happy_dollar_dollar -> cont 85#; TokSymbol SymOpenParen happy_dollar_dollar -> cont 86#; TokSymbol SymCloseParen happy_dollar_dollar -> cont 87#; TokSymbol SymOpenIdiomBracket happy_dollar_dollar -> cont 88#; TokSymbol SymCloseIdiomBracket happy_dollar_dollar -> cont 89#; TokSymbol SymDoubleOpenBrace happy_dollar_dollar -> cont 90#; TokSymbol SymDoubleCloseBrace happy_dollar_dollar -> cont 91#; TokSymbol SymOpenBrace happy_dollar_dollar -> cont 92#; TokSymbol SymCloseBrace happy_dollar_dollar -> cont 93#; TokSymbol SymOpenVirtualBrace happy_dollar_dollar -> cont 94#; TokSymbol SymCloseVirtualBrace happy_dollar_dollar -> cont 95#; TokSymbol SymVirtualSemi happy_dollar_dollar -> cont 96#; TokSymbol SymOpenPragma happy_dollar_dollar -> cont 97#; TokSymbol SymClosePragma happy_dollar_dollar -> cont 98#; TokId happy_dollar_dollar -> cont 99#; TokQId happy_dollar_dollar -> cont 100#; TokString happy_dollar_dollar -> cont 101#; TokLiteral happy_dollar_dollar -> cont 102#; _ -> happyError' (tk, []) }) happyError_ explist 103# tk = happyError' (tk, explist) happyError_ explist _ tk = happyError' (tk, explist) happyThen :: () => Parser a -> (a -> Parser b) -> Parser b happyThen = (>>=) happyReturn :: () => a -> Parser a happyReturn = (return) happyParse :: () => Happy_GHC_Exts.Int# -> Parser (HappyAbsSyn ) happyNewToken :: () => Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyDoAction :: () => Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn ) happyReduceArr :: () => Happy_Data_Array.Array Int (Happy_GHC_Exts.Int# -> Token -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> Parser (HappyAbsSyn )) happyThen1 :: () => Parser a -> (a -> Parser b) -> Parser b happyThen1 = happyThen happyReturn1 :: () => a -> Parser a happyReturn1 = happyReturn happyError' :: () => ((Token), [String]) -> Parser a happyError' tk = (\(tokens, explist) -> happyError) tk tokensParser = happySomeParser where happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut10 x)) exprParser = happySomeParser where happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (happyOut43 x)) exprWhereParser = happySomeParser where happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (happyOut105 x)) moduleParser = happySomeParser where happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (happyOut13 x)) moduleNameParser = happySomeParser where happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (happyOut30 x)) funclauseParser = happySomeParser where happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (happyOut109 x)) holeContentParser = happySomeParser where happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (happyOut103 x)) happySeq = happyDontSeq {-------------------------------------------------------------------------- Parsers --------------------------------------------------------------------------} -- | Parse the token stream. Used by the TeX compiler. tokensParser :: Parser [Token] -- | Parse an expression. Could be used in interactions. exprParser :: Parser Expr -- | Parse an expression followed by a where clause. Could be used in interactions. exprWhereParser :: Parser ExprWhere -- | Parse a module. moduleParser :: Parser Module {-------------------------------------------------------------------------- Happy stuff --------------------------------------------------------------------------} -- | Required by Happy. happyError :: Parser a happyError = parseError "Parse error" {-------------------------------------------------------------------------- Utility functions --------------------------------------------------------------------------} -- | Grab leading OPTIONS pragmas. takeOptionsPragmas :: [Declaration] -> ([Pragma], [Declaration]) takeOptionsPragmas = spanJust $ \ d -> case d of Pragma p@OptionsPragma{} -> Just p _ -> Nothing -- | Insert a top-level module if there is none. -- Also fix-up for the case the declarations in the top-level module -- are not indented (this is allowed as a special case). figureOutTopLevelModule :: [Declaration] -> [Declaration] figureOutTopLevelModule ds = case spanAllowedBeforeModule ds of -- Andreas 2016-02-01, issue #1388. -- We need to distinguish two additional cases. -- Case 1: Regular file layout: imports followed by one module. Nothing to do. (ds0, [ Module{} ]) -> ds -- Case 2: The declarations in the module are not indented. -- This is allowed for the top level module, and thus rectified here. (ds0, Module r m tel [] : ds2) -> ds0 ++ [Module r m tel ds2] -- Case 3: There is a module with indented declarations, -- followed by non-indented declarations. This should be a -- parse error and be reported later (see @toAbstract TopLevel{}@), -- thus, we do not do anything here. (ds0, Module r m tel ds1 : ds2) -> ds -- Gives parse error in scope checker. -- OLD code causing issue 1388: -- (ds0, Module r m tel ds1 : ds2) -> ds0 ++ [Module r m tel $ ds1 ++ ds2] -- Case 4: a top-level module declaration is missing. -- Andreas, 2017-01-01, issue #2229: -- Put everything (except OPTIONS pragmas) into an anonymous module. _ -> ds0 ++ [Module r (QName $ noName r) [] ds1] where (ds0, ds1) = (`span` ds) $ \case Pragma OptionsPragma{} -> True _ -> False -- Andreas, 2017-05-17, issue #2574. -- Since the module noName will act as jump target, it needs a range. -- We use the beginning of the file as beginning of the top level module. r = beginningOfFile $ getRange ds1 -- | Create a name from a string. mkName :: (Interval, String) -> Parser Name mkName (i, s) = do let xs = C.stringNameParts s mapM_ isValidId xs unless (alternating xs) $ parseError $ "a name cannot contain two consecutive underscores" return $ Name (getRange i) InScope xs where isValidId Hole = return () isValidId (Id y) = do let x = rawNameToString y err = "in the name " ++ s ++ ", the part " ++ x ++ " is not valid" case parse defaultParseFlags [0] (lexer return) x of ParseOk _ TokId{} -> return () ParseFailed{} -> parseError err ParseOk _ TokEOF{} -> parseError err ParseOk _ t -> parseError . ((err ++ " because it is ") ++) $ case t of TokId{} -> __IMPOSSIBLE__ TokQId{} -> __IMPOSSIBLE__ -- "qualified" TokKeyword{} -> "a keyword" TokLiteral{} -> "a literal" TokSymbol s _ -> case s of SymDot -> __IMPOSSIBLE__ -- "reserved" SymSemi -> "used to separate declarations" SymVirtualSemi -> __IMPOSSIBLE__ SymBar -> "used for with-arguments" SymColon -> "part of declaration syntax" SymArrow -> "the function arrow" SymEqual -> "part of declaration syntax" SymLambda -> "used for lambda-abstraction" SymUnderscore -> "used for anonymous identifiers" SymQuestionMark -> "a meta variable" SymAs -> "used for as-patterns" SymOpenParen -> "used to parenthesize expressions" SymCloseParen -> "used to parenthesize expressions" SymOpenIdiomBracket -> "an idiom bracket" SymCloseIdiomBracket -> "an idiom bracket" SymDoubleOpenBrace -> "used for instance arguments" SymDoubleCloseBrace -> "used for instance arguments" SymOpenBrace -> "used for hidden arguments" SymCloseBrace -> "used for hidden arguments" SymOpenVirtualBrace -> __IMPOSSIBLE__ SymCloseVirtualBrace -> __IMPOSSIBLE__ SymOpenPragma -> __IMPOSSIBLE__ -- "used for pragmas" SymClosePragma -> __IMPOSSIBLE__ -- "used for pragmas" SymEllipsis -> "used for function clauses" SymDotDot -> __IMPOSSIBLE__ -- "a modality" SymEndComment -> "the end-of-comment brace" TokString{} -> __IMPOSSIBLE__ TokSetN{} -> "a type universe" TokPropN{} -> "a prop universe" TokTeX{} -> __IMPOSSIBLE__ -- used by the LaTeX backend only TokMarkup{} -> __IMPOSSIBLE__ -- ditto TokComment{} -> __IMPOSSIBLE__ TokDummy{} -> __IMPOSSIBLE__ TokEOF{} -> __IMPOSSIBLE__ -- we know that there are no two Ids in a row alternating (Hole : Hole : _) = False alternating (_ : xs) = alternating xs alternating [] = True -- | Create a qualified name from a list of strings mkQName :: [(Interval, String)] -> Parser QName mkQName ss = do xs <- mapM mkName ss return $ foldr Qual (QName $ last xs) (init xs) -- | Create a qualified name from a string (used in pragmas). -- Range of each name component is range of whole string. -- TODO: precise ranges! pragmaQName :: (Interval, String) -> Parser QName pragmaQName (r, s) = do let ss = chopWhen (== '.') s mkQName $ map (r,) ss mkNamedArg :: Maybe QName -> Either QName Range -> Parser (NamedArg BoundName) mkNamedArg x y = do lbl <- case x of Nothing -> return $ Just $ unranged "_" Just (QName x) -> return $ Just $ Ranged (getRange x) (prettyShow x) _ -> parseError "expected unqualified variable name" var <- case y of Left (QName y) -> return $ BName y noFixity' Right r -> return $ BName (noName r) noFixity' _ -> parseError "expected unqualified variable name" return $ defaultArg $ Named lbl var -- | Polarity parser. polarity :: (Interval, String) -> Parser (Range, Occurrence) polarity (i, s) = case s of "_" -> ret Unused "++" -> ret StrictPos "+" -> ret JustPos "-" -> ret JustNeg "*" -> ret Mixed _ -> parseError $ "Not a valid polarity: " ++ s where ret x = return (getRange i, x) recoverLayout :: [(Interval, String)] -> String recoverLayout [] = "" recoverLayout xs@((i, _) : _) = go (iStart i) xs where c0 = posCol (iStart i) go cur [] = "" go cur ((i, s) : xs) = padding cur (iStart i) ++ s ++ go (iEnd i) xs padding Pn{ posLine = l1, posCol = c1 } Pn{ posLine = l2, posCol = c2 } | l1 < l2 = genericReplicate (l2 - l1) '\n' ++ genericReplicate (max 0 (c2 - c0)) ' ' | l1 == l2 = genericReplicate (c2 - c1) ' ' ensureUnqual :: QName -> Parser Name ensureUnqual (QName x) = return x ensureUnqual q@Qual{} = parseError' (rStart' $ getRange q) "Qualified name not allowed here" -- | Match a particular name. isName :: String -> (Interval, String) -> Parser () isName s (_,s') | s == s' = return () | otherwise = parseError $ "expected " ++ s ++ ", found " ++ s' -- | Build a forall pi (forall x y z -> ...) forallPi :: [LamBinding] -> Expr -> Expr forallPi bs e = Pi (map addType bs) e -- | Converts lambda bindings to typed bindings. addType :: LamBinding -> TypedBinding addType (DomainFull b) = b addType (DomainFree x) = TBind r [x] $ Underscore r Nothing where r = getRange x boundNamesOrAbsurd :: [Expr] -> Parser (Either [NamedArg BoundName] [Expr]) boundNamesOrAbsurd es | any isAbsurd es = return $ Right es | otherwise = case mapM getBName es of Just good -> return $ Left $ map defaultNamedArg good Nothing -> parseError $ "expected sequence of bound identifiers" where getName :: Expr -> Maybe Name getName (Ident (QName x)) = Just x getName (Underscore r _) = Just $ Name r NotInScope [Hole] getName _ = Nothing getBName :: Expr -> Maybe BoundName getBName e = fmap mkBoundName_ $ getName e isAbsurd :: Expr -> Bool isAbsurd (Absurd _) = True isAbsurd (HiddenArg _ (Named _ e)) = isAbsurd e isAbsurd (InstanceArg _ (Named _ e)) = isAbsurd e isAbsurd (Paren _ expr) = isAbsurd expr isAbsurd (RawApp _ exprs) = any isAbsurd exprs isAbsurd _ = False -- | Build a do-statement buildDoStmt :: Expr -> [LamClause] -> Parser DoStmt buildDoStmt (RawApp r [e]) cs = buildDoStmt e cs buildDoStmt (Let r ds Nothing) [] = return $ DoLet r ds buildDoStmt (RawApp r es) cs | (es1, arr : es2) <- break isLeftArrow es = case filter isLeftArrow es2 of arr : _ -> parseError' (rStart' $ getRange arr) $ "Unexpected " ++ prettyShow arr [] -> DoBind (getRange arr) <$> exprToPattern (RawApp (getRange es1) es1) <*> pure (RawApp (getRange es2) es2) <*> pure cs where isLeftArrow (Ident (QName (Name _ _ [Id arr]))) = elem arr ["<-", "←"] isLeftArrow _ = False buildDoStmt e (_ : _) = parseError' (rStart' $ getRange e) "Only pattern matching do-statements can have where clauses." buildDoStmt e [] = return $ DoThen e mergeImportDirectives :: [ImportDirective] -> Parser ImportDirective mergeImportDirectives is = do i <- foldl merge (return defaultImportDir) is verifyImportDirective i where merge mi i2 = do i1 <- mi let err = parseError' (rStart' $ getRange i2) "Cannot mix using and hiding module directives" return $ ImportDirective { importDirRange = fuseRange i1 i2 , using = mappend (using i1) (using i2) , hiding = hiding i1 ++ hiding i2 , impRenaming = impRenaming i1 ++ impRenaming i2 , publicOpen = publicOpen i1 || publicOpen i2 } -- | Check that an import directive doesn't contain repeated names verifyImportDirective :: ImportDirective -> Parser ImportDirective verifyImportDirective i = case filter ((>1) . length) $ group $ sort xs of [] -> return i yss -> parseErrorRange (head $ concat yss) $ "Repeated name" ++ s ++ " in import directive: " ++ concat (intersperse ", " $ map (prettyShow . head) yss) where s = case yss of [_] -> "" _ -> "s" where xs = names (using i) ++ hiding i ++ map renFrom (impRenaming i) names (Using xs) = xs names UseEverything = [] data RecordDirective = Induction (Ranged Induction) | Constructor (Name, IsInstance) | Eta (Ranged HasEta) deriving (Eq,Show) verifyRecordDirectives :: [RecordDirective] -> Parser (Maybe (Ranged Induction), Maybe HasEta, Maybe (Name, IsInstance)) verifyRecordDirectives xs | null rs = return (ltm is, ltm es, ltm cs) | otherwise = parseErrorRange (head rs) $ "Repeated record directives at: \n" ++ intercalate "\n" (map prettyShow rs) where ltm :: [a] -> Maybe a ltm [] = Nothing ltm (x:xs) = Just x errorFromList [] = [] errorFromList [x] = [] errorFromList xs = map getRange xs rs = sort (concat ([errorFromList is, errorFromList es', errorFromList cs])) is = [ i | Induction i <- xs ] es' = [ i | Eta i <- xs ] es = map rangedThing es' cs = [ i | Constructor i <- xs ] -- | Breaks up a string into substrings. Returns every maximal -- subsequence of zero or more characters distinct from @'.'@. -- -- > splitOnDots "" == [""] -- > splitOnDots "foo.bar" == ["foo", "bar"] -- > splitOnDots ".foo.bar" == ["", "foo", "bar"] -- > splitOnDots "foo.bar." == ["foo", "bar", ""] -- > splitOnDots "foo..bar" == ["foo", "", "bar"] splitOnDots :: String -> [String] splitOnDots "" = [""] splitOnDots ('.' : s) = [] : splitOnDots s splitOnDots (c : s) = case splitOnDots s of p : ps -> (c : p) : ps -- | Returns 'True' iff the name is a valid Haskell (hierarchical) -- module name. validHaskellModuleName :: String -> Bool validHaskellModuleName = all ok . splitOnDots where -- Checks if a dot-less module name is well-formed. ok :: String -> Bool ok [] = False ok (c : s) = isUpper c && all (\c -> isLower c || c == '_' || isUpper c || generalCategory c == DecimalNumber || c == '\'') s {-------------------------------------------------------------------------- Patterns --------------------------------------------------------------------------} -- | Turn an expression into a left hand side. exprToLHS :: Expr -> Parser ([Expr] -> [Expr] -> LHS) exprToLHS e = LHS <$> exprToPattern e -- | Turn an expression into a pattern. Fails if the expression is not a -- valid pattern. exprToPattern :: Expr -> Parser Pattern exprToPattern e = do let failure = parseErrorRange e $ "Not a valid pattern: " ++ prettyShow e case e of Ident x -> return $ IdentP x App _ e1 e2 -> AppP <$> exprToPattern e1 <*> T.mapM (T.mapM exprToPattern) e2 Paren r e -> ParenP r <$> exprToPattern e Underscore r _ -> return $ WildP r Absurd r -> return $ AbsurdP r As r x e -> AsP r x <$> exprToPattern e Dot r (HiddenArg _ e) -> return $ HiddenP r $ fmap (DotP r) e Dot r e -> return $ DotP r e Lit l -> return $ LitP l HiddenArg r e -> HiddenP r <$> T.mapM exprToPattern e InstanceArg r e -> InstanceP r <$> T.mapM exprToPattern e RawApp r es -> RawAppP r <$> mapM exprToPattern es Quote r -> return $ QuoteP r Rec r es | Just fs <- mapM maybeLeft es -> do RecP r <$> T.mapM (T.mapM exprToPattern) fs Equal r e1 e2 -> return $ EqualP r [(e1, e2)] Ellipsis r -> return $ EllipsisP r -- WithApp has already lost the range information of the bars '|' WithApp r e es -> do p <- exprToPattern e ps <- forM es $ \ e -> defaultNamedArg . WithP (getRange e) <$> exprToPattern e -- TODO #2822: Range! return $ foldl AppP p ps _ -> failure opAppExprToPattern :: OpApp Expr -> Parser Pattern opAppExprToPattern (SyntaxBindingLambda _ _ _) = parseError "Syntax binding lambda cannot appear in a pattern" opAppExprToPattern (Ordinary e) = exprToPattern e -- | Turn an expression into a name. Fails if the expression is not a -- valid identifier. exprToName :: Expr -> Parser Name exprToName (Ident (QName x)) = return x exprToName e = parseErrorRange e $ "Not a valid identifier: " ++ prettyShow e stripSingletonRawApp :: Expr -> Expr stripSingletonRawApp (RawApp _ [e]) = stripSingletonRawApp e stripSingletonRawApp e = e isEqual :: Expr -> Maybe (Expr, Expr) isEqual e = case stripSingletonRawApp e of Equal _ a b -> Just (stripSingletonRawApp a, stripSingletonRawApp b) _ -> Nothing maybeNamed :: Expr -> Named_ Expr maybeNamed e = case isEqual e of Just (Ident (QName x), b) -> named (Ranged (getRange x) (nameToRawName x)) b _ -> unnamed e patternSynArgs :: [Either Hiding LamBinding] -> Parser [Arg Name] patternSynArgs = mapM pSynArg where pSynArg Left{} = parseError "Absurd patterns are not allowed in pattern synonyms" pSynArg (Right DomainFull{}) = parseError "Unexpected type signature in pattern synonym argument" pSynArg (Right (DomainFree x)) | let h = getHiding x, h `notElem` [Hidden, NotHidden] = parseError $ prettyShow h ++ " arguments not allowed to pattern synonyms" | getRelevance x /= Relevant = parseError "Arguments to pattern synonyms must be relevant" | otherwise = return $ fmap (boundName . namedThing) x parsePanic s = parseError $ "Internal parser error: " ++ s ++ ". Please report this as a bug." {- RHS or type signature -} data RHSOrTypeSigs = JustRHS RHS | TypeSigsRHS Expr deriving Show patternToNames :: Pattern -> Parser [(ArgInfo, Name)] patternToNames p = case p of IdentP (QName i) -> return [(defaultArgInfo, i)] WildP r -> return [(defaultArgInfo, C.noName r)] DotP _ (Ident (QName i)) -> return [(setRelevance Irrelevant defaultArgInfo, i)] RawAppP _ ps -> concat <$> mapM patternToNames ps _ -> parseError $ "Illegal name in type signature: " ++ prettyShow p funClauseOrTypeSigs :: [Attr] -> LHS -> RHSOrTypeSigs -> WhereClause -> Parser [Declaration] funClauseOrTypeSigs attrs lhs mrhs wh = do -- traceShowM lhs case mrhs of JustRHS rhs -> do unless (null attrs) $ parseErrorRange attrs $ "A function clause cannot have attributes" return [FunClause lhs rhs wh False] TypeSigsRHS e -> case wh of NoWhere -> case lhs of LHS p _ _ | hasEllipsis p -> parseError "The ellipsis ... cannot have a type signature" LHS _ _ (_:_) -> parseError "Illegal: with in type signature" LHS _ (_:_) _ -> parseError "Illegal: rewrite in type signature" LHS p _ _ | hasWithPatterns p -> parseError "Illegal: with patterns in type signature" LHS p [] [] -> forMM (patternToNames p) $ \ (info, x) -> do info <- applyAttrs attrs info return $ typeSig info x e _ -> parseError "A type signature cannot have a where clause" parseDisplayPragma :: Range -> Position -> String -> Parser Pragma parseDisplayPragma r pos s = case parsePosString pos defaultParseFlags [normal] funclauseParser s of ParseOk s [FunClause (LHS lhs [] []) (RHS rhs) NoWhere ca] | null (parseInp s) -> return $ DisplayPragma r lhs rhs _ -> parseError "Invalid DISPLAY pragma. Should have form {-# DISPLAY LHS = RHS #-}." typeSig :: ArgInfo -> Name -> Expr -> Declaration typeSig i n e = TypeSig i n (Generalized e) -- * Attributes -- | Parsed attribute. data Attr = Attr { attrRange :: Range -- ^ Range includes the @. , attrName :: String -- ^ Concrete, user written attribute for error reporting. , theAttr :: Attribute -- ^ Parsed attribute. } instance HasRange Attr where getRange = attrRange instance SetRange Attr where setRange r (Attr _ x a) = Attr r x a -- | Parse an attribute. toAttribute :: (HasRange e, Pretty e) => e -> Parser Attr toAttribute x = maybe failure (return . Attr (getRange x) y) $ stringToAttribute y where y = prettyShow x failure = parseErrorRange x $ "Unknown attribute: " ++ y -- | Apply an attribute to thing (usually `Arg`). -- This will fail if one of the attributes is already set -- in the thing to something else than the default value. applyAttr :: (LensAttribute a) => Attr -> a -> Parser a applyAttr attr@(Attr r x a) = maybe failure return . setPristineAttribute a where failure = errorConflictingAttribute attr -- | Apply attributes to thing (usually `Arg`). -- Expects a reversed list of attributes. -- This will fail if one of the attributes is already set -- in the thing to something else than the default value. applyAttrs :: (LensAttribute a) => [Attr] -> a -> Parser a applyAttrs rattrs arg = do let attrs = reverse rattrs checkForUniqueAttribute (isJust . isQuantityAttribute ) attrs checkForUniqueAttribute (isJust . isRelevanceAttribute) attrs foldM (flip applyAttr) arg attrs -- | Report a parse error if two attributes in the list are of the same kind, -- thus, present conflicting information. checkForUniqueAttribute :: (Attribute -> Bool) -> [Attr] -> Parser () checkForUniqueAttribute p attrs = do let pAttrs = filter (p . theAttr) attrs when (length pAttrs >= 2) $ errorConflictingAttributes pAttrs -- | Report an attribute as conflicting (e.g., with an already set value). errorConflictingAttribute :: Attr -> Parser a errorConflictingAttribute a = parseErrorRange a $ "Conflicting attribute: " ++ attrName a -- | Report attributes as conflicting (e.g., with each other). -- Precondition: List not emtpy. errorConflictingAttributes :: [Attr] -> Parser a errorConflictingAttributes [a] = errorConflictingAttribute a errorConflictingAttributes as = parseErrorRange as $ "Conflicting attributes: " ++ unwords (map attrName as) {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "" #-} {-# LINE 1 "" #-} {-# LINE 10 "" #-} # 1 "/usr/include/stdc-predef.h" 1 3 4 # 17 "/usr/include/stdc-predef.h" 3 4 {-# LINE 10 "" #-} {-# LINE 1 "/usr/local/stow/ghc-8.6.5/lib/ghc-8.6.5/include/ghcversion.h" #-} {-# LINE 10 "" #-} {-# LINE 1 "/tmp/ghc31894_0/ghc_2.h" #-} {-# LINE 10 "" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} -- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp -- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. #if __GLASGOW_HASKELL__ > 706 #define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool) #define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool) #define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool) #else #define LT(n,m) (n Happy_GHC_Exts.<# m) #define GTE(n,m) (n Happy_GHC_Exts.>=# m) #define EQ(n,m) (n Happy_GHC_Exts.==# m) #endif {-# LINE 43 "templates/GenericTemplate.hs" #-} data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList {-# LINE 65 "templates/GenericTemplate.hs" #-} {-# LINE 75 "templates/GenericTemplate.hs" #-} {-# LINE 84 "templates/GenericTemplate.hs" #-} infixr 9 `HappyStk` data HappyStk a = HappyStk a (HappyStk a) ----------------------------------------------------------------------------- -- starting the parse happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll ----------------------------------------------------------------------------- -- Accepting the parse -- If the current token is 0#, it means we've just accepted a partial -- parse (a %partial parser). We must ignore the saved token on the top of -- the stack in this case. happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) = happyReturn1 ans happyAccept j tk st sts (HappyStk ans _) = (happyTcHack j (happyTcHack st)) (happyReturn1 ans) ----------------------------------------------------------------------------- -- Arrays only: do the next action happyDoAction i tk st = {- nothing -} case action of 0# -> {- nothing -} happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Int)) i tk st -1# -> {- nothing -} happyAccept i tk st n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -} (happyReduceArr Happy_Data_Array.! rule) i tk st where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#)))))) n -> {- nothing -} happyShift new_state i tk st where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) where off = happyAdjustOffset (indexShortOffAddr happyActOffsets st) off_i = (off Happy_GHC_Exts.+# i) check = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#)) then EQ(indexShortOffAddr happyCheck off_i, i) else False action | check = indexShortOffAddr happyTable off_i | otherwise = indexShortOffAddr happyDefActions st indexShortOffAddr (HappyA# arr) off = Happy_GHC_Exts.narrow16Int# i where i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low) high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#))) low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off')) off' = off Happy_GHC_Exts.*# 2# {-# INLINE happyLt #-} happyLt x y = LT(x,y) readArrayBit arr bit = Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `mod` 16) where unbox_int (Happy_GHC_Exts.I# x) = x data HappyAddr = HappyA# Happy_GHC_Exts.Addr# ----------------------------------------------------------------------------- -- HappyState data type (not arrays) {-# LINE 180 "templates/GenericTemplate.hs" #-} ----------------------------------------------------------------------------- -- Shifting a token happyShift new_state 0# tk st sts stk@(x `HappyStk` _) = let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in -- trace "shifting the error token" $ happyDoAction i tk new_state (HappyCons (st) (sts)) (stk) happyShift new_state i tk st sts stk = happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk) -- happyReduce is specialised for the common cases. happySpecReduce_0 i fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happySpecReduce_0 nt fn j tk st@((action)) sts stk = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk) happySpecReduce_1 i fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk') = let r = fn v1 in happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk')) happySpecReduce_2 i fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk') = let r = fn v1 v2 in happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk')) happySpecReduce_3 i fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk') = let r = fn v1 v2 v3 in happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk')) happyReduce k i fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happyReduce k nt fn j tk st sts stk = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of sts1@((HappyCons (st1@(action)) (_))) -> let r = fn stk in -- it doesn't hurt to always seq here... happyDoSeq r (happyGoto nt j tk st1 sts1 r) happyMonadReduce k nt fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happyMonadReduce k nt fn j tk st sts stk = case happyDrop k (HappyCons (st) (sts)) of sts1@((HappyCons (st1@(action)) (_))) -> let drop_stk = happyDropStk k stk in happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk)) happyMonad2Reduce k nt fn 0# tk st sts stk = happyFail [] 0# tk st sts stk happyMonad2Reduce k nt fn j tk st sts stk = case happyDrop k (HappyCons (st) (sts)) of sts1@((HappyCons (st1@(action)) (_))) -> let drop_stk = happyDropStk k stk off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st1) off_i = (off Happy_GHC_Exts.+# nt) new_state = indexShortOffAddr happyTable off_i in happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk)) happyDrop 0# l = l happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t happyDropStk 0# l = l happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs ----------------------------------------------------------------------------- -- Moving to a new state after a reduction happyGoto nt j tk st = {- nothing -} happyDoAction j tk new_state where off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st) off_i = (off Happy_GHC_Exts.+# nt) new_state = indexShortOffAddr happyTable off_i ----------------------------------------------------------------------------- -- Error recovery (0# is the error token) -- parse error if we are in recovery and we fail again happyFail explist 0# tk old_st _ stk@(x `HappyStk` _) = let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in -- trace "failing" $ happyError_ explist i tk {- We don't need state discarding for our restricted implementation of "error". In fact, it can cause some bogus parses, so I've disabled it for now --SDM -- discard a state happyFail 0# tk old_st (HappyCons ((action)) (sts)) (saved_tok `HappyStk` _ `HappyStk` stk) = -- trace ("discarding state, depth " ++ show (length stk)) $ happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk)) -} -- Enter error recovery: generate an error token, -- save the old token and carry on. happyFail explist i tk (action) sts stk = -- trace "entering error recovery" $ happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk) -- Internal happy errors: notHappyAtAll :: a notHappyAtAll = error "Internal Happy error\n" ----------------------------------------------------------------------------- -- Hack to get the typechecker to accept our action functions happyTcHack :: Happy_GHC_Exts.Int# -> a -> a happyTcHack x y = y {-# INLINE happyTcHack #-} ----------------------------------------------------------------------------- -- Seq-ing. If the --strict flag is given, then Happy emits -- happySeq = happyDoSeq -- otherwise it emits -- happySeq = happyDontSeq happyDoSeq, happyDontSeq :: a -> b -> b happyDoSeq a b = a `seq` b happyDontSeq a b = b ----------------------------------------------------------------------------- -- Don't inline any functions from the template. GHC has a nasty habit -- of deciding to inline happyGoto everywhere, which increases the size of -- the generated parser quite a bit. {-# NOINLINE happyDoAction #-} {-# NOINLINE happyTable #-} {-# NOINLINE happyCheck #-} {-# NOINLINE happyActOffsets #-} {-# NOINLINE happyGotoOffsets #-} {-# NOINLINE happyDefActions #-} {-# NOINLINE happyShift #-} {-# NOINLINE happySpecReduce_0 #-} {-# NOINLINE happySpecReduce_1 #-} {-# NOINLINE happySpecReduce_2 #-} {-# NOINLINE happySpecReduce_3 #-} {-# NOINLINE happyReduce #-} {-# NOINLINE happyMonadReduce #-} {-# NOINLINE happyGoto #-} {-# NOINLINE happyFail #-} -- end of Happy Template.